coding-tool-x 3.8.6 → 3.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/assets/{AgentsDrawer-Db9wAyaZ.js → AgentsDrawer-DRQuwi0m.js} +1 -1
- package/dist/web/assets/Analytics-Cf5KwEdj.js +1 -0
- package/dist/web/assets/AssetPathField-DyniM0pF.js +1 -0
- package/dist/web/assets/{ChatHistoryDrawer-CwzJHyNP.js → ChatHistoryDrawer-CrfS0KYV.js} +1 -1
- package/dist/web/assets/{CollapseItem-CTCfSiue.js → CollapseItem-ClMsJuUu.js} +1 -1
- package/dist/web/assets/{CommandsDrawer-vDghB1U9.js → CommandsDrawer-CzHelf56.js} +1 -1
- package/dist/web/assets/ConfigExportDrawer-BEZ8wTby.js +1 -0
- package/dist/web/assets/ConfigTemplates-Crg3xWe5.js +1 -0
- package/dist/web/assets/{ConfigTemplatesDrawer-CbsJp76X.js → ConfigTemplatesDrawer-BqM32Im7.js} +1 -1
- package/dist/web/assets/{ConfigTemplatesPanel-liMSTh7s.js → ConfigTemplatesPanel-lTdutC8H.js} +1 -1
- package/dist/web/assets/{Divider-D28g1gwj.js → Divider-DsdbkHrG.js} +1 -1
- package/dist/web/assets/{FavoritesDrawer-D6QSiYaL.js → FavoritesDrawer-DDyWUBJR.js} +1 -1
- package/dist/web/assets/Forward-DLCL7aMY.js +1 -0
- package/dist/web/assets/{GatewayConvertDrawer-RvET6iNG.js → GatewayConvertDrawer-Rigtt_5J.js} +1 -1
- package/dist/web/assets/Home-tCSKmSHV.js +1 -0
- package/dist/web/assets/{MarkdownEditor-CYmLGYju.js → MarkdownEditor-BMMUufSc.js} +1 -1
- package/dist/web/assets/McpDrawer-CmE-d7VW.js +1 -0
- package/dist/web/assets/{McpFormDrawer-BcTlgSpN.js → McpFormDrawer-ByvS18od.js} +1 -1
- package/dist/web/assets/{PluginManager-Dh2o0xkZ.js → PluginManager-C4kJlpVX.js} +1 -1
- package/dist/web/assets/{PluginsDrawer-deKQ5u3I.js → PluginsDrawer-05R4k15x.js} +1 -1
- package/dist/web/assets/PluginsPanel-BCoEs7Og.js +1 -0
- package/dist/web/assets/PluginsPanel-CzGMK-Ap.css +1 -0
- package/dist/web/assets/ProjectList-BJt1OIaI.js +1 -0
- package/dist/web/assets/ProjectList-DG3yu8xZ.css +1 -0
- package/dist/web/assets/PromptsDrawer-DnwBf_oW.js +1 -0
- package/dist/web/assets/RecentSessionsDrawer-B7d-38wH.js +1 -0
- package/dist/web/assets/RecentSessionsDrawer-yrAD4p1A.css +1 -0
- package/dist/web/assets/SessionCard-BUgjHQwX.js +1 -0
- package/dist/web/assets/SessionList-B-bXZRFk.js +1 -0
- package/dist/web/assets/SessionList-qG_XpPBJ.css +1 -0
- package/dist/web/assets/{SettingsDrawer-u_vwUuPS.js → SettingsDrawer-BITzjQLl.js} +1 -1
- package/dist/web/assets/SkillManager-D9jkNuRM.js +1 -0
- package/dist/web/assets/{SkillsDrawer-CkF3BpyC.js → SkillsDrawer-0Z4IefxC.js} +1 -1
- package/dist/web/assets/SkillsPanel-BKIVOj7n.js +1 -0
- package/dist/web/assets/{SkillsPanel-B3Nm5j32.css → SkillsPanel-C4ke56nF.css} +1 -1
- package/dist/web/assets/{SpeedTestDrawer-BgfG1Ked.js → SpeedTestDrawer-Bx1bYf5i.js} +1 -1
- package/dist/web/assets/Upload-CzC4rGI4.js +1 -0
- package/dist/web/assets/{WorkspaceDrawer-Br5CeCzL.js → WorkspaceDrawer-eujtWpoq.js} +1 -1
- package/dist/web/assets/{WorkspaceManager-B2O8-qIw.js → WorkspaceManager-CQ-8Ej68.js} +1 -1
- package/dist/web/assets/{WorkspacePanel-5oDKit3c.js → WorkspacePanel-Cql5qE2R.js} +1 -1
- package/dist/web/assets/headers-BqDmkMjy.js +1 -0
- package/dist/web/assets/{icons-B2Vg-IOC.js → icons-DmFe4b5j.js} +1 -1
- package/dist/web/assets/index-Cmmwj3Fx.js +2 -0
- package/dist/web/assets/{index-Bi1MQHYX.css → index-Cnbe696C.css} +1 -1
- package/dist/web/assets/{light-Cp0t7v32.js → light-0eavxNvt.js} +1 -1
- package/dist/web/assets/platforms-BmzzwnSw.js +1 -0
- package/dist/web/assets/platforms-DWXgmy2w.js +1 -0
- package/dist/web/assets/session-visibility-BAmxh3cK.js +1 -0
- package/dist/web/assets/sessions-D4yQtfKb.js +1 -0
- package/dist/web/assets/sessions-DqlbocLJ.js +1 -0
- package/dist/web/assets/use-message-DqCwefG6.js +1 -0
- package/dist/web/assets/{useResponsiveDrawer-jbmqZuJs.js → useResponsiveDrawer-DZd5rNk5.js} +1 -1
- package/dist/web/index.html +7 -7
- package/package.json +1 -1
- package/src/commands/search.js +17 -2
- package/src/config/paths.js +2 -0
- package/src/platforms/driver-registry.js +9 -1
- package/src/platforms/drivers/claude/session-history-adapter.js +72 -1
- package/src/platforms/drivers/claude/sessions-implementation.js +49 -7
- package/src/platforms/drivers/claude/sessions.js +30 -6
- package/src/platforms/drivers/codex/parser.js +57 -1
- package/src/platforms/drivers/codex/session-history-adapter.js +8 -2
- package/src/platforms/drivers/codex/sessions-implementation.js +25 -3
- package/src/platforms/drivers/codex/sessions.js +18 -1
- package/src/platforms/drivers/dsh/api-operations.js +396 -0
- package/src/platforms/drivers/dsh/channels-implementation.js +458 -0
- package/src/platforms/drivers/dsh/channels.js +191 -0
- package/src/platforms/drivers/dsh/common.js +571 -0
- package/src/platforms/drivers/dsh/native-config.js +93 -0
- package/src/platforms/drivers/dsh/native-logs.js +116 -0
- package/src/platforms/drivers/dsh/plugin-manager.js +117 -0
- package/src/platforms/drivers/dsh/projects.js +23 -0
- package/src/platforms/drivers/dsh/proxy-implementation.js +260 -0
- package/src/platforms/drivers/dsh/proxy.js +23 -0
- package/src/platforms/drivers/dsh/resources.js +346 -0
- package/src/platforms/drivers/dsh/sessions.js +587 -0
- package/src/platforms/drivers/dsh/statistics-implementation.js +238 -0
- package/src/platforms/drivers/dsh/statistics.js +24 -0
- package/src/platforms/drivers/gemini/session-history-adapter.js +49 -1
- package/src/platforms/drivers/gemini/sessions-implementation.js +46 -1
- package/src/platforms/drivers/gemini/sessions.js +2 -1
- package/src/platforms/drivers/omp/session-history-adapter.js +42 -1
- package/src/platforms/drivers/omp/sessions-implementation.js +51 -3
- package/src/platforms/drivers/omp/sessions.js +33 -2
- package/src/platforms/drivers/opencode/sessions-implementation.js +89 -9
- package/src/platforms/drivers/opencode/sessions.js +37 -1
- package/src/platforms/manifest-schema.js +43 -3
- package/src/platforms/manifests/dsh.json +542 -0
- package/src/platforms/path-resolver.js +2 -0
- package/src/platforms/platform-path-context.js +12 -2
- package/src/platforms/registry.js +16 -1
- package/src/platforms/runtime.js +5 -0
- package/src/platforms/session-history-adapters.js +1 -0
- package/src/server/api/platform-api-config.js +23 -2
- package/src/server/api/platform-route-factory.js +9 -2
- package/src/server/api/platforms.js +19 -1
- package/src/server/api/plugins.js +108 -13
- package/src/server/services/config-registry-service.js +10 -1
- package/src/server/services/config-templates-service.js +1 -0
- package/src/server/services/plugins-service.js +474 -103
- package/src/server/services/session-history-index.js +900 -140
- package/src/server/services/session-history-worker.js +3 -1
- package/src/server/services/skill-service.js +214 -7
- package/src/server/services/usage-log-utils.js +1 -0
- package/src/server/services/workspace-service.js +39 -10
- package/src/shared/channel-driver.js +80 -5
- package/src/shared/driver-factories/api.js +22 -6
- package/src/shared/driver-factories/projects.js +8 -0
- package/dist/web/assets/Analytics-C4gMzv7g.js +0 -1
- package/dist/web/assets/AssetPathField-Bd_nMFu3.js +0 -1
- package/dist/web/assets/ConfigExportDrawer-C-XDvlHc.js +0 -1
- package/dist/web/assets/ConfigTemplates-CYY8XRED.js +0 -1
- package/dist/web/assets/Home-P8eseZcf.js +0 -1
- package/dist/web/assets/McpDrawer-Ch3bkKIq.js +0 -1
- package/dist/web/assets/PluginsPanel-BofsgQgj.js +0 -1
- package/dist/web/assets/PluginsPanel-D6ZqITcR.css +0 -1
- package/dist/web/assets/ProjectList-677RLZ8O.css +0 -1
- package/dist/web/assets/ProjectList-DhSWJHTA.js +0 -1
- package/dist/web/assets/PromptsDrawer-Cfb2FeeU.js +0 -1
- package/dist/web/assets/RecentSessionsDrawer-3eXamJhr.js +0 -1
- package/dist/web/assets/RecentSessionsDrawer-CKFsOYDM.css +0 -1
- package/dist/web/assets/SessionCard-CW0eHURI.js +0 -1
- package/dist/web/assets/SessionList-BpYRz1cX.css +0 -1
- package/dist/web/assets/SessionList-DQfyDGWU.js +0 -1
- package/dist/web/assets/SkillManager-DHMprJLA.js +0 -1
- package/dist/web/assets/SkillsPanel-DWE4pFGx.js +0 -1
- package/dist/web/assets/Upload-CNwaGOws.js +0 -1
- package/dist/web/assets/headers-cf-QapUq.js +0 -1
- package/dist/web/assets/index-BMAUPq5K.js +0 -2
- package/dist/web/assets/platforms-CBkB45JP.js +0 -1
- package/dist/web/assets/platforms-FTpjxAT6.js +0 -1
- package/dist/web/assets/sessions-Cmy31slD.js +0 -1
- package/dist/web/assets/sessions-yC_oVVh8.js +0 -1
- package/dist/web/assets/use-message-DoLM8C1C.js +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Home-P8eseZcf.js","assets/_plugin-vue_export-helper-BeLZJZij.js","assets/vue-vendor-BqZbbXHA.js","assets/vendors-D0c_0KLP.js","assets/platforms-CBkB45JP.js","assets/client-UDwXBP9i.js","assets/icons-B2Vg-IOC.js","assets/platforms-FTpjxAT6.js","assets/use-message-DoLM8C1C.js","assets/RecentSessionsDrawer-3eXamJhr.js","assets/useResponsiveDrawer-jbmqZuJs.js","assets/use-lock-html-scroll-DXIqmUW4.js","assets/DrawerContent-ChXgZ1Xm.js","assets/sessions-Cmy31slD.js","assets/clipboard-B46yyoz_.js","assets/SessionCard-CW0eHURI.js","assets/SessionCard-aM2NHu6i.css","assets/RecentSessionsDrawer-CKFsOYDM.css","assets/Home-CSuFuJ9Y.css","assets/ProjectList-DhSWJHTA.js","assets/light-Cp0t7v32.js","assets/headers-cf-QapUq.js","assets/sessions-yC_oVVh8.js","assets/ProjectList-677RLZ8O.css","assets/SessionList-DQfyDGWU.js","assets/AssetPathField-Bd_nMFu3.js","assets/McpFormDrawer-BcTlgSpN.js","assets/CollapseItem-CTCfSiue.js","assets/project-config-B2baPzYL.js","assets/McpFormDrawer-BRbDcawn.css","assets/SkillsPanel-DWE4pFGx.js","assets/Upload-CNwaGOws.js","assets/markdown-u082bbtj.js","assets/MarkdownEditor-CYmLGYju.js","assets/xml-CgY3RMlX.js","assets/MarkdownEditor-qfVgSre_.css","assets/skill-repo-input-B_fkGlUK.js","assets/SkillsPanel-B3Nm5j32.css","assets/ChatHistoryDrawer-CwzJHyNP.js","assets/ChatHistoryDrawer-B2qBQs9L.css","assets/SessionList-BpYRz1cX.css","assets/WorkspaceManager-B2O8-qIw.js","assets/WorkspacePanel-5oDKit3c.js","assets/Divider-D28g1gwj.js","assets/workspaces-mjyPVGS8.js","assets/WorkspacePanel-D0-zHTHP.css","assets/WorkspaceManager-CrwgQgmP.css","assets/ConfigTemplates-CYY8XRED.js","assets/ConfigTemplatesPanel-liMSTh7s.js","assets/ConfigTemplatesPanel-CWyPtk67.css","assets/ConfigTemplates-Bidwfdf2.css","assets/SkillManager-DHMprJLA.js","assets/SkillManager-C0GCT2Kb.css","assets/PluginManager-Dh2o0xkZ.js","assets/PluginsPanel-BofsgQgj.js","assets/PluginsPanel-D6ZqITcR.css","assets/PluginManager-ROyoZ-6m.css","assets/Analytics-C4gMzv7g.js","assets/Analytics-CyHhR126.css","assets/FavoritesDrawer-D6QSiYaL.js","assets/FavoritesDrawer-CG9eI9Ay.css","assets/SettingsDrawer-u_vwUuPS.js","assets/SettingsDrawer-Dw5NUgHC.css","assets/McpDrawer-Ch3bkKIq.js","assets/McpDrawer-C0dnsZhQ.css","assets/PromptsDrawer-Cfb2FeeU.js","assets/PromptsDrawer-BIgiYCEQ.css","assets/SpeedTestDrawer-BgfG1Ked.js","assets/SpeedTestDrawer-Dc0WToJ_.css","assets/GatewayConvertDrawer-RvET6iNG.js","assets/GatewayConvertDrawer-CuNlf7AC.css","assets/SkillsDrawer-CkF3BpyC.js","assets/SkillsDrawer-BCNme-aJ.css","assets/CommandsDrawer-vDghB1U9.js","assets/CommandsDrawer-BZJxlPvV.css","assets/AgentsDrawer-Db9wAyaZ.js","assets/AgentsDrawer-Pw2k-ZAa.css","assets/PluginsDrawer-deKQ5u3I.js","assets/PluginsDrawer-DM3QjprE.css","assets/WorkspaceDrawer-Br5CeCzL.js","assets/WorkspaceDrawer-CGnMu9p1.css","assets/ConfigTemplatesDrawer-CbsJp76X.js","assets/ConfigTemplatesDrawer-BfDi8yO3.css","assets/ConfigExportDrawer-C-XDvlHc.js","assets/ConfigExportDrawer-dwruRKWr.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{$ as e,$t as o,A as t,At as n,B as r,Bt as a,C as l,Cn as i,Ct as s,D as c,Dt as d,E as u,F as p,Ft as h,G as f,H as v,Ht as m,I as g,It as b,J as y,K as x,L as C,Lt as w,M as S,Mt as k,N as P,Nt as T,O as I,Ot as z,P as M,Pt as R,Q as A,Qt as F,R as $,Rt as O,S as B,Sn as E,St as _,T as D,Tn as L,Tt as H,U as j,Ut as U,V as W,Vt as N,W as K,Wt as V,X as q,Xt as G,Y,Yt as J,Z as X,Zt as Z,_ as Q,_n as ee,_t as oe,a as te,an as ne,at as re,b as ae,bn as le,bt as ie,c as se,cn as ce,ct as de,dn as ue,dt as pe,et as he,f as fe,fn as ve,g as me,gn as ge,gt as be,h as ye,hn as xe,ht as Ce,i as we,it as Se,j as ke,jt as Pe,k as Te,l as Ie,ln as ze,lt as Me,mt as Re,n as Ae,nn as Fe,nt as $e,o as Oe,on as Be,ot as Ee,pn as _e,pt as De,q as Le,qt as He,r as je,rn as Ue,rt as We,s as Ne,sn as Ke,st as Ve,t as qe,tn as Ge,tt as Ye,u as Je,un as Xe,ut as Ze,v as Qe,vn as eo,vt as oo,w as to,wn as no,x as ro,xn as ao,xt as lo,y as io,yn as so,z as co,zt as uo}from"./_plugin-vue_export-helper-BeLZJZij.js";import{A as po,B as ho,C as fo,D as vo,F as mo,G as go,H as bo,I as yo,J as xo,K as Co,L as wo,M as So,N as ko,O as Po,Q as To,R as Io,S as zo,T as Mo,V as Ro,W as Ao,Y as Fo,Z as $o,_ as Oo,_t as Bo,a as Eo,at as _o,b as Do,c as Lo,d as Ho,dt as jo,et as Uo,f as Wo,g as No,gt as Ko,h as Vo,ht as qo,i as Go,j as Yo,k as Jo,l as Xo,m as Zo,mt as Qo,n as et,o as ot,ot as tt,p as nt,q as rt,r as at,rt as lt,st as it,t as st,tt as ct,v as dt,w as ut,x as pt,y as ht,z as ft}from"./vue-vendor-BqZbbXHA.js";import{n as vt}from"./vendors-D0c_0KLP.js";import{c as mt,i as gt,n as bt,o as yt,s as xt,t as Ct}from"./client-UDwXBP9i.js";import{a as wt,c as St,d as kt,i as Pt,n as Tt,r as It,t as zt,u as Mt}from"./platforms-CBkB45JP.js";import{$ as Rt,A as At,At as Ft,B as $t,Ct as Ot,Et as Bt,Ft as Et,H as _t,I as Dt,J as Lt,P as Ht,St as jt,Z as Ut,a as Wt,bt as Nt,c as Kt,d as Vt,g as qt,h as Gt,ht as Yt,kt as Jt,mt as Xt,o as Zt,pt as Qt,r as en,rt as on,s as tn,t as nn,xt as rn}from"./icons-B2Vg-IOC.js";import{_ as an,a as ln,b as sn,c as cn,d as dn,f as un,g as pn,h as hn,i as fn,l as vn,m as mn,n as gn,o as bn,p as yn,r as xn,s as Cn,t as wn,u as Sn,v as kn,x as Pn,y as Tn}from"./use-message-DoLM8C1C.js";import{A as In,C as zn,D as Mn,E as Rn,F as An,I as Fn,L as $n,M as On,N as Bn,P as En,S as _n,T as Dn,_ as Ln,a as Hn,b as jn,c as Un,d as Wn,f as Nn,g as Kn,h as Vn,i as qn,j as Gn,k as Yn,l as Jn,m as Xn,n as Zn,o as Qn,p as er,r as or,s as tr,t as nr,u as rr,v as ar,w as lr,x as ir,y as sr}from"./light-Cp0t7v32.js";function cr({platformStore:e,configRef:o}={}){const t=e||zt(),{uiConfig:n}=wt(),r=o||n,a=Do(()=>t.all||t.platforms||[]),l=Do(()=>Pt({catalog:a.value,enabledCliPlatforms:r.value?.enabledCliPlatforms})),i=Do(()=>new Map(a.value.map(e=>[e.key,e]))),s=Do(()=>l.value.map(e=>i.value.get(e)).filter(Boolean));return{catalog:a,enabledPlatforms:s,enabledKeys:l,byCapability:function(e){return s.value.filter(o=>!0===o.capabilities?.[e]||!0===o.resourceTypes?.[e])},getPlatform:function(e){const o=String(e||"").trim().toLowerCase();return i.value.get(o)||null}}}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))o(e);new MutationObserver(e=>{for(const t of e)if("childList"===t.type)for(const e of t.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&o(e)}).observe(document,{childList:!0,subtree:!0})}function o(e){if(e.ep)return;e.ep=!0;const o=function(e){const o={};return e.integrity&&(o.integrity=e.integrity),e.referrerPolicy&&(o.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?o.credentials="include":"anonymous"===e.crossOrigin?o.credentials="omit":o.credentials="same-origin",o}(e);fetch(e.href,o)}}();var dr={},ur=function(e,o,t){let n=Promise.resolve();if(o&&o.length>0){const e=document.getElementsByTagName("link"),t=document.querySelector("meta[property=csp-nonce]"),a=t?.nonce||t?.getAttribute("nonce");r=o.map(o=>{var t;if(o=function(e){return"/"+e}(o),t=o,(o=import.meta.resolve?import.meta.resolve(t):new URL(t,import.meta.url).href)in dr)return;dr[o]=!0;const n=o.endsWith(".css");for(let a=e.length-1;a>=0;a--){const t=e[a];if(t.href===o&&(!n||"stylesheet"===t.rel))return}const r=document.createElement("link");return r.rel=n?"stylesheet":"modulepreload",n||(r.as="script"),r.crossOrigin="",r.href=o,a&&r.setAttribute("nonce",a),document.head.appendChild(r),n?new Promise((e,t)=>{r.addEventListener("load",e),r.addEventListener("error",()=>t(new Error(`Unable to preload CSS for ${o}`)))}):void 0}),n=Promise.all(r.map(e=>Promise.resolve(e).then(e=>({status:"fulfilled",value:e}),e=>({status:"rejected",reason:e}))))}var r;function a(e){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=e,window.dispatchEvent(o),!o.defaultPrevented)throw e}return n.then(o=>{for(const e of o||[])"rejected"===e.status&&a(e.reason);return e().catch(a)})};var pr=[{path:"/",name:"home",component:()=>ur(()=>import("./Home-P8eseZcf.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]))},{path:"/cli/:platform",name:"cli-projects",component:()=>ur(()=>import("./ProjectList-DhSWJHTA.js"),__vite__mapDeps([19,1,2,3,4,5,6,7,20,8,11,21,14,13,22,23])),meta:{requiresCli:!0}},{path:"/cli/:platform/sessions/:projectName",name:"cli-sessions",component:()=>ur(()=>import("./SessionList-DQfyDGWU.js"),__vite__mapDeps([24,1,2,3,4,5,6,7,8,20,11,25,14,26,27,10,12,28,29,21,30,31,32,33,34,35,36,37,13,38,39,22,40])),props:!0,meta:{requiresCli:!0}},...["claude","codex","gemini","opencode","omp"].flatMap(e=>[{path:`/${e}`,name:`${e}-projects-legacy`,redirect:{name:"cli-projects",params:{platform:e}}},{path:`/${e}/sessions/:projectName`,name:`${e}-sessions-legacy`,redirect:o=>({name:"cli-sessions",params:{platform:e,projectName:o.params.projectName}})}]),{path:"/workspaces",name:"workspaces",component:()=>ur(()=>import("./WorkspaceManager-B2O8-qIw.js"),__vite__mapDeps([41,1,2,20,8,11,42,6,43,14,44,5,3,45,46]))},{path:"/config-templates",name:"config-templates",component:()=>ur(()=>import("./ConfigTemplates-CYY8XRED.js"),__vite__mapDeps([47,1,2,20,8,11,48,6,27,43,32,34,33,35,44,5,3,49,50]))},{path:"/skills",name:"skills",component:()=>ur(()=>import("./SkillManager-DHMprJLA.js"),__vite__mapDeps([51,1,2,20,8,11,30,4,5,3,6,7,25,14,31,10,12,32,33,34,35,28,36,37,52]))},{path:"/plugins",name:"plugins",component:()=>ur(()=>import("./PluginManager-Dh2o0xkZ.js"),__vite__mapDeps([53,1,2,20,8,11,54,5,3,4,6,7,25,14,10,12,32,36,55,56]))},{path:"/analytics",name:"analytics",component:()=>ur(()=>import("./Analytics-C4gMzv7g.js"),__vite__mapDeps([57,1,2,6,8,58]))},{path:"/:pathMatch(.*)*",redirect:"/"}],hr=st({history:et(),routes:pr});hr.beforeEach(async e=>{if(!0!==e.meta.requiresCli)return!0;const o=It(e);if(!o)return{name:"home"};try{const e=zt(),{uiConfig:t,loadUIConfig:n}=wt();await Promise.all([e.load(),n()]);const{enabledKeys:r}=cr({platformStore:e,configRef:t});return!!r.value.includes(o)||{name:"home"}}catch{return{name:"home"}}});var fr,vr,mr=[],gr=new WeakMap;function br(){mr.forEach(e=>e(...gr.get(e))),mr=[]}function yr(e,...o){gr.set(e,o),mr.includes(e)||1===mr.push(e)&&requestAnimationFrame(br)}function xr(e,o){let{target:t}=e;for(;t;){if(t.dataset&&void 0!==t.dataset[o])return!0;t=t.parentElement}return!1}var Cr,wr;function Sr(e){if(vr)return;let o=!1;Ro(()=>{vr||null==fr||fr.then(()=>{o||e()})}),ft(()=>{o=!0})}function kr(e={},o){const t=_o({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:n,keyup:r}=e,a=e=>{switch(e.key){case"Control":t.ctrl=!0;break;case"Meta":t.command=!0,t.win=!0;break;case"Shift":t.shift=!0;break;case"Tab":t.tab=!0}void 0!==n&&Object.keys(n).forEach(o=>{if(o!==e.key)return;const t=n[o];if("function"==typeof t)t(e);else{const{stop:o=!1,prevent:n=!1}=t;o&&e.stopPropagation(),n&&e.preventDefault(),t.handler(e)}})},l=e=>{switch(e.key){case"Control":t.ctrl=!1;break;case"Meta":t.command=!1,t.win=!1;break;case"Shift":t.shift=!1;break;case"Tab":t.tab=!1}void 0!==r&&Object.keys(r).forEach(o=>{if(o!==e.key)return;const t=r[o];if("function"==typeof t)t(e);else{const{stop:o=!1,prevent:n=!1}=t;o&&e.stopPropagation(),n&&e.preventDefault(),t.handler(e)}})},i=()=>{(void 0===o||o.value)&&(Fe("keydown",document,a),Fe("keyup",document,l)),void 0!==o&&$o(o,e=>{e?(Fe("keydown",document,a),Fe("keyup",document,l)):(Ge("keydown",document,a),Ge("keyup",document,l))})};return sn()?(Io(i),ft(()=>{(void 0===o||o.value)&&(Ge("keydown",document,a),Ge("keyup",document,l))})):i(),tt(t)}fr=Pn?null===(wr=null===(Cr=document)||void 0===Cr?void 0:Cr.fonts)||void 0===wr?void 0:wr.ready:void 0,vr=!1,void 0!==fr?fr.then(()=>{vr=!0}):vr=!0;var Pr=J("n-internal-select-menu"),Tr=J("n-internal-select-menu-body"),Ir="__disabled__";function zr(e){const t=ko(V,null),n=ko(He,null),r=ko(U,null),a=ko(Tr,null),l=it();if("undefined"!=typeof document){l.value=document.fullscreenElement;const e=()=>{l.value=document.fullscreenElement};Ro(()=>{Fe("fullscreenchange",document,e)}),ft(()=>{Ge("fullscreenchange",document,e)})}return o(()=>{var o;const{to:i}=e;return void 0!==i?!1===i?Ir:!0===i?l.value||"body":i:(null==t?void 0:t.value)?null!==(o=t.value.$el)&&void 0!==o?o:t.value:(null==n?void 0:n.value)?n.value:(null==r?void 0:r.value)?r.value:(null==a?void 0:a.value)?a.value:null!=i?i:l.value||"body"})}function Mr(e,o,t){var n;const r=ko(e,null);if(null===r)return;const a=null===(n=Yo())||void 0===n?void 0:n.proxy;function l(e,t){if(!r)return;const n=r[o];void 0!==t&&function(e,o){e[o]||(e[o]=[]);e[o].splice(e[o].findIndex(e=>e===a),1)}(n,t),void 0!==e&&function(e,o){e[o]||(e[o]=[]);~e[o].findIndex(e=>e===a)||e[o].push(a)}(n,e)}$o(t,l),l(t.value),ft(()=>{l(void 0,t.value)})}zr.tdkey=Ir,zr.propTo={type:[String,Object,Boolean],default:void 0};var Rr=null;function Ar(){if(null===Rr&&null===(Rr=document.getElementById("v-binder-view-measurer"))){(Rr=document.createElement("div")).id="v-binder-view-measurer";const{style:e}=Rr;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(Rr)}return Rr.getBoundingClientRect()}function Fr(e){const o=e.getBoundingClientRect(),t=Ar();return{left:o.left-t.left,top:o.top-t.top,bottom:t.height+t.top-o.bottom,right:t.width+t.left-o.right,width:o.width,height:o.height}}function $r(e){if(null===e)return null;const o=function(e){return 9===e.nodeType?null:e.parentNode}(e);if(null===o)return null;if(9===o.nodeType)return document;if(1===o.nodeType){const{overflow:e,overflowX:t,overflowY:n}=getComputedStyle(o);if(/(auto|scroll|overlay)/.test(e+n+t))return o}return $r(o)}var Or=po({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var o;go("VBinder",null===(o=Yo())||void 0===o?void 0:o.proxy);const t=ko("VBinder",null),n=it(null);let r=[];const a=()=>{for(const e of r)Ge("scroll",e,i,!0);r=[]},l=new Set,i=()=>{yr(s)},s=()=>{l.forEach(e=>e())},c=new Set,d=()=>{c.forEach(e=>e())};return ft(()=>{Ge("resize",window,d),a()}),{targetRef:n,setTargetRef:o=>{n.value=o,t&&e.syncTargetWithParent&&t.setTargetRef(o)},addScrollListener:e=>{0===l.size&&(()=>{let e=n.value;for(;e=$r(e),null!==e;)r.push(e);for(const o of r)Fe("scroll",o,i,!0)})(),l.has(e)||l.add(e)},removeScrollListener:e=>{l.has(e)&&l.delete(e),0===l.size&&a()},addResizeListener:e=>{0===c.size&&Fe("resize",window,d),c.has(e)||c.add(e)},removeResizeListener:e=>{c.has(e)&&c.delete(e),0===c.size&&Ge("resize",window,d)}}},render(){return N("binder",this.$slots)}}),Br=po({name:"Target",setup(){const{setTargetRef:e,syncTarget:o}=ko("VBinder");return{syncTarget:o,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:o}=this;return e?ct(a("follower",this.$slots),[[o]]):a("follower",this.$slots)}}),Er="@@mmoContext",_r={mounted(e,{value:o}){e[Er]={handler:void 0},"function"==typeof o&&(e[Er].handler=o,Fe("mousemoveoutside",e,o))},updated(e,{value:o}){const t=e[Er];"function"==typeof o?t.handler?t.handler!==o&&(Ge("mousemoveoutside",e,t.handler),t.handler=o,Fe("mousemoveoutside",e,o)):(e[Er].handler=o,Fe("mousemoveoutside",e,o)):t.handler&&(Ge("mousemoveoutside",e,t.handler),t.handler=void 0)},unmounted(e){const{handler:o}=e[Er];o&&Ge("mousemoveoutside",e,o),e[Er].handler=void 0}},{c:Dr}=no(),Lr="vueuc-style";function Hr(e){return e&-e}var jr=class{constructor(e,o){this.l=e,this.min=o;const t=new Array(e+1);for(let n=0;n<e+1;++n)t[n]=0;this.ft=t}add(e,o){if(0===o)return;const{l:t,ft:n}=this;for(e+=1;e<=t;)n[e]+=o,e+=Hr(e)}get(e){return this.sum(e+1)-this.sum(e)}sum(e){if(void 0===e&&(e=this.l),e<=0)return 0;const{ft:o,min:t,l:n}=this;if(e>n)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let r=e*t;for(;e>0;)r+=o[e],e-=Hr(e);return r}getBound(e){let o=0,t=this.l;for(;t>o;){const n=Math.floor((o+t)/2),r=this.sum(n);if(r>e)t=n;else{if(!(r<e))return n;if(o===n)return this.sum(o+1)<=e?o+1:n;o=n}}return o}},Ur={top:"bottom",bottom:"top",left:"right",right:"left"},Wr={start:"end",center:"center",end:"start"},Nr={top:"height",bottom:"height",left:"width",right:"width"},Kr={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},Vr={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},qr={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},Gr={top:!0,bottom:!1,left:!0,right:!1},Yr={top:"end",bottom:"start",left:"end",right:"start"};var Jr,Xr,Zr=Dr([Dr(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),Dr(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[Dr("> *",{pointerEvents:"all"})])]),Qr=po({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=ko("VBinder"),n=o(()=>void 0!==e.enabled?e.enabled:e.show),r=it(null),a=it(null),l=()=>{const{syncTrigger:o}=e;o.includes("scroll")&&t.addScrollListener(c),o.includes("resize")&&t.addResizeListener(c)},i=()=>{t.removeScrollListener(c),t.removeResizeListener(c)};Ro(()=>{n.value&&(c(),l())});const s=w();Zr.mount({id:"vueuc/binder",head:!0,anchorMetaName:Lr,ssr:s}),ft(()=>{i()}),Sr(()=>{n.value&&c()});const c=()=>{if(!n.value)return;const o=r.value;if(null===o)return;const l=t.targetRef,{x:i,y:s,overlap:c}=e,d=void 0!==i&&void 0!==s?function(e,o){const t=Ar();return{top:o,left:e,height:0,width:0,right:t.width-e,bottom:t.height-o}}(i,s):Fr(l);o.style.setProperty("--v-target-width",`${Math.round(d.width)}px`),o.style.setProperty("--v-target-height",`${Math.round(d.height)}px`);const{width:u,minWidth:p,placement:h,internalShift:f,flip:v}=e;o.setAttribute("v-placement",h),c?o.setAttribute("v-overlap",""):o.removeAttribute("v-overlap");const{style:m}=o;m.width="target"===u?`${d.width}px`:void 0!==u?u:"",m.minWidth="target"===p?`${d.width}px`:void 0!==p?p:"";const g=Fr(o),b=Fr(a.value),{left:y,top:x,placement:C}=function(e,o,t,n,r,a){if(!r||a)return{placement:e,top:0,left:0};const[l,i]=e.split("-");let s=null!=i?i:"center",c={top:0,left:0};const d=(e,r,a)=>{let l=0,i=0;const s=t[e]-o[r]-o[e];return s>0&&n&&(a?i=Gr[r]?s:-s:l=Gr[r]?s:-s),{left:l,top:i}},u="left"===l||"right"===l;if("center"!==s){const n=qr[e],r=Ur[n],a=Nr[n];if(t[a]>o[a]){if(o[n]+o[a]<t[a]){const e=(t[a]-o[a])/2;o[n]<e||o[r]<e?o[n]<o[r]?(s=Wr[i],c=d(a,r,u)):c=d(a,n,u):s="center"}}else t[a]<o[a]&&o[r]<0&&o[n]>o[r]&&(s=Wr[i])}else{const e="bottom"===l||"top"===l?"left":"top",n=Ur[e],r=Nr[e],a=(t[r]-o[r])/2;(o[e]<a||o[n]<a)&&(o[e]>o[n]?(s=Yr[e],c=d(r,e,u)):(s=Yr[n],c=d(r,n,u)))}let p=l;return o[l]<t[Nr[l]]&&o[l]<o[Ur[l]]&&(p=Ur[l]),{placement:"center"!==s?`${p}-${s}`:p,left:c.left,top:c.top}}(h,d,g,f,v,c),w=function(e,o){return o?Vr[e]:Kr[e]}(C,c),{left:S,top:k,transform:P}=function(e,o,t,n,r,a){if(a)switch(e){case"bottom-start":case"left-end":return{top:`${Math.round(t.top-o.top+t.height)}px`,left:`${Math.round(t.left-o.left)}px`,transform:"translateY(-100%)"};case"bottom-end":case"right-end":return{top:`${Math.round(t.top-o.top+t.height)}px`,left:`${Math.round(t.left-o.left+t.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top-start":case"left-start":return{top:`${Math.round(t.top-o.top)}px`,left:`${Math.round(t.left-o.left)}px`,transform:""};case"top-end":case"right-start":return{top:`${Math.round(t.top-o.top)}px`,left:`${Math.round(t.left-o.left+t.width)}px`,transform:"translateX(-100%)"};case"top":return{top:`${Math.round(t.top-o.top)}px`,left:`${Math.round(t.left-o.left+t.width/2)}px`,transform:"translateX(-50%)"};case"right":return{top:`${Math.round(t.top-o.top+t.height/2)}px`,left:`${Math.round(t.left-o.left+t.width)}px`,transform:"translateX(-100%) translateY(-50%)"};case"left":return{top:`${Math.round(t.top-o.top+t.height/2)}px`,left:`${Math.round(t.left-o.left)}px`,transform:"translateY(-50%)"};default:return{top:`${Math.round(t.top-o.top+t.height)}px`,left:`${Math.round(t.left-o.left+t.width/2)}px`,transform:"translateX(-50%) translateY(-100%)"}}switch(e){case"bottom-start":return{top:`${Math.round(t.top-o.top+t.height+n)}px`,left:`${Math.round(t.left-o.left+r)}px`,transform:""};case"bottom-end":return{top:`${Math.round(t.top-o.top+t.height+n)}px`,left:`${Math.round(t.left-o.left+t.width+r)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(t.top-o.top+n)}px`,left:`${Math.round(t.left-o.left+r)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(t.top-o.top+n)}px`,left:`${Math.round(t.left-o.left+t.width+r)}px`,transform:"translateX(-100%) translateY(-100%)"};case"right-start":return{top:`${Math.round(t.top-o.top+n)}px`,left:`${Math.round(t.left-o.left+t.width+r)}px`,transform:""};case"right-end":return{top:`${Math.round(t.top-o.top+t.height+n)}px`,left:`${Math.round(t.left-o.left+t.width+r)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(t.top-o.top+n)}px`,left:`${Math.round(t.left-o.left+r)}px`,transform:"translateX(-100%)"};case"left-end":return{top:`${Math.round(t.top-o.top+t.height+n)}px`,left:`${Math.round(t.left-o.left+r)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top":return{top:`${Math.round(t.top-o.top+n)}px`,left:`${Math.round(t.left-o.left+t.width/2+r)}px`,transform:"translateY(-100%) translateX(-50%)"};case"right":return{top:`${Math.round(t.top-o.top+t.height/2+n)}px`,left:`${Math.round(t.left-o.left+t.width+r)}px`,transform:"translateY(-50%)"};case"left":return{top:`${Math.round(t.top-o.top+t.height/2+n)}px`,left:`${Math.round(t.left-o.left+r)}px`,transform:"translateY(-50%) translateX(-100%)"};default:return{top:`${Math.round(t.top-o.top+t.height+n)}px`,left:`${Math.round(t.left-o.left+t.width/2+r)}px`,transform:"translateX(-50%)"}}}(C,b,d,x,y,c);o.setAttribute("v-placement",C),o.style.setProperty("--v-offset-left",`${Math.round(y)}px`),o.style.setProperty("--v-offset-top",`${Math.round(x)}px`),o.style.transform=`translateX(${S}) translateY(${k}) ${P}`,o.style.setProperty("--v-transform-origin",w),o.style.transformOrigin=w};$o(n,e=>{e?(l(),d()):i()});const d=()=>{yo().then(c).catch(e=>{})};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(o=>{$o(jo(e,o),c)}),["teleportDisabled"].forEach(o=>{$o(jo(e,o),d)}),$o(jo(e,"syncTrigger"),e=>{e.includes("resize")?t.addResizeListener(c):t.removeResizeListener(c),e.includes("scroll")?t.addScrollListener(c):t.removeScrollListener(c)});const u=Z();return{VBinder:t,mergedEnabled:n,offsetContainerRef:a,followerRef:r,mergedTo:o(()=>{const{to:o}=e;if(void 0!==o)return o;u.value}),syncPosition:c}},render(){return So(b,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,o;const t=So("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[So("div",{class:"v-binder-follower-content",ref:"followerRef"},null===(o=(e=this.$slots).default)||void 0===o?void 0:o.call(e))]);return this.zindexable?ct(t,[[O,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):t}})}});function ea(){return"undefined"==typeof document?1:(void 0===Xr&&(Xr="chrome"in window?window.devicePixelRatio:1),Xr)}var oa="VVirtualListXScroll";var ta,na=po({name:"VirtualListRow",props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){const{startIndexRef:e,endIndexRef:o,columnsRef:t,getLeft:n,renderColRef:r,renderItemWithColsRef:a}=ko(oa);return{startIndex:e,endIndex:o,columns:t,renderCol:r,renderItemWithCols:a,getLeft:n}},render(){const{startIndex:e,endIndex:o,columns:t,renderCol:n,renderItemWithCols:r,getLeft:a,item:l}=this;if(null!=r)return r({itemIndex:this.index,startColIndex:e,endColIndex:o,allColumns:t,item:l,getLeft:a});if(null!=n){const r=[];for(let i=e;i<=o;++i){const e=t[i];r.push(n({column:e,left:a(i),item:l}))}return r}return null}}),ra=Dr(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[Dr("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[Dr("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),aa=po({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const t=w();ra.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:Lr,ssr:t}),Ro(()=>{const{defaultScrollIndex:o,defaultScrollKey:t}=e;null!=o?g({index:o}):null!=t&&g({key:t})});let n=!1,r=!1;wo(()=>{n=!1,r?g({top:f.value,left:i.value}):r=!0}),ho(()=>{n=!0,r||(r=!0)});const a=o(()=>{if(null==e.renderCol&&null==e.renderItemWithCols)return;if(0===e.columns.length)return;let o=0;return e.columns.forEach(e=>{o+=e.width}),o}),l=Do(()=>{const o=new Map,{keyField:t}=e;return e.items.forEach((e,n)=>{o.set(e[t],n)}),o}),{scrollLeftRef:i,listWidthRef:s}=function({columnsRef:e,renderColRef:t,renderItemWithColsRef:n}){const r=it(0),a=it(0),l=Do(()=>{const o=e.value;if(0===o.length)return null;const t=new jr(o.length,0);return o.forEach((e,o)=>{t.add(o,e.width)}),t}),i=o(()=>{const e=l.value;return null!==e?Math.max(e.getBound(a.value)-1,0):0}),s=o(()=>{const o=l.value;return null!==o?Math.min(o.getBound(a.value+r.value)+1,e.value.length-1):0});return go(oa,{startIndexRef:i,endIndexRef:s,columnsRef:e,renderColRef:t,renderItemWithColsRef:n,getLeft:e=>{const o=l.value;return null!==o?o.sum(e):0}}),{listWidthRef:r,scrollLeftRef:a}}({columnsRef:jo(e,"columns"),renderColRef:jo(e,"renderCol"),renderItemWithColsRef:jo(e,"renderItemWithCols")}),c=it(null),d=it(void 0),u=new Map,p=Do(()=>{const{items:o,itemSize:t,keyField:n}=e,r=new jr(o.length,t);return o.forEach((e,o)=>{const t=e[n],a=u.get(t);void 0!==a&&r.add(o,a)}),r}),h=it(0),f=it(0),v=o(()=>Math.max(p.value.getBound(f.value-ze(e.paddingTop))-1,0)),m=Do(()=>{const{value:o}=d;if(void 0===o)return[];const{items:t,itemSize:n}=e,r=v.value,a=Math.min(r+Math.ceil(o/n+1),t.length-1),l=[];for(let e=r;e<=a;++e)l.push(t[e]);return l}),g=(e,o)=>{if("number"==typeof e)return void C(e,o,"auto");const{left:t,top:n,index:r,key:a,position:i,behavior:s,debounce:c=!0}=e;if(void 0!==t||void 0!==n)C(t,n,s);else if(void 0!==r)x(r,s,c);else if(void 0!==a){const e=l.value.get(a);void 0!==e&&x(e,s,c)}else"bottom"===i?C(0,Number.MAX_SAFE_INTEGER,s):"top"===i&&C(0,0,s)};let b,y=null;function x(o,t,n){const{value:r}=p,a=r.sum(o)+ze(e.paddingTop);if(n){b=o,null!==y&&window.clearTimeout(y),y=window.setTimeout(()=>{b=void 0,y=null},16);const{scrollTop:e,offsetHeight:n}=c.value;if(a>e){const l=r.get(o);a+l<=e+n||c.value.scrollTo({left:0,top:a+l-n,behavior:t})}else c.value.scrollTo({left:0,top:a,behavior:t})}else c.value.scrollTo({left:0,top:a,behavior:t})}function C(e,o,t){c.value.scrollTo({left:e,top:o,behavior:t})}const S=!("undefined"!=typeof document&&(void 0===Jr&&(Jr="matchMedia"in window&&window.matchMedia("(pointer:coarse)").matches),Jr));let k=!1;function P(){const{value:e}=c;null!=e&&(f.value=e.scrollTop,i.value=e.scrollLeft)}function T(e){let o=e;for(;null!==o;){if("none"===o.style.display)return!0;o=o.parentElement}return!1}return{listHeight:d,listStyle:{overflow:"auto"},keyToIndex:l,itemsStyle:Do(()=>{const{itemResizable:o}=e,t=ve(p.value.sum());return h.value,[e.itemsStyle,{boxSizing:"content-box",width:ve(a.value),height:o?"":t,minHeight:o?t:"",paddingTop:ve(e.paddingTop),paddingBottom:ve(e.paddingBottom)}]}),visibleItemsStyle:Do(()=>(h.value,{transform:`translateY(${ve(p.value.sum(v.value))})`})),viewportItems:m,listElRef:c,itemsElRef:it(null),scrollTo:g,handleListResize:function(o){if(n)return;if(T(o.target))return;if(null==e.renderCol&&null==e.renderItemWithCols){if(o.contentRect.height===d.value)return}else if(o.contentRect.height===d.value&&o.contentRect.width===s.value)return;d.value=o.contentRect.height,s.value=o.contentRect.width;const{onResize:t}=e;void 0!==t&&t(o)},handleListScroll:function(o){var t;null===(t=e.onScroll)||void 0===t||t.call(e,o),S&&k||P()},handleListWheel:function(o){var t;if(null===(t=e.onWheel)||void 0===t||t.call(e,o),S){const e=c.value;if(null!=e){if(0===o.deltaX){if(0===e.scrollTop&&o.deltaY<=0)return;if(e.scrollTop+e.offsetHeight>=e.scrollHeight&&o.deltaY>=0)return}o.preventDefault(),e.scrollTop+=o.deltaY/ea(),e.scrollLeft+=o.deltaX/ea(),P(),k=!0,yr(()=>{k=!1})}}},handleItemResize:function(o,t){var r,a,i;if(n)return;if(e.ignoreItemResize)return;if(T(t.target))return;const{value:s}=p,d=l.value.get(o),f=s.get(d),v=null!==(i=null===(a=null===(r=t.borderBoxSize)||void 0===r?void 0:r[0])||void 0===a?void 0:a.blockSize)&&void 0!==i?i:t.contentRect.height;if(v===f)return;v-e.itemSize===0?u.delete(o):u.set(o,v-e.itemSize);const m=v-f;if(0===m)return;s.add(d,m);const g=c.value;if(null!=g){if(void 0===b){const e=s.sum(d);g.scrollTop>e&&g.scrollBy(0,m)}else(d<b||d===b&&v+s.sum(d)>g.scrollTop+g.offsetHeight)&&g.scrollBy(0,m);P()}h.value++}}},render(){const{itemResizable:e,keyField:o,keyToIndex:t,visibleItemsTag:n}=this;return So(R,{onResize:this.handleListResize},{default:()=>{var r,a;return So("div",mo(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[0!==this.items.length?So("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[So(n,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{const{renderCol:n,renderItemWithCols:r}=this;return this.viewportItems.map(a=>{const l=a[o],i=t.get(l),s=null!=n?So(na,{index:i,item:a}):void 0,c=null!=r?So(na,{index:i,item:a}):void 0,d=this.$slots.default({item:a,renderedCols:s,renderedItemWithCols:c,index:i})[0];return e?So(R,{key:l,onResize:e=>this.handleItemResize(l,e)},{default:()=>d}):(d.key=l,d)})}})]):null===(a=(r=this.$slots).empty)||void 0===a?void 0:a.call(r)])}})}}),la="v-hidden",ia=Dr("[v-hidden]",{display:"none!important"}),sa=po({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:o}){const t=it(null),n=it(null);function r(r){const{value:a}=t,{getCounter:l,getTail:i}=e;let s;if(s=void 0!==l?l():n.value,!a||!s)return;s.hasAttribute(la)&&s.removeAttribute(la);const{children:c}=a;if(r.showAllItemsBeforeCalculate)for(const e of c)e.hasAttribute(la)&&e.removeAttribute(la);const d=a.offsetWidth,u=[],p=o.tail?null==i?void 0:i():null;let h=p?p.offsetWidth:0,f=!1;const v=a.children.length-(o.tail?1:0);for(let o=0;o<v-1;++o){if(o<0)continue;const t=c[o];if(f){t.hasAttribute(la)||t.setAttribute(la,"");continue}t.hasAttribute(la)&&t.removeAttribute(la);const n=t.offsetWidth;if(h+=n,u[o]=n,h>d){const{updateCounter:t}=e;for(let n=o;n>=0;--n){const r=v-1-n;void 0!==t?t(r):s.textContent=`${r}`;const a=s.offsetWidth;if(h-=u[n],h+a<=d||0===n){f=!0,o=n-1,p&&(-1===o?(p.style.maxWidth=d-a+"px",p.style.boxSizing="border-box"):p.style.maxWidth="");const{onUpdateCount:t}=e;t&&t(r);break}}}}const{onUpdateOverflow:m}=e;f?void 0!==m&&m(!0):(void 0!==m&&m(!1),s.setAttribute(la,""))}const a=w();return ia.mount({id:"vueuc/overflow",head:!0,anchorMetaName:Lr,ssr:a}),Ro(()=>r({showAllItemsBeforeCalculate:!1})),{selfRef:t,counterRef:n,sync:r}},render(){const{$slots:e}=this;return yo(()=>this.sync({showAllItemsBeforeCalculate:!1})),So("div",{class:"v-overflow",ref:"selfRef"},[rt(e,"default"),e.counter?e.counter():So("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function ca(e,o){o&&(Ro(()=>{const{value:t}=e;t&&h.registerHandler(t,o)}),$o(e,(e,o)=>{o&&h.unregisterHandler(o)},{deep:!1}),ft(()=>{const{value:o}=e;o&&h.unregisterHandler(o)}))}function da(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function ua(e){return o=>{e.value=o?o.$el:null}}function pa(e,o="default",t=[]){const n=e.$slots[o];return void 0===n?t:n()}function ha(e){const o=e.filter(e=>void 0!==e);if(0!==o.length)return 1===o.length?o[0]:o=>{e.forEach(e=>{e&&e(o)})}}function fa(e,o=[],t){const n={};return Object.getOwnPropertyNames(e).forEach(t=>{o.includes(t)||(n[t]=e[t])}),Object.assign(n,t)}var va=Ye(pe,"WeakMap"),ma=f(Object.keys,Object),ga=Object.prototype.hasOwnProperty;function ba(e){return X(e)?x(e):function(e){if(!q(e))return ma(e);var o=[];for(var t in Object(e))ga.call(e,t)&&"constructor"!=t&&o.push(t);return o}(e)}var ya=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xa=/^\w*$/;function Ca(e,o){if(re(e))return!1;var t=typeof e;return!("number"!=t&&"symbol"!=t&&"boolean"!=t&&null!=e&&!Ve(e))||(xa.test(e)||!ya.test(e)||null!=o&&e in Object(o))}function wa(e,o){if("function"!=typeof e||null!=o&&"function"!=typeof o)throw new TypeError("Expected a function");var t=function(){var n=arguments,r=o?o.apply(this,n):n[0],a=t.cache;if(a.has(r))return a.get(r);var l=e.apply(this,n);return t.cache=a.set(r,l)||a,l};return t.cache=new(wa.Cache||j),t}wa.Cache=j;var Sa,ka,Pa,Ta=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ia=/\\(\\)?/g,za=(Sa=function(e){var o=[];return 46===e.charCodeAt(0)&&o.push(""),e.replace(Ta,function(e,t,n,r){o.push(n?r.replace(Ia,"$1"):t||e)}),o},ka=wa(Sa,function(e){return 500===Pa.size&&Pa.clear(),e}),Pa=ka.cache,ka);function Ma(e,o){return re(e)?e:Ca(e,o)?[e]:za(v(e))}function Ra(e){if("string"==typeof e||Ve(e))return e;var o=e+"";return"0"==o&&1/e==-1/0?"-0":o}function Aa(e,o){for(var t=0,n=(o=Ma(o,e)).length;null!=e&&t<n;)e=e[Ra(o[t++])];return t&&t==n?e:void 0}function Fa(e,o,t){var n=null==e?void 0:Aa(e,o);return void 0===n?t:n}var $a=Object.prototype.propertyIsEnumerable,Oa=Object.getOwnPropertySymbols,Ba=Oa?function(e){return null==e?[]:(e=Object(e),function(e,o){for(var t=-1,n=null==e?0:e.length,r=0,a=[];++t<n;){var l=e[t];o(l,t,e)&&(a[r++]=l)}return a}(Oa(e),function(o){return $a.call(e,o)}))}:function(){return[]};function Ea(e){return function(e,o,t){var n=o(e);return re(e)?n:function(e,o){for(var t=-1,n=o.length,r=e.length;++t<n;)e[r+t]=o[t];return e}(n,t(e))}(e,ba,Ba)}var _a=Ye(pe,"DataView"),Da=Ye(pe,"Promise"),La=Ye(pe,"Set"),Ha="[object Map]",ja="[object Promise]",Ua="[object Set]",Wa="[object WeakMap]",Na="[object DataView]",Ka=$e(_a),Va=$e(K),qa=$e(Da),Ga=$e(La),Ya=$e(va),Ja=Me;(_a&&Ja(new _a(new ArrayBuffer(1)))!=Na||K&&Ja(new K)!=Ha||Da&&Ja(Da.resolve())!=ja||La&&Ja(new La)!=Ua||va&&Ja(new va)!=Wa)&&(Ja=function(e){var o=Me(e),t="[object Object]"==o?e.constructor:void 0,n=t?$e(t):"";if(n)switch(n){case Ka:return Na;case Va:return Ha;case qa:return ja;case Ga:return Ua;case Ya:return Wa}return o});var Xa=Ja;function Za(e){var o=-1,t=null==e?0:e.length;for(this.__data__=new j;++o<t;)this.add(e[o])}function Qa(e,o){for(var t=-1,n=null==e?0:e.length;++t<n;)if(o(e[t],t,e))return!0;return!1}function el(e,o){return e.has(o)}Za.prototype.add=Za.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Za.prototype.has=function(e){return this.__data__.has(e)};function ol(e,o,t,n,r,a){var l=1&t,i=e.length,s=o.length;if(i!=s&&!(l&&s>i))return!1;var c=a.get(e),d=a.get(o);if(c&&d)return c==o&&d==e;var u=-1,p=!0,h=2&t?new Za:void 0;for(a.set(e,o),a.set(o,e);++u<i;){var f=e[u],v=o[u];if(n)var m=l?n(v,f,u,o,e,a):n(f,v,u,e,o,a);if(void 0!==m){if(m)continue;p=!1;break}if(h){if(!Qa(o,function(e,o){if(!el(h,o)&&(f===e||r(f,e,t,n,a)))return h.push(o)})){p=!1;break}}else if(f!==v&&!r(f,v,t,n,a)){p=!1;break}}return a.delete(e),a.delete(o),p}function tl(e){var o=-1,t=Array(e.size);return e.forEach(function(e,n){t[++o]=[n,e]}),t}function nl(e){var o=-1,t=Array(e.size);return e.forEach(function(e){t[++o]=e}),t}var rl=Ze?Ze.prototype:void 0,al=rl?rl.valueOf:void 0;var ll=Object.prototype.hasOwnProperty;var il="[object Arguments]",sl="[object Array]",cl="[object Object]",dl=Object.prototype.hasOwnProperty;function ul(o,t,n,a,l,i){var s=re(o),c=re(t),d=s?sl:Xa(o),u=c?sl:Xa(t),p=(d=d==il?cl:d)==cl,h=(u=u==il?cl:u)==cl,f=d==u;if(f&&y(o)){if(!y(t))return!1;s=!0,p=!1}if(f&&!p)return i||(i=new W),s||Le(o)?ol(o,t,n,a,l,i):function(o,t,n,a,l,i,s){switch(n){case"[object DataView]":if(o.byteLength!=t.byteLength||o.byteOffset!=t.byteOffset)return!1;o=o.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(o.byteLength!=t.byteLength||!i(new r(o),new r(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return e(+o,+t);case"[object Error]":return o.name==t.name&&o.message==t.message;case"[object RegExp]":case"[object String]":return o==t+"";case"[object Map]":var c=tl;case"[object Set]":var d=1&a;if(c||(c=nl),o.size!=t.size&&!d)return!1;var u=s.get(o);if(u)return u==t;a|=2,s.set(o,t);var p=ol(c(o),c(t),a,l,i,s);return s.delete(o),p;case"[object Symbol]":if(al)return al.call(o)==al.call(t)}return!1}(o,t,d,n,a,l,i);if(!(1&n)){var v=p&&dl.call(o,"__wrapped__"),m=h&&dl.call(t,"__wrapped__");if(v||m){var g=v?o.value():o,b=m?t.value():t;return i||(i=new W),l(g,b,n,a,i)}}return!!f&&(i||(i=new W),function(e,o,t,n,r,a){var l=1&t,i=Ea(e),s=i.length;if(s!=Ea(o).length&&!l)return!1;for(var c=s;c--;){var d=i[c];if(!(l?d in o:ll.call(o,d)))return!1}var u=a.get(e),p=a.get(o);if(u&&p)return u==o&&p==e;var h=!0;a.set(e,o),a.set(o,e);for(var f=l;++c<s;){var v=e[d=i[c]],m=o[d];if(n)var g=l?n(m,v,d,o,e,a):n(v,m,d,e,o,a);if(!(void 0===g?v===m||r(v,m,t,n,a):g)){h=!1;break}f||(f="constructor"==d)}if(h&&!f){var b=e.constructor,y=o.constructor;b==y||!("constructor"in e)||!("constructor"in o)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(h=!1)}return a.delete(e),a.delete(o),h}(o,t,n,a,l,i))}function pl(e,o,t,n,r){return e===o||(null==e||null==o||!de(e)&&!de(o)?e!=e&&o!=o:ul(e,o,t,n,pl,r))}function hl(e){return e==e&&!Se(e)}function fl(e,o){return function(t){return null!=t&&(t[e]===o&&(void 0!==o||e in Object(t)))}}function vl(e){var o=function(e){for(var o=ba(e),t=o.length;t--;){var n=o[t],r=e[n];o[t]=[n,r,hl(r)]}return o}(e);return 1==o.length&&o[0][2]?fl(o[0][0],o[0][1]):function(t){return t===e||function(e,o,t,n){var r=t.length,a=r,l=!n;if(null==e)return!a;for(e=Object(e);r--;){var i=t[r];if(l&&i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++r<a;){var s=(i=t[r])[0],c=e[s],d=i[1];if(l&&i[2]){if(void 0===c&&!(s in e))return!1}else{var u=new W;if(n)var p=n(c,d,s,e,o,u);if(!(void 0===p?pl(d,c,3,n,u):p))return!1}}return!0}(t,e,o)}}function ml(e,o){return null!=e&&o in Object(e)}function gl(e,o){return null!=e&&function(e,o,t){for(var n=-1,r=(o=Ma(o,e)).length,a=!1;++n<r;){var l=Ra(o[n]);if(!(a=null!=e&&t(e,l)))break;e=e[l]}return a||++n!=r?a:!!(r=null==e?0:e.length)&&A(r)&&he(l,r)&&(re(e)||Y(e))}(e,o,ml)}function bl(e){return Ca(e)?(o=Ra(e),function(e){return null==e?void 0:e[o]}):function(e){return function(o){return Aa(o,e)}}(e);var o}function yl(e){return"function"==typeof e?e:null==e?We:"object"==typeof e?re(e)?(o=e[0],t=e[1],Ca(o)&&hl(t)?fl(Ra(o),t):function(e){var n=Fa(e,o);return void 0===n&&n===t?gl(e,o):pl(t,n,3)}):vl(e):bl(e);var o,t}var xl,Cl,wl=(xl=function(e,o){return e&&co(e,o,ba)},function(e,o){if(null==e)return e;if(!X(e))return xl(e,o);for(var t=e.length,n=Cl?t:-1,r=Object(e);(Cl?n--:++n<t)&&!1!==o(r[n],n,r););return e});function Sl(e,o){var t=-1,n=X(e)?Array(e.length):[];return wl(e,function(e,r,a){n[++t]=o(e,r,a)}),n}var kl=po({name:"Add",render:()=>So("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},So("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}),Pl=po({name:"Checkmark",render:()=>So("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},So("g",{fill:"none"},So("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}),Tl=po({name:"ChevronDown",render:()=>So("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},So("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}),Il=po({name:"ChevronRight",render:()=>So("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},So("path",{d:"M5.64645 3.14645C5.45118 3.34171 5.45118 3.65829 5.64645 3.85355L9.79289 8L5.64645 12.1464C5.45118 12.3417 5.45118 12.6583 5.64645 12.8536C5.84171 13.0488 6.15829 13.0488 6.35355 12.8536L10.8536 8.35355C11.0488 8.15829 11.0488 7.84171 10.8536 7.64645L6.35355 3.14645C6.15829 2.95118 5.84171 2.95118 5.64645 3.14645Z",fill:"currentColor"}))}),zl=Te("clear",()=>So("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},So("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},So("g",{fill:"currentColor","fill-rule":"nonzero"},So("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"}))))),Ml=po({name:"Empty",render:()=>So("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},So("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),So("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}),Rl=po({name:"Eye",render:()=>So("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},So("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),So("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}),Al=po({name:"EyeOff",render:()=>So("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},So("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),So("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),So("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),So("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),So("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}),Fl=po({name:"Remove",render:()=>So("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},So("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:"\n fill: none;\n stroke: currentColor;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 32px;\n "}))}),$l=ge("base-clear","\n flex-shrink: 0;\n height: 1em;\n width: 1em;\n position: relative;\n",[xe(">",[eo("clear","\n font-size: var(--n-clear-size);\n height: 1em;\n width: 1em;\n cursor: pointer;\n color: var(--n-clear-color);\n transition: color .3s var(--n-bezier);\n display: flex;\n ",[xe("&:hover","\n color: var(--n-clear-color-hover)!important;\n "),xe("&:active","\n color: var(--n-clear-color-pressed)!important;\n ")]),eo("placeholder","\n display: flex;\n "),eo("clear, placeholder","\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n ",[I({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),Ol=po({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup:e=>(M("-base-clear",$l,jo(e,"clsPrefix")),{handleMouseDown(e){e.preventDefault()}}),render(){const{clsPrefix:e}=this;return So("div",{class:`${e}-base-clear`},So(t,null,{default:()=>{var o,t;return this.show?So("div",{key:"dismiss",class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},lo(this.$slots.icon,()=>[So(ke,{clsPrefix:e},{default:()=>So(zl,null)})])):So("div",{key:"icon",class:`${e}-base-clear__placeholder`},null===(t=(o=this.$slots).placeholder)||void 0===t?void 0:t.call(o))}}))}}),Bl=po({props:{onFocus:Function,onBlur:Function},setup:e=>()=>So("div",{style:"width: 0; height: 0",tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}),El="#000",_l="#fff",Dl="#fff",Ll="rgb(72, 72, 78)",Hl="rgb(24, 24, 28)",jl="rgb(44, 44, 50)",Ul="rgb(16, 16, 20)",Wl="0.9",Nl="0.82",Kl="0.52",Vl="0.38",ql="0.28",Gl="0.52",Yl="0.38",Jl="0.06",Xl="0.09",Zl="0.06",Ql="0.05",ei="0.05",oi="0.18",ti="0.2",ni="0.12",ri="0.24",ai="0.09",li="0.1",ii="0.06",si="0.04",ci="0.2",di="0.3",ui="0.12",pi="0.2",hi="#7fe7c4",fi="#63e2b7",vi="#5acea7",mi="rgb(42, 148, 125)",gi="#8acbec",bi="#70c0e8",yi="#66afd3",xi="rgb(56, 137, 197)",Ci="#e98b8b",wi="#e88080",Si="#e57272",ki="rgb(208, 58, 82)",Pi="#f5d599",Ti="#f2c97d",Ii="#e6c260",zi="rgb(240, 138, 0)",Mi="#7fe7c4",Ri="#63e2b7",Ai="#5acea7",Fi="rgb(42, 148, 125)",$i=Ke(El),Oi=Ke(_l),Bi=`rgba(${Oi.slice(0,3).join(", ")}, `;function Ei(e){return`${Bi+String(e)})`}var _i=Object.assign(Object.assign({name:"common"},p),{baseColor:El,primaryColor:fi,primaryColorHover:hi,primaryColorPressed:vi,primaryColorSuppl:mi,infoColor:bi,infoColorHover:gi,infoColorPressed:yi,infoColorSuppl:xi,successColor:Ri,successColorHover:Mi,successColorPressed:Ai,successColorSuppl:Fi,warningColor:Ti,warningColorHover:Pi,warningColorPressed:Ii,warningColorSuppl:zi,errorColor:wi,errorColorHover:Ci,errorColorPressed:Si,errorColorSuppl:ki,textColorBase:Dl,textColor1:Ei(Wl),textColor2:Ei(Nl),textColor3:Ei(Kl),textColorDisabled:Ei(Vl),placeholderColor:Ei(Vl),placeholderColorDisabled:Ei(ql),iconColor:Ei(Vl),iconColorDisabled:Ei(ql),iconColorHover:Ei(1.25*Number(Vl)),iconColorPressed:Ei(.8*Number(Vl)),opacity1:Wl,opacity2:Nl,opacity3:Kl,opacity4:Vl,opacity5:ql,dividerColor:Ei(ai),borderColor:Ei(ri),closeIconColorHover:Ei(Number(Gl)),closeIconColor:Ei(Number(Gl)),closeIconColorPressed:Ei(Number(Gl)),closeColorHover:"rgba(255, 255, 255, .12)",closeColorPressed:"rgba(255, 255, 255, .08)",clearColor:Ei(Vl),clearColorHover:ce(Ei(Vl),{alpha:1.25}),clearColorPressed:ce(Ei(Vl),{alpha:.8}),scrollbarColor:Ei(ci),scrollbarColorHover:Ei(di),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:Ei(ni),railColor:Ei(ti),popoverColor:Ll,tableColor:Hl,cardColor:Hl,modalColor:jl,bodyColor:Ul,tagColor:function(e){const o=Array.from(Oi);return o[3]=Number(e),Be($i,o)}(pi),avatarColor:Ei(oi),invertedColor:El,inputColor:Ei(li),codeColor:Ei(ui),tabColor:Ei(si),actionColor:Ei(ii),tableHeaderColor:Ei(ii),hoverColor:Ei(Xl),tableColorHover:Ei(Zl),tableColorStriped:Ei(Ql),pressedColor:Ei(ei),opacityDisabled:Yl,inputColorDisabled:Ei(Jl),buttonColor2:"rgba(255, 255, 255, .08)",buttonColor2Hover:"rgba(255, 255, 255, .12)",buttonColor2Pressed:"rgba(255, 255, 255, .08)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .24), 0 3px 6px 0 rgba(0, 0, 0, .18), 0 5px 12px 4px rgba(0, 0, 0, .12)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .24), 0 6px 12px 0 rgba(0, 0, 0, .16), 0 9px 18px 8px rgba(0, 0, 0, .10)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),Di={name:"Scrollbar",common:_i,self:B};function Li(e){return Array.isArray(e)?e:[e]}var Hi="STOP";function ji(e,o){const t=o(e);void 0!==e.children&&t!==Hi&&e.children.forEach(e=>ji(e,o))}function Ui(e){return e.children}function Wi(e){return e.key}function Ni(){return!1}function Ki(e){return!0===e.disabled}function Vi(e){var o;return null==e?[]:Array.isArray(e)?e:null!==(o=e.checkedKeys)&&void 0!==o?o:[]}function qi(e){var o;return null==e||Array.isArray(e)?[]:null!==(o=e.indeterminateKeys)&&void 0!==o?o:[]}function Gi(e,o){const t=new Set(e);return o.forEach(e=>{t.has(e)||t.add(e)}),Array.from(t)}function Yi(e,o){const t=new Set(e);return o.forEach(e=>{t.has(e)&&t.delete(e)}),Array.from(t)}function Ji(e){return"group"===(null==e?void 0:e.type)}var Xi=class extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}};function Zi(e,o,t,n){const r=es(o,t,n,!1),a=es(e,t,n,!0),l=function(e,o){const t=new Set;return e.forEach(e=>{const n=o.treeNodeMap.get(e);if(void 0!==n){let e=n.parent;for(;null!==e&&!e.disabled&&!t.has(e.key);)t.add(e.key),e=e.parent}}),t}(e,t),i=[];return r.forEach(e=>{(a.has(e)||l.has(e))&&i.push(e)}),i.forEach(e=>r.delete(e)),r}function Qi(e,o){const{checkedKeys:t,keysToCheck:n,keysToUncheck:r,indeterminateKeys:a,cascade:l,leafOnly:i,checkStrategy:s,allowNotLoaded:c}=e;if(!l)return void 0!==n?{checkedKeys:Gi(t,n),indeterminateKeys:Array.from(a)}:void 0!==r?{checkedKeys:Yi(t,r),indeterminateKeys:Array.from(a)}:{checkedKeys:Array.from(t),indeterminateKeys:Array.from(a)};const{levelTreeNodeMap:d}=o;let u;u=void 0!==r?Zi(r,t,o,c):void 0!==n?function(e,o,t,n){return es(o.concat(e),t,n,!1)}(n,t,o,c):es(t,o,c,!1);const p="parent"===s,h="child"===s||i,f=u,v=new Set;for(let m=Math.max.apply(null,Array.from(d.keys()));m>=0;m-=1){const e=0===m,o=d.get(m);for(const t of o){if(t.isLeaf)continue;const{key:o,shallowLoaded:n}=t;if(h&&n&&t.children.forEach(e=>{!e.disabled&&!e.isLeaf&&e.shallowLoaded&&f.has(e.key)&&f.delete(e.key)}),t.disabled||!n)continue;let r=!0,a=!1,l=!0;for(const e of t.children){const o=e.key;if(!e.disabled)if(l&&(l=!1),f.has(o))a=!0;else{if(v.has(o)){a=!0,r=!1;break}if(r=!1,a)break}}r&&!l?(p&&t.children.forEach(e=>{!e.disabled&&f.has(e.key)&&f.delete(e.key)}),f.add(o)):a&&v.add(o),e&&h&&f.has(o)&&f.delete(o)}}return{checkedKeys:Array.from(f),indeterminateKeys:Array.from(v)}}function es(e,o,t,n){const{treeNodeMap:r,getChildren:a}=o,l=new Set,i=new Set(e);return e.forEach(e=>{const o=r.get(e);void 0!==o&&ji(o,e=>{if(e.disabled)return Hi;const{key:o}=e;if(!l.has(o)&&(l.add(o),i.add(o),function(e,o){return!1===e.isLeaf&&!Array.isArray(o(e))}(e.rawNode,a))){if(n)return Hi;if(!t)throw new Xi}})}),i}function os(e,o){const t=e.siblings,n=t.length,{index:r}=e;return o?t[(r+1)%n]:r===t.length-1?null:t[r+1]}function ts(e,o,{loop:t=!1,includeDisabled:n=!1}={}){const r="prev"===o?ns:os,a={reverse:"prev"===o};let l=!1,i=null;return function o(s){if(null!==s){if(s===e)if(l){if(!e.disabled&&!e.isGroup)return void(i=e)}else l=!0;else if((!s.disabled||n)&&!s.ignored&&!s.isGroup)return void(i=s);if(s.isGroup){const e=rs(s,a);null!==e?i=e:o(r(s,t))}else{const e=r(s,!1);if(null!==e)o(e);else{const e=function(e){return e.parent}(s);(null==e?void 0:e.isGroup)?o(r(e,t)):t&&o(r(s,!0))}}}}(e),i}function ns(e,o){const t=e.siblings,n=t.length,{index:r}=e;return o?t[(r-1+n)%n]:0===r?null:t[r-1]}function rs(e,o={}){const{reverse:t=!1}=o,{children:n}=e;if(n){const{length:e}=n,r=t?-1:e,a=t?-1:1;for(let l=t?e-1:0;l!==r;l+=a){const e=n[l];if(!e.disabled&&!e.ignored){if(!e.isGroup)return e;{const t=rs(e,o);if(null!==t)return t}}}}return null}var as={getChild(){return this.ignored?null:rs(this)},getParent(){const{parent:e}=this;return(null==e?void 0:e.isGroup)?e.getParent():e},getNext(e={}){return ts(this,"next",e)},getPrev(e={}){return ts(this,"prev",e)}};function ls(e,o,t,n,r,a=null,l=0){const i=[];return e.forEach((s,c)=>{var d;const u=Object.create(n);if(u.rawNode=s,u.siblings=i,u.level=l,u.index=c,u.isFirstChild=0===c,u.isLastChild=c+1===e.length,u.parent=a,!u.ignored){const e=r(s);Array.isArray(e)&&(u.children=ls(e,o,t,n,r,u,l+1))}i.push(u),o.set(u.key,u),t.has(l)||t.set(l,[]),null===(d=t.get(l))||void 0===d||d.push(u)}),i}function is(e,o={}){var t;const n=new Map,r=new Map,{getDisabled:a=Ki,getIgnored:l=Ni,getIsGroup:i=Ji,getKey:s=Wi}=o,c=null!==(t=o.getChildren)&&void 0!==t?t:Ui,d=o.ignoreEmptyChildren?e=>{const o=c(e);return Array.isArray(o)?o.length?o:null:o}:c,u=ls(e,n,r,Object.assign({get key(){return s(this.rawNode)},get disabled(){return a(this.rawNode)},get isGroup(){return i(this.rawNode)},get isLeaf(){return function(e,o){const{isLeaf:t}=e;return void 0!==t?t:!o(e)}(this.rawNode,d)},get shallowLoaded(){return function(e,o){const{isLeaf:t}=e;return!(!1===t&&!Array.isArray(o(e)))}(this.rawNode,d)},get ignored(){return l(this.rawNode)},contains(e){return function(e,o){const t=e.key;for(;o;){if(o.key===t)return!0;o=o.parent}return!1}(this,e)}},as),d);function p(e){if(null==e)return null;const o=n.get(e);return o&&!o.ignored?o:null}const h={treeNodes:u,treeNodeMap:n,levelTreeNodeMap:r,maxLevel:Math.max(...r.keys()),getChildren:d,getFlattenedNodes:e=>function(e,o){const t=o?new Set(o):void 0,n=[];return function e(o){o.forEach(o=>{n.push(o),o.isLeaf||!o.children||o.ignored||(o.isGroup||void 0===t||t.has(o.key))&&e(o.children)})}(e),n}(u,e),getNode:function(e){if(null==e)return null;const o=n.get(e);return!o||o.isGroup||o.ignored?null:o},getPrev:function(e,o){const t=p(e);return t?t.getPrev(o):null},getNext:function(e,o){const t=p(e);return t?t.getNext(o):null},getParent:function(e){const o=p(e);return o?o.getParent():null},getChild:function(e){const o=p(e);return o?o.getChild():null},getFirstAvailableNode:()=>function(e){if(0===e.length)return null;const o=e[0];return o.isGroup||o.ignored||o.disabled?o.getNext():o}(u),getPath:(e,o={})=>function(e,{includeGroup:o=!1,includeSelf:t=!0},n){var r;const a=n.treeNodeMap;let l=null==e?null:null!==(r=a.get(e))&&void 0!==r?r:null;const i={keyPath:[],treeNodePath:[],treeNode:l};if(null==l?void 0:l.ignored)return i.treeNode=null,i;for(;l;)l.ignored||!o&&l.isGroup||i.treeNodePath.push(l),l=l.parent;return i.treeNodePath.reverse(),t||i.treeNodePath.pop(),i.keyPath=i.treeNodePath.map(e=>e.key),i}(e,o,h),getCheckedKeys(e,o={}){const{cascade:t=!0,leafOnly:n=!1,checkStrategy:r="all",allowNotLoaded:a=!1}=o;return Qi({checkedKeys:Vi(e),indeterminateKeys:qi(e),cascade:t,leafOnly:n,checkStrategy:r,allowNotLoaded:a},h)},check(e,o,t={}){const{cascade:n=!0,leafOnly:r=!1,checkStrategy:a="all",allowNotLoaded:l=!1}=t;return Qi({checkedKeys:Vi(o),indeterminateKeys:qi(o),keysToCheck:null==e?[]:Li(e),cascade:n,leafOnly:r,checkStrategy:a,allowNotLoaded:l},h)},uncheck(e,o,t={}){const{cascade:n=!0,leafOnly:r=!1,checkStrategy:a="all",allowNotLoaded:l=!1}=t;return Qi({checkedKeys:Vi(o),indeterminateKeys:qi(o),keysToUncheck:null==e?[]:Li(e),cascade:n,leafOnly:r,checkStrategy:a,allowNotLoaded:l},h)},getNonLeafKeys:(e={})=>function(e,o={}){const{preserveGroup:t=!1}=o,n=[],r=t?e=>{e.isLeaf||(n.push(e.key),a(e.children))}:e=>{e.isLeaf||(e.isGroup||n.push(e.key),a(e.children))};function a(e){e.forEach(r)}return a(e),n}(u,e)};return h}var ss={name:"Empty",common:_i,self:Qe},cs=ge("empty","\n display: flex;\n flex-direction: column;\n align-items: center;\n font-size: var(--n-font-size);\n",[eo("icon","\n width: var(--n-icon-size);\n height: var(--n-icon-size);\n font-size: var(--n-icon-size);\n line-height: var(--n-icon-size);\n color: var(--n-icon-color);\n transition:\n color .3s var(--n-bezier);\n ",[xe("+",[eo("description","\n margin-top: 8px;\n ")])]),eo("description","\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n "),eo("extra","\n text-align: center;\n transition: color .3s var(--n-bezier);\n margin-top: 12px;\n color: var(--n-extra-text-color);\n ")]),ds=po({name:"Empty",props:Object.assign(Object.assign({},P.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),slots:Object,setup(e){const{mergedClsPrefixRef:o,inlineThemeDisabled:t,mergedComponentPropsRef:n}=be(e),r=P("Empty","-empty",cs,Q,e,o),{localeRef:a}=C("Empty"),l=Do(()=>{var o,t,r;return null!==(o=e.description)&&void 0!==o?o:null===(r=null===(t=null==n?void 0:n.value)||void 0===t?void 0:t.Empty)||void 0===r?void 0:r.description}),i=Do(()=>{var e,o;return(null===(o=null===(e=null==n?void 0:n.value)||void 0===e?void 0:e.Empty)||void 0===o?void 0:o.renderIcon)||(()=>So(Ml,null))}),s=Do(()=>{const{size:o}=e,{common:{cubicBezierEaseInOut:t},self:{[ao("iconSize",o)]:n,[ao("fontSize",o)]:a,textColor:l,iconColor:i,extraTextColor:s}}=r.value;return{"--n-icon-size":n,"--n-font-size":a,"--n-bezier":t,"--n-text-color":l,"--n-icon-color":i,"--n-extra-text-color":s}}),c=t?Ce("empty",Do(()=>{let o="";const{size:t}=e;return o+=t[0],o}),s,e):void 0;return{mergedClsPrefix:o,mergedRenderIcon:i,localizedDescription:Do(()=>l.value||a.value.description),cssVars:t?void 0:s,themeClass:null==c?void 0:c.themeClass,onRender:null==c?void 0:c.onRender}},render(){const{$slots:e,mergedClsPrefix:o,onRender:t}=this;return null==t||t(),So("div",{class:[`${o}-empty`,this.themeClass],style:this.cssVars},this.showIcon?So("div",{class:`${o}-empty__icon`},e.icon?e.icon():So(ke,{clsPrefix:o},{default:this.mergedRenderIcon})):null,this.showDescription?So("div",{class:`${o}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?So("div",{class:`${o}-empty__extra`},e.extra()):null)}}),us={name:"InternalSelectMenu",common:_i,peers:{Scrollbar:Di,Empty:ss},self:mn},ps=po({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:o,labelFieldRef:t,nodePropsRef:n}=ko(Pr);return{labelField:t,nodeProps:n,renderLabel:e,renderOption:o}},render(){const{clsPrefix:e,renderLabel:o,renderOption:t,nodeProps:n,tmNode:{rawNode:r}}=this,a=null==n?void 0:n(r),l=o?o(r,!1):hn(r[this.labelField],r,!1),i=So("div",Object.assign({},a,{class:[`${e}-base-select-group-header`,null==a?void 0:a.class]}),l);return r.render?r.render({node:i,option:r}):t?t({node:i,option:r,selected:!1}):i}});var hs,fs,vs=po({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:t,pendingTmNodeRef:n,multipleRef:r,valueSetRef:a,renderLabelRef:l,renderOptionRef:i,labelFieldRef:s,valueFieldRef:c,showCheckmarkRef:d,nodePropsRef:u,handleOptionClick:p,handleOptionMouseEnter:h}=ko(Pr),f=o(()=>{const{value:o}=n;return!!o&&e.tmNode.key===o.key});return{multiple:r,isGrouped:o(()=>{const{tmNode:o}=e,{parent:t}=o;return t&&"group"===t.rawNode.type}),showCheckmark:d,nodeProps:u,isPending:f,isSelected:o(()=>{const{value:o}=t,{value:n}=r;if(null===o)return!1;const l=e.tmNode.rawNode[c.value];if(n){const{value:e}=a;return e.has(l)}return o===l}),labelField:s,renderLabel:l,renderOption:i,handleMouseMove:function(o){const{tmNode:t}=e,{value:n}=f;t.disabled||n||h(o,t)},handleMouseEnter:function(o){const{tmNode:t}=e;t.disabled||h(o,t)},handleClick:function(o){const{tmNode:t}=e;t.disabled||p(o,t)}}},render(){const{clsPrefix:e,tmNode:{rawNode:o},isSelected:t,isPending:n,isGrouped:r,showCheckmark:a,nodeProps:l,renderOption:i,renderLabel:s,handleClick:c,handleMouseEnter:d,handleMouseMove:u}=this,p=function(e,o){return So(Xo,{name:"fade-in-scale-up-transition"},{default:()=>e?So(ke,{clsPrefix:o,class:`${o}-base-select-option__check`},{default:()=>So(Pl)}):null})}(t,e),h=s?[s(o,t),a&&p]:[hn(o[this.labelField],o,t),a&&p],f=null==l?void 0:l(o),v=So("div",Object.assign({},f,{class:[`${e}-base-select-option`,o.class,null==f?void 0:f.class,{[`${e}-base-select-option--disabled`]:o.disabled,[`${e}-base-select-option--selected`]:t,[`${e}-base-select-option--grouped`]:r,[`${e}-base-select-option--pending`]:n,[`${e}-base-select-option--show-checkmark`]:a}],style:[(null==f?void 0:f.style)||"",o.style||""],onClick:ha([c,null==f?void 0:f.onClick]),onMouseenter:ha([d,null==f?void 0:f.onMouseenter]),onMousemove:ha([u,null==f?void 0:f.onMousemove])}),So("div",{class:`${e}-base-select-option__content`},h));return o.render?o.render({node:v,option:o,selected:t}):i?i({node:v,option:o,selected:t}):v}}),ms=ge("base-select-menu","\n line-height: 1.5;\n outline: none;\n z-index: 0;\n position: relative;\n border-radius: var(--n-border-radius);\n transition:\n background-color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier);\n background-color: var(--n-color);\n",[ge("scrollbar","\n max-height: var(--n-height);\n "),ge("virtual-list","\n max-height: var(--n-height);\n "),ge("base-select-option","\n min-height: var(--n-option-height);\n font-size: var(--n-option-font-size);\n display: flex;\n align-items: center;\n ",[eo("content","\n z-index: 1;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n ")]),ge("base-select-group-header","\n min-height: var(--n-option-height);\n font-size: .93em;\n display: flex;\n align-items: center;\n "),ge("base-select-menu-option-wrapper","\n position: relative;\n width: 100%;\n "),eo("loading, empty","\n display: flex;\n padding: 12px 32px;\n flex: 1;\n justify-content: center;\n "),eo("loading","\n color: var(--n-loading-color);\n font-size: var(--n-loading-size);\n "),eo("header","\n padding: 8px var(--n-option-padding-left);\n font-size: var(--n-option-font-size);\n transition: \n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n border-bottom: 1px solid var(--n-action-divider-color);\n color: var(--n-action-text-color);\n "),eo("action","\n padding: 8px var(--n-option-padding-left);\n font-size: var(--n-option-font-size);\n transition: \n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n border-top: 1px solid var(--n-action-divider-color);\n color: var(--n-action-text-color);\n "),ge("base-select-group-header","\n position: relative;\n cursor: default;\n padding: var(--n-option-padding);\n color: var(--n-group-header-text-color);\n "),ge("base-select-option","\n cursor: pointer;\n position: relative;\n padding: var(--n-option-padding);\n transition:\n color .3s var(--n-bezier),\n opacity .3s var(--n-bezier);\n box-sizing: border-box;\n color: var(--n-option-text-color);\n opacity: 1;\n ",[so("show-checkmark","\n padding-right: calc(var(--n-option-padding-right) + 20px);\n "),xe("&::before",'\n content: "";\n position: absolute;\n left: 4px;\n right: 4px;\n top: 0;\n bottom: 0;\n border-radius: var(--n-border-radius);\n transition: background-color .3s var(--n-bezier);\n '),xe("&:active","\n color: var(--n-option-text-color-pressed);\n "),so("grouped","\n padding-left: calc(var(--n-option-padding-left) * 1.5);\n "),so("pending",[xe("&::before","\n background-color: var(--n-option-color-pending);\n ")]),so("selected","\n color: var(--n-option-text-color-active);\n ",[xe("&::before","\n background-color: var(--n-option-color-active);\n "),so("pending",[xe("&::before","\n background-color: var(--n-option-color-active-pending);\n ")])]),so("disabled","\n cursor: not-allowed;\n ",[le("selected","\n color: var(--n-option-text-color-disabled);\n "),so("selected","\n opacity: var(--n-option-opacity-disabled);\n ")]),eo("check","\n font-size: 16px;\n position: absolute;\n right: calc(var(--n-option-padding-right) - 4px);\n top: calc(50% - 7px);\n color: var(--n-option-check-color);\n transition: color .3s var(--n-bezier);\n ",[un({enterScale:"0.5"})])])]),gs=po({name:"InternalSelectMenu",props:Object.assign(Object.assign({},P.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:"medium"},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,onToggle:Function}),setup(e){const{mergedClsPrefixRef:o,mergedRtlRef:t}=be(e),n=g("InternalSelectMenu",t,o),r=P("InternalSelectMenu","-internal-select-menu",ms,yn,e,jo(e,"clsPrefix")),a=it(null),l=it(null),i=it(null),s=Do(()=>e.treeMate.getFlattenedNodes()),c=Do(()=>function(e){const o=new Map;return e.forEach((e,t)=>{o.set(e.key,t)}),e=>{var t;return null!==(t=o.get(e))&&void 0!==t?t:null}}(s.value)),d=it(null);function u(){const{value:o}=d;o&&!e.treeMate.getNode(o.key)&&(d.value=null)}let p;$o(()=>e.show,o=>{o?p=$o(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?function(){const{treeMate:o}=e;let t=null;const{value:n}=e;null===n?t=o.getFirstAvailableNode():(t=e.multiple?o.getNode((n||[])[(n||[]).length-1]):o.getNode(n),t&&!t.disabled||(t=o.getFirstAvailableNode())),y(t||null)}():u(),yo(x)):u()},{immediate:!0}):null==p||p()},{immediate:!0}),ft(()=>{null==p||p()});const h=Do(()=>ze(r.value.self[ao("optionHeight",e.size)])),f=Do(()=>ue(r.value.self[ao("padding",e.size)])),v=Do(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),m=Do(()=>{const e=s.value;return e&&0===e.length});function b(o){const{onScroll:t}=e;t&&t(o)}function y(e,o=!1){d.value=e,o&&x()}function x(){var o,t;const n=d.value;if(!n)return;const r=c.value(n.key);null!==r&&(e.virtualScroll?null===(o=l.value)||void 0===o||o.scrollTo({index:r}):null===(t=i.value)||void 0===t||t.scrollTo({index:r,elSize:h.value}))}go(Pr,{handleOptionMouseEnter:function(e,o){o.disabled||y(o,!1)},handleOptionClick:function(o,t){t.disabled||function(o){const{onToggle:t}=e;t&&t(o)}(t)},valueSetRef:v,pendingTmNodeRef:d,nodePropsRef:jo(e,"nodeProps"),showCheckmarkRef:jo(e,"showCheckmark"),multipleRef:jo(e,"multiple"),valueRef:jo(e,"value"),renderLabelRef:jo(e,"renderLabel"),renderOptionRef:jo(e,"renderOption"),labelFieldRef:jo(e,"labelField"),valueFieldRef:jo(e,"valueField")}),go(Tr,a),Ro(()=>{const{value:e}=i;e&&e.sync()});const C=Do(()=>{const{size:o}=e,{common:{cubicBezierEaseInOut:t},self:{height:n,borderRadius:a,color:l,groupHeaderTextColor:i,actionDividerColor:s,optionTextColorPressed:c,optionTextColor:d,optionTextColorDisabled:u,optionTextColorActive:p,optionOpacityDisabled:h,optionCheckColor:f,actionTextColor:v,optionColorPending:m,optionColorActive:g,loadingColor:b,loadingSize:y,optionColorActivePending:x,[ao("optionFontSize",o)]:C,[ao("optionHeight",o)]:w,[ao("optionPadding",o)]:S}}=r.value;return{"--n-height":n,"--n-action-divider-color":s,"--n-action-text-color":v,"--n-bezier":t,"--n-border-radius":a,"--n-color":l,"--n-option-font-size":C,"--n-group-header-text-color":i,"--n-option-check-color":f,"--n-option-color-pending":m,"--n-option-color-active":g,"--n-option-color-active-pending":x,"--n-option-height":w,"--n-option-opacity-disabled":h,"--n-option-text-color":d,"--n-option-text-color-active":p,"--n-option-text-color-disabled":u,"--n-option-text-color-pressed":c,"--n-option-padding":S,"--n-option-padding-left":ue(S,"left"),"--n-option-padding-right":ue(S,"right"),"--n-loading-color":b,"--n-loading-size":y}}),{inlineThemeDisabled:w}=e,S=w?Ce("internal-select-menu",Do(()=>e.size[0]),C,e):void 0,k={selfRef:a,next:function(){const{value:e}=d;e&&y(e.getNext({loop:!0}),!0)},prev:function(){const{value:e}=d;e&&y(e.getPrev({loop:!0}),!0)},getPendingTmNode:function(){const{value:e}=d;return e||null}};return ca(a,e.onResize),Object.assign({mergedTheme:r,mergedClsPrefix:o,rtlEnabled:n,virtualListRef:l,scrollbarRef:i,itemSize:h,padding:f,flattenedNodes:s,empty:m,virtualListContainer(){const{value:e}=l;return null==e?void 0:e.listElRef},virtualListContent(){const{value:e}=l;return null==e?void 0:e.itemsElRef},doScroll:b,handleFocusin:function(o){var t,n;(null===(t=a.value)||void 0===t?void 0:t.contains(o.target))&&(null===(n=e.onFocus)||void 0===n||n.call(e,o))},handleFocusout:function(o){var t,n;(null===(t=a.value)||void 0===t?void 0:t.contains(o.relatedTarget))||null===(n=e.onBlur)||void 0===n||n.call(e,o)},handleKeyUp:function(o){var t;xr(o,"action")||null===(t=e.onKeyup)||void 0===t||t.call(e,o)},handleKeyDown:function(o){var t;xr(o,"action")||null===(t=e.onKeydown)||void 0===t||t.call(e,o)},handleMouseDown:function(o){var t;null===(t=e.onMousedown)||void 0===t||t.call(e,o),e.focusable||o.preventDefault()},handleVirtualListResize:function(){var e;null===(e=i.value)||void 0===e||e.sync()},handleVirtualListScroll:function(e){var o;null===(o=i.value)||void 0===o||o.sync(),b(e)},cssVars:w?void 0:C,themeClass:null==S?void 0:S.themeClass,onRender:null==S?void 0:S.onRender},k)},render(){const{$slots:e,virtualScroll:o,clsPrefix:t,mergedTheme:n,themeClass:r,onRender:a}=this;return null==a||a(),So("div",{ref:"selfRef",tabindex:this.focusable?0:-1,class:[`${t}-base-select-menu`,this.rtlEnabled&&`${t}-base-select-menu--rtl`,r,this.multiple&&`${t}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},s(e.header,e=>e&&So("div",{class:`${t}-base-select-menu__header`,"data-header":!0,key:"header"},e)),this.loading?So("div",{class:`${t}-base-select-menu__loading`},So(D,{clsPrefix:t,strokeWidth:20})):this.empty?So("div",{class:`${t}-base-select-menu__empty`,"data-empty":!0},lo(e.empty,()=>[So(ds,{theme:n.peers.Empty,themeOverrides:n.peerOverrides.Empty,size:this.size})])):So(io,{ref:"scrollbarRef",theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,scrollable:this.scrollable,container:o?this.virtualListContainer:void 0,content:o?this.virtualListContent:void 0,onScroll:o?void 0:this.doScroll},{default:()=>o?So(aa,{ref:"virtualListRef",class:`${t}-virtual-list`,items:this.flattenedNodes,itemSize:this.itemSize,showScrollbar:!1,paddingTop:this.padding.top,paddingBottom:this.padding.bottom,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemResizable:!0},{default:({item:e})=>e.isGroup?So(ps,{key:e.key,clsPrefix:t,tmNode:e}):e.ignored?null:So(vs,{clsPrefix:t,key:e.key,tmNode:e})}):So("div",{class:`${t}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(e=>e.isGroup?So(ps,{key:e.key,clsPrefix:t,tmNode:e}):So(vs,{clsPrefix:t,key:e.key,tmNode:e})))}),s(e.action,e=>e&&[So("div",{class:`${t}-base-select-menu__action`,"data-action":!0,key:"action"},e),So(Bl,{onFocus:this.onTabOut,key:"focus-detector"})]))}}),bs={name:"Popover",common:_i,peers:{Scrollbar:Di},self:dn},ys={top:"bottom",bottom:"top",left:"right",right:"left"},xs="var(--n-arrow-height) * 1.414",Cs=xe([ge("popover","\n transition:\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n position: relative;\n font-size: var(--n-font-size);\n color: var(--n-text-color);\n box-shadow: var(--n-box-shadow);\n word-break: break-word;\n ",[xe(">",[ge("scrollbar","\n height: inherit;\n max-height: inherit;\n ")]),le("raw","\n background-color: var(--n-color);\n border-radius: var(--n-border-radius);\n ",[le("scrollable",[le("show-header-or-footer","padding: var(--n-padding);")])]),eo("header","\n padding: var(--n-padding);\n border-bottom: 1px solid var(--n-divider-color);\n transition: border-color .3s var(--n-bezier);\n "),eo("footer","\n padding: var(--n-padding);\n border-top: 1px solid var(--n-divider-color);\n transition: border-color .3s var(--n-bezier);\n "),so("scrollable, show-header-or-footer",[eo("content","\n padding: var(--n-padding);\n ")])]),ge("popover-shared","\n transform-origin: inherit;\n ",[ge("popover-arrow-wrapper","\n position: absolute;\n overflow: hidden;\n pointer-events: none;\n ",[ge("popover-arrow",`\n transition: background-color .3s var(--n-bezier);\n position: absolute;\n display: block;\n width: calc(${xs});\n height: calc(${xs});\n box-shadow: 0 0 8px 0 rgba(0, 0, 0, .12);\n transform: rotate(45deg);\n background-color: var(--n-color);\n pointer-events: all;\n `)]),xe("&.popover-transition-enter-from, &.popover-transition-leave-to","\n opacity: 0;\n transform: scale(.85);\n "),xe("&.popover-transition-enter-to, &.popover-transition-leave-from","\n transform: scale(1);\n opacity: 1;\n "),xe("&.popover-transition-enter-active","\n transition:\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier),\n opacity .15s var(--n-bezier-ease-out),\n transform .15s var(--n-bezier-ease-out);\n "),xe("&.popover-transition-leave-active","\n transition:\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier),\n opacity .15s var(--n-bezier-ease-in),\n transform .15s var(--n-bezier-ease-in);\n ")]),Ss("top-start",`\n top: calc(${xs} / -2);\n left: calc(${ws("top-start")} - var(--v-offset-left));\n `),Ss("top",`\n top: calc(${xs} / -2);\n transform: translateX(calc(${xs} / -2)) rotate(45deg);\n left: 50%;\n `),Ss("top-end",`\n top: calc(${xs} / -2);\n right: calc(${ws("top-end")} + var(--v-offset-left));\n `),Ss("bottom-start",`\n bottom: calc(${xs} / -2);\n left: calc(${ws("bottom-start")} - var(--v-offset-left));\n `),Ss("bottom",`\n bottom: calc(${xs} / -2);\n transform: translateX(calc(${xs} / -2)) rotate(45deg);\n left: 50%;\n `),Ss("bottom-end",`\n bottom: calc(${xs} / -2);\n right: calc(${ws("bottom-end")} + var(--v-offset-left));\n `),Ss("left-start",`\n left: calc(${xs} / -2);\n top: calc(${ws("left-start")} - var(--v-offset-top));\n `),Ss("left",`\n left: calc(${xs} / -2);\n transform: translateY(calc(${xs} / -2)) rotate(45deg);\n top: 50%;\n `),Ss("left-end",`\n left: calc(${xs} / -2);\n bottom: calc(${ws("left-end")} + var(--v-offset-top));\n `),Ss("right-start",`\n right: calc(${xs} / -2);\n top: calc(${ws("right-start")} - var(--v-offset-top));\n `),Ss("right",`\n right: calc(${xs} / -2);\n transform: translateY(calc(${xs} / -2)) rotate(45deg);\n top: 50%;\n `),Ss("right-end",`\n right: calc(${xs} / -2);\n bottom: calc(${ws("right-end")} + var(--v-offset-top));\n `),...(hs={top:["right-start","left-start"],right:["top-end","bottom-end"],bottom:["right-end","left-end"],left:["top-start","bottom-start"]},fs=(e,o)=>{const t=["right","left"].includes(o),n=t?"width":"height";return e.map(e=>{const r="end"===e.split("-")[1],a=`calc((var(--v-target-${n}, 0px) - ${xs}) / 2)`,l=ws(e);return xe(`[v-placement="${e}"] >`,[ge("popover-shared",[so("center-arrow",[ge("popover-arrow",`${o}: calc(max(${a}, ${l}) ${r?"+":"-"} var(--v-offset-${t?"left":"top"}));`)])])])})},(re(hs)?Ee:Sl)(hs,yl(fs)))]);function ws(e){return["top","bottom"].includes(e.split("-")[0])?"var(--n-arrow-offset)":"var(--n-arrow-offset-vertical)"}function Ss(e,o){const t=e.split("-")[0],n=["top","bottom"].includes(t)?"height: var(--n-space-arrow);":"width: var(--n-space-arrow);";return xe(`[v-placement="${e}"] >`,[ge("popover-shared",`\n margin-${ys[t]}: var(--n-space);\n `,[so("show-arrow",`\n margin-${ys[t]}: var(--n-space-arrow);\n `),so("overlap","\n margin: 0;\n "),ee("popover-arrow-wrapper",`\n right: 0;\n left: 0;\n top: 0;\n bottom: 0;\n ${t}: 100%;\n ${ys[t]}: auto;\n ${n}\n `,[ge("popover-arrow",o)])])])}var ks=Object.assign(Object.assign({},P.props),{to:zr.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function Ps({arrowClass:e,arrowStyle:o,arrowWrapperClass:t,arrowWrapperStyle:n,clsPrefix:r}){return So("div",{key:"__popover-arrow__",style:n,class:[`${r}-popover-arrow-wrapper`,t]},So("div",{class:[`${r}-popover-arrow`,e],style:o}))}var Ts=po({name:"PopoverBody",inheritAttrs:!1,props:ks,setup(e,{slots:o,attrs:t}){const{namespaceRef:n,mergedClsPrefixRef:r,inlineThemeDisabled:a,mergedRtlRef:l}=be(e),i=P("Popover","-popover",Cs,Sn,e,r),c=g("Popover",l,r),d=it(null),u=ko("NPopover"),p=it(null),h=it(e.show),f=it(!1);To(()=>{const{show:o}=e;!o||(void 0===ta&&(ta=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),ta)||e.internalDeactivateImmediately||(f.value=!0)});const v=Do(()=>{const{trigger:o,onClickoutside:t}=e,n=[],{positionManuallyRef:{value:r}}=u;return r||("click"!==o||t||n.push([uo,S,void 0,{capture:!0}]),"hover"===o&&n.push([_r,w])),t&&n.push([uo,S,void 0,{capture:!0}]),("show"===e.displayDirective||e.animated&&f.value)&&n.push([Wo,e.show]),n}),m=Do(()=>{const{common:{cubicBezierEaseInOut:e,cubicBezierEaseIn:o,cubicBezierEaseOut:t},self:{space:n,spaceArrow:r,padding:a,fontSize:l,textColor:s,dividerColor:c,color:d,boxShadow:u,borderRadius:p,arrowHeight:h,arrowOffset:f,arrowOffsetVertical:v}}=i.value;return{"--n-box-shadow":u,"--n-bezier":e,"--n-bezier-ease-in":o,"--n-bezier-ease-out":t,"--n-font-size":l,"--n-text-color":s,"--n-color":d,"--n-divider-color":c,"--n-border-radius":p,"--n-arrow-height":h,"--n-arrow-offset":f,"--n-arrow-offset-vertical":v,"--n-padding":a,"--n-space":n,"--n-space-arrow":r}}),b=Do(()=>{const o="trigger"===e.width?void 0:Pe(e.width),t=[];o&&t.push({width:o});const{maxWidth:n,minWidth:r}=e;return n&&t.push({maxWidth:Pe(n)}),r&&t.push({maxWidth:Pe(r)}),a||t.push(m.value),t}),y=a?Ce("popover",void 0,m,e):void 0;function x(o){"hover"===e.trigger&&e.keepAliveOnHover&&e.show&&u.handleMouseEnter(o)}function C(o){"hover"===e.trigger&&e.keepAliveOnHover&&u.handleMouseLeave(o)}function w(o){"hover"!==e.trigger||k().contains(_e(o))||u.handleMouseMoveOutside(o)}function S(o){("click"===e.trigger&&!k().contains(_e(o))||e.onClickoutside)&&u.handleClickOutside(o)}function k(){return u.getTriggerElement()}return u.setBodyInstance({syncPosition:function(){var e;null===(e=d.value)||void 0===e||e.syncPosition()}}),ft(()=>{u.setBodyInstance(null)}),$o(jo(e,"show"),o=>{e.animated||(h.value=!!o)}),go(U,p),go(He,null),go(V,null),{displayed:f,namespace:n,isMounted:u.isMountedRef,zIndex:u.zIndexRef,followerRef:d,adjustedTo:zr(e),followerEnabled:h,renderContentNode:function(){if(null==y||y.onRender(),!("show"===e.displayDirective||e.show||e.animated&&f.value))return null;let n;const a=u.internalRenderBodyRef.value,{value:l}=r;if(a)n=a([`${l}-popover-shared`,(null==c?void 0:c.value)&&`${l}-popover--rtl`,null==y?void 0:y.themeClass.value,e.overlap&&`${l}-popover-shared--overlap`,e.showArrow&&`${l}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${l}-popover-shared--center-arrow`],p,b.value,x,C);else{const{value:r}=u.extraClassRef,{internalTrapFocus:a}=e,d=!ie(o.header)||!ie(o.footer),h=()=>{var t,n;const r=d?So(No,null,s(o.header,o=>o?So("div",{class:[`${l}-popover__header`,e.headerClass],style:e.headerStyle},o):null),s(o.default,t=>t?So("div",{class:[`${l}-popover__content`,e.contentClass],style:e.contentStyle},o):null),s(o.footer,o=>o?So("div",{class:[`${l}-popover__footer`,e.footerClass],style:e.footerStyle},o):null)):e.scrollable?null===(t=o.default)||void 0===t?void 0:t.call(o):So("div",{class:[`${l}-popover__content`,e.contentClass],style:e.contentStyle},o);return[e.scrollable?So(ae,{themeOverrides:i.value.peerOverrides.Scrollbar,theme:i.value.peers.Scrollbar,contentClass:d?void 0:`${l}-popover__content ${null!==(n=e.contentClass)&&void 0!==n?n:""}`,contentStyle:d?void 0:e.contentStyle},{default:()=>r}):r,e.showArrow?Ps({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:l}):null]};n=So("div",mo({class:[`${l}-popover`,`${l}-popover-shared`,(null==c?void 0:c.value)&&`${l}-popover--rtl`,null==y?void 0:y.themeClass.value,r.map(e=>`${l}-${e}`),{[`${l}-popover--scrollable`]:e.scrollable,[`${l}-popover--show-header-or-footer`]:d,[`${l}-popover--raw`]:e.raw,[`${l}-popover-shared--overlap`]:e.overlap,[`${l}-popover-shared--show-arrow`]:e.showArrow,[`${l}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:p,style:b.value,onKeydown:u.handleKeydown,onMouseenter:x,onMouseleave:C},t),a?So(T,{active:e.show,autoFocus:!0},{default:h}):h())}return ct(n,v.value)}}},render(){return So(Qr,{ref:"followerRef",zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:"trigger"===this.width?"target":void 0,teleportDisabled:this.adjustedTo===zr.tdkey},{default:()=>this.animated?So(Xo,{name:"popover-transition",appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;null===(e=this.internalOnAfterLeave)||void 0===e||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),Is=Object.keys(ks),zs={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};var Ms={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:"hover"},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:"top"},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:"if"},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:zr.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},Rs=po({name:"Popover",inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign({},P.props),Ms),{internalOnAfterLeave:Function,internalRenderBody:Function}),slots:Object,__popover__:!0,setup(e){const t=Z(),n=it(null),r=Do(()=>e.show),a=it(e.defaultShow),l=F(r,a),i=o(()=>!e.disabled&&l.value),s=()=>{if(e.disabled)return!0;const{getDisabled:o}=e;return!!(null==o?void 0:o())},c=()=>!s()&&l.value,d=G(e,["arrow","showArrow"]),u=Do(()=>!e.overlap&&d.value);let p=null;const h=it(null),f=it(null),v=o(()=>void 0!==e.x&&void 0!==e.y);function m(o){const{"onUpdate:show":t,onUpdateShow:n,onShow:r,onHide:l}=e;a.value=o,t&&H(t,o),n&&H(n,o),o&&r&&H(r,!0),o&&l&&H(l,!1)}function g(){const{value:e}=h;e&&(window.clearTimeout(e),h.value=null)}function b(){const{value:e}=f;e&&(window.clearTimeout(e),f.value=null)}function y(){const o=s();if("hover"===e.trigger&&!o){if(b(),null!==h.value)return;if(c())return;const o=()=>{m(!0),h.value=null},{delay:t}=e;0===t?o():h.value=window.setTimeout(o,t)}}function x(){const o=s();if("hover"===e.trigger&&!o){if(g(),null!==f.value)return;if(!c())return;const o=()=>{m(!1),f.value=null},{duration:t}=e;0===t?o():f.value=window.setTimeout(o,t)}}return go("NPopover",{getTriggerElement:function(){var e;return null===(e=n.value)||void 0===e?void 0:e.targetRef},handleKeydown:function(o){e.internalTrapFocus&&"Escape"===o.key&&(g(),b(),m(!1))},handleMouseEnter:y,handleMouseLeave:x,handleClickOutside:function(o){var t;c()&&("click"===e.trigger&&(g(),b(),m(!1)),null===(t=e.onClickoutside)||void 0===t||t.call(e,o))},handleMouseMoveOutside:function(){x()},setBodyInstance:function(e){p=e},positionManuallyRef:v,isMountedRef:t,zIndexRef:jo(e,"zIndex"),extraClassRef:jo(e,"internalExtraClass"),internalRenderBodyRef:jo(e,"internalRenderBody")}),To(()=>{l.value&&s()&&m(!1)}),{binderInstRef:n,positionManually:v,mergedShowConsideringDisabledProp:i,uncontrolledShow:a,mergedShowArrow:u,getMergedShow:c,setShow:function(e){a.value=e},handleClick:function(){"click"!==e.trigger||s()||(g(),b(),m(!c()))},handleMouseEnter:y,handleMouseLeave:x,handleFocus:function(){const o=s();if("focus"===e.trigger&&!o){if(c())return;m(!0)}},handleBlur:function(){const o=s();if("focus"===e.trigger&&!o){if(!c())return;m(!1)}},syncPosition:function(){p&&p.syncPosition()}}},render(){var e;const{positionManually:o,$slots:t}=this;let n,r=!1;if(!o&&(n=an(t,"trigger"),n)){n=ht(n),n=n.type===dt?So("span",[n]):n;const t={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(null===(e=n.type)||void 0===e?void 0:e.__popover__)r=!0,n.props||(n.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),n.props.internalSyncTargetWithParent=!0,n.props.internalInheritedEventHandlers?n.props.internalInheritedEventHandlers=[t,...n.props.internalInheritedEventHandlers]:n.props.internalInheritedEventHandlers=[t];else{const{internalInheritedEventHandlers:e}=this,r=[t,...e];a=n,l=e?"nested":o?"manual":this.trigger,i={onBlur:e=>{r.forEach(o=>{o.onBlur(e)})},onFocus:e=>{r.forEach(o=>{o.onFocus(e)})},onClick:e=>{r.forEach(o=>{o.onClick(e)})},onMouseenter:e=>{r.forEach(o=>{o.onMouseenter(e)})},onMouseleave:e=>{r.forEach(o=>{o.onMouseleave(e)})}},zs[l].forEach(e=>{a.props?a.props=Object.assign({},a.props):a.props={};const o=a.props[e],t=i[e];a.props[e]=o?(...e)=>{o(...e),t(...e)}:t})}}var a,l,i;return So(Or,{ref:"binderInstRef",syncTarget:!r,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const e=this.getMergedShow();return[this.internalTrapFocus&&e?ct(So("div",{style:{position:"fixed",top:0,right:0,bottom:0,left:0}}),[[O,{enabled:e,zIndex:this.zIndex}]]):null,o?null:So(Br,null,{default:()=>n}),So(Ts,pn(this.$props,Is,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:e})),{default:()=>{var e,o;return null===(o=(e=this.$slots).default)||void 0===o?void 0:o.call(e)},header:()=>{var e,o;return null===(o=(e=this.$slots).header)||void 0===o?void 0:o.call(e)},footer:()=>{var e,o;return null===(o=(e=this.$slots).footer)||void 0===o?void 0:o.call(e)}})]}})}}),As={name:"Tag",common:_i,self(e){const{textColor2:o,primaryColorHover:t,primaryColorPressed:n,primaryColor:r,infoColor:a,successColor:l,warningColor:i,errorColor:s,baseColor:c,borderColor:d,tagColor:u,opacityDisabled:p,closeIconColor:h,closeIconColorHover:f,closeIconColorPressed:v,closeColorHover:m,closeColorPressed:g,borderRadiusSmall:b,fontSizeMini:y,fontSizeTiny:x,fontSizeSmall:C,fontSizeMedium:w,heightMini:S,heightTiny:k,heightSmall:P,heightMedium:T,buttonColor2Hover:I,buttonColor2Pressed:z,fontWeightStrong:M}=e;return Object.assign(Object.assign({},me),{closeBorderRadius:b,heightTiny:S,heightSmall:k,heightMedium:P,heightLarge:T,borderRadius:b,opacityDisabled:p,fontSizeTiny:y,fontSizeSmall:x,fontSizeMedium:C,fontSizeLarge:w,fontWeightStrong:M,textColorCheckable:o,textColorHoverCheckable:o,textColorPressedCheckable:o,textColorChecked:c,colorCheckable:"#0000",colorHoverCheckable:I,colorPressedCheckable:z,colorChecked:r,colorCheckedHover:t,colorCheckedPressed:n,border:`1px solid ${d}`,textColor:o,color:u,colorBordered:"#0000",closeIconColor:h,closeIconColorHover:f,closeIconColorPressed:v,closeColorHover:m,closeColorPressed:g,borderPrimary:`1px solid ${ne(r,{alpha:.3})}`,textColorPrimary:r,colorPrimary:ne(r,{alpha:.16}),colorBorderedPrimary:"#0000",closeIconColorPrimary:ce(r,{lightness:.7}),closeIconColorHoverPrimary:ce(r,{lightness:.7}),closeIconColorPressedPrimary:ce(r,{lightness:.7}),closeColorHoverPrimary:ne(r,{alpha:.16}),closeColorPressedPrimary:ne(r,{alpha:.12}),borderInfo:`1px solid ${ne(a,{alpha:.3})}`,textColorInfo:a,colorInfo:ne(a,{alpha:.16}),colorBorderedInfo:"#0000",closeIconColorInfo:ce(a,{alpha:.7}),closeIconColorHoverInfo:ce(a,{alpha:.7}),closeIconColorPressedInfo:ce(a,{alpha:.7}),closeColorHoverInfo:ne(a,{alpha:.16}),closeColorPressedInfo:ne(a,{alpha:.12}),borderSuccess:`1px solid ${ne(l,{alpha:.3})}`,textColorSuccess:l,colorSuccess:ne(l,{alpha:.16}),colorBorderedSuccess:"#0000",closeIconColorSuccess:ce(l,{alpha:.7}),closeIconColorHoverSuccess:ce(l,{alpha:.7}),closeIconColorPressedSuccess:ce(l,{alpha:.7}),closeColorHoverSuccess:ne(l,{alpha:.16}),closeColorPressedSuccess:ne(l,{alpha:.12}),borderWarning:`1px solid ${ne(i,{alpha:.3})}`,textColorWarning:i,colorWarning:ne(i,{alpha:.16}),colorBorderedWarning:"#0000",closeIconColorWarning:ce(i,{alpha:.7}),closeIconColorHoverWarning:ce(i,{alpha:.7}),closeIconColorPressedWarning:ce(i,{alpha:.7}),closeColorHoverWarning:ne(i,{alpha:.16}),closeColorPressedWarning:ne(i,{alpha:.11}),borderError:`1px solid ${ne(s,{alpha:.3})}`,textColorError:s,colorError:ne(s,{alpha:.16}),colorBorderedError:"#0000",closeIconColorError:ce(s,{alpha:.7}),closeIconColorHoverError:ce(s,{alpha:.7}),closeIconColorPressedError:ce(s,{alpha:.7}),closeColorHoverError:ne(s,{alpha:.16}),closeColorPressedError:ne(s,{alpha:.12})})}},Fs={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},$s=ge("tag","\n --n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);\n white-space: nowrap;\n position: relative;\n box-sizing: border-box;\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex-wrap: nowrap;\n padding: var(--n-padding);\n border-radius: var(--n-border-radius);\n color: var(--n-text-color);\n background-color: var(--n-color);\n transition: \n border-color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier),\n opacity .3s var(--n-bezier);\n line-height: 1;\n height: var(--n-height);\n font-size: var(--n-font-size);\n",[so("strong","\n font-weight: var(--n-font-weight-strong);\n "),eo("border","\n pointer-events: none;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: inherit;\n border: var(--n-border);\n transition: border-color .3s var(--n-bezier);\n "),eo("icon","\n display: flex;\n margin: 0 4px 0 0;\n color: var(--n-text-color);\n transition: color .3s var(--n-bezier);\n font-size: var(--n-avatar-size-override);\n "),eo("avatar","\n display: flex;\n margin: 0 6px 0 0;\n "),eo("close","\n margin: var(--n-close-margin);\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n "),so("round","\n padding: 0 calc(var(--n-height) / 3);\n border-radius: calc(var(--n-height) / 2);\n ",[eo("icon","\n margin: 0 4px 0 calc((var(--n-height) - 8px) / -2);\n "),eo("avatar","\n margin: 0 6px 0 calc((var(--n-height) - 8px) / -2);\n "),so("closable","\n padding: 0 calc(var(--n-height) / 4) 0 calc(var(--n-height) / 3);\n ")]),so("icon, avatar",[so("round","\n padding: 0 calc(var(--n-height) / 3) 0 calc(var(--n-height) / 2);\n ")]),so("disabled","\n cursor: not-allowed !important;\n opacity: var(--n-opacity-disabled);\n "),so("checkable","\n cursor: pointer;\n box-shadow: none;\n color: var(--n-text-color-checkable);\n background-color: var(--n-color-checkable);\n ",[le("disabled",[xe("&:hover","background-color: var(--n-color-hover-checkable);",[le("checked","color: var(--n-text-color-hover-checkable);")]),xe("&:active","background-color: var(--n-color-pressed-checkable);",[le("checked","color: var(--n-text-color-pressed-checkable);")])]),so("checked","\n color: var(--n-text-color-checked);\n background-color: var(--n-color-checked);\n ",[le("disabled",[xe("&:hover","background-color: var(--n-color-checked-hover);"),xe("&:active","background-color: var(--n-color-checked-pressed);")])])])]),Os=Object.assign(Object.assign(Object.assign({},P.props),Fs),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),Bs=J("n-tag"),Es=po({name:"Tag",props:Os,slots:Object,setup(e){const o=it(null),{mergedBorderedRef:t,mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:a}=be(e),l=P("Tag","-tag",$s,ye,e,n);go(Bs,{roundRef:jo(e,"round")});const i={setTextContent(e){const{value:t}=o;t&&(t.textContent=e)}},s=g("Tag",a,n),c=Do(()=>{const{type:o,size:n,color:{color:r,textColor:a}={}}=e,{common:{cubicBezierEaseInOut:i},self:{padding:s,closeMargin:c,borderRadius:d,opacityDisabled:u,textColorCheckable:p,textColorHoverCheckable:h,textColorPressedCheckable:f,textColorChecked:v,colorCheckable:m,colorHoverCheckable:g,colorPressedCheckable:b,colorChecked:y,colorCheckedHover:x,colorCheckedPressed:C,closeBorderRadius:w,fontWeightStrong:S,[ao("colorBordered",o)]:k,[ao("closeSize",n)]:P,[ao("closeIconSize",n)]:T,[ao("fontSize",n)]:I,[ao("height",n)]:z,[ao("color",o)]:M,[ao("textColor",o)]:R,[ao("border",o)]:A,[ao("closeIconColor",o)]:F,[ao("closeIconColorHover",o)]:$,[ao("closeIconColorPressed",o)]:O,[ao("closeColorHover",o)]:B,[ao("closeColorPressed",o)]:E}}=l.value,_=ue(c);return{"--n-font-weight-strong":S,"--n-avatar-size-override":`calc(${z} - 8px)`,"--n-bezier":i,"--n-border-radius":d,"--n-border":A,"--n-close-icon-size":T,"--n-close-color-pressed":E,"--n-close-color-hover":B,"--n-close-border-radius":w,"--n-close-icon-color":F,"--n-close-icon-color-hover":$,"--n-close-icon-color-pressed":O,"--n-close-icon-color-disabled":F,"--n-close-margin-top":_.top,"--n-close-margin-right":_.right,"--n-close-margin-bottom":_.bottom,"--n-close-margin-left":_.left,"--n-close-size":P,"--n-color":r||(t.value?k:M),"--n-color-checkable":m,"--n-color-checked":y,"--n-color-checked-hover":x,"--n-color-checked-pressed":C,"--n-color-hover-checkable":g,"--n-color-pressed-checkable":b,"--n-font-size":I,"--n-height":z,"--n-opacity-disabled":u,"--n-padding":s,"--n-text-color":a||R,"--n-text-color-checkable":p,"--n-text-color-checked":v,"--n-text-color-hover-checkable":h,"--n-text-color-pressed-checkable":f}}),d=r?Ce("tag",Do(()=>{let o="";const{type:n,size:r,color:{color:a,textColor:l}={}}=e;return o+=n[0],o+=r[0],a&&(o+=`a${k(a)}`),l&&(o+=`b${k(l)}`),t.value&&(o+="c"),o}),c,e):void 0;return Object.assign(Object.assign({},i),{rtlEnabled:s,mergedClsPrefix:n,contentRef:o,mergedBordered:t,handleClick:function(){if(!e.disabled&&e.checkable){const{checked:o,onCheckedChange:t,onUpdateChecked:n,"onUpdate:checked":r}=e;n&&n(!o),r&&r(!o),t&&t(!o)}},handleCloseClick:function(o){if(e.triggerClickOnClose||o.stopPropagation(),!e.disabled){const{onClose:t}=e;t&&H(t,o)}},cssVars:r?void 0:c,themeClass:null==d?void 0:d.themeClass,onRender:null==d?void 0:d.onRender})},render(){var e,o;const{mergedClsPrefix:t,rtlEnabled:n,closable:r,color:{borderColor:a}={},round:l,onRender:i,$slots:d}=this;null==i||i();const u=s(d.avatar,e=>e&&So("div",{class:`${t}-tag__avatar`},e)),p=s(d.icon,e=>e&&So("div",{class:`${t}-tag__icon`},e));return So("div",{class:[`${t}-tag`,this.themeClass,{[`${t}-tag--rtl`]:n,[`${t}-tag--strong`]:this.strong,[`${t}-tag--disabled`]:this.disabled,[`${t}-tag--checkable`]:this.checkable,[`${t}-tag--checked`]:this.checkable&&this.checked,[`${t}-tag--round`]:l,[`${t}-tag--avatar`]:u,[`${t}-tag--icon`]:p,[`${t}-tag--closable`]:r}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},p||u,So("span",{class:`${t}-tag__content`,ref:"contentRef"},null===(o=(e=this.$slots).default)||void 0===o?void 0:o.call(e)),!this.checkable&&r?So(c,{clsPrefix:t,class:`${t}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:l,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?So("div",{class:`${t}-tag__border`,style:{borderColor:a}}):null)}}),_s=po({name:"InternalSelectionSuffix",props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup:(e,{slots:o})=>()=>{const{clsPrefix:t}=e;return So(D,{clsPrefix:t,class:`${t}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?So(Ol,{clsPrefix:t,show:e.showClear,onClear:e.onClear},{placeholder:()=>So(ke,{clsPrefix:t,class:`${t}-base-suffix__arrow`},{default:()=>lo(o.default,()=>[So(Tl,null)])})}):null})}}),Ds={name:"InternalSelection",common:_i,peers:{Popover:bs},self(e){const{borderRadius:o,textColor2:t,textColorDisabled:n,inputColor:r,inputColorDisabled:a,primaryColor:l,primaryColorHover:i,warningColor:s,warningColorHover:c,errorColor:d,errorColorHover:u,iconColor:p,iconColorDisabled:h,clearColor:f,clearColorHover:v,clearColorPressed:m,placeholderColor:g,placeholderColorDisabled:b,fontSizeTiny:y,fontSizeSmall:x,fontSizeMedium:C,fontSizeLarge:w,heightTiny:S,heightSmall:k,heightMedium:P,heightLarge:T,fontWeight:I}=e;return Object.assign(Object.assign({},vn),{fontWeight:I,fontSizeTiny:y,fontSizeSmall:x,fontSizeMedium:C,fontSizeLarge:w,heightTiny:S,heightSmall:k,heightMedium:P,heightLarge:T,borderRadius:o,textColor:t,textColorDisabled:n,placeholderColor:g,placeholderColorDisabled:b,color:r,colorDisabled:a,colorActive:ne(l,{alpha:.1}),border:"1px solid #0000",borderHover:`1px solid ${i}`,borderActive:`1px solid ${l}`,borderFocus:`1px solid ${i}`,boxShadowHover:"none",boxShadowActive:`0 0 8px 0 ${ne(l,{alpha:.4})}`,boxShadowFocus:`0 0 8px 0 ${ne(l,{alpha:.4})}`,caretColor:l,arrowColor:p,arrowColorDisabled:h,loadingColor:l,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${c}`,borderActiveWarning:`1px solid ${s}`,borderFocusWarning:`1px solid ${c}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 8px 0 ${ne(s,{alpha:.4})}`,boxShadowFocusWarning:`0 0 8px 0 ${ne(s,{alpha:.4})}`,colorActiveWarning:ne(s,{alpha:.1}),caretColorWarning:s,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${u}`,borderActiveError:`1px solid ${d}`,borderFocusError:`1px solid ${u}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 8px 0 ${ne(d,{alpha:.4})}`,boxShadowFocusError:`0 0 8px 0 ${ne(d,{alpha:.4})}`,colorActiveError:ne(d,{alpha:.1}),caretColorError:d,clearColor:f,clearColorHover:v,clearColorPressed:m})}},Ls=xe([ge("base-selection","\n --n-padding-single: var(--n-padding-single-top) var(--n-padding-single-right) var(--n-padding-single-bottom) var(--n-padding-single-left);\n --n-padding-multiple: var(--n-padding-multiple-top) var(--n-padding-multiple-right) var(--n-padding-multiple-bottom) var(--n-padding-multiple-left);\n position: relative;\n z-index: auto;\n box-shadow: none;\n width: 100%;\n max-width: 100%;\n display: inline-block;\n vertical-align: bottom;\n border-radius: var(--n-border-radius);\n min-height: var(--n-height);\n line-height: 1.5;\n font-size: var(--n-font-size);\n ",[ge("base-loading","\n color: var(--n-loading-color);\n "),ge("base-selection-tags","min-height: var(--n-height);"),eo("border, state-border","\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n pointer-events: none;\n border: var(--n-border);\n border-radius: inherit;\n transition:\n box-shadow .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n "),eo("state-border","\n z-index: 1;\n border-color: #0000;\n "),ge("base-suffix","\n cursor: pointer;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: 10px;\n ",[eo("arrow","\n font-size: var(--n-arrow-size);\n color: var(--n-arrow-color);\n transition: color .3s var(--n-bezier);\n ")]),ge("base-selection-overlay","\n display: flex;\n align-items: center;\n white-space: nowrap;\n pointer-events: none;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n padding: var(--n-padding-single);\n transition: color .3s var(--n-bezier);\n ",[eo("wrapper","\n flex-basis: 0;\n flex-grow: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n ")]),ge("base-selection-placeholder","\n color: var(--n-placeholder-color);\n ",[eo("inner","\n max-width: 100%;\n overflow: hidden;\n ")]),ge("base-selection-tags","\n cursor: pointer;\n outline: none;\n box-sizing: border-box;\n position: relative;\n z-index: auto;\n display: flex;\n padding: var(--n-padding-multiple);\n flex-wrap: wrap;\n align-items: center;\n width: 100%;\n vertical-align: bottom;\n background-color: var(--n-color);\n border-radius: inherit;\n transition:\n color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n "),ge("base-selection-label","\n height: var(--n-height);\n display: inline-flex;\n width: 100%;\n vertical-align: bottom;\n cursor: pointer;\n outline: none;\n z-index: auto;\n box-sizing: border-box;\n position: relative;\n transition:\n color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n border-radius: inherit;\n background-color: var(--n-color);\n align-items: center;\n ",[ge("base-selection-input","\n font-size: inherit;\n line-height: inherit;\n outline: none;\n cursor: pointer;\n box-sizing: border-box;\n border:none;\n width: 100%;\n padding: var(--n-padding-single);\n background-color: #0000;\n color: var(--n-text-color);\n transition: color .3s var(--n-bezier);\n caret-color: var(--n-caret-color);\n ",[eo("content","\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap; \n ")]),eo("render-label","\n color: var(--n-text-color);\n ")]),le("disabled",[xe("&:hover",[eo("state-border","\n box-shadow: var(--n-box-shadow-hover);\n border: var(--n-border-hover);\n ")]),so("focus",[eo("state-border","\n box-shadow: var(--n-box-shadow-focus);\n border: var(--n-border-focus);\n ")]),so("active",[eo("state-border","\n box-shadow: var(--n-box-shadow-active);\n border: var(--n-border-active);\n "),ge("base-selection-label","background-color: var(--n-color-active);"),ge("base-selection-tags","background-color: var(--n-color-active);")])]),so("disabled","cursor: not-allowed;",[eo("arrow","\n color: var(--n-arrow-color-disabled);\n "),ge("base-selection-label","\n cursor: not-allowed;\n background-color: var(--n-color-disabled);\n ",[ge("base-selection-input","\n cursor: not-allowed;\n color: var(--n-text-color-disabled);\n "),eo("render-label","\n color: var(--n-text-color-disabled);\n ")]),ge("base-selection-tags","\n cursor: not-allowed;\n background-color: var(--n-color-disabled);\n "),ge("base-selection-placeholder","\n cursor: not-allowed;\n color: var(--n-placeholder-color-disabled);\n ")]),ge("base-selection-input-tag","\n height: calc(var(--n-height) - 6px);\n line-height: calc(var(--n-height) - 6px);\n outline: none;\n display: none;\n position: relative;\n margin-bottom: 3px;\n max-width: 100%;\n vertical-align: bottom;\n ",[eo("input","\n font-size: inherit;\n font-family: inherit;\n min-width: 1px;\n padding: 0;\n background-color: #0000;\n outline: none;\n border: none;\n max-width: 100%;\n overflow: hidden;\n width: 1em;\n line-height: inherit;\n cursor: pointer;\n color: var(--n-text-color);\n caret-color: var(--n-caret-color);\n "),eo("mirror","\n position: absolute;\n left: 0;\n top: 0;\n white-space: pre;\n visibility: hidden;\n user-select: none;\n -webkit-user-select: none;\n opacity: 0;\n ")]),["warning","error"].map(e=>so(`${e}-status`,[eo("state-border",`border: var(--n-border-${e});`),le("disabled",[xe("&:hover",[eo("state-border",`\n box-shadow: var(--n-box-shadow-hover-${e});\n border: var(--n-border-hover-${e});\n `)]),so("active",[eo("state-border",`\n box-shadow: var(--n-box-shadow-active-${e});\n border: var(--n-border-active-${e});\n `),ge("base-selection-label",`background-color: var(--n-color-active-${e});`),ge("base-selection-tags",`background-color: var(--n-color-active-${e});`)]),so("focus",[eo("state-border",`\n box-shadow: var(--n-box-shadow-focus-${e});\n border: var(--n-border-focus-${e});\n `)])])]))]),ge("base-selection-popover","\n margin-bottom: -3px;\n display: flex;\n flex-wrap: wrap;\n margin-right: -8px;\n "),ge("base-selection-tag-wrapper","\n max-width: 100%;\n display: inline-flex;\n padding: 0 7px 3px 0;\n ",[xe("&:last-child","padding-right: 0;"),ge("tag","\n font-size: 14px;\n max-width: 100%;\n ",[eo("content","\n line-height: 1.25;\n text-overflow: ellipsis;\n overflow: hidden;\n ")])])]),Hs=po({name:"InternalSelection",props:Object.assign(Object.assign({},P.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){const{mergedClsPrefixRef:o,mergedRtlRef:t}=be(e),n=g("InternalSelection",t,o),r=it(null),a=it(null),l=it(null),i=it(null),s=it(null),c=it(null),d=it(null),u=it(null),p=it(null),h=it(null),f=it(!1),v=it(!1),m=it(!1),b=P("InternalSelection","-internal-selection",Ls,cn,e,jo(e,"clsPrefix")),y=Do(()=>e.clearable&&!e.disabled&&(m.value||e.active)),x=Do(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):hn(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),C=Do(()=>{const o=e.selectedOption;if(o)return o[e.labelField]}),w=Do(()=>e.multiple?!(!Array.isArray(e.selectedOptions)||!e.selectedOptions.length):null!==e.selectedOption);function S(){var o;const{value:t}=r;if(t){const{value:n}=a;n&&(n.style.width=`${t.offsetWidth}px`,"responsive"!==e.maxTagCount&&(null===(o=p.value)||void 0===o||o.sync({showAllItemsBeforeCalculate:!1})))}}function k(o){const{onPatternInput:t}=e;t&&t(o)}function T(o){!function(o){const{onDeleteOption:t}=e;t&&t(o)}(o)}$o(jo(e,"active"),e=>{e||function(){const{value:e}=h;e&&(e.style.display="none")}()}),$o(jo(e,"pattern"),()=>{e.multiple&&yo(S)});const I=it(!1);let z=null;let M=null;function R(){null!==M&&window.clearTimeout(M)}$o(w,e=>{e||(f.value=!1)}),Ro(()=>{To(()=>{const o=c.value;o&&(e.disabled?o.removeAttribute("tabindex"):o.tabIndex=v.value?-1:0)})}),ca(l,e.onResize);const{inlineThemeDisabled:A}=e,F=Do(()=>{const{size:o}=e,{common:{cubicBezierEaseInOut:t},self:{fontWeight:n,borderRadius:r,color:a,placeholderColor:l,textColor:i,paddingSingle:s,paddingMultiple:c,caretColor:d,colorDisabled:u,textColorDisabled:p,placeholderColorDisabled:h,colorActive:f,boxShadowFocus:v,boxShadowActive:m,boxShadowHover:g,border:y,borderFocus:x,borderHover:C,borderActive:w,arrowColor:S,arrowColorDisabled:k,loadingColor:P,colorActiveWarning:T,boxShadowFocusWarning:I,boxShadowActiveWarning:z,boxShadowHoverWarning:M,borderWarning:R,borderFocusWarning:A,borderHoverWarning:F,borderActiveWarning:$,colorActiveError:O,boxShadowFocusError:B,boxShadowActiveError:E,boxShadowHoverError:_,borderError:D,borderFocusError:L,borderHoverError:H,borderActiveError:j,clearColor:U,clearColorHover:W,clearColorPressed:N,clearSize:K,arrowSize:V,[ao("height",o)]:q,[ao("fontSize",o)]:G}}=b.value,Y=ue(s),J=ue(c);return{"--n-bezier":t,"--n-border":y,"--n-border-active":w,"--n-border-focus":x,"--n-border-hover":C,"--n-border-radius":r,"--n-box-shadow-active":m,"--n-box-shadow-focus":v,"--n-box-shadow-hover":g,"--n-caret-color":d,"--n-color":a,"--n-color-active":f,"--n-color-disabled":u,"--n-font-size":G,"--n-height":q,"--n-padding-single-top":Y.top,"--n-padding-multiple-top":J.top,"--n-padding-single-right":Y.right,"--n-padding-multiple-right":J.right,"--n-padding-single-left":Y.left,"--n-padding-multiple-left":J.left,"--n-padding-single-bottom":Y.bottom,"--n-padding-multiple-bottom":J.bottom,"--n-placeholder-color":l,"--n-placeholder-color-disabled":h,"--n-text-color":i,"--n-text-color-disabled":p,"--n-arrow-color":S,"--n-arrow-color-disabled":k,"--n-loading-color":P,"--n-color-active-warning":T,"--n-box-shadow-focus-warning":I,"--n-box-shadow-active-warning":z,"--n-box-shadow-hover-warning":M,"--n-border-warning":R,"--n-border-focus-warning":A,"--n-border-hover-warning":F,"--n-border-active-warning":$,"--n-color-active-error":O,"--n-box-shadow-focus-error":B,"--n-box-shadow-active-error":E,"--n-box-shadow-hover-error":_,"--n-border-error":D,"--n-border-focus-error":L,"--n-border-hover-error":H,"--n-border-active-error":j,"--n-clear-size":K,"--n-clear-color":U,"--n-clear-color-hover":W,"--n-clear-color-pressed":N,"--n-arrow-size":V,"--n-font-weight":n}}),$=A?Ce("internal-selection",Do(()=>e.size[0]),F,e):void 0;return{mergedTheme:b,mergedClearable:y,mergedClsPrefix:o,rtlEnabled:n,patternInputFocused:v,filterablePlaceholder:x,label:C,selected:w,showTagsPanel:f,isComposing:I,counterRef:d,counterWrapperRef:u,patternInputMirrorRef:r,patternInputRef:a,selfRef:l,multipleElRef:i,singleElRef:s,patternInputWrapperRef:c,overflowRef:p,inputTagElRef:h,handleMouseDown:function(o){e.active&&e.filterable&&o.target!==a.value&&o.preventDefault()},handleFocusin:function(o){var t;o.relatedTarget&&(null===(t=l.value)||void 0===t?void 0:t.contains(o.relatedTarget))||function(o){const{onFocus:t}=e;t&&t(o)}(o)},handleClear:function(o){!function(o){const{onClear:t}=e;t&&t(o)}(o)},handleMouseEnter:function(){m.value=!0},handleMouseLeave:function(){m.value=!1},handleDeleteOption:T,handlePatternKeyDown:function(o){if("Backspace"===o.key&&!I.value&&!e.pattern.length){const{selectedOptions:o}=e;(null==o?void 0:o.length)&&T(o[o.length-1])}},handlePatternInputInput:function(o){const{value:t}=r;t&&(t.textContent=o.target.value,S()),e.ignoreComposition&&I.value?z=o:k(o)},handlePatternInputBlur:function(o){var t;v.value=!1,null===(t=e.onPatternBlur)||void 0===t||t.call(e,o)},handlePatternInputFocus:function(o){var t;v.value=!0,null===(t=e.onPatternFocus)||void 0===t||t.call(e,o)},handleMouseEnterCounter:function(){e.active||(R(),M=window.setTimeout(()=>{w.value&&(f.value=!0)},100))},handleMouseLeaveCounter:function(){R()},handleFocusout:function(o){var t;(null===(t=l.value)||void 0===t?void 0:t.contains(o.relatedTarget))||function(o){const{onBlur:t}=e;t&&t(o)}(o)},handleCompositionEnd:function(){I.value=!1,e.ignoreComposition&&k(z),z=null},handleCompositionStart:function(){I.value=!0},onPopoverUpdateShow:function(e){e||(R(),f.value=!1)},focus:function(){var o,t,n;e.filterable?(v.value=!1,null===(o=c.value)||void 0===o||o.focus()):e.multiple?null===(t=i.value)||void 0===t||t.focus():null===(n=s.value)||void 0===n||n.focus()},focusInput:function(){const{value:e}=a;e&&(!function(){const{value:e}=h;e&&(e.style.display="inline-block")}(),e.focus())},blur:function(){var o,t;if(e.filterable)v.value=!1,null===(o=c.value)||void 0===o||o.blur(),null===(t=a.value)||void 0===t||t.blur();else if(e.multiple){const{value:e}=i;null==e||e.blur()}else{const{value:e}=s;null==e||e.blur()}},blurInput:function(){const{value:e}=a;e&&e.blur()},updateCounter:function(e){const{value:o}=d;o&&o.setTextContent(`+${e}`)},getCounter:function(){const{value:e}=u;return e},getTail:function(){return a.value},renderLabel:e.renderLabel,cssVars:A?void 0:F,themeClass:null==$?void 0:$.themeClass,onRender:null==$?void 0:$.onRender}},render(){const{status:e,multiple:o,size:t,disabled:n,filterable:r,maxTagCount:a,bordered:l,clsPrefix:i,ellipsisTagPopoverProps:s,onRender:c,renderTag:d,renderLabel:u}=this;null==c||c();const p="responsive"===a,h="number"==typeof a,f=p||h,v=So(oo,null,{default:()=>So(_s,{clsPrefix:i,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var e,o;return null===(o=(e=this.$slots).arrow)||void 0===o?void 0:o.call(e)}})});let m;if(o){const{labelField:e}=this,o=o=>So("div",{class:`${i}-base-selection-tag-wrapper`,key:o.value},d?d({option:o,handleClose:()=>{this.handleDeleteOption(o)}}):So(Es,{size:t,closable:!o.disabled,disabled:n,onClose:()=>{this.handleDeleteOption(o)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>u?u(o,!0):hn(o[e],o,!0)})),l=()=>(h?this.selectedOptions.slice(0,a):this.selectedOptions).map(o),c=r?So("div",{class:`${i}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},So("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:n,value:this.pattern,autofocus:this.autofocus,class:`${i}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),So("span",{ref:"patternInputMirrorRef",class:`${i}-base-selection-input-tag__mirror`},this.pattern)):null,g=p?()=>So("div",{class:`${i}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},So(Es,{size:t,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:n})):void 0;let b;if(h){const e=this.selectedOptions.length-a;e>0&&(b=So("div",{class:`${i}-base-selection-tag-wrapper`,key:"__counter__"},So(Es,{size:t,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:n},{default:()=>`+${e}`})))}const y=p?r?So(sa,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:l,counter:g,tail:()=>c}):So(sa,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:l,counter:g}):h&&b?l().concat(b):l(),x=f?()=>So("div",{class:`${i}-base-selection-popover`},p?l():this.selectedOptions.map(o)):void 0,C=f?Object.assign({show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},s):null,w=this.selected||this.active&&(this.pattern||this.isComposing)?null:So("div",{class:`${i}-base-selection-placeholder ${i}-base-selection-overlay`},So("div",{class:`${i}-base-selection-placeholder__inner`},this.placeholder)),S=r?So("div",{ref:"patternInputWrapperRef",class:`${i}-base-selection-tags`},y,p?null:c,v):So("div",{ref:"multipleElRef",class:`${i}-base-selection-tags`,tabindex:n?void 0:0},y,v);m=So(No,null,f?So(Rs,Object.assign({},C,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>S,default:x}):S,w)}else if(r){const e=this.pattern||this.isComposing,o=this.active?!e:!this.selected,t=!this.active&&this.selected;m=So("div",{ref:"patternInputWrapperRef",class:`${i}-base-selection-label`,title:this.patternInputFocused?void 0:da(this.label)},So("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${i}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:n,disabled:n,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),t?So("div",{class:`${i}-base-selection-label__render-label ${i}-base-selection-overlay`,key:"input"},So("div",{class:`${i}-base-selection-overlay__wrapper`},d?d({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):hn(this.label,this.selectedOption,!0))):null,o?So("div",{class:`${i}-base-selection-placeholder ${i}-base-selection-overlay`,key:"placeholder"},So("div",{class:`${i}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,v)}else m=So("div",{ref:"singleElRef",class:`${i}-base-selection-label`,tabindex:this.disabled?void 0:0},void 0!==this.label?So("div",{class:`${i}-base-selection-input`,title:da(this.label),key:"input"},So("div",{class:`${i}-base-selection-input__content`},d?d({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):hn(this.label,this.selectedOption,!0))):So("div",{class:`${i}-base-selection-placeholder ${i}-base-selection-overlay`,key:"placeholder"},So("div",{class:`${i}-base-selection-placeholder__inner`},this.placeholder)),v);return So("div",{ref:"selfRef",class:[`${i}-base-selection`,this.rtlEnabled&&`${i}-base-selection--rtl`,this.themeClass,e&&`${i}-base-selection--${e}-status`,{[`${i}-base-selection--active`]:this.active,[`${i}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${i}-base-selection--disabled`]:this.disabled,[`${i}-base-selection--multiple`]:this.multiple,[`${i}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},m,l?So("div",{class:`${i}-base-selection__border`}):null,l?So("div",{class:`${i}-base-selection__state-border`}):null)}}),js={iconMargin:"11px 8px 0 12px",iconMarginRtl:"11px 12px 0 8px",iconSize:"24px",closeIconSize:"16px",closeSize:"20px",closeMargin:"13px 14px 0 0",closeMarginRtl:"13px 0 0 14px",padding:"13px"},Us={name:"Alert",common:_i,self(e){const{lineHeight:o,borderRadius:t,fontWeightStrong:n,dividerColor:r,inputColor:a,textColor1:l,textColor2:i,closeColorHover:s,closeColorPressed:c,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,infoColorSuppl:h,successColorSuppl:f,warningColorSuppl:v,errorColorSuppl:m,fontSize:g}=e;return Object.assign(Object.assign({},js),{fontSize:g,lineHeight:o,titleFontWeight:n,borderRadius:t,border:`1px solid ${r}`,color:a,titleTextColor:l,iconColor:i,contentTextColor:i,closeBorderRadius:t,closeColorHover:s,closeColorPressed:c,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,borderInfo:`1px solid ${ne(h,{alpha:.35})}`,colorInfo:ne(h,{alpha:.25}),titleTextColorInfo:l,iconColorInfo:h,contentTextColorInfo:i,closeColorHoverInfo:s,closeColorPressedInfo:c,closeIconColorInfo:d,closeIconColorHoverInfo:u,closeIconColorPressedInfo:p,borderSuccess:`1px solid ${ne(f,{alpha:.35})}`,colorSuccess:ne(f,{alpha:.25}),titleTextColorSuccess:l,iconColorSuccess:f,contentTextColorSuccess:i,closeColorHoverSuccess:s,closeColorPressedSuccess:c,closeIconColorSuccess:d,closeIconColorHoverSuccess:u,closeIconColorPressedSuccess:p,borderWarning:`1px solid ${ne(v,{alpha:.35})}`,colorWarning:ne(v,{alpha:.25}),titleTextColorWarning:l,iconColorWarning:v,contentTextColorWarning:i,closeColorHoverWarning:s,closeColorPressedWarning:c,closeIconColorWarning:d,closeIconColorHoverWarning:u,closeIconColorPressedWarning:p,borderError:`1px solid ${ne(m,{alpha:.35})}`,colorError:ne(m,{alpha:.25}),titleTextColorError:l,iconColorError:m,contentTextColorError:i,closeColorHoverError:s,closeColorPressedError:c,closeIconColorError:d,closeIconColorHoverError:u,closeIconColorPressedError:p})}};var Ws={name:"Alert",common:l,self:function(e){const{lineHeight:o,borderRadius:t,fontWeightStrong:n,baseColor:r,dividerColor:a,actionColor:l,textColor1:i,textColor2:s,closeColorHover:c,closeColorPressed:d,closeIconColor:u,closeIconColorHover:p,closeIconColorPressed:h,infoColor:f,successColor:v,warningColor:m,errorColor:g,fontSize:b}=e;return Object.assign(Object.assign({},js),{fontSize:b,lineHeight:o,titleFontWeight:n,borderRadius:t,border:`1px solid ${a}`,color:l,titleTextColor:i,iconColor:s,contentTextColor:s,closeBorderRadius:t,closeColorHover:c,closeColorPressed:d,closeIconColor:u,closeIconColorHover:p,closeIconColorPressed:h,borderInfo:`1px solid ${Be(r,ne(f,{alpha:.25}))}`,colorInfo:Be(r,ne(f,{alpha:.08})),titleTextColorInfo:i,iconColorInfo:f,contentTextColorInfo:s,closeColorHoverInfo:c,closeColorPressedInfo:d,closeIconColorInfo:u,closeIconColorHoverInfo:p,closeIconColorPressedInfo:h,borderSuccess:`1px solid ${Be(r,ne(v,{alpha:.25}))}`,colorSuccess:Be(r,ne(v,{alpha:.08})),titleTextColorSuccess:i,iconColorSuccess:v,contentTextColorSuccess:s,closeColorHoverSuccess:c,closeColorPressedSuccess:d,closeIconColorSuccess:u,closeIconColorHoverSuccess:p,closeIconColorPressedSuccess:h,borderWarning:`1px solid ${Be(r,ne(m,{alpha:.33}))}`,colorWarning:Be(r,ne(m,{alpha:.08})),titleTextColorWarning:i,iconColorWarning:m,contentTextColorWarning:s,closeColorHoverWarning:c,closeColorPressedWarning:d,closeIconColorWarning:u,closeIconColorHoverWarning:p,closeIconColorPressedWarning:h,borderError:`1px solid ${Be(r,ne(g,{alpha:.25}))}`,colorError:Be(r,ne(g,{alpha:.08})),titleTextColorError:i,iconColorError:g,contentTextColorError:s,closeColorHoverError:c,closeColorPressedError:d,closeIconColorError:u,closeIconColorHoverError:p,closeIconColorPressedError:h})}},{cubicBezierEaseInOut:Ns,cubicBezierEaseOut:Ks,cubicBezierEaseIn:Vs}=p;function qs({overflow:e="hidden",duration:o=".3s",originalTransition:t="",leavingDelay:n="0s",foldPadding:r=!1,enterToProps:a,leaveToProps:l,reverse:i=!1}={}){const s=i?"leave":"enter",c=i?"enter":"leave";return[xe(`&.fade-in-height-expand-transition-${c}-from,\n &.fade-in-height-expand-transition-${s}-to`,Object.assign(Object.assign({},a),{opacity:1})),xe(`&.fade-in-height-expand-transition-${c}-to,\n &.fade-in-height-expand-transition-${s}-from`,Object.assign(Object.assign({},l),{opacity:0,marginTop:"0 !important",marginBottom:"0 !important",paddingTop:r?"0 !important":void 0,paddingBottom:r?"0 !important":void 0})),xe(`&.fade-in-height-expand-transition-${c}-active`,`\n overflow: ${e};\n transition:\n max-height ${o} ${Ns} ${n},\n opacity ${o} ${Ks} ${n},\n margin-top ${o} ${Ns} ${n},\n margin-bottom ${o} ${Ns} ${n},\n padding-top ${o} ${Ns} ${n},\n padding-bottom ${o} ${Ns} ${n}\n ${t?`,${t}`:""}\n `),xe(`&.fade-in-height-expand-transition-${s}-active`,`\n overflow: ${e};\n transition:\n max-height ${o} ${Ns},\n opacity ${o} ${Vs},\n margin-top ${o} ${Ns},\n margin-bottom ${o} ${Ns},\n padding-top ${o} ${Ns},\n padding-bottom ${o} ${Ns}\n ${t?`,${t}`:""}\n `)]}var Gs=ge("alert","\n line-height: var(--n-line-height);\n border-radius: var(--n-border-radius);\n position: relative;\n transition: background-color .3s var(--n-bezier);\n background-color: var(--n-color);\n text-align: start;\n word-break: break-word;\n",[eo("border","\n border-radius: inherit;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n transition: border-color .3s var(--n-bezier);\n border: var(--n-border);\n pointer-events: none;\n "),so("closable",[ge("alert-body",[eo("title","\n padding-right: 24px;\n ")])]),eo("icon",{color:"var(--n-icon-color)"}),ge("alert-body",{padding:"var(--n-padding)"},[eo("title",{color:"var(--n-title-text-color)"}),eo("content",{color:"var(--n-content-text-color)"})]),qs({originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.9)"}}),eo("icon","\n position: absolute;\n left: 0;\n top: 0;\n align-items: center;\n justify-content: center;\n display: flex;\n width: var(--n-icon-size);\n height: var(--n-icon-size);\n font-size: var(--n-icon-size);\n margin: var(--n-icon-margin);\n "),eo("close","\n transition:\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n position: absolute;\n right: 0;\n top: 0;\n margin: var(--n-close-margin);\n "),so("show-icon",[ge("alert-body",{paddingLeft:"calc(var(--n-icon-margin-left) + var(--n-icon-size) + var(--n-icon-margin-right))"})]),so("right-adjust",[ge("alert-body",{paddingRight:"calc(var(--n-close-size) + var(--n-padding) + 2px)"})]),ge("alert-body","\n border-radius: var(--n-border-radius);\n transition: border-color .3s var(--n-bezier);\n ",[eo("title","\n transition: color .3s var(--n-bezier);\n font-size: 16px;\n line-height: 19px;\n font-weight: var(--n-title-font-weight);\n ",[xe("& +",[eo("content",{marginTop:"9px"})])]),eo("content",{transition:"color .3s var(--n-bezier)",fontSize:"var(--n-font-size)"})]),eo("icon",{transition:"color .3s var(--n-bezier)"})]),Ys=po({name:"Alert",inheritAttrs:!1,props:Object.assign(Object.assign({},P.props),{title:String,showIcon:{type:Boolean,default:!0},type:{type:String,default:"default"},bordered:{type:Boolean,default:!0},closable:Boolean,onClose:Function,onAfterLeave:Function,onAfterHide:Function}),slots:Object,setup(e){const{mergedClsPrefixRef:o,mergedBorderedRef:t,inlineThemeDisabled:n,mergedRtlRef:r}=be(e),a=P("Alert","-alert",Gs,Ws,e,o),l=g("Alert",r,o),i=Do(()=>{const{common:{cubicBezierEaseInOut:o},self:t}=a.value,{fontSize:n,borderRadius:r,titleFontWeight:l,lineHeight:i,iconSize:s,iconMargin:c,iconMarginRtl:d,closeIconSize:u,closeBorderRadius:p,closeSize:h,closeMargin:f,closeMarginRtl:v,padding:m}=t,{type:g}=e,{left:b,right:y}=ue(c);return{"--n-bezier":o,"--n-color":t[ao("color",g)],"--n-close-icon-size":u,"--n-close-border-radius":p,"--n-close-color-hover":t[ao("closeColorHover",g)],"--n-close-color-pressed":t[ao("closeColorPressed",g)],"--n-close-icon-color":t[ao("closeIconColor",g)],"--n-close-icon-color-hover":t[ao("closeIconColorHover",g)],"--n-close-icon-color-pressed":t[ao("closeIconColorPressed",g)],"--n-icon-color":t[ao("iconColor",g)],"--n-border":t[ao("border",g)],"--n-title-text-color":t[ao("titleTextColor",g)],"--n-content-text-color":t[ao("contentTextColor",g)],"--n-line-height":i,"--n-border-radius":r,"--n-font-size":n,"--n-title-font-weight":l,"--n-icon-size":s,"--n-icon-margin":c,"--n-icon-margin-rtl":d,"--n-close-size":h,"--n-close-margin":f,"--n-close-margin-rtl":v,"--n-padding":m,"--n-icon-margin-left":b,"--n-icon-margin-right":y}}),s=n?Ce("alert",Do(()=>e.type[0]),i,e):void 0,c=it(!0);return{rtlEnabled:l,mergedClsPrefix:o,mergedBordered:t,visible:c,handleCloseClick:()=>{var o;Promise.resolve(null===(o=e.onClose)||void 0===o?void 0:o.call(e)).then(e=>{!1!==e&&(c.value=!1)})},handleAfterLeave:()=>{(()=>{const{onAfterLeave:o,onAfterHide:t}=e;o&&o(),t&&t()})()},mergedTheme:a,cssVars:n?void 0:i,themeClass:null==s?void 0:s.themeClass,onRender:null==s?void 0:s.onRender}},render(){var e;return null===(e=this.onRender)||void 0===e||e.call(this),So(u,{onAfterLeave:this.handleAfterLeave},{default:()=>{const{mergedClsPrefix:e,$slots:o}=this,t={class:[`${e}-alert`,this.themeClass,this.closable&&`${e}-alert--closable`,this.showIcon&&`${e}-alert--show-icon`,!this.title&&this.closable&&`${e}-alert--right-adjust`,this.rtlEnabled&&`${e}-alert--rtl`],style:this.cssVars,role:"alert"};return this.visible?So("div",Object.assign({},mo(this.$attrs,t)),this.closable&&So(c,{clsPrefix:e,class:`${e}-alert__close`,onClick:this.handleCloseClick}),this.bordered&&So("div",{class:`${e}-alert__border`}),this.showIcon&&So("div",{class:`${e}-alert__icon`,"aria-hidden":"true"},lo(o.icon,()=>[So(ke,{clsPrefix:e},{default:()=>{switch(this.type){case"success":return So(On,null);case"info":return So(Bn,null);case"warning":return So(Gn,null);case"error":return So(En,null);default:return null}}})])),So("div",{class:[`${e}-alert-body`,this.mergedBordered&&`${e}-alert-body--bordered`]},s(o.header,o=>{const t=o||this.title;return t?So("div",{class:`${e}-alert-body__title`},t):null}),o.default&&So("div",{class:`${e}-alert-body__content`},o))):null}})}}),Js={linkFontSize:"13px",linkPadding:"0 0 0 16px",railWidth:"4px"};function Xs(e){const{borderRadius:o,railColor:t,primaryColor:n,primaryColorHover:r,primaryColorPressed:a,textColor2:l}=e;return Object.assign(Object.assign({},Js),{borderRadius:o,railColor:t,railColorActive:n,linkColor:ne(n,{alpha:.15}),linkTextColor:l,linkTextColorHover:r,linkTextColorPressed:a,linkTextColorActive:n})}var Zs={name:"Anchor",common:l,self:Xs},Qs={name:"Anchor",common:_i,self:Xs};var ec=S({name:"Input",common:_i,peers:{Scrollbar:Di},self:function(e){const{textColor2:o,textColor3:t,textColorDisabled:n,primaryColor:r,primaryColorHover:a,inputColor:l,inputColorDisabled:i,warningColor:s,warningColorHover:c,errorColor:d,errorColorHover:u,borderRadius:p,lineHeight:h,fontSizeTiny:f,fontSizeSmall:v,fontSizeMedium:m,fontSizeLarge:g,heightTiny:b,heightSmall:y,heightMedium:x,heightLarge:C,clearColor:w,clearColorHover:S,clearColorPressed:k,placeholderColor:P,placeholderColorDisabled:T,iconColor:I,iconColorDisabled:z,iconColorHover:M,iconColorPressed:R,fontWeight:A}=e;return Object.assign(Object.assign({},Cn),{fontWeight:A,countTextColorDisabled:n,countTextColor:t,heightTiny:b,heightSmall:y,heightMedium:x,heightLarge:C,fontSizeTiny:f,fontSizeSmall:v,fontSizeMedium:m,fontSizeLarge:g,lineHeight:h,lineHeightTextarea:h,borderRadius:p,iconSize:"16px",groupLabelColor:l,textColor:o,textColorDisabled:n,textDecorationColor:o,groupLabelTextColor:o,caretColor:r,placeholderColor:P,placeholderColorDisabled:T,color:l,colorDisabled:i,colorFocus:ne(r,{alpha:.1}),groupLabelBorder:"1px solid #0000",border:"1px solid #0000",borderHover:`1px solid ${a}`,borderDisabled:"1px solid #0000",borderFocus:`1px solid ${a}`,boxShadowFocus:`0 0 8px 0 ${ne(r,{alpha:.3})}`,loadingColor:r,loadingColorWarning:s,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${c}`,colorFocusWarning:ne(s,{alpha:.1}),borderFocusWarning:`1px solid ${c}`,boxShadowFocusWarning:`0 0 8px 0 ${ne(s,{alpha:.3})}`,caretColorWarning:s,loadingColorError:d,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${u}`,colorFocusError:ne(d,{alpha:.1}),borderFocusError:`1px solid ${u}`,boxShadowFocusError:`0 0 8px 0 ${ne(d,{alpha:.3})}`,caretColorError:d,clearColor:w,clearColorHover:S,clearColorPressed:k,iconColor:I,iconColorDisabled:z,iconColorHover:M,iconColorPressed:R,suffixTextColor:o})}}),oc=J("n-input"),tc=ge("input","\n max-width: 100%;\n cursor: text;\n line-height: 1.5;\n z-index: auto;\n outline: none;\n box-sizing: border-box;\n position: relative;\n display: inline-flex;\n border-radius: var(--n-border-radius);\n background-color: var(--n-color);\n transition: background-color .3s var(--n-bezier);\n font-size: var(--n-font-size);\n font-weight: var(--n-font-weight);\n --n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2);\n",[eo("input, textarea","\n overflow: hidden;\n flex-grow: 1;\n position: relative;\n "),eo("input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder","\n box-sizing: border-box;\n font-size: inherit;\n line-height: 1.5;\n font-family: inherit;\n border: none;\n outline: none;\n background-color: #0000;\n text-align: inherit;\n transition:\n -webkit-text-fill-color .3s var(--n-bezier),\n caret-color .3s var(--n-bezier),\n color .3s var(--n-bezier),\n text-decoration-color .3s var(--n-bezier);\n "),eo("input-el, textarea-el","\n -webkit-appearance: none;\n scrollbar-width: none;\n width: 100%;\n min-width: 0;\n text-decoration-color: var(--n-text-decoration-color);\n color: var(--n-text-color);\n caret-color: var(--n-caret-color);\n background-color: transparent;\n ",[xe("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb","\n width: 0;\n height: 0;\n display: none;\n "),xe("&::placeholder","\n color: #0000;\n -webkit-text-fill-color: transparent !important;\n "),xe("&:-webkit-autofill ~",[eo("placeholder","display: none;")])]),so("round",[le("textarea","border-radius: calc(var(--n-height) / 2);")]),eo("placeholder","\n pointer-events: none;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n overflow: hidden;\n color: var(--n-placeholder-color);\n ",[xe("span","\n width: 100%;\n display: inline-block;\n ")]),so("textarea",[eo("placeholder","overflow: visible;")]),le("autosize","width: 100%;"),so("autosize",[eo("textarea-el, input-el","\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n ")]),ge("input-wrapper","\n overflow: hidden;\n display: inline-flex;\n flex-grow: 1;\n position: relative;\n padding-left: var(--n-padding-left);\n padding-right: var(--n-padding-right);\n "),eo("input-mirror","\n padding: 0;\n height: var(--n-height);\n line-height: var(--n-height);\n overflow: hidden;\n visibility: hidden;\n position: static;\n white-space: pre;\n pointer-events: none;\n "),eo("input-el","\n padding: 0;\n height: var(--n-height);\n line-height: var(--n-height);\n ",[xe("&[type=password]::-ms-reveal","display: none;"),xe("+",[eo("placeholder","\n display: flex;\n align-items: center; \n ")])]),le("textarea",[eo("placeholder","white-space: nowrap;")]),eo("eye","\n display: flex;\n align-items: center;\n justify-content: center;\n transition: color .3s var(--n-bezier);\n "),so("textarea","width: 100%;",[ge("input-word-count","\n position: absolute;\n right: var(--n-padding-right);\n bottom: var(--n-padding-vertical);\n "),so("resizable",[ge("input-wrapper","\n resize: vertical;\n min-height: var(--n-height);\n ")]),eo("textarea-el, textarea-mirror, placeholder","\n height: 100%;\n padding-left: 0;\n padding-right: 0;\n padding-top: var(--n-padding-vertical);\n padding-bottom: var(--n-padding-vertical);\n word-break: break-word;\n display: inline-block;\n vertical-align: bottom;\n box-sizing: border-box;\n line-height: var(--n-line-height-textarea);\n margin: 0;\n resize: none;\n white-space: pre-wrap;\n scroll-padding-block-end: var(--n-padding-vertical);\n "),eo("textarea-mirror","\n width: 100%;\n pointer-events: none;\n overflow: hidden;\n visibility: hidden;\n position: static;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n ")]),so("pair",[eo("input-el, placeholder","text-align: center;"),eo("separator","\n display: flex;\n align-items: center;\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n white-space: nowrap;\n ",[ge("icon","\n color: var(--n-icon-color);\n "),ge("base-icon","\n color: var(--n-icon-color);\n ")])]),so("disabled","\n cursor: not-allowed;\n background-color: var(--n-color-disabled);\n ",[eo("border","border: var(--n-border-disabled);"),eo("input-el, textarea-el","\n cursor: not-allowed;\n color: var(--n-text-color-disabled);\n text-decoration-color: var(--n-text-color-disabled);\n "),eo("placeholder","color: var(--n-placeholder-color-disabled);"),eo("separator","color: var(--n-text-color-disabled);",[ge("icon","\n color: var(--n-icon-color-disabled);\n "),ge("base-icon","\n color: var(--n-icon-color-disabled);\n ")]),ge("input-word-count","\n color: var(--n-count-text-color-disabled);\n "),eo("suffix, prefix","color: var(--n-text-color-disabled);",[ge("icon","\n color: var(--n-icon-color-disabled);\n "),ge("internal-icon","\n color: var(--n-icon-color-disabled);\n ")])]),le("disabled",[eo("eye","\n color: var(--n-icon-color);\n cursor: pointer;\n ",[xe("&:hover","\n color: var(--n-icon-color-hover);\n "),xe("&:active","\n color: var(--n-icon-color-pressed);\n ")]),xe("&:hover",[eo("state-border","border: var(--n-border-hover);")]),so("focus","background-color: var(--n-color-focus);",[eo("state-border","\n border: var(--n-border-focus);\n box-shadow: var(--n-box-shadow-focus);\n ")])]),eo("border, state-border","\n box-sizing: border-box;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n pointer-events: none;\n border-radius: inherit;\n border: var(--n-border);\n transition:\n box-shadow .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n "),eo("state-border","\n border-color: #0000;\n z-index: 1;\n "),eo("prefix","margin-right: 4px;"),eo("suffix","\n margin-left: 4px;\n "),eo("suffix, prefix","\n transition: color .3s var(--n-bezier);\n flex-wrap: nowrap;\n flex-shrink: 0;\n line-height: var(--n-height);\n white-space: nowrap;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: var(--n-suffix-text-color);\n ",[ge("base-loading","\n font-size: var(--n-icon-size);\n margin: 0 2px;\n color: var(--n-loading-color);\n "),ge("base-clear","\n font-size: var(--n-icon-size);\n ",[eo("placeholder",[ge("base-icon","\n transition: color .3s var(--n-bezier);\n color: var(--n-icon-color);\n font-size: var(--n-icon-size);\n ")])]),xe(">",[ge("icon","\n transition: color .3s var(--n-bezier);\n color: var(--n-icon-color);\n font-size: var(--n-icon-size);\n ")]),ge("base-icon","\n font-size: var(--n-icon-size);\n ")]),ge("input-word-count","\n pointer-events: none;\n line-height: 1.5;\n font-size: .85em;\n color: var(--n-count-text-color);\n transition: color .3s var(--n-bezier);\n margin-left: 4px;\n font-variant: tabular-nums;\n "),["warning","error"].map(e=>so(`${e}-status`,[le("disabled",[ge("base-loading",`\n color: var(--n-loading-color-${e})\n `),eo("input-el, textarea-el",`\n caret-color: var(--n-caret-color-${e});\n `),eo("state-border",`\n border: var(--n-border-${e});\n `),xe("&:hover",[eo("state-border",`\n border: var(--n-border-hover-${e});\n `)]),xe("&:focus",`\n background-color: var(--n-color-focus-${e});\n `,[eo("state-border",`\n box-shadow: var(--n-box-shadow-focus-${e});\n border: var(--n-border-focus-${e});\n `)]),so("focus",`\n background-color: var(--n-color-focus-${e});\n `,[eo("state-border",`\n box-shadow: var(--n-box-shadow-focus-${e});\n border: var(--n-border-focus-${e});\n `)])])]))]),nc=ge("input",[so("disabled",[eo("input-el, textarea-el","\n -webkit-text-fill-color: var(--n-text-color-disabled);\n ")])]);function rc(e){let o=0;for(const t of e)o++;return o}function ac(e){return""===e||null==e}var lc=po({name:"InputWordCount",setup(e,{slots:o}){const{mergedValueRef:t,maxlengthRef:n,mergedClsPrefixRef:r,countGraphemesRef:a}=ko(oc),l=Do(()=>{const{value:e}=t;return null===e||Array.isArray(e)?0:(a.value||rc)(e)});return()=>{const{value:e}=n,{value:a}=t;return So("span",{class:`${r.value}-input-word-count`},_(o.default,{value:null===a||Array.isArray(a)?"":a},()=>[void 0===e?l.value:`${l.value} / ${e}`]))}}}),ic=po({name:"Input",props:Object.assign(Object.assign({},P.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),slots:Object,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:r,mergedRtlRef:a}=be(e),l=P("Input","-input",tc,bn,e,t);fe&&M("-input-safari",nc,t);const i=it(null),s=it(null),c=it(null),d=it(null),u=it(null),p=it(null),h=it(null),f=function(e){const o=it(null);function t(){o.value=null}return $o(e,t),{recordCursor:function(){const{value:n}=e;if(!(null==n?void 0:n.focus))return void t();const{selectionStart:r,selectionEnd:a,value:l}=n;null!=r&&null!=a?o.value={start:r,end:a,beforeText:l.slice(0,r),afterText:l.slice(a)}:t()},restoreCursor:function(){var t;const{value:n}=o,{value:r}=e;if(!n||!r)return;const{value:a}=r,{start:l,beforeText:i,afterText:s}=n;let c=a.length;if(a.endsWith(s))c=a.length-s.length;else if(a.startsWith(i))c=i.length;else{const e=i[l-1],o=a.indexOf(e,l-1);-1!==o&&(c=o+1)}null===(t=r.setSelectionRange)||void 0===t||t.call(r,c,c)}}}(h),v=it(null),{localeRef:m}=C("Input"),b=it(e.defaultValue),y=jo(e,"value"),x=F(y,b),w=Re(e),{mergedSizeRef:S,mergedDisabledRef:k,mergedStatusRef:T}=w,I=it(!1),z=it(!1),R=it(!1),A=it(!1);let $=null;const O=Do(()=>{const{placeholder:o,pair:t}=e;return t?Array.isArray(o)?o:void 0===o?["",""]:[o,o]:void 0===o?[m.value.placeholder]:[o]}),B=Do(()=>{const{value:e}=R,{value:o}=x,{value:t}=O;return!e&&(ac(o)||Array.isArray(o)&&ac(o[0]))&&t[0]}),E=Do(()=>{const{value:e}=R,{value:o}=x,{value:t}=O;return!e&&t[1]&&(ac(o)||Array.isArray(o)&&ac(o[1]))}),_=o(()=>e.internalForceFocus||I.value),D=o(()=>{if(k.value||e.readonly||!e.clearable||!_.value&&!z.value)return!1;const{value:o}=x,{value:t}=_;return e.pair?!(!Array.isArray(o)||!o[0]&&!o[1])&&(z.value||t):!!o&&(z.value||t)}),L=Do(()=>{const{showPasswordOn:o}=e;return o||(e.showPasswordToggle?"click":void 0)}),j=it(!1),U=Do(()=>{const{textDecoration:o}=e;return o?Array.isArray(o)?o.map(e=>({textDecoration:e})):[{textDecoration:o}]:["",""]}),W=it(void 0),N=Do(()=>{const{maxlength:o}=e;return void 0===o?void 0:Number(o)});Ro(()=>{const{value:e}=x;Array.isArray(e)||Q(e)});const K=Yo().proxy;function V(o,t){const{onUpdateValue:n,"onUpdate:value":r,onInput:a}=e,{nTriggerFormInput:l}=w;n&&H(n,o,t),r&&H(r,o,t),a&&H(a,o,t),b.value=o,l()}function q(o,t){const{onChange:n}=e,{nTriggerFormChange:r}=w;n&&H(n,o,t),b.value=o,r()}function G(o,t=0,n="input"){const r=o.target.value;if(Q(r),o instanceof InputEvent&&!o.isComposing&&(R.value=!1),"textarea"===e.type){const{value:e}=v;e&&e.syncUnifiedContainer()}if($=r,R.value)return;f.recordCursor();const a=function(o){const{countGraphemes:t,maxlength:n,minlength:r}=e;if(t){let e;if(void 0!==n&&(void 0===e&&(e=t(o)),e>Number(n)))return!1;if(void 0!==r&&(void 0===e&&(e=t(o)),e<Number(n)))return!1}const{allowInput:a}=e;return"function"!=typeof a||a(o)}(r);if(a)if(e.pair){let{value:e}=x;e=Array.isArray(e)?[e[0],e[1]]:["",""],e[t]=r,"input"===n?V(e,{source:t}):q(e,{source:t})}else"input"===n?V(r,{source:t}):q(r,{source:t});K.$forceUpdate(),a||yo(f.restoreCursor)}function Y(o,t){(null===o.relatedTarget||o.relatedTarget!==u.value&&o.relatedTarget!==p.value&&o.relatedTarget!==s.value&&o.relatedTarget!==i.value)&&("focus"===t?(!function(o){const{onFocus:t}=e,{nTriggerFormFocus:n}=w;t&&H(t,o),n()}(o),I.value=!0):"blur"===t&&(!function(o){const{onBlur:t}=e,{nTriggerFormBlur:n}=w;t&&H(t,o),n()}(o),I.value=!1))}function J(){e.pair?(V(["",""],{source:"clear"}),q(["",""],{source:"clear"})):(V("",{source:"clear"}),q("",{source:"clear"}))}function X(){e.passivelyActivated&&(A.value=!1,yo(()=>{var e;null===(e=i.value)||void 0===e||e.focus()}))}function Z(){var o,t,n;k.value||(e.passivelyActivated?null===(o=i.value)||void 0===o||o.focus():(null===(t=s.value)||void 0===t||t.focus(),null===(n=u.value)||void 0===n||n.focus()))}function Q(o){const{type:t,pair:n,autosize:r}=e;if(!n&&r)if("textarea"===t){const{value:e}=c;e&&(e.textContent=`${null!=o?o:""}\r\n`)}else{const{value:e}=d;e&&(o?e.textContent=o:e.innerHTML=" ")}}const ee=it({top:"0"});let oe=null;To(()=>{const{autosize:o,type:t}=e;o&&"textarea"===t?oe=$o(x,e=>{Array.isArray(e)||e===$||Q(e)}):null==oe||oe()});let te=null;To(()=>{"textarea"===e.type?te=$o(x,e=>{var o;Array.isArray(e)||e===$||null===(o=v.value)||void 0===o||o.syncUnifiedContainer()}):null==te||te()}),go(oc,{mergedValueRef:x,maxlengthRef:N,mergedClsPrefixRef:t,countGraphemesRef:jo(e,"countGraphemes")});const ne={wrapperElRef:i,inputElRef:u,textareaElRef:s,isCompositing:R,clear:J,focus:Z,blur:function(){var e;(null===(e=i.value)||void 0===e?void 0:e.contains(document.activeElement))&&document.activeElement.blur()},select:function(){var e,o;null===(e=s.value)||void 0===e||e.select(),null===(o=u.value)||void 0===o||o.select()},deactivate:function(){const{value:e}=i;(null==e?void 0:e.contains(document.activeElement))&&e!==document.activeElement&&X()},activate:function(){k.value||(s.value?s.value.focus():u.value&&u.value.focus())},scrollTo:function(o){if("textarea"===e.type){const{value:e}=s;null==e||e.scrollTo(o)}else{const{value:e}=u;null==e||e.scrollTo(o)}}},re=g("Input",a,t),ae=Do(()=>{const{value:e}=S,{common:{cubicBezierEaseInOut:o},self:{color:t,borderRadius:n,textColor:r,caretColor:a,caretColorError:i,caretColorWarning:s,textDecorationColor:c,border:d,borderDisabled:u,borderHover:p,borderFocus:h,placeholderColor:f,placeholderColorDisabled:v,lineHeightTextarea:m,colorDisabled:g,colorFocus:b,textColorDisabled:y,boxShadowFocus:x,iconSize:C,colorFocusWarning:w,boxShadowFocusWarning:k,borderWarning:P,borderFocusWarning:T,borderHoverWarning:I,colorFocusError:z,boxShadowFocusError:M,borderError:R,borderFocusError:A,borderHoverError:F,clearSize:$,clearColor:O,clearColorHover:B,clearColorPressed:E,iconColor:_,iconColorDisabled:D,suffixTextColor:L,countTextColor:H,countTextColorDisabled:j,iconColorHover:U,iconColorPressed:W,loadingColor:N,loadingColorError:K,loadingColorWarning:V,fontWeight:q,[ao("padding",e)]:G,[ao("fontSize",e)]:Y,[ao("height",e)]:J}}=l.value,{left:X,right:Z}=ue(G);return{"--n-bezier":o,"--n-count-text-color":H,"--n-count-text-color-disabled":j,"--n-color":t,"--n-font-size":Y,"--n-font-weight":q,"--n-border-radius":n,"--n-height":J,"--n-padding-left":X,"--n-padding-right":Z,"--n-text-color":r,"--n-caret-color":a,"--n-text-decoration-color":c,"--n-border":d,"--n-border-disabled":u,"--n-border-hover":p,"--n-border-focus":h,"--n-placeholder-color":f,"--n-placeholder-color-disabled":v,"--n-icon-size":C,"--n-line-height-textarea":m,"--n-color-disabled":g,"--n-color-focus":b,"--n-text-color-disabled":y,"--n-box-shadow-focus":x,"--n-loading-color":N,"--n-caret-color-warning":s,"--n-color-focus-warning":w,"--n-box-shadow-focus-warning":k,"--n-border-warning":P,"--n-border-focus-warning":T,"--n-border-hover-warning":I,"--n-loading-color-warning":V,"--n-caret-color-error":i,"--n-color-focus-error":z,"--n-box-shadow-focus-error":M,"--n-border-error":R,"--n-border-focus-error":A,"--n-border-hover-error":F,"--n-loading-color-error":K,"--n-clear-color":O,"--n-clear-size":$,"--n-clear-color-hover":B,"--n-clear-color-pressed":E,"--n-icon-color":_,"--n-icon-color-hover":U,"--n-icon-color-pressed":W,"--n-icon-color-disabled":D,"--n-suffix-text-color":L}}),le=r?Ce("input",Do(()=>{const{value:e}=S;return e[0]}),ae,e):void 0;return Object.assign(Object.assign({},ne),{wrapperElRef:i,inputElRef:u,inputMirrorElRef:d,inputEl2Ref:p,textareaElRef:s,textareaMirrorElRef:c,textareaScrollbarInstRef:v,rtlEnabled:re,uncontrolledValue:b,mergedValue:x,passwordVisible:j,mergedPlaceholder:O,showPlaceholder1:B,showPlaceholder2:E,mergedFocus:_,isComposing:R,activated:A,showClearButton:D,mergedSize:S,mergedDisabled:k,textDecorationStyle:U,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:L,placeholderStyle:ee,mergedStatus:T,textAreaScrollContainerWidth:W,handleTextAreaScroll:function(e){var o;const{scrollTop:t}=e.target;ee.value.top=-t+"px",null===(o=v.value)||void 0===o||o.syncUnifiedContainer()},handleCompositionStart:function(){R.value=!0},handleCompositionEnd:function(e){R.value=!1,e.target===p.value?G(e,1):G(e,0)},handleInput:G,handleInputBlur:function(o){!function(o){const{onInputBlur:t}=e;t&&H(t,o)}(o),o.relatedTarget===i.value&&function(){const{onDeactivate:o}=e;o&&H(o)}(),(null===o.relatedTarget||o.relatedTarget!==u.value&&o.relatedTarget!==p.value&&o.relatedTarget!==s.value)&&(A.value=!1),Y(o,"blur"),h.value=null},handleInputFocus:function(o,t){!function(o){const{onInputFocus:t}=e;t&&H(t,o)}(o),I.value=!0,A.value=!0,function(){const{onActivate:o}=e;o&&H(o)}(),Y(o,"focus"),0===t?h.value=u.value:1===t?h.value=p.value:2===t&&(h.value=s.value)},handleWrapperBlur:function(o){e.passivelyActivated&&(!function(o){const{onWrapperBlur:t}=e;t&&H(t,o)}(o),Y(o,"blur"))},handleWrapperFocus:function(o){e.passivelyActivated&&(I.value=!0,function(o){const{onWrapperFocus:t}=e;t&&H(t,o)}(o),Y(o,"focus"))},handleMouseEnter:function(){var o;z.value=!0,"textarea"===e.type&&(null===(o=v.value)||void 0===o||o.handleMouseEnterWrapper())},handleMouseLeave:function(){var o;z.value=!1,"textarea"===e.type&&(null===(o=v.value)||void 0===o||o.handleMouseLeaveWrapper())},handleMouseDown:function(o){const{onMousedown:t}=e;t&&t(o);const{tagName:n}=o.target;if("INPUT"!==n&&"TEXTAREA"!==n){if(e.resizable){const{value:e}=i;if(e){const{left:t,top:n,width:r,height:a}=e.getBoundingClientRect(),l=14;if(t+r-l<o.clientX&&o.clientX<t+r&&n+a-l<o.clientY&&o.clientY<n+a)return}}o.preventDefault(),I.value||Z()}},handleChange:function(e,o){G(e,o,"change")},handleClick:function(o){!function(o){const{onClick:t}=e;t&&H(t,o)}(o)},handleClear:function(o){!function(o){const{onClear:t}=e;t&&H(t,o)}(o),J()},handlePasswordToggleClick:function(){k.value||"click"===L.value&&(j.value=!j.value)},handlePasswordToggleMousedown:function(e){if(k.value)return;e.preventDefault();const o=e=>{e.preventDefault(),Ge("mouseup",document,o)};if(Fe("mouseup",document,o),"mousedown"!==L.value)return;j.value=!0;const t=()=>{j.value=!1,Ge("mouseup",document,t)};Fe("mouseup",document,t)},handleWrapperKeydown:function(o){switch(e.onKeydown&&H(e.onKeydown,o),o.key){case"Escape":X();break;case"Enter":!function(o){var t,n;if(e.passivelyActivated){const{value:r}=A;if(r)return void(e.internalDeactivateOnEnter&&X());o.preventDefault(),"textarea"===e.type?null===(t=s.value)||void 0===t||t.focus():null===(n=u.value)||void 0===n||n.focus()}}(o)}},handleWrapperKeyup:function(o){e.onKeyup&&H(e.onKeyup,o)},handleTextAreaMirrorResize:function(){(()=>{var o,t;if("textarea"===e.type){const{autosize:n}=e;if(n&&(W.value=null===(t=null===(o=v.value)||void 0===o?void 0:o.$el)||void 0===t?void 0:t.offsetWidth),!s.value)return;if("boolean"==typeof n)return;const{paddingTop:r,paddingBottom:a,lineHeight:l}=window.getComputedStyle(s.value),i=Number(r.slice(0,-2)),d=Number(a.slice(0,-2)),u=Number(l.slice(0,-2)),{value:p}=c;if(!p)return;if(n.minRows){const e=`${i+d+u*Math.max(n.minRows,1)}px`;p.style.minHeight=e}if(n.maxRows){const e=`${i+d+u*n.maxRows}px`;p.style.maxHeight=e}}})()},getTextareaScrollContainer:()=>s.value,mergedTheme:l,cssVars:r?void 0:ae,themeClass:null==le?void 0:le.themeClass,onRender:null==le?void 0:le.onRender})},render(){var e,o,t,n,r,a,l;const{mergedClsPrefix:i,mergedStatus:c,themeClass:d,type:u,countGraphemes:p,onRender:h}=this,f=this.$slots;return null==h||h(),So("div",{ref:"wrapperElRef",class:[`${i}-input`,d,c&&`${i}-input--${c}-status`,{[`${i}-input--rtl`]:this.rtlEnabled,[`${i}-input--disabled`]:this.mergedDisabled,[`${i}-input--textarea`]:"textarea"===u,[`${i}-input--resizable`]:this.resizable&&!this.autosize,[`${i}-input--autosize`]:this.autosize,[`${i}-input--round`]:this.round&&!("textarea"===u),[`${i}-input--pair`]:this.pair,[`${i}-input--focus`]:this.mergedFocus,[`${i}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:this.mergedDisabled||!this.passivelyActivated||this.activated?void 0:0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},So("div",{class:`${i}-input-wrapper`},s(f.prefix,e=>e&&So("div",{class:`${i}-input__prefix`},e)),"textarea"===u?So(io,{ref:"textareaScrollbarInstRef",class:`${i}-input__textarea`,container:this.getTextareaScrollContainer,theme:null===(o=null===(e=this.theme)||void 0===e?void 0:e.peers)||void 0===o?void 0:o.Scrollbar,themeOverrides:null===(n=null===(t=this.themeOverrides)||void 0===t?void 0:t.peers)||void 0===n?void 0:n.Scrollbar,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var e,o;const{textAreaScrollContainerWidth:t}=this,n={width:this.autosize&&t&&`${t}px`};return So(No,null,So("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${i}-input__textarea-el`,null===(e=this.inputProps)||void 0===e?void 0:e.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:p?void 0:this.maxlength,minlength:p?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],null===(o=this.inputProps)||void 0===o?void 0:o.style,n],onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?So("div",{class:`${i}-input__placeholder`,style:[this.placeholderStyle,n],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?So(R,{onResize:this.handleTextAreaMirrorResize},{default:()=>So("div",{ref:"textareaMirrorElRef",class:`${i}-input__textarea-mirror`,key:"mirror"})}):null)}}):So("div",{class:`${i}-input__input`},So("input",Object.assign({type:"password"===u&&this.mergedShowPasswordOn&&this.passwordVisible?"text":u},this.inputProps,{ref:"inputElRef",class:[`${i}-input__input-el`,null===(r=this.inputProps)||void 0===r?void 0:r.class],style:[this.textDecorationStyle[0],null===(a=this.inputProps)||void 0===a?void 0:a.style],tabindex:this.passivelyActivated&&!this.activated?-1:null===(l=this.inputProps)||void 0===l?void 0:l.tabindex,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:p?void 0:this.maxlength,minlength:p?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,0)},onInput:e=>{this.handleInput(e,0)},onChange:e=>{this.handleChange(e,0)}})),this.showPlaceholder1?So("div",{class:`${i}-input__placeholder`},So("span",null,this.mergedPlaceholder[0])):null,this.autosize?So("div",{class:`${i}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&s(f.suffix,e=>e||this.clearable||this.showCount||this.mergedShowPasswordOn||void 0!==this.loading?So("div",{class:`${i}-input__suffix`},[s(f["clear-icon-placeholder"],e=>(this.clearable||e)&&So(Ol,{clsPrefix:i,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>e,icon:()=>{var e,o;return null===(o=(e=this.$slots)["clear-icon"])||void 0===o?void 0:o.call(e)}})),this.internalLoadingBeforeSuffix?null:e,void 0!==this.loading?So(_s,{clsPrefix:i,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?e:null,this.showCount&&"textarea"!==this.type?So(lc,null,{default:e=>{var o;const{renderCount:t}=this;return t?t(e):null===(o=f.count)||void 0===o?void 0:o.call(f,e)}}):null,this.mergedShowPasswordOn&&"password"===this.type?So("div",{class:`${i}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?lo(f["password-visible-icon"],()=>[So(ke,{clsPrefix:i},{default:()=>So(Rl,null)})]):lo(f["password-invisible-icon"],()=>[So(ke,{clsPrefix:i},{default:()=>So(Al,null)})])):null]):null)),this.pair?So("span",{class:`${i}-input__separator`},lo(f.separator,()=>[this.separator])):null,this.pair?So("div",{class:`${i}-input-wrapper`},So("div",{class:`${i}-input__input`},So("input",{ref:"inputEl2Ref",type:this.type,class:`${i}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:p?void 0:this.maxlength,minlength:p?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,1)},onInput:e=>{this.handleInput(e,1)},onChange:e=>{this.handleChange(e,1)}}),this.showPlaceholder2?So("div",{class:`${i}-input__placeholder`},So("span",null,this.mergedPlaceholder[1])):null),s(f.suffix,e=>(this.clearable||e)&&So("div",{class:`${i}-input__suffix`},[this.clearable&&So(Ol,{clsPrefix:i,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var e;return null===(e=f["clear-icon"])||void 0===e?void 0:e.call(f)},placeholder:()=>{var e;return null===(e=f["clear-icon-placeholder"])||void 0===e?void 0:e.call(f)}}),e]))):null,this.mergedBordered?So("div",{class:`${i}-input__border`}):null,this.mergedBordered?So("div",{class:`${i}-input__state-border`}):null,this.showCount&&"textarea"===u?So(lc,null,{default:e=>{var o;const{renderCount:t}=this;return t?t(e):null===(o=f.count)||void 0===o?void 0:o.call(f,e)}}):null)}});function sc(e){return"group"===e.type}function cc(e){return"ignored"===e.type}function dc(e,o){try{return!!(1+o.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch(Cr){return!1}}function uc(e,o){return{getIsGroup:sc,getIgnored:cc,getKey:o=>sc(o)?o.name||o.key||"key-required":o[e],getChildren:e=>e[o]}}function pc(e){const{boxShadow2:o}=e;return{menuBoxShadow:o}}var hc=S({name:"AutoComplete",common:l,peers:{InternalSelectMenu:yn,Input:bn},self:pc}),fc={name:"AutoComplete",common:_i,peers:{InternalSelectMenu:us,Input:ec},self:pc},vc=xe([ge("auto-complete","\n z-index: auto;\n position: relative;\n display: inline-flex;\n width: 100%;\n "),ge("auto-complete-menu","\n margin: 4px 0;\n box-shadow: var(--n-menu-box-shadow);\n ",[un({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]);function mc(e){var o,t;return"string"==typeof e?{label:e,value:e}:"group"===e.type?{type:"group",label:null!==(o=e.label)&&void 0!==o?o:e.name,value:null!==(t=e.value)&&void 0!==t?t:e.name,key:e.key||e.name,children:e.children.map(e=>mc(e))}:e}var gc=po({name:"AutoComplete",props:Object.assign(Object.assign({},P.props),{to:zr.propTo,menuProps:Object,append:Boolean,bordered:{type:Boolean,default:void 0},clearable:{type:Boolean,default:void 0},defaultValue:{type:String,default:null},loading:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},placeholder:String,placement:{type:String,default:"bottom-start"},value:String,blurAfterSelect:Boolean,clearAfterSelect:Boolean,getShow:Function,showEmpty:Boolean,inputProps:Object,renderOption:Function,renderLabel:Function,size:String,options:{type:Array,default:()=>[]},zIndex:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onSelect:[Function,Array],onBlur:[Function,Array],onFocus:[Function,Array],onInput:[Function,Array]}),slots:Object,setup(e){const{mergedBorderedRef:o,namespaceRef:t,mergedClsPrefixRef:n,inlineThemeDisabled:r}=be(e),a=Re(e),{mergedSizeRef:l,mergedDisabledRef:i,mergedStatusRef:s}=a,c=it(null),d=it(null),u=it(e.defaultValue),p=jo(e,"value"),h=F(p,u),f=it(!1),v=it(!1),m=P("AutoComplete","-auto-complete",vc,hc,e,n),g=Do(()=>e.options.map(mc)),b=Do(()=>{const{getShow:o}=e;return o?o(h.value||""):!!h.value}),y=Do(()=>b.value&&f.value&&(!!e.showEmpty||!!g.value.length)),x=Do(()=>is(g.value,uc("value","children")));function C(o){const{"onUpdate:value":t,onUpdateValue:n,onInput:r}=e,{nTriggerFormInput:l,nTriggerFormChange:i}=a;n&&H(n,o),t&&H(t,o),r&&H(r,o),u.value=o,l(),i()}function w(o){void 0!==(null==o?void 0:o.value)&&(function(o){const{onSelect:t}=e,{nTriggerFormInput:n,nTriggerFormChange:r}=a;t&&H(t,o),n(),r()}(o.value),e.clearAfterSelect?C(null):void 0!==o.label&&C(e.append?`${h.value}${o.label}`:o.label),f.value=!1,e.blurAfterSelect&&function(){var e,o;(null===(e=c.value)||void 0===e?void 0:e.contains(document.activeElement))&&(null===(o=document.activeElement)||void 0===o||o.blur())}())}const S=Do(()=>{const{common:{cubicBezierEaseInOut:e},self:{menuBoxShadow:o}}=m.value;return{"--n-menu-box-shadow":o,"--n-bezier":e}}),k=r?Ce("auto-complete",void 0,S,e):void 0,T=it(null),I={focus:()=>{var e;null===(e=T.value)||void 0===e||e.focus()},blur:()=>{var e;null===(e=T.value)||void 0===e||e.blur()}};return{focus:I.focus,blur:I.blur,inputInstRef:T,uncontrolledValue:u,mergedValue:h,isMounted:Z(),adjustedTo:zr(e),menuInstRef:d,triggerElRef:c,treeMate:x,mergedSize:l,mergedDisabled:i,active:y,mergedStatus:s,handleClear:function(){C(null)},handleFocus:function(o){f.value=!0,function(o){const{onFocus:t}=e,{nTriggerFormFocus:n}=a;t&&H(t,o),n()}(o)},handleBlur:function(o){f.value=!1,function(o){const{onBlur:t}=e,{nTriggerFormBlur:n}=a;t&&H(t,o),n()}(o)},handleInput:function(e){f.value=!0,C(e)},handleToggle:function(e){w(e.rawNode)},handleClickOutsideMenu:function(e){var o;(null===(o=c.value)||void 0===o?void 0:o.contains(_e(e)))||(f.value=!1)},handleCompositionStart:function(){v.value=!0},handleCompositionEnd:function(){window.setTimeout(()=>{v.value=!1},0)},handleKeyDown:function(e){var o,t,n;switch(e.key){case"Enter":if(!v.value){const t=null===(o=d.value)||void 0===o?void 0:o.getPendingTmNode();t&&(w(t.rawNode),e.preventDefault())}break;case"ArrowDown":null===(t=d.value)||void 0===t||t.next();break;case"ArrowUp":null===(n=d.value)||void 0===n||n.prev()}},mergedTheme:m,cssVars:r?void 0:S,themeClass:null==k?void 0:k.themeClass,onRender:null==k?void 0:k.onRender,mergedBordered:o,namespace:t,mergedClsPrefix:n}},render(){const{mergedClsPrefix:e}=this;return So("div",{class:`${e}-auto-complete`,ref:"triggerElRef",onKeydown:this.handleKeyDown,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd},So(Or,null,{default:()=>[So(Br,null,{default:()=>{const e=this.$slots.default;if(e)return kn("default",e,{handleInput:this.handleInput,handleFocus:this.handleFocus,handleBlur:this.handleBlur,value:this.mergedValue});const{mergedTheme:o}=this;return So(ic,{ref:"inputInstRef",status:this.mergedStatus,theme:o.peers.Input,themeOverrides:o.peerOverrides.Input,bordered:this.mergedBordered,value:this.mergedValue,placeholder:this.placeholder,size:this.mergedSize,disabled:this.mergedDisabled,clearable:this.clearable,loading:this.loading,inputProps:this.inputProps,onClear:this.handleClear,onFocus:this.handleFocus,onUpdateValue:this.handleInput,onBlur:this.handleBlur},{suffix:()=>{var e,o;return null===(o=(e=this.$slots).suffix)||void 0===o?void 0:o.call(e)},prefix:()=>{var e,o;return null===(o=(e=this.$slots).prefix)||void 0===o?void 0:o.call(e)}})}}),So(Qr,{show:this.active,to:this.adjustedTo,containerClass:this.namespace,zIndex:this.zIndex,teleportDisabled:this.adjustedTo===zr.tdkey,placement:this.placement,width:"target"},{default:()=>So(Xo,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>{var o;if(null===(o=this.onRender)||void 0===o||o.call(this),!this.active)return null;const{menuProps:t}=this;return ct(So(gs,Object.assign({},t,{clsPrefix:e,ref:"menuInstRef",theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,"auto-pending":!0,class:[`${e}-auto-complete-menu`,this.themeClass,null==t?void 0:t.class],style:[null==t?void 0:t.style,this.cssVars],treeMate:this.treeMate,multiple:!1,renderLabel:this.renderLabel,renderOption:this.renderOption,size:"medium",onToggle:this.handleToggle}),{empty:()=>{var e,o;return null===(o=(e=this.$slots).empty)||void 0===o?void 0:o.call(e)}}),[[uo,this.handleClickOutsideMenu,void 0,{capture:!0}]])}})})]}))}});function bc(e){const{borderRadius:o,avatarColor:t,cardColor:n,fontSize:r,heightTiny:a,heightSmall:l,heightMedium:i,heightLarge:s,heightHuge:c,modalColor:d,popoverColor:u}=e;return{borderRadius:o,fontSize:r,border:`2px solid ${n}`,heightTiny:a,heightSmall:l,heightMedium:i,heightLarge:s,heightHuge:c,color:Be(n,t),colorModal:Be(d,t),colorPopover:Be(u,t)}}var yc={name:"Avatar",common:l,self:bc},xc={name:"Avatar",common:_i,self:bc};function Cc(){return{gap:"-12px"}}var wc=S({name:"AvatarGroup",common:l,peers:{Avatar:yc},self:Cc}),Sc={name:"AvatarGroup",common:_i,peers:{Avatar:xc},self:Cc},kc={width:"44px",height:"44px",borderRadius:"22px",iconSize:"26px"},Pc={name:"BackTop",common:_i,self(e){const{popoverColor:o,textColor2:t,primaryColorHover:n,primaryColorPressed:r}=e;return Object.assign(Object.assign({},kc),{color:o,textColor:t,iconColor:t,iconColorHover:n,iconColorPressed:r,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .12)",boxShadowHover:"0 2px 12px 0px rgba(0, 0, 0, .18)",boxShadowPressed:"0 2px 12px 0px rgba(0, 0, 0, .18)"})}};var Tc={name:"BackTop",common:l,self:function(e){const{popoverColor:o,textColor2:t,primaryColorHover:n,primaryColorPressed:r}=e;return Object.assign(Object.assign({},kc),{color:o,textColor:t,iconColor:t,iconColorHover:n,iconColorPressed:r,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .12)",boxShadowHover:"0 2px 12px 0px rgba(0, 0, 0, .18)",boxShadowPressed:"0 2px 12px 0px rgba(0, 0, 0, .18)"})}},Ic={name:"Badge",common:_i,self(e){const{errorColorSuppl:o,infoColorSuppl:t,successColorSuppl:n,warningColorSuppl:r,fontFamily:a}=e;return{color:o,colorInfo:t,colorSuccess:n,colorError:o,colorWarning:r,fontSize:"12px",fontFamily:a}}};var zc={name:"Badge",common:l,self:function(e){const{errorColor:o,infoColor:t,successColor:n,warningColor:r,fontFamily:a}=e;return{color:o,colorInfo:t,colorSuccess:n,colorError:o,colorWarning:r,fontSize:"12px",fontFamily:a}}},Mc={fontWeightActive:"400"};function Rc(e){const{fontSize:o,textColor3:t,textColor2:n,borderRadius:r,buttonColor2Hover:a,buttonColor2Pressed:l}=e;return Object.assign(Object.assign({},Mc),{fontSize:o,itemLineHeight:"1.25",itemTextColor:t,itemTextColorHover:n,itemTextColorPressed:n,itemTextColorActive:n,itemBorderRadius:r,itemColorHover:a,itemColorPressed:l,separatorColor:t})}var Ac={name:"Breadcrumb",common:l,self:Rc},Fc={name:"Breadcrumb",common:_i,self:Rc},$c={name:"Button",common:_i,self(e){const o=Je(e);return o.waveOpacity="0.8",o.colorOpacitySecondary="0.16",o.colorOpacitySecondaryHover="0.2",o.colorOpacitySecondaryPressed="0.12",o}},Oc={titleFontSize:"22px"};function Bc(e){const{borderRadius:o,fontSize:t,lineHeight:n,textColor2:r,textColor1:a,textColorDisabled:l,dividerColor:i,fontWeightStrong:s,primaryColor:c,baseColor:d,hoverColor:u,cardColor:p,modalColor:h,popoverColor:f}=e;return Object.assign(Object.assign({},Oc),{borderRadius:o,borderColor:Be(p,i),borderColorModal:Be(h,i),borderColorPopover:Be(f,i),textColor:r,titleFontWeight:s,titleTextColor:a,dayTextColor:l,fontSize:t,lineHeight:n,dateColorCurrent:c,dateTextColorCurrent:d,cellColorHover:Be(p,u),cellColorHoverModal:Be(h,u),cellColorHoverPopover:Be(f,u),cellColor:p,cellColorModal:h,cellColorPopover:f,barColor:c})}var Ec=S({name:"Calendar",common:l,peers:{Button:Ie},self:Bc}),_c={name:"Calendar",common:_i,peers:{Button:$c},self:Bc},Dc={name:"Card",common:_i,self(e){const o=In(e),{cardColor:t,modalColor:n,popoverColor:r}=e;return o.colorEmbedded=t,o.colorEmbeddedModal=n,o.colorEmbeddedPopover=r,o}};function Lc(){return{dotSize:"8px",dotColor:"rgba(255, 255, 255, .3)",dotColorActive:"rgba(255, 255, 255, 1)",dotColorFocus:"rgba(255, 255, 255, .5)",dotLineWidth:"16px",dotLineWidthActive:"24px",arrowColor:"#eee"}}var Hc={name:"Carousel",common:l,self:Lc},jc={name:"Carousel",common:_i,self:Lc},Uc={name:"Checkbox",common:_i,self(e){const{cardColor:o}=e,t=Mn(e);return t.color="#0000",t.checkMarkColor=o,t}};function Wc(e){const{borderRadius:o,boxShadow2:t,popoverColor:n,textColor2:r,textColor3:a,primaryColor:l,textColorDisabled:i,dividerColor:s,hoverColor:c,fontSizeMedium:d,heightMedium:u}=e;return{menuBorderRadius:o,menuColor:n,menuBoxShadow:t,menuDividerColor:s,menuHeight:"calc(var(--n-option-height) * 6.6)",optionArrowColor:a,optionHeight:u,optionFontSize:d,optionColorHover:c,optionTextColor:r,optionTextColorActive:l,optionTextColorDisabled:i,optionCheckMarkColor:l,loadingColor:l,columnWidth:"180px"}}var Nc=S({name:"Cascader",common:l,peers:{InternalSelectMenu:yn,InternalSelection:cn,Scrollbar:ro,Checkbox:Rn,Empty:Q},self:Wc}),Kc={name:"Cascader",common:_i,peers:{InternalSelectMenu:us,InternalSelection:Ds,Scrollbar:Di,Checkbox:Uc,Empty:Q},self:Wc},Vc=J("n-checkbox-group"),qc=po({name:"CheckboxGroup",props:{min:Number,max:Number,size:String,value:Array,defaultValue:{type:Array,default:null},disabled:{type:Boolean,default:void 0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onChange:[Function,Array]},setup(e){const{mergedClsPrefixRef:o}=be(e),t=Re(e),{mergedSizeRef:n,mergedDisabledRef:r}=t,a=it(e.defaultValue),l=Do(()=>e.value),i=F(l,a),s=Do(()=>{var e;return(null===(e=i.value)||void 0===e?void 0:e.length)||0}),c=Do(()=>Array.isArray(i.value)?new Set(i.value):new Set);return go(Vc,{checkedCountRef:s,maxRef:jo(e,"max"),minRef:jo(e,"min"),valueSetRef:c,disabledRef:r,mergedSizeRef:n,toggleCheckbox:function(o,n){const{nTriggerFormInput:r,nTriggerFormChange:l}=t,{onChange:s,"onUpdate:value":c,onUpdateValue:d}=e;if(Array.isArray(i.value)){const e=Array.from(i.value),t=e.findIndex(e=>e===n);o?~t||(e.push(n),d&&H(d,e,{actionType:"check",value:n}),c&&H(c,e,{actionType:"check",value:n}),r(),l(),a.value=e,s&&H(s,e)):~t&&(e.splice(t,1),d&&H(d,e,{actionType:"uncheck",value:n}),c&&H(c,e,{actionType:"uncheck",value:n}),s&&H(s,e),a.value=e,r(),l())}else o?(d&&H(d,[n],{actionType:"check",value:n}),c&&H(c,[n],{actionType:"check",value:n}),s&&H(s,[n]),a.value=[n],r(),l()):(d&&H(d,[],{actionType:"uncheck",value:n}),c&&H(c,[],{actionType:"uncheck",value:n}),s&&H(s,[]),a.value=[],r(),l())}}),{mergedClsPrefix:o}},render(){return So("div",{class:`${this.mergedClsPrefix}-checkbox-group`,role:"group"},this.$slots)}}),Gc=xe([ge("checkbox","\n font-size: var(--n-font-size);\n outline: none;\n cursor: pointer;\n display: inline-flex;\n flex-wrap: nowrap;\n align-items: flex-start;\n word-break: break-word;\n line-height: var(--n-size);\n --n-merged-color-table: var(--n-color-table);\n ",[so("show-label","line-height: var(--n-label-line-height);"),xe("&:hover",[ge("checkbox-box",[eo("border","border: var(--n-border-checked);")])]),xe("&:focus:not(:active)",[ge("checkbox-box",[eo("border","\n border: var(--n-border-focus);\n box-shadow: var(--n-box-shadow-focus);\n ")])]),so("inside-table",[ge("checkbox-box","\n background-color: var(--n-merged-color-table);\n ")]),so("checked",[ge("checkbox-box","\n background-color: var(--n-color-checked);\n ",[ge("checkbox-icon",[xe(".check-icon","\n opacity: 1;\n transform: scale(1);\n ")])])]),so("indeterminate",[ge("checkbox-box",[ge("checkbox-icon",[xe(".check-icon","\n opacity: 0;\n transform: scale(.5);\n "),xe(".line-icon","\n opacity: 1;\n transform: scale(1);\n ")])])]),so("checked, indeterminate",[xe("&:focus:not(:active)",[ge("checkbox-box",[eo("border","\n border: var(--n-border-checked);\n box-shadow: var(--n-box-shadow-focus);\n ")])]),ge("checkbox-box","\n background-color: var(--n-color-checked);\n border-left: 0;\n border-top: 0;\n ",[eo("border",{border:"var(--n-border-checked)"})])]),so("disabled",{cursor:"not-allowed"},[so("checked",[ge("checkbox-box","\n background-color: var(--n-color-disabled-checked);\n ",[eo("border",{border:"var(--n-border-disabled-checked)"}),ge("checkbox-icon",[xe(".check-icon, .line-icon",{fill:"var(--n-check-mark-color-disabled-checked)"})])])]),ge("checkbox-box","\n background-color: var(--n-color-disabled);\n ",[eo("border","\n border: var(--n-border-disabled);\n "),ge("checkbox-icon",[xe(".check-icon, .line-icon","\n fill: var(--n-check-mark-color-disabled);\n ")])]),eo("label","\n color: var(--n-text-color-disabled);\n ")]),ge("checkbox-box-wrapper","\n position: relative;\n width: var(--n-size);\n flex-shrink: 0;\n flex-grow: 0;\n user-select: none;\n -webkit-user-select: none;\n "),ge("checkbox-box","\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n height: var(--n-size);\n width: var(--n-size);\n display: inline-block;\n box-sizing: border-box;\n border-radius: var(--n-border-radius);\n background-color: var(--n-color);\n transition: background-color 0.3s var(--n-bezier);\n ",[eo("border","\n transition:\n border-color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier);\n border-radius: inherit;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border: var(--n-border);\n "),ge("checkbox-icon","\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n left: 1px;\n right: 1px;\n top: 1px;\n bottom: 1px;\n ",[xe(".check-icon, .line-icon","\n width: 100%;\n fill: var(--n-check-mark-color);\n opacity: 0;\n transform: scale(0.5);\n transform-origin: center;\n transition:\n fill 0.3s var(--n-bezier),\n transform 0.3s var(--n-bezier),\n opacity 0.3s var(--n-bezier),\n border-color 0.3s var(--n-bezier);\n "),I({left:"1px",top:"1px"})])]),eo("label","\n color: var(--n-text-color);\n transition: color .3s var(--n-bezier);\n user-select: none;\n -webkit-user-select: none;\n padding: var(--n-label-padding);\n font-weight: var(--n-label-font-weight);\n ",[xe("&:empty",{display:"none"})])]),E(ge("checkbox","\n --n-merged-color-table: var(--n-color-table-modal);\n ")),i(ge("checkbox","\n --n-merged-color-table: var(--n-color-table-popover);\n "))]),Yc=po({name:"Checkbox",props:Object.assign(Object.assign({},P.props),{size:String,checked:{type:[Boolean,String,Number],default:void 0},defaultChecked:{type:[Boolean,String,Number],default:!1},value:[String,Number],disabled:{type:Boolean,default:void 0},indeterminate:Boolean,label:String,focusable:{type:Boolean,default:!0},checkedValue:{type:[Boolean,String,Number],default:!0},uncheckedValue:{type:[Boolean,String,Number],default:!1},"onUpdate:checked":[Function,Array],onUpdateChecked:[Function,Array],privateInsideTable:Boolean,onChange:[Function,Array]}),setup(e){const t=ko(Vc,null),n=it(null),{mergedClsPrefixRef:r,inlineThemeDisabled:a,mergedRtlRef:l}=be(e),i=it(e.defaultChecked),s=jo(e,"checked"),c=F(s,i),d=o(()=>{if(t){const o=t.valueSetRef.value;return!(!o||void 0===e.value)&&o.has(e.value)}return c.value===e.checkedValue}),u=Re(e,{mergedSize(o){const{size:n}=e;if(void 0!==n)return n;if(t){const{value:e}=t.mergedSizeRef;if(void 0!==e)return e}if(o){const{mergedSize:e}=o;if(void 0!==e)return e.value}return"medium"},mergedDisabled(o){const{disabled:n}=e;if(void 0!==n)return n;if(t){if(t.disabledRef.value)return!0;const{maxRef:{value:e},checkedCountRef:o}=t;if(void 0!==e&&o.value>=e&&!d.value)return!0;const{minRef:{value:n}}=t;if(void 0!==n&&o.value<=n&&d.value)return!0}return!!o&&o.disabled.value}}),{mergedDisabledRef:p,mergedSizeRef:h}=u,f=P("Checkbox","-checkbox",Gc,Rn,e,r);function v(o){if(t&&void 0!==e.value)t.toggleCheckbox(!d.value,e.value);else{const{onChange:t,"onUpdate:checked":n,onUpdateChecked:r}=e,{nTriggerFormInput:a,nTriggerFormChange:l}=u,s=d.value?e.uncheckedValue:e.checkedValue;n&&H(n,s,o),r&&H(r,s,o),t&&H(t,s,o),a(),l(),i.value=s}}const m={focus:()=>{var e;null===(e=n.value)||void 0===e||e.focus()},blur:()=>{var e;null===(e=n.value)||void 0===e||e.blur()}},b=g("Checkbox",l,r),y=Do(()=>{const{value:e}=h,{common:{cubicBezierEaseInOut:o},self:{borderRadius:t,color:n,colorChecked:r,colorDisabled:a,colorTableHeader:l,colorTableHeaderModal:i,colorTableHeaderPopover:s,checkMarkColor:c,checkMarkColorDisabled:d,border:u,borderFocus:p,borderDisabled:v,borderChecked:m,boxShadowFocus:g,textColor:b,textColorDisabled:y,checkMarkColorDisabledChecked:x,colorDisabledChecked:C,borderDisabledChecked:w,labelPadding:S,labelLineHeight:k,labelFontWeight:P,[ao("fontSize",e)]:T,[ao("size",e)]:I}}=f.value;return{"--n-label-line-height":k,"--n-label-font-weight":P,"--n-size":I,"--n-bezier":o,"--n-border-radius":t,"--n-border":u,"--n-border-checked":m,"--n-border-focus":p,"--n-border-disabled":v,"--n-border-disabled-checked":w,"--n-box-shadow-focus":g,"--n-color":n,"--n-color-checked":r,"--n-color-table":l,"--n-color-table-modal":i,"--n-color-table-popover":s,"--n-color-disabled":a,"--n-color-disabled-checked":C,"--n-text-color":b,"--n-text-color-disabled":y,"--n-check-mark-color":c,"--n-check-mark-color-disabled":d,"--n-check-mark-color-disabled-checked":x,"--n-font-size":T,"--n-label-padding":S}}),x=a?Ce("checkbox",Do(()=>h.value[0]),y,e):void 0;return Object.assign(u,m,{rtlEnabled:b,selfRef:n,mergedClsPrefix:r,mergedDisabled:p,renderedChecked:d,mergedTheme:f,labelId:Ue(),handleClick:function(e){p.value||v(e)},handleKeyUp:function(e){if(!p.value)switch(e.key){case" ":case"Enter":v(e)}},handleKeyDown:function(e){if(" "===e.key)e.preventDefault()},cssVars:a?void 0:y,themeClass:null==x?void 0:x.themeClass,onRender:null==x?void 0:x.onRender})},render(){var e;const{$slots:o,renderedChecked:n,mergedDisabled:r,indeterminate:a,privateInsideTable:l,cssVars:i,labelId:c,label:d,mergedClsPrefix:u,focusable:p,handleKeyUp:h,handleKeyDown:f,handleClick:v}=this;null===(e=this.onRender)||void 0===e||e.call(this);const m=s(o.default,e=>d||e?So("span",{class:`${u}-checkbox__label`,id:c},d||e):null);return So("div",{ref:"selfRef",class:[`${u}-checkbox`,this.themeClass,this.rtlEnabled&&`${u}-checkbox--rtl`,n&&`${u}-checkbox--checked`,r&&`${u}-checkbox--disabled`,a&&`${u}-checkbox--indeterminate`,l&&`${u}-checkbox--inside-table`,m&&`${u}-checkbox--show-label`],tabindex:r||!p?void 0:0,role:"checkbox","aria-checked":a?"mixed":n,"aria-labelledby":c,style:i,onKeyup:h,onKeydown:f,onClick:v,onMousedown:()=>{Fe("selectstart",window,e=>{e.preventDefault()},{once:!0})}},So("div",{class:`${u}-checkbox-box-wrapper`}," ",So("div",{class:`${u}-checkbox-box`},So(t,null,{default:()=>this.indeterminate?So("div",{key:"indeterminate",class:`${u}-checkbox-icon`},So("svg",{viewBox:"0 0 100 100",class:"line-icon"},So("path",{d:"M80.2,55.5H21.4c-2.8,0-5.1-2.5-5.1-5.5l0,0c0-3,2.3-5.5,5.1-5.5h58.7c2.8,0,5.1,2.5,5.1,5.5l0,0C85.2,53.1,82.9,55.5,80.2,55.5z"}))):So("div",{key:"check",class:`${u}-checkbox-icon`},So("svg",{viewBox:"0 0 64 64",class:"check-icon"},So("path",{d:"M50.42,16.76L22.34,39.45l-8.1-11.46c-1.12-1.58-3.3-1.96-4.88-0.84c-1.58,1.12-1.95,3.3-0.84,4.88l10.26,14.51 c0.56,0.79,1.42,1.31,2.38,1.45c0.16,0.02,0.32,0.03,0.48,0.03c0.8,0,1.57-0.27,2.2-0.78l30.99-25.03c1.5-1.21,1.74-3.42,0.52-4.92 C54.13,15.78,51.93,15.55,50.42,16.76z"})))}),So("div",{class:`${u}-checkbox-box__border`}))),m)}}),Jc={name:"Code",common:_i,self(e){const{textColor2:o,fontSize:t,fontWeightStrong:n,textColor3:r}=e;return{textColor:o,fontSize:t,fontWeightStrong:n,"mono-3":"#5c6370","hue-1":"#56b6c2","hue-2":"#61aeee","hue-3":"#c678dd","hue-4":"#98c379","hue-5":"#e06c75","hue-5-2":"#be5046","hue-6":"#d19a66","hue-6-2":"#e6c07b",lineNumberTextColor:r}}};var Xc={name:"Code",common:l,self:function(e){const{textColor2:o,fontSize:t,fontWeightStrong:n,textColor3:r}=e;return{textColor:o,fontSize:t,fontWeightStrong:n,"mono-3":"#a0a1a7","hue-1":"#0184bb","hue-2":"#4078f2","hue-3":"#a626a4","hue-4":"#50a14f","hue-5":"#e45649","hue-5-2":"#c91243","hue-6":"#986801","hue-6-2":"#c18401",lineNumberTextColor:r}}};function Zc(e){const{fontWeight:o,textColor1:t,textColor2:n,textColorDisabled:r,dividerColor:a,fontSize:l}=e;return{titleFontSize:l,titleFontWeight:o,dividerColor:a,titleTextColor:t,titleTextColorDisabled:r,fontSize:l,textColor:n,arrowColor:n,arrowColorDisabled:r,itemMargin:"16px 0 0 0",titlePadding:"16px 0 0 0"}}var Qc={name:"Collapse",common:l,self:Zc},ed={name:"Collapse",common:_i,self:Zc};function od(e){const{cubicBezierEaseInOut:o}=e;return{bezier:o}}var td={name:"CollapseTransition",common:l,self:od},nd={name:"CollapseTransition",common:_i,self:od};function rd(e){const{fontSize:o,boxShadow2:t,popoverColor:n,textColor2:r,borderRadius:a,borderColor:l,heightSmall:i,heightMedium:s,heightLarge:c,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,dividerColor:h}=e;return{panelFontSize:o,boxShadow:t,color:n,textColor:r,borderRadius:a,border:`1px solid ${l}`,heightSmall:i,heightMedium:s,heightLarge:c,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,dividerColor:h}}var ad=S({name:"ColorPicker",common:l,peers:{Input:bn,Button:Ie},self:rd}),ld={name:"ColorPicker",common:_i,peers:{Input:ec,Button:$c},self:rd},id=po({name:"ConfigProvider",alias:["App"],props:{abstract:Boolean,bordered:{type:Boolean,default:void 0},clsPrefix:String,locale:Object,dateLocale:Object,namespace:String,rtl:Array,tag:{type:String,default:"div"},hljs:Object,katex:Object,theme:Object,themeOverrides:Object,componentOptions:Object,icons:Object,breakpoints:Object,preflightStyleDisabled:Boolean,styleMountTarget:Object,inlineThemeDisabled:{type:Boolean,default:void 0},as:{type:String,validator:()=>(z("config-provider","`as` is deprecated, please use `tag` instead."),!0),default:void 0}},setup(e){const t=ko(oe,null),n=Do(()=>{const{theme:o}=e;if(null===o)return;const n=null==t?void 0:t.mergedThemeRef.value;return void 0===o?n:void 0===n?o:Object.assign({},n,o)}),r=Do(()=>{const{themeOverrides:o}=e;if(null!==o){if(void 0===o)return null==t?void 0:t.mergedThemeOverridesRef.value;{const e=null==t?void 0:t.mergedThemeOverridesRef.value;return void 0===e?o:$({},e,o)}}}),a=o(()=>{const{namespace:o}=e;return void 0===o?null==t?void 0:t.mergedNamespaceRef.value:o}),l=o(()=>{const{bordered:o}=e;return void 0===o?null==t?void 0:t.mergedBorderedRef.value:o}),i=Do(()=>{const{icons:o}=e;return void 0===o?null==t?void 0:t.mergedIconsRef.value:o}),s=Do(()=>{const{componentOptions:o}=e;return void 0!==o?o:null==t?void 0:t.mergedComponentPropsRef.value}),c=Do(()=>{const{clsPrefix:o}=e;return void 0!==o?o:t?t.mergedClsPrefixRef.value:"n"}),d=Do(()=>{var o;const{rtl:n}=e;if(void 0===n)return null==t?void 0:t.mergedRtlRef.value;const r={};for(const e of n)r[e.name]=lt(e),null===(o=e.peers)||void 0===o||o.forEach(e=>{e.name in r||(r[e.name]=lt(e))});return r}),u=Do(()=>e.breakpoints||(null==t?void 0:t.mergedBreakpointsRef.value)),p=e.inlineThemeDisabled||(null==t?void 0:t.inlineThemeDisabled),h=e.preflightStyleDisabled||(null==t?void 0:t.preflightStyleDisabled),f=e.styleMountTarget||(null==t?void 0:t.styleMountTarget),v=Do(()=>{const{value:e}=n,{value:o}=r,t=o&&0!==Object.keys(o).length,a=null==e?void 0:e.name;return a?t?`${a}-${L(JSON.stringify(r.value))}`:a:t?L(JSON.stringify(r.value)):""});return go(oe,{mergedThemeHashRef:v,mergedBreakpointsRef:u,mergedRtlRef:d,mergedIconsRef:i,mergedComponentPropsRef:s,mergedBorderedRef:l,mergedNamespaceRef:a,mergedClsPrefixRef:c,mergedLocaleRef:Do(()=>{const{locale:o}=e;if(null!==o)return void 0===o?null==t?void 0:t.mergedLocaleRef.value:o}),mergedDateLocaleRef:Do(()=>{const{dateLocale:o}=e;if(null!==o)return void 0===o?null==t?void 0:t.mergedDateLocaleRef.value:o}),mergedHljsRef:Do(()=>{const{hljs:o}=e;return void 0===o?null==t?void 0:t.mergedHljsRef.value:o}),mergedKatexRef:Do(()=>{const{katex:o}=e;return void 0===o?null==t?void 0:t.mergedKatexRef.value:o}),mergedThemeRef:n,mergedThemeOverridesRef:r,inlineThemeDisabled:p||!1,preflightStyleDisabled:h||!1,styleMountTarget:f}),{mergedClsPrefix:c,mergedBordered:l,mergedNamespace:a,mergedTheme:n,mergedThemeOverrides:r}},render(){var e,o,t,n;return this.abstract?null===(n=(t=this.$slots).default)||void 0===n?void 0:n.call(t):So(this.as||this.tag,{class:`${this.mergedClsPrefix||"n"}-config-provider`},null===(o=(e=this.$slots).default)||void 0===o?void 0:o.call(e))}}),sd={name:"Popselect",common:_i,peers:{Popover:bs,InternalSelectMenu:us}};var cd=S({name:"Popselect",common:l,peers:{Popover:Sn,InternalSelectMenu:yn},self:function(e){const{boxShadow2:o}=e;return{menuBoxShadow:o}}}),dd={name:"Select",common:_i,peers:{InternalSelection:Ds,InternalSelectMenu:us},self:ln},ud=xe([ge("select","\n z-index: auto;\n outline: none;\n width: 100%;\n position: relative;\n font-weight: var(--n-font-weight);\n "),ge("select-menu","\n margin: 4px 0;\n box-shadow: var(--n-menu-box-shadow);\n ",[un({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),pd=po({name:"Select",props:Object.assign(Object.assign({},P.props),{to:zr.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,menuSize:{type:String},filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),slots:Object,setup(e){const{mergedClsPrefixRef:o,mergedBorderedRef:t,namespaceRef:r,inlineThemeDisabled:a}=be(e),l=P("Select","-select",ud,fn,e,o),i=it(e.defaultValue),s=jo(e,"value"),c=F(s,i),d=it(!1),u=it(""),p=G(e,["items","options"]),h=it([]),f=it([]),v=Do(()=>f.value.concat(h.value).concat(p.value)),m=Do(()=>{const{filter:o}=e;if(o)return o;const{labelField:t,valueField:n}=e;return(e,o)=>{if(!o)return!1;const r=o[t];if("string"==typeof r)return dc(e,r);const a=o[n];return"string"==typeof a?dc(e,a):"number"==typeof a&&dc(e,String(a))}}),g=Do(()=>{if(e.remote)return p.value;{const{value:o}=v,{value:t}=u;return t.length&&e.filterable?function(e,o,t,n){return o?function e(r){if(!Array.isArray(r))return[];const a=[];for(const l of r)if(sc(l)){const o=e(l[n]);o.length&&a.push(Object.assign({},l,{[n]:o}))}else{if(cc(l))continue;o(t,l)&&a.push(l)}return a}(e):e}(o,m.value,t,e.childrenField):o}}),b=Do(()=>{const{valueField:o,childrenField:t}=e,n=uc(o,t);return is(g.value,n)}),y=Do(()=>function(e,o,t){const n=new Map;return e.forEach(e=>{sc(e)?e[t].forEach(e=>{n.set(e[o],e)}):n.set(e[o],e)}),n}(v.value,e.valueField,e.childrenField)),x=it(!1),w=F(jo(e,"show"),x),S=it(null),k=it(null),T=it(null),{localeRef:I}=C("Select"),z=Do(()=>{var o;return null!==(o=e.placeholder)&&void 0!==o?o:I.value.placeholder}),M=[],R=it(new Map),A=Do(()=>{const{fallbackOption:o}=e;if(void 0===o){const{labelField:o,valueField:t}=e;return e=>({[o]:String(e),[t]:e})}return!1!==o&&(e=>Object.assign(o(e),{value:e}))});function $(o){const t=e.remote,{value:n}=R,{value:r}=y,{value:a}=A,l=[];return o.forEach(e=>{if(r.has(e))l.push(r.get(e));else if(t&&n.has(e))l.push(n.get(e));else if(a){const o=a(e);o&&l.push(o)}}),l}const O=Do(()=>{if(e.multiple){const{value:e}=c;return Array.isArray(e)?$(e):[]}return null}),B=Do(()=>{const{value:o}=c;return e.multiple||Array.isArray(o)||null===o?null:$([o])[0]||null}),E=Re(e),{mergedSizeRef:_,mergedDisabledRef:D,mergedStatusRef:L}=E;function j(o,t){const{onChange:n,"onUpdate:value":r,onUpdateValue:a}=e,{nTriggerFormChange:l,nTriggerFormInput:s}=E;n&&H(n,o,t),a&&H(a,o,t),r&&H(r,o,t),i.value=o,l(),s()}function U(o){const{onBlur:t}=e,{nTriggerFormBlur:n}=E;t&&H(t,o),n()}function W(){var o;const{remote:t,multiple:n}=e;if(t){const{value:t}=R;if(n){const{valueField:n}=e;null===(o=O.value)||void 0===o||o.forEach(e=>{t.set(e[n],e)})}else{const o=B.value;o&&t.set(o[e.valueField],o)}}}function N(o){const{onUpdateShow:t,"onUpdate:show":n}=e;t&&H(t,o),n&&H(n,o),x.value=o}function K(){D.value||(N(!0),x.value=!0,e.filterable&&te())}function V(){N(!1)}function q(){u.value="",f.value=M}const Y=it(!1);function J(e){X(e.rawNode)}function X(o){if(D.value)return;const{tag:t,remote:n,clearFilterAfterSelect:r,valueField:a}=e;if(t&&!n){const{value:e}=f,o=e[0]||null;if(o){const e=h.value;e.length?e.push(o):h.value=[o],f.value=M}}if(n&&R.value.set(o[a],o),e.multiple){const l=function(o){if(!Array.isArray(o))return[];if(A.value)return Array.from(o);{const{remote:t}=e,{value:n}=y;if(t){const{value:e}=R;return o.filter(o=>n.has(o)||e.has(o))}return o.filter(e=>n.has(e))}}(c.value),i=l.findIndex(e=>e===o[a]);if(~i){if(l.splice(i,1),t&&!n){const e=Q(o[a]);~e&&(h.value.splice(e,1),r&&(u.value=""))}}else l.push(o[a]),r&&(u.value="");j(l,$(l))}else{if(t&&!n){const e=Q(o[a]);h.value=~e?[h.value[e]]:M}oe(),V(),j(o[a],o)}}function Q(o){return h.value.findIndex(t=>t[e.valueField]===o)}function ee(o){var t,r,a,l,i;if(e.keyboard)switch(o.key){case" ":if(e.filterable)break;o.preventDefault();case"Enter":if(!(null===(t=S.value)||void 0===t?void 0:t.isComposing))if(w.value){const o=null===(r=T.value)||void 0===r?void 0:r.getPendingTmNode();o?J(o):e.filterable||(V(),oe())}else if(K(),e.tag&&Y.value){const o=f.value[0];if(o){const t=o[e.valueField],{value:n}=c;e.multiple&&Array.isArray(n)&&n.includes(t)||X(o)}}o.preventDefault();break;case"ArrowUp":if(o.preventDefault(),e.loading)return;w.value&&(null===(a=T.value)||void 0===a||a.prev());break;case"ArrowDown":if(o.preventDefault(),e.loading)return;w.value?null===(l=T.value)||void 0===l||l.next():K();break;case"Escape":w.value&&(n(o),V()),null===(i=S.value)||void 0===i||i.focus()}else o.preventDefault()}function oe(){var e;null===(e=S.value)||void 0===e||e.focus()}function te(){var e;null===(e=S.value)||void 0===e||e.focusInput()}W(),$o(jo(e,"options"),W);const ne={focus:()=>{var e;null===(e=S.value)||void 0===e||e.focus()},focusInput:()=>{var e;null===(e=S.value)||void 0===e||e.focusInput()},blur:()=>{var e;null===(e=S.value)||void 0===e||e.blur()},blurInput:()=>{var e;null===(e=S.value)||void 0===e||e.blurInput()}},re=Do(()=>{const{self:{menuBoxShadow:e}}=l.value;return{"--n-menu-box-shadow":e}}),ae=a?Ce("select",void 0,re,e):void 0;return Object.assign(Object.assign({},ne),{mergedStatus:L,mergedClsPrefix:o,mergedBordered:t,namespace:r,treeMate:b,isMounted:Z(),triggerRef:S,menuRef:T,pattern:u,uncontrolledShow:x,mergedShow:w,adjustedTo:zr(e),uncontrolledValue:i,mergedValue:c,followerRef:k,localizedPlaceholder:z,selectedOption:B,selectedOptions:O,mergedSize:_,mergedDisabled:D,focused:d,activeWithoutMenuOpen:Y,inlineThemeDisabled:a,onTriggerInputFocus:function(){e.filterable&&(Y.value=!0)},onTriggerInputBlur:function(){e.filterable&&(Y.value=!1,w.value||q())},handleTriggerOrMenuResize:function(){var e;w.value&&(null===(e=k.value)||void 0===e||e.syncPosition())},handleMenuFocus:function(){d.value=!0},handleMenuBlur:function(e){var o;(null===(o=S.value)||void 0===o?void 0:o.$el.contains(e.relatedTarget))||(d.value=!1,U(e),V())},handleMenuTabOut:function(){var e;null===(e=S.value)||void 0===e||e.focus(),V()},handleTriggerClick:function(){D.value||(w.value?e.filterable?te():V():K())},handleToggle:J,handleDeleteOption:X,handlePatternInput:function(o){w.value||K();const{value:t}=o.target;u.value=t;const{tag:n,remote:r}=e;if(function(o){const{onSearch:t}=e;t&&H(t,o)}(t),n&&!r){if(!t)return void(f.value=M);const{onCreate:o}=e,n=o?o(t):{[e.labelField]:t,[e.valueField]:t},{valueField:r,labelField:a}=e;p.value.some(e=>e[r]===n[r]||e[a]===n[a])||h.value.some(e=>e[r]===n[r]||e[a]===n[a])?f.value=M:f.value=[n]}},handleClear:function(o){o.stopPropagation();const{multiple:t}=e;!t&&e.filterable&&V(),function(){const{onClear:o}=e;o&&H(o)}(),t?j([],[]):j(null,null)},handleTriggerBlur:function(e){var o,t;(null===(t=null===(o=T.value)||void 0===o?void 0:o.selfRef)||void 0===t?void 0:t.contains(e.relatedTarget))||(d.value=!1,U(e),V())},handleTriggerFocus:function(o){!function(o){const{onFocus:t,showOnFocus:n}=e,{nTriggerFormFocus:r}=E;t&&H(t,o),r(),n&&K()}(o),d.value=!0},handleKeydown:ee,handleMenuAfterLeave:q,handleMenuClickOutside:function(e){var o;w.value&&((null===(o=S.value)||void 0===o?void 0:o.$el.contains(_e(e)))||V())},handleMenuScroll:function(o){!function(o){const{onScroll:t}=e;t&&H(t,o)}(o)},handleMenuKeydown:ee,handleMenuMousedown:function(e){xr(e,"action")||xr(e,"empty")||xr(e,"header")||e.preventDefault()},mergedTheme:l,cssVars:a?void 0:re,themeClass:null==ae?void 0:ae.themeClass,onRender:null==ae?void 0:ae.onRender})},render(){return So("div",{class:`${this.mergedClsPrefix}-select`},So(Or,null,{default:()=>[So(Br,null,{default:()=>So(Hs,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e,o;return[null===(o=(e=this.$slots).arrow)||void 0===o?void 0:o.call(e)]}})}),So(Qr,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===zr.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>So(Xo,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e,o,t;return this.mergedShow||"show"===this.displayDirective?(null===(e=this.onRender)||void 0===e||e.call(this),ct(So(gs,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,null===(o=this.menuProps)||void 0===o?void 0:o.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:this.menuSize,renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[null===(t=this.menuProps)||void 0===t?void 0:t.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var e,o;return[null===(o=(e=this.$slots).empty)||void 0===o?void 0:o.call(e)]},header:()=>{var e,o;return[null===(o=(e=this.$slots).header)||void 0===o?void 0:o.call(e)]},action:()=>{var e,o;return[null===(o=(e=this.$slots).action)||void 0===o?void 0:o.call(e)]}}),"show"===this.displayDirective?[[Wo,this.mergedShow],[uo,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[uo,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),hd={itemPaddingSmall:"0 4px",itemMarginSmall:"0 0 0 8px",itemMarginSmallRtl:"0 8px 0 0",itemPaddingMedium:"0 4px",itemMarginMedium:"0 0 0 8px",itemMarginMediumRtl:"0 8px 0 0",itemPaddingLarge:"0 4px",itemMarginLarge:"0 0 0 8px",itemMarginLargeRtl:"0 8px 0 0",buttonIconSizeSmall:"14px",buttonIconSizeMedium:"16px",buttonIconSizeLarge:"18px",inputWidthSmall:"60px",selectWidthSmall:"unset",inputMarginSmall:"0 0 0 8px",inputMarginSmallRtl:"0 8px 0 0",selectMarginSmall:"0 0 0 8px",prefixMarginSmall:"0 8px 0 0",suffixMarginSmall:"0 0 0 8px",inputWidthMedium:"60px",selectWidthMedium:"unset",inputMarginMedium:"0 0 0 8px",inputMarginMediumRtl:"0 8px 0 0",selectMarginMedium:"0 0 0 8px",prefixMarginMedium:"0 8px 0 0",suffixMarginMedium:"0 0 0 8px",inputWidthLarge:"60px",selectWidthLarge:"unset",inputMarginLarge:"0 0 0 8px",inputMarginLargeRtl:"0 8px 0 0",selectMarginLarge:"0 0 0 8px",prefixMarginLarge:"0 8px 0 0",suffixMarginLarge:"0 0 0 8px"};function fd(e){const{textColor2:o,primaryColor:t,primaryColorHover:n,primaryColorPressed:r,inputColorDisabled:a,textColorDisabled:l,borderColor:i,borderRadius:s,fontSizeTiny:c,fontSizeSmall:d,fontSizeMedium:u,heightTiny:p,heightSmall:h,heightMedium:f}=e;return Object.assign(Object.assign({},hd),{buttonColor:"#0000",buttonColorHover:"#0000",buttonColorPressed:"#0000",buttonBorder:`1px solid ${i}`,buttonBorderHover:`1px solid ${i}`,buttonBorderPressed:`1px solid ${i}`,buttonIconColor:o,buttonIconColorHover:o,buttonIconColorPressed:o,itemTextColor:o,itemTextColorHover:n,itemTextColorPressed:r,itemTextColorActive:t,itemTextColorDisabled:l,itemColor:"#0000",itemColorHover:"#0000",itemColorPressed:"#0000",itemColorActive:"#0000",itemColorActiveHover:"#0000",itemColorDisabled:a,itemBorder:"1px solid #0000",itemBorderHover:"1px solid #0000",itemBorderPressed:"1px solid #0000",itemBorderActive:`1px solid ${t}`,itemBorderDisabled:`1px solid ${i}`,itemBorderRadius:s,itemSizeSmall:p,itemSizeMedium:h,itemSizeLarge:f,itemFontSizeSmall:c,itemFontSizeMedium:d,itemFontSizeLarge:u,jumperFontSizeSmall:c,jumperFontSizeMedium:d,jumperFontSizeLarge:u,jumperTextColor:o,jumperTextColorDisabled:l})}var vd=S({name:"Pagination",common:l,peers:{Select:fn,Input:bn,Popselect:cd},self:fd}),md={name:"Pagination",common:_i,peers:{Select:dd,Input:ec,Popselect:sd},self(e){const{primaryColor:o,opacity3:t}=e,n=ne(o,{alpha:Number(t)}),r=fd(e);return r.itemBorderActive=`1px solid ${n}`,r.itemBorderDisabled="1px solid #0000",r}},gd={padding:"4px 0",optionIconSizeSmall:"14px",optionIconSizeMedium:"16px",optionIconSizeLarge:"16px",optionIconSizeHuge:"18px",optionSuffixWidthSmall:"14px",optionSuffixWidthMedium:"14px",optionSuffixWidthLarge:"16px",optionSuffixWidthHuge:"16px",optionIconSuffixWidthSmall:"32px",optionIconSuffixWidthMedium:"32px",optionIconSuffixWidthLarge:"36px",optionIconSuffixWidthHuge:"36px",optionPrefixWidthSmall:"14px",optionPrefixWidthMedium:"14px",optionPrefixWidthLarge:"16px",optionPrefixWidthHuge:"16px",optionIconPrefixWidthSmall:"36px",optionIconPrefixWidthMedium:"36px",optionIconPrefixWidthLarge:"40px",optionIconPrefixWidthHuge:"40px"};function bd(e){const{primaryColor:o,textColor2:t,dividerColor:n,hoverColor:r,popoverColor:a,invertedColor:l,borderRadius:i,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:d,fontSizeHuge:u,heightSmall:p,heightMedium:h,heightLarge:f,heightHuge:v,textColor3:m,opacityDisabled:g}=e;return Object.assign(Object.assign({},gd),{optionHeightSmall:p,optionHeightMedium:h,optionHeightLarge:f,optionHeightHuge:v,borderRadius:i,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:d,fontSizeHuge:u,optionTextColor:t,optionTextColorHover:t,optionTextColorActive:o,optionTextColorChildActive:o,color:a,dividerColor:n,suffixColor:t,prefixColor:t,optionColorHover:r,optionColorActive:ne(o,{alpha:.1}),groupHeaderTextColor:m,optionTextColorInverted:"#BBB",optionTextColorHoverInverted:"#FFF",optionTextColorActiveInverted:"#FFF",optionTextColorChildActiveInverted:"#FFF",colorInverted:l,dividerColorInverted:"#BBB",suffixColorInverted:"#BBB",prefixColorInverted:"#BBB",optionColorHoverInverted:o,optionColorActiveInverted:o,groupHeaderTextColorInverted:"#AAA",optionOpacityDisabled:g})}var yd=S({name:"Dropdown",common:l,peers:{Popover:Sn},self:bd}),xd={name:"Dropdown",common:_i,peers:{Popover:bs},self(e){const{primaryColorSuppl:o,primaryColor:t,popoverColor:n}=e,r=bd(e);return r.colorInverted=n,r.optionColorActive=ne(t,{alpha:.15}),r.optionColorActiveInverted=o,r.optionColorHoverInverted=o,r}},Cd={padding:"8px 14px"},wd={name:"Tooltip",common:_i,peers:{Popover:bs},self(e){const{borderRadius:o,boxShadow2:t,popoverColor:n,textColor2:r}=e;return Object.assign(Object.assign({},Cd),{borderRadius:o,boxShadow:t,color:n,textColor:r})}};var Sd=S({name:"Tooltip",common:l,peers:{Popover:Sn},self:function(e){const{borderRadius:o,boxShadow2:t,baseColor:n}=e;return Object.assign(Object.assign({},Cd),{borderRadius:o,boxShadow:t,color:Be(n,"rgba(0, 0, 0, .85)"),textColor:n})}}),kd={name:"Ellipsis",common:_i,peers:{Tooltip:wd}},Pd=S({name:"Ellipsis",common:l,peers:{Tooltip:Sd}}),Td={radioSizeSmall:"14px",radioSizeMedium:"16px",radioSizeLarge:"18px",labelPadding:"0 8px",labelFontWeight:"400"},Id={name:"Radio",common:_i,self(e){const{borderColor:o,primaryColor:t,baseColor:n,textColorDisabled:r,inputColorDisabled:a,textColor2:l,opacityDisabled:i,borderRadius:s,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,heightSmall:p,heightMedium:h,heightLarge:f,lineHeight:v}=e;return Object.assign(Object.assign({},Td),{labelLineHeight:v,buttonHeightSmall:p,buttonHeightMedium:h,buttonHeightLarge:f,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,boxShadow:`inset 0 0 0 1px ${o}`,boxShadowActive:`inset 0 0 0 1px ${t}`,boxShadowFocus:`inset 0 0 0 1px ${t}, 0 0 0 2px ${ne(t,{alpha:.3})}`,boxShadowHover:`inset 0 0 0 1px ${t}`,boxShadowDisabled:`inset 0 0 0 1px ${o}`,color:"#0000",colorDisabled:a,colorActive:"#0000",textColor:l,textColorDisabled:r,dotColorActive:t,dotColorDisabled:o,buttonBorderColor:o,buttonBorderColorActive:t,buttonBorderColorHover:t,buttonColor:"#0000",buttonColorActive:t,buttonTextColor:l,buttonTextColorActive:n,buttonTextColorHover:t,opacityDisabled:i,buttonBoxShadowFocus:`inset 0 0 0 1px ${t}, 0 0 0 2px ${ne(t,{alpha:.3})}`,buttonBoxShadowHover:`inset 0 0 0 1px ${t}`,buttonBoxShadow:"inset 0 0 0 1px #0000",buttonBorderRadius:s})}};var zd={name:"Radio",common:l,self:function(e){const{borderColor:o,primaryColor:t,baseColor:n,textColorDisabled:r,inputColorDisabled:a,textColor2:l,opacityDisabled:i,borderRadius:s,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,heightSmall:p,heightMedium:h,heightLarge:f,lineHeight:v}=e;return Object.assign(Object.assign({},Td),{labelLineHeight:v,buttonHeightSmall:p,buttonHeightMedium:h,buttonHeightLarge:f,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,boxShadow:`inset 0 0 0 1px ${o}`,boxShadowActive:`inset 0 0 0 1px ${t}`,boxShadowFocus:`inset 0 0 0 1px ${t}, 0 0 0 2px ${ne(t,{alpha:.2})}`,boxShadowHover:`inset 0 0 0 1px ${t}`,boxShadowDisabled:`inset 0 0 0 1px ${o}`,color:n,colorDisabled:a,colorActive:"#0000",textColor:l,textColorDisabled:r,dotColorActive:t,dotColorDisabled:o,buttonBorderColor:o,buttonBorderColorActive:t,buttonBorderColorHover:o,buttonColor:n,buttonColorActive:n,buttonTextColor:l,buttonTextColorActive:t,buttonTextColorHover:t,opacityDisabled:i,buttonBoxShadowFocus:`inset 0 0 0 1px ${t}, 0 0 0 2px ${ne(t,{alpha:.3})}`,buttonBoxShadowHover:"inset 0 0 0 1px #0000",buttonBoxShadow:"inset 0 0 0 1px #0000",buttonBorderRadius:s})}},Md={thPaddingSmall:"8px",thPaddingMedium:"12px",thPaddingLarge:"12px",tdPaddingSmall:"8px",tdPaddingMedium:"12px",tdPaddingLarge:"12px",sorterSize:"15px",resizableContainerSize:"8px",resizableSize:"2px",filterSize:"15px",paginationMargin:"12px 0 0 0",emptyPadding:"48px 0",actionPadding:"8px 12px",actionButtonMargin:"0 8px 0 0"};function Rd(e){const{cardColor:o,modalColor:t,popoverColor:n,textColor2:r,textColor1:a,tableHeaderColor:l,tableColorHover:i,iconColor:s,primaryColor:c,fontWeightStrong:d,borderRadius:u,lineHeight:p,fontSizeSmall:h,fontSizeMedium:f,fontSizeLarge:v,dividerColor:m,heightSmall:g,opacityDisabled:b,tableColorStriped:y}=e;return Object.assign(Object.assign({},Md),{actionDividerColor:m,lineHeight:p,borderRadius:u,fontSizeSmall:h,fontSizeMedium:f,fontSizeLarge:v,borderColor:Be(o,m),tdColorHover:Be(o,i),tdColorSorting:Be(o,i),tdColorStriped:Be(o,y),thColor:Be(o,l),thColorHover:Be(Be(o,l),i),thColorSorting:Be(Be(o,l),i),tdColor:o,tdTextColor:r,thTextColor:a,thFontWeight:d,thButtonColorHover:i,thIconColor:s,thIconColorActive:c,borderColorModal:Be(t,m),tdColorHoverModal:Be(t,i),tdColorSortingModal:Be(t,i),tdColorStripedModal:Be(t,y),thColorModal:Be(t,l),thColorHoverModal:Be(Be(t,l),i),thColorSortingModal:Be(Be(t,l),i),tdColorModal:t,borderColorPopover:Be(n,m),tdColorHoverPopover:Be(n,i),tdColorSortingPopover:Be(n,i),tdColorStripedPopover:Be(n,y),thColorPopover:Be(n,l),thColorHoverPopover:Be(Be(n,l),i),thColorSortingPopover:Be(Be(n,l),i),tdColorPopover:n,boxShadowBefore:"inset -12px 0 8px -12px rgba(0, 0, 0, .18)",boxShadowAfter:"inset 12px 0 8px -12px rgba(0, 0, 0, .18)",loadingColor:c,loadingSize:g,opacityLoading:b})}var Ad=S({name:"DataTable",common:l,peers:{Button:Ie,Checkbox:Rn,Radio:zd,Pagination:vd,Scrollbar:ro,Empty:Q,Popover:Sn,Ellipsis:Pd,Dropdown:yd},self:Rd}),Fd={name:"DataTable",common:_i,peers:{Button:$c,Checkbox:Uc,Radio:Id,Pagination:md,Scrollbar:Di,Empty:ss,Popover:bs,Ellipsis:kd,Dropdown:xd},self(e){const o=Rd(e);return o.boxShadowAfter="inset 12px 0 8px -12px rgba(0, 0, 0, .36)",o.boxShadowBefore="inset -12px 0 8px -12px rgba(0, 0, 0, .36)",o}},$d=ge("radio","\n line-height: var(--n-label-line-height);\n outline: none;\n position: relative;\n user-select: none;\n -webkit-user-select: none;\n display: inline-flex;\n align-items: flex-start;\n flex-wrap: nowrap;\n font-size: var(--n-font-size);\n word-break: break-word;\n",[so("checked",[eo("dot","\n background-color: var(--n-color-active);\n ")]),eo("dot-wrapper","\n position: relative;\n flex-shrink: 0;\n flex-grow: 0;\n width: var(--n-radio-size);\n "),ge("radio-input","\n position: absolute;\n border: 0;\n width: 0;\n height: 0;\n opacity: 0;\n margin: 0;\n "),eo("dot","\n position: absolute;\n top: 50%;\n left: 0;\n transform: translateY(-50%);\n height: var(--n-radio-size);\n width: var(--n-radio-size);\n background: var(--n-color);\n box-shadow: var(--n-box-shadow);\n border-radius: 50%;\n transition:\n background-color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier);\n ",[xe("&::before",'\n content: "";\n opacity: 0;\n position: absolute;\n left: 4px;\n top: 4px;\n height: calc(100% - 8px);\n width: calc(100% - 8px);\n border-radius: 50%;\n transform: scale(.8);\n background: var(--n-dot-color-active);\n transition: \n opacity .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n transform .3s var(--n-bezier);\n '),so("checked",{boxShadow:"var(--n-box-shadow-active)"},[xe("&::before","\n opacity: 1;\n transform: scale(1);\n ")])]),eo("label","\n color: var(--n-text-color);\n padding: var(--n-label-padding);\n font-weight: var(--n-label-font-weight);\n display: inline-block;\n transition: color .3s var(--n-bezier);\n "),le("disabled","\n cursor: pointer;\n ",[xe("&:hover",[eo("dot",{boxShadow:"var(--n-box-shadow-hover)"})]),so("focus",[xe("&:not(:active)",[eo("dot",{boxShadow:"var(--n-box-shadow-focus)"})])])]),so("disabled","\n cursor: not-allowed;\n ",[eo("dot",{boxShadow:"var(--n-box-shadow-disabled)",backgroundColor:"var(--n-color-disabled)"},[xe("&::before",{backgroundColor:"var(--n-dot-color-disabled)"}),so("checked","\n opacity: 1;\n ")]),eo("label",{color:"var(--n-text-color-disabled)"}),ge("radio-input","\n cursor: not-allowed;\n ")])]),Od={name:String,value:{type:[String,Number,Boolean],default:"on"},checked:{type:Boolean,default:void 0},defaultChecked:Boolean,disabled:{type:Boolean,default:void 0},label:String,size:String,onUpdateChecked:[Function,Array],"onUpdate:checked":[Function,Array],checkedValue:{type:Boolean,default:void 0}},Bd=J("n-radio-group");function Ed(e){const t=ko(Bd,null),n=Re(e,{mergedSize(o){const{size:n}=e;if(void 0!==n)return n;if(t){const{mergedSizeRef:{value:e}}=t;if(void 0!==e)return e}return o?o.mergedSize.value:"medium"},mergedDisabled:o=>!!e.disabled||(!!(null==t?void 0:t.disabledRef.value)||!!(null==o?void 0:o.disabled.value))}),{mergedSizeRef:r,mergedDisabledRef:a}=n,l=it(null),i=it(null),s=it(e.defaultChecked),c=jo(e,"checked"),d=F(c,s),u=o(()=>t?t.valueRef.value===e.value:d.value),p=o(()=>{const{name:o}=e;return void 0!==o?o:t?t.nameRef.value:void 0}),h=it(!1);function f(){a.value||u.value||function(){if(t){const{doUpdateValue:o}=t,{value:n}=e;H(o,n)}else{const{onUpdateChecked:o,"onUpdate:checked":t}=e,{nTriggerFormInput:r,nTriggerFormChange:a}=n;o&&H(o,!0),t&&H(t,!0),r(),a(),s.value=!0}}()}return{mergedClsPrefix:t?t.mergedClsPrefixRef:be(e).mergedClsPrefixRef,inputRef:l,labelRef:i,mergedName:p,mergedDisabled:a,renderSafeChecked:u,focus:h,mergedSize:r,handleRadioInputChange:function(){f(),l.value&&(l.value.checked=u.value)},handleRadioInputBlur:function(){h.value=!1},handleRadioInputFocus:function(){h.value=!0}}}var _d=po({name:"Radio",props:Object.assign(Object.assign({},P.props),Od),setup(e){const o=Ed(e),t=P("Radio","-radio",$d,zd,e,o.mergedClsPrefix),n=Do(()=>{const{mergedSize:{value:e}}=o,{common:{cubicBezierEaseInOut:n},self:{boxShadow:r,boxShadowActive:a,boxShadowDisabled:l,boxShadowFocus:i,boxShadowHover:s,color:c,colorDisabled:d,colorActive:u,textColor:p,textColorDisabled:h,dotColorActive:f,dotColorDisabled:v,labelPadding:m,labelLineHeight:g,labelFontWeight:b,[ao("fontSize",e)]:y,[ao("radioSize",e)]:x}}=t.value;return{"--n-bezier":n,"--n-label-line-height":g,"--n-label-font-weight":b,"--n-box-shadow":r,"--n-box-shadow-active":a,"--n-box-shadow-disabled":l,"--n-box-shadow-focus":i,"--n-box-shadow-hover":s,"--n-color":c,"--n-color-active":u,"--n-color-disabled":d,"--n-dot-color-active":f,"--n-dot-color-disabled":v,"--n-font-size":y,"--n-radio-size":x,"--n-text-color":p,"--n-text-color-disabled":h,"--n-label-padding":m}}),{inlineThemeDisabled:r,mergedClsPrefixRef:a,mergedRtlRef:l}=be(e),i=g("Radio",l,a),s=r?Ce("radio",Do(()=>o.mergedSize.value[0]),n,e):void 0;return Object.assign(o,{rtlEnabled:i,cssVars:r?void 0:n,themeClass:null==s?void 0:s.themeClass,onRender:null==s?void 0:s.onRender})},render(){const{$slots:e,mergedClsPrefix:o,onRender:t,label:n}=this;return null==t||t(),So("label",{class:[`${o}-radio`,this.themeClass,this.rtlEnabled&&`${o}-radio--rtl`,this.mergedDisabled&&`${o}-radio--disabled`,this.renderSafeChecked&&`${o}-radio--checked`,this.focus&&`${o}-radio--focus`],style:this.cssVars},So("div",{class:`${o}-radio__dot-wrapper`}," ",So("div",{class:[`${o}-radio__dot`,this.renderSafeChecked&&`${o}-radio__dot--checked`]}),So("input",{ref:"inputRef",type:"radio",class:`${o}-radio-input`,value:this.value,name:this.mergedName,checked:this.renderSafeChecked,disabled:this.mergedDisabled,onChange:this.handleRadioInputChange,onFocus:this.handleRadioInputFocus,onBlur:this.handleRadioInputBlur})),s(e.default,e=>e||n?So("div",{ref:"labelRef",class:`${o}-radio__label`},e||n):null))}}),Dd=ge("radio-group","\n display: inline-block;\n font-size: var(--n-font-size);\n",[eo("splitor","\n display: inline-block;\n vertical-align: bottom;\n width: 1px;\n transition:\n background-color .3s var(--n-bezier),\n opacity .3s var(--n-bezier);\n background: var(--n-button-border-color);\n ",[so("checked",{backgroundColor:"var(--n-button-border-color-active)"}),so("disabled",{opacity:"var(--n-opacity-disabled)"})]),so("button-group","\n white-space: nowrap;\n height: var(--n-height);\n line-height: var(--n-height);\n ",[ge("radio-button",{height:"var(--n-height)",lineHeight:"var(--n-height)"}),eo("splitor",{height:"var(--n-height)"})]),ge("radio-button","\n vertical-align: bottom;\n outline: none;\n position: relative;\n user-select: none;\n -webkit-user-select: none;\n display: inline-block;\n box-sizing: border-box;\n padding-left: 14px;\n padding-right: 14px;\n white-space: nowrap;\n transition:\n background-color .3s var(--n-bezier),\n opacity .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n background: var(--n-button-color);\n color: var(--n-button-text-color);\n border-top: 1px solid var(--n-button-border-color);\n border-bottom: 1px solid var(--n-button-border-color);\n ",[ge("radio-input","\n pointer-events: none;\n position: absolute;\n border: 0;\n border-radius: inherit;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n opacity: 0;\n z-index: 1;\n "),eo("state-border","\n z-index: 1;\n pointer-events: none;\n position: absolute;\n box-shadow: var(--n-button-box-shadow);\n transition: box-shadow .3s var(--n-bezier);\n left: -1px;\n bottom: -1px;\n right: -1px;\n top: -1px;\n "),xe("&:first-child","\n border-top-left-radius: var(--n-button-border-radius);\n border-bottom-left-radius: var(--n-button-border-radius);\n border-left: 1px solid var(--n-button-border-color);\n ",[eo("state-border","\n border-top-left-radius: var(--n-button-border-radius);\n border-bottom-left-radius: var(--n-button-border-radius);\n ")]),xe("&:last-child","\n border-top-right-radius: var(--n-button-border-radius);\n border-bottom-right-radius: var(--n-button-border-radius);\n border-right: 1px solid var(--n-button-border-color);\n ",[eo("state-border","\n border-top-right-radius: var(--n-button-border-radius);\n border-bottom-right-radius: var(--n-button-border-radius);\n ")]),le("disabled","\n cursor: pointer;\n ",[xe("&:hover",[eo("state-border","\n transition: box-shadow .3s var(--n-bezier);\n box-shadow: var(--n-button-box-shadow-hover);\n "),le("checked",{color:"var(--n-button-text-color-hover)"})]),so("focus",[xe("&:not(:active)",[eo("state-border",{boxShadow:"var(--n-button-box-shadow-focus)"})])])]),so("checked","\n background: var(--n-button-color-active);\n color: var(--n-button-text-color-active);\n border-color: var(--n-button-border-color-active);\n "),so("disabled","\n cursor: not-allowed;\n opacity: var(--n-opacity-disabled);\n ")])]);var Ld=po({name:"RadioGroup",props:Object.assign(Object.assign({},P.props),{name:String,value:[String,Number,Boolean],defaultValue:{type:[String,Number,Boolean],default:null},size:String,disabled:{type:Boolean,default:void 0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array]}),setup(e){const o=it(null),{mergedSizeRef:t,mergedDisabledRef:n,nTriggerFormChange:r,nTriggerFormInput:a,nTriggerFormBlur:l,nTriggerFormFocus:i}=Re(e),{mergedClsPrefixRef:s,inlineThemeDisabled:c,mergedRtlRef:d}=be(e),u=P("Radio","-radio-group",Dd,zd,e,s),p=it(e.defaultValue),h=jo(e,"value"),f=F(h,p);go(Bd,{mergedClsPrefixRef:s,nameRef:jo(e,"name"),valueRef:f,disabledRef:n,mergedSizeRef:t,doUpdateValue:function(o){const{onUpdateValue:t,"onUpdate:value":n}=e;t&&H(t,o),n&&H(n,o),p.value=o,r(),a()}});const v=g("Radio",d,s),m=Do(()=>{const{value:e}=t,{common:{cubicBezierEaseInOut:o},self:{buttonBorderColor:n,buttonBorderColorActive:r,buttonBorderRadius:a,buttonBoxShadow:l,buttonBoxShadowFocus:i,buttonBoxShadowHover:s,buttonColor:c,buttonColorActive:d,buttonTextColor:p,buttonTextColorActive:h,buttonTextColorHover:f,opacityDisabled:v,[ao("buttonHeight",e)]:m,[ao("fontSize",e)]:g}}=u.value;return{"--n-font-size":g,"--n-bezier":o,"--n-button-border-color":n,"--n-button-border-color-active":r,"--n-button-border-radius":a,"--n-button-box-shadow":l,"--n-button-box-shadow-focus":i,"--n-button-box-shadow-hover":s,"--n-button-color":c,"--n-button-color-active":d,"--n-button-text-color":p,"--n-button-text-color-hover":f,"--n-button-text-color-active":h,"--n-height":m,"--n-opacity-disabled":v}}),b=c?Ce("radio-group",Do(()=>t.value[0]),m,e):void 0;return{selfElRef:o,rtlEnabled:v,mergedClsPrefix:s,mergedValue:f,handleFocusout:function(e){const{value:t}=o;t&&(t.contains(e.relatedTarget)||l())},handleFocusin:function(e){const{value:t}=o;t&&(t.contains(e.relatedTarget)||i())},cssVars:c?void 0:m,themeClass:null==b?void 0:b.themeClass,onRender:null==b?void 0:b.onRender}},render(){var e;const{mergedValue:o,mergedClsPrefix:t,handleFocusin:n,handleFocusout:r}=this,{children:a,isButtonGroup:l}=function(e,o,t){var n;const r=[];let a=!1;for(let l=0;l<e.length;++l){const i=e[l],s=null===(n=i.type)||void 0===n?void 0:n.name;"RadioButton"===s&&(a=!0);const c=i.props;if("RadioButton"===s)if(0===l)r.push(i);else{const e=r[r.length-1].props,n=o===e.value,a=e.disabled,l=o===c.value,s=c.disabled,d=(n?2:0)+(a?0:1),u=(l?2:0)+(s?0:1),p={[`${t}-radio-group__splitor--disabled`]:a,[`${t}-radio-group__splitor--checked`]:n},h=d<u?{[`${t}-radio-group__splitor--disabled`]:s,[`${t}-radio-group__splitor--checked`]:l}:p;r.push(So("div",{class:[`${t}-radio-group__splitor`,h]}),i)}else r.push(i)}return{children:r,isButtonGroup:a}}(Tn(pa(this)),o,t);return null===(e=this.onRender)||void 0===e||e.call(this),So("div",{onFocusin:n,onFocusout:r,ref:"selfElRef",class:[`${t}-radio-group`,this.rtlEnabled&&`${t}-radio-group--rtl`,this.themeClass,l&&`${t}-radio-group--button-group`],style:this.cssVars},a)}}),Hd=po({name:"Tooltip",props:Object.assign(Object.assign({},Ms),P.props),slots:Object,__popover__:!0,setup(e){const{mergedClsPrefixRef:o}=be(e),t=P("Tooltip","-tooltip",void 0,Sd,e,o),n=it(null);return Object.assign(Object.assign({},{syncPosition(){n.value.syncPosition()},setShow(e){n.value.setShow(e)}}),{popoverRef:n,mergedTheme:t,popoverThemeOverrides:Do(()=>t.value.self)})},render(){const{mergedTheme:e,internalExtraClass:o}=this;return So(Rs,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:o.concat("tooltip"),ref:"popoverRef"}),this.$slots)}}),jd=J("n-dropdown-menu"),Ud=J("n-dropdown"),Wd=J("n-dropdown-option"),Nd=po({name:"DropdownDivider",props:{clsPrefix:{type:String,required:!0}},render(){return So("div",{class:`${this.clsPrefix}-dropdown-divider`})}}),Kd=po({name:"DropdownGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{showIconRef:e,hasSubmenuRef:o}=ko(jd),{renderLabelRef:t,labelFieldRef:n,nodePropsRef:r,renderOptionRef:a}=ko(Ud);return{labelField:n,showIcon:e,hasSubmenu:o,renderLabel:t,nodeProps:r,renderOption:a}},render(){var e;const{clsPrefix:o,hasSubmenu:t,showIcon:n,nodeProps:r,renderLabel:a,renderOption:l}=this,{rawNode:i}=this.tmNode,s=So("div",Object.assign({class:`${o}-dropdown-option`},null==r?void 0:r(i)),So("div",{class:`${o}-dropdown-option-body ${o}-dropdown-option-body--group`},So("div",{"data-dropdown-option":!0,class:[`${o}-dropdown-option-body__prefix`,n&&`${o}-dropdown-option-body__prefix--show-icon`]},hn(i.icon)),So("div",{class:`${o}-dropdown-option-body__label`,"data-dropdown-option":!0},a?a(i):hn(null!==(e=i.title)&&void 0!==e?e:i[this.labelField])),So("div",{class:[`${o}-dropdown-option-body__suffix`,t&&`${o}-dropdown-option-body__suffix--has-submenu`],"data-dropdown-option":!0})));return l?l({node:s,option:i}):s}}),Vd={name:"Icon",common:_i,self:Oe};function qd(e,o){return"submenu"===e.type||void 0===e.type&&void 0!==e[o]}function Gd(e){return"divider"===e.type}var Yd=po({name:"DropdownOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null},placement:{type:String,default:"right-start"},props:Object,scrollable:Boolean},setup(e){const t=ko(Ud),{hoverKeyRef:n,keyboardKeyRef:r,lastToggledSubmenuKeyRef:a,pendingKeyPathRef:l,activeKeyPathRef:i,animatedRef:s,mergedShowRef:c,renderLabelRef:d,renderIconRef:u,labelFieldRef:p,childrenFieldRef:h,renderOptionRef:f,nodePropsRef:v,menuPropsRef:m}=t,g=ko(Wd,null),b=ko(jd),y=ko(U),x=Do(()=>e.tmNode.rawNode),C=Do(()=>{const{value:o}=h;return qd(e.tmNode.rawNode,o)}),w=Do(()=>{const{disabled:o}=e.tmNode;return o}),S=function(e,o,t){if(!o)return e;const n=it(e.value);let r=null;return $o(e,e=>{null!==r&&window.clearTimeout(r),!0===e?t&&!t.value?n.value=!0:r=window.setTimeout(()=>{n.value=!0},o):n.value=!1}),n}(Do(()=>{if(!C.value)return!1;const{key:o,disabled:t}=e.tmNode;if(t)return!1;const{value:i}=n,{value:s}=r,{value:c}=a,{value:d}=l;return null!==i?d.includes(o):null!==s?d.includes(o)&&d[d.length-1]!==o:null!==c&&d.includes(o)}),300,Do(()=>null===r.value&&!s.value)),k=Do(()=>!!(null==g?void 0:g.enteringSubmenuRef.value)),P=it(!1);function T(){const{parentKey:o,tmNode:t}=e;t.disabled||c.value&&(a.value=o,r.value=null,n.value=t.key)}return go(Wd,{enteringSubmenuRef:P}),{labelField:p,renderLabel:d,renderIcon:u,siblingHasIcon:b.showIconRef,siblingHasSubmenu:b.hasSubmenuRef,menuProps:m,popoverBody:y,animated:s,mergedShowSubmenu:Do(()=>S.value&&!k.value),rawNode:x,hasSubmenu:C,pending:o(()=>{const{value:o}=l,{key:t}=e.tmNode;return o.includes(t)}),childActive:o(()=>{const{value:o}=i,{key:t}=e.tmNode,n=o.findIndex(e=>t===e);return-1!==n&&n<o.length-1}),active:o(()=>{const{value:o}=i,{key:t}=e.tmNode,n=o.findIndex(e=>t===e);return-1!==n&&n===o.length-1}),mergedDisabled:w,renderOption:f,nodeProps:v,handleClick:function(){const{value:o}=C,{tmNode:n}=e;c.value&&(o||n.disabled||(t.doSelect(n.key,n.rawNode),t.doUpdateShow(!1)))},handleMouseMove:function(){const{tmNode:o}=e;o.disabled||c.value&&n.value!==o.key&&T()},handleMouseEnter:T,handleMouseLeave:function(o){if(e.tmNode.disabled)return;if(!c.value)return;const{relatedTarget:t}=o;!t||xr({target:t},"dropdownOption")||xr({target:t},"scrollbarRail")||(n.value=null)},handleSubmenuBeforeEnter:function(){P.value=!0},handleSubmenuAfterEnter:function(){P.value=!1}}},render(){var e,o;const{animated:t,rawNode:n,mergedShowSubmenu:r,clsPrefix:a,siblingHasIcon:l,siblingHasSubmenu:i,renderLabel:s,renderIcon:c,renderOption:d,nodeProps:u,props:p,scrollable:h}=this;let f=null;if(r){const o=null===(e=this.menuProps)||void 0===e?void 0:e.call(this,n,n.children);f=So(Zd,Object.assign({},o,{clsPrefix:a,scrollable:this.scrollable,tmNodes:this.tmNode.children,parentKey:this.tmNode.key}))}const v={class:[`${a}-dropdown-option-body`,this.pending&&`${a}-dropdown-option-body--pending`,this.active&&`${a}-dropdown-option-body--active`,this.childActive&&`${a}-dropdown-option-body--child-active`,this.mergedDisabled&&`${a}-dropdown-option-body--disabled`],onMousemove:this.handleMouseMove,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onClick:this.handleClick},m=null==u?void 0:u(n),g=So("div",Object.assign({class:[`${a}-dropdown-option`,null==m?void 0:m.class],"data-dropdown-option":!0},m),So("div",mo(v,p),[So("div",{class:[`${a}-dropdown-option-body__prefix`,l&&`${a}-dropdown-option-body__prefix--show-icon`]},[c?c(n):hn(n.icon)]),So("div",{"data-dropdown-option":!0,class:`${a}-dropdown-option-body__label`},s?s(n):hn(null!==(o=n[this.labelField])&&void 0!==o?o:n.title)),So("div",{"data-dropdown-option":!0,class:[`${a}-dropdown-option-body__suffix`,i&&`${a}-dropdown-option-body__suffix--has-submenu`]},this.hasSubmenu?So(we,null,{default:()=>So(Il,null)}):null)]),this.hasSubmenu?So(Or,null,{default:()=>[So(Br,null,{default:()=>So("div",{class:`${a}-dropdown-offset-container`},So(Qr,{show:this.mergedShowSubmenu,placement:this.placement,to:h&&this.popoverBody||void 0,teleportDisabled:!h},{default:()=>So("div",{class:`${a}-dropdown-menu-wrapper`},t?So(Xo,{onBeforeEnter:this.handleSubmenuBeforeEnter,onAfterEnter:this.handleSubmenuAfterEnter,name:"fade-in-scale-up-transition",appear:!0},{default:()=>f}):f)}))})]}):null);return d?d({node:g,option:n}):g}}),Jd=po({name:"NDropdownGroup",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null}},render(){const{tmNode:e,parentKey:o,clsPrefix:t}=this,{children:n}=e;return So(No,null,So(Kd,{clsPrefix:t,tmNode:e,key:e.key}),null==n?void 0:n.map(e=>{const{rawNode:n}=e;return!1===n.show?null:Gd(n)?So(Nd,{clsPrefix:t,key:e.key}):e.isGroup?(z("dropdown","`group` node is not allowed to be put in `group` node."),null):So(Yd,{clsPrefix:t,tmNode:e,parentKey:o,key:e.key})}))}}),Xd=po({name:"DropdownRenderOption",props:{tmNode:{type:Object,required:!0}},render(){const{rawNode:{render:e,props:o}}=this.tmNode;return So("div",o,[null==e?void 0:e()])}}),Zd=po({name:"DropdownMenu",props:{scrollable:Boolean,showArrow:Boolean,arrowStyle:[String,Object],clsPrefix:{type:String,required:!0},tmNodes:{type:Array,default:()=>[]},parentKey:{type:[String,Number],default:null}},setup(e){const{renderIconRef:o,childrenFieldRef:t}=ko(Ud);go(jd,{showIconRef:Do(()=>{const t=o.value;return e.tmNodes.some(e=>{var o;if(e.isGroup)return null===(o=e.children)||void 0===o?void 0:o.some(({rawNode:e})=>t?t(e):e.icon);const{rawNode:n}=e;return t?t(n):n.icon})}),hasSubmenuRef:Do(()=>{const{value:o}=t;return e.tmNodes.some(e=>{var t;if(e.isGroup)return null===(t=e.children)||void 0===t?void 0:t.some(({rawNode:e})=>qd(e,o));const{rawNode:n}=e;return qd(n,o)})})});const n=it(null);return go(V,null),go(He,null),go(U,n),{bodyRef:n}},render(){const{parentKey:e,clsPrefix:o,scrollable:t}=this,n=this.tmNodes.map(n=>{const{rawNode:r}=n;return!1===r.show?null:function(e){return"render"===e.type}(r)?So(Xd,{tmNode:n,key:n.key}):Gd(r)?So(Nd,{clsPrefix:o,key:n.key}):function(e){return"group"===e.type}(r)?So(Jd,{clsPrefix:o,tmNode:n,parentKey:e,key:n.key}):So(Yd,{clsPrefix:o,tmNode:n,parentKey:e,key:n.key,props:r.props,scrollable:t})});return So("div",{class:[`${o}-dropdown-menu`,t&&`${o}-dropdown-menu--scrollable`],ref:"bodyRef"},t?So(ae,{contentClass:`${o}-dropdown-menu__content`},{default:()=>n}):n,this.showArrow?Ps({clsPrefix:o,arrowStyle:this.arrowStyle,arrowClass:void 0,arrowWrapperClass:void 0,arrowWrapperStyle:void 0}):null)}}),Qd=ge("dropdown-menu","\n transform-origin: var(--v-transform-origin);\n background-color: var(--n-color);\n border-radius: var(--n-border-radius);\n box-shadow: var(--n-box-shadow);\n position: relative;\n transition:\n background-color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier);\n",[un(),ge("dropdown-option","\n position: relative;\n ",[xe("a","\n text-decoration: none;\n color: inherit;\n outline: none;\n ",[xe("&::before",'\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n ')]),ge("dropdown-option-body","\n display: flex;\n cursor: pointer;\n position: relative;\n height: var(--n-option-height);\n line-height: var(--n-option-height);\n font-size: var(--n-font-size);\n color: var(--n-option-text-color);\n transition: color .3s var(--n-bezier);\n ",[xe("&::before",'\n content: "";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 4px;\n right: 4px;\n transition: background-color .3s var(--n-bezier);\n border-radius: var(--n-border-radius);\n '),le("disabled",[so("pending","\n color: var(--n-option-text-color-hover);\n ",[eo("prefix, suffix","\n color: var(--n-option-text-color-hover);\n "),xe("&::before","background-color: var(--n-option-color-hover);")]),so("active","\n color: var(--n-option-text-color-active);\n ",[eo("prefix, suffix","\n color: var(--n-option-text-color-active);\n "),xe("&::before","background-color: var(--n-option-color-active);")]),so("child-active","\n color: var(--n-option-text-color-child-active);\n ",[eo("prefix, suffix","\n color: var(--n-option-text-color-child-active);\n ")])]),so("disabled","\n cursor: not-allowed;\n opacity: var(--n-option-opacity-disabled);\n "),so("group","\n font-size: calc(var(--n-font-size) - 1px);\n color: var(--n-group-header-text-color);\n ",[eo("prefix","\n width: calc(var(--n-option-prefix-width) / 2);\n ",[so("show-icon","\n width: calc(var(--n-option-icon-prefix-width) / 2);\n ")])]),eo("prefix","\n width: var(--n-option-prefix-width);\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--n-prefix-color);\n transition: color .3s var(--n-bezier);\n z-index: 1;\n ",[so("show-icon","\n width: var(--n-option-icon-prefix-width);\n "),ge("icon","\n font-size: var(--n-option-icon-size);\n ")]),eo("label","\n white-space: nowrap;\n flex: 1;\n z-index: 1;\n "),eo("suffix","\n box-sizing: border-box;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n min-width: var(--n-option-suffix-width);\n padding: 0 8px;\n transition: color .3s var(--n-bezier);\n color: var(--n-suffix-color);\n z-index: 1;\n ",[so("has-submenu","\n width: var(--n-option-icon-suffix-width);\n "),ge("icon","\n font-size: var(--n-option-icon-size);\n ")]),ge("dropdown-menu","pointer-events: all;")]),ge("dropdown-offset-container","\n pointer-events: none;\n position: absolute;\n left: 0;\n right: 0;\n top: -4px;\n bottom: -4px;\n ")]),ge("dropdown-divider","\n transition: background-color .3s var(--n-bezier);\n background-color: var(--n-divider-color);\n height: 1px;\n margin: 4px 0;\n "),ge("dropdown-menu-wrapper","\n transform-origin: var(--v-transform-origin);\n width: fit-content;\n "),xe(">",[ge("scrollbar","\n height: inherit;\n max-height: inherit;\n ")]),le("scrollable","\n padding: var(--n-padding);\n "),so("scrollable",[eo("content","\n padding: var(--n-padding);\n ")])]),eu={animated:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},size:{type:String,default:"medium"},inverted:Boolean,placement:{type:String,default:"bottom"},onSelect:[Function,Array],options:{type:Array,default:()=>[]},menuProps:Function,showArrow:Boolean,renderLabel:Function,renderIcon:Function,renderOption:Function,nodeProps:Function,labelField:{type:String,default:"label"},keyField:{type:String,default:"key"},childrenField:{type:String,default:"children"},value:[String,Number]},ou=Object.keys(Ms),tu=po({name:"Dropdown",inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign({},Ms),eu),P.props),setup(e){const t=it(!1),n=F(jo(e,"show"),t),r=Do(()=>{const{keyField:o,childrenField:t}=e;return is(e.options,{getKey:e=>e[o],getDisabled:e=>!0===e.disabled,getIgnored:e=>"divider"===e.type||"render"===e.type,getChildren:e=>e[t]})}),a=Do(()=>r.value.treeNodes),l=it(null),i=it(null),s=it(null),c=Do(()=>{var e,o,t;return null!==(t=null!==(o=null!==(e=l.value)&&void 0!==e?e:i.value)&&void 0!==o?o:s.value)&&void 0!==t?t:null}),d=Do(()=>r.value.getPath(c.value).keyPath),u=Do(()=>r.value.getPath(e.value).keyPath);kr({keydown:{ArrowUp:{prevent:!0,handler:function(){y("up")}},ArrowRight:{prevent:!0,handler:function(){y("right")}},ArrowDown:{prevent:!0,handler:function(){y("down")}},ArrowLeft:{prevent:!0,handler:function(){y("left")}},Enter:{prevent:!0,handler:function(){const e=b();(null==e?void 0:e.isLeaf)&&n.value&&(v(e.key,e.rawNode),m(!1))}},Escape:function(){m(!1)}}},o(()=>e.keyboard&&n.value));const{mergedClsPrefixRef:p,inlineThemeDisabled:h}=be(e),f=P("Dropdown","-dropdown",Qd,yd,e,p);function v(o,t){const{onSelect:n}=e;n&&H(n,o,t)}function m(o){const{"onUpdate:show":n,onUpdateShow:r}=e;n&&H(n,o),r&&H(r,o),t.value=o}function g(){l.value=null,i.value=null,s.value=null}function b(){var e;const{value:o}=r,{value:t}=c;return o&&null!==t&&null!==(e=o.getNode(t))&&void 0!==e?e:null}function y(e){const{value:o}=c,{value:{getFirstAvailableNode:t}}=r;let n=null;if(null===o){const e=t();null!==e&&(n=e.key)}else{const o=b();if(o){let t;switch(e){case"down":t=o.getNext();break;case"up":t=o.getPrev();break;case"right":t=o.getChild();break;case"left":t=o.getParent()}t&&(n=t.key)}}null!==n&&(l.value=null,i.value=n)}go(Ud,{labelFieldRef:jo(e,"labelField"),childrenFieldRef:jo(e,"childrenField"),renderLabelRef:jo(e,"renderLabel"),renderIconRef:jo(e,"renderIcon"),hoverKeyRef:l,keyboardKeyRef:i,lastToggledSubmenuKeyRef:s,pendingKeyPathRef:d,activeKeyPathRef:u,animatedRef:jo(e,"animated"),mergedShowRef:n,nodePropsRef:jo(e,"nodeProps"),renderOptionRef:jo(e,"renderOption"),menuPropsRef:jo(e,"menuProps"),doSelect:v,doUpdateShow:m}),$o(n,o=>{e.animated||o||g()});const x=Do(()=>{const{size:o,inverted:t}=e,{common:{cubicBezierEaseInOut:n},self:r}=f.value,{padding:a,dividerColor:l,borderRadius:i,optionOpacityDisabled:s,[ao("optionIconSuffixWidth",o)]:c,[ao("optionSuffixWidth",o)]:d,[ao("optionIconPrefixWidth",o)]:u,[ao("optionPrefixWidth",o)]:p,[ao("fontSize",o)]:h,[ao("optionHeight",o)]:v,[ao("optionIconSize",o)]:m}=r,g={"--n-bezier":n,"--n-font-size":h,"--n-padding":a,"--n-border-radius":i,"--n-option-height":v,"--n-option-prefix-width":p,"--n-option-icon-prefix-width":u,"--n-option-suffix-width":d,"--n-option-icon-suffix-width":c,"--n-option-icon-size":m,"--n-divider-color":l,"--n-option-opacity-disabled":s};return t?(g["--n-color"]=r.colorInverted,g["--n-option-color-hover"]=r.optionColorHoverInverted,g["--n-option-color-active"]=r.optionColorActiveInverted,g["--n-option-text-color"]=r.optionTextColorInverted,g["--n-option-text-color-hover"]=r.optionTextColorHoverInverted,g["--n-option-text-color-active"]=r.optionTextColorActiveInverted,g["--n-option-text-color-child-active"]=r.optionTextColorChildActiveInverted,g["--n-prefix-color"]=r.prefixColorInverted,g["--n-suffix-color"]=r.suffixColorInverted,g["--n-group-header-text-color"]=r.groupHeaderTextColorInverted):(g["--n-color"]=r.color,g["--n-option-color-hover"]=r.optionColorHover,g["--n-option-color-active"]=r.optionColorActive,g["--n-option-text-color"]=r.optionTextColor,g["--n-option-text-color-hover"]=r.optionTextColorHover,g["--n-option-text-color-active"]=r.optionTextColorActive,g["--n-option-text-color-child-active"]=r.optionTextColorChildActive,g["--n-prefix-color"]=r.prefixColor,g["--n-suffix-color"]=r.suffixColor,g["--n-group-header-text-color"]=r.groupHeaderTextColor),g}),C=h?Ce("dropdown",Do(()=>`${e.size[0]}${e.inverted?"i":""}`),x,e):void 0;return{mergedClsPrefix:p,mergedTheme:f,tmNodes:a,mergedShow:n,handleAfterLeave:()=>{e.animated&&g()},doUpdateShow:m,cssVars:h?void 0:x,themeClass:null==C?void 0:C.themeClass,onRender:null==C?void 0:C.onRender}},render(){const{mergedTheme:e}=this,o={show:this.mergedShow,theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,internalOnAfterLeave:this.handleAfterLeave,internalRenderBody:(e,o,t,n,r)=>{var a;const{mergedClsPrefix:l,menuProps:i}=this;null===(a=this.onRender)||void 0===a||a.call(this);const s=(null==i?void 0:i(void 0,this.tmNodes.map(e=>e.rawNode)))||{},c={ref:ua(o),class:[e,`${l}-dropdown`,this.themeClass],clsPrefix:l,tmNodes:this.tmNodes,style:[...t,this.cssVars],showArrow:this.showArrow,arrowStyle:this.arrowStyle,scrollable:this.scrollable,onMouseenter:n,onMouseleave:r};return So(Zd,mo(this.$attrs,c,s))},onUpdateShow:this.doUpdateShow,"onUpdate:show":void 0};return So(Rs,Object.assign({},pn(this.$props,ou),o),{trigger:()=>{var e,o;return null===(o=(e=this.$slots).default)||void 0===o?void 0:o.call(e)}})}}),nu={itemFontSize:"12px",itemHeight:"36px",itemWidth:"52px",panelActionPadding:"8px 0"};function ru(e){const{popoverColor:o,textColor2:t,primaryColor:n,hoverColor:r,dividerColor:a,opacityDisabled:l,boxShadow2:i,borderRadius:s,iconColor:c,iconColorDisabled:d}=e;return Object.assign(Object.assign({},nu),{panelColor:o,panelBoxShadow:i,panelDividerColor:a,itemTextColor:t,itemTextColorActive:n,itemColorHover:r,itemOpacityDisabled:l,itemBorderRadius:s,borderRadius:s,iconColor:c,iconColorDisabled:d})}var au=S({name:"TimePicker",common:l,peers:{Scrollbar:ro,Button:Ie,Input:bn},self:ru}),lu={name:"TimePicker",common:_i,peers:{Scrollbar:Di,Button:$c,Input:ec},self:ru},iu={itemSize:"24px",itemCellWidth:"38px",itemCellHeight:"32px",scrollItemWidth:"80px",scrollItemHeight:"40px",panelExtraFooterPadding:"8px 12px",panelActionPadding:"8px 12px",calendarTitlePadding:"0",calendarTitleHeight:"28px",arrowSize:"14px",panelHeaderPadding:"8px 12px",calendarDaysHeight:"32px",calendarTitleGridTempateColumns:"28px 28px 1fr 28px 28px",calendarLeftPaddingDate:"6px 12px 4px 12px",calendarLeftPaddingDatetime:"4px 12px",calendarLeftPaddingDaterange:"6px 12px 4px 12px",calendarLeftPaddingDatetimerange:"4px 12px",calendarLeftPaddingMonth:"0",calendarLeftPaddingYear:"0",calendarLeftPaddingQuarter:"0",calendarLeftPaddingMonthrange:"0",calendarLeftPaddingQuarterrange:"0",calendarLeftPaddingYearrange:"0",calendarLeftPaddingWeek:"6px 12px 4px 12px",calendarRightPaddingDate:"6px 12px 4px 12px",calendarRightPaddingDatetime:"4px 12px",calendarRightPaddingDaterange:"6px 12px 4px 12px",calendarRightPaddingDatetimerange:"4px 12px",calendarRightPaddingMonth:"0",calendarRightPaddingYear:"0",calendarRightPaddingQuarter:"0",calendarRightPaddingMonthrange:"0",calendarRightPaddingQuarterrange:"0",calendarRightPaddingYearrange:"0",calendarRightPaddingWeek:"0"};function su(e){const{hoverColor:o,fontSize:t,textColor2:n,textColorDisabled:r,popoverColor:a,primaryColor:l,borderRadiusSmall:i,iconColor:s,iconColorDisabled:c,textColor1:d,dividerColor:u,boxShadow2:p,borderRadius:h,fontWeightStrong:f}=e;return Object.assign(Object.assign({},iu),{itemFontSize:t,calendarDaysFontSize:t,calendarTitleFontSize:t,itemTextColor:n,itemTextColorDisabled:r,itemTextColorActive:a,itemTextColorCurrent:l,itemColorIncluded:ne(l,{alpha:.1}),itemColorHover:o,itemColorDisabled:o,itemColorActive:l,itemBorderRadius:i,panelColor:a,panelTextColor:n,arrowColor:s,calendarTitleTextColor:d,calendarTitleColorHover:o,calendarDaysTextColor:n,panelHeaderDividerColor:u,calendarDaysDividerColor:u,calendarDividerColor:u,panelActionDividerColor:u,panelBoxShadow:p,panelBorderRadius:h,calendarTitleFontWeight:f,scrollItemBorderRadius:h,iconColor:s,iconColorDisabled:c})}var cu=S({name:"DatePicker",common:l,peers:{Input:bn,Button:Ie,TimePicker:au,Scrollbar:ro},self:su}),du={name:"DatePicker",common:_i,peers:{Input:ec,Button:$c,TimePicker:lu,Scrollbar:Di},self(e){const{popoverColor:o,hoverColor:t,primaryColor:n}=e,r=su(e);return r.itemColorDisabled=Be(o,t),r.itemColorIncluded=ne(n,{alpha:.15}),r.itemColorHover=Be(o,t),r}},uu={thPaddingBorderedSmall:"8px 12px",thPaddingBorderedMedium:"12px 16px",thPaddingBorderedLarge:"16px 24px",thPaddingSmall:"0",thPaddingMedium:"0",thPaddingLarge:"0",tdPaddingBorderedSmall:"8px 12px",tdPaddingBorderedMedium:"12px 16px",tdPaddingBorderedLarge:"16px 24px",tdPaddingSmall:"0 0 8px 0",tdPaddingMedium:"0 0 12px 0",tdPaddingLarge:"0 0 16px 0"};function pu(e){const{tableHeaderColor:o,textColor2:t,textColor1:n,cardColor:r,modalColor:a,popoverColor:l,dividerColor:i,borderRadius:s,fontWeightStrong:c,lineHeight:d,fontSizeSmall:u,fontSizeMedium:p,fontSizeLarge:h}=e;return Object.assign(Object.assign({},uu),{lineHeight:d,fontSizeSmall:u,fontSizeMedium:p,fontSizeLarge:h,titleTextColor:n,thColor:Be(r,o),thColorModal:Be(a,o),thColorPopover:Be(l,o),thTextColor:n,thFontWeight:c,tdTextColor:t,tdColor:r,tdColorModal:a,tdColorPopover:l,borderColor:Be(r,i),borderColorModal:Be(a,i),borderColorPopover:Be(l,i),borderRadius:s})}var hu={name:"Descriptions",common:l,self:pu},fu={name:"Descriptions",common:_i,self:pu},vu={name:"Dialog",common:_i,peers:{Button:$c},self:ir},mu={name:"Modal",common:_i,peers:{Scrollbar:Di,Dialog:vu,Card:Dc},self:Kn},gu=Object.assign(Object.assign({},sr),{onAfterEnter:Function,onAfterLeave:Function,transformOrigin:String,blockScroll:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},onEsc:Function,autoFocus:{type:Boolean,default:!0},internalStyle:[String,Object],maskClosable:{type:Boolean,default:!0},zIndex:Number,onPositiveClick:Function,onNegativeClick:Function,onClose:Function,onMaskClick:Function,draggable:[Boolean,Object]}),bu=po({name:"DialogEnvironment",props:Object.assign(Object.assign({},gu),{internalKey:{type:String,required:!0},to:[String,Object],onInternalAfterLeave:{type:Function,required:!0}}),setup(e){const o=it(!0);function t(){o.value=!1}return{show:o,hide:t,handleUpdateShow:function(e){o.value=e},handleAfterLeave:function(){const{onInternalAfterLeave:o,internalKey:t,onAfterLeave:n}=e;o&&o(t),n&&n()},handleCloseClick:function(){const{onClose:o}=e;o?Promise.resolve(o()).then(e=>{!1!==e&&t()}):t()},handleNegativeClick:function(o){const{onNegativeClick:n}=e;n?Promise.resolve(n(o)).then(e=>{!1!==e&&t()}):t()},handlePositiveClick:function(o){const{onPositiveClick:n}=e;n?Promise.resolve(n(o)).then(e=>{!1!==e&&t()}):t()},handleMaskClick:function(o){const{onMaskClick:n,maskClosable:r}=e;n&&(n(o),r&&t())},handleEsc:function(){const{onEsc:o}=e;o&&o()}}},render(){const{handlePositiveClick:e,handleUpdateShow:o,handleNegativeClick:t,handleCloseClick:n,handleAfterLeave:r,handleMaskClick:a,handleEsc:l,to:i,zIndex:s,maskClosable:c,show:d}=this;return So(Jn,{show:d,onUpdateShow:o,onMaskClick:a,onEsc:l,to:i,zIndex:s,maskClosable:c,onAfterEnter:this.onAfterEnter,onAfterLeave:r,closeOnEsc:this.closeOnEsc,blockScroll:this.blockScroll,autoFocus:this.autoFocus,transformOrigin:this.transformOrigin,draggable:this.draggable,internalAppear:!0,internalDialog:!0},{default:({draggableClass:o})=>So(Ln,Object.assign({},pn(this.$props,ar),{titleClass:qo([this.titleClass,o]),style:this.internalStyle,onClose:n,onNegativeClick:t,onPositiveClick:e}))})}}),yu=po({name:"DialogProvider",props:{injectionKey:String,to:[String,Object]},setup(){const e=it([]),o={};function t(t={}){const n=Ue(),r=_o(Object.assign(Object.assign({},t),{key:n,destroy:()=>{var e;null===(e=o[`n-dialog-${n}`])||void 0===e||e.hide()}}));return e.value.push(r),r}const n=["info","success","warning","error"].map(e=>o=>t(Object.assign(Object.assign({},o),{type:e})));const r={create:t,destroyAll:function(){Object.values(o).forEach(e=>{null==e||e.hide()})},info:n[0],success:n[1],warning:n[2],error:n[3]};return go(zn,r),go(lr,{clickedRef:Fn(64),clickedPositionRef:$n()}),go(Dn,e),Object.assign(Object.assign({},r),{dialogList:e,dialogInstRefs:o,handleAfterLeave:function(o){const{value:t}=e;t.splice(t.findIndex(e=>e.key===o),1)}})},render(){var e,o;return So(No,null,[this.dialogList.map(e=>So(bu,fa(e,["destroy","style"],{internalStyle:e.style,to:this.to,ref:o=>{null===o?delete this.dialogInstRefs[`n-dialog-${e.key}`]:this.dialogInstRefs[`n-dialog-${e.key}`]=o},internalKey:e.key,onInternalAfterLeave:this.handleAfterLeave}))),null===(o=(e=this.$slots).default)||void 0===o?void 0:o.call(e)])}}),xu=J("n-loading-bar"),Cu=J("n-loading-bar-api"),wu={name:"LoadingBar",common:_i,self(e){const{primaryColor:o}=e;return{colorError:"red",colorLoading:o,height:"2px"}}};var Su={name:"LoadingBar",common:l,self:function(e){const{primaryColor:o,errorColor:t}=e;return{colorError:t,colorLoading:o,height:"2px"}}},ku=ge("loading-bar-container","\n z-index: 5999;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 2px;\n",[to({enterDuration:"0.3s",leaveDuration:"0.8s"}),ge("loading-bar","\n width: 100%;\n transition:\n max-width 4s linear,\n background .2s linear;\n height: var(--n-height);\n ",[so("starting","\n background: var(--n-color-loading);\n "),so("finishing","\n background: var(--n-color-loading);\n transition:\n max-width .2s linear,\n background .2s linear;\n "),so("error","\n background: var(--n-color-error);\n transition:\n max-width .2s linear,\n background .2s linear;\n ")])]),Pu=function(e,o,t,n){return new(t||(t=Promise))(function(r,a){function l(e){try{s(n.next(e))}catch(o){a(o)}}function i(e){try{s(n.throw(e))}catch(o){a(o)}}function s(e){var o;e.done?r(e.value):(o=e.value,o instanceof t?o:new t(function(e){e(o)})).then(l,i)}s((n=n.apply(e,o||[])).next())})};function Tu(e,o){return`${o}-loading-bar ${o}-loading-bar--${e}`}var Iu=po({name:"LoadingBar",props:{containerClass:String,containerStyle:[String,Object]},setup(){const{inlineThemeDisabled:e}=be(),{props:o,mergedClsPrefixRef:t}=ko(xu),n=it(null),r=it(!1),a=it(!1),l=it(!1),i=it(!1);let s=!1;const c=it(!1),d=Do(()=>{const{loadingBarStyle:e}=o;return e?e[c.value?"error":"loading"]:""});function u(){return Pu(this,void 0,void 0,function*(){r.value=!1,l.value=!1,s=!1,c.value=!1,i.value=!0,yield yo(),i.value=!1})}function p(){return Pu(this,arguments,void 0,function*(e=0,o=80,r="starting"){if(a.value=!0,yield u(),s)return;l.value=!0,yield yo();const i=n.value;i&&(i.style.maxWidth=`${e}%`,i.style.transition="none",i.offsetWidth,i.className=Tu(r,t.value),i.style.transition="",i.style.maxWidth=`${o}%`)})}const h=P("LoadingBar","-loading-bar",ku,Su,o,t),f=Do(()=>{const{self:{height:e,colorError:o,colorLoading:t}}=h.value;return{"--n-height":e,"--n-color-loading":t,"--n-color-error":o}}),v=e?Ce("loading-bar",void 0,f,o):void 0;return{mergedClsPrefix:t,loadingBarRef:n,started:a,loading:l,entering:r,transitionDisabled:i,start:p,error:function(){if(!s&&!c.value)if(l.value){c.value=!0;const e=n.value;if(!e)return;e.className=Tu("error",t.value),e.style.maxWidth="100%",e.offsetWidth,l.value=!1}else p(100,100,"error").then(()=>{c.value=!0;const e=n.value;e&&(e.className=Tu("error",t.value),e.offsetWidth,l.value=!1)})},finish:function(){return Pu(this,void 0,void 0,function*(){if(s||c.value)return;a.value&&(yield yo()),s=!0;const e=n.value;e&&(e.className=Tu("finishing",t.value),e.style.maxWidth="100%",e.offsetWidth,l.value=!1)})},handleEnter:function(){r.value=!0},handleAfterEnter:function(){r.value=!1},handleAfterLeave:function(){return Pu(this,void 0,void 0,function*(){yield u()})},mergedLoadingBarStyle:d,cssVars:e?void 0:f,themeClass:null==v?void 0:v.themeClass,onRender:null==v?void 0:v.onRender}},render(){if(!this.started)return null;const{mergedClsPrefix:e}=this;return So(Xo,{name:"fade-in-transition",appear:!0,onEnter:this.handleEnter,onAfterEnter:this.handleAfterEnter,onAfterLeave:this.handleAfterLeave,css:!this.transitionDisabled},{default:()=>{var o;return null===(o=this.onRender)||void 0===o||o.call(this),ct(So("div",{class:[`${e}-loading-bar-container`,this.themeClass,this.containerClass],style:this.containerStyle},So("div",{ref:"loadingBarRef",class:[`${e}-loading-bar`],style:[this.cssVars,this.mergedLoadingBarStyle]})),[[Wo,this.loading||!this.loading&&this.entering]])}})}}),zu=po({name:"LoadingBarProvider",props:Object.assign(Object.assign({},P.props),{to:{type:[String,Object,Boolean],default:void 0},containerClass:String,containerStyle:[String,Object],loadingBarStyle:{type:Object}}),setup(e){const o=Z(),t=it(null),n={start(){var e;o.value?null===(e=t.value)||void 0===e||e.start():yo(()=>{var e;null===(e=t.value)||void 0===e||e.start()})},error(){var e;o.value?null===(e=t.value)||void 0===e||e.error():yo(()=>{var e;null===(e=t.value)||void 0===e||e.error()})},finish(){var e;o.value?null===(e=t.value)||void 0===e||e.finish():yo(()=>{var e;null===(e=t.value)||void 0===e||e.finish()})}},{mergedClsPrefixRef:r}=be(e);return go(Cu,n),go(xu,{props:e,mergedClsPrefixRef:r}),Object.assign(n,{loadingBarRef:t})},render(){var e,o;return So(No,null,So(Oo,{disabled:!1===this.to,to:this.to||"body"},So(Iu,{ref:"loadingBarRef",containerStyle:this.containerStyle,containerClass:this.containerClass})),null===(o=(e=this.$slots).default)||void 0===o?void 0:o.call(e))}});var Mu={margin:"0 0 8px 0",padding:"10px 20px",maxWidth:"720px",minWidth:"420px",iconMargin:"0 10px 0 0",closeMargin:"0 0 0 10px",closeSize:"20px",closeIconSize:"16px",iconSize:"20px",fontSize:"14px"};function Ru(e){const{textColor2:o,closeIconColor:t,closeIconColorHover:n,closeIconColorPressed:r,infoColor:a,successColor:l,errorColor:i,warningColor:s,popoverColor:c,boxShadow2:d,primaryColor:u,lineHeight:p,borderRadius:h,closeColorHover:f,closeColorPressed:v}=e;return Object.assign(Object.assign({},Mu),{closeBorderRadius:h,textColor:o,textColorInfo:o,textColorSuccess:o,textColorError:o,textColorWarning:o,textColorLoading:o,color:c,colorInfo:c,colorSuccess:c,colorError:c,colorWarning:c,colorLoading:c,boxShadow:d,boxShadowInfo:d,boxShadowSuccess:d,boxShadowError:d,boxShadowWarning:d,boxShadowLoading:d,iconColor:o,iconColorInfo:a,iconColorSuccess:l,iconColorWarning:s,iconColorError:i,iconColorLoading:u,closeColorHover:f,closeColorPressed:v,closeIconColor:t,closeIconColorHover:n,closeIconColorPressed:r,closeColorHoverInfo:f,closeColorPressedInfo:v,closeIconColorInfo:t,closeIconColorHoverInfo:n,closeIconColorPressedInfo:r,closeColorHoverSuccess:f,closeColorPressedSuccess:v,closeIconColorSuccess:t,closeIconColorHoverSuccess:n,closeIconColorPressedSuccess:r,closeColorHoverError:f,closeColorPressedError:v,closeIconColorError:t,closeIconColorHoverError:n,closeIconColorPressedError:r,closeColorHoverWarning:f,closeColorPressedWarning:v,closeIconColorWarning:t,closeIconColorHoverWarning:n,closeIconColorPressedWarning:r,closeColorHoverLoading:f,closeColorPressedLoading:v,closeIconColorLoading:t,closeIconColorHoverLoading:n,closeIconColorPressedLoading:r,loadingColor:u,lineHeight:p,borderRadius:h,border:"0"})}var Au={name:"Message",common:l,self:Ru},Fu={name:"Message",common:_i,self:Ru},$u={icon:Function,type:{type:String,default:"info"},content:[String,Number,Function],showIcon:{type:Boolean,default:!0},closable:Boolean,keepAliveOnHover:Boolean,onClose:Function,onMouseenter:Function,onMouseleave:Function},Ou=xe([ge("message-wrapper","\n margin: var(--n-margin);\n z-index: 0;\n transform-origin: top center;\n display: flex;\n ",[qs({overflow:"visible",originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.85)"}})]),ge("message","\n box-sizing: border-box;\n display: flex;\n align-items: center;\n transition:\n color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n opacity .3s var(--n-bezier),\n transform .3s var(--n-bezier),\n margin-bottom .3s var(--n-bezier);\n padding: var(--n-padding);\n border-radius: var(--n-border-radius);\n border: var(--n-border);\n flex-wrap: nowrap;\n overflow: hidden;\n max-width: var(--n-max-width);\n color: var(--n-text-color);\n background-color: var(--n-color);\n box-shadow: var(--n-box-shadow);\n ",[eo("content","\n display: inline-block;\n line-height: var(--n-line-height);\n font-size: var(--n-font-size);\n "),eo("icon","\n position: relative;\n margin: var(--n-icon-margin);\n height: var(--n-icon-size);\n width: var(--n-icon-size);\n font-size: var(--n-icon-size);\n flex-shrink: 0;\n ",[["default","info","success","warning","error","loading"].map(e=>so(`${e}-type`,[xe("> *",`\n color: var(--n-icon-color-${e});\n transition: color .3s var(--n-bezier);\n `)])),xe("> *","\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n ",[I()])]),eo("close","\n margin: var(--n-close-margin);\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n flex-shrink: 0;\n ",[xe("&:hover","\n color: var(--n-close-icon-color-hover);\n "),xe("&:active","\n color: var(--n-close-icon-color-pressed);\n ")])]),ge("message-container","\n z-index: 6000;\n position: fixed;\n height: 0;\n overflow: visible;\n display: flex;\n flex-direction: column;\n align-items: center;\n ",[so("top","\n top: 12px;\n left: 0;\n right: 0;\n "),so("top-left","\n top: 12px;\n left: 12px;\n right: 0;\n align-items: flex-start;\n "),so("top-right","\n top: 12px;\n left: 0;\n right: 12px;\n align-items: flex-end;\n "),so("bottom","\n bottom: 4px;\n left: 0;\n right: 0;\n justify-content: flex-end;\n "),so("bottom-left","\n bottom: 4px;\n left: 12px;\n right: 0;\n justify-content: flex-end;\n align-items: flex-start;\n "),so("bottom-right","\n bottom: 4px;\n left: 0;\n right: 12px;\n justify-content: flex-end;\n align-items: flex-end;\n ")])]),Bu={info:()=>So(Bn,null),success:()=>So(On,null),warning:()=>So(Gn,null),error:()=>So(En,null),default:()=>null},Eu=po({name:"Message",props:Object.assign(Object.assign({},$u),{render:Function}),setup(e){const{inlineThemeDisabled:o,mergedRtlRef:t}=be(e),{props:n,mergedClsPrefixRef:r}=ko(xn),a=g("Message",t,r),l=P("Message","-message",Ou,Au,n,r),i=Do(()=>{const{type:o}=e,{common:{cubicBezierEaseInOut:t},self:{padding:n,margin:r,maxWidth:a,iconMargin:i,closeMargin:s,closeSize:c,iconSize:d,fontSize:u,lineHeight:p,borderRadius:h,border:f,iconColorInfo:v,iconColorSuccess:m,iconColorWarning:g,iconColorError:b,iconColorLoading:y,closeIconSize:x,closeBorderRadius:C,[ao("textColor",o)]:w,[ao("boxShadow",o)]:S,[ao("color",o)]:k,[ao("closeColorHover",o)]:P,[ao("closeColorPressed",o)]:T,[ao("closeIconColor",o)]:I,[ao("closeIconColorPressed",o)]:z,[ao("closeIconColorHover",o)]:M}}=l.value;return{"--n-bezier":t,"--n-margin":r,"--n-padding":n,"--n-max-width":a,"--n-font-size":u,"--n-icon-margin":i,"--n-icon-size":d,"--n-close-icon-size":x,"--n-close-border-radius":C,"--n-close-size":c,"--n-close-margin":s,"--n-text-color":w,"--n-color":k,"--n-box-shadow":S,"--n-icon-color-info":v,"--n-icon-color-success":m,"--n-icon-color-warning":g,"--n-icon-color-error":b,"--n-icon-color-loading":y,"--n-close-color-hover":P,"--n-close-color-pressed":T,"--n-close-icon-color":I,"--n-close-icon-color-pressed":z,"--n-close-icon-color-hover":M,"--n-line-height":p,"--n-border-radius":h,"--n-border":f}}),s=o?Ce("message",Do(()=>e.type[0]),i,{}):void 0;return{mergedClsPrefix:r,rtlEnabled:a,messageProviderProps:n,handleClose(){var o;null===(o=e.onClose)||void 0===o||o.call(e)},cssVars:o?void 0:i,themeClass:null==s?void 0:s.themeClass,onRender:null==s?void 0:s.onRender,placement:n.placement}},render(){const{render:e,type:o,closable:n,content:r,mergedClsPrefix:a,cssVars:l,themeClass:i,onRender:s,icon:d,handleClose:u,showIcon:p}=this;let h;return null==s||s(),So("div",{class:[`${a}-message-wrapper`,i],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith("top")?"flex-start":"flex-end"},l]},e?e(this.$props):So("div",{class:[`${a}-message ${a}-message--${o}-type`,this.rtlEnabled&&`${a}-message--rtl`]},(h=function(e,o,t){if("function"==typeof e)return e();{const e="loading"===o?So(D,{clsPrefix:t,strokeWidth:24,scale:.85}):Bu[o]();return e?So(ke,{clsPrefix:t,key:o},{default:()=>e}):null}}(d,o,a))&&p?So("div",{class:`${a}-message__icon ${a}-message__icon--${o}-type`},So(t,null,{default:()=>h})):null,So("div",{class:`${a}-message__content`},hn(r)),n?So(c,{clsPrefix:a,class:`${a}-message__close`,onClick:u,absolute:!0}):null))}});var _u=po({name:"MessageEnvironment",props:Object.assign(Object.assign({},$u),{duration:{type:Number,default:3e3},onAfterLeave:Function,onLeave:Function,internalKey:{type:String,required:!0},onInternalAfterLeave:Function,onHide:Function,onAfterHide:Function}),setup(e){let o=null;const t=it(!0);function n(){const{duration:t}=e;t&&(o=window.setTimeout(r,t))}function r(){const{onHide:n}=e;t.value=!1,o&&(window.clearTimeout(o),o=null),n&&n()}return Ro(()=>{n()}),{show:t,hide:r,handleClose:function(){const{onClose:o}=e;o&&o(),r()},handleAfterLeave:function(){const{onAfterLeave:o,onInternalAfterLeave:t,onAfterHide:n,internalKey:r}=e;o&&o(),t&&t(r),n&&n()},handleMouseleave:function(e){e.currentTarget===e.target&&n()},handleMouseenter:function(e){e.currentTarget===e.target&&null!==o&&(window.clearTimeout(o),o=null)},deactivate:function(){r()}}},render(){return So(u,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?So(Eu,{content:this.content,type:this.type,icon:this.icon,showIcon:this.showIcon,closable:this.closable,onClose:this.handleClose,onMouseenter:this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.keepAliveOnHover?this.handleMouseleave:void 0}):null]})}}),Du=po({name:"MessageProvider",props:Object.assign(Object.assign({},P.props),{to:[String,Object],duration:{type:Number,default:3e3},keepAliveOnHover:Boolean,max:Number,placement:{type:String,default:"top"},closable:Boolean,containerClass:String,containerStyle:[String,Object]}),setup(e){const{mergedClsPrefixRef:o}=be(e),t=it([]),n=it({}),r={create:(e,o)=>a(e,Object.assign({type:"default"},o)),info:(e,o)=>a(e,Object.assign(Object.assign({},o),{type:"info"})),success:(e,o)=>a(e,Object.assign(Object.assign({},o),{type:"success"})),warning:(e,o)=>a(e,Object.assign(Object.assign({},o),{type:"warning"})),error:(e,o)=>a(e,Object.assign(Object.assign({},o),{type:"error"})),loading:(e,o)=>a(e,Object.assign(Object.assign({},o),{type:"loading"})),destroyAll:function(){Object.values(n.value).forEach(e=>{e.hide()})}};function a(o,r){const a=Ue(),l=_o(Object.assign(Object.assign({},r),{content:o,key:a,destroy:()=>{var e;null===(e=n.value[a])||void 0===e||e.hide()}})),{max:i}=e;return i&&t.value.length>=i&&t.value.shift(),t.value.push(l),l}return go(xn,{props:e,mergedClsPrefixRef:o}),go(gn,r),Object.assign({mergedClsPrefix:o,messageRefs:n,messageList:t,handleAfterLeave:function(e){t.value.splice(t.value.findIndex(o=>o.key===e),1),delete n.value[e]}},r)},render(){var e,o,t;return So(No,null,null===(o=(e=this.$slots).default)||void 0===o?void 0:o.call(e),this.messageList.length?So(Oo,{to:null!==(t=this.to)&&void 0!==t?t:"body"},So("div",{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:"message-container",style:this.containerStyle},this.messageList.map(e=>So(_u,Object.assign({ref:o=>{o&&(this.messageRefs[e.key]=o)},internalKey:e.key,onInternalAfterLeave:this.handleAfterLeave},fa(e,["destroy"],void 0),{duration:void 0===e.duration?this.duration:e.duration,keepAliveOnHover:void 0===e.keepAliveOnHover?this.keepAliveOnHover:e.keepAliveOnHover,closable:void 0===e.closable?this.closable:e.closable}))))):null)}}),Lu=po({name:"ModalEnvironment",props:Object.assign(Object.assign({},rr),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(e){const o=it(!0);function t(){o.value=!1}return{show:o,hide:t,handleUpdateShow:function(e){o.value=e},handleAfterLeave:function(){const{onInternalAfterLeave:o,internalKey:t,onAfterLeave:n}=e;o&&o(t),n&&n()},handleCloseClick:function(){const{onClose:o}=e;o?Promise.resolve(o()).then(e=>{!1!==e&&t()}):t()},handleNegativeClick:function(){const{onNegativeClick:o}=e;o?Promise.resolve(o()).then(e=>{!1!==e&&t()}):t()},handlePositiveClick:function(){const{onPositiveClick:o}=e;o?Promise.resolve(o()).then(e=>{!1!==e&&t()}):t()},handleMaskClick:function(o){const{onMaskClick:n,maskClosable:r}=e;n&&(n(o),r&&t())},handleEsc:function(){const{onEsc:o}=e;o&&o()}}},render(){const{handleUpdateShow:e,handleAfterLeave:o,handleMaskClick:t,handleEsc:n,show:r}=this;return So(Jn,Object.assign({},this.$props,{show:r,onUpdateShow:e,onMaskClick:t,onEsc:n,onAfterLeave:o,internalAppear:!0,internalModal:!0}),this.$slots)}}),Hu=po({name:"ModalProvider",props:{to:[String,Object]},setup(){const e=it([]),o={};const t={create:function(t={}){const n=Ue(),r=_o(Object.assign(Object.assign({},t),{key:n,destroy:()=>{var e;null===(e=o[`n-modal-${n}`])||void 0===e||e.hide()}}));return e.value.push(r),r},destroyAll:function(){Object.values(o).forEach(e=>{null==e||e.hide()})}};return go(Nn,t),go(er,{clickedRef:Fn(64),clickedPositionRef:$n()}),go(Xn,e),Object.assign(Object.assign({},t),{modalList:e,modalInstRefs:o,handleAfterLeave:function(o){const{value:t}=e;t.splice(t.findIndex(e=>e.key===o),1)}})},render(){var e,o;return So(No,null,[this.modalList.map(e=>{var o;return So(Lu,fa(e,["destroy","render"],{to:null!==(o=e.to)&&void 0!==o?o:this.to,ref:o=>{null===o?delete this.modalInstRefs[`n-modal-${e.key}`]:this.modalInstRefs[`n-modal-${e.key}`]=o},internalKey:e.key,onInternalAfterLeave:this.handleAfterLeave}),{default:e.render})}),null===(o=(e=this.$slots).default)||void 0===o?void 0:o.call(e)])}}),ju={closeMargin:"16px 12px",closeSize:"20px",closeIconSize:"16px",width:"365px",padding:"16px",titleFontSize:"16px",metaFontSize:"12px",descriptionFontSize:"12px"};function Uu(e){const{textColor2:o,successColor:t,infoColor:n,warningColor:r,errorColor:a,popoverColor:l,closeIconColor:i,closeIconColorHover:s,closeIconColorPressed:c,closeColorHover:d,closeColorPressed:u,textColor1:p,textColor3:h,borderRadius:f,fontWeightStrong:v,boxShadow2:m,lineHeight:g,fontSize:b}=e;return Object.assign(Object.assign({},ju),{borderRadius:f,lineHeight:g,fontSize:b,headerFontWeight:v,iconColor:o,iconColorSuccess:t,iconColorInfo:n,iconColorWarning:r,iconColorError:a,color:l,textColor:o,closeIconColor:i,closeIconColorHover:s,closeIconColorPressed:c,closeBorderRadius:f,closeColorHover:d,closeColorPressed:u,headerTextColor:p,descriptionTextColor:h,actionTextColor:o,boxShadow:m})}var Wu=S({name:"Notification",common:l,peers:{Scrollbar:ro},self:Uu}),Nu={name:"Notification",common:_i,peers:{Scrollbar:Di},self:Uu},Ku=J("n-notification-provider"),Vu=po({name:"NotificationContainer",props:{scrollable:{type:Boolean,required:!0},placement:{type:String,required:!0}},setup(){const{mergedThemeRef:e,mergedClsPrefixRef:o,wipTransitionCountRef:t}=ko(Ku),n=it(null);return To(()=>{var e,o;t.value>0?null===(e=null==n?void 0:n.value)||void 0===e||e.classList.add("transitioning"):null===(o=null==n?void 0:n.value)||void 0===o||o.classList.remove("transitioning")}),{selfRef:n,mergedTheme:e,mergedClsPrefix:o,transitioning:t}},render(){const{$slots:e,scrollable:o,mergedClsPrefix:t,mergedTheme:n,placement:r}=this;return So("div",{ref:"selfRef",class:[`${t}-notification-container`,o&&`${t}-notification-container--scrollable`,`${t}-notification-container--${r}`]},o?So(io,{theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,contentStyle:{overflow:"hidden"}},e):e)}}),qu={info:()=>So(Bn,null),success:()=>So(On,null),warning:()=>So(Gn,null),error:()=>So(En,null),default:()=>null},Gu={closable:{type:Boolean,default:!0},type:{type:String,default:"default"},avatar:Function,title:[String,Function],description:[String,Function],content:[String,Function],meta:[String,Function],action:[String,Function],onClose:{type:Function,required:!0},keepAliveOnHover:Boolean,onMouseenter:Function,onMouseleave:Function},Yu=An(Gu),Ju=po({name:"Notification",props:Gu,setup(e){const{mergedClsPrefixRef:o,mergedThemeRef:t,props:n}=ko(Ku),{inlineThemeDisabled:r,mergedRtlRef:a}=be(),l=g("Notification",a,o),i=Do(()=>{const{type:o}=e,{self:{color:n,textColor:r,closeIconColor:a,closeIconColorHover:l,closeIconColorPressed:i,headerTextColor:s,descriptionTextColor:c,actionTextColor:d,borderRadius:u,headerFontWeight:p,boxShadow:h,lineHeight:f,fontSize:v,closeMargin:m,closeSize:g,width:b,padding:y,closeIconSize:x,closeBorderRadius:C,closeColorHover:w,closeColorPressed:S,titleFontSize:k,metaFontSize:P,descriptionFontSize:T,[ao("iconColor",o)]:I},common:{cubicBezierEaseOut:z,cubicBezierEaseIn:M,cubicBezierEaseInOut:R}}=t.value,{left:A,right:F,top:$,bottom:O}=ue(y);return{"--n-color":n,"--n-font-size":v,"--n-text-color":r,"--n-description-text-color":c,"--n-action-text-color":d,"--n-title-text-color":s,"--n-title-font-weight":p,"--n-bezier":R,"--n-bezier-ease-out":z,"--n-bezier-ease-in":M,"--n-border-radius":u,"--n-box-shadow":h,"--n-close-border-radius":C,"--n-close-color-hover":w,"--n-close-color-pressed":S,"--n-close-icon-color":a,"--n-close-icon-color-hover":l,"--n-close-icon-color-pressed":i,"--n-line-height":f,"--n-icon-color":I,"--n-close-margin":m,"--n-close-size":g,"--n-close-icon-size":x,"--n-width":b,"--n-padding-left":A,"--n-padding-right":F,"--n-padding-top":$,"--n-padding-bottom":O,"--n-title-font-size":k,"--n-meta-font-size":P,"--n-description-font-size":T}}),s=r?Ce("notification",Do(()=>e.type[0]),i,n):void 0;return{mergedClsPrefix:o,showAvatar:Do(()=>e.avatar||"default"!==e.type),handleCloseClick(){e.onClose()},rtlEnabled:l,cssVars:r?void 0:i,themeClass:null==s?void 0:s.themeClass,onRender:null==s?void 0:s.onRender}},render(){var e;const{mergedClsPrefix:o}=this;return null===(e=this.onRender)||void 0===e||e.call(this),So("div",{class:[`${o}-notification-wrapper`,this.themeClass],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:this.cssVars},So("div",{class:[`${o}-notification`,this.rtlEnabled&&`${o}-notification--rtl`,this.themeClass,{[`${o}-notification--closable`]:this.closable,[`${o}-notification--show-avatar`]:this.showAvatar}],style:this.cssVars},this.showAvatar?So("div",{class:`${o}-notification__avatar`},this.avatar?hn(this.avatar):"default"!==this.type?So(ke,{clsPrefix:o},{default:()=>qu[this.type]()}):null):null,this.closable?So(c,{clsPrefix:o,class:`${o}-notification__close`,onClick:this.handleCloseClick}):null,So("div",{ref:"bodyRef",class:`${o}-notification-main`},this.title?So("div",{class:`${o}-notification-main__header`},hn(this.title)):null,this.description?So("div",{class:`${o}-notification-main__description`},hn(this.description)):null,this.content?So("pre",{class:`${o}-notification-main__content`},hn(this.content)):null,this.meta||this.action?So("div",{class:`${o}-notification-main-footer`},this.meta?So("div",{class:`${o}-notification-main-footer__meta`},hn(this.meta)):null,this.action?So("div",{class:`${o}-notification-main-footer__action`},hn(this.action)):null):null)))}}),Xu=Object.assign(Object.assign({},Gu),{duration:Number,onClose:Function,onLeave:Function,onAfterEnter:Function,onAfterLeave:Function,onHide:Function,onAfterShow:Function,onAfterHide:Function}),Zu=po({name:"NotificationEnvironment",props:Object.assign(Object.assign({},Xu),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(e){const{wipTransitionCountRef:o}=ko(Ku),t=it(!0);let n=null;function r(){t.value=!1,n&&window.clearTimeout(n)}return Ro(()=>{e.duration&&(n=window.setTimeout(r,e.duration))}),{show:t,hide:r,handleClose:function(){const{onClose:o}=e;o?Promise.resolve(o()).then(e=>{!1!==e&&r()}):r()},handleAfterLeave:function(){o.value--;const{onAfterLeave:t,onInternalAfterLeave:n,onAfterHide:r,internalKey:a}=e;t&&t(),n(a),r&&r()},handleLeave:function(o){const{onHide:t}=e;t&&t(),o.style.maxHeight="0",o.offsetHeight},handleBeforeLeave:function(e){o.value++,e.style.maxHeight=`${e.offsetHeight}px`,e.style.height=`${e.offsetHeight}px`,e.offsetHeight},handleAfterEnter:function(t){o.value--,t.style.height="",t.style.maxHeight="";const{onAfterEnter:n,onAfterShow:r}=e;n&&n(),r&&r()},handleBeforeEnter:function(e){o.value++,yo(()=>{e.style.height=`${e.offsetHeight}px`,e.style.maxHeight="0",e.style.transition="none",e.offsetHeight,e.style.transition="",e.style.maxHeight=e.style.height})},handleMouseenter:function(e){e.currentTarget===e.target&&null!==n&&(window.clearTimeout(n),n=null)},handleMouseleave:function(o){o.currentTarget===o.target&&function(){const{duration:o}=e;o&&(n=window.setTimeout(r,o))}()}}},render(){return So(Xo,{name:"notification-transition",appear:!0,onBeforeEnter:this.handleBeforeEnter,onAfterEnter:this.handleAfterEnter,onBeforeLeave:this.handleBeforeLeave,onLeave:this.handleLeave,onAfterLeave:this.handleAfterLeave},{default:()=>this.show?So(Ju,Object.assign({},pn(this.$props,Yu),{onClose:this.handleClose,onMouseenter:this.duration&&this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.duration&&this.keepAliveOnHover?this.handleMouseleave:void 0})):null})}}),Qu=xe([ge("notification-container","\n z-index: 4000;\n position: fixed;\n overflow: visible;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n ",[xe(">",[ge("scrollbar","\n width: initial;\n overflow: visible;\n height: -moz-fit-content !important;\n height: fit-content !important;\n max-height: 100vh !important;\n ",[xe(">",[ge("scrollbar-container","\n height: -moz-fit-content !important;\n height: fit-content !important;\n max-height: 100vh !important;\n ",[ge("scrollbar-content","\n padding-top: 12px;\n padding-bottom: 33px;\n ")])])])]),so("top, top-right, top-left","\n top: 12px;\n ",[xe("&.transitioning >",[ge("scrollbar",[xe(">",[ge("scrollbar-container","\n min-height: 100vh !important;\n ")])])])]),so("bottom, bottom-right, bottom-left","\n bottom: 12px;\n ",[xe(">",[ge("scrollbar",[xe(">",[ge("scrollbar-container",[ge("scrollbar-content","\n padding-bottom: 12px;\n ")])])])]),ge("notification-wrapper","\n display: flex;\n align-items: flex-end;\n margin-bottom: 0;\n margin-top: 12px;\n ")]),so("top, bottom","\n left: 50%;\n transform: translateX(-50%);\n ",[ge("notification-wrapper",[xe("&.notification-transition-enter-from, &.notification-transition-leave-to","\n transform: scale(0.85);\n "),xe("&.notification-transition-leave-from, &.notification-transition-enter-to","\n transform: scale(1);\n ")])]),so("top",[ge("notification-wrapper","\n transform-origin: top center;\n ")]),so("bottom",[ge("notification-wrapper","\n transform-origin: bottom center;\n ")]),so("top-right, bottom-right",[ge("notification","\n margin-left: 28px;\n margin-right: 16px;\n ")]),so("top-left, bottom-left",[ge("notification","\n margin-left: 16px;\n margin-right: 28px;\n ")]),so("top-right","\n right: 0;\n ",[ep("top-right")]),so("top-left","\n left: 0;\n ",[ep("top-left")]),so("bottom-right","\n right: 0;\n ",[ep("bottom-right")]),so("bottom-left","\n left: 0;\n ",[ep("bottom-left")]),so("scrollable",[so("top-right","\n top: 0;\n "),so("top-left","\n top: 0;\n "),so("bottom-right","\n bottom: 0;\n "),so("bottom-left","\n bottom: 0;\n ")]),ge("notification-wrapper","\n margin-bottom: 12px;\n ",[xe("&.notification-transition-enter-from, &.notification-transition-leave-to","\n opacity: 0;\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n "),xe("&.notification-transition-leave-from, &.notification-transition-enter-to","\n opacity: 1;\n "),xe("&.notification-transition-leave-active","\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier),\n opacity .3s var(--n-bezier),\n transform .3s var(--n-bezier-ease-in),\n max-height .3s var(--n-bezier),\n margin-top .3s linear,\n margin-bottom .3s linear,\n box-shadow .3s var(--n-bezier);\n "),xe("&.notification-transition-enter-active","\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier),\n opacity .3s var(--n-bezier),\n transform .3s var(--n-bezier-ease-out),\n max-height .3s var(--n-bezier),\n margin-top .3s linear,\n margin-bottom .3s linear,\n box-shadow .3s var(--n-bezier);\n ")]),ge("notification","\n background-color: var(--n-color);\n color: var(--n-text-color);\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier),\n opacity .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier);\n font-family: inherit;\n font-size: var(--n-font-size);\n font-weight: 400;\n position: relative;\n display: flex;\n overflow: hidden;\n flex-shrink: 0;\n padding-left: var(--n-padding-left);\n padding-right: var(--n-padding-right);\n width: var(--n-width);\n max-width: calc(100vw - 16px - 16px);\n border-radius: var(--n-border-radius);\n box-shadow: var(--n-box-shadow);\n box-sizing: border-box;\n opacity: 1;\n ",[eo("avatar",[ge("icon","\n color: var(--n-icon-color);\n "),ge("base-icon","\n color: var(--n-icon-color);\n ")]),so("show-avatar",[ge("notification-main","\n margin-left: 40px;\n width: calc(100% - 40px); \n ")]),so("closable",[ge("notification-main",[xe("> *:first-child","\n padding-right: 20px;\n ")]),eo("close","\n position: absolute;\n top: 0;\n right: 0;\n margin: var(--n-close-margin);\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n ")]),eo("avatar","\n position: absolute;\n top: var(--n-padding-top);\n left: var(--n-padding-left);\n width: 28px;\n height: 28px;\n font-size: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n ",[ge("icon","transition: color .3s var(--n-bezier);")]),ge("notification-main","\n padding-top: var(--n-padding-top);\n padding-bottom: var(--n-padding-bottom);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n margin-left: 8px;\n width: calc(100% - 8px);\n ",[ge("notification-main-footer","\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-top: 12px;\n ",[eo("meta","\n font-size: var(--n-meta-font-size);\n transition: color .3s var(--n-bezier-ease-out);\n color: var(--n-description-text-color);\n "),eo("action","\n cursor: pointer;\n transition: color .3s var(--n-bezier-ease-out);\n color: var(--n-action-text-color);\n ")]),eo("header","\n font-weight: var(--n-title-font-weight);\n font-size: var(--n-title-font-size);\n transition: color .3s var(--n-bezier-ease-out);\n color: var(--n-title-text-color);\n "),eo("description","\n margin-top: 8px;\n font-size: var(--n-description-font-size);\n white-space: pre-wrap;\n word-wrap: break-word;\n transition: color .3s var(--n-bezier-ease-out);\n color: var(--n-description-text-color);\n "),eo("content","\n line-height: var(--n-line-height);\n margin: 12px 0 0 0;\n font-family: inherit;\n white-space: pre-wrap;\n word-wrap: break-word;\n transition: color .3s var(--n-bezier-ease-out);\n color: var(--n-text-color);\n ",[xe("&:first-child","margin: 0;")])])])])]);function ep(e){const o="left"===e.split("-")[1]?"calc(-100%)":"calc(100%)";return ge("notification-wrapper",[xe("&.notification-transition-enter-from, &.notification-transition-leave-to",`\n transform: translate(${o}, 0);\n `),xe("&.notification-transition-leave-from, &.notification-transition-enter-to","\n transform: translate(0, 0);\n ")])}var op=J("n-notification-api"),tp=po({name:"NotificationProvider",props:Object.assign(Object.assign({},P.props),{containerClass:String,containerStyle:[String,Object],to:[String,Object],scrollable:{type:Boolean,default:!0},max:Number,placement:{type:String,default:"top-right"},keepAliveOnHover:Boolean}),setup(e){const{mergedClsPrefixRef:o}=be(e),t=it([]),n={},r=new Set;function a(o){const a=Ue(),l=()=>{r.add(a),n[a]&&n[a].hide()},i=_o(Object.assign(Object.assign({},o),{key:a,destroy:l,hide:l,deactivate:l})),{max:s}=e;if(s&&t.value.length-r.size>=s){let e=!1,o=0;for(const a of t.value){if(!r.has(a.key)){n[a.key]&&(a.destroy(),e=!0);break}o++}e||t.value.splice(o,1)}return t.value.push(i),i}const l=["info","success","warning","error"].map(e=>o=>a(Object.assign(Object.assign({},o),{type:e})));const i=P("Notification","-notification",Qu,Wu,e,o),s={create:a,info:l[0],success:l[1],warning:l[2],error:l[3],open:function(e){return a(e)},destroyAll:function(){Object.values(t.value).forEach(e=>{e.hide()})}},c=it(0);return go(op,s),go(Ku,{props:e,mergedClsPrefixRef:o,mergedThemeRef:i,wipTransitionCountRef:c}),Object.assign({mergedClsPrefix:o,notificationList:t,notificationRefs:n,handleAfterLeave:function(e){r.delete(e),t.value.splice(t.value.findIndex(o=>o.key===e),1)}},s)},render(){var e,o,t;const{placement:n}=this;return So(No,null,null===(o=(e=this.$slots).default)||void 0===o?void 0:o.call(e),this.notificationList.length?So(Oo,{to:null!==(t=this.to)&&void 0!==t?t:"body"},So(Vu,{class:this.containerClass,style:this.containerStyle,scrollable:this.scrollable&&"top"!==n&&"bottom"!==n,placement:n},{default:()=>this.notificationList.map(e=>So(Zu,Object.assign({ref:o=>{const t=e.key;null===o?delete this.notificationRefs[t]:this.notificationRefs[t]=o}},fa(e,["destroy","hide","deactivate"]),{internalKey:e.key,onInternalAfterLeave:this.handleAfterLeave,keepAliveOnHover:void 0===e.keepAliveOnHover?this.keepAliveOnHover:e.keepAliveOnHover})))})):null)}});var np=po({name:"InjectionExtractor",props:{onSetup:Function},setup(e,{slots:o}){var t;return null===(t=e.onSetup)||void 0===t||t.call(e),()=>{var e;return null===(e=o.default)||void 0===e?void 0:e.call(o)}}}),rp={message:wn,notification:function(){const e=ko(op,null);return null===e&&d("use-notification","No outer `n-notification-provider` found."),e},loadingBar:function(){const e=ko(Cu,null);return null===e&&d("use-loading-bar","No outer <n-loading-bar-provider /> founded."),e},dialog:_n,modal:Wn};function ap(e,{configProviderProps:o,messageProviderProps:t,dialogProviderProps:n,notificationProviderProps:r,loadingBarProviderProps:a,modalProviderProps:l}={}){const i=[];return e.forEach(e=>{switch(e){case"message":i.push({type:e,Provider:Du,props:t});break;case"notification":i.push({type:e,Provider:tp,props:r});break;case"dialog":i.push({type:e,Provider:yu,props:n});break;case"loadingBar":i.push({type:e,Provider:zu,props:a});break;case"modal":i.push({type:e,Provider:Hu,props:l})}}),function({providersAndProps:e,configProviderProps:o}){let t=Ho(function(){return So(id,Qo(o),{default:()=>e.map(({type:e,Provider:o,props:t})=>So(o,Qo(t),{default:()=>So(np,{onSetup:()=>n[e]=rp[e]()})}))})});const n={app:t};let r;return m&&(r=document.createElement("div"),document.body.appendChild(r),t.mount(r)),Object.assign({unmount:()=>{var e;null!==t&&null!==r?(t.unmount(),null===(e=r.parentNode)||void 0===e||e.removeChild(r),r=null,t=null):z("discrete","unmount call no need because discrete app has been unmounted")}},n)}({providersAndProps:i,configProviderProps:o})}var lp={name:"Divider",common:_i,self:Un};function ip(e){const{modalColor:o,textColor1:t,textColor2:n,boxShadow3:r,lineHeight:a,fontWeightStrong:l,dividerColor:i,closeColorHover:s,closeColorPressed:c,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,borderRadius:h,primaryColorHover:f}=e;return{bodyPadding:"16px 24px",borderRadius:h,headerPadding:"16px 24px",footerPadding:"16px 24px",color:o,textColor:n,titleTextColor:t,titleFontSize:"18px",titleFontWeight:l,boxShadow:r,lineHeight:a,headerBorderBottom:`1px solid ${i}`,footerBorderTop:`1px solid ${i}`,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,closeSize:"22px",closeIconSize:"18px",closeColorHover:s,closeColorPressed:c,closeBorderRadius:h,resizableTriggerColorHover:f}}var sp=S({name:"Drawer",common:l,peers:{Scrollbar:ro},self:ip}),cp={name:"Drawer",common:_i,peers:{Scrollbar:Di},self:ip},dp={actionMargin:"0 0 0 20px",actionMarginRtl:"0 20px 0 0"},up={name:"DynamicInput",common:_i,peers:{Input:ec,Button:$c},self:()=>dp};var pp,hp=S({name:"DynamicInput",common:l,peers:{Input:bn,Button:Ie},self:function(){return dp}}),fp={name:"Space",self:()=>Qn};function vp(){if(!m)return!0;if(void 0===pp){const e=document.createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e);const o=1===e.scrollHeight;return document.body.removeChild(e),pp=o}return pp}var mp=po({name:"Space",props:Object.assign(Object.assign({},P.props),{align:String,justify:{type:String,default:"start"},inline:Boolean,vertical:Boolean,reverse:Boolean,size:{type:[String,Number,Array],default:"medium"},wrapItem:{type:Boolean,default:!0},itemClass:String,itemStyle:[String,Object],wrap:{type:Boolean,default:!0},internalUseGap:{type:Boolean,default:void 0}}),setup(e){const{mergedClsPrefixRef:o,mergedRtlRef:t}=be(e),n=P("Space","-space",void 0,Hn,e,o),r=g("Space",t,o);return{useGap:vp(),rtlEnabled:r,mergedClsPrefix:o,margin:Do(()=>{const{size:o}=e;if(Array.isArray(o))return{horizontal:o[0],vertical:o[1]};if("number"==typeof o)return{horizontal:o,vertical:o};const{self:{[ao("gap",o)]:t}}=n.value,{row:r,col:a}=Xe(t);return{horizontal:ze(a),vertical:ze(r)}})}},render(){const{vertical:e,reverse:o,align:t,inline:n,justify:r,itemClass:a,itemStyle:l,margin:i,wrap:s,mergedClsPrefix:c,rtlEnabled:d,useGap:u,wrapItem:p,internalUseGap:h}=this,f=Tn(pa(this),!1);if(!f.length)return null;const v=`${i.horizontal}px`,m=i.horizontal/2+"px",g=`${i.vertical}px`,b=i.vertical/2+"px",y=f.length-1,x=r.startsWith("space-");return So("div",{role:"none",class:[`${c}-space`,d&&`${c}-space--rtl`],style:{display:n?"inline-flex":"flex",flexDirection:e&&!o?"column":e&&o?"column-reverse":!e&&o?"row-reverse":"row",justifyContent:["start","end"].includes(r)?`flex-${r}`:r,flexWrap:!s||e?"nowrap":"wrap",marginTop:u||e?"":`-${b}`,marginBottom:u||e?"":`-${b}`,alignItems:t,gap:u?`${i.vertical}px ${i.horizontal}px`:""}},p||!u&&!h?f.map((o,t)=>o.type===Vo?o:So("div",{role:"none",class:a,style:[l,{maxWidth:"100%"},u?"":e?{marginBottom:t!==y?g:""}:d?{marginLeft:x?"space-between"===r&&t===y?"":m:t!==y?v:"",marginRight:x?"space-between"===r&&0===t?"":m:"",paddingTop:b,paddingBottom:b}:{marginRight:x?"space-between"===r&&t===y?"":m:t!==y?v:"",marginLeft:x?"space-between"===r&&0===t?"":m:"",paddingTop:b,paddingBottom:b}]},o)):f)}}),gp={name:"DynamicTags",common:_i,peers:{Input:ec,Button:$c,Tag:As,Space:fp},self:()=>({inputWidth:"64px"})},bp=S({name:"DynamicTags",common:l,peers:{Input:bn,Button:Ie,Tag:ye,Space:Hn},self:()=>({inputWidth:"64px"})}),yp={name:"Element",common:_i},xp={name:"Element",common:l},Cp={gapSmall:"4px 8px",gapMedium:"8px 12px",gapLarge:"12px 16px"},wp={name:"Flex",self:()=>Cp};var Sp={name:"Flex",self:function(){return Cp}},kp={name:"ButtonGroup",common:_i},Pp={name:"ButtonGroup",common:l},Tp={name:"Form",common:_i,self:qn},Ip={name:"GradientText",common:_i,self(e){const{primaryColor:o,successColor:t,warningColor:n,errorColor:r,infoColor:a,primaryColorSuppl:l,successColorSuppl:i,warningColorSuppl:s,errorColorSuppl:c,infoColorSuppl:d,fontWeightStrong:u}=e;return{fontWeight:u,rotate:"252deg",colorStartPrimary:o,colorEndPrimary:l,colorStartInfo:a,colorEndInfo:d,colorStartWarning:n,colorEndWarning:s,colorStartError:r,colorEndError:c,colorStartSuccess:t,colorEndSuccess:i}}};var zp={name:"GradientText",common:l,self:function(e){const{primaryColor:o,successColor:t,warningColor:n,errorColor:r,infoColor:a,fontWeightStrong:l}=e;return{fontWeight:l,rotate:"252deg",colorStartPrimary:ne(o,{alpha:.6}),colorEndPrimary:o,colorStartInfo:ne(a,{alpha:.6}),colorEndInfo:a,colorStartWarning:ne(n,{alpha:.6}),colorEndWarning:n,colorStartError:ne(r,{alpha:.6}),colorEndError:r,colorStartSuccess:ne(t,{alpha:.6}),colorEndSuccess:t}}},Mp={name:"InputNumber",common:_i,peers:{Button:$c,Input:ec},self(e){const{textColorDisabled:o}=e;return{iconColorDisabled:o}}};var Rp=S({name:"InputNumber",common:l,peers:{Button:Ie,Input:bn},self:function(e){const{textColorDisabled:o}=e;return{iconColorDisabled:o}}});function Ap(){return{inputWidthSmall:"24px",inputWidthMedium:"30px",inputWidthLarge:"36px",gapSmall:"8px",gapMedium:"8px",gapLarge:"8px"}}var Fp=S({name:"InputOtp",common:l,peers:{Input:bn},self:Ap}),$p={name:"InputOtp",common:_i,peers:{Input:ec},self:Ap},Op={name:"Layout",common:_i,peers:{Scrollbar:Di},self(e){const{textColor2:o,bodyColor:t,popoverColor:n,cardColor:r,dividerColor:a,scrollbarColor:l,scrollbarColorHover:i}=e;return{textColor:o,textColorInverted:o,color:t,colorEmbedded:t,headerColor:r,headerColorInverted:r,footerColor:r,footerColorInverted:r,headerBorderColor:a,headerBorderColorInverted:a,footerBorderColor:a,footerBorderColorInverted:a,siderBorderColor:a,siderBorderColorInverted:a,siderColor:r,siderColorInverted:r,siderToggleButtonBorder:"1px solid transparent",siderToggleButtonColor:n,siderToggleButtonIconColor:o,siderToggleButtonIconColorInverted:o,siderToggleBarColor:Be(t,l),siderToggleBarColorHover:Be(t,i),__invertScrollbar:"false"}}};var Bp=S({name:"Layout",common:l,peers:{Scrollbar:ro},self:function(e){const{baseColor:o,textColor2:t,bodyColor:n,cardColor:r,dividerColor:a,actionColor:l,scrollbarColor:i,scrollbarColorHover:s,invertedColor:c}=e;return{textColor:t,textColorInverted:"#FFF",color:n,colorEmbedded:l,headerColor:r,headerColorInverted:c,footerColor:l,footerColorInverted:c,headerBorderColor:a,headerBorderColorInverted:c,footerBorderColor:a,footerBorderColorInverted:c,siderBorderColor:a,siderBorderColorInverted:c,siderColor:r,siderColorInverted:c,siderToggleButtonBorder:`1px solid ${a}`,siderToggleButtonColor:o,siderToggleButtonIconColor:t,siderToggleButtonIconColorInverted:t,siderToggleBarColor:Be(n,i),siderToggleBarColorHover:Be(n,s),__invertScrollbar:"true"}}}),Ep={name:"Row",common:_i},_p={name:"Row",common:l};function Dp(e){const{textColor2:o,cardColor:t,modalColor:n,popoverColor:r,dividerColor:a,borderRadius:l,fontSize:i,hoverColor:s}=e;return{textColor:o,color:t,colorHover:s,colorModal:n,colorHoverModal:Be(n,s),colorPopover:r,colorHoverPopover:Be(r,s),borderColor:a,borderColorModal:Be(n,a),borderColorPopover:Be(r,a),borderRadius:l,fontSize:i}}var Lp={name:"List",common:l,self:Dp},Hp={name:"List",common:_i,self:Dp},jp={name:"Log",common:_i,peers:{Scrollbar:Di,Code:Jc},self(e){const{textColor2:o,inputColor:t,fontSize:n,primaryColor:r}=e;return{loaderFontSize:n,loaderTextColor:o,loaderColor:t,loaderBorder:"1px solid #0000",loadingColor:r}}};var Up=S({name:"Log",common:l,peers:{Scrollbar:ro,Code:Xc},self:function(e){const{textColor2:o,modalColor:t,borderColor:n,fontSize:r,primaryColor:a}=e;return{loaderFontSize:r,loaderTextColor:o,loaderColor:t,loaderBorder:`1px solid ${n}`,loadingColor:a}}}),Wp={name:"Mention",common:_i,peers:{InternalSelectMenu:us,Input:ec},self(e){const{boxShadow2:o}=e;return{menuBoxShadow:o}}};var Np=S({name:"Mention",common:l,peers:{InternalSelectMenu:yn,Input:bn},self:function(e){const{boxShadow2:o}=e;return{menuBoxShadow:o}}});function Kp(e){const{borderRadius:o,textColor3:t,primaryColor:n,textColor2:r,textColor1:a,fontSize:l,dividerColor:i,hoverColor:s,primaryColorHover:c}=e;return Object.assign({borderRadius:o,color:"#0000",groupTextColor:t,itemColorHover:s,itemColorActive:ne(n,{alpha:.1}),itemColorActiveHover:ne(n,{alpha:.1}),itemColorActiveCollapsed:ne(n,{alpha:.1}),itemTextColor:r,itemTextColorHover:r,itemTextColorActive:n,itemTextColorActiveHover:n,itemTextColorChildActive:n,itemTextColorChildActiveHover:n,itemTextColorHorizontal:r,itemTextColorHoverHorizontal:c,itemTextColorActiveHorizontal:n,itemTextColorActiveHoverHorizontal:n,itemTextColorChildActiveHorizontal:n,itemTextColorChildActiveHoverHorizontal:n,itemIconColor:a,itemIconColorHover:a,itemIconColorActive:n,itemIconColorActiveHover:n,itemIconColorChildActive:n,itemIconColorChildActiveHover:n,itemIconColorCollapsed:a,itemIconColorHorizontal:a,itemIconColorHoverHorizontal:c,itemIconColorActiveHorizontal:n,itemIconColorActiveHoverHorizontal:n,itemIconColorChildActiveHorizontal:n,itemIconColorChildActiveHoverHorizontal:n,itemHeight:"42px",arrowColor:r,arrowColorHover:r,arrowColorActive:n,arrowColorActiveHover:n,arrowColorChildActive:n,arrowColorChildActiveHover:n,colorInverted:"#0000",borderColorHorizontal:"#0000",fontSize:l,dividerColor:i},{itemColorHoverInverted:"#0000",itemColorActiveInverted:u=n,itemColorActiveHoverInverted:u,itemColorActiveCollapsedInverted:u,itemTextColorInverted:d="#BBB",itemTextColorHoverInverted:p="#FFF",itemTextColorChildActiveInverted:p,itemTextColorChildActiveHoverInverted:p,itemTextColorActiveInverted:p,itemTextColorActiveHoverInverted:p,itemTextColorHorizontalInverted:d,itemTextColorHoverHorizontalInverted:p,itemTextColorChildActiveHorizontalInverted:p,itemTextColorChildActiveHoverHorizontalInverted:p,itemTextColorActiveHorizontalInverted:p,itemTextColorActiveHoverHorizontalInverted:p,itemIconColorInverted:d,itemIconColorHoverInverted:p,itemIconColorActiveInverted:p,itemIconColorActiveHoverInverted:p,itemIconColorChildActiveInverted:p,itemIconColorChildActiveHoverInverted:p,itemIconColorCollapsedInverted:d,itemIconColorHorizontalInverted:d,itemIconColorHoverHorizontalInverted:p,itemIconColorActiveHorizontalInverted:p,itemIconColorActiveHoverHorizontalInverted:p,itemIconColorChildActiveHorizontalInverted:p,itemIconColorChildActiveHoverHorizontalInverted:p,arrowColorInverted:d,arrowColorHoverInverted:p,arrowColorActiveInverted:p,arrowColorActiveHoverInverted:p,arrowColorChildActiveInverted:p,arrowColorChildActiveHoverInverted:p,groupTextColorInverted:"#AAA"});var d,u,p}var Vp=S({name:"Menu",common:l,peers:{Tooltip:Sd,Dropdown:yd},self:Kp}),qp={name:"Menu",common:_i,peers:{Tooltip:wd,Dropdown:xd},self(e){const{primaryColor:o,primaryColorSuppl:t}=e,n=Kp(e);return n.itemColorActive=ne(o,{alpha:.15}),n.itemColorActiveHover=ne(o,{alpha:.15}),n.itemColorActiveCollapsed=ne(o,{alpha:.15}),n.itemColorActiveInverted=t,n.itemColorActiveHoverInverted=t,n.itemColorActiveCollapsedInverted=t,n}},Gp={titleFontSize:"18px",backSize:"22px"};function Yp(e){const{textColor1:o,textColor2:t,textColor3:n,fontSize:r,fontWeightStrong:a,primaryColorHover:l,primaryColorPressed:i}=e;return Object.assign(Object.assign({},Gp),{titleFontWeight:a,fontSize:r,titleTextColor:o,backColor:t,backColorHover:l,backColorPressed:i,subtitleTextColor:n})}var Jp=S({name:"PageHeader",common:l,self:Yp}),Xp={name:"PageHeader",common:_i,self:Yp},Zp={iconSize:"22px"};function Qp(e){const{fontSize:o,warningColor:t}=e;return Object.assign(Object.assign({},Zp),{fontSize:o,iconColor:t})}var eh=S({name:"Popconfirm",common:l,peers:{Button:Ie,Popover:Sn},self:Qp}),oh={name:"Popconfirm",common:_i,peers:{Button:$c,Popover:bs},self:Qp};function th(e){const{infoColor:o,successColor:t,warningColor:n,errorColor:r,textColor2:a,progressRailColor:l,fontSize:i,fontWeight:s}=e;return{fontSize:i,fontSizeCircle:"28px",fontWeightCircle:s,railColor:l,railHeight:"8px",iconSizeCircle:"36px",iconSizeLine:"18px",iconColor:o,iconColorInfo:o,iconColorSuccess:t,iconColorWarning:n,iconColorError:r,textColorCircle:a,textColorLineInner:"rgb(255, 255, 255)",textColorLineOuter:a,fillColor:o,fillColorInfo:o,fillColorSuccess:t,fillColorWarning:n,fillColorError:r,lineBgProcessing:"linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)"}}var nh={name:"Progress",common:l,self:th},rh={name:"Progress",common:_i,self(e){const o=th(e);return o.textColorLineInner="rgb(0, 0, 0)",o.lineBgProcessing="linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)",o}},ah={name:"Rate",common:_i,self(e){const{railColor:o}=e;return{itemColor:o,itemColorActive:"#CCAA33",itemSize:"20px",sizeSmall:"16px",sizeMedium:"20px",sizeLarge:"24px"}}};var lh={name:"Rate",common:l,self:function(e){const{railColor:o}=e;return{itemColor:o,itemColorActive:"#FFCC33",sizeSmall:"16px",sizeMedium:"20px",sizeLarge:"24px"}}},ih={titleFontSizeSmall:"26px",titleFontSizeMedium:"32px",titleFontSizeLarge:"40px",titleFontSizeHuge:"48px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",iconSizeSmall:"64px",iconSizeMedium:"80px",iconSizeLarge:"100px",iconSizeHuge:"125px",iconColor418:void 0,iconColor404:void 0,iconColor403:void 0,iconColor500:void 0};function sh(e){const{textColor2:o,textColor1:t,errorColor:n,successColor:r,infoColor:a,warningColor:l,lineHeight:i,fontWeightStrong:s}=e;return Object.assign(Object.assign({},ih),{lineHeight:i,titleFontWeight:s,titleTextColor:t,textColor:o,iconColorError:n,iconColorSuccess:r,iconColorInfo:a,iconColorWarning:l})}var ch={name:"Result",common:l,self:sh},dh={name:"Result",common:_i,self:sh},uh={railHeight:"4px",railWidthVertical:"4px",handleSize:"18px",dotHeight:"8px",dotWidth:"8px",dotBorderRadius:"4px"},ph={name:"Slider",common:_i,self(e){const{railColor:o,modalColor:t,primaryColorSuppl:n,popoverColor:r,textColor2:a,cardColor:l,borderRadius:i,fontSize:s,opacityDisabled:c}=e;return Object.assign(Object.assign({},uh),{fontSize:s,markFontSize:s,railColor:o,railColorHover:o,fillColor:n,fillColorHover:n,opacityDisabled:c,handleColor:"#FFF",dotColor:l,dotColorModal:t,dotColorPopover:r,handleBoxShadow:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",handleBoxShadowHover:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",handleBoxShadowActive:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",handleBoxShadowFocus:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",indicatorColor:r,indicatorBoxShadow:"0 2px 8px 0 rgba(0, 0, 0, 0.12)",indicatorTextColor:a,indicatorBorderRadius:i,dotBorder:`2px solid ${o}`,dotBorderActive:`2px solid ${n}`,dotBoxShadow:""})}};var hh={name:"Slider",common:l,self:function(e){const{railColor:o,primaryColor:t,baseColor:n,cardColor:r,modalColor:a,popoverColor:l,borderRadius:i,fontSize:s,opacityDisabled:c}=e;return Object.assign(Object.assign({},uh),{fontSize:s,markFontSize:s,railColor:o,railColorHover:o,fillColor:t,fillColorHover:t,opacityDisabled:c,handleColor:"#FFF",dotColor:r,dotColorModal:a,dotColorPopover:l,handleBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowHover:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowActive:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowFocus:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",indicatorColor:"rgba(0, 0, 0, .85)",indicatorBoxShadow:"0 2px 8px 0 rgba(0, 0, 0, 0.12)",indicatorTextColor:n,indicatorBorderRadius:i,dotBorder:`2px solid ${o}`,dotBorderActive:`2px solid ${t}`,dotBoxShadow:""})}},fh={name:"Spin",common:_i,self:Ae};function vh(e){const{textColor2:o,textColor3:t,fontSize:n,fontWeight:r}=e;return{labelFontSize:n,labelFontWeight:r,valueFontWeight:r,valueFontSize:"24px",labelTextColor:t,valuePrefixTextColor:o,valueSuffixTextColor:o,valueTextColor:o}}var mh={name:"Statistic",common:l,self:vh},gh={name:"Statistic",common:_i,self:vh},bh={stepHeaderFontSizeSmall:"14px",stepHeaderFontSizeMedium:"16px",indicatorIndexFontSizeSmall:"14px",indicatorIndexFontSizeMedium:"16px",indicatorSizeSmall:"22px",indicatorSizeMedium:"28px",indicatorIconSizeSmall:"14px",indicatorIconSizeMedium:"18px"};function yh(e){const{fontWeightStrong:o,baseColor:t,textColorDisabled:n,primaryColor:r,errorColor:a,textColor1:l,textColor2:i}=e;return Object.assign(Object.assign({},bh),{stepHeaderFontWeight:o,indicatorTextColorProcess:t,indicatorTextColorWait:n,indicatorTextColorFinish:r,indicatorTextColorError:a,indicatorBorderColorProcess:r,indicatorBorderColorWait:n,indicatorBorderColorFinish:r,indicatorBorderColorError:a,indicatorColorProcess:r,indicatorColorWait:"#0000",indicatorColorFinish:"#0000",indicatorColorError:"#0000",splitorColorProcess:n,splitorColorWait:n,splitorColorFinish:r,splitorColorError:n,headerTextColorProcess:l,headerTextColorWait:n,headerTextColorFinish:n,headerTextColorError:a,descriptionTextColorProcess:i,descriptionTextColorWait:n,descriptionTextColorFinish:n,descriptionTextColorError:a})}var xh={name:"Steps",common:l,self:yh},Ch={name:"Steps",common:_i,self:yh},wh={buttonHeightSmall:"14px",buttonHeightMedium:"18px",buttonHeightLarge:"22px",buttonWidthSmall:"14px",buttonWidthMedium:"18px",buttonWidthLarge:"22px",buttonWidthPressedSmall:"20px",buttonWidthPressedMedium:"24px",buttonWidthPressedLarge:"28px",railHeightSmall:"18px",railHeightMedium:"22px",railHeightLarge:"26px",railWidthSmall:"32px",railWidthMedium:"40px",railWidthLarge:"48px"},Sh={name:"Switch",common:_i,self(e){const{primaryColorSuppl:o,opacityDisabled:t,borderRadius:n,primaryColor:r,textColor2:a,baseColor:l}=e;return Object.assign(Object.assign({},wh),{iconColor:l,textColor:a,loadingColor:o,opacityDisabled:t,railColor:"rgba(255, 255, 255, .20)",railColorActive:o,buttonBoxShadow:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",buttonColor:"#FFF",railBorderRadiusSmall:n,railBorderRadiusMedium:n,railBorderRadiusLarge:n,buttonBorderRadiusSmall:n,buttonBorderRadiusMedium:n,buttonBorderRadiusLarge:n,boxShadowFocus:`0 0 8px 0 ${ne(r,{alpha:.3})}`})}};var kh={name:"Switch",common:l,self:function(e){const{primaryColor:o,opacityDisabled:t,borderRadius:n,textColor3:r}=e;return Object.assign(Object.assign({},wh),{iconColor:r,textColor:"white",loadingColor:o,opacityDisabled:t,railColor:"rgba(0, 0, 0, .14)",railColorActive:o,buttonBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",buttonColor:"#FFF",railBorderRadiusSmall:n,railBorderRadiusMedium:n,railBorderRadiusLarge:n,buttonBorderRadiusSmall:n,buttonBorderRadiusMedium:n,buttonBorderRadiusLarge:n,boxShadowFocus:`0 0 0 2px ${ne(o,{alpha:.2})}`})}},Ph={thPaddingSmall:"6px",thPaddingMedium:"12px",thPaddingLarge:"12px",tdPaddingSmall:"6px",tdPaddingMedium:"12px",tdPaddingLarge:"12px"};function Th(e){const{dividerColor:o,cardColor:t,modalColor:n,popoverColor:r,tableHeaderColor:a,tableColorStriped:l,textColor1:i,textColor2:s,borderRadius:c,fontWeightStrong:d,lineHeight:u,fontSizeSmall:p,fontSizeMedium:h,fontSizeLarge:f}=e;return Object.assign(Object.assign({},Ph),{fontSizeSmall:p,fontSizeMedium:h,fontSizeLarge:f,lineHeight:u,borderRadius:c,borderColor:Be(t,o),borderColorModal:Be(n,o),borderColorPopover:Be(r,o),tdColor:t,tdColorModal:n,tdColorPopover:r,tdColorStriped:Be(t,l),tdColorStripedModal:Be(n,l),tdColorStripedPopover:Be(r,l),thColor:Be(t,a),thColorModal:Be(n,a),thColorPopover:Be(r,a),thTextColor:i,tdTextColor:s,thFontWeight:d})}var Ih={name:"Table",common:l,self:Th},zh={name:"Table",common:_i,self:Th},Mh={tabFontSizeSmall:"14px",tabFontSizeMedium:"14px",tabFontSizeLarge:"16px",tabGapSmallLine:"36px",tabGapMediumLine:"36px",tabGapLargeLine:"36px",tabGapSmallLineVertical:"8px",tabGapMediumLineVertical:"8px",tabGapLargeLineVertical:"8px",tabPaddingSmallLine:"6px 0",tabPaddingMediumLine:"10px 0",tabPaddingLargeLine:"14px 0",tabPaddingVerticalSmallLine:"6px 12px",tabPaddingVerticalMediumLine:"8px 16px",tabPaddingVerticalLargeLine:"10px 20px",tabGapSmallBar:"36px",tabGapMediumBar:"36px",tabGapLargeBar:"36px",tabGapSmallBarVertical:"8px",tabGapMediumBarVertical:"8px",tabGapLargeBarVertical:"8px",tabPaddingSmallBar:"4px 0",tabPaddingMediumBar:"6px 0",tabPaddingLargeBar:"10px 0",tabPaddingVerticalSmallBar:"6px 12px",tabPaddingVerticalMediumBar:"8px 16px",tabPaddingVerticalLargeBar:"10px 20px",tabGapSmallCard:"4px",tabGapMediumCard:"4px",tabGapLargeCard:"4px",tabGapSmallCardVertical:"4px",tabGapMediumCardVertical:"4px",tabGapLargeCardVertical:"4px",tabPaddingSmallCard:"8px 16px",tabPaddingMediumCard:"10px 20px",tabPaddingLargeCard:"12px 24px",tabPaddingSmallSegment:"4px 0",tabPaddingMediumSegment:"6px 0",tabPaddingLargeSegment:"8px 0",tabPaddingVerticalLargeSegment:"0 8px",tabPaddingVerticalSmallCard:"8px 12px",tabPaddingVerticalMediumCard:"10px 16px",tabPaddingVerticalLargeCard:"12px 20px",tabPaddingVerticalSmallSegment:"0 4px",tabPaddingVerticalMediumSegment:"0 6px",tabGapSmallSegment:"0",tabGapMediumSegment:"0",tabGapLargeSegment:"0",tabGapSmallSegmentVertical:"0",tabGapMediumSegmentVertical:"0",tabGapLargeSegmentVertical:"0",panePaddingSmall:"8px 0 0 0",panePaddingMedium:"12px 0 0 0",panePaddingLarge:"16px 0 0 0",closeSize:"18px",closeIconSize:"14px"};function Rh(e){const{textColor2:o,primaryColor:t,textColorDisabled:n,closeIconColor:r,closeIconColorHover:a,closeIconColorPressed:l,closeColorHover:i,closeColorPressed:s,tabColor:c,baseColor:d,dividerColor:u,fontWeight:p,textColor1:h,borderRadius:f,fontSize:v,fontWeightStrong:m}=e;return Object.assign(Object.assign({},Mh),{colorSegment:c,tabFontSizeCard:v,tabTextColorLine:h,tabTextColorActiveLine:t,tabTextColorHoverLine:t,tabTextColorDisabledLine:n,tabTextColorSegment:h,tabTextColorActiveSegment:o,tabTextColorHoverSegment:o,tabTextColorDisabledSegment:n,tabTextColorBar:h,tabTextColorActiveBar:t,tabTextColorHoverBar:t,tabTextColorDisabledBar:n,tabTextColorCard:h,tabTextColorHoverCard:h,tabTextColorActiveCard:t,tabTextColorDisabledCard:n,barColor:t,closeIconColor:r,closeIconColorHover:a,closeIconColorPressed:l,closeColorHover:i,closeColorPressed:s,closeBorderRadius:f,tabColor:c,tabColorSegment:d,tabBorderColor:u,tabFontWeightActive:p,tabFontWeight:p,tabBorderRadius:f,paneTextColor:o,fontWeightStrong:m})}var Ah={name:"Tabs",common:l,self:Rh},Fh={name:"Tabs",common:_i,self(e){const o=Rh(e),{inputColor:t}=e;return o.colorSegment=t,o.tabColorSegment=t,o}};function $h(e){const{textColor1:o,textColor2:t,fontWeightStrong:n,fontSize:r}=e;return{fontSize:r,titleTextColor:o,textColor:t,titleFontWeight:n}}var Oh={name:"Thing",common:l,self:$h},Bh={name:"Thing",common:_i,self:$h},Eh={titleMarginMedium:"0 0 6px 0",titleMarginLarge:"-2px 0 6px 0",titleFontSizeMedium:"14px",titleFontSizeLarge:"16px",iconSizeMedium:"14px",iconSizeLarge:"14px"},_h={name:"Timeline",common:_i,self(e){const{textColor3:o,infoColorSuppl:t,errorColorSuppl:n,successColorSuppl:r,warningColorSuppl:a,textColor1:l,textColor2:i,railColor:s,fontWeightStrong:c,fontSize:d}=e;return Object.assign(Object.assign({},Eh),{contentFontSize:d,titleFontWeight:c,circleBorder:`2px solid ${o}`,circleBorderInfo:`2px solid ${t}`,circleBorderError:`2px solid ${n}`,circleBorderSuccess:`2px solid ${r}`,circleBorderWarning:`2px solid ${a}`,iconColor:o,iconColorInfo:t,iconColorError:n,iconColorSuccess:r,iconColorWarning:a,titleTextColor:l,contentTextColor:i,metaTextColor:o,lineColor:s})}};var Dh={name:"Timeline",common:l,self:function(e){const{textColor3:o,infoColor:t,errorColor:n,successColor:r,warningColor:a,textColor1:l,textColor2:i,railColor:s,fontWeightStrong:c,fontSize:d}=e;return Object.assign(Object.assign({},Eh),{contentFontSize:d,titleFontWeight:c,circleBorder:`2px solid ${o}`,circleBorderInfo:`2px solid ${t}`,circleBorderError:`2px solid ${n}`,circleBorderSuccess:`2px solid ${r}`,circleBorderWarning:`2px solid ${a}`,iconColor:o,iconColorInfo:t,iconColorError:n,iconColorSuccess:r,iconColorWarning:a,titleTextColor:l,contentTextColor:i,metaTextColor:o,lineColor:s})}},Lh={extraFontSizeSmall:"12px",extraFontSizeMedium:"12px",extraFontSizeLarge:"14px",titleFontSizeSmall:"14px",titleFontSizeMedium:"16px",titleFontSizeLarge:"16px",closeSize:"20px",closeIconSize:"16px",headerHeightSmall:"44px",headerHeightMedium:"44px",headerHeightLarge:"50px"},Hh={name:"Transfer",common:_i,peers:{Checkbox:Uc,Scrollbar:Di,Input:ec,Empty:ss,Button:$c},self(e){const{fontWeight:o,fontSizeLarge:t,fontSizeMedium:n,fontSizeSmall:r,heightLarge:a,heightMedium:l,borderRadius:i,inputColor:s,tableHeaderColor:c,textColor1:d,textColorDisabled:u,textColor2:p,textColor3:h,hoverColor:f,closeColorHover:v,closeColorPressed:m,closeIconColor:g,closeIconColorHover:b,closeIconColorPressed:y,dividerColor:x}=e;return Object.assign(Object.assign({},Lh),{itemHeightSmall:l,itemHeightMedium:l,itemHeightLarge:a,fontSizeSmall:r,fontSizeMedium:n,fontSizeLarge:t,borderRadius:i,dividerColor:x,borderColor:"#0000",listColor:s,headerColor:c,titleTextColor:d,titleTextColorDisabled:u,extraTextColor:h,extraTextColorDisabled:u,itemTextColor:p,itemTextColorDisabled:u,itemColorPending:f,titleFontWeight:o,closeColorHover:v,closeColorPressed:m,closeIconColor:g,closeIconColorHover:b,closeIconColorPressed:y})}};var jh=S({name:"Transfer",common:l,peers:{Checkbox:Rn,Scrollbar:ro,Input:bn,Empty:Q,Button:Ie},self:function(e){const{fontWeight:o,fontSizeLarge:t,fontSizeMedium:n,fontSizeSmall:r,heightLarge:a,heightMedium:l,borderRadius:i,cardColor:s,tableHeaderColor:c,textColor1:d,textColorDisabled:u,textColor2:p,textColor3:h,borderColor:f,hoverColor:v,closeColorHover:m,closeColorPressed:g,closeIconColor:b,closeIconColorHover:y,closeIconColorPressed:x}=e;return Object.assign(Object.assign({},Lh),{itemHeightSmall:l,itemHeightMedium:l,itemHeightLarge:a,fontSizeSmall:r,fontSizeMedium:n,fontSizeLarge:t,borderRadius:i,dividerColor:f,borderColor:f,listColor:s,headerColor:Be(s,c),titleTextColor:d,titleTextColorDisabled:u,extraTextColor:h,extraTextColorDisabled:u,itemTextColor:p,itemTextColorDisabled:u,itemColorPending:v,titleFontWeight:o,closeColorHover:m,closeColorPressed:g,closeIconColor:b,closeIconColorHover:y,closeIconColorPressed:x})}});function Uh(e){const{borderRadiusSmall:o,dividerColor:t,hoverColor:n,pressedColor:r,primaryColor:a,textColor3:l,textColor2:i,textColorDisabled:s,fontSize:c}=e;return{fontSize:c,lineHeight:"1.5",nodeHeight:"30px",nodeWrapperPadding:"3px 0",nodeBorderRadius:o,nodeColorHover:n,nodeColorPressed:r,nodeColorActive:ne(a,{alpha:.1}),arrowColor:l,nodeTextColor:i,nodeTextColorDisabled:s,loadingColor:a,dropMarkColor:a,lineColor:t}}var Wh=S({name:"Tree",common:l,peers:{Checkbox:Rn,Scrollbar:ro,Empty:Q},self:Uh}),Nh={name:"Tree",common:_i,peers:{Checkbox:Uc,Scrollbar:Di,Empty:ss},self(e){const{primaryColor:o}=e,t=Uh(e);return t.nodeColorActive=ne(o,{alpha:.15}),t}},Kh={name:"TreeSelect",common:_i,peers:{Tree:Nh,Empty:ss,InternalSelection:Ds}};var Vh=S({name:"TreeSelect",common:l,peers:{Tree:Wh,Empty:Q,InternalSelection:cn},self:function(e){const{popoverColor:o,boxShadow2:t,borderRadius:n,heightMedium:r,dividerColor:a,textColor2:l}=e;return{menuPadding:"4px",menuColor:o,menuBoxShadow:t,menuBorderRadius:n,menuHeight:`calc(${r} * 7.6)`,actionDividerColor:a,actionTextColor:l,actionPadding:"8px 12px",headerDividerColor:a,headerTextColor:l,headerPadding:"8px 12px"}}}),qh={name:"Typography",common:_i,self:nr};function Gh(e){const{iconColor:o,primaryColor:t,errorColor:n,textColor2:r,successColor:a,opacityDisabled:l,actionColor:i,borderColor:s,hoverColor:c,lineHeight:d,borderRadius:u,fontSize:p}=e;return{fontSize:p,lineHeight:d,borderRadius:u,draggerColor:i,draggerBorder:`1px dashed ${s}`,draggerBorderHover:`1px dashed ${t}`,itemColorHover:c,itemColorHoverError:ne(n,{alpha:.06}),itemTextColor:r,itemTextColorError:n,itemTextColorSuccess:a,itemIconColor:o,itemDisabledOpacity:l,itemBorderImageCardError:`1px solid ${n}`,itemBorderImageCard:`1px solid ${s}`}}var Yh=S({name:"Upload",common:l,peers:{Button:Ie,Progress:nh},self:Gh}),Jh={name:"Upload",common:_i,peers:{Button:$c,Progress:rh},self(e){const{errorColor:o}=e,t=Gh(e);return t.itemColorHoverError=ne(o,{alpha:.09}),t}},Xh={name:"Watermark",common:_i,self(e){const{fontFamily:o}=e;return{fontFamily:o}}},Zh=S({name:"Watermark",common:l,self(e){const{fontFamily:o}=e;return{fontFamily:o}}});var Qh={name:"FloatButtonGroup",common:l,self:function(e){const{popoverColor:o,dividerColor:t,borderRadius:n}=e;return{color:o,buttonBorderColor:t,borderRadiusSquare:n,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .12)"}}},ef={name:"FloatButton",common:_i,self(e){const{popoverColor:o,textColor2:t,buttonColor2Hover:n,buttonColor2Pressed:r,primaryColor:a,primaryColorHover:l,primaryColorPressed:i,baseColor:s,borderRadius:c}=e;return{color:o,textColor:t,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .12)",boxShadowHover:"0 2px 12px 0px rgba(0, 0, 0, .18)",boxShadowPressed:"0 2px 12px 0px rgba(0, 0, 0, .18)",colorHover:n,colorPressed:r,colorPrimary:a,colorPrimaryHover:l,colorPrimaryPressed:i,textColorPrimary:s,borderRadiusSquare:c}}};var of={name:"FloatButton",common:l,self:function(e){const{popoverColor:o,textColor2:t,buttonColor2Hover:n,buttonColor2Pressed:r,primaryColor:a,primaryColorHover:l,primaryColorPressed:i,borderRadius:s}=e;return{color:o,colorHover:n,colorPressed:r,colorPrimary:a,colorPrimaryHover:l,colorPrimaryPressed:i,textColor:t,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .16)",boxShadowHover:"0 2px 12px 0px rgba(0, 0, 0, .24)",boxShadowPressed:"0 2px 12px 0px rgba(0, 0, 0, .24)",textColorPrimary:"#fff",borderRadiusSquare:s}}},tf=J("n-form"),nf=J("n-form-item-insts"),rf=ge("form",[so("inline","\n width: 100%;\n display: inline-flex;\n align-items: flex-start;\n align-content: space-around;\n ",[ge("form-item",{width:"auto",marginRight:"18px"},[xe("&:last-child",{marginRight:0})])])]),af=function(e,o,t,n){return new(t||(t=Promise))(function(r,a){function l(e){try{s(n.next(e))}catch(o){a(o)}}function i(e){try{s(n.throw(e))}catch(o){a(o)}}function s(e){var o;e.done?r(e.value):(o=e.value,o instanceof t?o:new t(function(e){e(o)})).then(l,i)}s((n=n.apply(e,o||[])).next())})},lf=po({name:"Form",props:Object.assign(Object.assign({},P.props),{inline:Boolean,labelWidth:[Number,String],labelAlign:String,labelPlacement:{type:String,default:"top"},model:{type:Object,default:()=>{}},rules:Object,disabled:Boolean,size:String,showRequireMark:{type:Boolean,default:void 0},requireMarkPlacement:String,showFeedback:{type:Boolean,default:!0},onSubmit:{type:Function,default:e=>{e.preventDefault()}},showLabel:{type:Boolean,default:void 0},validateMessages:Object}),setup(e){const{mergedClsPrefixRef:o}=be(e);P("Form","-form",rf,or,e,o);const t={},n=it(void 0);return go(tf,{props:e,maxChildLabelWidthRef:n,deriveMaxChildLabelWidth:e=>{const o=n.value;(void 0===o||e>=o)&&(n.value=e)}}),go(nf,{formItems:t}),Object.assign({validate:function(e){return af(this,arguments,void 0,function*(e,o=()=>!0){return yield new Promise((n,r)=>{const a=[];for(const e of An(t)){const n=t[e];for(const e of n)e.path&&a.push(e.internalValidate(null,o))}Promise.all(a).then(o=>{const t=o.some(e=>!e.valid),a=[],l=[];o.forEach(e=>{var o,t;(null===(o=e.errors)||void 0===o?void 0:o.length)&&a.push(e.errors),(null===(t=e.warnings)||void 0===t?void 0:t.length)&&l.push(e.warnings)}),e&&e(a.length?a:void 0,{warnings:l.length?l:void 0}),t?r(a.length?a:void 0):n({warnings:l.length?l:void 0})})})})},restoreValidation:function(){for(const e of An(t)){const o=t[e];for(const e of o)e.restoreValidation()}}},{mergedClsPrefix:o})},render(){const{mergedClsPrefix:e}=this;return So("form",{class:[`${e}-form`,this.inline&&`${e}-form--inline`],onSubmit:this.onSubmit},this.$slots)}});function sf(){return sf=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},sf.apply(this,arguments)}function cf(e){return cf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cf(e)}function df(e,o){return df=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,o){return e.__proto__=o,e},df(e,o)}function uf(e,o,t){return uf=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,o,t){var n=[null];n.push.apply(n,o);var r=new(Function.bind.apply(e,n));return t&&df(r,t.prototype),r},uf.apply(null,arguments)}function pf(e){var o="function"==typeof Map?new Map:void 0;return pf=function(e){if(null===e||(t=e,-1===Function.toString.call(t).indexOf("[native code]")))return e;var t;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==o){if(o.has(e))return o.get(e);o.set(e,n)}function n(){return uf(e,arguments,cf(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),df(n,e)},pf(e)}var hf=/%[sdj%]/g;function ff(e){if(!e||!e.length)return null;var o={};return e.forEach(function(e){var t=e.field;o[t]=o[t]||[],o[t].push(e)}),o}function vf(e){for(var o=arguments.length,t=new Array(o>1?o-1:0),n=1;n<o;n++)t[n-1]=arguments[n];var r=0,a=t.length;return"function"==typeof e?e.apply(null,t):"string"==typeof e?e.replace(hf,function(e){if("%%"===e)return"%";if(r>=a)return e;switch(e){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(o){return"[Circular]"}default:return e}}):e}function mf(e,o){return null==e||(!("array"!==o||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(o)||"string"!=typeof e||e))}function gf(e,o,t){var n=0,r=e.length;!function a(l){if(l&&l.length)t(l);else{var i=n;n+=1,i<r?o(e[i],a):t([])}}([])}var bf=function(e){var o,t;function n(o,t){var n=e.call(this,"Async Validation Error")||this;return n.errors=o,n.fields=t,n}return t=e,(o=n).prototype=Object.create(t.prototype),o.prototype.constructor=o,df(o,t),n}(pf(Error));function yf(e,o,t,n,r){if(o.first){var a=new Promise(function(o,a){gf(function(e){var o=[];return Object.keys(e).forEach(function(t){o.push.apply(o,e[t]||[])}),o}(e),t,function(e){return n(e),e.length?a(new bf(e,ff(e))):o(r)})});return a.catch(function(e){return e}),a}var l=!0===o.firstFields?Object.keys(e):o.firstFields||[],i=Object.keys(e),s=i.length,c=0,d=[],u=new Promise(function(o,a){var u=function(e){if(d.push.apply(d,e),++c===s)return n(d),d.length?a(new bf(d,ff(d))):o(r)};i.length||(n(d),o(r)),i.forEach(function(o){var n=e[o];-1!==l.indexOf(o)?gf(n,t,u):function(e,o,t){var n=[],r=0,a=e.length;function l(e){n.push.apply(n,e||[]),++r===a&&t(n)}e.forEach(function(e){o(e,l)})}(n,t,u)})});return u.catch(function(e){return e}),u}function xf(e,o){return function(t){var n,r;return n=e.fullFields?function(e,o){for(var t=e,n=0;n<o.length;n++){if(null==t)return t;t=t[o[n]]}return t}(o,e.fullFields):o[t.field||e.fullField],(r=t)&&void 0!==r.message?(t.field=t.field||e.fullField,t.fieldValue=n,t):{message:"function"==typeof t?t():t,fieldValue:n,field:t.field||e.fullField}}}function Cf(e,o){if(o)for(var t in o)if(o.hasOwnProperty(t)){var n=o[t];"object"==typeof n&&"object"==typeof e[t]?e[t]=sf({},e[t],n):e[t]=n}return e}var wf,Sf=function(e,o,t,n,r,a){!e.required||t.hasOwnProperty(e.field)&&!mf(o,a||e.type)||n.push(vf(r.messages.required,e.fullField))},kf=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,Pf=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,Tf={integer:function(e){return Tf.number(e)&&parseInt(e,10)===e},float:function(e){return Tf.number(e)&&!Tf.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(o){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"==typeof e&&!Tf.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&e.length<=320&&!!e.match(kf)},url:function(e){return"string"==typeof e&&e.length<=2048&&!!e.match(function(){if(wf)return wf;var e="[a-fA-F\\d:]",o=function(o){return o&&o.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},t="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",r=("\n(?:\n(?:"+n+":){7}(?:"+n+"|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:"+n+":){6}(?:"+t+"|:"+n+"|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:"+n+":){5}(?::"+t+"|(?::"+n+"){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:"+n+":){4}(?:(?::"+n+"){0,1}:"+t+"|(?::"+n+"){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:"+n+":){3}(?:(?::"+n+"){0,2}:"+t+"|(?::"+n+"){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:"+n+":){2}(?:(?::"+n+"){0,3}:"+t+"|(?::"+n+"){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:"+n+":){1}(?:(?::"+n+"){0,4}:"+t+"|(?::"+n+"){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::"+n+"){0,5}:"+t+"|(?::"+n+"){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),a=new RegExp("(?:^"+t+"$)|(?:^"+r+"$)"),l=new RegExp("^"+t+"$"),i=new RegExp("^"+r+"$"),s=function(e){return e&&e.exact?a:new RegExp("(?:"+o(e)+t+o(e)+")|(?:"+o(e)+r+o(e)+")","g")};s.v4=function(e){return e&&e.exact?l:new RegExp(""+o(e)+t+o(e),"g")},s.v6=function(e){return e&&e.exact?i:new RegExp(""+o(e)+r+o(e),"g")};var c=s.v4().source,d=s.v6().source;return wf=new RegExp("(?:^(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|"+c+"|"+d+'|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?$)',"i")}())},hex:function(e){return"string"==typeof e&&!!e.match(Pf)}},If="enum",zf={required:Sf,whitespace:function(e,o,t,n,r){(/^\s+$/.test(o)||""===o)&&n.push(vf(r.messages.whitespace,e.fullField))},type:function(e,o,t,n,r){if(e.required&&void 0===o)Sf(e,o,t,n,r);else{var a=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(a)>-1?Tf[a](o)||n.push(vf(r.messages.types[a],e.fullField,e.type)):a&&typeof o!==e.type&&n.push(vf(r.messages.types[a],e.fullField,e.type))}},range:function(e,o,t,n,r){var a="number"==typeof e.len,l="number"==typeof e.min,i="number"==typeof e.max,s=o,c=null,d="number"==typeof o,u="string"==typeof o,p=Array.isArray(o);if(d?c="number":u?c="string":p&&(c="array"),!c)return!1;p&&(s=o.length),u&&(s=o.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),a?s!==e.len&&n.push(vf(r.messages[c].len,e.fullField,e.len)):l&&!i&&s<e.min?n.push(vf(r.messages[c].min,e.fullField,e.min)):i&&!l&&s>e.max?n.push(vf(r.messages[c].max,e.fullField,e.max)):l&&i&&(s<e.min||s>e.max)&&n.push(vf(r.messages[c].range,e.fullField,e.min,e.max))},enum:function(e,o,t,n,r){e[If]=Array.isArray(e[If])?e[If]:[],-1===e[If].indexOf(o)&&n.push(vf(r.messages[If],e.fullField,e[If].join(", ")))},pattern:function(e,o,t,n,r){e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(o)||n.push(vf(r.messages.pattern.mismatch,e.fullField,o,e.pattern))):"string"==typeof e.pattern&&(new RegExp(e.pattern).test(o)||n.push(vf(r.messages.pattern.mismatch,e.fullField,o,e.pattern))))}},Mf=function(e,o,t,n,r){var a=e.type,l=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(mf(o,a)&&!e.required)return t();zf.required(e,o,n,l,r,a),mf(o,a)||zf.type(e,o,n,l,r)}t(l)},Rf={string:function(e,o,t,n,r){var a=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(mf(o,"string")&&!e.required)return t();zf.required(e,o,n,a,r,"string"),mf(o,"string")||(zf.type(e,o,n,a,r),zf.range(e,o,n,a,r),zf.pattern(e,o,n,a,r),!0===e.whitespace&&zf.whitespace(e,o,n,a,r))}t(a)},method:function(e,o,t,n,r){var a=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(mf(o)&&!e.required)return t();zf.required(e,o,n,a,r),void 0!==o&&zf.type(e,o,n,a,r)}t(a)},number:function(e,o,t,n,r){var a=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(""===o&&(o=void 0),mf(o)&&!e.required)return t();zf.required(e,o,n,a,r),void 0!==o&&(zf.type(e,o,n,a,r),zf.range(e,o,n,a,r))}t(a)},boolean:function(e,o,t,n,r){var a=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(mf(o)&&!e.required)return t();zf.required(e,o,n,a,r),void 0!==o&&zf.type(e,o,n,a,r)}t(a)},regexp:function(e,o,t,n,r){var a=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(mf(o)&&!e.required)return t();zf.required(e,o,n,a,r),mf(o)||zf.type(e,o,n,a,r)}t(a)},integer:function(e,o,t,n,r){var a=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(mf(o)&&!e.required)return t();zf.required(e,o,n,a,r),void 0!==o&&(zf.type(e,o,n,a,r),zf.range(e,o,n,a,r))}t(a)},float:function(e,o,t,n,r){var a=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(mf(o)&&!e.required)return t();zf.required(e,o,n,a,r),void 0!==o&&(zf.type(e,o,n,a,r),zf.range(e,o,n,a,r))}t(a)},array:function(e,o,t,n,r){var a=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(null==o&&!e.required)return t();zf.required(e,o,n,a,r,"array"),null!=o&&(zf.type(e,o,n,a,r),zf.range(e,o,n,a,r))}t(a)},object:function(e,o,t,n,r){var a=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(mf(o)&&!e.required)return t();zf.required(e,o,n,a,r),void 0!==o&&zf.type(e,o,n,a,r)}t(a)},enum:function(e,o,t,n,r){var a=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(mf(o)&&!e.required)return t();zf.required(e,o,n,a,r),void 0!==o&&zf.enum(e,o,n,a,r)}t(a)},pattern:function(e,o,t,n,r){var a=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(mf(o,"string")&&!e.required)return t();zf.required(e,o,n,a,r),mf(o,"string")||zf.pattern(e,o,n,a,r)}t(a)},date:function(e,o,t,n,r){var a=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(mf(o,"date")&&!e.required)return t();var l;if(zf.required(e,o,n,a,r),!mf(o,"date"))l=o instanceof Date?o:new Date(o),zf.type(e,l,n,a,r),l&&zf.range(e,l.getTime(),n,a,r)}t(a)},url:Mf,hex:Mf,email:Mf,required:function(e,o,t,n,r){var a=[],l=Array.isArray(o)?"array":typeof o;zf.required(e,o,n,a,r,l),t(a)},any:function(e,o,t,n,r){var a=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(mf(o)&&!e.required)return t();zf.required(e,o,n,a,r)}t(a)}};function Af(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Ff=Af(),$f=function(){function e(e){this.rules=null,this._messages=Ff,this.define(e)}var o=e.prototype;return o.define=function(e){var o=this;if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach(function(t){var n=e[t];o.rules[t]=Array.isArray(n)?n:[n]})},o.messages=function(e){return e&&(this._messages=Cf(Af(),e)),this._messages},o.validate=function(o,t,n){var r=this;void 0===t&&(t={}),void 0===n&&(n=function(){});var a=o,l=t,i=n;if("function"==typeof l&&(i=l,l={}),!this.rules||0===Object.keys(this.rules).length)return i&&i(null,a),Promise.resolve(a);if(l.messages){var s=this.messages();s===Ff&&(s=Af()),Cf(s,l.messages),l.messages=s}else l.messages=this.messages();var c={};(l.keys||Object.keys(this.rules)).forEach(function(e){var t=r.rules[e],n=a[e];t.forEach(function(t){var l=t;"function"==typeof l.transform&&(a===o&&(a=sf({},a)),n=a[e]=l.transform(n)),(l="function"==typeof l?{validator:l}:sf({},l)).validator=r.getValidationMethod(l),l.validator&&(l.field=e,l.fullField=l.fullField||e,l.type=r.getType(l),c[e]=c[e]||[],c[e].push({rule:l,value:n,source:a,field:e}))})});var d={};return yf(c,l,function(o,t){var n,r=o.rule,i=!("object"!==r.type&&"array"!==r.type||"object"!=typeof r.fields&&"object"!=typeof r.defaultField);function s(e,o){return sf({},o,{fullField:r.fullField+"."+e,fullFields:r.fullFields?[].concat(r.fullFields,[e]):[e]})}function c(n){void 0===n&&(n=[]);var c=Array.isArray(n)?n:[n];!l.suppressWarning&&c.length&&e.warning("async-validator:",c),c.length&&void 0!==r.message&&(c=[].concat(r.message));var u=c.map(xf(r,a));if(l.first&&u.length)return d[r.field]=1,t(u);if(i){if(r.required&&!o.value)return void 0!==r.message?u=[].concat(r.message).map(xf(r,a)):l.error&&(u=[l.error(r,vf(l.messages.required,r.field))]),t(u);var p={};r.defaultField&&Object.keys(o.value).map(function(e){p[e]=r.defaultField}),p=sf({},p,o.rule.fields);var h={};Object.keys(p).forEach(function(e){var o=p[e];h[e]=(Array.isArray(o)?o:[o]).map(s.bind(null,e))});var f=new e(h);f.messages(l.messages),o.rule.options&&(o.rule.options.messages=l.messages,o.rule.options.error=l.error),f.validate(o.value,o.rule.options||l,function(e){var o=[];u&&u.length&&o.push.apply(o,u),e&&e.length&&o.push.apply(o,e),t(o.length?o:null)})}else t(u)}if(i=i&&(r.required||!r.required&&o.value),r.field=o.field,r.asyncValidator)n=r.asyncValidator(r,o.value,c,o.source,l);else if(r.validator){try{n=r.validator(r,o.value,c,o.source,l)}catch(u){console.error,l.suppressValidatorError||setTimeout(function(){throw u},0),c(u.message)}!0===n?c():!1===n?c("function"==typeof r.message?r.message(r.fullField||r.field):r.message||(r.fullField||r.field)+" fails"):n instanceof Array?c(n):n instanceof Error&&c(n.message)}n&&n.then&&n.then(function(){return c()},function(e){return c(e)})},function(e){!function(e){var o=[],t={};function n(e){var t;Array.isArray(e)?o=(t=o).concat.apply(t,e):o.push(e)}for(var r=0;r<e.length;r++)n(e[r]);o.length?(t=ff(o),i(o,t)):i(null,a)}(e)},a)},o.getType=function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!=typeof e.validator&&e.type&&!Rf.hasOwnProperty(e.type))throw new Error(vf("Unknown rule type %s",e.type));return e.type||"string"},o.getValidationMethod=function(e){if("function"==typeof e.validator)return e.validator;var o=Object.keys(e),t=o.indexOf("message");return-1!==t&&o.splice(t,1),1===o.length&&"required"===o[0]?Rf.required:Rf[this.getType(e)]||void 0},e}();$f.register=function(e,o){if("function"!=typeof o)throw new Error("Cannot register a validator by type, validator is not a function");Rf[e]=o},$f.warning=function(){},$f.messages=Ff,$f.validators=Rf;var{cubicBezierEaseInOut:Of}=p;var Bf=ge("form-item","\n display: grid;\n line-height: var(--n-line-height);\n",[ge("form-item-label","\n grid-area: label;\n align-items: center;\n line-height: 1.25;\n text-align: var(--n-label-text-align);\n font-size: var(--n-label-font-size);\n min-height: var(--n-label-height);\n padding: var(--n-label-padding);\n color: var(--n-label-text-color);\n transition: color .3s var(--n-bezier);\n box-sizing: border-box;\n font-weight: var(--n-label-font-weight);\n ",[eo("asterisk","\n white-space: nowrap;\n user-select: none;\n -webkit-user-select: none;\n color: var(--n-asterisk-color);\n transition: color .3s var(--n-bezier);\n "),eo("asterisk-placeholder","\n grid-area: mark;\n user-select: none;\n -webkit-user-select: none;\n visibility: hidden; \n ")]),ge("form-item-blank","\n grid-area: blank;\n min-height: var(--n-blank-height);\n "),so("auto-label-width",[ge("form-item-label","white-space: nowrap;")]),so("left-labelled",'\n grid-template-areas:\n "label blank"\n "label feedback";\n grid-template-columns: auto minmax(0, 1fr);\n grid-template-rows: auto 1fr;\n align-items: flex-start;\n ',[ge("form-item-label","\n display: grid;\n grid-template-columns: 1fr auto;\n min-height: var(--n-blank-height);\n height: auto;\n box-sizing: border-box;\n flex-shrink: 0;\n flex-grow: 0;\n ",[so("reverse-columns-space","\n grid-template-columns: auto 1fr;\n "),so("left-mark",'\n grid-template-areas:\n "mark text"\n ". text";\n '),so("right-mark",'\n grid-template-areas: \n "text mark"\n "text .";\n '),so("right-hanging-mark",'\n grid-template-areas: \n "text mark"\n "text .";\n '),eo("text","\n grid-area: text; \n "),eo("asterisk","\n grid-area: mark; \n align-self: end;\n ")])]),so("top-labelled",'\n grid-template-areas:\n "label"\n "blank"\n "feedback";\n grid-template-rows: minmax(var(--n-label-height), auto) 1fr;\n grid-template-columns: minmax(0, 100%);\n ',[so("no-label",'\n grid-template-areas:\n "blank"\n "feedback";\n grid-template-rows: 1fr;\n '),ge("form-item-label","\n display: flex;\n align-items: flex-start;\n justify-content: var(--n-label-text-align);\n ")]),ge("form-item-blank","\n box-sizing: border-box;\n display: flex;\n align-items: center;\n position: relative;\n "),ge("form-item-feedback-wrapper","\n grid-area: feedback;\n box-sizing: border-box;\n min-height: var(--n-feedback-height);\n font-size: var(--n-feedback-font-size);\n line-height: 1.25;\n transform-origin: top left;\n ",[xe("&:not(:empty)","\n padding: var(--n-feedback-padding);\n "),ge("form-item-feedback",{transition:"color .3s var(--n-bezier)",color:"var(--n-feedback-text-color)"},[so("warning",{color:"var(--n-feedback-text-color-warning)"}),so("error",{color:"var(--n-feedback-text-color-error)"}),function({name:e="fade-down",fromOffset:o="-4px",enterDuration:t=".3s",leaveDuration:n=".3s",enterCubicBezier:r=Of,leaveCubicBezier:a=Of}={}){return[xe(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`,{opacity:0,transform:`translateY(${o})`}),xe(`&.${e}-transition-enter-to, &.${e}-transition-leave-from`,{opacity:1,transform:"translateY(0)"}),xe(`&.${e}-transition-leave-active`,{transition:`opacity ${n} ${a}, transform ${n} ${a}`}),xe(`&.${e}-transition-enter-active`,{transition:`opacity ${t} ${r}, transform ${t} ${r}`})]}({fromOffset:"-3px",enterDuration:".3s",leaveDuration:".2s"})])])]);var Ef=function(e,o,t,n){return new(t||(t=Promise))(function(r,a){function l(e){try{s(n.next(e))}catch(o){a(o)}}function i(e){try{s(n.throw(e))}catch(o){a(o)}}function s(e){var o;e.done?r(e.value):(o=e.value,o instanceof t?o:new t(function(e){e(o)})).then(l,i)}s((n=n.apply(e,o||[])).next())})},_f=Object.assign(Object.assign({},P.props),{label:String,labelWidth:[Number,String],labelStyle:[String,Object],labelAlign:String,labelPlacement:String,path:String,first:Boolean,rulePath:String,required:Boolean,showRequireMark:{type:Boolean,default:void 0},requireMarkPlacement:String,showFeedback:{type:Boolean,default:void 0},rule:[Object,Array],size:String,ignorePathChange:Boolean,validationStatus:String,feedback:String,feedbackClass:String,feedbackStyle:[String,Object],showLabel:{type:Boolean,default:void 0},labelProps:Object,contentClass:String,contentStyle:[String,Object]});An(_f);function Df(e,o){return(...t)=>{try{const n=e(...t);return!o&&("boolean"==typeof n||n instanceof Error||Array.isArray(n))||(null==n?void 0:n.then)?n:(void 0===n||z("form-item/validate",`You return a ${typeof n} typed value in the validator method, which is not recommended. Please use ${o?"`Promise`":"`boolean`, `Error` or `Promise`"} typed value instead.`),!0)}catch(n){return void z("form-item/validate","An error is catched in the validation, so the validation won't be done. Your callback in `validate` method of `n-form` or `n-form-item` won't be called in this validation.")}}}var Lf=po({name:"FormItem",props:_f,setup(e){Mr(nf,"formItems",jo(e,"path"));const{mergedClsPrefixRef:o,inlineThemeDisabled:t}=be(e),n=ko(tf,null),r=function(e){const o=ko(tf,null);return{mergedSize:Do(()=>void 0!==e.size?e.size:void 0!==(null==o?void 0:o.props.size)?o.props.size:"medium")}}(e),a=function(e){const o=ko(tf,null),t=Do(()=>{const{labelPlacement:t}=e;return void 0!==t?t:(null==o?void 0:o.props.labelPlacement)?o.props.labelPlacement:"top"}),n=Do(()=>"left"===t.value&&("auto"===e.labelWidth||"auto"===(null==o?void 0:o.props.labelWidth))),r=Do(()=>{if("top"===t.value)return;const{labelWidth:r}=e;if(void 0!==r&&"auto"!==r)return Pe(r);if(n.value){const e=null==o?void 0:o.maxChildLabelWidthRef.value;return void 0!==e?Pe(e):void 0}return void 0!==(null==o?void 0:o.props.labelWidth)?Pe(o.props.labelWidth):void 0}),a=Do(()=>{const{labelAlign:t}=e;return t||((null==o?void 0:o.props.labelAlign)?o.props.labelAlign:void 0)}),l=Do(()=>{var o;return[null===(o=e.labelProps)||void 0===o?void 0:o.style,e.labelStyle,{width:r.value}]}),i=Do(()=>{const{showRequireMark:t}=e;return void 0!==t?t:null==o?void 0:o.props.showRequireMark}),s=Do(()=>{const{requireMarkPlacement:t}=e;return void 0!==t?t:(null==o?void 0:o.props.requireMarkPlacement)||"right"}),c=it(!1),d=it(!1);return{validationErrored:c,validationWarned:d,mergedLabelStyle:l,mergedLabelPlacement:t,mergedLabelAlign:a,mergedShowRequireMark:i,mergedRequireMarkPlacement:s,mergedValidationStatus:Do(()=>{const{validationStatus:o}=e;return void 0!==o?o:c.value?"error":d.value?"warning":void 0}),mergedShowFeedback:Do(()=>{const{showFeedback:t}=e;return void 0!==t?t:void 0===(null==o?void 0:o.props.showFeedback)||o.props.showFeedback}),mergedShowLabel:Do(()=>{const{showLabel:t}=e;return void 0!==t?t:void 0===(null==o?void 0:o.props.showLabel)||o.props.showLabel}),isAutoLabelWidth:n}}(e),{validationErrored:l,validationWarned:i}=a,{mergedRequired:s,mergedRules:c}=function(e){const o=ko(tf,null),t=Do(()=>{const{rulePath:o}=e;if(void 0!==o)return o;const{path:t}=e;return void 0!==t?t:void 0}),n=Do(()=>{const n=[],{rule:r}=e;if(void 0!==r&&(Array.isArray(r)?n.push(...r):n.push(r)),o){const{rules:e}=o.props,{value:r}=t;if(void 0!==e&&void 0!==r){const o=Fa(e,r);void 0!==o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}),r=Do(()=>n.value.some(e=>e.required));return{mergedRules:n,mergedRequired:Do(()=>r.value||e.required)}}(e),{mergedSize:d}=r,{mergedLabelPlacement:u,mergedLabelAlign:p,mergedRequireMarkPlacement:h}=a,f=it([]),v=it(Ue()),m=n?jo(n.props,"disabled"):it(!1),g=P("Form","-form-item",Bf,or,e,o);function b(){f.value=[],l.value=!1,i.value=!1,e.feedback&&(v.value=Ue())}$o(jo(e,"path"),()=>{e.ignorePathChange||b()});const y=(...o)=>Ef(this,[...o],void 0,function*(o=null,t=()=>!0,r={suppressWarning:!0}){const{path:a}=e;r?r.first||(r.first=e.first):r={};const{value:s}=c,d=n?Fa(n.props.model,a||""):void 0,u={},p={},h=(o?s.filter(e=>Array.isArray(e.trigger)?e.trigger.includes(o):e.trigger===o):s).filter(t).map((e,o)=>{const t=Object.assign({},e);if(t.validator&&(t.validator=Df(t.validator,!1)),t.asyncValidator&&(t.asyncValidator=Df(t.asyncValidator,!0)),t.renderMessage){const e=`__renderMessage__${o}`;p[e]=t.message,t.message=e,u[e]=t.renderMessage}return t}),v=h.filter(e=>"warning"!==e.level),m=h.filter(e=>"warning"===e.level),g={valid:!0,errors:void 0,warnings:void 0};if(!h.length)return g;const y=null!=a?a:"__n_no_path__",x=new $f({[y]:v}),C=new $f({[y]:m}),{validateMessages:w}=(null==n?void 0:n.props)||{};w&&(x.messages(w),C.messages(w));const S=e=>{f.value=e.map(e=>{const o=(null==e?void 0:e.message)||"";return{key:o,render:()=>o.startsWith("__renderMessage__")?u[o]():o}}),e.forEach(e=>{var o;(null===(o=e.message)||void 0===o?void 0:o.startsWith("__renderMessage__"))&&(e.message=p[e.message])})};if(v.length){const e=yield new Promise(e=>{x.validate({[y]:d},r,e)});(null==e?void 0:e.length)&&(g.valid=!1,g.errors=e,S(e))}if(m.length&&!g.errors){const e=yield new Promise(e=>{C.validate({[y]:d},r,e)});(null==e?void 0:e.length)&&(S(e),g.warnings=e)}return g.errors||g.warnings?(l.value=!!g.errors,i.value=!!g.warnings):b(),g});go(De,{path:jo(e,"path"),disabled:m,mergedSize:r.mergedSize,mergedValidationStatus:a.mergedValidationStatus,restoreValidation:b,handleContentBlur:function(){y("blur")},handleContentChange:function(){y("change")},handleContentFocus:function(){y("focus")},handleContentInput:function(){y("input")}});const x={validate:function(e,o){return Ef(this,void 0,void 0,function*(){let t,n,r,a;return"string"==typeof e?(t=e,n=o):null!==e&&"object"==typeof e&&(t=e.trigger,n=e.callback,r=e.shouldRuleBeApplied,a=e.options),yield new Promise((e,o)=>{y(t,r,a).then(({valid:t,errors:r,warnings:a})=>{t?(n&&n(void 0,{warnings:a}),e({warnings:a})):(n&&n(r,{warnings:a}),o(r))})})})},restoreValidation:b,internalValidate:y},C=it(null);Ro(()=>{if(!a.isAutoLabelWidth.value)return;const e=C.value;if(null!==e){const o=e.style.whiteSpace;e.style.whiteSpace="nowrap",e.style.width="",null==n||n.deriveMaxChildLabelWidth(Number(getComputedStyle(e).width.slice(0,-2))),e.style.whiteSpace=o}});const w=Do(()=>{var e;const{value:o}=d,{value:t}=u,n="top"===t?"vertical":"horizontal",{common:{cubicBezierEaseInOut:r},self:{labelTextColor:a,asteriskColor:l,lineHeight:i,feedbackTextColor:s,feedbackTextColorWarning:c,feedbackTextColorError:h,feedbackPadding:f,labelFontWeight:v,[ao("labelHeight",o)]:m,[ao("blankHeight",o)]:b,[ao("feedbackFontSize",o)]:y,[ao("feedbackHeight",o)]:x,[ao("labelPadding",n)]:C,[ao("labelTextAlign",n)]:w,[ao(ao("labelFontSize",t),o)]:S}}=g.value;let k=null!==(e=p.value)&&void 0!==e?e:w;return"top"===t&&(k="right"===k?"flex-end":"flex-start"),{"--n-bezier":r,"--n-line-height":i,"--n-blank-height":b,"--n-label-font-size":S,"--n-label-text-align":k,"--n-label-height":m,"--n-label-padding":C,"--n-label-font-weight":v,"--n-asterisk-color":l,"--n-label-text-color":a,"--n-feedback-padding":f,"--n-feedback-font-size":y,"--n-feedback-height":x,"--n-feedback-text-color":s,"--n-feedback-text-color-warning":c,"--n-feedback-text-color-error":h}}),S=t?Ce("form-item",Do(()=>{var e;return`${d.value[0]}${u.value[0]}${(null===(e=p.value)||void 0===e?void 0:e[0])||""}`}),w,e):void 0,k=Do(()=>"left"===u.value&&"left"===h.value&&"left"===p.value);return Object.assign(Object.assign(Object.assign(Object.assign({labelElementRef:C,mergedClsPrefix:o,mergedRequired:s,feedbackId:v,renderExplains:f,reverseColSpace:k},a),r),x),{cssVars:t?void 0:w,themeClass:null==S?void 0:S.themeClass,onRender:null==S?void 0:S.onRender})},render(){const{$slots:e,mergedClsPrefix:o,mergedShowLabel:t,mergedShowRequireMark:n,mergedRequireMarkPlacement:r,onRender:a}=this,l=void 0!==n?n:this.mergedRequired;null==a||a();return So("div",{class:[`${o}-form-item`,this.themeClass,`${o}-form-item--${this.mergedSize}-size`,`${o}-form-item--${this.mergedLabelPlacement}-labelled`,this.isAutoLabelWidth&&`${o}-form-item--auto-label-width`,!t&&`${o}-form-item--no-label`],style:this.cssVars},t&&(()=>{const e=this.$slots.label?this.$slots.label():this.label;if(!e)return null;const t=So("span",{class:`${o}-form-item-label__text`},e),n=l?So("span",{class:`${o}-form-item-label__asterisk`},"left"!==r?" *":"* "):"right-hanging"===r&&So("span",{class:`${o}-form-item-label__asterisk-placeholder`}," *"),{labelProps:a}=this;return So("label",Object.assign({},a,{class:[null==a?void 0:a.class,`${o}-form-item-label`,`${o}-form-item-label--${r}-mark`,this.reverseColSpace&&`${o}-form-item-label--reverse-columns-space`],style:this.mergedLabelStyle,ref:"labelElementRef"}),"left"===r?[n,t]:[t,n])})(),So("div",{class:[`${o}-form-item-blank`,this.contentClass,this.mergedValidationStatus&&`${o}-form-item-blank--${this.mergedValidationStatus}`],style:this.contentStyle},e),this.mergedShowFeedback?So("div",{key:this.feedbackId,style:this.feedbackStyle,class:[`${o}-form-item-feedback-wrapper`,this.feedbackClass]},So(Xo,{name:"fade-down-transition",mode:"out-in"},{default:()=>{const{mergedValidationStatus:t}=this;return s(e.feedback,e=>{var n;const{feedback:r}=this,a=e||r?So("div",{key:"__feedback__",class:`${o}-form-item-feedback__line`},e||r):this.renderExplains.length?null===(n=this.renderExplains)||void 0===n?void 0:n.map(({key:e,render:t})=>So("div",{key:e,class:`${o}-form-item-feedback__line`},t())):null;return a?So("div","warning"===t?{key:"controlled-warning",class:`${o}-form-item-feedback ${o}-form-item-feedback--warning`}:"error"===t?{key:"controlled-error",class:`${o}-form-item-feedback ${o}-form-item-feedback--error`}:"success"===t?{key:"controlled-success",class:`${o}-form-item-feedback ${o}-form-item-feedback--success`}:{key:"controlled-default",class:`${o}-form-item-feedback`},a):null})}})):null)}});function Hf(e){const{borderRadius:o,fontSizeMini:t,fontSizeTiny:n,fontSizeSmall:r,fontWeight:a,textColor2:l,cardColor:i,buttonColor2Hover:s}=e;return{activeColors:["#9be9a8","#40c463","#30a14e","#216e39"],borderRadius:o,borderColor:i,textColor:l,mininumColor:s,fontWeight:a,loadingColorStart:"rgba(0, 0, 0, 0.06)",loadingColorEnd:"rgba(0, 0, 0, 0.12)",rectSizeSmall:"10px",rectSizeMedium:"11px",rectSizeLarge:"12px",borderRadiusSmall:"2px",borderRadiusMedium:"2px",borderRadiusLarge:"2px",xGapSmall:"2px",xGapMedium:"3px",xGapLarge:"3px",yGapSmall:"2px",yGapMedium:"3px",yGapLarge:"3px",fontSizeSmall:n,fontSizeMedium:t,fontSizeLarge:r}}var jf=S({name:"Heatmap",common:l,self:Hf}),Uf={name:"Heatmap",common:_i,self(e){const o=Hf(e);return Object.assign(Object.assign({},o),{activeColors:["#0d4429","#006d32","#26a641","#39d353"],mininumColor:"rgba(255, 255, 255, 0.1)",loadingColorStart:"rgba(255, 255, 255, 0.12)",loadingColorEnd:"rgba(255, 255, 255, 0.18)"})}};function Wf(e){const{primaryColor:o,baseColor:t}=e;return{color:o,iconColor:t}}var Nf={name:"IconWrapper",common:l,self:Wf},Kf={name:"IconWrapper",common:_i,self:Wf},Vf={name:"Image",common:_i,peers:{Tooltip:wd},self:e=>{const{textColor2:o}=e;return{toolbarIconColor:o,toolbarColor:"rgba(0, 0, 0, .35)",toolbarBoxShadow:"none",toolbarBorderRadius:"24px"}}};var qf=S({name:"Image",common:l,peers:{Tooltip:Sd},self:function(){return{toolbarIconColor:"rgba(255, 255, 255, .9)",toolbarColor:"rgba(0, 0, 0, .35)",toolbarBoxShadow:"none",toolbarBorderRadius:"24px"}}}),Gf=xe([ge("input-number-suffix","\n display: inline-block;\n margin-right: 10px;\n "),ge("input-number-prefix","\n display: inline-block;\n margin-left: 10px;\n ")]);function Yf(e){return null==e||"string"==typeof e&&""===e.trim()?null:Number(e)}function Jf(e){return null==e||!Number.isNaN(e)}function Xf(e,o){return"number"!=typeof e?"":void 0===o?String(e):e.toFixed(o)}function Zf(e){if(null===e)return null;if("number"==typeof e)return e;{const o=Number(e);return Number.isNaN(o)?null:o}}var Qf=po({name:"InputNumber",props:Object.assign(Object.assign({},P.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:"right"},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]}),slots:Object,setup(e){const{mergedBorderedRef:t,mergedClsPrefixRef:n,mergedRtlRef:r}=be(e),a=P("InputNumber","-input-number",Gf,Rp,e,n),{localeRef:l}=C("InputNumber"),i=Re(e),{mergedSizeRef:s,mergedDisabledRef:c,mergedStatusRef:d}=i,u=it(null),p=it(null),h=it(null),f=it(e.defaultValue),v=jo(e,"value"),m=F(v,f),b=it(""),y=e=>{const o=String(e).split(".")[1];return o?o.length:0},x=o(()=>{const{placeholder:o}=e;return void 0!==o?o:l.value.placeholder}),w=o(()=>{const o=Zf(e.step);return null!==o?0===o?1:Math.abs(o):1}),S=o(()=>{const o=Zf(e.min);return null!==o?o:null}),k=o(()=>{const o=Zf(e.max);return null!==o?o:null}),T=()=>{const{value:o}=m;if(Jf(o)){const{format:t,precision:n}=e;t?b.value=t(o):null===o||void 0===n||y(o)>n?b.value=Xf(o,void 0):b.value=Xf(o,n)}else b.value=String(o)};T();const I=o=>{const{value:t}=m;if(o===t)return void T();const{"onUpdate:value":n,onUpdateValue:r,onChange:a}=e,{nTriggerFormInput:l,nTriggerFormChange:s}=i;a&&H(a,o),r&&H(r,o),n&&H(n,o),f.value=o,l(),s()},z=({offset:o,doUpdateIfValid:t,fixPrecision:n,isInputing:r})=>{const{value:a}=b;if(r&&((l=a).includes(".")&&(/^(-)?\d+.*(\.|0)$/.test(l)||/^-?\d*$/.test(l))||"-"===l||"-0"===l))return!1;var l;const i=(e.parse||Yf)(a);if(null===i)return t&&I(null),null;if(Jf(i)){const a=y(i),{precision:l}=e;if(void 0!==l&&l<a&&!n)return!1;let s=Number.parseFloat((i+o).toFixed(null!=l?l:(o=>{const t=[e.min,e.max,e.step,o].map(e=>void 0===e?0:y(e));return Math.max(...t)})(i)));if(Jf(s)){const{value:o}=k,{value:n}=S;if(null!==o&&s>o){if(!t||r)return!1;s=o}if(null!==n&&s<n){if(!t||r)return!1;s=n}return!(e.validator&&!e.validator(s))&&(t&&I(s),s)}}return!1},M=o(()=>!1===z({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})),R=o(()=>{const{value:o}=m;if(e.validator&&null===o)return!1;const{value:t}=w;return!1!==z({offset:-t,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})}),A=o(()=>{const{value:o}=m;if(e.validator&&null===o)return!1;const{value:t}=w;return!1!==z({offset:+t,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})});function $(){const{value:o}=A;if(!o)return void N();const{value:t}=m;if(null===t)e.validator||I(_());else{const{value:e}=w;z({offset:e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function O(){const{value:o}=R;if(!o)return void U();const{value:t}=m;if(null===t)e.validator||I(_());else{const{value:e}=w;z({offset:-e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}const B=function(o){const{onFocus:t}=e,{nTriggerFormFocus:n}=i;t&&H(t,o),n()},E=function(o){var t,n;if(o.target===(null===(t=u.value)||void 0===t?void 0:t.wrapperElRef))return;const r=z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(!1!==r){const e=null===(n=u.value)||void 0===n?void 0:n.inputElRef;e&&(e.value=String(r||"")),m.value===r&&T()}else T();const{onBlur:a}=e,{nTriggerFormBlur:l}=i;a&&H(a,o),l(),yo(()=>{T()})};function _(){if(e.validator)return null;const{value:o}=S,{value:t}=k;return null!==o?Math.max(0,o):null!==t?Math.min(0,t):0}let D=null,L=null,j=null;function U(){j&&(window.clearTimeout(j),j=null),D&&(window.clearInterval(D),D=null)}let W=null;function N(){W&&(window.clearTimeout(W),W=null),L&&(window.clearInterval(L),L=null)}$o(m,()=>{T()});const K={focus:()=>{var e;return null===(e=u.value)||void 0===e?void 0:e.focus()},blur:()=>{var e;return null===(e=u.value)||void 0===e?void 0:e.blur()},select:()=>{var e;return null===(e=u.value)||void 0===e?void 0:e.select()}},V=g("InputNumber",r,n);return Object.assign(Object.assign({},K),{rtlEnabled:V,inputInstRef:u,minusButtonInstRef:p,addButtonInstRef:h,mergedClsPrefix:n,mergedBordered:t,uncontrolledValue:f,mergedValue:m,mergedPlaceholder:x,displayedValueInvalid:M,mergedSize:s,mergedDisabled:c,displayedValue:b,addable:A,minusable:R,mergedStatus:d,handleFocus:B,handleBlur:E,handleClear:function(o){!function(o){const{onClear:t}=e;t&&H(t,o)}(o),I(null)},handleMouseDown:function(e){var o,t,n;(null===(o=h.value)||void 0===o?void 0:o.$el.contains(e.target))&&e.preventDefault(),(null===(t=p.value)||void 0===t?void 0:t.$el.contains(e.target))&&e.preventDefault(),null===(n=u.value)||void 0===n||n.activate()},handleAddClick:()=>{L||$()},handleMinusClick:()=>{D||O()},handleAddMousedown:function(){N(),W=window.setTimeout(()=>{L=window.setInterval(()=>{$()},100)},800),Fe("mouseup",document,N,{once:!0})},handleMinusMousedown:function(){U(),j=window.setTimeout(()=>{D=window.setInterval(()=>{O()},100)},800),Fe("mouseup",document,U,{once:!0})},handleKeyDown:function(o){var t,n;if("Enter"===o.key){if(o.target===(null===(t=u.value)||void 0===t?void 0:t.wrapperElRef))return;!1!==z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})&&(null===(n=u.value)||void 0===n||n.deactivate())}else if("ArrowUp"===o.key){if(!A.value)return;if(!1===e.keyboard.ArrowUp)return;o.preventDefault(),!1!==z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})&&$()}else if("ArrowDown"===o.key){if(!R.value)return;if(!1===e.keyboard.ArrowDown)return;o.preventDefault(),!1!==z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})&&O()}},handleUpdateDisplayedValue:function(o){b.value=o,!e.updateValueOnInput||e.format||e.parse||void 0!==e.precision||z({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})},mergedTheme:a,inputThemeOverrides:{paddingSmall:"0 8px 0 10px",paddingMedium:"0 8px 0 12px",paddingLarge:"0 8px 0 14px"},buttonThemeOverrides:Do(()=>{const{self:{iconColorDisabled:e}}=a.value,[o,t,n,r]=Ke(e);return{textColorTextDisabled:`rgb(${o}, ${t}, ${n})`,opacityDisabled:`${r}`}})})},render(){const{mergedClsPrefix:e,$slots:o}=this,t=()=>So(se,{text:!0,disabled:!this.minusable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleMinusClick,onMousedown:this.handleMinusMousedown,ref:"minusButtonInstRef"},{icon:()=>lo(o["minus-icon"],()=>[So(ke,{clsPrefix:e},{default:()=>So(Fl,null)})])}),n=()=>So(se,{text:!0,disabled:!this.addable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleAddClick,onMousedown:this.handleAddMousedown,ref:"addButtonInstRef"},{icon:()=>lo(o["add-icon"],()=>[So(ke,{clsPrefix:e},{default:()=>So(kl,null)})])});return So("div",{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},So(ic,{ref:"inputInstRef",autofocus:this.autofocus,status:this.mergedStatus,bordered:this.mergedBordered,loading:this.loading,value:this.displayedValue,onUpdateValue:this.handleUpdateDisplayedValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,builtinThemeOverrides:this.inputThemeOverrides,size:this.mergedSize,placeholder:this.mergedPlaceholder,disabled:this.mergedDisabled,readonly:this.readonly,round:this.round,textDecoration:this.displayedValueInvalid?"line-through":void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onClear:this.handleClear,clearable:this.clearable,inputProps:this.inputProps,internalLoadingBeforeSuffix:!0},{prefix:()=>{var n;return this.showButton&&"both"===this.buttonPlacement?[t(),s(o.prefix,o=>o?So("span",{class:`${e}-input-number-prefix`},o):null)]:null===(n=o.prefix)||void 0===n?void 0:n.call(o)},suffix:()=>{var r;return this.showButton?[s(o.suffix,o=>o?So("span",{class:`${e}-input-number-suffix`},o):null),"right"===this.buttonPlacement?t():null,n()]:null===(r=o.suffix)||void 0===r?void 0:r.call(o)}}))}}),ev={extraFontSize:"12px",width:"440px"},ov={name:"Transfer",common:_i,peers:{Checkbox:Uc,Scrollbar:Di,Input:ec,Empty:ss,Button:$c},self(e){const{iconColorDisabled:o,iconColor:t,fontWeight:n,fontSizeLarge:r,fontSizeMedium:a,fontSizeSmall:l,heightLarge:i,heightMedium:s,heightSmall:c,borderRadius:d,inputColor:u,tableHeaderColor:p,textColor1:h,textColorDisabled:f,textColor2:v,hoverColor:m}=e;return Object.assign(Object.assign({},ev),{itemHeightSmall:c,itemHeightMedium:s,itemHeightLarge:i,fontSizeSmall:l,fontSizeMedium:a,fontSizeLarge:r,borderRadius:d,borderColor:"#0000",listColor:u,headerColor:p,titleTextColor:h,titleTextColorDisabled:f,extraTextColor:v,filterDividerColor:"#0000",itemTextColor:v,itemTextColorDisabled:f,itemColorPending:m,titleFontWeight:n,iconColor:t,iconColorDisabled:o})}};var tv=S({name:"Transfer",common:l,peers:{Checkbox:Rn,Scrollbar:ro,Input:bn,Empty:Q,Button:Ie},self:function(e){const{fontWeight:o,iconColorDisabled:t,iconColor:n,fontSizeLarge:r,fontSizeMedium:a,fontSizeSmall:l,heightLarge:i,heightMedium:s,heightSmall:c,borderRadius:d,cardColor:u,tableHeaderColor:p,textColor1:h,textColorDisabled:f,textColor2:v,borderColor:m,hoverColor:g}=e;return Object.assign(Object.assign({},ev),{itemHeightSmall:c,itemHeightMedium:s,itemHeightLarge:i,fontSizeSmall:l,fontSizeMedium:a,fontSizeLarge:r,borderRadius:d,borderColor:m,listColor:u,headerColor:Be(u,p),titleTextColor:h,titleTextColorDisabled:f,extraTextColor:v,filterDividerColor:m,itemTextColor:v,itemTextColorDisabled:f,itemColorPending:g,titleFontWeight:o,iconColor:n,iconColorDisabled:t})}});function nv(){return{}}var rv={name:"Marquee",common:l,self:nv},av={name:"Marquee",common:_i,self:nv},lv={name:"QrCode",common:_i,self:e=>({borderRadius:e.borderRadius})};var iv={name:"QrCode",common:l,self:function(e){return{borderRadius:e.borderRadius}}},sv=po({name:"Scrollbar",props:Object.assign(Object.assign({},P.props),{trigger:String,xScrollable:Boolean,onScroll:Function,contentClass:String,contentStyle:[Object,String],size:Number,yPlacement:{type:String,default:"right"},xPlacement:{type:String,default:"bottom"}}),setup(){const e=it(null);return Object.assign(Object.assign({},{scrollTo:(...o)=>{var t;null===(t=e.value)||void 0===t||t.scrollTo(o[0],o[1])},scrollBy:(...o)=>{var t;null===(t=e.value)||void 0===t||t.scrollBy(o[0],o[1])}}),{scrollbarInstRef:e})},render(){return So(io,Object.assign({ref:"scrollbarInstRef"},this.$props),this.$slots)}}),cv={name:"Skeleton",common:_i,self(e){const{heightSmall:o,heightMedium:t,heightLarge:n,borderRadius:r}=e;return{color:"rgba(255, 255, 255, 0.12)",colorEnd:"rgba(255, 255, 255, 0.18)",borderRadius:r,heightSmall:o,heightMedium:t,heightLarge:n}}};var dv={name:"Skeleton",common:l,self:function(e){const{heightSmall:o,heightMedium:t,heightLarge:n,borderRadius:r}=e;return{color:"#eee",colorEnd:"#ddd",borderRadius:r,heightSmall:o,heightMedium:t,heightLarge:n}}},uv=xe([xe("@keyframes spin-rotate","\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n "),ge("spin-container","\n position: relative;\n ",[ge("spin-body","\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n ",[to()])]),ge("spin-body","\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n "),ge("spin","\n display: inline-flex;\n height: var(--n-size);\n width: var(--n-size);\n font-size: var(--n-size);\n color: var(--n-color);\n ",[so("rotate","\n animation: spin-rotate 2s linear infinite;\n ")]),ge("spin-description","\n display: inline-block;\n font-size: var(--n-font-size);\n color: var(--n-text-color);\n transition: color .3s var(--n-bezier);\n margin-top: 8px;\n "),ge("spin-content","\n opacity: 1;\n transition: opacity .3s var(--n-bezier);\n pointer-events: all;\n ",[so("spinning","\n user-select: none;\n -webkit-user-select: none;\n pointer-events: none;\n opacity: var(--n-opacity-spinning);\n ")])]),pv={small:20,medium:18,large:16},hv=po({name:"Spin",props:Object.assign(Object.assign({},P.props),{contentClass:String,contentStyle:[Object,String],description:String,stroke:String,size:{type:[String,Number],default:"medium"},show:{type:Boolean,default:!0},strokeWidth:Number,rotate:{type:Boolean,default:!0},spinning:{type:Boolean,validator:()=>!0,default:void 0},delay:Number}),slots:Object,setup(e){const{mergedClsPrefixRef:o,inlineThemeDisabled:t}=be(e),n=P("Spin","-spin",uv,je,e,o),r=Do(()=>{const{size:o}=e,{common:{cubicBezierEaseInOut:t},self:r}=n.value,{opacitySpinning:a,color:l,textColor:i}=r;return{"--n-bezier":t,"--n-opacity-spinning":a,"--n-size":"number"==typeof o?ve(o):r[ao("size",o)],"--n-color":l,"--n-text-color":i}}),a=t?Ce("spin",Do(()=>{const{size:o}=e;return"number"==typeof o?String(o):o[0]}),r,e):void 0,l=G(e,["spinning","show"]),i=it(!1);return To(o=>{let t;if(l.value){const{delay:n}=e;if(n)return t=window.setTimeout(()=>{i.value=!0},n),void o(()=>{clearTimeout(t)})}i.value=l.value}),{mergedClsPrefix:o,active:i,mergedStrokeWidth:Do(()=>{const{strokeWidth:o}=e;if(void 0!==o)return o;const{size:t}=e;return pv["number"==typeof t?"medium":t]}),cssVars:t?void 0:r,themeClass:null==a?void 0:a.themeClass,onRender:null==a?void 0:a.onRender}},render(){var e,o;const{$slots:t,mergedClsPrefix:n,description:r}=this,a=t.icon&&this.rotate,l=(r||t.description)&&So("div",{class:`${n}-spin-description`},r||(null===(e=t.description)||void 0===e?void 0:e.call(t))),i=t.icon?So("div",{class:[`${n}-spin-body`,this.themeClass]},So("div",{class:[`${n}-spin`,a&&`${n}-spin--rotate`],style:t.default?"":this.cssVars},t.icon()),l):So("div",{class:[`${n}-spin-body`,this.themeClass]},So(D,{clsPrefix:n,style:t.default?"":this.cssVars,stroke:this.stroke,"stroke-width":this.mergedStrokeWidth,class:`${n}-spin`}),l);return null===(o=this.onRender)||void 0===o||o.call(this),t.default?So("div",{class:[`${n}-spin-container`,this.themeClass],style:this.cssVars},So("div",{class:[`${n}-spin-content`,this.active&&`${n}-spin-content--spinning`,this.contentClass],style:this.contentStyle},t),So(Xo,{name:"fade-in-transition"},{default:()=>this.active?i:null})):i}}),fv={name:"Split",common:_i};var vv,mv={name:"Split",common:l,self:function(e){const{primaryColorHover:o,borderColor:t}=e;return{resizableTriggerColorHover:o,resizableTriggerColor:t}}},gv=ge("switch","\n height: var(--n-height);\n min-width: var(--n-width);\n vertical-align: middle;\n user-select: none;\n -webkit-user-select: none;\n display: inline-flex;\n outline: none;\n justify-content: center;\n align-items: center;\n",[eo("children-placeholder","\n height: var(--n-rail-height);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: none;\n visibility: hidden;\n "),eo("rail-placeholder","\n display: flex;\n flex-wrap: none;\n "),eo("button-placeholder","\n width: calc(1.75 * var(--n-rail-height));\n height: var(--n-rail-height);\n "),ge("base-loading","\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n font-size: calc(var(--n-button-width) - 4px);\n color: var(--n-loading-color);\n transition: color .3s var(--n-bezier);\n ",[I({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})]),eo("checked, unchecked","\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n box-sizing: border-box;\n position: absolute;\n white-space: nowrap;\n top: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n line-height: 1;\n "),eo("checked","\n right: 0;\n padding-right: calc(1.25 * var(--n-rail-height) - var(--n-offset));\n "),eo("unchecked","\n left: 0;\n justify-content: flex-end;\n padding-left: calc(1.25 * var(--n-rail-height) - var(--n-offset));\n "),xe("&:focus",[eo("rail","\n box-shadow: var(--n-box-shadow-focus);\n ")]),so("round",[eo("rail","border-radius: calc(var(--n-rail-height) / 2);",[eo("button","border-radius: calc(var(--n-button-height) / 2);")])]),le("disabled",[le("icon",[so("rubber-band",[so("pressed",[eo("rail",[eo("button","max-width: var(--n-button-width-pressed);")])]),eo("rail",[xe("&:active",[eo("button","max-width: var(--n-button-width-pressed);")])]),so("active",[so("pressed",[eo("rail",[eo("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])]),eo("rail",[xe("&:active",[eo("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])])])])])]),so("active",[eo("rail",[eo("button","left: calc(100% - var(--n-button-width) - var(--n-offset))")])]),eo("rail","\n overflow: hidden;\n height: var(--n-rail-height);\n min-width: var(--n-rail-width);\n border-radius: var(--n-rail-border-radius);\n cursor: pointer;\n position: relative;\n transition:\n opacity .3s var(--n-bezier),\n background .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier);\n background-color: var(--n-rail-color);\n ",[eo("button-icon","\n color: var(--n-icon-color);\n transition: color .3s var(--n-bezier);\n font-size: calc(var(--n-button-height) - 4px);\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n line-height: 1;\n ",[I()]),eo("button",'\n align-items: center; \n top: var(--n-offset);\n left: var(--n-offset);\n height: var(--n-button-height);\n width: var(--n-button-width-pressed);\n max-width: var(--n-button-width);\n border-radius: var(--n-button-border-radius);\n background-color: var(--n-button-color);\n box-shadow: var(--n-button-box-shadow);\n box-sizing: border-box;\n cursor: inherit;\n content: "";\n position: absolute;\n transition:\n background-color .3s var(--n-bezier),\n left .3s var(--n-bezier),\n opacity .3s var(--n-bezier),\n max-width .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier);\n ')]),so("active",[eo("rail","background-color: var(--n-rail-color-active);")]),so("loading",[eo("rail","\n cursor: wait;\n ")]),so("disabled",[eo("rail","\n cursor: not-allowed;\n opacity: .5;\n ")])]),bv=po({name:"Switch",props:Object.assign(Object.assign({},P.props),{size:{type:String,default:"medium"},value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},onChange:[Function,Array]}),slots:Object,setup(e){void 0===vv&&(vv="undefined"==typeof CSS||void 0!==CSS.supports&&CSS.supports("width","max(1px)"));const{mergedClsPrefixRef:o,inlineThemeDisabled:t}=be(e),n=P("Switch","-switch",gv,kh,e,o),r=Re(e),{mergedSizeRef:a,mergedDisabledRef:l}=r,i=it(e.defaultValue),s=jo(e,"value"),c=F(s,i),d=Do(()=>c.value===e.checkedValue),u=it(!1),p=it(!1),h=Do(()=>{const{railStyle:o}=e;if(o)return o({focused:p.value,checked:d.value})});function f(o){const{"onUpdate:value":t,onChange:n,onUpdateValue:a}=e,{nTriggerFormInput:l,nTriggerFormChange:s}=r;t&&H(t,o),a&&H(a,o),n&&H(n,o),i.value=o,l(),s()}const v=Do(()=>{const{value:e}=a,{self:{opacityDisabled:o,railColor:t,railColorActive:r,buttonBoxShadow:l,buttonColor:i,boxShadowFocus:s,loadingColor:c,textColor:d,iconColor:u,[ao("buttonHeight",e)]:p,[ao("buttonWidth",e)]:h,[ao("buttonWidthPressed",e)]:f,[ao("railHeight",e)]:v,[ao("railWidth",e)]:m,[ao("railBorderRadius",e)]:g,[ao("buttonBorderRadius",e)]:b},common:{cubicBezierEaseInOut:y}}=n.value;let x,C,w;return vv?(x=`calc((${v} - ${p}) / 2)`,C=`max(${v}, ${p})`,w=`max(${m}, calc(${m} + ${p} - ${v}))`):(x=ve((ze(v)-ze(p))/2),C=ve(Math.max(ze(v),ze(p))),w=ze(v)>ze(p)?m:ve(ze(m)+ze(p)-ze(v))),{"--n-bezier":y,"--n-button-border-radius":b,"--n-button-box-shadow":l,"--n-button-color":i,"--n-button-width":h,"--n-button-width-pressed":f,"--n-button-height":p,"--n-height":C,"--n-offset":x,"--n-opacity-disabled":o,"--n-rail-border-radius":g,"--n-rail-color":t,"--n-rail-color-active":r,"--n-rail-height":v,"--n-rail-width":m,"--n-width":w,"--n-box-shadow-focus":s,"--n-loading-color":c,"--n-text-color":d,"--n-icon-color":u}}),m=t?Ce("switch",Do(()=>a.value[0]),v,e):void 0;return{handleClick:function(){e.loading||l.value||(c.value!==e.checkedValue?f(e.checkedValue):f(e.uncheckedValue))},handleBlur:function(){p.value=!1,function(){const{nTriggerFormBlur:e}=r;e()}(),u.value=!1},handleFocus:function(){p.value=!0,function(){const{nTriggerFormFocus:e}=r;e()}()},handleKeyup:function(o){e.loading||l.value||" "===o.key&&(c.value!==e.checkedValue?f(e.checkedValue):f(e.uncheckedValue),u.value=!1)},handleKeydown:function(o){e.loading||l.value||" "===o.key&&(o.preventDefault(),u.value=!0)},mergedRailStyle:h,pressed:u,mergedClsPrefix:o,mergedValue:c,checked:d,mergedDisabled:l,cssVars:t?void 0:v,themeClass:null==m?void 0:m.themeClass,onRender:null==m?void 0:m.onRender}},render(){const{mergedClsPrefix:e,mergedDisabled:o,checked:n,mergedRailStyle:r,onRender:a,$slots:l}=this;null==a||a();const{checked:i,unchecked:c,icon:d,"checked-icon":u,"unchecked-icon":p}=l,h=!(ie(d)&&ie(u)&&ie(p));return So("div",{role:"switch","aria-checked":n,class:[`${e}-switch`,this.themeClass,h&&`${e}-switch--icon`,n&&`${e}-switch--active`,o&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},So("div",{class:`${e}-switch__rail`,"aria-hidden":"true",style:r},s(i,o=>s(c,t=>o||t?So("div",{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},So("div",{class:`${e}-switch__rail-placeholder`},So("div",{class:`${e}-switch__button-placeholder`}),o),So("div",{class:`${e}-switch__rail-placeholder`},So("div",{class:`${e}-switch__button-placeholder`}),t)):null)),So("div",{class:`${e}-switch__button`},s(d,o=>s(u,n=>s(p,r=>So(t,null,{default:()=>this.loading?So(D,{key:"loading",clsPrefix:e,strokeWidth:20}):this.checked&&(n||o)?So("div",{class:`${e}-switch__button-icon`,key:n?"checked-icon":"icon"},n||o):this.checked||!r&&!o?null:So("div",{class:`${e}-switch__button-icon`,key:r?"unchecked-icon":"icon"},r||o)})))),s(i,o=>o&&So("div",{key:"checked",class:`${e}-switch__checked`},o)),s(c,o=>o&&So("div",{key:"unchecked",class:`${e}-switch__unchecked`},o)))))}}),yv=ge("text","\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n",[so("strong","\n font-weight: var(--n-font-weight-strong);\n "),so("italic",{fontStyle:"italic"}),so("underline",{textDecoration:"underline"}),so("code","\n line-height: 1.4;\n display: inline-block;\n font-family: var(--n-font-famliy-mono);\n transition: \n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n box-sizing: border-box;\n padding: .05em .35em 0 .35em;\n border-radius: var(--n-code-border-radius);\n font-size: .9em;\n color: var(--n-code-text-color);\n background-color: var(--n-code-color);\n border: var(--n-code-border);\n ")]),xv=po({name:"Text",props:Object.assign(Object.assign({},P.props),{code:Boolean,type:{type:String,default:"default"},delete:Boolean,strong:Boolean,italic:Boolean,underline:Boolean,depth:[String,Number],tag:String,as:{type:String,validator:()=>!0,default:void 0}}),setup(e){const{mergedClsPrefixRef:o,inlineThemeDisabled:t}=be(e),n=P("Typography","-text",yv,Zn,e,o),r=Do(()=>{const{depth:o,type:t}=e,r="default"===t?void 0===o?"textColor":`textColor${o}Depth`:ao("textColor",t),{common:{fontWeightStrong:a,fontFamilyMono:l,cubicBezierEaseInOut:i},self:{codeTextColor:s,codeBorderRadius:c,codeColor:d,codeBorder:u,[r]:p}}=n.value;return{"--n-bezier":i,"--n-text-color":p,"--n-font-weight-strong":a,"--n-font-famliy-mono":l,"--n-code-border-radius":c,"--n-code-text-color":s,"--n-code-color":d,"--n-code-border":u}}),a=t?Ce("text",Do(()=>`${e.type[0]}${e.depth||""}`),r,e):void 0;return{mergedClsPrefix:o,compitableTag:G(e,["as","tag"]),cssVars:t?void 0:r,themeClass:null==a?void 0:a.themeClass,onRender:null==a?void 0:a.onRender}},render(){var e,o,t;const{mergedClsPrefix:n}=this;null===(e=this.onRender)||void 0===e||e.call(this);const r=[`${n}-text`,this.themeClass,{[`${n}-text--code`]:this.code,[`${n}-text--delete`]:this.delete,[`${n}-text--strong`]:this.strong,[`${n}-text--italic`]:this.italic,[`${n}-text--underline`]:this.underline}],a=null===(t=(o=this.$slots).default)||void 0===t?void 0:t.call(o);return this.code?So("code",{class:r,style:this.cssVars},this.delete?So("del",null,a):a):this.delete?So("del",{class:r,style:this.cssVars},a):So(this.compitableTag||"span",{class:r,style:this.cssVars},a)}}),Cv=()=>({}),wv={name:"light",common:l,Alert:Ws,Anchor:Zs,AutoComplete:hc,Avatar:yc,AvatarGroup:wc,BackTop:Tc,Badge:zc,Breadcrumb:Ac,Button:Ie,ButtonGroup:Pp,Calendar:Ec,Card:Yn,Carousel:Hc,Cascader:Nc,Checkbox:Rn,Code:Xc,Collapse:Qc,CollapseTransition:td,ColorPicker:ad,DataTable:Ad,DatePicker:cu,Descriptions:hu,Dialog:jn,Divider:tr,Drawer:sp,Dropdown:yd,DynamicInput:hp,DynamicTags:bp,Element:xp,Empty:Q,Equation:{name:"Equation",common:l,self:Cv},Ellipsis:Pd,Flex:Sp,Form:or,GradientText:zp,Heatmap:jf,Icon:te,IconWrapper:Nf,Image:qf,Input:bn,InputNumber:Rp,InputOtp:Fp,Layout:Bp,LegacyTransfer:tv,List:Lp,LoadingBar:Su,Log:Up,Menu:Vp,Mention:Np,Message:Au,Modal:Vn,Notification:Wu,PageHeader:Jp,Pagination:vd,Popconfirm:eh,Popover:Sn,Popselect:cd,Progress:nh,QrCode:iv,Radio:zd,Rate:lh,Row:_p,Result:ch,Scrollbar:ro,Skeleton:dv,Select:fn,Slider:hh,Space:Hn,Spin:je,Statistic:mh,Steps:xh,Switch:kh,Table:Ih,Tabs:Ah,Tag:ye,Thing:Oh,TimePicker:au,Timeline:Dh,Tooltip:Sd,Transfer:jh,Tree:Wh,TreeSelect:Vh,Typography:Zn,Upload:Yh,Watermark:Zh,Split:mv,FloatButton:of,FloatButtonGroup:Qh,Marquee:rv},Sv={name:"dark",common:_i,Alert:Us,Anchor:Qs,AutoComplete:fc,Avatar:xc,AvatarGroup:Sc,BackTop:Pc,Badge:Ic,Breadcrumb:Fc,Button:$c,ButtonGroup:kp,Calendar:_c,Card:Dc,Carousel:jc,Cascader:Kc,Checkbox:Uc,Code:Jc,Collapse:ed,CollapseTransition:nd,ColorPicker:ld,DataTable:Fd,DatePicker:du,Descriptions:fu,Dialog:vu,Divider:lp,Drawer:cp,Dropdown:xd,DynamicInput:up,DynamicTags:gp,Element:yp,Empty:ss,Ellipsis:kd,Equation:{name:"Equation",common:_i,self:Cv},Flex:wp,Form:Tp,GradientText:Ip,Heatmap:Uf,Icon:Vd,IconWrapper:Kf,Image:Vf,Input:ec,InputNumber:Mp,InputOtp:$p,LegacyTransfer:ov,Layout:Op,List:Hp,LoadingBar:wu,Log:jp,Menu:qp,Mention:Wp,Message:Fu,Modal:mu,Notification:Nu,PageHeader:Xp,Pagination:md,Popconfirm:oh,Popover:bs,Popselect:sd,Progress:rh,QrCode:lv,Radio:Id,Rate:ah,Result:dh,Row:Ep,Scrollbar:Di,Select:dd,Skeleton:cv,Slider:ph,Space:fp,Spin:fh,Statistic:gh,Steps:Ch,Switch:Sh,Table:zh,Tabs:Fh,Tag:As,Thing:Bh,TimePicker:lu,Timeline:_h,Tooltip:wd,Transfer:Hh,Tree:Nh,TreeSelect:Kh,Typography:qh,Upload:Jh,Watermark:Xh,Split:fv,FloatButton:ef,FloatButtonGroup:{name:"FloatButtonGroup",common:_i,self(e){const{popoverColor:o,dividerColor:t,borderRadius:n}=e;return{color:o,buttonBorderColor:t,borderRadiusSquare:n,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .12)"}}},Marquee:av},kv=["disabled"],Pv=qe({__name:"HeaderButton",props:{icon:{type:Object,required:!0},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:"bottom"},iconSize:{type:Number,default:18},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:o}){const t=e,n=o,r=Do(()=>t.disabled?"#6b7280":t.active?"#18a058":void 0);function a(){t.disabled||n("click")}return(o,t)=>(Ao(),zo(Qo(Hd),{placement:e.tooltipPlacement},{trigger:Uo(()=>[pt("button",{class:qo(["header-button",{active:e.active,disabled:e.disabled}]),disabled:e.disabled,onClick:a},[Po(Qo(we),{size:e.iconSize,color:r.value},{default:Uo(()=>[(Ao(),zo(Fo(e.icon)))]),_:1},8,["size","color"])],10,kv)]),default:Uo(()=>[rt(o.$slots,"default",{},()=>[vo(Bo(e.tooltip),1)],!0)]),_:3},8,["placement"]))}},[["__scopeId","data-v-b515354d"]]);async function Tv(e=null){const o=e?{platform:e}:{};return(await bt.get("/env/check",{params:o})).data}function Iv(){return ap(["message","dialog"],{configProviderProps:{theme:"dark"===document.documentElement.getAttribute("data-theme")?Sv:wv}})}var zv=Iv();new MutationObserver(()=>{zv=Iv()}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});var Mv={success:(...e)=>zv.message.success(...e),error:(...e)=>zv.message.error(...e),warning:(...e)=>zv.message.warning(...e),info:(...e)=>zv.message.info(...e),loading:(...e)=>zv.message.loading(...e)},Rv={success:(...e)=>zv.dialog.success(...e),error:(...e)=>zv.dialog.error(...e),warning:(...e)=>zv.dialog.warning(...e),info:(...e)=>zv.dialog.info(...e),create:(...e)=>zv.dialog.create(...e)},Av={class:"modal-header"},Fv={class:"modal-content"},$v={class:"desc-text"},Ov={class:"conflict-list"},Bv={class:"list-header"},Ev={key:0,class:"selected-hint"},_v={class:"conflict-items"},Dv=["onClick"],Lv={class:"item-content"},Hv={class:"item-header"},jv={class:"var-name"},Uv={class:"var-value"},Wv={class:"var-source"},Nv={class:"modal-footer"},Kv={__name:"EnvConflictModal",props:{visible:{type:Boolean,default:!1},conflicts:{type:Array,default:()=>[]}},emits:["update:visible","deleted","close","ignore","never-remind"],setup(e,{emit:o}){const t=e,n=o,r=Do({get:()=>t.visible,set:e=>n("update:visible",e)}),a=it(new Set),l=it(!1),i=Do(()=>a.value.size),s=Do(()=>t.conflicts.length>0&&a.value.size===t.conflicts.length),c=Do(()=>a.value.size>0&&a.value.size<t.conflicts.length),d=Do(()=>t.conflicts.length>0&&t.conflicts.every(e=>"process"===e.sourceType));function u(e){return`${e.varName}:${e.sourcePath}`}function p(e){return"process"===e.sourceType?"进程环境变量":e.sourcePath}function h(e){a.value=e?new Set(t.conflicts.map(u)):new Set}function f(){n("close")}function v(){n("ignore")}function m(){n("never-remind")}async function g(){const e=t.conflicts.filter(e=>a.value.has(u(e)));e.every(e=>"process"===e.sourceType)?Mv.warning("进程环境变量无法直接删除,请手动从 shell 配置文件中移除"):Rv.warning({title:"确认删除",content:`确定要删除选中的 ${e.length} 个环境变量吗?删除前会自动备份。`,positiveText:"删除",negativeText:"取消",onPositiveClick:async()=>{l.value=!0;try{(await async function(e){return(await bt.post("/env/delete",{conflicts:e})).data}(e)).success&&(Mv.success("删除成功,备份已保存"),a.value=new Set,n("deleted"))}catch(o){Mv.error("删除失败: "+o.message)}finally{l.value=!1}}})}return(o,t)=>(Ao(),zo(Qo(Jn),{show:r.value,"onUpdate:show":t[1]||(t[1]=e=>r.value=e),preset:"card",title:null,bordered:!1,closable:!0,"mask-closable":!1,style:{width:"560px","max-width":"90vw"},onClose:f},{header:Uo(()=>[pt("div",Av,[Po(Qo(we),{class:"warning-icon",size:22},{default:Uo(()=>[Po(Qo(nn))]),_:1}),t[2]||(t[2]=pt("span",{class:"header-title"},"检测到环境变量冲突",-1))])]),footer:Uo(()=>[pt("div",Nv,[Po(Qo(Ne),{tertiary:"",onClick:v},{default:Uo(()=>[...t[8]||(t[8]=[vo(" 暂时忽略 ",-1)])]),_:1}),Po(Qo(Ne),{tertiary:"",onClick:m},{default:Uo(()=>[...t[9]||(t[9]=[vo(" 不再提醒 ",-1)])]),_:1}),d.value?fo("",!0):(Ao(),zo(Qo(Ne),{key:0,type:"error",disabled:0===i.value,loading:l.value,onClick:g},{default:Uo(()=>[vo(" 删除选中 ("+Bo(i.value)+") ",1)]),_:1},8,["disabled","loading"]))])]),default:Uo(()=>[pt("div",Fv,[pt("p",$v,[t[3]||(t[3]=vo(" 发现 ",-1)),pt("strong",null,Bo(e.conflicts.length),1),t[4]||(t[4]=vo(" 个环境变量可能影响代理配置,建议清理后再使用代理功能。 ",-1))]),d.value?(Ao(),zo(Qo(Ys),{key:0,type:"info",bordered:!1,class:"process-env-alert"},{icon:Uo(()=>[Po(Qo(we),null,{default:Uo(()=>[Po(Qo($t))]),_:1})]),default:Uo(()=>[t[5]||(t[5]=pt("div",{class:"alert-content"},[pt("p",{class:"alert-title"},"这些环境变量来自当前进程,请按以下步骤处理:"),pt("ol",{class:"alert-list"},[pt("li",null,"检查对应 shell 配置文件(如 ~/.zshrc、~/.bashrc 或 PowerShell Profile)中是否有这些变量"),pt("li",null,"如果有,删除或注释掉相关行"),pt("li",null,[pt("strong",null,"重启终端"),vo(",然后重新运行 "),pt("code",null,"ct")])]),pt("p",{class:"alert-hint"},"如果配置文件中没有,可能是终端临时设置的,直接重启终端即可")],-1))]),_:1})):fo("",!0),pt("div",Ov,[pt("div",Bv,[Po(Qo(Yc),{checked:s.value,indeterminate:c.value,"onUpdate:checked":h},{default:Uo(()=>[...t[6]||(t[6]=[vo(" 全选 ",-1)])]),_:1},8,["checked","indeterminate"]),i.value>0?(Ao(),ut("span",Ev," 已选 "+Bo(i.value)+" 项 ",1)):fo("",!0)]),Po(Qo(sv),{style:{"max-height":"280px"}},{default:Uo(()=>[pt("div",_v,[(Ao(!0),ut(No,null,Co(e.conflicts,e=>{return Ao(),ut("div",{key:u(e),class:qo(["conflict-item",{selected:a.value.has(u(e))}]),onClick:o=>function(e){const o=u(e);a.value.has(o)?a.value.delete(o):a.value.add(o),a.value=new Set(a.value)}(e)},[Po(Qo(Yc),{checked:a.value.has(u(e)),onClick:t[0]||(t[0]=Zo(()=>{},["stop"])),"onUpdate:checked":o=>function(e,o){const t=u(e);o?a.value.add(t):a.value.delete(t),a.value=new Set(a.value)}(e,o)},null,8,["checked","onUpdate:checked"]),pt("div",Lv,[pt("div",Hv,[pt("code",jv,Bo(e.varName),1),Po(Qo(Es),{type:(o=e.platform,{claude:"warning",codex:"success",gemini:"info"}[o]||"default"),size:"tiny",bordered:!1},{default:Uo(()=>[vo(Bo(e.platform),1)]),_:2},1032,["type"])]),pt("div",Uv,Bo(e.varValue),1),pt("div",Wv,[t[7]||(t[7]=pt("span",{class:"source-label"},"来源:",-1)),vo(" "+Bo(p(e)),1)])])],10,Dv);var o}),128))])]),_:1})])])]),_:1},8,["show"]))}},Vv=qe(Kv,[["__scopeId","data-v-7ea71ef7"]]);async function qv(){return(await bt.get("/security")).data}async function Gv(e){return(await bt.post("/security/password",e)).data}var Yv=new Map;function Jv(e,o="",t="",n=""){return`${e}:${o}:${t}:${function(e=""){return e?String(e):""}(n)}`}function Xv(e,o,t=e.split(":",1)[0],n=t){const r=Yv.get(e);if(r)return r.promise;for(const[i,s]of Yv)s.abortGroup===n&&i!==e&&s.abortController.abort();const a=new AbortController,l={promise:null,startedAt:Date.now(),abortController:a,resource:t,abortGroup:n};return l.promise=Promise.resolve().then(()=>o(a.signal)).finally(()=>{Yv.get(e)===l&&Yv.delete(e)}),Yv.set(e,l),l.promise}var Zv="__ccAdvancedConfigBound__",Qv=null,em=0,om=!1,tm=null,nm=Object.create(null);function rm(e,o,t,n={},r){return Xv(Jv(e,o,"",""),e=>vt.get(t,{params:n,signal:e}),e,`${e}:${o}`).catch(()=>r)}function am(){const e=new Date;return e.setHours(0,0,0,0),{start:e.getTime(),end:e.getTime()+864e5}}function lm(e,o){if(o.usageMissing)return null;if(void 0!==o.totalTokens&&null!==o.totalTokens)return Number(o.totalTokens)||0;const t=Number(o.inputTokens)||0,n=Number(o.outputTokens)||0,r=Number(o.cacheCreation)||0,a=Number(o.cacheRead)||0;return"claude"===e?t+n+r+a:t+n}function im(e={}){const o=[e.model,e.redirectedModel,e.modelFromUrl,e.originalModel];for(const t of o)if("string"==typeof t&&t.trim())return t.trim();return""}var sm=ot("global",()=>{const{catalog:e,enabledKeys:o}=cr(),t=_o({}),n=_o({}),r=_o({}),a=_o({}),l=new Map,i=new Map,s=new Set;function c(e){return String(e||"").trim().toLowerCase()}function d(o){const t=c(o);return Boolean(t)&&e.value.some(e=>e.key===t)}function u(e){const t=c(e);return o.value.includes(t)}function p(o,t){const n=c(o);return d(n)&&e.value.some(e=>e.key===n&&(!0===e.capabilities?.[t]||!0===e.resourceTypes?.[t]))}function h(e){const t=Array.isArray(e)?e:o.value,n=new Set(o.value),r=[],a=new Set;return t.forEach(e=>{const o=c(e);o&&!a.has(o)&&n.has(o)&&(a.add(o),r.push(o))}),r}function f(e){const o=c(e);return d(o)?(t[o]||(t[o]={running:!1,loading:!1,activeChannel:null,port:null,runtime:null,startTime:null,defaultPort:null}),n[o]||(n[o]=[]),r[o]||(r[o]={channels:[],pending:0}),a[o]||(a[o]=[]),o):null}function v(e){const o=f(e);return o?(l.has(o)||l.set(o,jo(t,o)),l.get(o)):null}function m(e){const o=f(e);return o?(i.has(o)||i.set(o,jo(n,o)),i.get(o)):null}function g(e){const o=f(e);return o?r[o]:null}function b(e){const o=f(e);return o?a[o]:[]}function y(){Object.keys(nm).forEach(e=>{delete nm[e]}),Object.entries(n).forEach(([e,o])=>{o.forEach(o=>{o?.name&&(nm[o.name]=e)})})}o.value.forEach(f);const x=it(!1),C=it(!1);let w="",S="";const k=it(100),P=it(30);let T=null,I=100,z=am();function M(e){return function(){const e=Date.now();(e<z.start||e>=z.end)&&(z=am(),O())}(),e>=z.start&&e<z.end}function R(e){for(;e.length>I;)e.pop()}function A(e){I=e,k.value=e,Object.values(a).forEach(R)}function F(e){const o=parseInt(e,10);if(Number.isNaN(o))return;const t=Math.min(Math.max(o,10),300);P.value!==t&&(P.value=t)}function $(e){const o=function(e){if(e.source)return c(e.source);if(e.toolType){const o=c(e.toolType);return d(o)?o:""}if(e.channel)return nm[e.channel]||"";if(e.model){const o=e.model.toLowerCase();if(o.includes("claude"))return"claude";if(o.includes("gpt")||o.includes("o1")||o.includes("o3"))return"codex";if(o.includes("gemini"))return"gemini";if(o.includes("opencode")||o.includes("deepseek")||o.includes("qwen"))return"opencode";if(o.includes("omp"))return"omp"}return e.action?.includes("opencode")?"opencode":e.action?.includes("omp")?"omp":e.action?.includes("codex")?"codex":e.action?.includes("gemini")?"gemini":e.action?.includes("claude")?"claude":""}(e);if(!d(o)||!u(o))return;const t=b(o);if(!t)return;const n=e.timestamp||Date.now();if(!M(n))return;const r=e.time||new Date(n).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),a={id:e.id||`${Date.now()}-${Math.random()}`,source:o,type:e.type||(e.action?"action":"log"),status:e.status||(e.error?"error":"success"),action:e.action||null,channel:e.channel||e.channelName||"Unknown",model:im(e),originalModel:e.originalModel||null,redirectedModel:e.redirectedModel||null,message:e.message,error:e.error||null,statusCode:e.statusCode||null,stage:e.stage||null,usageMissing:Boolean(e.usageMissing),timestamp:n,time:r,tokens:{input:e.inputTokens||0,output:e.outputTokens||0,cacheCreation:e.cacheCreation||0,cacheRead:e.cacheRead||0,cached:e.cachedTokens||0,reasoning:e.reasoningTokens||0,total:lm(o,e)},cost:e.cost||0,isHistory:om,isNew:!om};t.unshift(a),R(t),a.isNew&&setTimeout(()=>{a.isNew=!1},4500)}function O(){Object.keys(a).forEach(e=>{a[e].splice(0,a[e].length)})}function B(e,o={},t){e.value={...e.value,...o,activeChannel:t||e.value.activeChannel}}function E(e,o){const t=m(e);if(!t)return;const n=(r=o,Array.isArray(r)?r:Array.isArray(r?.channels)?r.channels:[]);var r;t.value=function(e=[],o=[]){if(!Array.isArray(o))return e;const t=new Map(e.filter(e=>e?.id).map(e=>[e.id,e]));return o.map(e=>{const o=t.get(e?.id);return o?!Object.prototype.hasOwnProperty.call(e,"apiKey")&&o.apiKey?{...o,...e,apiKey:o.apiKey}:{...o,...e}:e})}(t.value,n)}function _(e){const o=c(e?.source);if(!o||!u(o))return;const t=v(o);t&&(B(t,e.proxy,e.activeChannel),e.channels&&(E(o,e.channels),y()))}async function D(e={}){const t=h(e.keys).filter(e=>p(e,"channels"));if(S===o.value.join(",")&&!e.force)return{success:!0,channels:Object.fromEntries(t.map(e=>[e,m(e)?.value||[]]))};const n=o.value.join(","),a=!Array.isArray(e.keys);return T||(T=async function(e){try{return(await Promise.all(e.map(async e=>{const o=yt(e),t=rm("channels",e,`/api${o}/channels`,{},{data:{channels:[]}}),n=xt(e)?rm("channel-pool",e,`/api${o}/channels/pool/status?source=${encodeURIComponent(e)}`,{},{data:null}):Promise.resolve({data:null});return{key:e,channelResponse:await t,poolResponse:await n}}))).forEach(({key:e,channelResponse:o,poolResponse:t})=>{const n=o?.data;E(e,Array.isArray(n)?n:n?.channels),t?.data?.scheduler&&(r[e]=t.data.scheduler)}),y(),{success:!0,channels:Object.fromEntries(e.map(e=>[e,m(e)?.value||[]]))}}catch(o){return{success:!1,channels:Object.fromEntries(e.map(e=>[e,m(e)?.value||[]]))}}}(t).then(e=>(a&&(S=n),e)).finally(()=>{T=null}),T)}return"undefined"==typeof window||window[Zv]||(window.addEventListener("advanced-config-change",e=>{e.detail?.maxLogs&&A(e.detail.maxLogs),e.detail?.statsInterval&&F(e.detail.statsInterval)}),window[Zv]=!0),{proxyStateByPlatform:t,channelsByPlatform:n,schedulerStateByPlatform:r,logsBySource:a,ensurePlatformState:f,connectWebSocket:function e(){if(Qv&&Qv.readyState===WebSocket.OPEN)return;const o=`${"https:"===window.location.protocol?"wss:":"ws:"}//${window.location.host}/ws`;try{(Qv=new WebSocket(o)).onopen=()=>{em=0,x.value=!0,om=!0,clearTimeout(tm),tm=setTimeout(()=>{om=!1},2e3)},Qv.onmessage=e=>{try{const o=JSON.parse(e.data);"proxy-state"===o.type?_(o):"scheduler-state"===o.type?function(e){const o=c(e?.source);o&&u(o)&&e.scheduler&&g(o)&&(r[o]=e.scheduler)}(o):"browser-notification"===o.type?function(e){if("undefined"==typeof window||"undefined"==typeof Notification)return;if("granted"!==Notification.permission)return;const o=e.id||`${e.source||"claude"}-${e.timestamp||Date.now()}`;if(s.has(o))return;s.add(o),new Notification(e.title||"coding-tool-x",{body:e.message||"任务已完成",tag:o,icon:"/logo.png"}).onclick=()=>{try{window.focus(),e.url&&window.location.assign(e.url)}catch(o){}}}(o):$(o)}catch(o){}},Qv.onclose=()=>{x.value=!1,Qv=null,om=!1,clearTimeout(tm);const o=Math.min(1e3*Math.pow(2,em),1e4);em+=1,setTimeout(e,o)},Qv.onerror=e=>{x.value=!1}}catch(t){x.value=!1}},initializeState:async function(){const e=o.value.join(",");if(C.value&&w===e)return;const t=h().filter(e=>p(e,"proxy"));try{(await Promise.all(t.map(e=>rm("proxy-status",e,`/api${yt(e)}/proxy/status`,{},{data:{}})))).forEach((e,o)=>{const n=e?.data||{},r=v(t[o]);r&&n.proxy&&B(r,n.proxy,n.activeChannel)}),w=e,C.value=!0}catch(n){}},loadChannels:D,getProxyState:v,getChannels:m,getSchedulerState:g,handleProxyStateUpdate:_,hydrateFromDashboard:function(e={}){const t=e.channels||{};Object.entries(t).forEach(([e,o])=>{u(e)&&E(e,o)}),y();const n=e.proxyStatus||{};Object.entries(n).forEach(([e,o])=>{if(!u(e)||!o||"object"!=typeof o)return;const t=v(e);t&&B(t,o,o.activeChannel)}),w=o.value.join(","),C.value=!0},startProxy:async function(e){const o=c(e);if(!u(o)||!p(o,"proxy"))throw gt(o,"unsupported");const t=v(o);if(!t)throw gt(o,"not_found");const n=await vt.post(`/api${yt(o)}/proxy/start`);return n.data.success&&(t.value.running=!0,t.value.activeChannel=n.data.activeChannel,t.value.startTime=Date.now()),n.data},stopProxy:async function(e,o={}){const t=c(e);if(!u(t)||!p(t,"proxy"))throw gt(t,"unsupported");const n=v(t);if(!n)throw gt(t,"not_found");const r=await vt.post(`/api${yt(t)}/proxy/stop`);return n.value.running=!1,n.value.activeChannel=null,n.value.startTime=null,n.value.runtime=null,!1!==r.data?.success&&await D({force:!0,keys:[t]}),o.refreshChannelsDrawer&&!1!==r.data?.success&&"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("channel-management-refresh",{detail:{channel:t,reason:"proxy-stop"}})),r.data},getLogs:function(e){return Do(()=>b(e))},wsConnected:x,dashboardHydrated:C,clearLogsState:O,clearLogsForSource:function(e){a[e]&&a[e].splice(0,a[e].length)},logLimit:k,statsInterval:P,loadAdvancedConfig:async function(){try{const e=await fetch("/api/config/advanced");if(e.ok){const o=await e.json();A(o.maxLogs||100),o.statsInterval&&F(o.statsInterval)}}catch(e){}}}}),cm=!1;function dm(e){return`${yt(e)}/channels`}async function um(e){return(await bt.get(dm(e))).data}async function pm(e,o,t){return(await bt.put(`${dm(e)}/${encodeURIComponent(o)}`,t)).data}async function hm(){return(await bt.post("/channels/sync-current")).data}async function fm(e,o){return(await bt.put(`/channels/${e}`,o)).data}async function vm(e){return(await bt.delete(`/channels/${e}`)).data}async function mm(){return(await bt.post("/codex/channels/sync-current")).data}async function gm(e,o){return(await bt.put(`/codex/channels/${e}`,o)).data}async function bm(e){return(await bt.delete(`/codex/channels/${e}`)).data}async function ym(){return(await bt.post("/gemini/channels/sync-current")).data}async function xm(e,o){return(await bt.put(`/gemini/channels/${e}`,o)).data}async function Cm(e){return(await bt.delete(`/gemini/channels/${e}`)).data}async function wm(e,o=2e4){return(await bt.post(`/channels/${e}/speed-test`,{timeout:o})).data}async function Sm(e=2e4,{signal:o}={}){return(await bt.post("/channels/speed-test-all",{timeout:e},{timeout:Ct,signal:o})).data}async function km(e,o=2e4){return(await bt.post(`/codex/channels/${e}/speed-test`,{timeout:o})).data}async function Pm(e=2e4,{signal:o}={}){return(await bt.post("/codex/channels/speed-test-all",{timeout:e},{timeout:Ct,signal:o})).data}async function Tm(e,o=2e4){return(await bt.post(`/gemini/channels/${e}/speed-test`,{timeout:o})).data}async function Im(e=2e4,{signal:o}={}){return(await bt.post("/gemini/channels/speed-test-all",{timeout:e},{timeout:Ct,signal:o})).data}async function zm(){return(await bt.post("/opencode/channels/sync-current")).data}async function Mm(e,o){return(await bt.put(`/opencode/channels/${e}`,o)).data}async function Rm(e){return(await bt.delete(`/opencode/channels/${e}`)).data}async function Am(e,o=2e4){return(await bt.post(`/opencode/channels/${e}/speed-test`,{timeout:o})).data}async function Fm(e=2e4,{signal:o}={}){return(await bt.post("/opencode/channels/speed-test-all",{timeout:e},{timeout:Ct,signal:o})).data}async function $m(){return(await bt.post("/omp/channels/sync-current")).data}async function Om(e,o){return(await bt.put(`/omp/channels/${e}`,o)).data}async function Bm(e){return(await bt.delete(`/omp/channels/${e}`)).data}async function Em(e,o,t){const n=mt(e),r={claude:fm,codex:gm,gemini:xm,opencode:Mm,omp:Om}[n];return r?r(o,t):pm(n,o,t)}async function _m(e){const o=mt(e),t={claude:"/claude",codex:"/codex",gemini:"/gemini",opencode:"/opencode",omp:"/omp"}[o]||yt(o);return(await bt.get(`${t}/statistics/today`)).data}async function Dm(e){return(await bt.get("/statistics/trend",{params:e})).data}async function Lm(e){return(await bt.get("/statistics/filters",{params:e})).data}function Hm(e){return`/api/statistics/trend/export?${new URLSearchParams(e).toString()}`}function jm(e){return Array.isArray(e)?e:Array.isArray(e?.channels)?e.channels:[]}function Um(e={}){return e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,o={}])=>{const t="object"==typeof o.tokens?o.tokens?.total:o.tokens;return[e,{...o,requests:o.requests||0,tokens:t||0,cost:o.cost||0}]})):{}}function Wm(e={}){const o="object"==typeof e.tokens?e.tokens?.total:e.tokens;return{requests:e.requests||0,tokens:o||0,cost:e.cost||0,byModel:e.byModel||{},byChannel:Um(e.byChannel)}}var Nm=ot("dashboard",()=>{const{enabledKeys:e,getPlatform:o}=cr(),t=it({uiConfig:null,favorites:null,channels:{},proxyStatus:{},todayStats:{},counts:{},meta:null}),n=it(!1),r=it(!1);let a=null,l="",i=null,s=0,c=null;function d(e){if(!e?.refreshing)return s=0,void(i&&(clearTimeout(i),i=null));if(s>=8||i)return;const o=s;s+=1,i=setTimeout(()=>{i=null,f(!0,{fresh:!1}).catch(()=>{})},Math.min(1200+1200*o,5e3))}function u(){return e.value}function p(e,o=e=>e){const t=e&&"object"==typeof e?e:{};return Object.fromEntries(u().map(e=>[e,o(t[e])]))}function h(e,t){const n=function(e){const o=String(e||"").trim().toLowerCase();return u().includes(o)?o:null}(e),r=n?o(n):null;return!n||!0!==r?.capabilities?.[t]&&!0!==r?.resourceTypes?.[t]?null:n}async function f(e=!1,o={}){const i=u().join(",");return r.value&&!e&&l===i?t.value:a||(n.value=!0,a=(async()=>{try{const n=await async function(e={}){return(await bt.get("/dashboard/init",{params:e.fresh?{fresh:"1"}:void 0})).data}({fresh:!0===o.fresh});if(!n||!1===n.success)throw new Error(n?.message||"Failed to load dashboard");const a=n.data||{},s=u();t.value={uiConfig:a.uiConfig||null,favorites:a.favorites||null,channels:p(a.channels,jm),proxyStatus:p(a.proxyStatus,e=>e&&"object"==typeof e?e:{}),todayStats:p(a.todayStats,Wm),counts:p(a.counts,e=>e&&"object"==typeof e?e:{projectCount:0,sessionCount:0}),meta:a.meta||null},0===s.length&&(t.value.channels={},t.value.proxyStatus={},t.value.todayStats={},t.value.counts={});try{sm().hydrateFromDashboard(t.value)}catch(e){}return d(t.value.meta),l=i,r.value=!0,t.value}finally{n.value=!1,a=null}})().catch(e=>{throw e}),a)}return{dashboardData:t,isLoading:n,isLoaded:r,loadDashboard:f,enableAutoRefresh:function(){c||(c=setInterval(()=>{f(!0,{fresh:!0}).catch(()=>{})},3e5))},disableAutoRefresh:function(){c&&(clearInterval(c),c=null)},refreshChannels:async function(e){const o=h(e,"channels");if(o)try{const e=await um(o);t.value.channels[o]=jm(e)}catch(n){}},refreshProxyStatus:async function(e){const o=h(e,"proxy");if(o)try{t.value.proxyStatus[o]=await async function(e){return(await bt.get(`${yt(e)}/proxy/status`)).data}(o)}catch(n){}},refreshStats:async function(e){const o=h(e,"statistics");if(o)try{const e=await _m(o),n=e?.summary||{};t.value.todayStats[o]=Wm({requests:n.requests||0,tokens:n.tokens||0,cost:n.cost||0,byModel:e?.byModel||{},byChannel:e?.byChannel||{}})}catch(n){}}}}),Km="cc-theme",Vm=it(!1),qm=!1,Gm=null,Ym=null,Jm=!1;function Xm(){return Gm||(Gm=Nm(),Ym=Lo(Gm).dashboardData),Gm}function Zm(){Jm||Ym&&($o(()=>Ym.value?.uiConfig?.theme,e=>{if(!e)return;const o="dark"===e;if(!qm)return qm=!0,Vm.value=o,void eg(o);Vm.value!==o&&(Vm.value=o,eg(o))}),Jm=!0)}async function Qm(){if(qm)return;const e="undefined"!=typeof window?window.localStorage?.getItem(Km):null;"dark"!==e&&"light"!==e||(Vm.value="dark"===e,eg(Vm.value));try{const o=Xm();Zm();let t=Ym?.value?.uiConfig?.theme;t||(t=(await o.loadDashboard().catch(()=>null))?.uiConfig?.theme),t||e?t&&(Vm.value="dark"===t):Vm.value=window.matchMedia("(prefers-color-scheme: dark)").matches}catch(o){e||(Vm.value=window.matchMedia("(prefers-color-scheme: dark)").matches)}eg(Vm.value),qm=!0}function eg(e){e?document.documentElement.setAttribute("data-theme","dark"):document.documentElement.removeAttribute("data-theme")}function og(){Vm.value=!Vm.value}function tg(){return{isDark:Vm,toggleTheme:og,loadTheme:Qm}}function ng(){const e=sm(),{proxyStateByPlatform:o,channelsByPlatform:t,schedulerStateByPlatform:n,logsBySource:r,wsConnected:a,logLimit:l,statsInterval:i}=Lo(e);return{proxyStateByPlatform:o,channelsByPlatform:t,schedulerStateByPlatform:n,logsBySource:r,ensurePlatformState:e.ensurePlatformState,connectWebSocket:e.connectWebSocket,initializeState:e.initializeState,loadChannels:e.loadChannels,getProxyState:e.getProxyState,getChannels:e.getChannels,getSchedulerState:e.getSchedulerState,handleProxyStateUpdate:e.handleProxyStateUpdate,hydrateFromDashboard:e.hydrateFromDashboard,startProxy:e.startProxy,stopProxy:e.stopProxy,getLogs:e.getLogs,wsConnected:a,clearLogsState:e.clearLogsState,clearLogsForSource:e.clearLogsForSource,logLimit:l,statsInterval:i,loadAdvancedConfig:e.loadAdvancedConfig}}function rg(){!function(){if(cm)return;const e=sm();e.connectWebSocket(),queueMicrotask(()=>{const o=()=>{e.loadAdvancedConfig()};"undefined"==typeof window||"function"!=typeof window.requestIdleCallback?setTimeout(o,0):window.requestIdleCallback(o,{timeout:1e3})}),cm=!0}()}$o(Vm,async e=>{eg(e);try{window.localStorage?.setItem(Km,e?"dark":"light")}catch(o){}try{await kt("theme",e?"dark":"light"),Xm(),Zm(),Ym.value&&(Ym.value={...Ym.value,uiConfig:{...Ym.value.uiConfig||{},theme:e?"dark":"light"}})}catch(o){}});var ag=ot("favorites",()=>{const e=it({claude:[],codex:[],gemini:[]}),o=it(!1),t=it(!1);let n=null;return{favorites:e,totalFavorites:Do(()=>(e.value.claude?.length||0)+(e.value.codex?.length||0)+(e.value.gemini?.length||0)),isLoaded:o,loading:t,loadFavorites:async function(r=!1){if(o.value&&!r)return e.value;if(n&&!r)return n;let a=null;return a=(async()=>{t.value=!0;try{const t=await async function(){return(await bt.get("/favorites")).data}();return t.success&&t.favorites&&(e.value={claude:t.favorites.claude||[],codex:t.favorites.codex||[],gemini:t.favorites.gemini||[]}),o.value=!0,e.value}catch(r){throw r}finally{t.value=!1,n===a&&(n=null)}})(),n=a,a},addFavorite:async function(o,t){try{const n=await async function(e,o){return(await bt.post("/favorites",{channel:e,sessionData:o})).data}(o,t);if(n.success&&n.favorites)return e.value=n.favorites,!0}catch(n){}return!1},removeFavorite:async function(o,t,n){try{const r=await async function(e,o,t){return(await bt.delete(`/favorites/${e}/${encodeURIComponent(o)}/${t}`)).data}(o,t,n);if(r.success&&r.favorites)return e.value=r.favorites,!0}catch(r){}return!1},isFavorite:function(o,t,n){return!!e.value[o]&&e.value[o].some(e=>e.sessionId===n&&e.projectName===t)},getFavoritesByChannel:function(o){return e.value[o]||[]}}});function lg(){const e=ag(),{favorites:o,totalFavorites:t}=Lo(e);return e.isLoaded||e.loadFavorites().catch(()=>{}),{favorites:o,addFavorite:e.addFavorite,removeFavorite:e.removeFavorite,isFavorite:e.isFavorite,getFavorites:function(o){return e.getFavoritesByChannel(o)},getAllFavorites:function(){return o.value},totalFavorites:t,loadFavorites:e.loadFavorites}}function ig(){const e=Nm(),{dashboardData:o,isLoading:t,isLoaded:n}=Lo(e);return{dashboardData:o,isLoading:t,isLoaded:n,loadDashboard:e.loadDashboard,scheduleRefresh:e.scheduleRefresh,enableAutoRefresh:e.enableAutoRefresh,disableAutoRefresh:e.disableAutoRefresh,refreshChannels:e.refreshChannels,refreshProxyStatus:e.refreshProxyStatus,refreshStats:e.refreshStats}}var sg={class:"channel-header"},cg={class:"channel-title"},dg=["title"],ug={class:"channel-actions"},pg={class:"test-result-header"},hg={class:"test-result-status"},fg={class:"test-result-info"},vg={key:0,class:"latency"},mg={key:1,class:"status-code"},gg={key:0,class:"test-result-error"},bg={class:"channel-info"},yg={class:"info-main"},xg={class:"info-footer"},Cg={class:"channel-meta"},wg={class:"meta-item"},Sg={class:"meta-value"},kg={class:"meta-item"},Pg={__name:"ChannelCard",props:{channel:{type:Object,required:!0},collapsed:{type:Boolean,default:!1},headerTags:{type:Array,default:()=>[]},infoRows:{type:Array,default:()=>[]},meta:{type:Object,default:()=>({weight:1,concurrencyText:"不限",concurrencyActive:!1})},balance:{type:Object,default:null},showApplyButton:{type:Boolean,default:!1},channelType:{type:String,default:"claude"},testFn:{type:Function,default:null},toggling:{type:Boolean,default:!1}},emits:["toggle-collapse","apply","edit","delete","toggle-enabled","open-website","refresh-balance"],setup(e,{emit:o}){const t=e,n=o,r=it(!1),a=it(null),l=Do(()=>{if(!t.balance?.visible)return"";const e=[];if(t.balance.platform&&e.push(t.balance.platform),t.balance.stale&&e.push("缓存"),t.balance.updatedAt)try{e.push(new Date(t.balance.updatedAt).toLocaleString())}catch{}if(Array.isArray(t.balance.windows)&&t.balance.windows.length){const o=t.balance.windows.map(e=>{const o=null==e.remainingPercent?"":`剩余 ${e.remainingPercent}%`;let t="";if(e.resetsAt)try{t=`,重置 ${new Date(e.resetsAt).toLocaleString()}`}catch{}return`${e.label||e.id||"额度"} ${o}${t}`});e.push(o.join("\n"))}return e.join(" · ")});async function i(){if(t.testFn){r.value=!0,a.value=null;try{const e=await t.testFn(t.channel.id,2e4);a.value=e}catch(e){a.value={success:!1,error:e.message||"测试失败",latency:null,statusCode:null}}finally{r.value=!1}}}return(o,t)=>(Ao(),ut("div",{class:qo(["channel-card",{collapsed:e.collapsed,disabled:!1===e.channel.enabled,"status-frozen":"frozen"===e.channel.health?.status,"status-checking":"checking"===e.channel.health?.status}])},[pt("div",sg,[pt("div",cg,[Po(Qo(Ne),{text:"",size:"tiny",class:"collapse-btn",onClick:t[0]||(t[0]=Zo(e=>o.$emit("toggle-collapse"),["stop"]))},{default:Uo(()=>[Po(Qo(we),{size:"16",class:qo({collapsed:e.collapsed})},{default:Uo(()=>[Po(Qo(Nt))]),_:1},8,["class"])]),_:1}),pt("span",{class:"channel-name",title:e.channel.name},Bo(e.channel.name),9,dg),(Ao(!0),ut(No,null,Co(e.headerTags,e=>(Ao(),zo(Qo(Es),{key:e.text,size:"tiny",type:e.type||"default",bordered:!1},{default:Uo(()=>[vo(Bo(e.text),1)]),_:2},1032,["type"]))),128))]),pt("div",ug,[e.showApplyButton?(Ao(),zo(Qo(Ne),{key:0,size:"tiny",type:"primary",class:"apply-btn",onClick:t[1]||(t[1]=e=>o.$emit("apply"))},{default:Uo(()=>[...t[8]||(t[8]=[vo(" 写入配置 ",-1)])]),_:1})):fo("",!0),Po(Qo(Ne),{size:"tiny",loading:r.value,onClick:i},{icon:Uo(()=>[Po(Qo(we),null,{default:Uo(()=>[Po(Qo(Vt))]),_:1})]),default:Uo(()=>[t[9]||(t[9]=vo(" 测速 ",-1))]),_:1},8,["loading"]),Po(Qo(Ne),{size:"tiny",onClick:t[2]||(t[2]=e=>o.$emit("edit"))},{default:Uo(()=>[...t[10]||(t[10]=[vo(" 编辑 ",-1)])]),_:1}),Po(Qo(Ne),{size:"tiny",type:"error",onClick:t[3]||(t[3]=e=>o.$emit("delete"))},{default:Uo(()=>[...t[11]||(t[11]=[vo(" 删除 ",-1)])]),_:1}),Po(Qo(bv),{size:"small",value:!1!==e.channel.enabled,loading:e.toggling,disabled:e.toggling,"onUpdate:value":t[4]||(t[4]=e=>o.$emit("toggle-enabled",e))},null,8,["value","loading","disabled"])])]),a.value?(Ao(),ut("div",{key:0,class:qo(["test-result",a.value.success?"success":"failed"])},[pt("div",pg,[pt("span",hg,[a.value.success?(Ao(),zo(Qo(we),{key:0,color:"#18a058"},{default:Uo(()=>[Po(Qo(rn))]),_:1})):(Ao(),zo(Qo(we),{key:1,color:"#f56c6c"},{default:Uo(()=>[Po(Qo(Xt))]),_:1})),vo(" "+Bo(a.value.success?"测试成功":"测试失败"),1)]),pt("div",fg,[a.value.latency?(Ao(),ut("span",vg,Bo(a.value.latency)+"ms",1)):fo("",!0),a.value.statusCode?(Ao(),ut("span",mg,"HTTP "+Bo(a.value.statusCode),1)):fo("",!0)]),Po(Qo(Ne),{text:"",size:"tiny",onClick:t[5]||(t[5]=e=>a.value=null)},{default:Uo(()=>[Po(Qo(we),null,{default:Uo(()=>[Po(Qo(Qt))]),_:1})]),_:1})]),a.value.error?(Ao(),ut("div",gg,Bo(a.value.error),1)):fo("",!0)],2)):fo("",!0),ct(pt("div",bg,[pt("div",yg,[(Ao(!0),ut(No,null,Co(e.infoRows,e=>(Ao(),ut("div",{key:e.label,class:"info-row"},[Po(Qo(xv),{depth:"3",class:"label"},{default:Uo(()=>[vo(Bo(e.label)+":",1)]),_:2},1024),Po(Qo(xv),{depth:"2",class:qo(["value",{mono:e.mono}])},{default:Uo(()=>[vo(Bo(e.value||"—"),1)]),_:2},1032,["class"]),"function"==typeof e.action?(Ao(),zo(Qo(Ne),{key:0,size:"tiny",text:"",type:"primary",onClick:o=>e.action()},{default:Uo(()=>[vo(Bo(e.actionLabel||"操作"),1)]),_:2},1032,["onClick"])):fo("",!0)]))),128))]),pt("div",xg,[e.channel.websiteUrl?(Ao(),zo(Qo(Ne),{key:0,text:"",size:"tiny",onClick:t[6]||(t[6]=t=>o.$emit("open-website",e.channel.websiteUrl))},{icon:Uo(()=>[Po(Qo(we),{size:"14"},{default:Uo(()=>[Po(Qo(Ht))]),_:1})]),default:Uo(()=>[t[12]||(t[12]=vo(" 前往官网 ",-1))]),_:1})):fo("",!0),t[15]||(t[15]=pt("div",{class:"footer-spacer"},null,-1)),pt("div",Cg,[e.balance?.visible&&e.balance.label?(Ao(),zo(Qo(Es),{key:0,size:"tiny",type:"success",bordered:!1,class:"balance-meta-tag",title:l.value,onClick:t[7]||(t[7]=Zo(e=>n("refresh-balance"),["stop"]))},{default:Uo(()=>[vo(Bo(e.balance.label),1)]),_:1},8,["title"])):fo("",!0),pt("span",wg,[t[13]||(t[13]=vo(" 权重: ",-1)),pt("span",Sg,Bo(e.meta.weight),1)]),pt("span",kg,[t[14]||(t[14]=vo(" 并发: ",-1)),pt("span",{class:qo(["meta-value",{"meta-active":e.meta.concurrencyActive}])},Bo(e.meta.concurrencyText),3)])])])],512),[[Wo,!e.collapsed]])],2))}},Tg=qe(Pg,[["__scopeId","data-v-88bb1df0"]]),Ig=it(null),zg=it(null),Mg=it(!1),Rg={claude:["claude-opus-4-7","claude-opus-4-6","claude-sonnet-4-6","claude-opus-4-5-20251101","claude-sonnet-4-5-20250929","claude-haiku-4-5-20251001"],codex:["gpt-5.5","gpt-5.4","gpt-5.4-mini","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.2-codex","gpt-5.1-codex-max","gpt-5.1-codex","gpt-5.1-codex-mini","gpt-5-codex","gpt-5.2","gpt-5.1","gpt-5"],gemini:["gemini-3.1-pro-preview","gemini-3.1-flash-preview","gemini-3-pro-preview","gemini-3-flash-preview","gemini-2.5-pro","gemini-2.5-flash","gemini-2.5-flash-lite"],opencode:[],omp:[]},Ag=Object.freeze(Object.keys(Rg));function Fg(e=[]){const o=new Set,t=[];return e.forEach(e=>{if("string"!=typeof e)return;const n=e.trim();if(!n)return;const r=n.toLowerCase();o.has(r)||(o.add(r),t.push(n))}),t}function $g(e){const o=String(e||"").trim().toLowerCase();return o.startsWith("claude-")?"claude":o.startsWith("gemini-")?"gemini":o.startsWith("gpt-")||o.startsWith("o1")||o.startsWith("o3")||o.startsWith("o4")?"codex":""}function Og(){return Object.fromEntries(Ag.map(e=>[e,[...Rg[e]||[]]]))}var Bg=null;async function Eg(e={}){const o=!0===e.forceRefresh;return!o&&Ig.value&&zg.value?Ig.value:Bg||(Mg.value=!0,Bg=(async()=>{try{const t=new URLSearchParams;o&&t.set("forceRefresh","true");const n=t.toString(),r=n?`/api/config/default-models?${n}`:"/api/config/default-models",a=await fetch(r);if(!a.ok)throw new Error(`HTTP ${a.status}: ${a.statusText}`);const l=await a.json();Ig.value=l.defaultModels;try{const e=await fetch("/api/settings/model-settings");if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);const o=await e.json(),t=function(e,o={}){const t=Object.values(e||{}).flatMap(e=>Array.isArray(e?.toolTypes)?e.toolTypes:[]),n=[...new Set([...Ag,...Object.keys(o||{}),...t])],r=Object.fromEntries(n.map(e=>[e,[]]));if(Object.keys(o||{}).length>0){for(const e of n)r[e]=Fg(o[e]||[]);return r}for(const[a,l]of Object.entries(e||{})){if(!l||"object"!=typeof l||!l.limit||!l.pricing)continue;const e=Array.isArray(l.toolTypes)?l.toolTypes:[$g(a)];for(const o of e)r[o]&&r[o].push(a)}return Object.fromEntries(n.map(e=>[e,Fg(r[e])]))}(o.models||{},o.toolModels||{});zg.value=Object.fromEntries(Object.entries(t).map(([e,o])=>[e,o.length>0?o:[...Rg[e]||[]]]))}catch(e){zg.value=Og()}}catch(t){Ig.value=Rg,zg.value=Og()}finally{Mg.value=!1,Bg=null}return Ig.value})())}function _g(e){const o=Ig.value?.[e];if(Array.isArray(o)&&o.length>0)return o;const t=zg.value?.[e];return Array.isArray(t)&&t.length>0?t:Rg[e]||[]}function Dg(e){return zg.value?.[e]||Rg[e]||[]}function Lg(){return{defaultModels:Ig,allModels:zg,loading:Mg,loadDefaultModels:Eg,getDefaultModels:_g,getAllModelsByToolType:Dg}}var Hg={class:"model-redirect-editor"},jg={class:"redirect-input"},Ug={class:"redirect-arrow"},Wg={class:"redirect-input"},Ng={__name:"ModelRedirectEditor",props:{modelValue:{type:Array,default:()=>[]},availableModels:{type:Array,default:()=>[]},channelType:{type:String,default:"claude"}},emits:["update:modelValue"],setup(e,{emit:o}){const t=e,n=o,{getDefaultModels:r,loadDefaultModels:a}=Lg();Ro(async()=>{await a()});const l=Do(()=>t.availableModels&&t.availableModels.length>0?t.availableModels:r(t.channelType).map(e=>({label:e,value:e})));function i(e){if(!e)return l.value;const o=e.toLowerCase();return l.value.filter(e=>(e.label||e.value||"").toLowerCase().includes(o))}function s(e,o,r){const a=[...t.modelValue];a[e]={...a[e],[o]:r},n("update:modelValue",a)}function c(){n("update:modelValue",[...t.modelValue,{from:"",to:""}])}return(o,r)=>(Ao(),ut("div",Hg,[(Ao(!0),ut(No,null,Co(e.modelValue,(e,o)=>(Ao(),ut("div",{key:o,class:"redirect-row"},[pt("div",jg,[Po(Qo(gc),{value:e.from,options:i(e.from),placeholder:"源模型",clearable:"","get-show":()=>!0,"onUpdate:value":e=>s(o,"from",e)},null,8,["value","options","onUpdate:value"])]),pt("div",Ug,[Po(Qo(we),{size:"16",color:"#999"},{default:Uo(()=>[Po(Qo(Ft))]),_:1})]),pt("div",Wg,[Po(Qo(gc),{value:e.to,options:i(e.to),placeholder:"目标模型",clearable:"","get-show":()=>!0,"onUpdate:value":e=>s(o,"to",e)},null,8,["value","options","onUpdate:value"])]),Po(Qo(Ne),{quaternary:"",circle:"",size:"small",onClick:e=>function(e){const o=t.modelValue.filter((o,t)=>t!==e);n("update:modelValue",o)}(o)},{icon:Uo(()=>[Po(Qo(we),null,{default:Uo(()=>[Po(Qo(Qt))]),_:1})]),_:1},8,["onClick"])]))),128)),Po(Qo(Ne),{dashed:"",size:"small",onClick:c,class:"add-btn"},{icon:Uo(()=>[Po(Qo(we),null,{default:Uo(()=>[Po(Qo(Et))]),_:1})]),default:Uo(()=>[r[0]||(r[0]=vo(" 添加重定向规则 ",-1))]),_:1})]))}},Kg=qe(Ng,[["__scopeId","data-v-8ebdcad0"]]);function Vg(e,o=""){const t=it(!1),n=it([]),r=it(""),a=it(null);return{loading:t,candidates:n,warning:r,quota:a,sync:async function(){t.value=!0,r.value="";try{const t=await async function(e,o=""){return(await bt.post(`${dm(e)}/auth/sync-local`,o?{channelId:o}:{})).data}(Qo(e),Qo(o));return n.value=t.candidates||[],r.value=(t.warnings||[]).join(" "),t}catch(a){throw r.value=a?.response?.data?.error||a.message||"同步本地 OAuth 失败",a}finally{t.value=!1}},refreshQuota:async function(t=!0){const n=Qo(o);if(!n)return null;const l=await async function(e,o,t=!1){const n=t?"?refresh=true":"";return(await bt.get(`${dm(e)}/${encodeURIComponent(o)}/auth/quota${n}`)).data}(Qo(e),n,t);return a.value=l.quota||null,l.warning&&(r.value=l.warning),l}}}var qg={class:"channel-auth-section"},Gg={class:"oauth-content"},Yg={key:2,class:"oauth-meta"},Jg={key:3,class:"oauth-quota"},Xg={__name:"ChannelAuthSection",props:{platform:String,channelId:String,formData:Object,authMeta:Object},emits:["update-auth"],setup(e,{emit:o}){const t=e,n=o;function r(e){const o=e.authRef||e;return`${o.credentialId||o.providerId}:${o.accountId||o.identityKey||o.accountEmail||"account"}`}const a=Do(()=>r({authRef:t.formData.authRef})),{loading:l,candidates:i,warning:s,quota:c,sync:d,refreshQuota:u}=Vg(jo(t,"platform"),jo(t,"channelId")),p=Do(()=>Array.isArray(c.value?.windows)&&c.value.windows.length?c.value.windows:[c.value?.primary,c.value?.secondary]);function h(e){const o=i.value.find(o=>r(o)===e);o&&n("update-auth",o)}return(o,t)=>(Ao(),ut("div",qg,[pt("div",Gg,[Po(Qo(Ne),{size:"small",type:"primary",loading:Qo(l),onClick:Qo(d)},{default:Uo(()=>[...t[0]||(t[0]=[vo("同步本地 OAuth",-1)])]),_:1},8,["loading","onClick"]),Qo(s)?(Ao(),zo(Qo(Ys),{key:0,type:"warning","show-icon":!1},{default:Uo(()=>[vo(Bo(Qo(s)),1)]),_:1})):fo("",!0),Qo(i).length?(Ao(),zo(Qo(Ld),{key:1,value:a.value,"onUpdate:value":h},{default:Uo(()=>[Po(Qo(mp),{vertical:""},{default:Uo(()=>[(Ao(!0),ut(No,null,Co(Qo(i),o=>(Ao(),zo(Qo(_d),{key:o.id,value:r(o)},{default:Uo(()=>[vo(Bo(o.providerId||e.platform)+" / "+Bo(o.accountEmail||o.accountId||o.authRef?.identityKey||"本地账户"),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"])):fo("",!0),e.authMeta?.channel?(Ao(),ut("div",Yg,Bo(e.authMeta.channel.authRef?.providerId||e.platform)+" · "+Bo(e.authMeta.channel.authRef?.accountEmail||e.authMeta.channel.authRef?.accountId||"已同步"),1)):fo("",!0),Qo(c)?(Ao(),ut("div",Jg,[(Ao(!0),ut(No,null,Co(p.value,e=>(Ao(),ut("span",{key:e?.id||e?.label||"missing-window"},Bo(e?.label||"—")+": "+Bo(e?`${e.remainingPercent}%`:"—"),1))),128)),Po(Qo(Ne),{text:"",size:"tiny",onClick:Qo(u)},{default:Uo(()=>[...t[1]||(t[1]=[vo("刷新额度",-1)])]),_:1},8,["onClick"])])):fo("",!0)])]))}},Zg=qe(Xg,[["__scopeId","data-v-8fcf77d4"]]),Qg=[{id:"official",name:"Claude 官方",category:"official",websiteUrl:"https://www.anthropic.com",baseUrl:"https://api.anthropic.com",env:{}},{id:"claude_oauth",name:"Claude OAuth",category:"oauth",description:"使用本地 Claude 登录凭据",websiteUrl:"",baseUrl:"",authMode:"oauth",oauthProviderId:"claude",env:{}},{id:"openai",name:"OpenAI",category:"third_party",websiteUrl:"https://platform.openai.com",baseUrl:"https://api.openai.com/v1",gatewaySourceType:"openai_compatible",targetApi:"responses",env:{}},{id:"deepseek",name:"DeepSeek",category:"cn_official",websiteUrl:"https://platform.deepseek.com",baseUrl:"https://api.deepseek.com/anthropic",env:{ANTHROPIC_MODEL:"DeepSeek-V3.2-Exp",ANTHROPIC_DEFAULT_HAIKU_MODEL:"DeepSeek-V3.2-Exp",ANTHROPIC_DEFAULT_SONNET_MODEL:"DeepSeek-V3.2-Exp",ANTHROPIC_DEFAULT_OPUS_MODEL:"DeepSeek-V3.2-Exp"}},{id:"zhipu",name:"智谱 GLM",category:"cn_official",websiteUrl:"https://open.bigmodel.cn",baseUrl:"https://open.bigmodel.cn/api/anthropic",env:{ANTHROPIC_MODEL:"glm-4.6",ANTHROPIC_DEFAULT_HAIKU_MODEL:"glm-4.5-air",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-4.6",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-4.6"}},{id:"kimi",name:"Kimi K2",category:"cn_official",websiteUrl:"https://platform.moonshot.cn",baseUrl:"https://api.moonshot.cn/anthropic",env:{ANTHROPIC_MODEL:"kimi-k2-thinking",ANTHROPIC_DEFAULT_HAIKU_MODEL:"kimi-k2-thinking",ANTHROPIC_DEFAULT_SONNET_MODEL:"kimi-k2-thinking",ANTHROPIC_DEFAULT_OPUS_MODEL:"kimi-k2-thinking"}},{id:"minimax",name:"MiniMax",category:"cn_official",websiteUrl:"https://platform.minimaxi.com",baseUrl:"https://api.minimaxi.com/anthropic",env:{ANTHROPIC_MODEL:"MiniMax-M2",ANTHROPIC_DEFAULT_HAIKU_MODEL:"MiniMax-M2",ANTHROPIC_DEFAULT_SONNET_MODEL:"MiniMax-M2",ANTHROPIC_DEFAULT_OPUS_MODEL:"MiniMax-M2"}},{id:"qwen",name:"通义千问",category:"cn_official",websiteUrl:"https://bailian.console.aliyun.com",baseUrl:"https://dashscope.aliyuncs.com/api/v2/apps/claude-code-proxy",env:{ANTHROPIC_MODEL:"qwen3-max",ANTHROPIC_DEFAULT_HAIKU_MODEL:"qwen3-max",ANTHROPIC_DEFAULT_SONNET_MODEL:"qwen3-max",ANTHROPIC_DEFAULT_OPUS_MODEL:"qwen3-max"}},{id:"doubao",name:"豆包 Seed",category:"cn_official",websiteUrl:"https://www.volcengine.com/product/doubao",baseUrl:"https://ark.cn-beijing.volces.com/api/coding",env:{ANTHROPIC_MODEL:"doubao-seed-code-preview-latest",ANTHROPIC_DEFAULT_HAIKU_MODEL:"doubao-seed-code-preview-latest",ANTHROPIC_DEFAULT_SONNET_MODEL:"doubao-seed-code-preview-latest",ANTHROPIC_DEFAULT_OPUS_MODEL:"doubao-seed-code-preview-latest"}},{id:"custom",name:"自定义",category:"custom",websiteUrl:"",baseUrl:"",env:{}}],eb={official:"官方",cn_official:"国内官方",aggregator:"聚合服务",third_party:"第三方",oauth:"OAuth",custom:"自定义"};function ob(e){return Qg.find(o=>o.id===e)}var tb=[{id:"openai",name:"OpenAI",category:"official",websiteUrl:"https://platform.openai.com",baseUrl:"https://api.openai.com/v1",providerKey:"openai-official"},{id:"codex_oauth",name:"Codex OAuth",category:"oauth",description:"使用本地 Codex 登录凭据",websiteUrl:"",baseUrl:"",providerKey:"codex-oauth",authMode:"oauth",oauthProviderId:"codex"},{id:"custom",name:"自定义",category:"custom",websiteUrl:"",baseUrl:"",providerKey:""}],nb={official:"官方",oauth:"OAuth",custom:"自定义"};function rb(e){return tb.find(o=>o.id===e)}var ab=[{id:"google",name:"Google AI",category:"official",websiteUrl:"https://ai.google.dev",baseUrl:"https://generativelanguage.googleapis.com/v1beta",apiFormat:"gemini_api"},{id:"gemini_oauth",name:"Gemini OAuth",category:"oauth",description:"使用本地 Gemini 登录凭据",websiteUrl:"",baseUrl:"",model:"gemini-2.5-pro",authMode:"oauth",oauthProviderId:"gemini"},{id:"vertex_ai_v1",name:"Vertex AI v1",category:"official",websiteUrl:"https://cloud.google.com/vertex-ai/generative-ai/docs",baseUrl:"https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/publishers/google",apiFormat:"vertex_ai_v1"},{id:"custom",name:"自定义",category:"custom",websiteUrl:"",baseUrl:"",apiFormat:"gemini_api"}],lb={official:"官方",oauth:"OAuth",custom:"自定义"};function ib(e){return ab.find(o=>o.id===e)}var sb=[{id:"openrouter",name:"OpenRouter",category:"apikey",description:"统一接口访问 200+ 模型",websiteUrl:"https://openrouter.ai",baseUrl:"https://openrouter.ai/api/v1",wireApi:"openai",models:["anthropic/claude-3.5-sonnet","openai/gpt-4o","meta-llama/llama-3.1-405b"]},{id:"openai_api",name:"OpenAI API",category:"apikey",description:"OpenAI 官方 API(需要 API Key)",websiteUrl:"https://platform.openai.com",baseUrl:"https://api.openai.com/v1",wireApi:"openai",models:["gpt-4o","gpt-4o-mini","o1","o1-mini","gpt-4-turbo"]},{id:"anthropic_api",name:"Anthropic API",category:"apikey",description:"Anthropic 官方 API(需要 API Key)",websiteUrl:"https://console.anthropic.com",baseUrl:"https://api.anthropic.com/v1",wireApi:"anthropic",models:["claude-3-5-sonnet","claude-3-opus","claude-3-haiku"]},{id:"deepseek",name:"DeepSeek",category:"apikey",description:"DeepSeek AI 模型",websiteUrl:"https://platform.deepseek.com",baseUrl:"https://api.deepseek.com/v1",wireApi:"openai",models:["deepseek-chat","deepseek-coder"]},{id:"groq",name:"Groq",category:"apikey",description:"超快推理速度",websiteUrl:"https://console.groq.com",baseUrl:"https://api.groq.com/openai/v1",wireApi:"openai",models:["llama-3.1-70b-versatile","llama-3.1-8b-instant","mixtral-8x7b-32768"]},{id:"together",name:"Together AI",category:"apikey",description:"开源模型托管",websiteUrl:"https://www.together.ai",baseUrl:"https://api.together.xyz/v1",wireApi:"openai",models:["meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo","mistralai/Mixtral-8x7B-Instruct-v0.1"]},{id:"entry_claude",name:"Claude Code 入口",category:"entry",description:"渠道按 Claude Code 请求入口管理",websiteUrl:"",baseUrl:"",wireApi:"openai",gatewaySourceType:"claude",providerApi:"anthropic-messages",models:[]},{id:"entry_codex",name:"Codex 入口",category:"entry",description:"渠道按 Codex 请求入口管理",websiteUrl:"",baseUrl:"",wireApi:"openai",providerApi:"responses",gatewaySourceType:"codex",models:[]},{id:"entry_gemini",name:"Gemini 入口",category:"entry",description:"渠道按 Gemini 请求入口管理",websiteUrl:"",baseUrl:"",wireApi:"openai",gatewaySourceType:"gemini",providerApi:"google-generative-ai",models:[]},{id:"entry_responses",name:"Responses 入口",category:"entry",description:"渠道按 OpenAI Responses 请求入口管理(非 Codex)",websiteUrl:"",baseUrl:"",wireApi:"openai",providerApi:"responses",gatewaySourceType:"openai_compatible",models:[]},{id:"custom",name:"自定义",category:"custom",description:"自定义 OpenAI 兼容的 API 端点",websiteUrl:"",baseUrl:"",wireApi:"openai",models:[]}],cb={apikey:"API Key",entry:"转换入口",custom:"自定义"};function db(e){return sb.find(o=>o.id===e)}var ub=[...sb,{id:"omp_oauth",name:"OMP OAuth",category:"oauth",description:"使用本地 OMP broker OAuth 登录凭据",websiteUrl:"",baseUrl:"",providerKey:"omp-oauth",authMode:"oauth",oauthProviderId:""},{id:"omp_oauth_gateway",name:"OMP OAuth Auth Gateway",category:"oauth",description:"通过健康的 pi-native Auth Gateway 转发 OMP broker OAuth 登录态",websiteUrl:"",baseUrl:"",wireApi:"openai",providerApi:"openai-completions",gatewaySourceType:"openai_compatible",transport:"pi-native",authMode:"oauth",oauthProviderId:"",models:[]}],pb={apikey:"API Key",entry:"转换入口",oauth:"OAuth",custom:"自定义"};function hb(e){return ub.find(o=>o.id===e)}var{getAllModelsByToolType:fb,loadDefaultModels:vb}=Lg(),mb=/^https?:\/\//i,gb=/^[a-z0-9_-]+$/i,bb=new Set(["anyrouter","newcli"]);function yb(e){return Array.isArray(e)?e:e?.channels||[]}function xb(e){return yb(e).map(e=>{const o=e?.extra;if(!o||"object"!=typeof o||Array.isArray(o))return e;const t={...e};return["model","allowedModels","speedTestModel","presetId","models","modelMetadataMode","modelBindings","modelRedirects"].forEach(e=>{void 0!==t[e]&&null!==t[e]||void 0===o[e]||(t[e]=o[e])}),t})}function Cb(e){const o=Number(e);return!Number.isFinite(o)||o<=0?null:Math.round(o)}function wb(e){const o=Number(e);return!Number.isFinite(o)||o<1?1:Math.min(100,Math.round(o))}function Sb(e,o,{required:t}={}){if(!o)return t?`${e}不能为空`:"";if(!mb.test(o))return`${e}必须以 http:// 或 https:// 开头`;try{new URL(o)}catch(n){return`${e}不是合法的链接`}return""}function kb(e){const o=String(e||"").trim();return o?gb.test(o)?"openai"===o.toLowerCase()?"Provider Key 不能使用保留值 openai,请改成 openai-official 之类的自定义标识":"":"只能包含字母、数字、下划线和中划线,例如 openai-official":"Provider Key 不能为空"}function Pb(e,o){try{return JSON.stringify(e??o,null,2)}catch{return JSON.stringify(o,null,2)}}function Tb(e,o,t){const n=String(e||"").trim();if(!n)return t;try{return JSON.parse(n)}catch(r){throw new Error(`${o}不是合法 JSON:${r.message}`)}}function Ib(e){const o=Tb(e,"模型定义",[]);if(!Array.isArray(o))throw new Error("模型定义必须是 JSON 数组");return o}function zb(e){try{const o=Ib(e),t=new Set;for(const e of o){if(!e||"object"!=typeof e||Array.isArray(e))return"每个模型定义必须是对象";const o=String(e.id||"").trim();if(!o)return"每个模型定义都必须包含 id";const n=o.toLowerCase();if(t.has(n))return`模型 ID 重复:${o}`;t.add(n)}}catch(o){return o.message}return""}function Mb(e){const o=Tb(e,"Provider 高级配置",{});if(!o||"object"!=typeof o||Array.isArray(o))throw new Error("Provider 高级配置必须是 JSON 对象");return o}function Rb(e){const o=!0!==e._showChannelBalance||Lb(e),t=["api_key","oauth","none"].includes(e.authMode)?e.authMode:"api_key",n="oauth"===t?Object.fromEntries(["credentialId","providerId","accountId","identityKey","accountEmail"].map(o=>[o,String(e.authRef?.[o]||"").trim()])):void 0;return{apiKey:"oauth"===t||"none"===t?"":e.apiKey||"",authMode:t,...n?{authRef:n,authSource:"synced-local",authStatus:e.authStatus||"available"}:{},oauthProviderId:"oauth"===t&&(e.oauthProviderId||e.providerKey)||"",balanceToken:o&&e.balanceToken||"",balanceUserId:o&&e.balanceUserId||null}}function Ab(e){const o=Rb(e);return"oauth"!==o.authMode?o:Eb(e)?{...o,apiKey:String(e.apiKey||"").trim(),transport:"pi-native"}:{...o,transport:""}}function Fb(e){return{authMode:e.authMode,...e.authRef?{authRef:e.authRef,authSource:e.authSource,authStatus:e.authStatus}:{},...e.oauthProviderId?{oauthProviderId:e.oauthProviderId}:{},...Object.prototype.hasOwnProperty.call(e,"transport")?{transport:e.transport}:{}}}function $b(e={}){return"oauth"===e.authMode}function Ob(e){return!$b(e)}function Bb(){return{key:"authMode",label:"本地登录",type:"channel-auth",showWhen:$b}}function Eb(e={}){return $b(e)&&!0===e.oauthGatewayMode}function _b(e={}){return!$b(e)||Eb(e)}function Db(e={}){return!$b(e)}function Lb(e={}){return!0===e._showChannelBalance&&bb.has(function(e={}){const o=[e.presetId,e.providerKey,e.name,e.websiteUrl,e.baseUrl].map(e=>String(e||"").trim().toLowerCase()).join(" ");return o.includes("anyrouter")?"anyrouter":o.includes("code.newcli.com")||o.includes("newcli")||o.includes("new-cli")?"newcli":null}(e))}function Hb(e="余额凭据"){return{key:"balanceToken",label:e,type:"password",showWhen:e=>Ob(e)&&Lb(e),placeholder:"选填:余额接口需要的会话 Token / Cookie(NewCLI 可填完整 Cookie)"}}function jb(){return{key:"balanceUserId",label:"余额用户 ID",type:"number",min:1,clearable:!0,showWhen:e=>Ob(e)&&Lb(e),placeholder:"选填:New API / AnyRouter 需要 New-Api-User 时填写"}}function Ub(e={}){const o=Array.isArray(e.allowedModels)?e.allowedModels.map(e=>String(e||"").trim()).filter(Boolean):[];return 0===o.length?"(默认/测速模型)":o.length<=3?o.join(", "):`${o.slice(0,3).join(", ")} +${o.length-3}`}function Wb(e){const o=String(e||"").trim().toLowerCase();return"claude"===o?"Claude Code":"gemini"===o?"Gemini":"Codex"}function Nb(e,o){return"oauth"===o?.authMode?{...e,authMode:"oauth",baseUrl:"",apiKey:"",websiteUrl:"",oauthProviderId:o.oauthProviderId||e.providerKey||""}:{...e,authMode:"api_key",authRef:void 0,authSource:void 0,authStatus:void 0,oauthProviderId:""}}function Kb(e=[]){return e.map(e=>({label:e,value:e}))}function Vb(...e){const o=new Set,t=[];for(const n of e)for(const e of n||[]){const n=String(e?.value||"").trim();if(!n)continue;const r=n.toLowerCase();o.has(r)||(o.add(r),t.push({label:e?.label||n,value:n}))}return t}function qb(e){return Kb(fb(e))}function Gb(e,o={}){if("omp"===e)return qb("omp");if("opencode"===e){const e=["claude","codex","gemini"].includes(o.gatewaySourceType)?o.gatewaySourceType:"";return Vb(qb("opencode"),e?qb(e):[])}return qb(e)}var Yb={schedule:[{key:"maxConcurrency",label:"最大并发",type:"number",placeholder:"留空表示不限",clearable:!0,validate:e=>{if(null==e||""===e)return"";const o=Number(e);return!Number.isFinite(o)||o<=0?"并发需为大于 0 的数字":o>100?"并发最多 100":""}},{key:"weight",label:"调度权重",type:"number",placeholder:"默认 1",min:1,max:100,validate:e=>{const o=Number(e);return!Number.isFinite(o)||o<1?"调度权重至少为 1":""}},{key:"enabled",label:"渠道状态",type:"switch",checkedText:"启用",uncheckedText:"停用"}]},Jb={claude:()=>({type:"claude",displayName:"Claude",schedulerSource:"claude",storageKeys:{localCollapse:"claudeChannelCollapse",collapseConfigKey:"claude",orderConfigKey:"claude"},emptyDescription:"暂无渠道",showEmptyAction:!1,emptyActionText:"",modalWidth:520,formLabelWidth:95,showApplyButton:!0,presets:Qg,presetCategories:eb,getPresetById:ob,formSections:[{title:"供应商预设",fields:[{key:"presetId",label:"选择预设",type:"preset",placeholder:"选择供应商预设"}]},{title:"基本信息",fields:[Bb(),{key:"name",label:"渠道名称",type:"text",required:!0,placeholder:"输入渠道名称"},{key:"baseUrl",showWhen:Ob,label:"接口地址",type:"text",required:!0,placeholder:"https://api.example.com",validate:e=>Sb("接口地址",e,{required:!0})},{key:"apiKey",showWhen:Ob,label:"接口密钥",type:"password",required:!0,placeholder:"sk-..."},Hb(),jb(),{key:"websiteUrl",showWhen:Ob,label:"官网链接",type:"text",placeholder:"https://(选填)",validate:e=>Sb("官网链接",e,{required:!1})},{key:"speedTestModel",showWhen:Ob,label:"测速模型",type:"select",placeholder:"选择用于测速的模型(留空则自动检测)",description:"指定用于速度测试的模型,留空则使用自动检测",options:qb("claude"),clearable:!0}]},{title:"模型重定向",description:"仅在代理开启时生效,将请求的模型重定向到指定模型",collapsible:!0,showWhen:e=>"official"===e.presetId||"openai_compatible"===e.gatewaySourceType,fields:[{key:"modelRedirects",type:"model-redirect",fullWidth:!0}]},{title:"OpenAI 网关",description:"OpenAI 格式渠道需要通过 Claude 代理使用;优先选择 Responses API,不兼容时再切到 Chat Completions",showWhen:e=>"openai_compatible"===e.gatewaySourceType,fields:[{key:"targetApi",label:"上游接口",type:"radio-group",options:[{label:"Responses API",value:"responses"},{label:"Chat Completions",value:"chat.completions"}]}]},{title:"模型配置",description:"代理关闭时:模型映射(写入 settings.json);代理开启时:模型重定向(如 opus → sonnet 节省 token)",collapsible:!0,showWhen:e=>!$b(e)&&e.presetId&&"official"!==e.presetId,fields:[{key:"modelConfig.model",label:"主模型",type:"autocomplete",placeholder:"如 glm-4.6"},{key:"modelConfig.haikuModel",label:"Haiku 模型",type:"autocomplete",placeholder:"如 glm-4.5-air"},{key:"modelConfig.sonnetModel",label:"Sonnet 模型",type:"autocomplete",placeholder:"如 glm-4.6"},{key:"modelConfig.opusModel",label:"Opus 模型",type:"autocomplete",placeholder:"如 glm-4.6"}]},{title:"调度配置",fields:Yb.schedule},{title:"网络代理",description:"部分渠道可能需要代理才能访问",collapsible:!0,fields:[{key:"proxyUrl",label:"代理地址",type:"text",placeholder:"http://127.0.0.1:7890(选填)"}]}],getInitialForm:()=>({presetId:"official",name:"Claude 官方",baseUrl:"https://api.anthropic.com",apiKey:"",balanceToken:"",balanceUserId:null,websiteUrl:"https://www.anthropic.com",speedTestModel:"",modelConfig:{model:"",haikuModel:"",sonnetModel:"",opusModel:""},modelRedirects:[],proxyUrl:"",gatewaySourceType:"claude",targetApi:"responses",maxConcurrency:null,weight:1,enabled:!0,availableModels:[],modelsFetching:!1,modelsFetchError:null}),mapChannelToForm:e=>({presetId:e.presetId||"official",name:e.name||"",baseUrl:e.baseUrl||"",apiKey:e.apiKey||"",balanceToken:e.balanceToken||"",balanceUserId:e.balanceUserId??null,websiteUrl:e.websiteUrl||"",speedTestModel:e.speedTestModel||"",modelConfig:{model:e.modelConfig?.model||"",haikuModel:e.modelConfig?.haikuModel||"",sonnetModel:e.modelConfig?.sonnetModel||"",opusModel:e.modelConfig?.opusModel||""},modelRedirects:e.modelRedirects||[],proxyUrl:e.proxyUrl||"",gatewaySourceType:e.gatewaySourceType||"claude",targetApi:e.targetApi||"responses",maxConcurrency:e.maxConcurrency??null,weight:e.weight||1,enabled:!1!==e.enabled,availableModels:[],modelsFetching:!1,modelsFetchError:null}),onPresetChange:(e,o)=>{const t=ob(e);if(!t)return o;const n={...o,presetId:e};return n.name=t.name,n.baseUrl=t.baseUrl,n.websiteUrl=t.websiteUrl||"",n.gatewaySourceType=t.gatewaySourceType||n.gatewaySourceType||"claude",n.targetApi=t.targetApi||n.targetApi||"responses",t.env&&(n.modelConfig={model:t.env.ANTHROPIC_MODEL||"",haikuModel:t.env.ANTHROPIC_DEFAULT_HAIKU_MODEL||"",sonnetModel:t.env.ANTHROPIC_DEFAULT_SONNET_MODEL||"",opusModel:t.env.ANTHROPIC_DEFAULT_OPUS_MODEL||""}),Nb(n,t)},fetchModelsForChannel:async(e,o)=>{await vb();const t=qb((n=o.gatewaySourceType,"openai_compatible"===String(n||"").trim().toLowerCase()?"codex":"claude"));var n;if(o.modelsFetching=!0,o.modelsFetchError=null,o.modelsFetchErrorHint=null,!e)return o.availableModels=t,void(o.modelsFetching=!1);try{const n=await async function(e,o="claude"){const t=o?{params:{type:o}}:void 0;return(await bt.get(`/channels/${e}/models`,t)).data}(e,o.gatewaySourceType||null);n.models&&n.models.length>0?(o.availableModels=Vb(Kb(n.models),t),n.fallbackUsed&&(o.modelsFetchError=n.error||"无法自动获取模型列表(API 端点受保护)",o.modelsFetchErrorHint=n.errorHint||"已使用默认模型列表,您也可以手动输入模型名称")):!n.fallbackUsed&&n.supported||(o.availableModels=t,o.modelsFetchError=n.error||"该供应商不支持模型列表接口",o.modelsFetchErrorHint=n.errorHint||"已使用默认模型列表")}catch(r){o.availableModels=t;const e=r.response?.data;e?(o.modelsFetchError=e.error||r.message||"获取模型列表失败",o.modelsFetchErrorHint=e.errorHint||"已使用默认模型列表"):(o.modelsFetchError=r.message||"获取模型列表失败",o.modelsFetchErrorHint="已使用默认模型列表")}finally{o.modelsFetching=!1}},testFn:wm,api:{fetch:async()=>yb(await async function(){return(await bt.get("/channels")).data}()),syncCurrent:hm,create:async e=>{const o=Rb(e);return await async function(e,o,t,n,r={}){const a={name:e,baseUrl:o,apiKey:t,websiteUrl:n,...r};return(await bt.post("/channels",a)).data}(e.name,e.baseUrl,o.apiKey,e.websiteUrl||void 0,{maxConcurrency:Cb(e.maxConcurrency),weight:wb(e.weight),enabled:e.enabled,presetId:e.presetId,modelConfig:e.modelConfig,modelRedirects:e.modelRedirects||[],proxyUrl:e.proxyUrl||"",speedTestModel:e.speedTestModel||null,gatewaySourceType:e.gatewaySourceType||"claude",targetApi:e.targetApi||"responses",...Fb(o),balanceToken:o.balanceToken,balanceUserId:o.balanceUserId})},update:async(e,o)=>{const t=Rb(o);return await fm(e.id,{name:o.name,baseUrl:o.baseUrl,apiKey:t.apiKey,websiteUrl:o.websiteUrl,maxConcurrency:Cb(o.maxConcurrency),weight:wb(o.weight),enabled:o.enabled,presetId:o.presetId,modelConfig:o.modelConfig,modelRedirects:o.modelRedirects||[],proxyUrl:o.proxyUrl||"",speedTestModel:o.speedTestModel||null,gatewaySourceType:o.gatewaySourceType||"claude",targetApi:o.targetApi||"responses",...Fb(t),balanceToken:t.balanceToken,balanceUserId:t.balanceUserId})},toggle:(e,o)=>fm(e.id,{enabled:o}),remove:vm,applyToSettings:async e=>async function(e){return(await bt.post(`/channels/${e}/apply-to-settings`)).data}(e.id),resetHealth:async e=>async function(e){return(await bt.post(`/channels/${e}/reset-health`)).data}(e.id)},getHeaderTags:(e,o)=>{const t=[];return"frozen"===e.health?.status?t.push({text:o.formatFreeze(e.health.freezeRemaining),type:"error"}):"checking"===e.health?.status&&t.push({text:"检测中",type:"warning"}),t},buildInfoRows:(e,o)=>[{label:"URL",value:e.baseUrl},{label:"Key",value:o.maskApiKey(e.apiKey),mono:!0,action:"healthy"!==e.health?.status?()=>o.handleResetHealth(e):null,actionLabel:"重置状态"}]}),codex:()=>({type:"codex",displayName:"Codex",schedulerSource:"codex",storageKeys:{localCollapse:"codexChannelCollapse",collapseConfigKey:"codex",orderConfigKey:"codex"},emptyDescription:"暂无渠道",showEmptyAction:!0,emptyActionText:"添加 Codex 渠道",modalWidth:600,formLabelWidth:90,showApplyButton:!0,presets:tb,presetCategories:nb,getPresetById:rb,formSections:[{title:"供应商预设",fields:[{key:"presetId",label:"选择预设",type:"preset",placeholder:"选择供应商预设"}]},{title:"基本信息",fields:[Bb(),{key:"name",label:"渠道名称",type:"text",required:!0,placeholder:"显示名称"},{key:"providerKey",showWhen:Ob,label:"Provider Key",type:"text",required:!0,placeholder:"英文标识,如 openai-official",disabledOnEdit:!0,validate:kb},{key:"baseUrl",showWhen:Ob,label:"Base URL",type:"text",required:!0,placeholder:"https://api.example.com",validate:e=>Sb("Base URL",e,{required:!0})},{key:"apiKey",showWhen:Ob,label:"API Key",type:"password",required:!0,placeholder:"sk-..."},Hb(),jb(),{key:"websiteUrl",showWhen:Ob,label:"官网链接",type:"text",placeholder:"https://(选填)",validate:e=>Sb("官网链接",e,{required:!1})},{key:"speedTestModel",showWhen:Ob,label:"测速模型",type:"select",placeholder:"选择用于测速的模型(留空则使用默认)",description:"指定用于速度测试的模型,留空则使用默认模型",options:qb("codex"),clearable:!0}]},{title:"模型重定向",description:"仅在代理开启时生效,将请求的模型重定向到指定模型",collapsible:!0,fields:[{key:"modelRedirects",type:"model-redirect",fullWidth:!0}]},{title:"调度配置",fields:Yb.schedule}],getInitialForm:()=>({presetId:"openai",name:"OpenAI",providerKey:"openai-official",baseUrl:"https://api.openai.com/v1",apiKey:"",balanceToken:"",balanceUserId:null,websiteUrl:"https://platform.openai.com",gatewaySourceType:"codex",speedTestModel:"",modelRedirects:[],maxConcurrency:null,weight:1,enabled:!0,availableModels:[],modelsFetching:!1,modelsFetchError:null,modelsFetchErrorHint:null}),mapChannelToForm:e=>({presetId:e.presetId||"custom",name:e.name||"",providerKey:e.providerKey||"",baseUrl:e.baseUrl||"",apiKey:e.apiKey||"",balanceToken:e.balanceToken||"",balanceUserId:e.balanceUserId??null,websiteUrl:e.websiteUrl||"",gatewaySourceType:e.gatewaySourceType||"codex",speedTestModel:e.speedTestModel||"",modelRedirects:e.modelRedirects||[],maxConcurrency:e.maxConcurrency??null,weight:e.weight||1,enabled:!1!==e.enabled,availableModels:[],modelsFetching:!1,modelsFetchError:null,modelsFetchErrorHint:null}),onPresetChange:(e,o)=>{const t=rb(e);if(!t)return o;const n={...o,presetId:e};return n.name=t.name,n.websiteUrl=t.websiteUrl||"",n.providerKey=t.providerKey||"",n.baseUrl=t.baseUrl,n.gatewaySourceType=t.gatewaySourceType||n.gatewaySourceType||"codex",Nb(n,t)},fetchModelsForChannel:async(e,o)=>{if(await vb(),o.modelsFetching=!0,o.modelsFetchError=null,o.modelsFetchErrorHint=null,!e)return o.availableModels=qb("codex"),void(o.modelsFetching=!1);try{const t=await async function(e){return(await bt.get(`/codex/channels/${e}/models`)).data}(e);t.models&&t.models.length>0?(o.availableModels=Vb(Kb(t.models),qb("codex")),t.fallbackUsed&&(o.modelsFetchError=t.error||"无法自动获取模型列表",o.modelsFetchErrorHint=t.errorHint||"已使用默认模型列表,您也可以手动输入模型名称")):!t.fallbackUsed&&t.supported||(o.availableModels=qb("codex"),o.modelsFetchError=t.error||"该供应商不支持模型列表接口",o.modelsFetchErrorHint=t.errorHint||"已使用默认模型列表")}catch(t){o.availableModels=qb("codex"),o.modelsFetchError=t.message||"获取模型列表失败",o.modelsFetchErrorHint="已使用默认模型列表"}finally{o.modelsFetching=!1}},testFn:km,api:{fetch:async()=>yb(await async function(){return(await bt.get("/codex/channels")).data}()),syncCurrent:mm,create:async e=>{const o=Rb(e);return await async function(e,o,t,n,r,a={}){return(await bt.post("/codex/channels",{name:e,providerKey:o,baseUrl:t,apiKey:n,websiteUrl:r,...a})).data}(e.name,e.providerKey,e.baseUrl,o.apiKey,e.websiteUrl||"",{maxConcurrency:Cb(e.maxConcurrency),weight:wb(e.weight),enabled:e.enabled,modelRedirects:e.modelRedirects||[],speedTestModel:e.speedTestModel||null,presetId:e.presetId||null,gatewaySourceType:e.gatewaySourceType||"codex",...Fb(o),balanceToken:o.balanceToken,balanceUserId:o.balanceUserId})},update:async(e,o)=>{const t=Rb(o);return await gm(e.id,{name:o.name,baseUrl:o.baseUrl,apiKey:t.apiKey,websiteUrl:o.websiteUrl,maxConcurrency:Cb(o.maxConcurrency),weight:wb(o.weight),enabled:o.enabled,modelRedirects:o.modelRedirects||[],speedTestModel:o.speedTestModel||null,presetId:o.presetId||null,gatewaySourceType:o.gatewaySourceType||"codex",...Fb(t),balanceToken:t.balanceToken,balanceUserId:t.balanceUserId})},toggle:async(e,o)=>gm(e.id,{enabled:o}),remove:bm,applyToSettings:async e=>async function(e){return(await bt.post(`/codex/channels/${e}/apply-to-settings`)).data}(e.id),resetHealth:async e=>async function(e){return(await bt.post(`/codex/channels/${e}/reset-health`)).data}(e.id)},getHeaderTags:(e,o)=>{const t=[];return"frozen"===e.health?.status?t.push({text:o.formatFreeze(e.health.freezeRemaining),type:"error"}):"checking"===e.health?.status&&t.push({text:"检测中",type:"warning"}),t},buildInfoRows:(e,o)=>[{label:"Provider",value:e.providerKey,mono:!0},{label:"URL",value:e.baseUrl},{label:"Key",value:o.maskApiKey(e.apiKey),mono:!0,action:"healthy"!==e.health?.status?()=>o.handleResetHealth(e):null,actionLabel:"重置状态"}]}),gemini:()=>({type:"gemini",displayName:"Gemini",schedulerSource:"gemini",storageKeys:{localCollapse:"geminiChannelCollapse",collapseConfigKey:"gemini",orderConfigKey:"gemini"},emptyDescription:"暂无渠道",showEmptyAction:!0,emptyActionText:"添加 Gemini 渠道",modalWidth:520,formLabelWidth:90,showApplyButton:!1,presets:ab,presetCategories:lb,getPresetById:ib,formSections:[{title:"供应商预设",fields:[{key:"presetId",label:"选择预设",type:"preset",placeholder:"选择供应商预设"}]},{title:"基本信息",fields:[Bb(),{key:"name",label:"渠道名称",type:"text",required:!0,placeholder:"显示名称"},{key:"model",label:"Model",type:"text",required:!0,placeholder:"例如 gemini-2.5-pro"},{key:"baseUrl",showWhen:Ob,label:"Base URL",type:"text",required:!0,placeholder:"https://generativelanguage.googleapis.com/v1beta",validate:e=>Sb("Base URL",e,{required:!0})},{key:"apiKey",showWhen:Ob,label:"API Key",type:"password",required:!0,placeholder:"AIza..."},Hb(),jb(),{key:"websiteUrl",showWhen:Ob,label:"官网链接",type:"text",placeholder:"https://(选填)",validate:e=>Sb("官网链接",e,{required:!1})},{key:"speedTestModel",showWhen:Ob,label:"测速模型",type:"select",placeholder:"选择用于测速的模型(留空则使用 model 字段)",description:"指定用于速度测试的模型,留空则使用上方配置的 Model",options:qb("gemini"),clearable:!0}]},{title:"模型重定向",description:"仅在代理开启时生效,将请求的模型重定向到指定模型",collapsible:!0,fields:[{key:"modelRedirects",type:"model-redirect",fullWidth:!0}]},{title:"调度配置",fields:Yb.schedule}],getInitialForm:()=>({presetId:"google",name:"Google AI",model:"gemini-2.5-pro",baseUrl:"https://generativelanguage.googleapis.com/v1beta",apiKey:"",apiFormat:"gemini_api",balanceToken:"",balanceUserId:null,websiteUrl:"https://ai.google.dev",gatewaySourceType:"gemini",speedTestModel:"",modelRedirects:[],maxConcurrency:null,weight:1,enabled:!0,availableModels:[],modelsFetching:!1,modelsFetchError:null,modelsFetchErrorHint:null}),mapChannelToForm:e=>({presetId:e.presetId||"custom",name:e.name||"",model:e.model||"",baseUrl:e.baseUrl||"",apiKey:e.apiKey||"",apiFormat:e.apiFormat||"gemini_api",balanceToken:e.balanceToken||"",balanceUserId:e.balanceUserId??null,websiteUrl:e.websiteUrl||"",gatewaySourceType:e.gatewaySourceType||"gemini",speedTestModel:e.speedTestModel||"",modelRedirects:e.modelRedirects||[],maxConcurrency:e.maxConcurrency??null,weight:e.weight||1,enabled:!1!==e.enabled,availableModels:[],modelsFetching:!1,modelsFetchError:null,modelsFetchErrorHint:null}),onPresetChange:(e,o)=>{const t=ib(e);if(!t)return o;const n={...o,presetId:e};return n.name=t.name,t.model&&(n.model=t.model),n.websiteUrl=t.websiteUrl||"",n.baseUrl=t.baseUrl,n.apiFormat=t.apiFormat||"gemini_api",n.gatewaySourceType=t.gatewaySourceType||n.gatewaySourceType||"gemini",Nb(n,t)},fetchModelsForChannel:async(e,o)=>{if(await vb(),o.modelsFetching=!0,o.modelsFetchError=null,o.modelsFetchErrorHint=null,!e)return o.availableModels=qb("gemini"),void(o.modelsFetching=!1);try{const t=await async function(e){return(await bt.get(`/gemini/channels/${e}/models`)).data}(e);t.models&&t.models.length>0?(o.availableModels=Vb(Kb(t.models),qb("gemini")),t.fallbackUsed&&(o.modelsFetchError=t.error||"无法自动获取模型列表",o.modelsFetchErrorHint=t.errorHint||"已使用默认模型列表,您也可以手动输入模型名称")):!t.fallbackUsed&&t.supported||(o.availableModels=qb("gemini"),o.modelsFetchError=t.error||"该供应商不支持模型列表接口",o.modelsFetchErrorHint=t.errorHint||"已使用默认模型列表")}catch(t){o.availableModels=qb("gemini"),o.modelsFetchError=t.message||"获取模型列表失败",o.modelsFetchErrorHint="已使用默认模型列表"}finally{o.modelsFetching=!1}},testFn:Tm,api:{fetch:async()=>yb(await async function(){return(await bt.get("/gemini/channels")).data}()),syncCurrent:ym,create:async e=>{const o=Rb(e);return await async function(e,o,t,n,r,a={}){return(await bt.post("/gemini/channels",{name:e,baseUrl:o,apiKey:t,model:n,websiteUrl:r,...a})).data}(e.name,e.baseUrl,o.apiKey,e.model,e.websiteUrl||"",{maxConcurrency:Cb(e.maxConcurrency),weight:wb(e.weight),enabled:e.enabled,modelRedirects:e.modelRedirects||[],speedTestModel:e.speedTestModel||null,presetId:e.presetId||null,apiFormat:e.apiFormat||"gemini_api",gatewaySourceType:e.gatewaySourceType||"gemini",...Fb(o),balanceToken:o.balanceToken,balanceUserId:o.balanceUserId})},update:async(e,o)=>{const t=Rb(o);return await xm(e.id,{name:o.name,model:o.model,baseUrl:o.baseUrl,apiKey:t.apiKey,websiteUrl:o.websiteUrl,maxConcurrency:Cb(o.maxConcurrency),weight:wb(o.weight),enabled:o.enabled,modelRedirects:o.modelRedirects||[],speedTestModel:o.speedTestModel||null,presetId:o.presetId||null,apiFormat:o.apiFormat||"gemini_api",gatewaySourceType:o.gatewaySourceType||"gemini",...Fb(t),balanceToken:t.balanceToken,balanceUserId:t.balanceUserId})},toggle:async(e,o)=>xm(e.id,{enabled:o}),remove:Cm,resetHealth:async e=>async function(e){return(await bt.post(`/gemini/channels/${e}/reset-health`)).data}(e.id)},getHeaderTags:(e,o)=>{const t=[];return"frozen"===e.health?.status?t.push({text:o.formatFreeze(e.health.freezeRemaining),type:"error"}):"checking"===e.health?.status&&t.push({text:"检测中",type:"warning"}),t},buildInfoRows:(e,o)=>{return[{label:"Model",value:e.model,mono:!0},{label:"API",value:(t=e.apiFormat,"vertex_ai_v1"===String(t||"").trim().toLowerCase()?"Vertex AI v1":"Gemini API")},{label:"URL",value:e.baseUrl},{label:"Key",value:o.maskApiKey(e.apiKey),mono:!0,action:"healthy"!==e.health?.status?()=>o.handleResetHealth(e):null,actionLabel:"重置状态"}];var t}}),opencode:()=>({type:"opencode",displayName:"OpenCode",schedulerSource:"opencode",storageKeys:{localCollapse:"opencodeChannelCollapse",collapseConfigKey:"opencode",orderConfigKey:"opencode"},emptyDescription:"暂无渠道",showEmptyAction:!0,emptyActionText:"添加 OpenCode 渠道",modalWidth:600,formLabelWidth:95,showApplyButton:!1,presets:sb,presetCategories:cb,getPresetById:db,formSections:[{title:"供应商预设",fields:[{key:"presetId",label:"选择预设",type:"preset",placeholder:"选择供应商预设"}]},{title:"基本信息",fields:[{key:"name",label:"渠道名称",type:"text",required:!0,placeholder:"显示名称"},{key:"baseUrl",label:"Base URL",type:"text",required:!0,placeholder:"https://api.example.com/v1",validate:e=>Sb("Base URL",e,{required:!0})},{key:"apiKey",label:"API Key",type:"password",required:!0,placeholder:"sk-..."},Hb(),jb(),{key:"websiteUrl",label:"官网链接",type:"text",placeholder:"https://(选填)",validate:e=>Sb("官网链接",e,{required:!1})},{key:"model",label:"默认模型",type:"select",placeholder:"选择或输入默认模型(留空则由调度器决定)",options:[],clearable:!0},{key:"speedTestModel",label:"测速模型",type:"select",placeholder:"选择用于测速的模型(留空则使用默认模型)",description:"指定用于速度测试的模型,留空则自动检测",options:[],clearable:!0},{key:"allowedModels",label:"可用模型",type:"model-multi-select",placeholder:"选择注册到 OpenCode 的模型(留空则使用检测到的所有模型)",description:"选择哪些模型注册到 opencode.json 的 provider 配置中"}]},{title:"模型重定向",description:"仅在代理开启时生效,将请求的模型重定向到指定模型",collapsible:!0,fields:[{key:"modelRedirects",type:"model-redirect",fullWidth:!0}]},{title:"调度配置",fields:Yb.schedule}],getInitialForm:()=>({presetId:"openrouter",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",wireApi:"openai",apiKey:"",balanceToken:"",balanceUserId:null,websiteUrl:"https://openrouter.ai",model:"",gatewaySourceType:"codex",speedTestModel:"",modelRedirects:[],allowedModels:[],maxConcurrency:null,weight:1,enabled:!0,availableModels:[],modelsFetching:!1,modelsFetchError:null,modelsFetchErrorHint:null}),mapChannelToForm:e=>({presetId:e.presetId||"custom",name:e.name||"",baseUrl:e.baseUrl||"",wireApi:e.wireApi||"openai",apiKey:e.apiKey||"",balanceToken:e.balanceToken||"",balanceUserId:e.balanceUserId??null,websiteUrl:e.websiteUrl||"",model:e.model||"",gatewaySourceType:e.gatewaySourceType||"codex",speedTestModel:e.speedTestModel||"",modelRedirects:e.modelRedirects||[],allowedModels:e.allowedModels||[],maxConcurrency:e.maxConcurrency??null,weight:e.weight||1,enabled:!1!==e.enabled,availableModels:[],modelsFetching:!1,modelsFetchError:null,modelsFetchErrorHint:null}),onPresetChange:(e,o)=>{const t=db(e);if(!t)return o;const n={...o,presetId:e};return n.name=t.name,n.websiteUrl=t.websiteUrl||"",n.baseUrl=t.baseUrl,n.wireApi=t.wireApi||"openai",n.gatewaySourceType=t.gatewaySourceType||n.gatewaySourceType||"codex",Nb(n,t)},fetchModelsForChannel:async(e,o,{forceRefresh:t=!1}={})=>{await vb(),o.modelsFetching=!0,o.modelsFetchError=null,o.modelsFetchErrorHint=null;const n=o.presetId||"";if(["entry_claude","entry_codex","entry_gemini"].includes(n)){const e=o.gatewaySourceType||"codex";return o.availableModels=qb("claude"===e?"claude":"gemini"===e?"gemini":"codex"),void(o.modelsFetching=!1)}if(!e){const e=Gb("opencode",o);if(!o.baseUrl)return o.availableModels=e,o.modelsFetchMeta={offline:!0,source:"Models.dev"},void(o.modelsFetching=!1);try{const t=await async function({baseUrl:e,apiKey:o,gatewaySourceType:t}){return(await bt.post("/opencode/channels/probe-models",{baseUrl:e,apiKey:o,gatewaySourceType:t})).data}({baseUrl:o.baseUrl,apiKey:o.apiKey||"",gatewaySourceType:o.gatewaySourceType||"codex"});o.availableModels=Vb(Kb(t.models||[]),e),t.error&&(o.modelsFetchError=t.error,o.modelsFetchErrorHint=t.errorHint||(e.length?"已使用 Models.dev 离线模型列表":"请手动填写模型名称"))}catch(a){o.availableModels=e,o.modelsFetchError=a.message||"获取模型列表失败",o.modelsFetchErrorHint=e.length?"已使用 Models.dev 离线模型列表":"请手动填写模型名称"}finally{o.modelsFetching=!1}return}const r=Gb("opencode",o);try{const n=await async function(e,{forceRefresh:o=!1}={}){return(await bt.get(`/opencode/channels/${e}/models`,{params:o?{forceRefresh:"true"}:{}})).data}(e,{forceRefresh:t}),a=Kb(n.models||[]);o.availableModels=Vb(a,r),(n.fallbackUsed||0===a.length&&r.length>0)&&(o.modelsFetchError=n.error||"无法自动获取模型列表",o.modelsFetchErrorHint=n.errorHint||"已使用 Models.dev 离线模型列表")}catch(a){o.availableModels=r,o.modelsFetchError=a.message||"获取模型列表失败",o.modelsFetchErrorHint=r.length?"已使用 Models.dev 离线模型列表":"请手动填写模型名称"}finally{o.modelsFetching=!1}},testFn:Am,api:{fetch:async()=>yb(await async function(){return(await bt.get("/opencode/channels")).data}()),syncCurrent:zm,create:async e=>{const o=Rb(e);return await async function(e,o,t,n={}){return(await bt.post("/opencode/channels",{name:e,baseUrl:o,apiKey:t,wireApi:n.wireApi||"openai",gatewaySourceType:n.gatewaySourceType||"codex",enabled:!1!==n.enabled,weight:n.weight||1,maxConcurrency:n.maxConcurrency||null,model:n.model||null,modelRedirects:n.modelRedirects||[],speedTestModel:n.speedTestModel||null,presetId:n.presetId||null,websiteUrl:n.websiteUrl||""})).data}(e.name,e.baseUrl,o.apiKey,{wireApi:e.wireApi||"openai",maxConcurrency:Cb(e.maxConcurrency),weight:wb(e.weight),enabled:e.enabled,model:e.model||null,gatewaySourceType:e.gatewaySourceType||"codex",modelRedirects:e.modelRedirects||[],speedTestModel:e.speedTestModel||null,presetId:e.presetId||null,websiteUrl:e.websiteUrl||"",allowedModels:e.allowedModels||[],...Fb(o),balanceToken:o.balanceToken,balanceUserId:o.balanceUserId})},update:async(e,o)=>{const t=Rb(o);return await Mm(e.id,{name:o.name,baseUrl:o.baseUrl,apiKey:t.apiKey,wireApi:o.wireApi||"openai",websiteUrl:o.websiteUrl,model:o.model||null,gatewaySourceType:o.gatewaySourceType||"codex",maxConcurrency:Cb(o.maxConcurrency),weight:wb(o.weight),enabled:o.enabled,modelRedirects:o.modelRedirects||[],speedTestModel:o.speedTestModel||null,presetId:o.presetId||null,allowedModels:o.allowedModels||[],...Fb(t),balanceToken:t.balanceToken,balanceUserId:t.balanceUserId})},toggle:async(e,o)=>Mm(e.id,{enabled:o}),remove:Rm,resetHealth:async e=>async function(e){return(await bt.post(`/opencode/channels/${e}/reset-health`)).data}(e.id)},getHeaderTags:(e,o)=>{const t=[];return"frozen"===e.health?.status?t.push({text:o.formatFreeze(e.health.freezeRemaining),type:"error"}):"checking"===e.health?.status&&t.push({text:"检测中",type:"warning"}),t},buildInfoRows:(e,o)=>[{label:"入口协议",value:Wb(e.gatewaySourceType),mono:!0},{label:"Wire API",value:e.wireApi||"openai",mono:!0},{label:"Provider Key",value:e.providerKey||"(未设置)",mono:!0},{label:"Model",value:e.model||"(默认)",mono:!0},{label:"URL",value:e.baseUrl},{label:"Key",value:o.maskApiKey(e.apiKey),mono:!0,action:"healthy"!==e.health?.status?()=>o.handleResetHealth(e):null,actionLabel:"重置状态"}]}),omp:()=>({type:"omp",displayName:"OMP",schedulerSource:"omp",storageKeys:{localCollapse:"ompChannelCollapse",collapseConfigKey:"omp",orderConfigKey:"omp"},emptyDescription:"暂无 OMP 渠道",showEmptyAction:!0,emptyActionText:"添加 OMP 渠道",modalWidth:600,formLabelWidth:95,showApplyButton:!1,presets:ub,presetCategories:pb,getPresetById:hb,formSections:[{title:"供应商预设",fields:[{key:"presetId",label:"选择预设",type:"preset",placeholder:"选择供应商预设"}]},{title:"基本信息",fields:[{...Bb(),showWhen:e=>$b(e)&&!Eb(e)},{key:"name",label:"渠道名称",type:"text",required:!0,placeholder:"显示名称"},{key:"providerKey",showWhen:_b,label:"Provider Key",type:"text",required:!0,placeholder:"openai-official",validate:kb},{key:"baseUrl",showWhen:_b,label:e=>$b(e)?"Auth Gateway URL":"Base URL",type:"text",required:!0,skipOnOAuth:!1,placeholder:"https://api.example.com/v1",validate:(e,o)=>Sb($b(o)?"Auth Gateway URL":"Base URL",e,{required:!0})},{key:"apiKey",showWhen:_b,label:e=>$b(e)?"Gateway Token":"API Key",type:"password",required:!0,skipOnOAuth:!1,placeholder:"sk-...",validate:(e,o)=>function(e,o){if(null==o||""===o)return`${e}不能为空`}($b(o)?"Gateway Token":"API Key",e)},{key:"routingGroup",showWhen:_b,label:"路由组",type:"text",placeholder:"相同路由组的兼容渠道可动态切换",description:"留空时按渠道 ID 隔离"},Hb(),jb(),{key:"websiteUrl",showWhen:Db,label:"官网链接",type:"text",placeholder:"https://(选填)",validate:e=>Sb("官网链接",e,{required:!1})},{key:"model",label:"默认模型",type:"select",placeholder:"选择或输入默认模型(留空则由 OMP 决定)",options:[],clearable:!0},{key:"speedTestModel",showWhen:Db,label:"测速模型",type:"select",placeholder:"选择用于测速的模型(留空则使用默认模型)",options:[],clearable:!0},{key:"allowedModels",label:"可用模型",type:"model-multi-select",placeholder:"选择注册到 OMP models.yml 的模型",description:"仅选中的模型会暴露给 OMP;留空时仅使用默认模型/测速模型,不回退到 provider 全量目录"}]},{title:"模型 Metadata",description:"自动获取后可直接修改;保存时以当前内容覆盖自动结果",collapsible:!0,fields:[{key:"modelDefinitionsJson",label:"模型定义",type:"model-definitions",fullWidth:!0,placeholder:'[\n { "id": "gpt-5.5", "reasoning": true, "contextWindow": 1050000 }\n]',validate:zb}]},{title:"模型重定向",description:"仅在 coding-tool-x 托管 OMP models.yml provider 启用时用于模型选择提示",collapsible:!0,fields:[{key:"modelRedirects",type:"model-redirect",fullWidth:!0}]},{title:"调度配置",fields:Yb.schedule}],getInitialForm:()=>({presetId:"openrouter",name:"OpenRouter",providerKey:"openrouter",baseUrl:"https://openrouter.ai/api/v1",wireApi:"openai",providerApi:"openai-completions",apiKey:"",authMode:"api_key",oauthGatewayMode:!1,authSource:void 0,authStatus:void 0,oauthProviderId:"",transport:"",routingGroup:"",balanceToken:"",balanceUserId:null,websiteUrl:"https://openrouter.ai",model:"",gatewaySourceType:"openai_compatible",speedTestModel:"",modelRedirects:[],allowedModels:[],modelMetadataMode:"hybrid",modelDefinitionsJson:"[]",providerConfigJson:"{}",modelMetadataFetching:!1,modelMetadataStatus:"",maxConcurrency:null,weight:1,enabled:!0,availableModels:[],modelsFetching:!1,modelsFetchError:null,modelsFetchErrorHint:null,modelsFetchMeta:null}),mapChannelToForm:e=>({presetId:e.presetId||"custom",name:e.name||"",providerKey:e.providerKey||e.provider||e.name||"",baseUrl:e.baseUrl||"",wireApi:e.wireApi||"openai",providerApi:e.providerApi||e.api||"openai-completions",apiKey:e.apiKey||"",authMode:e.authMode||"api_key",authRef:e.authRef?{credentialId:"",providerId:"",accountId:"",identityKey:"",accountEmail:"",...e.authRef}:{credentialId:"",providerId:"",accountId:"",identityKey:"",accountEmail:""},oauthGatewayMode:"oauth"===e.authMode&&("pi-native"===e.transport||"pi-native"===e.providerConfig?.transport),authSource:e.authSource,authStatus:e.authStatus,oauthProviderId:e.oauthProviderId||"",transport:e.transport||e.extra?.transport||e.providerConfig?.transport||"",routingGroup:e.routingGroup||"",balanceToken:e.balanceToken||"",balanceUserId:e.balanceUserId??null,websiteUrl:e.websiteUrl||"",model:e.model||"",gatewaySourceType:e.gatewaySourceType||"openai_compatible",speedTestModel:e.speedTestModel||"",modelRedirects:e.modelRedirects||[],allowedModels:e.allowedModels||[],modelMetadataMode:"hybrid",modelDefinitionsJson:Pb(e.models||[],[]),providerConfigJson:Pb(e.providerConfig||{},{}),modelMetadataFetching:!1,modelMetadataStatus:"",maxConcurrency:e.maxConcurrency??null,weight:e.weight||1,enabled:!1!==e.enabled,availableModels:[],modelsFetching:!1,modelsFetchError:null,modelsFetchErrorHint:null,modelsFetchMeta:null}),onPresetChange:(e,o)=>{const t=hb(e);if(!t)return o;const n={...o,presetId:e};return n.name=t.name,n.providerKey=t.providerKey||(t.id||t.name||"provider").toLowerCase().replace(/[^a-z0-9_-]+/g,"-").replace(/^-|-$/g,""),n.baseUrl=t.baseUrl,n.wireApi=t.wireApi||"openai",n.gatewaySourceType=t.gatewaySourceType||n.gatewaySourceType||"openai_compatible",n.transport=t.transport||"",n.websiteUrl=t.websiteUrl||"",n.oauthGatewayMode="omp_oauth_gateway"===t.id,"oauth"===t.authMode?{...n,authMode:"oauth",apiKey:"",authRef:void 0,authSource:void 0,authStatus:void 0,oauthProviderId:t.oauthProviderId||""}:Nb(n,t)},fetchModelsForChannel:async(e,o,{forceRefresh:t=!1}={})=>{await vb(),o.modelsFetching=!0,o.modelsFetchError=null,o.modelsFetchErrorHint=null;const n=Gb("omp",o);if(e)try{const r=await async function(e,{forceRefresh:o=!1}={}){return(await bt.get(`/omp/channels/${e}/models`,{params:o?{forceRefresh:"true"}:{}})).data}(e,{forceRefresh:t}),a=Kb(r.models||[]);o.availableModels=Vb(a,n),o.modelsFetchMeta={cached:!!r.cached,stale:!!r.stale,retryAfter:r.retryAfter||null,fetchedAt:r.fetchedAt||null,offline:0===a.length,source:a.length>0?"channel":"Models.dev"},(r.error||0===a.length&&n.length>0)&&(o.modelsFetchError=r.error||"无法自动获取模型列表",o.modelsFetchErrorHint=r.errorHint||"已使用 Models.dev 离线模型列表")}catch(r){o.availableModels=n,o.modelsFetchError=r.message||"获取模型列表失败",o.modelsFetchErrorHint=n.length?"已使用 Models.dev 离线模型列表":"请手动填写模型名称"}finally{o.modelsFetching=!1}else{if(!o.baseUrl)return o.availableModels=n,o.modelsFetchMeta={offline:!0,source:"Models.dev"},void(o.modelsFetching=!1);try{const e=await async function(e,{forceRefresh:o=!1}={}){return(await bt.post("/omp/channels/probe-models",{...e,forceRefresh:o})).data}({baseUrl:o.baseUrl,apiKey:o.apiKey||"",gatewaySourceType:o.gatewaySourceType||"openai_compatible",authMode:o.authMode||"api_key",oauthProviderId:o.oauthProviderId||"",transport:o.transport||($b(o)?"pi-native":""),model:o.model||null,speedTestModel:o.speedTestModel||null,allowedModels:Array.isArray(o.allowedModels)?o.allowedModels:[],modelRedirects:Array.isArray(o.modelRedirects)?o.modelRedirects:[]},{forceRefresh:t}),r=Kb(e.models||[]);o.availableModels=Vb(r,n),o.modelsFetchMeta={cached:!!e.cached,stale:!!e.stale,retryAfter:e.retryAfter||null,fetchedAt:e.fetchedAt||null,offline:0===r.length,source:r.length>0?"channel":"Models.dev"},e.error&&(o.modelsFetchError=e.error,o.modelsFetchErrorHint=e.errorHint||(n.length?"已使用 Models.dev 离线模型列表":"请手动填写模型名称"))}catch(r){o.availableModels=n,o.modelsFetchError=r.message||"获取模型列表失败",o.modelsFetchErrorHint=n.length?"已使用 Models.dev 离线模型列表":"请手动填写模型名称"}finally{o.modelsFetching=!1}}},fetchModelMetadataForChannel:async e=>{const o=String(e.providerKey||"").trim(),t=Array.isArray(e.allowedModels)?e.allowedModels:[],n=await async function(e,o={},{forceRefresh:t=!1}={}){return(await bt.post("/omp/channels/catalog-metadata",{providerKey:e,forceRefresh:t,...o})).data}(o,{model:e.model||null,speedTestModel:e.speedTestModel||null,allowedModels:t,models:Ib(e.modelDefinitionsJson),availableModels:t.length>0?[]:Array.isArray(e.availableModels)?e.availableModels.map(e=>e&&"object"==typeof e?e.value||e.id||e.name:e):[]}),r=Ib(e.modelDefinitionsJson),a=new Map((n.models||[]).map(e=>[String(e.id||"").toLowerCase(),e]));for(const s of r){const e=String(s.id||"").toLowerCase(),o=a.get(e)||{};a.set(e,{...o,...s})}e.modelDefinitionsJson=Pb([...a.values()].filter(e=>e.id),[]),e.modelMetadataMode="hybrid";const l=Array.isArray(n.warnings)?n.warnings.length:0,i="models.dev"===n.source?.name?"Models.dev":n.source?.name||"Models.dev";e.modelMetadataStatus=`已读取 ${n.models?.length||0} 个模型(${i} 离线快照)${l?`,${l} 条兼容提示`:""}`},api:{fetch:async()=>{const e=await async function(){return(await bt.get("/omp/channels")).data}();return{channels:xb(e),authProviderMeta:Array.isArray(e)?null:e.authProviderMeta||null}},syncCurrent:$m,create:async e=>{const o=Ab(e),t=Mb(e.providerConfigJson);return await async function(e,o,t,n={}){const r=n.gatewaySourceType||"openai_compatible";let a=n.providerApi;return a||(a="claude"===r?"anthropic-messages":"gemini"===r?"google-generative-ai":"codex"===r?"responses":n.wireApi||"openai-completions"),(await bt.post("/omp/channels",{name:e,baseUrl:o,apiKey:t,wireApi:n.wireApi||"openai",providerApi:a,providerKey:n.providerKey||"",authMode:n.authMode||"api_key",authRef:n.authRef,authSource:n.authSource,authStatus:n.authStatus,oauthProviderId:n.oauthProviderId||"",transport:n.transport||"",routingGroup:n.routingGroup||"",gatewaySourceType:r,enabled:!1!==n.enabled,model:n.model||null,allowedModels:n.allowedModels||[],speedTestModel:n.speedTestModel||null,presetId:n.presetId||null,websiteUrl:n.websiteUrl||"",balanceToken:n.balanceToken||"",balanceUserId:n.balanceUserId||null,models:Array.isArray(n.models)?n.models:[],modelMetadataMode:n.modelMetadataMode||"auto",modelBindings:Array.isArray(n.modelBindings)?n.modelBindings:[],providerConfig:n.providerConfig||{}})).data}(e.name,e.baseUrl,o.apiKey,{wireApi:e.wireApi||"openai",providerApi:e.providerApi||"openai-completions",providerKey:e.providerKey,...Fb(o),routingGroup:e.routingGroup||"",maxConcurrency:Cb(e.maxConcurrency),weight:wb(e.weight),enabled:e.enabled,model:e.model||null,gatewaySourceType:e.gatewaySourceType||"openai_compatible",modelRedirects:e.modelRedirects||[],speedTestModel:e.speedTestModel||null,presetId:e.presetId||null,websiteUrl:e.websiteUrl||"",allowedModels:e.allowedModels||[],balanceToken:o.balanceToken,balanceUserId:o.balanceUserId,models:Ib(e.modelDefinitionsJson),modelMetadataMode:"hybrid",providerConfig:Object.prototype.hasOwnProperty.call(o,"transport")?{...t,transport:o.transport}:t})},update:async(e,o)=>{const t=Ab(o),n=Mb(o.providerConfigJson);return await Om(e.id,{name:o.name,providerKey:o.providerKey,baseUrl:o.baseUrl,apiKey:t.apiKey,wireApi:o.wireApi||"openai",providerApi:o.providerApi||"openai-completions",...Fb(t),routingGroup:o.routingGroup||"",websiteUrl:o.websiteUrl,model:o.model||null,gatewaySourceType:o.gatewaySourceType||"openai_compatible",maxConcurrency:Cb(o.maxConcurrency),weight:wb(o.weight),enabled:o.enabled,modelRedirects:o.modelRedirects||[],speedTestModel:o.speedTestModel||null,presetId:o.presetId||null,allowedModels:o.allowedModels||[],balanceToken:t.balanceToken,balanceUserId:t.balanceUserId,models:Ib(o.modelDefinitionsJson),modelMetadataMode:"hybrid",providerConfig:Object.prototype.hasOwnProperty.call(t,"transport")?{...n,transport:t.transport}:n})},toggle:async(e,o)=>Om(e.id,{enabled:o}),remove:Bm,resetHealth:async e=>async function(e){return(await bt.post(`/omp/channels/${e}/reset-health`)).data}(e.id)},getHeaderTags:(e,o)=>{const t=[];return"frozen"===e.health?.status?t.push({text:o.formatFreeze(e.health.freezeRemaining),type:"error"}):"checking"===e.health?.status&&t.push({text:"检测中",type:"warning"}),t},buildInfoRows:(e,o)=>{const t=e.ompAuthProvider,n=[{label:"Provider",value:e.providerKey||e.provider||"(未设置)",mono:!0},{label:"API",value:e.providerApi||e.api||"openai-completions",mono:!0},{label:"Auth",value:e.authMode||"api_key",mono:!0},{label:"Routing Group",value:e.routingGroup||"(独立)",mono:!0},{label:"Model",value:e.model||"(默认)",mono:!0},{label:"Allowed",value:Ub(e),mono:!0}];return t&&n.push({label:"Login",value:t.loggedIn?`${t.name||t.id} (${t.accountCount||0})`:`${t.name||t.id} (未登录)`}),n.push({label:"URL",value:e.baseUrl},{label:"Key",value:o.maskApiKey(e.apiKey),mono:!0,action:"healthy"!==e.health?.status?()=>o.handleResetHealth(e):null,actionLabel:"重置状态"}),n}})},Xb=[1500,3e3,5e3,8e3];function Zb(e){try{const o=localStorage.getItem(e);if(o)return JSON.parse(o)}catch(o){}return{}}function Qb(e,o){try{localStorage.setItem(e,JSON.stringify(o))}catch(t){}}function ey(e,o){const t=e?.response?.data?.error;return t?"string"==typeof t?t:"object"==typeof t?t.error||t.message||t.code||o||"操作失败":String(t):o||e.message||"操作失败"}function oy(){return"undefined"==typeof document||"hidden"!==document.visibilityState}function ty(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function ny(e){const o=sm();let t=null,n=null,r=null,a=null,l=null,i=null,s=null,c=0;const d=_o({channels:[],channelMeta:null,balances:{},loading:!1,balanceLoading:!1,balanceError:null,syncing:!1,toggling:{},collapsed:Zb(e.storageKeys.localCollapse),showDialog:!1,editingChannel:null,showChannelBalance:!1,formData:e.getInitialForm()}),u=_o({});function p(e,{fallback:o=null,allowInsert:t=!1}={}){const n=function(e){return ty(e?.channel)&&e.channel.id?e.channel:ty(e)&&e.id?e:null}(e)||o;if(!n?.id)return!1;const r=d.channels.findIndex(e=>e.id===n.id);if(-1===r){if(!t)return!1;d.channels=[...d.channels,n]}else d.channels[r]={...d.channels[r],...n};return I(),h(),S(),!0}function h(){const t=o.getSchedulerState(e.schedulerSource);t?.channels?.length&&d.channels.length&&(d.channels.forEach(e=>{const o=t.channels.find(o=>o.id===e.id);o?.health&&(e.health=o.health)}),S())}const f=$o(()=>o.getSchedulerState(e.schedulerSource)?.channels,h);function v(){const t=function(){if("function"!=typeof o.getChannels)return[];const t=o.getChannels(e.type);return Array.isArray(t?.value)?t.value:[]}();t.length&&!d.channels.length&&(d.channels=[...t],I(),h(),S())}function m(){i&&(clearTimeout(i),i=null)}function g(e){if(m(),!function(e){return Boolean(e?.refreshing||e?.authProvider?.refreshing)}(e))return void(c=0);if(c>=Xb.length)return;const o=Xb[c];c+=1,i=setTimeout(()=>{i=null,b({silent:!0,skipBalance:!0}).catch(()=>{})},o)}async function b(o={}){return s||(s=async function({silent:o=!1,skipBalance:t=!1}={}){o||(c=0);v(),d.loading=!o&&0===d.channels.length;try{const o=function(e){if(Array.isArray(e))return{channels:e,meta:null};if(!ty(e))return{channels:[],meta:null};const o=ty(e.authProviderMeta)?e.authProviderMeta:null,t=ty(e.meta)?{...e.meta}:{};return o&&(t.authProvider=o),{channels:Array.isArray(e.channels)?e.channels:[],meta:Object.keys(t).length>0?t:null}}(await e.api.fetch());d.channels=[...o.channels],d.channelMeta=o.meta,await I(),h(),S(),g(d.channelMeta),t||C()}catch(n){0===d.channels.length&&Mv.error(ey(n,`${e.displayName} 渠道加载失败`))}finally{d.loading=!1}}(o).finally(()=>{s=null}),s)}async function y(){return a||(d.balanceLoading=!0,d.balanceError=null,a=(async()=>{try{if(!0!==(await T())?.channelBalance?.showRemaining)return d.showChannelBalance=!1,d.formData._showChannelBalance=!1,d.balances={},null;d.showChannelBalance=!0,d.formData._showChannelBalance=!0;const o=await async function(e){return(await bt.get("/channel-balances",{params:{source:e}})).data}(e.type);return d.balances=o?.enabled&&o.balances?o.balances:{},o}catch(o){return d.balanceError=ey(o,`${e.displayName} 余额加载失败`),null}finally{d.balanceLoading=!1,a=null}})(),a)}function x(){n&&(clearTimeout(n),n=null),null!==r&&"undefined"!=typeof window&&"function"==typeof window.cancelIdleCallback&&window.cancelIdleCallback(r),r=null}function C(){if(x(),!oy())return;const e=()=>{n&&clearTimeout(n),r=null,n=null,y()};n=setTimeout(()=>{"undefined"==typeof window||"function"!=typeof window.requestIdleCallback?e():r=window.requestIdleCallback(e,{timeout:1500})},5e3)}function w(){t&&(clearTimeout(t),t=null)}function S(){w();const e=d.channels.filter(e=>"frozen"===e.health?.status&&Number(e.health?.freezeRemaining)>0).sort((e,o)=>Number(e.health?.freezeRemaining||0)-Number(o.health?.freezeRemaining||0))[0];if(!e)return;const o=Math.max(1e3,1e3*Number(e.health.freezeRemaining||0));t=setTimeout(()=>{t=null,b()},o+250)}let k=null,P=0;async function T(){return k&&Date.now()-P<6e4?k:l||(l=(async()=>{try{const e=await St();if(e.success&&e.config)return k=e.config,P=Date.now(),k}catch(e){}finally{l=null}return null})(),l)}async function I(){try{if(d.channels.length>0){const e=[...d.channels].sort((e,o)=>{const t=e.updatedAt||e.createdAt||0;return(o.updatedAt||o.createdAt||0)-t}),o=e.filter(e=>!1!==e.enabled),t=e.filter(e=>!1===e.enabled);t.forEach(e=>{d.collapsed[e.id]=!0}),d.channels=[...o,...t]}}catch(e){}}async function z(){try{await Mt("channelCollapse",e.storageKeys.collapseConfigKey,d.collapsed)}catch(o){}}function M(){d.showDialog=!1,d.editingChannel=null,d.formData=e.getInitialForm()}function R(){Object.keys(u).forEach(e=>{delete u[e]})}function A(){let o=!0;const t=e=>{const o=e.key.replace(/\./g,"_");delete u[e.key],delete u[o]};return e.formSections.forEach(e=>{const n=(e=>!e.showWhen||e.showWhen(d.formData))(e);e.fields.forEach(e=>{if(!n||!(e=>!e.showWhen||e.showWhen(d.formData))(e)||"oauth"===d.formData.authMode&&["baseUrl","apiKey","providerApi","gatewaySourceType"].includes(e.key)&&!1!==e.skipOnOAuth)return void t(e);if(e.disabledOnEdit&&d.editingChannel)return void t(e);const r=((e,o)=>{if(!o||"string"!=typeof o||!o.includes("."))return e[o];const t=o.split(".");let n=e;for(const r of t)n=n?.[r];return n})(d.formData,e.key);let a="";e.required&&(a=e.customRequiredMessage?null==r||""===r?e.customRequiredMessage:"":null==r||""===r?`${(e=>"function"==typeof e.label?e.label(d.formData):e.label)(e)}不能为空`:""),a||"function"!=typeof e.validate||(a=e.validate(r,d.formData)||""),a?(u[e.key]={status:"error",message:a},o=!1):t(e)})}),o}function F(o={}){const t=Number(o.added||0),n=Number(o.updated||0),r=Number(o.skipped||0);if(t>0||n>0){const o=[];return t>0&&o.push(`新增 ${t} 个`),n>0&&o.push(`更新 ${n} 个`),`${e.displayName} 同步完成:${o.join(",")}`}return r>0?`${e.displayName} 已在列表中,未重复导入`:`${e.displayName} 无需同步`}async function $(){k=null,P=0,l=null,await y(),d.formData._showChannelBalance=d.showChannelBalance}function O(){oy()&&C()}return"undefined"!=typeof window&&window.addEventListener("channel-balance-visibility-change",$),"undefined"!=typeof document&&document.addEventListener("visibilitychange",O),v(),b().catch(()=>{}),async function(){try{const o=await T();if(o){const t=o.channelCollapse?.[e.storageKeys.collapseConfigKey]||{};d.collapsed=t,Qb(e.storageKeys.localCollapse,t)}}catch(o){}}().catch(()=>{}),bo(()=>{w(),x(),m(),f(),"undefined"!=typeof window&&window.removeEventListener("channel-balance-visibility-change",$),"undefined"!=typeof document&&document.removeEventListener("visibilitychange",O)}),{state:d,validation:u,actions:{loadChannels:b,loadChannelBalances:y,openAddDialog:function(){d.editingChannel=null,d.formData={authMode:"api_key",authRef:{credentialId:"",providerId:"",accountId:"",identityKey:"",accountEmail:""},...e.getInitialForm()||{}},d.formData._showChannelBalance=d.showChannelBalance,R(),d.showDialog=!0},closeDialog:M,toggleCollapse:function(o){d.collapsed[o]=!d.collapsed[o],Qb(e.storageKeys.localCollapse,d.collapsed),z()},handleEdit:function(o){d.editingChannel=o,d.formData={authMode:o.authMode||"api_key",authRef:{credentialId:"",providerId:"",accountId:"",identityKey:"",accountEmail:"",...o.authRef||{}},...e.mapChannelToForm(o)||{}},d.formData._showChannelBalance=d.showChannelBalance,R(),d.showDialog=!0},handleSave:async function(){if(!A()){const e=Object.values(u).map(e=>e?.message).filter(Boolean);return void Mv.error(e.length>0?`请检查表单:${e.join(";")}`:"请检查表单填写是否完整")}try{const o=Boolean(d.editingChannel),t=p(o?await e.api.update(d.editingChannel,d.formData):await e.api.create(d.formData),{allowInsert:!o});Mv.success(`${e.displayName} 渠道已${o?"更新":"添加"}`),M(),t||await b()}catch(o){Mv.error(ey(o))}},handleDelete:function(o){Rv.warning({title:`删除 ${e.displayName} 渠道`,content:"确定要删除这个渠道吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{try{await e.api.remove(o),d.channels=d.channels.filter(e=>e.id!==o),delete d.collapsed[o],Qb(e.storageKeys.localCollapse,d.collapsed),Mv.success(`${e.displayName} 渠道已删除`)}catch(t){Mv.error(ey(t))}}})},handleToggleEnabled:async function(o,t){if(o&&!d.toggling[o.id]){d.toggling[o.id]=!0;try{const n="boolean"==typeof t?t:!1===o.enabled,r=await e.api.toggle(o,n);Mv.success(`${e.displayName} 渠道已${n?"启用":"禁用"}`),n?(delete d.collapsed[o.id],Qb(e.storageKeys.localCollapse,d.collapsed),z()):(d.collapsed[o.id]=!0,Qb(e.storageKeys.localCollapse,d.collapsed),z()),p(r,{fallback:{...o,enabled:n}})||await b(),window.dispatchEvent(new CustomEvent("channel-management-refresh",{detail:{channel:e.type}}))}catch(n){Mv.error(ey(n))}finally{d.toggling[o.id]=!1}}},handleSyncCurrentChannels:async function(){if("function"!=typeof e.api.syncCurrent)return Mv.warning(`${e.displayName} 暂不支持同步`),null;if(d.syncing)return null;d.syncing=!0;try{const o=await e.api.syncCurrent();await b(),window.dispatchEvent(new CustomEvent("channel-management-refresh",{detail:{channel:e.type}}));const t=Array.isArray(o?.warnings)?o.warnings.filter(Boolean):[];t.length>0&&Mv.warning(t.join(";"));const n=Number(o?.added||0),r=Number(o?.updated||0);return n>0||r>0?Mv.success(F(o)):Mv.info(F(o)),o}catch(o){return Mv.error(ey(o,`${e.displayName} 同步失败`)),null}finally{d.syncing=!1}},handleApplyToSettings:function(o){"function"==typeof e.api.applyToSettings&&Rv.warning({title:"写入配置",content:"写入配置后会关闭动态切换并默认使用该渠道,是否继续?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{try{const t=await e.api.applyToSettings(o);Mv.success("已将渠道写入配置文件"),p(t)||!1===t?.success||await b(),window.dispatchEvent(new CustomEvent("channel-management-refresh",{detail:{channel:e.type}}))}catch(t){Mv.error(ey(t))}}})},handleResetHealth:async function(o){if("function"==typeof e.api.resetHealth)try{const t=await e.api.resetHealth(o);t?.health?(o.health=t.health,h(),S()):await b(),Mv.success("渠道健康状态已重置")}catch(t){Mv.error(ey(t))}},handleRefreshBalance:async function(o){if(o?.id)try{const t=await async function(e,o){return(await bt.post(`/channel-balances/${e}/${o}/refresh`)).data}(e.type,o.id);t?.enabled&&t.balance&&(d.balances[o.id]=t.balance,d.balanceError=null)}catch(t){d.balanceError=ey(t,`${o.name||e.displayName} 余额刷新失败`)}}}}}var ry=Object.freeze({endpoint:Object.freeze([{key:"baseUrl",label:"Base URL",type:"text",required:!0},{key:"websiteUrl",label:"官网链接",type:"text",required:!1}]),auth:Object.freeze([{key:"authMode",label:"认证方式",type:"select",options:["api_key","none"]},{key:"apiKey",label:"API Key",type:"password",required:!1}]),schedule:Object.freeze([{key:"maxConcurrency",label:"最大并发",type:"number",required:!1},{key:"weight",label:"调度权重",type:"number",min:1,max:100},{key:"enabled",label:"渠道状态",type:"switch",default:!0}])});function ay(){return{name:"",baseUrl:"",websiteUrl:"",apiKey:"",authMode:"api_key",maxConcurrency:null,weight:1,enabled:!0}}var ly={key:0,class:"loading-container"},iy={key:1},sy={key:0,class:"empty-state"},cy={key:1,class:"channels-list"},dy={class:"section-title"},uy={key:0,class:"section-desc"},py={key:0,class:"model-catalog-control"},hy={key:3,class:"auth-provider-status"},fy={key:9,class:"model-definitions-editor"},vy={class:"model-definitions-toolbar"},my={class:"model-catalog-status",role:"status","aria-live":"polite"},gy={class:"dialog-footer"},by={__name:"BaseChannelPanel",props:{type:{type:String,required:!0}},emits:["open-website"],setup(e,{expose:o,emit:t}){const n=e,r=t,a=zt().get(n.type)||{key:n.type,label:n.type,capabilities:{channels:!0}},l=(Jb[n.type]||(()=>function(e={},o={}){const t=String(e.key||"").trim().toLowerCase(),n=String(e.label||e.title||t).trim();return{type:t,displayName:n,schedulerSource:t,storageKeys:{localCollapse:`${t}ChannelCollapse`,collapseConfigKey:t,orderConfigKey:t},emptyDescription:"暂无渠道",showEmptyAction:!0,emptyActionText:"添加渠道",addTitle:`添加 ${n} 渠道`,editTitle:`编辑 ${n} 渠道`,modalWidth:520,formLabelWidth:95,showApplyButton:!1,formSections:[{title:"基本信息",fields:ry.endpoint},{title:"认证",fields:ry.auth},{title:"调度配置",fields:ry.schedule}],api:o,getInitialForm:ay,mapChannelToForm:e=>({name:"",baseUrl:"",websiteUrl:"",apiKey:"",authMode:"api_key",maxConcurrency:null,weight:1,enabled:!0,...e||{}}),normalizeForm:e=>({...e}),getFormTitle:e=>e?`编辑 ${n} 渠道`:`添加 ${n} 渠道`,getChannelTitle:e=>e?.name||n,getHeaderTags:(e,o={})=>"frozen"===e.health?.status?[{text:"function"==typeof o.formatFreeze?o.formatFreeze(e.health.freezeRemaining):"已冻结",type:"error"}]:"checking"===e.health?.status?[{text:"检测中",type:"warning"}]:[],buildInfoRows:(e,o={})=>[{label:"URL",value:e.baseUrl,mono:!0},{label:"Key",value:e.apiKey?"function"==typeof o.maskApiKey?o.maskApiKey(e.apiKey):"已设置":"none"===e.authMode?"无需认证":"未设置",mono:!0,action:e.health?.status&&"healthy"!==e.health.status&&"function"==typeof o.handleResetHealth?()=>o.handleResetHealth(e):null,actionLabel:"重置状态"}],fetch:o.fetch,create:o.create,update:o.update,remove:o.remove}}(a,{fetch:()=>um(n.type),create:e=>async function(e,o){return(await bt.post(dm(e),o)).data}(n.type,e),update:(e,o)=>pm(n.type,e.id,o),remove:e=>async function(e,o){return(await bt.delete(`${dm(e)}/${encodeURIComponent(o)}`)).data}(n.type,e),toggle:(e,o)=>pm(n.type,e.id,{...e,enabled:o})})))(),{state:i,validation:s,actions:c}=ny(l),{getChannelInflight:d}=function(e="claude"){const o=sm();return{getChannelInflight:function(t){const n=(o.getSchedulerState(e)||{channels:[]}).channels?.find(e=>e.id===t);return n?n.inflight:0}}}(l.schedulerSource);function u(e){return"function"==typeof e.label?e.label(i.formData):e.label}function p(e){return Array.isArray(e)?e.map(p):e&&"object"==typeof e?Object.keys(e).sort().reduce((o,t)=>(o[t]=p(e[t]),o),{}):null==e?"":String(e)}function h(){const e=i.formData||{},o=String(e.apiKey||"");return JSON.stringify(p({channelId:i.editingChannel?.id||null,presetId:e.presetId||"",providerKey:e.providerKey||"",providerApi:e.providerApi||"",wireApi:e.wireApi||"",targetApi:e.targetApi||"",gatewaySourceType:e.gatewaySourceType||"",authMode:e.authMode||"",oauthProviderId:e.oauthProviderId||"",baseUrl:e.baseUrl||"",apiKeyMarker:o?`${o.length}:${o.slice(-4)}`:""}))}function f({clearOptions:e=!1}={}){i.formData.modelsFetching=!1,i.formData._modelsLoadedOnce=!1,i.formData._modelsFetchSignature=null,i.formData.modelsFetchError=null,i.formData.modelsFetchErrorHint=null,i.formData.modelsFetchMeta=null,e&&(i.formData.availableModels=[])}async function v(){if(!l.fetchModelsForChannel||i.formData.modelsFetching)return;const e=h();(i.formData.availableModels||[]).length>0&&i.formData._modelsLoadedOnce&&i.formData._modelsFetchSignature===e||await S({signature:e})}const m=Do(()=>i.formData.modelsFetching?"正在加载模型":i.formData.modelsFetchError?"重试加载模型":(i.formData.availableModels||[]).length>0?"刷新可选模型":"加载可选模型"),g=Do(()=>{if(i.formData.modelsFetching)return"正在读取模型列表,仍可继续填写表单。";if(i.formData.modelsFetchError){const e=i.formData.modelsFetchErrorHint,o=i.formData.modelsFetchMeta?.stale&&i.formData.modelsFetchMeta?.retryAfter?`当前使用缓存目录,${new Date(i.formData.modelsFetchMeta.retryAfter).toLocaleString()} 后可自动重试,也可手动刷新。`:"";return`${e?`模型列表未能更新:${i.formData.modelsFetchError}。${e}`:`模型列表未能更新:${i.formData.modelsFetchError}。可重试或手动填写模型名称。`}${o?` ${o}`:""}`}const e=i.formData.modelsFetchMeta;if(e?.stale&&e?.retryAfter)return`正在使用缓存的模型目录;${new Date(e.retryAfter).toLocaleString()} 后可自动重试,也可手动刷新。`;if(e?.stale)return"正在使用已过期的模型目录;可点击“刷新可选模型”更新。";if(e?.cached)return"已从本地缓存加载可选模型。";const o=(i.formData.availableModels||[]).length;return o>0?`已加载 ${o} 个可选模型。`:"可手动填写模型名称,或加载该渠道的可选模型。"});function b(e){return e.fields?.some(e=>(!e.showWhen||e.showWhen(i.formData))&&function(e){return!!["model-redirect","model-multi-select","autocomplete"].includes(e.type)||"select"===e.type&&["model","speedTestModel"].includes(e.key)}(e))&&Boolean(l.fetchModelsForChannel)}async function y(){if(!l.fetchModelsForChannel||i.formData.modelsFetching)return;const e=h();await S({forceRefresh:i.formData._modelsLoadedOnce&&i.formData._modelsFetchSignature===e,signature:e})}async function x(){if("function"==typeof l.fetchModelMetadataForChannel&&!i.formData.modelMetadataFetching){i.formData.modelMetadataFetching=!0,i.formData.modelMetadataStatus="正在读取 OMP metadata…";try{await l.fetchModelMetadataForChannel(i.formData)}catch(e){i.formData.modelMetadataStatus=e?.response?.data?.error||e?.message||"读取 OMP metadata 失败"}finally{i.formData.modelMetadataFetching=!1}}}const C=Do(()=>{if(!l.presets)return[];const e={};return l.presets.forEach(o=>{const t=o.category||"custom";e[t]||(e[t]={type:"group",label:l.presetCategories?.[t]||t,key:t,children:[]}),e[t].children.push({label:o.name,value:o.id})}),Object.values(e)});function w(e){if(l.onPresetChange){const o=l.onPresetChange(e,i.formData);Object.assign(i.formData,o)}else i.formData.presetId=e;f({clearOptions:!0})}async function S({forceRefresh:e=!1,signature:o=h()}={}){if(l.fetchModelsForChannel){i.formData.modelsFetching=!0,i.formData.modelsFetchError=null,i.formData.modelsFetchErrorHint=null,i.formData.modelsFetchMeta=null;try{await l.fetchModelsForChannel(i.editingChannel?.id||null,i.formData,{forceRefresh:e})}catch(t){h()===o&&(i.formData.modelsFetchError=t?.message||"获取模型列表失败",i.formData.modelsFetchErrorHint="可重试,或先手动填写模型名称")}finally{h()===o&&(i.formData.modelsFetching=!1)}if(h()!==o)return void f({clearOptions:!0});i.formData._modelsLoadedOnce=!0,i.formData._modelsFetchSignature=o}}function k(e,o){if(!o.includes("."))return e[o];const t=o.split(".");let n=e;for(const r of t)n=n?.[r];return n}function P(e,o,t){if(!o.includes("."))return void(e[o]=t);const n=o.split(".");let r=e;for(let a=0;a<n.length-1;a++)r[n[a]]||(r[n[a]]={}),r=r[n[a]];r[n[n.length-1]]=t}function T(e){const o=i.formData.availableModels||[];if(!e||!o.length)return o;const t=e.toLowerCase();return o.filter(e=>(e.label||e.value||"").toLowerCase().includes(t))}function I(e,o){const t=[],n=new Set,r=e=>{for(const o of e||[]){const e=String(o?.value||"").trim();if(!e)continue;const r=e.toLowerCase();n.has(r)||(n.add(r),t.push({label:o?.label||e,value:e}))}};r(i.formData.availableModels||[]),r(o||[]);const a=t;if(!e||!a.length)return a;const l=e.toLowerCase();return a.filter(e=>(e.label||e.value||"").toLowerCase().includes(l))}function z(e){const o=e.replace(/\./g,"_");return s[o]?.status||s[e]?.status}function M(e){const o=e.replace(/\./g,"_");return s[o]?.message||s[e]?.message}function R(e){if("function"!=typeof e.getStatus)return{tags:[],message:""};const o=e.getStatus(i.formData)||{};return{tags:Array.isArray(o.tags)?o.tags:[],message:o.message||"",warning:!0===o.warning}}const A={getChannelInflight:d,getChannelBalance:e=>i.balances[e.id]||null,formatFreeze:e=>`冻结 ${e||0}s`,maskApiKey:e=>void 0===e?"已隐藏":e?e.length<=12?"******":`${e.slice(0,8)}******${e.slice(-4)}`:"(未设置)",handleResetHealth:e=>c.handleResetHealth(e),handleRefreshBalance:e=>c.handleRefreshBalance(e),handleOpenWebsite:e=>r("open-website",e)};function F(e){const o=d(e.id),t=e.maxConcurrency?`${o}/${e.maxConcurrency}`:o>0?o:"不限";return{weight:e.weight||1,concurrencyText:t,concurrencyActive:o>0}}function $(e){switch(e.type){case"password":case"text":case"textarea":default:return ic;case"number":return Qf;case"switch":return bv;case"radio-group":return Ld}}function O(e){const o={placeholder:e.placeholder};return"password"===e.type&&(o.type="password",o["show-password-on"]="click"),"textarea"===e.type&&(o.type="textarea",o.autosize=e.autosize||{minRows:5,maxRows:16}),"number"===e.type&&(o.min=e.min??1,o.max=e.max??100,o.step=e.step??1,o.clearable=e.clearable,o.style="width: 100%;"),e.disabledOnEdit&&i.editingChannel&&(o.disabled=!0),o}return o({openAddDialog:c.openAddDialog,syncCurrentChannels:c.handleSyncCurrentChannels,refresh:c.loadChannels}),(o,t)=>(Ao(),ut("div",null,[Qo(i).loading?(Ao(),ut("div",ly,[Po(Qo(hv),{size:"small"})])):(Ao(),ut("div",iy,[0===Qo(i).channels.length?(Ao(),ut("div",sy,[Po(Qo(ds),{description:Qo(l).emptyDescription},Mo({_:2},[Qo(l).showEmptyAction?{name:"extra",fn:Uo(()=>[Po(Qo(Ne),{type:"primary",size:"small",onClick:Qo(c).openAddDialog},{icon:Uo(()=>[Po(Qo(we),null,{default:Uo(()=>[Po(Qo(Et))]),_:1})]),default:Uo(()=>[vo(" "+Bo(Qo(l).emptyActionText),1)]),_:1},8,["onClick"])]),key:"0"}:void 0]),1032,["description"])])):(Ao(),ut("div",cy,[(Ao(!0),ut(No,null,Co(Qo(i).channels,e=>(Ao(),zo(Tg,{key:e.id,channel:e,collapsed:Qo(i).collapsed[e.id],"header-tags":Qo(l).getHeaderTags(e,A),balance:A.getChannelBalance(e),"info-rows":Qo(l).buildInfoRows(e,A),meta:F(e),"show-apply-button":Qo(l).showApplyButton,"channel-type":Qo(l).type,"test-fn":Qo(l).testFn,toggling:!!Qo(i).toggling[e.id],onToggleCollapse:o=>Qo(c).toggleCollapse(e.id),onApply:o=>Qo(c).handleApplyToSettings(e),onEdit:o=>Qo(c).handleEdit(e),onDelete:o=>Qo(c).handleDelete(e.id),onToggleEnabled:o=>Qo(c).handleToggleEnabled(e,o),onRefreshBalance:o=>Qo(c).handleRefreshBalance(e),onOpenWebsite:t[0]||(t[0]=e=>r("open-website",e))},null,8,["channel","collapsed","header-tags","balance","info-rows","meta","show-apply-button","channel-type","test-fn","toggling","onToggleCollapse","onApply","onEdit","onDelete","onToggleEnabled","onRefreshBalance"]))),128))]))])),Po(Qo(Jn),{show:Qo(i).showDialog,"onUpdate:show":t[7]||(t[7]=e=>Qo(i).showDialog=e),preset:"card",title:Qo(i).editingChannel?Qo(l).editTitle:Qo(l).addTitle,class:"channel-dialog",style:Ko({width:Qo(l).modalWidth+"px",maxHeight:"80vh"}),"content-style":{maxHeight:"calc(80vh - 100px)",overflowY:"auto"}},{footer:Uo(()=>[pt("div",gy,[Po(Qo(Ne),{onClick:Qo(c).closeDialog},{default:Uo(()=>[...t[9]||(t[9]=[vo("取消",-1)])]),_:1},8,["onClick"]),Po(Qo(Ne),{type:"primary",onClick:Qo(c).handleSave},{default:Uo(()=>[vo(Bo(Qo(i).editingChannel?"保存修改":"添加渠道"),1)]),_:1},8,["onClick"])])]),default:Uo(()=>[Po(Qo(lf),{"label-placement":"left","label-width":Qo(l).formLabelWidth,class:"channel-form"},{default:Uo(()=>[(Ao(!0),ut(No,null,Co(Qo(l).formSections,o=>(Ao(),ut(No,{key:o.title},[!o.showWhen||o.showWhen(Qo(i).formData)?(Ao(),ut("div",{key:0,class:qo(["form-section",{collapsible:o.collapsible}])},[pt("div",dy,[vo(Bo(o.title)+" ",1),o.description?(Ao(),ut("span",uy,Bo(o.description),1)):fo("",!0)]),b(o)?(Ao(),ut("div",py,[Po(Qo(Ne),{text:"",type:"primary",size:"tiny",loading:Qo(i).formData.modelsFetching,onClick:y},{default:Uo(()=>[vo(Bo(m.value),1)]),_:1},8,["loading"]),pt("span",{class:qo(["model-catalog-status",{"is-error":Qo(i).formData.modelsFetchError,"is-loading":Qo(i).formData.modelsFetching}]),role:"status","aria-live":"polite"},Bo(g.value),3)])):fo("",!0),(Ao(!0),ut(No,null,Co(o.fields,o=>ct((Ao(),zo(Qo(Lf),{label:u(o),"label-style":o.fullWidth?{display:"none"}:void 0,required:o.required,"validation-status":z(o.key),feedback:M(o.key)},{default:Uo(()=>["channel-auth"===o.type?(Ao(),zo(Zg,{key:0,platform:e.type,"channel-id":Qo(i).editingChannel?.id||"","form-data":Qo(i).formData,"auth-meta":Qo(i).authMeta,onUpdateAuth:t[1]||(t[1]=e=>{Qo(i).formData.authMode="oauth",Qo(i).formData.authRef=e.authRef,Qo(i).formData.authSource=e.authSource,Qo(i).formData.authStatus=e.authStatus,Qo(i).formData.oauthProviderId=e.oauthProviderId||e.authRef?.providerId||""})},null,8,["platform","channel-id","form-data","auth-meta"])):"preset"===o.type?(Ao(),zo(Qo(pd),{key:1,value:Qo(i).formData.presetId,options:C.value,placeholder:o.placeholder,"onUpdate:value":w},null,8,["value","options","placeholder"])):"model-redirect"===o.type?(Ao(),zo(Kg,{key:2,modelValue:Qo(i).formData.modelRedirects,"onUpdate:modelValue":t[2]||(t[2]=e=>Qo(i).formData.modelRedirects=e),"available-models":Qo(i).formData.availableModels,"channel-type":Qo(l).type,onFocusin:v},null,8,["modelValue","available-models","channel-type"])):"auth-provider-status"===o.type?(Ao(),ut("div",hy,[R(o).tags.length>0?(Ao(),zo(Qo(mp),{key:0,size:"small",class:"auth-provider-tags"},{default:Uo(()=>[(Ao(!0),ut(No,null,Co(R(o).tags,e=>(Ao(),zo(Qo(Es),{key:e.text,size:"small",type:e.type||"default",bordered:!1},{default:Uo(()=>[vo(Bo(e.text),1)]),_:2},1032,["type"]))),128))]),_:2},1024)):fo("",!0),R(o).message?(Ao(),ut("div",{key:1,class:qo(["auth-provider-message",{warning:R(o).warning}])},Bo(R(o).message),3)):fo("",!0)])):"model-multi-select"===o.type?(Ao(),zo(Qo(pd),{key:4,value:Qo(i).formData.allowedModels,"onUpdate:value":t[3]||(t[3]=e=>Qo(i).formData.allowedModels=e),options:Qo(i).formData.availableModels||[],placeholder:o.placeholder,loading:Qo(i).formData.modelsFetching,multiple:"",filterable:"",clearable:"",tag:"",onFocus:v},null,8,["value","options","placeholder","loading"])):"select"===o.type&&"speedTestModel"===o.key?(Ao(),zo(Qo(gc),{key:5,value:Qo(i).formData.speedTestModel,options:I(Qo(i).formData.speedTestModel,o.options),placeholder:o.placeholder,loading:Qo(i).formData.modelsFetching,"get-show":()=>!0,clearable:"",onFocus:v,"onUpdate:value":t[4]||(t[4]=e=>Qo(i).formData.speedTestModel=e)},null,8,["value","options","placeholder","loading"])):"select"===o.type&&"model"===o.key?(Ao(),zo(Qo(gc),{key:6,value:Qo(i).formData.model,options:I(Qo(i).formData.model,o.options),placeholder:o.placeholder,loading:Qo(i).formData.modelsFetching,"get-show":()=>!0,clearable:"",onFocus:v,"onUpdate:value":t[5]||(t[5]=e=>Qo(i).formData.model=e)},null,8,["value","options","placeholder","loading"])):"autocomplete"===o.type?(Ao(),zo(Qo(gc),{key:7,value:k(Qo(i).formData,o.key),options:T(k(Qo(i).formData,o.key)),placeholder:o.placeholder,loading:Qo(i).formData.modelsFetching,"get-show":()=>!0,onFocus:v,"onUpdate:value":e=>P(Qo(i).formData,o.key,e)},null,8,["value","options","placeholder","loading","onUpdate:value"])):"radio-group"===o.type?(Ao(),zo(Qo(Ld),{key:8,value:k(Qo(i).formData,o.key),"onUpdate:value":e=>P(Qo(i).formData,o.key,e)},{default:Uo(()=>[Po(Qo(mp),null,{default:Uo(()=>[(Ao(!0),ut(No,null,Co(o.options,e=>(Ao(),zo(Qo(_d),{key:e.value,value:e.value},{default:Uo(()=>[vo(Bo(e.label),1)]),_:2},1032,["value"]))),128))]),_:2},1024)]),_:2},1032,["value","onUpdate:value"])):"model-definitions"===o.type?(Ao(),ut("div",fy,[pt("div",vy,[Po(Qo(Ne),{size:"tiny",secondary:"",loading:Qo(i).formData.modelMetadataFetching,onClick:x},{default:Uo(()=>[...t[8]||(t[8]=[vo(" 自动获取 Metadata ",-1)])]),_:1},8,["loading"]),pt("span",my,Bo(Qo(i).formData.modelMetadataStatus||"Metadata 读取 Models.dev 离线快照;模型列表按钮才探测渠道,普通保存不会启动网络或 OMP 命令。"),1)]),Po(Qo(ic),{value:Qo(i).formData.modelDefinitionsJson,type:"textarea",autosize:{minRows:8,maxRows:20},placeholder:o.placeholder,"onUpdate:value":t[6]||(t[6]=e=>Qo(i).formData.modelDefinitionsJson=e)},null,8,["value","placeholder"])])):(Ao(),zo(Fo($(o)),mo({key:10,value:k(Qo(i).formData,o.key)},{ref_for:!0},O(o),{"onUpdate:value":e=>P(Qo(i).formData,o.key,e)}),null,16,["value","onUpdate:value"]))]),_:2},1032,["label","label-style","required","validation-status","feedback"])),[[Wo,!o.showWhen||o.showWhen(Qo(i).formData)]])),256))],2)):fo("",!0)],64))),128))]),_:1},8,["label-width"])]),_:1},8,["show","title","style"])]))}},yy=qe(by,[["__scopeId","data-v-95ee536c"]]),xy={__name:"ClaudeChannelPanel",emits:["open-website"],setup(e,{expose:o,emit:t}){const n=t,r=it(null);return o({openAddDialog:()=>r.value?.openAddDialog(),syncCurrentChannels:()=>r.value?.syncCurrentChannels(),refresh:()=>r.value?.refresh()}),(e,o)=>(Ao(),zo(yy,{ref_key:"baseRef",ref:r,type:"claude",onOpenWebsite:o[0]||(o[0]=e=>n("open-website",e))},null,512))}},Cy={__name:"CodexChannelPanel",emits:["open-website"],setup(e,{expose:o,emit:t}){const n=t,r=it(null);return o({openAddDialog:()=>r.value?.openAddDialog(),syncCurrentChannels:()=>r.value?.syncCurrentChannels(),refresh:()=>r.value?.refresh()}),(e,o)=>(Ao(),zo(yy,{ref_key:"baseRef",ref:r,type:"codex",onOpenWebsite:o[0]||(o[0]=e=>n("open-website",e))},null,512))}},wy={__name:"GeminiChannelPanel",emits:["open-website"],setup(e,{expose:o,emit:t}){const n=t,r=it(null);return o({openAddDialog:()=>r.value?.openAddDialog(),syncCurrentChannels:()=>r.value?.syncCurrentChannels(),refresh:()=>r.value?.refresh()}),(e,o)=>(Ao(),zo(yy,{ref_key:"baseRef",ref:r,type:"gemini",onOpenWebsite:o[0]||(o[0]=e=>n("open-website",e))},null,512))}},Sy={__name:"OpenCodeChannelPanel",emits:["open-website"],setup(e,{expose:o,emit:t}){const n=t,r=it(null);return o({openAddDialog:()=>r.value?.openAddDialog(),syncCurrentChannels:()=>r.value?.syncCurrentChannels(),refresh:()=>r.value?.refresh()}),(e,o)=>(Ao(),zo(yy,{ref_key:"baseRef",ref:r,type:"opencode",onOpenWebsite:o[0]||(o[0]=e=>n("open-website",e))},null,512))}},ky={__name:"OmpChannelPanel",emits:["open-website"],setup(e,{expose:o,emit:t}){const n=t,r=it(null);return o({openAddDialog:()=>r.value?.openAddDialog(),syncCurrentChannels:()=>r.value?.syncCurrentChannels(),refresh:()=>r.value?.refresh()}),(e,o)=>(Ao(),zo(yy,{ref_key:"baseRef",ref:r,type:"omp",onOpenWebsite:o[0]||(o[0]=e=>n("open-website",e))},null,512))}},Py={class:"proxy-logs"},Ty={class:"logs-header"},Iy={class:"header-left"},zy={class:"today-stats"},My={class:"logs-table"},Ry={key:0,class:"empty-state"},Ay={class:"action-message"},Fy={class:"action-time"},$y={class:"action-message"},Oy={class:"action-time"},By=["title"],Ey={key:0},_y={style:{"font-family":"monospace","font-size":"12px"}},Dy={key:0,style:{"margin-top":"4px"}},Ly={style:{"font-family":"monospace","font-size":"12px"}},Hy={key:1,style:{"margin-top":"6px",color:"#d97706","font-size":"12px"}},jy={key:1},Uy={class:"logs-footer"},Wy={class:"count"},Ny=qe({__name:"ProxyLogs",props:{source:{type:String,default:"claude"}},setup(e){const o=e,{logsBySource:t,wsConnected:n,clearLogsState:r,logLimit:a}=ng(),l=Do(()=>{const e=String(o.source||"").trim().toLowerCase();return(t.value[e]||[]).slice(0,a.value)});it(l.value.length);const i=it(null),s=it({requests:0,tokens:0});let c=null,d=null;function u(e,o){return e.usageMissing?"--":e.tokens?.[o]||0}async function p(){try{const e=(await _m(o.source))?.summary||{},t="object"==typeof e.tokens?e.tokens.total:e.tokens;s.value={requests:e.requests||0,tokens:t||0}}catch(e){}}async function h(){try{await async function(){return(await bt.post("/proxy/logs/clear")).data}(),r(),Mv.success("日志已清空")}catch(e){Mv.error("清空失败: "+e.message)}}return $o(l,e=>{const o=e[0]?.id||null;o&&o!==d?(d=o,(!i.value||i.value.scrollTop<20)&&yo(()=>{i.value&&(i.value.scrollTop=0)})):d=o}),$o(()=>o.source,()=>{p(),d=l.value[0]?.id||null}),Ro(()=>{p(),c=setInterval(()=>{p()},3e4)}),bo(()=>{c&&(clearInterval(c),c=null)}),(o,t)=>(Ao(),ut("div",Py,[pt("div",Ty,[pt("div",Iy,[t[0]||(t[0]=pt("h3",{class:"title"},"实时日志",-1)),pt("div",zy,[Po(Qo(Es),{size:"tiny",bordered:!1,type:"info"},{default:Uo(()=>[vo(" 今日请求: "+Bo(s.value.requests),1)]),_:1}),Po(Qo(Es),{size:"tiny",bordered:!1,type:"success"},{default:Uo(()=>{return[vo(" 今日Token: "+Bo((e=s.value.tokens,e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":e.toString())),1)];var e}),_:1})])]),Po(Qo(Ne),{text:"",size:"small",onClick:h},{default:Uo(()=>[Po(Qo(we),{size:"16"},{default:Uo(()=>[Po(Qo(en))]),_:1}),t[1]||(t[1]=vo(" 清空 ",-1))]),_:1})]),pt("div",My,[pt("div",{class:qo(["table-header",`table-header-${e.source}`])},[pt("div",{class:qo(["col col-channel",`col-channel-${e.source}`])},"渠道",2),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},"请求",2),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},"回复",2),"claude"===e.source?(Ao(),ut(No,{key:0},[pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},"写入",2),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},"命中",2)],64)):"codex"===e.source?(Ao(),ut(No,{key:1},[pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},"推理",2),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},"缓存",2),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},"总计",2)],64)):"gemini"===e.source?(Ao(),ut(No,{key:2},[pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},"缓存",2),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},"总计",2)],64)):"opencode"===e.source||"omp"===e.source?(Ao(),ut(No,{key:3},[pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},"推理",2),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},"缓存",2),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},"总计",2)],64)):fo("",!0),pt("div",{class:qo(["col col-time",`col-time-${e.source}`])},"时间",2)],2),pt("div",{class:"table-body",ref_key:"tableBody",ref:i},[0===l.value.length?(Ao(),ut("div",Ry," 暂无日志 ")):fo("",!0),(Ao(!0),ut(No,null,Co(l.value,o=>(Ao(),ut("div",{key:o.id,class:qo(["action"===o.type?"action-row":"error"===o.status?"error-row":"table-row",{"new-log":o.isNew}])},["action"===o.type?(Ao(),ut(No,{key:0},[Po(Qo(we),{size:"16",style:{color:"#18a058","margin-right":"8px"}},{default:Uo(()=>[Po(Qo(jt))]),_:1}),pt("span",Ay,Bo(o.message),1),pt("span",Fy,Bo(o.time),1)],64)):"error"===o.status?(Ao(),ut(No,{key:1},[Po(Qo(we),{size:"16",style:{color:"#d03050","margin-right":"8px"}},{default:Uo(()=>[Po(Qo(Yt))]),_:1}),pt("span",$y,Bo(o.channel)+": "+Bo(o.error||o.message||"请求失败"),1),pt("span",Oy,Bo(o.time),1)],64)):(Ao(),zo(Qo(Hd),{key:2,placement:"top",style:{maxWidth:"300px"}},{trigger:Uo(()=>[pt("div",{class:qo(["table-row-content",`table-row-content-${e.source}`])},[pt("div",{class:qo(["col col-channel",`col-channel-${e.source}`]),title:o.channel},[Po(Qo(Es),{size:"small",type:"success"},{default:Uo(()=>[vo(Bo(o.channel),1)]),_:2},1024)],10,By),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},Bo(u(o,"input")),3),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},Bo(u(o,"output")),3),"claude"===e.source?(Ao(),ut(No,{key:0},[pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},Bo(u(o,"cacheCreation")),3),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},Bo(u(o,"cacheRead")),3)],64)):"codex"===e.source?(Ao(),ut(No,{key:1},[pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},Bo(u(o,"reasoning")),3),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},Bo(u(o,"cached")),3),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},Bo(u(o,"total")),3)],64)):"gemini"===e.source?(Ao(),ut(No,{key:2},[pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},Bo(u(o,"cached")),3),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},Bo(u(o,"total")),3)],64)):"opencode"===e.source||"omp"===e.source?(Ao(),ut(No,{key:3},[pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},Bo(u(o,"reasoning")),3),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},Bo(u(o,"cached")),3),pt("div",{class:qo(["col col-token",`col-token-${e.source}`])},Bo(u(o,"total")),3)],64)):fo("",!0),pt("div",{class:qo(["col col-time",`col-time-${e.source}`])},Bo(o.time),3)],2)]),default:Uo(()=>[o.model?(Ao(),ut("div",Ey,[t[3]||(t[3]=pt("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"模型信息",-1)),pt("div",_y,Bo(o.model),1),o.originalModel&&o.originalModel!==o.model?(Ao(),ut("div",Dy,[t[2]||(t[2]=pt("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"模型重定向",-1)),pt("div",Ly,Bo(o.originalModel)+" → "+Bo(o.model),1)])):fo("",!0),o.usageMissing?(Ao(),ut("div",Hy," 上游响应未返回 usage,当前仅确认实际模型,无法计算 token。 ")):fo("",!0)])):(Ao(),ut("div",jy,"暂无模型信息"))]),_:2},1024))],2))),128))],512)]),pt("div",Uy,[pt("span",{class:qo(["status",{connected:Qo(n)}])},[Po(Qo(we),{size:"14"},{default:Uo(()=>[(Ao(),zo(Fo(Qo(n)?Qo(jt):Qo(Yt))))]),_:1}),vo(" "+Bo(Qo(n)?"已连接":"未连接"),1)],2),pt("span",Wy,"共 "+Bo(l.value.length)+" 条",1)])]))}},[["__scopeId","data-v-b403c421"]]);function Ky(e={}){return{...e.platform?{platform:e.platform}:{},...e.cwd?{cwd:e.cwd}:{},...e.scope?{scope:e.scope}:{}}}async function Vy(e="claude",o={}){return Xv(Jv("skills",e,o.scope||"user",o.cwd||""),t=>bt.get("/skills",{params:{platform:e,scope:o.scope||"user",...Ky(o)},signal:t}).then(e=>e.data),"skills",`skills:${e}`)}async function qy(e="claude",o={}){return(await bt.post("/skills/refresh",{platform:e,scope:o.scope||"user",...o.cwd?{cwd:o.cwd}:{}})).data}async function Gy(e,o={}){return(await bt.get(`/skills/refresh/${encodeURIComponent(e)}`,{params:Ky(o)})).data}async function Yy(e,o,t="claude",n={}){return(await bt.put("/skills/toggle",{controlKey:e,enabled:o,platform:t,scope:n.scope||"user",...n.cwd?{cwd:n.cwd}:{}})).data}async function Jy(e,o,t="claude",n={}){return(await bt.put("/skills/trust",{controlKey:e,trust:o,platform:t,scope:n.scope||"user",...n.cwd?{cwd:n.cwd}:{}})).data}async function Xy(){return(await bt.get("/skills/omp-settings")).data}async function Zy(e){return(await bt.put("/skills/omp-settings",e)).data}async function Qy(e,o="claude",t=null,n=null,r={}){const a={platform:o,...Ky(r)};n&&(a.fullDirectory=n),t&&(t.id&&(a.repoId=t.id),t.provider&&(a.provider=t.provider),t.host&&(a.host=t.host),t.owner&&(a.owner=t.owner),t.name&&(a.name=t.name),t.branch&&(a.branch=t.branch),t.directory&&(a.directory=t.directory),t.projectPath&&(a.projectPath=t.projectPath),t.localPath&&(a.localPath=t.localPath),t.repoUrl&&(a.repoUrl=t.repoUrl));return Xv(Jv(`skill-detail:${e}:${n||""}`,o,r.scope||"",`${r.cwd||""}:${t?.localPath||t?.projectPath||""}`),o=>bt.get(`/skills/detail/${e}`,{params:a,signal:o}).then(e=>e.data),"skill-detail",`skill-detail:${o}`)}async function ex(e,o="claude"){return(await bt.post("/skills/create",{...e,platform:o})).data}async function ox(e="claude"){return(await bt.get("/skills/repos",{params:{platform:e}})).data}async function tx(e,o="claude"){return(await bt.post("/skills/repos",{...e,platform:o})).data}async function nx(e,o="claude"){return(await bt.delete("/skills/repos",{params:{platform:o,id:e.id||"",owner:e.owner||"",name:e.name||"",directory:e.directory||""}})).data}async function rx(e,o,t="claude"){return(await bt.put("/skills/repos/toggle",{id:e.id||"",owner:e.owner||"",name:e.name||"",enabled:o,directory:e.directory||"",platform:t})).data}async function ax(e,o={},t="claude"){return(await bt.put("/skills/repos/auth",{id:e.id||"",owner:e.owner||"",name:e.name||"",directory:e.directory||"",token:o.token||"",clearToken:!!o.clearToken,platform:t})).data}async function lx(e,o="claude"){return(await bt.post("/skills/create-with-files",{...e,platform:o})).data}var ix={class:"right-panel"},sx={class:"toolbar-section"},cx={class:"toolbar-left"},dx={class:"toolbar-right"},ux={class:"panel-header"},px={class:"header-title"},hx={class:"header-actions"},fx={class:"channels-scroll-area"},vx={key:1,class:"channels-section channels-unsupported"},mx={__name:"RightPanel",props:{showChannels:{type:Boolean,default:!0},showLogs:{type:Boolean,default:!0},proxyRunning:{type:Boolean,default:!1},proxyLoading:{type:Boolean,default:!1}},emits:["proxy-toggle","show-recent"],setup(e,{emit:o}){const t=at(),n=e,r=o,a=Do(()=>It(t)),{getPlatform:l}=cr(),i=Do(()=>l(a.value)),s=it(null),c=it(!1),d=it(0),u={claude:xy,codex:Cy,gemini:wy,opencode:Sy,omp:ky},p=Do(()=>u[a.value]||yy),h=Do(()=>u[a.value]?{}:{type:a.value});function f(e){return!0===i.value?.capabilities?.[e]||!0===i.value?.resourceTypes?.[e]}function v(e){return f(e)||!0===i.value?.resourceTypes?.[e]}Do(()=>["skills","commands","agents","plugins"].some(v));const m=Do(()=>v("skills")),g=Do(()=>v("commands")),b=Do(()=>v("plugins")),y=Do(()=>v("agents")),x=Do(()=>i.value?.proxyLabels?.toggle||"动态切换");async function C(){if(m.value)try{const e=await Vy(a.value);e.success&&e.skills&&(d.value=e.skills.filter(e=>e.enabled).length)}catch(e){}else d.value=0}const w=Do(()=>`${i.value?.label||i.value?.title||a.value} 渠道管理`);function S(e){window.open(e,"_blank")}function k(){s.value?.openAddDialog?.()}async function P(){const e=s.value;if(e?.syncCurrentChannels&&!c.value){c.value=!0;try{await e.syncCurrentChannels()}finally{c.value=!1}}}function T(e){const o=String(e?.detail?.channel||"").trim().toLowerCase();o&&o!==a.value||s.value?.refresh?.()}function I(e){r("proxy-toggle",e)}function z(){r("show-recent")}function M(e){e?.currentTarget?.blur?.()}function R(e){window.dispatchEvent(new CustomEvent("open-skills-drawer",{detail:{platform:a.value}})),M(e)}function A(e){window.dispatchEvent(new CustomEvent("open-commands-drawer",{detail:{platform:a.value}})),M(e)}function F(e){window.dispatchEvent(new CustomEvent("open-agents-drawer",{detail:{platform:a.value}})),M(e)}function $(e){window.dispatchEvent(new CustomEvent("open-plugins-drawer",{detail:{platform:a.value}})),M(e)}return Ro(()=>{C(),"undefined"!=typeof window&&window.addEventListener("channel-management-refresh",T)}),$o(()=>a.value,()=>{C()}),$o(()=>n.proxyRunning,()=>{}),bo(()=>{"undefined"!=typeof window&&window.removeEventListener("channel-management-refresh",T)}),(o,t)=>(Ao(),ut("div",ix,[pt("div",sx,[pt("div",cx,[Po(Qo(xv),{depth:"3",class:"toolbar-label"},{default:Uo(()=>[vo(Bo(x.value),1)]),_:1}),f("proxy")?(Ao(),zo(Qo(bv),{key:0,value:e.proxyRunning,loading:e.proxyLoading,disabled:e.proxyLoading,size:"small","onUpdate:value":I},null,8,["value","loading","disabled"])):(Ao(),zo(Qo(xv),{key:1,depth:"3",class:"toolbar-label"},{default:Uo(()=>[...t[0]||(t[0]=[vo("当前平台暂无代理控制",-1)])]),_:1})),m.value&&d.value>0?(Ao(),zo(Qo(Es),{key:2,type:"success",size:"small",bordered:!1},{default:Uo(()=>[vo(Bo(d.value)+" 技能 ",1)]),_:1})):fo("",!0)]),pt("div",dx,[m.value?(Ao(),zo(Qo(Hd),{key:0,trigger:"hover"},{trigger:Uo(()=>[Po(Qo(Ne),{text:"",size:"small",class:"toolbar-btn",onClick:R},{icon:Uo(()=>[Po(Qo(we),{size:18},{default:Uo(()=>[Po(Qo(Ut))]),_:1})]),_:1})]),default:Uo(()=>[t[1]||(t[1]=vo(" Skills 技能 ",-1))]),_:1})):fo("",!0),b.value?(Ao(),zo(Qo(Hd),{key:1,trigger:"hover"},{trigger:Uo(()=>[Po(Qo(Ne),{text:"",size:"small",class:"toolbar-btn",onClick:$},{icon:Uo(()=>[Po(Qo(we),{size:18},{default:Uo(()=>[Po(Qo(on))]),_:1})]),_:1})]),default:Uo(()=>[t[2]||(t[2]=vo(" Plugins 插件 ",-1))]),_:1})):fo("",!0),g.value||y.value?(Ao(),ut(No,{key:2},[g.value?(Ao(),zo(Qo(Hd),{key:0,trigger:"hover"},{trigger:Uo(()=>[Po(Qo(Ne),{text:"",size:"small",class:"toolbar-btn",onClick:A},{icon:Uo(()=>[Po(Qo(we),{size:18},{default:Uo(()=>[Po(Qo(Wt))]),_:1})]),_:1})]),default:Uo(()=>[t[3]||(t[3]=vo(" Commands 命令 ",-1))]),_:1})):fo("",!0),y.value?(Ao(),zo(Qo(Hd),{key:1,trigger:"hover"},{trigger:Uo(()=>[Po(Qo(Ne),{text:"",size:"small",class:"toolbar-btn",onClick:F},{icon:Uo(()=>[Po(Qo(we),{size:18},{default:Uo(()=>[Po(Qo(At))]),_:1})]),_:1})]),default:Uo(()=>[t[4]||(t[4]=vo(" Agents 代理 ",-1))]),_:1})):fo("",!0)],64)):fo("",!0),f("sessions")?(Ao(),zo(Qo(Hd),{key:3,trigger:"hover"},{trigger:Uo(()=>[Po(Qo(Ne),{text:"",size:"small",class:"toolbar-btn",onClick:z},{icon:Uo(()=>[Po(Qo(we),{size:18},{default:Uo(()=>[Po(Qo(Ot))]),_:1})]),_:1})]),default:Uo(()=>[t[5]||(t[5]=vo(" 最新对话 ",-1))]),_:1})):fo("",!0)])]),e.showChannels&&f("channels")?(Ao(),ut("div",{key:0,class:qo(["channels-section",{"full-height":!e.showLogs||!f("nativeLogs")}])},[pt("div",ux,[pt("div",px,[pt("h3",null,Bo(w.value),1),Po(Qo(xv),{depth:"3",class:"header-hint"},{default:Uo(()=>[...t[6]||(t[6]=[vo("启用渠道优先显示",-1)])]),_:1})]),pt("div",hx,[Po(Qo(Ne),{secondary:"",size:"small",loading:c.value,disabled:c.value,onClick:P},{icon:Uo(()=>[Po(Qo(we),null,{default:Uo(()=>[Po(Qo(Zt))]),_:1})]),default:Uo(()=>[t[7]||(t[7]=vo(" 同步 ",-1))]),_:1},8,["loading","disabled"]),Po(Qo(Ne),{type:"primary",size:"small",onClick:k},{icon:Uo(()=>[Po(Qo(we),null,{default:Uo(()=>[Po(Qo(Et))]),_:1})]),default:Uo(()=>[t[8]||(t[8]=vo(" 添加 ",-1))]),_:1})])]),pt("div",fx,[(Ao(),zo(Fo(p.value),mo({ref_key:"currentPanelRef",ref:s},h.value,{onOpenWebsite:S}),null,16))])],2)):e.showChannels?(Ao(),ut("div",vx,[Po(Qo(Ys),{type:"info","show-icon":!1},{default:Uo(()=>[vo(Bo(w.value)+" 未声明渠道管理能力。 ",1)]),_:1})])):fo("",!0),e.showLogs&&f("nativeLogs")?(Ao(),ut("div",{key:2,class:qo(["logs-section",{"full-height":!e.showChannels}])},[Po(Ny,{source:a.value},null,8,["source"])],2)):fo("",!0)]))}},gx=qe(mx,[["__scopeId","data-v-8cdfe9a9"]]),bx={class:"layout"},yx={class:"panel-security-auth"},xx={class:"header"},Cx={class:"logo-wrapper"},wx=["alt"],Sx={class:"nav-tabs"},kx=["onClick"],Px={class:"nav-label"},Tx={class:"header-actions"},Ix={class:"env-warning-count"},zx={class:"favorites-button-wrapper"},Mx={key:0,class:"favorites-badge"},Rx={class:"more-menu-trigger","aria-label":"更多工具"},Ax={class:"main-container"},Fx={key:0,class:"global-loading-overlay"},$x={class:"left-content"},Ox="coding-tool-x",Bx={__name:"Layout",setup(e){const o=Jo(()=>ur(()=>import("./RecentSessionsDrawer-3eXamJhr.js").then(e=>e.n),__vite__mapDeps([9,1,2,6,10,11,12,13,5,3,7,14,15,16,17]))),t=Jo(()=>ur(()=>import("./FavoritesDrawer-D6QSiYaL.js"),__vite__mapDeps([59,1,2,6,20,8,11,10,12,13,5,3,7,14,15,16,22,60]))),n=Jo(()=>ur(()=>import("./ChatHistoryDrawer-CwzJHyNP.js"),__vite__mapDeps([38,1,2,6,10,11,14,32,34,13,5,3,7,39]))),r=Jo(()=>ur(()=>import("./SettingsDrawer-u_vwUuPS.js"),__vite__mapDeps([61,1,2,5,3,4,6,7,8,20,11,43,10,12,62]))),a=Jo(()=>ur(()=>import("./McpDrawer-Ch3bkKIq.js"),__vite__mapDeps([63,1,2,5,3,6,20,8,11,26,27,10,12,28,29,14,64]))),l=Jo(()=>ur(()=>import("./PromptsDrawer-Cfb2FeeU.js"),__vite__mapDeps([65,1,2,5,3,6,10,11,12,33,32,34,35,66]))),i=Jo(()=>ur(()=>import("./SpeedTestDrawer-BgfG1Ked.js"),__vite__mapDeps([67,1,2,6,10,11,12,68]))),s=Jo(()=>ur(()=>import("./GatewayConvertDrawer-RvET6iNG.js"),__vite__mapDeps([69,1,2,3,6,10,11,12,70]))),c=Jo(()=>ur(()=>import("./SkillsDrawer-CkF3BpyC.js"),__vite__mapDeps([71,1,2,10,11,12,30,4,5,3,6,7,8,20,25,14,31,32,33,34,35,28,36,37,72]))),d=Jo(()=>ur(()=>import("./CommandsDrawer-vDghB1U9.js"),__vite__mapDeps([73,1,2,5,3,4,6,7,20,8,11,25,14,10,12,33,32,34,35,74]))),u=Jo(()=>ur(()=>import("./AgentsDrawer-Db9wAyaZ.js"),__vite__mapDeps([75,1,2,5,3,4,6,7,20,8,11,25,14,10,12,33,32,34,35,76]))),p=Jo(()=>ur(()=>import("./PluginsDrawer-deKQ5u3I.js"),__vite__mapDeps([77,1,2,10,11,12,54,5,3,4,6,7,8,20,25,14,32,36,55,78]))),h=Jo(()=>ur(()=>import("./WorkspaceDrawer-Br5CeCzL.js"),__vite__mapDeps([79,1,2,42,6,8,20,11,43,14,44,5,3,45,10,12,80]))),f=Jo(()=>ur(()=>import("./ConfigTemplatesDrawer-CbsJp76X.js"),__vite__mapDeps([81,1,2,48,6,8,20,11,27,43,32,34,33,35,44,5,3,49,10,12,82]))),v=Jo(()=>ur(()=>import("./ConfigExportDrawer-C-XDvlHc.js"),__vite__mapDeps([83,1,2,5,3,6,31,8,20,11,43,10,12,84]))),{isDark:m,toggleTheme:g}=tg(),{getProxyState:b,startProxy:y,stopProxy:x}=ng(),{totalFavorites:C}=lg(),{dashboardData:w,isLoading:S,loadDashboard:k}=ig(),P=Go(),T=at(),I=[{label:"配置模板",key:"config-templates"},{label:"配置导入/导出",key:"config-export"},{label:"渠道速度测试",key:"speed-test"},{type:"divider",key:"divider-1"},{label:"使用帮助",key:"help"},{label:"GitHub 仓库",key:"github"}],z=Do(()=>T.name),M=Do(()=>It(T)||null),{enabledPlatforms:R}=cr(),A=Do(()=>R.value.find(e=>e.key===M.value)||null),F=Do(()=>!0===A.value?.capabilities?.nativeLogs),$=Do(()=>Tt(R.value)),O=Do(()=>T.path),B=it(!0),E=it(!0),_=Do(()=>M.value&&(B.value||E.value&&F.value)),D=it(!1),L=it(!1),H=it(!1),j=it(!1),U=it(!1),W=it(!1),N=it(!1),K=it(!1),V=it(!1),q=it(!1),G=it(!1),Y=it(!1),J=it(""),X=it(""),Z=it(!1),Q=it(""),ee=it(!1),oe=it(""),te=it(!1),ne=it(""),re=it(""),ae=it(!1),le=it(null),ie=it(null),se=it(null),ce=_o(new Set);function de(e){return ce.has(e)}$o([se,le,ie,ae],([e,o,,t])=>{e&&o&&t&&e.open()},{flush:"post"});const ue=it([]),pe=it(!1),he=it(!1),fe=it(!1),ve=it(""),me=it(""),ge=it(!1),be=Do(()=>he.value&&!fe.value);function ye(){ve.value="",me.value="",ge.value=!1}async function xe(){if(ve.value){ge.value=!0,me.value="";try{const e=await async function(e){return(await bt.post("/security/verify",{password:e})).data}(ve.value);e.success?(fe.value=!0,ye()):me.value=e.error||"密码错误"}catch(e){me.value=e.response?.data?.error||"密码错误"}finally{ge.value=!1}}else me.value="请输入密码"}async function Ce(){try{const e=await Tv();e.success&&(ue.value=e.conflicts||[],0===ue.value.length&&(pe.value=!1))}catch(e){}}function Se(){pe.value=!1}function ke(){pe.value=!1,localStorage.setItem("envConflictNeverRemind","true")}const Pe=it(!1),Te=Do(()=>Boolean(b(M.value)?.value?.running)),Ie=Do(()=>Boolean(b(M.value)?.value?.loading));function ze(e,o){!function(e){ce.add(e)}(e),o.value=!0}function Me(){ze("recent",D)}function Re(){ze("favorites",L)}function Ae(){ze("settings",H)}function Fe(){ze("mcp",j)}function $e(){ze("prompts",U)}function Oe(){ze("workspace",V)}function Be(e){"config-templates"!==e?"config-export"!==e?"speed-test"!==e?"help"!==e?"github"===e&&window.open("https://github.com/ZeaoZhang/coding-tool","_blank"):K.value=!0:ze("speed-test",W):ze("config-export",G):ze("config-templates",q)}async function Ee(e){const o=M.value;if(!o)return;const t=function(e=M.value){return b(e)}(o);t.value.loading=!0;try{let t;t=e?await y(o):await x(o,{refreshChannelsDrawer:!0}),!1!==t.success?(Mv.success("omp"===o?e?"OMP 动态切换已启用":"OMP 已切换为单渠道直连模式":e?"代理已启动":"代理已停止"),e&&(E.value=!0),async function(){try{await Mt("panelVisibility","showChannels",B.value),await Mt("panelVisibility","showLogs",E.value)}catch(e){}}()):Mv.error(t.error||"操作失败")}catch(n){Mv.error(n.response?.data?.error||n.message||"操作失败")}finally{t.value.loading=!1}}function _e(e){const{showChannels:o,showLogs:t}=e.detail;B.value=o,E.value=t}function De(e){J.value=e?.detail?.platform||"",X.value=e?.detail?.cwd||e?.detail?.projectPath||"",ze("skills",Y)}function Le(e){Q.value=e?.detail?.platform||"",ze("commands",Z)}function He(e){oe.value=e?.detail?.platform||"",ze("agents",ee)}function je(e){ne.value=e?.detail?.platform||"",re.value=e?.detail?.cwd||e?.detail?.projectPath||"",ze("plugins",te)}function Ue(){"opencode"===M.value&&ze("gateway",N)}function We({session:e,channel:o}){le.value=e,ie.value=o,ae.value=!0}return Ro(()=>{!async function(){Pe.value=!0;try{const e=await qv();he.value=Boolean(e?.success&&e.hasPassword),fe.value=!he.value,he.value||ye()}catch(e){he.value=!1,fe.value=!0,ye()}finally{Pe.value=!1}}(),async function(){try{const e=await k();e&&e.uiConfig&&(B.value=!1!==e.uiConfig.panelVisibility?.showChannels,E.value=!1!==e.uiConfig.panelVisibility?.showLogs)}catch(e){}}(),window.addEventListener("panel-visibility-change",_e),window.addEventListener("open-skills-drawer",De),window.addEventListener("open-commands-drawer",Le),window.addEventListener("open-agents-drawer",He),window.addEventListener("open-plugins-drawer",je),window.addEventListener("open-gateway-convert-drawer",Ue),async function(){try{const e=await Tv();e.success&&e.conflicts?.length>0&&(ue.value=e.conflicts,"true"!==localStorage.getItem("envConflictNeverRemind")&&(pe.value=!0))}catch(e){}}()}),bo(()=>{window.removeEventListener("panel-visibility-change",_e),window.removeEventListener("open-skills-drawer",De),window.removeEventListener("open-commands-drawer",Le),window.removeEventListener("open-agents-drawer",He),window.removeEventListener("open-plugins-drawer",je),window.removeEventListener("open-gateway-convert-drawer",Ue)}),$o(()=>M.value,e=>{"opencode"!==e&&N.value&&(N.value=!1)}),(e,b)=>{const y=xo("router-link"),x=xo("router-view");return Ao(),ut("div",bx,[Po(Vv,{visible:pe.value,"onUpdate:visible":b[0]||(b[0]=e=>pe.value=e),conflicts:ue.value,onDeleted:Ce,onClose:b[1]||(b[1]=e=>pe.value=!1),onIgnore:Se,onNeverRemind:ke},null,8,["visible","conflicts"]),Po(Qo(Jn),{show:be.value,preset:"card",title:"验证访问密码","mask-closable":!1,"close-on-esc":!1,closable:!1,style:{width:"460px","max-width":"92vw"}},{default:Uo(()=>[pt("div",yx,[Po(Qo(xv),{depth:"3",style:{"font-size":"13px"}},{default:Uo(()=>[...b[22]||(b[22]=[vo(" 请输入访问密码后进入面板 ",-1)])]),_:1}),Po(Qo(ic),{value:ve.value,"onUpdate:value":b[2]||(b[2]=e=>ve.value=e),type:"password",placeholder:"访问密码","show-password-on":"click",autofocus:"",onKeydown:nt(xe,["enter"])},null,8,["value"]),me.value?(Ao(),zo(Qo(xv),{key:0,depth:"3",class:"panel-security-error"},{default:Uo(()=>[vo(Bo(me.value),1)]),_:1})):fo("",!0),Po(Qo(xv),{depth:"3",class:"panel-security-hint"},{default:Uo(()=>[b[24]||(b[24]=vo(" 忘记密码可在终端执行 ",-1)),Po(Qo(xv),{code:""},{default:Uo(()=>[...b[23]||(b[23]=[vo("ctx security reset",-1)])]),_:1}),b[25]||(b[25]=vo(" 关闭密码 ",-1))]),_:1}),Po(Qo(mp),{justify:"end",style:{"margin-top":"16px"}},{default:Uo(()=>[Po(Qo(Ne),{type:"primary",loading:ge.value,onClick:xe},{default:Uo(()=>[...b[26]||(b[26]=[vo(" 验证 ",-1)])]),_:1},8,["loading"])]),_:1})])]),_:1},8,["show"]),pt("header",xx,[Po(y,{class:"logo-section",to:{name:"home"},"aria-label":"返回首页"},{default:Uo(()=>[pt("div",Cx,[pt("img",{src:"/logo.png",alt:`${Ox} logo`,class:"logo-image"},null,8,wx)]),pt("div",{class:"title-group"},[pt("h1",{class:"title-main"},Bo(Ox)),b[27]||(b[27]=pt("span",{class:"title-sub"},"AI 编程工作台",-1))])]),_:1}),pt("div",Sx,[pt("div",{class:qo(["nav-tab",{active:"home"===z.value}]),onClick:b[3]||(b[3]=e=>Qo(P).push({name:"home"}))},[Po(Qo(we),{size:18,class:"nav-icon"},{default:Uo(()=>[Po(Qo(_t))]),_:1}),b[28]||(b[28]=pt("span",{class:"nav-label"},"Home",-1))],2),(Ao(!0),ut(No,null,Co($.value,e=>(Ao(),ut("div",{key:e.key,class:qo(["nav-tab",{active:M.value===e.key}]),onClick:o=>Qo(P).push({name:"cli-projects",params:{platform:e.key}})},[Po(Qo(we),{size:18,class:"nav-icon"},{default:Uo(()=>[(Ao(),zo(Fo(e.icon)))]),_:2},1024),pt("span",Px,Bo(e.label),1)],10,kx))),128)),pt("div",{class:qo(["nav-tab",{active:"analytics"===z.value}]),onClick:b[4]||(b[4]=e=>Qo(P).push({name:"analytics"}))},[Po(Qo(we),{size:18,class:"nav-icon"},{default:Uo(()=>[Po(Qo(Kt))]),_:1}),b[29]||(b[29]=pt("span",{class:"nav-label"},"Analytics",-1))],2)]),pt("div",Tx,[ue.value.length>0?(Ao(),zo(Qo(Hd),{key:0,trigger:"hover"},{trigger:Uo(()=>[pt("div",{class:"env-warning-btn",onClick:b[5]||(b[5]=e=>pe.value=!0)},[Po(Qo(we),{size:18,class:"env-warning-icon"},{default:Uo(()=>[Po(Qo(nn))]),_:1}),pt("span",Ix,Bo(ue.value.length),1)])]),default:Uo(()=>[vo(" 检测到 "+Bo(ue.value.length)+" 个环境变量冲突,点击查看 ",1)]),_:1})):fo("",!0),Po(Pv,{icon:Qo(m)?Qo(tn):Qo(Dt),tooltip:Qo(m)?"切换到亮色主题":"切换到暗色主题",onClick:Qo(g)},null,8,["icon","tooltip","onClick"]),b[30]||(b[30]=pt("div",{class:"header-divider"},null,-1)),pt("div",zx,[Po(Pv,{icon:Qo(Jt),tooltip:`我的收藏 (${Qo(C)})`,onClick:Re},null,8,["icon","tooltip"]),Qo(C)>0?(Ao(),ut("div",Mx,Bo(Qo(C)),1)):fo("",!0)]),Po(Pv,{icon:Qo(Lt),tooltip:"工作区管理",onClick:Oe},null,8,["icon"]),Po(Pv,{icon:Qo(Bt),tooltip:"Prompts 管理",onClick:$e},null,8,["icon"]),Po(Pv,{icon:Qo(qt),tooltip:"MCP 服务器管理",onClick:Fe},null,8,["icon"]),Po(Pv,{icon:Qo(Gt),tooltip:"设置",onClick:Ae},null,8,["icon"]),Po(Qo(tu),{trigger:"click",placement:"bottom-end",options:I,onSelect:Be},{default:Uo(()=>[pt("div",Rx,[Po(Pv,{icon:Qo(Rt),tooltip:"更多工具"},null,8,["icon"])])]),_:1})])]),pt("div",Ax,[Pe.value?(Ao(),ut("div",Fx,[Po(Qo(hv),{size:"large"},{description:Uo(()=>[...b[31]||(b[31]=[vo(" 加载配置中... ",-1)])]),_:1})])):fo("",!0),pt("div",$x,[Po(x,null,{default:Uo(({Component:e})=>[(Ao(),zo(Fo(e),{key:O.value}))]),_:1})]),_.value?(Ao(),zo(gx,{key:1,"show-channels":B.value,"show-logs":E.value,"proxy-running":Te.value,"proxy-loading":Ie.value,onProxyToggle:Ee,onShowRecent:Me},null,8,["show-channels","show-logs","proxy-running","proxy-loading"])):fo("",!0)]),de("recent")?(Ao(),zo(Qo(o),{key:0,visible:D.value,"onUpdate:visible":b[6]||(b[6]=e=>D.value=e),channel:M.value},null,8,["visible","channel"])):fo("",!0),de("favorites")?(Ao(),zo(Qo(t),{key:1,visible:L.value,"onUpdate:visible":b[7]||(b[7]=e=>L.value=e),onViewHistory:We},null,8,["visible"])):fo("",!0),le.value?(Ao(),zo(Qo(n),{key:2,ref_key:"chatHistoryRef",ref:se,show:ae.value,"onUpdate:show":b[8]||(b[8]=e=>ae.value=e),"project-name":le.value.projectName,"session-id":le.value.sessionId,"session-alias":le.value.alias,channel:ie.value},null,8,["show","project-name","session-id","session-alias","channel"])):fo("",!0),de("settings")?(Ao(),zo(Qo(r),{key:3,visible:H.value,"onUpdate:visible":b[9]||(b[9]=e=>H.value=e)},null,8,["visible"])):fo("",!0),de("mcp")?(Ao(),zo(Qo(a),{key:4,visible:j.value,"onUpdate:visible":b[10]||(b[10]=e=>j.value=e)},null,8,["visible"])):fo("",!0),de("prompts")?(Ao(),zo(Qo(l),{key:5,visible:U.value,"onUpdate:visible":b[11]||(b[11]=e=>U.value=e)},null,8,["visible"])):fo("",!0),de("speed-test")?(Ao(),zo(Qo(i),{key:6,visible:W.value,"onUpdate:visible":b[12]||(b[12]=e=>W.value=e)},null,8,["visible"])):fo("",!0),"opencode"===M.value&&de("gateway")?(Ao(),zo(Qo(s),{key:7,visible:N.value,"onUpdate:visible":b[13]||(b[13]=e=>N.value=e)},null,8,["visible"])):fo("",!0),de("workspace")?(Ao(),zo(Qo(h),{key:8,visible:V.value,"onUpdate:visible":b[14]||(b[14]=e=>V.value=e)},null,8,["visible"])):fo("",!0),de("config-templates")?(Ao(),zo(Qo(f),{key:9,visible:q.value,"onUpdate:visible":b[15]||(b[15]=e=>q.value=e)},null,8,["visible"])):fo("",!0),de("config-export")?(Ao(),zo(Qo(v),{key:10,visible:G.value,"onUpdate:visible":b[16]||(b[16]=e=>G.value=e)},null,8,["visible"])):fo("",!0),de("skills")?(Ao(),zo(Qo(c),{key:11,visible:Y.value,"onUpdate:visible":b[17]||(b[17]=e=>Y.value=e),platform:J.value,"project-path":X.value},null,8,["visible","platform","project-path"])):fo("",!0),de("commands")?(Ao(),zo(Qo(d),{key:12,visible:Z.value,"onUpdate:visible":b[18]||(b[18]=e=>Z.value=e),platform:Q.value},null,8,["visible","platform"])):fo("",!0),de("agents")?(Ao(),zo(Qo(u),{key:13,visible:ee.value,"onUpdate:visible":b[19]||(b[19]=e=>ee.value=e),platform:oe.value},null,8,["visible","platform"])):fo("",!0),de("plugins")?(Ao(),zo(Qo(p),{key:14,visible:te.value,"onUpdate:visible":b[20]||(b[20]=e=>te.value=e),platform:ne.value,"project-path":re.value},null,8,["visible","platform","project-path"])):fo("",!0),Po(Qo(Jn),{show:K.value,"onUpdate:show":b[21]||(b[21]=e=>K.value=e),preset:"card",title:`${Ox} 使用帮助`,style:{width:"800px","max-width":"90vw"}},{default:Uo(()=>[pt("div",{class:"help-content"},[pt("div",{class:"help-section"},[b[32]||(b[32]=pt("h4",null,"[START] 快速开始",-1)),pt("p",null,Bo(Ox)+" 是面向 Claude Code、Codex、Gemini 和 OpenCode 的统一 AI 编程工作台,提供会话管理、动态渠道切换、全局搜索与实时监控能力。"),b[33]||(b[33]=pt("h5",{style:{margin:"12px 0 8px 0","font-size":"13px",color:"#18a058"}},"[STAR] 最简单的启动方式:",-1)),b[34]||(b[34]=pt("div",{style:{background:"var(--bg-primary)",padding:"12px","border-radius":"6px",margin:"8px 0","border-left":"3px solid #18a058"}},[pt("p",{style:{margin:"0","font-family":"'Courier New', monospace","font-size":"13px","font-weight":"600",color:"var(--primary-color)"}},"ctx start"),pt("p",{style:{margin:"4px 0 0 0","font-size":"12px",color:"var(--text-secondary)"}},[vo("• 后台启动所有服务"),pt("br"),vo("• 可以关闭终端窗口"),pt("br"),vo("• 代理服务保持运行")])],-1)),b[35]||(b[35]=pt("h5",{style:{margin:"12px 0 8px 0","font-size":"13px",color:"#18a058"}},"[LOG] 日常工作流:",-1)),b[36]||(b[36]=pt("div",{style:{"font-size":"12px","line-height":"1.8",color:"var(--text-secondary)"}},[pt("code",{style:{background:"var(--bg-primary)",padding:"2px 6px","border-radius":"3px",color:"var(--primary-color)"}},"ctx start"),vo(" 启动服务"),pt("br"),pt("code",{style:{background:"var(--bg-primary)",padding:"2px 6px","border-radius":"3px",color:"var(--primary-color)"}},"ctx status"),vo(" 查看状态"),pt("br"),pt("code",{style:{background:"var(--bg-primary)",padding:"2px 6px","border-radius":"3px",color:"var(--primary-color)"}},"ctx logs"),vo(" 查看日志"),pt("br"),pt("code",{style:{background:"var(--bg-primary)",padding:"2px 6px","border-radius":"3px",color:"var(--primary-color)"}},"ctx stop"),vo(" 停止服务 ")],-1))]),b[45]||(b[45]=pt("div",{class:"help-section"},[pt("h4",null,"[AI] 支持的 AI 工具"),pt("ul",null,[pt("li",null,[pt("strong",null,"Claude Code"),vo(":Anthropic 官方命令行工具,支持 Claude 系列模型")]),pt("li",null,[pt("strong",null,"Codex"),vo(":支持 OpenAI GPT 系列和 Claude 模型(通过 OpenAI 兼容格式)")]),pt("li",null,[pt("strong",null,"Gemini"),vo(":支持 Google Gemini 系列模型")])])],-1)),b[46]||(b[46]=pt("div",{class:"help-section"},[pt("h4",null,"[LOG] 命令行用法"),pt("h5",{style:{margin:"16px 0 8px 0","font-size":"14px",color:"var(--primary-color)"}},"[START] 服务管理"),pt("div",{class:"command-list"},[pt("div",{class:"command-item"},[pt("code",null,"ctx start"),pt("span",null,"后台启动所有服务(推荐)")]),pt("div",{class:"command-item"},[pt("code",null,"ctx stop"),pt("span",null,"停止所有服务")]),pt("div",{class:"command-item"},[pt("code",null,"ctx restart"),pt("span",null,"重启所有服务")]),pt("div",{class:"command-item"},[pt("code",null,"ctx status"),pt("span",null,"查看服务状态")])]),pt("h5",{style:{margin:"16px 0 8px 0","font-size":"14px",color:"var(--primary-color)"}},"[PROXY] 代理管理"),pt("div",{class:"command-list"},[pt("div",{class:"command-item"},[pt("code",null,"ctx claude start"),pt("span",null,"启动 Claude 代理")]),pt("div",{class:"command-item"},[pt("code",null,"ctx codex start"),pt("span",null,"启动 Codex 代理")]),pt("div",{class:"command-item"},[pt("code",null,"ctx gemini start"),pt("span",null,"启动 Gemini 代理")]),pt("div",{class:"command-item"},[pt("code",null,"ctx claude stop"),pt("span",null,"停止指定代理(支持 stop/restart/status)")])]),pt("h5",{style:{margin:"16px 0 8px 0","font-size":"14px",color:"var(--primary-color)"}},"[LOG] 日志管理"),pt("div",{class:"command-list"},[pt("div",{class:"command-item"},[pt("code",null,"ctx logs"),pt("span",null,"查看所有日志")]),pt("div",{class:"command-item"},[pt("code",null,"ctx logs claude"),pt("span",null,"查看 Claude 日志(支持 ui/codex/gemini)")]),pt("div",{class:"command-item"},[pt("code",null,"ctx logs --follow"),pt("span",null,"实时跟踪日志")]),pt("div",{class:"command-item"},[pt("code",null,"ctx logs --clear"),pt("span",null,"清空日志")])]),pt("h5",{style:{margin:"16px 0 8px 0","font-size":"14px",color:"var(--primary-color)"}},"[STATS] 其他命令"),pt("div",{class:"command-list"},[pt("div",{class:"command-item"},[pt("code",null,"ctx stats"),pt("span",null,"查看统计信息")]),pt("div",{class:"command-item"},[pt("code",null,"ctx doctor"),pt("span",null,"系统诊断")]),pt("div",{class:"command-item"},[pt("code",null,"ctx -h"),pt("span",null,"完整帮助")])])],-1)),b[47]||(b[47]=pt("div",{class:"help-section"},[pt("h4",null,"[TARGET] Web UI 功能"),pt("ul",null,[pt("li",null,[pt("strong",null,"多类型支持"),vo(":统一管理 Claude Code、Codex、Gemini 三种工具的项目和会话")]),pt("li",null,[pt("strong",null,"项目管理"),vo(":查看所有项目,支持拖拽排序、搜索过滤、删除项目")]),pt("li",null,[pt("strong",null,"会话管理"),vo(":查看项目会话列表,支持搜索、Fork、删除、重命名")]),pt("li",null,[pt("strong",null,"快速启动"),vo(":点击会话可直接复制对应 AI 工具启动命令")]),pt("li",null,[pt("strong",null,"动态切换"),vo(":每种工具独立的渠道管理,可在右侧面板快速切换 API 渠道")]),pt("li",null,[pt("strong",null,"实时日志"),vo(":查看各类型代理的实时请求日志、token 消耗和成本统计")]),pt("li",null,[pt("strong",null,"全局搜索"),vo(":使用 "),pt("kbd",null,"Cmd/Ctrl"),vo(" + "),pt("kbd",null,"K"),vo(" 在所有项目中搜索对话内容")])])],-1)),b[48]||(b[48]=pt("div",{class:"help-section"},[pt("h4",null,"[BOLT] 代理服务与渠道管理"),pt("p",null,"每种 AI 工具都有独立的代理服务和渠道配置:"),pt("ul",null,[pt("li",null,[pt("strong",null,"Claude 代理"),vo(":端口 20088,支持 Anthropic API 格式")]),pt("li",null,[pt("strong",null,"Codex 代理"),vo(":端口 20089,支持 OpenAI API 格式(兼容 Claude)")]),pt("li",null,[pt("strong",null,"Gemini 代理"),vo(":端口 20090,支持 Gemini API 格式")])]),pt("p",null,"在 Dashboard 或各工具详情页,可以添加多个渠道并快速切换,无需修改配置文件或重启工具。")],-1)),pt("div",{class:"help-section"},[b[37]||(b[37]=pt("h4",null,"[STAR] 后台启动与开机自启",-1)),b[38]||(b[38]=pt("h5",{style:{margin:"12px 0 8px 0","font-size":"13px",color:"#18a058"}},"后台启动服务",-1)),b[39]||(b[39]=pt("p",{style:{"font-size":"12px","line-height":"1.8"}},[vo("使用 "),pt("code",{style:{background:"var(--bg-primary)",padding:"2px 6px"}},"ctx start"),vo(" 命令后台启动所有服务,可以安全关闭终端窗口而不影响代理服务的运行。")],-1)),b[40]||(b[40]=pt("h5",{style:{margin:"12px 0 8px 0","font-size":"13px",color:"#18a058"}},"配置开机自启(可选)",-1)),b[41]||(b[41]=pt("p",{style:{"font-size":"12px",color:"var(--text-secondary)",margin:"0 0 8px 0"}},"第一次启用开机自启只需三个步骤:",-1)),b[42]||(b[42]=pt("div",{style:{background:"var(--bg-primary)",padding:"12px","border-radius":"6px",margin:"8px 0","border-left":"3px solid #18a058","font-family":"'Courier New', monospace","font-size":"11px","line-height":"1.8",color:"var(--text-secondary)"}},[vo(" # 第 1 步:启用 PM2 开机自启"),pt("br"),pt("span",{style:{color:"var(--primary-color)"}},"pm2 startup"),pt("br"),pt("br"),vo(" # 第 2 步:保存配置"),pt("br"),pt("span",{style:{color:"var(--primary-color)"}},"pm2 save"),pt("br"),pt("br"),vo(" # 第 3 步:重启电脑,服务自动启动 [v] ")],-1)),b[43]||(b[43]=pt("h5",{style:{margin:"12px 0 8px 0","font-size":"13px",color:"#18a058"}},"相关命令",-1)),b[44]||(b[44]=pt("div",{style:{"font-size":"12px",color:"var(--text-secondary)","line-height":"1.8"}},[pt("code",{style:{background:"var(--bg-primary)",padding:"2px 6px"}},"ctx start"),vo(" 后台启动"),pt("br"),pt("code",{style:{background:"var(--bg-primary)",padding:"2px 6px"}},"ctx status"),vo(" 查看状态"),pt("br"),pt("code",{style:{background:"var(--bg-primary)",padding:"2px 6px"}},"ctx logs"),vo(" 查看日志"),pt("br"),pt("code",{style:{background:"var(--bg-primary)",padding:"2px 6px"}},"pm2 list"),vo(" 查看所有后台进程"),pt("br"),pt("code",{style:{background:"var(--bg-primary)",padding:"2px 6px"}},"pm2 unstartup"),vo(" 禁用开机自启 ")],-1)),pt("p",{style:{color:"#18a058","font-size":"12px","margin-top":"8px"}},"[TIP] 提示:配置开机自启后,重启电脑时 "+Bo(Ox)+" 会自动启动,无需手动运行命令。")]),b[49]||(b[49]=pt("div",{class:"help-section"},[pt("h4",null,"[LINK] 相关链接"),pt("div",{class:"link-list"},[pt("a",{href:"https://github.com/ZeaoZhang/coding-tool",target:"_blank"},"GitHub 仓库"),pt("a",{href:"https://github.com/ZeaoZhang/coding-tool/issues",target:"_blank"},"问题反馈")])],-1))])]),_:1},8,["show","title"])])}}},Ex=qe(Bx,[["__scopeId","data-v-1b46cda2"]]),_x={__name:"App",setup(e){const{isDark:o,loadTheme:t}=tg(),n=Do(()=>o.value?Sv:null),r=Do(()=>o.value?{common:{primaryColor:"#18a058",primaryColorHover:"#1db165",primaryColorPressed:"#0c7a43",fontFamily:'"SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif',fontFamilyMono:'"SF Mono", "JetBrains Mono", "Cascadia Code", "Fira Code", monospace',borderRadius:"16px",borderRadiusSmall:"12px",bodyColor:"#0a1116",cardColor:"#121b22",modalColor:"#121b22",popoverColor:"#121b22",tableColor:"#121b22",inputColor:"#16222a",codeColor:"#0d171d",tabColor:"#121b22",actionColor:"#16222a",tableHeaderColor:"#16222a",hoverColor:"rgba(255, 255, 255, 0.08)",pressedColor:"rgba(255, 255, 255, 0.12)",borderColor:"#263740",dividerColor:"#263740"},Drawer:{color:"#121b22",headerColor:"#121b22",footerColor:"#121b22"},Modal:{color:"#121b22",boxShadow:"0 24px 64px rgba(0, 0, 0, 0.42)"},Card:{color:"#121b22",borderColor:"#263740"},Popover:{color:"#121b22",textColor:"#edf5f4",boxShadow:"0 20px 48px rgba(0, 0, 0, 0.34)"},Tooltip:{color:"#121b22",textColor:"#edf5f4",boxShadow:"0 20px 48px rgba(0, 0, 0, 0.34)"},Dialog:{color:"#121b22"},Button:{borderRadiusMedium:"12px"},Input:{borderRadius:"12px"}}:{common:{primaryColor:"#18a058",primaryColorHover:"#1db165",primaryColorPressed:"#0c7a43",fontFamily:'"SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif',fontFamilyMono:'"SF Mono", "JetBrains Mono", "Cascadia Code", "Fira Code", monospace',borderRadius:"16px",borderRadiusSmall:"12px",bodyColor:"#f4f7f8",cardColor:"#ffffff",modalColor:"#ffffff",popoverColor:"#ffffff",tableColor:"#ffffff",inputColor:"#f7faf8",codeColor:"#edf3f1",tabColor:"#ffffff",actionColor:"#f7faf8",tableHeaderColor:"#edf3f1",hoverColor:"rgba(24, 160, 88, 0.08)",pressedColor:"rgba(24, 160, 88, 0.12)",borderColor:"#d8e1de",dividerColor:"#d8e1de"},Modal:{color:"#ffffff",boxShadow:"0 24px 64px rgba(15, 23, 29, 0.16)"},Card:{color:"#ffffff",borderColor:"#d8e1de"},Popover:{color:"#ffffff",textColor:"#122025",boxShadow:"0 18px 42px rgba(15, 23, 29, 0.12)"},Tooltip:{color:"rgba(18, 32, 37, 0.94)",textColor:"#f7faf8",boxShadow:"0 18px 42px rgba(15, 23, 29, 0.18)"},Drawer:{color:"#ffffff",headerColor:"#ffffff",footerColor:"#ffffff"},Button:{borderRadiusMedium:"12px"},Input:{borderRadius:"12px"}});return Ro(()=>{t()}),(e,o)=>(Ao(),zo(Qo(id),{theme:n.value,"theme-overrides":r.value},{default:Uo(()=>[Po(Qo(yu),null,{default:Uo(()=>[Po(Qo(Du),null,{default:Uo(()=>[Po(Ex)]),_:1})]),_:1})]),_:1},8,["theme","theme-overrides"]))}};!async function(){const e=Ho(_x),o=Eo();e.use(o);const t=zt(o),{loadUIConfig:n}=wt();await Promise.all([t.load(),n()]),e.use(hr),e.mount("#app"),rg()}();export{Hd as $,qv as A,Sr as At,Lf as B,Sm as C,Qr as Ct,Em as D,Or as Dt,Fm as E,Br as Et,bv as F,nh as G,Yh as H,hv as I,sp as J,mp as K,sv as L,Rv as M,yr as Mt,Mv as N,cr as Nt,Jv as O,zr as Ot,xv as P,tu as Q,Qf as R,Dm as S,aa as St,Im as T,Lr as Tt,jh as U,lf as V,Ah as W,cu as X,hu as Y,au as Z,lg as _,Il as _t,Qy as a,Yc as at,Lm as b,pa as bt,Vy as c,ic as ct,Jy as d,Es as dt,Ld as et,Yy as f,Rs as ft,ig as g,Rl as gt,ax as h,Fl as ht,Xy as i,Qc as it,Gv as j,xr as jt,Xv as k,kr as kt,qy as l,Ys as lt,Zy as m,Bl as mt,ex as n,pd as nt,Gy as o,qc as ot,rx as p,ds as pt,hp as q,lx as r,td as rt,ox as s,zc as st,tx as t,_d as tt,nx as u,qs as ut,ng as v,kl as vt,Pm as w,Dr as wt,Hm as x,da as xt,tg as y,fa as yt,qf as z};
|