From 0d6c8c7989b3d4093dc033e57b66eb6fb6120ed6 Mon Sep 17 00:00:00 2001 From: Daniel Arroyo Date: Fri, 31 Jul 2026 14:47:15 -0400 Subject: [PATCH] Add embedded Vue SPA admin panel with go:embed This is the complete fix for the missing /admin/ route and frontend serving: Backend: - internal/web/web.go: new package with go:embed for web/dist/ - internal/api/router.go: add routes for /admin/, /admin/*, /assets/* - internal/db/db.go: fix SQLite DSN parsing (sqlite:///path -> path) Build system: - Makefile: new 'embed-prep' target copies web/dist to internal/web/dist - make build now runs embed-prep -> frontend/build automatically Deployment: - deploy/llamalink.service: remove invalid --host/--port flags, add EnvironmentFile=/etc/llamalink/env Verified: - /health returns 200 - /admin/ serves Vue SPA HTML - /assets/* serves CSS and JS files from embedded FS - sqlite:///./llamalink.db works correctly --- Makefile | 12 +++++- deploy/llamalink.service | 7 +--- internal/api/router.go | 30 +++++++++++++++ internal/db/db.go | 9 +++-- internal/web/dist/assets/ApiKeys-CKKTuRxD.js | 11 ++++++ .../web/dist/assets/Dashboard-Dx0SCBU1.js | 11 ++++++ internal/web/dist/assets/Layout-9-JcwyxV.js | 16 ++++++++ internal/web/dist/assets/Login-CTXEj7l9.js | 1 + internal/web/dist/assets/Models-DBqDIbsA.js | 6 +++ internal/web/dist/assets/Usage-CzJnYH5a.js | 18 +++++++++ internal/web/dist/assets/cpu-ed4VmMFm.js | 6 +++ .../dist/assets/createLucideIcon-CUrbWv4G.js | 21 ++++++++++ internal/web/dist/assets/index-DkKprt_C.css | 1 + internal/web/dist/assets/index-r2SG-Kf3.js | 38 +++++++++++++++++++ internal/web/dist/assets/key-D7ygKuN6.js | 6 +++ internal/web/dist/assets/plus-Bfa9PGWP.js | 6 +++ internal/web/dist/index.html | 17 +++++++++ internal/web/web.go | 25 ++++++++++++ 18 files changed, 231 insertions(+), 10 deletions(-) create mode 100644 internal/web/dist/assets/ApiKeys-CKKTuRxD.js create mode 100644 internal/web/dist/assets/Dashboard-Dx0SCBU1.js create mode 100644 internal/web/dist/assets/Layout-9-JcwyxV.js create mode 100644 internal/web/dist/assets/Login-CTXEj7l9.js create mode 100644 internal/web/dist/assets/Models-DBqDIbsA.js create mode 100644 internal/web/dist/assets/Usage-CzJnYH5a.js create mode 100644 internal/web/dist/assets/cpu-ed4VmMFm.js create mode 100644 internal/web/dist/assets/createLucideIcon-CUrbWv4G.js create mode 100644 internal/web/dist/assets/index-DkKprt_C.css create mode 100644 internal/web/dist/assets/index-r2SG-Kf3.js create mode 100644 internal/web/dist/assets/key-D7ygKuN6.js create mode 100644 internal/web/dist/assets/plus-Bfa9PGWP.js create mode 100644 internal/web/dist/index.html create mode 100644 internal/web/web.go diff --git a/Makefile b/Makefile index f37b454..887a647 100644 --- a/Makefile +++ b/Makefile @@ -24,12 +24,19 @@ GOLINT=golangci-lint # Default target all: deps build -## build: Build the binary -build: +## build: Build the binary (includes frontend embed) +build: embed-prep @echo "Building $(BINARY)..." @mkdir -p $(BUILD_DIR) $(GOBUILD) -o $(BUILD_DIR)/$(BINARY) ./cmd/llamalink +## embed-prep: Copy web/dist into internal/web/dist for go:embed +embed-prep: frontend/build + @echo "Preparing embedded frontend..." + @rm -rf internal/web/dist + @mkdir -p internal/web/dist + @cp -r web/dist/* internal/web/dist/ + ## run: Build and run run: build @echo "Running..." @@ -63,6 +70,7 @@ deps: ## clean: Remove build artifacts clean: rm -rf $(BUILD_DIR) $(DIST_DIR) + rm -rf internal/web/dist rm -f coverage.out rm -f *.db diff --git a/deploy/llamalink.service b/deploy/llamalink.service index bd70466..5899167 100644 --- a/deploy/llamalink.service +++ b/deploy/llamalink.service @@ -6,23 +6,20 @@ After=network.target Type=simple User=llamalink WorkingDirectory=/opt/llamalink -ExecStart=/usr/local/bin/llamalink \ - --host 0.0.0.0 \ - --port 8000 +EnvironmentFile=/etc/llamalink/env +ExecStart=/usr/local/bin/llamalink Restart=on-failure RestartSec=5 StandardOutput=journal StandardError=journal SyslogIdentifier=llamalink -# Security NoNewPrivileges=true PrivateTmp=true ProtectSystem=strict ProtectHome=true ReadWritePaths=/opt/llamalink/data ReadOnlyPaths=/opt/llamalink/models -Environment=LLAMALINK_ENV=production [Install] WantedBy=multi-user.target diff --git a/internal/api/router.go b/internal/api/router.go index 56cb42d..e2c6c1a 100644 --- a/internal/api/router.go +++ b/internal/api/router.go @@ -1,6 +1,8 @@ package api import ( + "net/http" + "github.com/gin-gonic/gin" "github.com/llamalink/llamalink/internal/api/handlers" "github.com/llamalink/llamalink/internal/api/middleware" @@ -8,6 +10,7 @@ import ( "github.com/llamalink/llamalink/internal/config" "github.com/llamalink/llamalink/internal/llama" "github.com/llamalink/llamalink/internal/quota" + "github.com/llamalink/llamalink/internal/web" "gorm.io/gorm" ) @@ -73,5 +76,32 @@ func New(cfg *config.Config, db *gorm.DB, llamaManager *llama.Manager) *gin.Engi usage.GET("", usageHandler.GetCurrentKeyUsage) usage.GET("/:key_id", usageHandler.GetUsage) + // Admin SPA (static files with embedded frontend) + r.GET("/assets/*filepath", func(c *gin.Context) { + filepath := c.Param("filepath") + data, err := web.ServeAsset(filepath) + if err != nil { + c.String(http.StatusNotFound, "asset not found") + return + } + c.Data(http.StatusOK, http.DetectContentType(data), data) + }) + r.GET("/admin", func(c *gin.Context) { + index, err := web.Index() + if err != nil { + c.String(http.StatusInternalServerError, "index.html not found") + return + } + c.Data(http.StatusOK, "text/html; charset=utf-8", index) + }) + r.GET("/admin/*filepath", func(c *gin.Context) { + index, err := web.Index() + if err != nil { + c.String(http.StatusInternalServerError, "index.html not found") + return + } + c.Data(http.StatusOK, "text/html; charset=utf-8", index) + }) + return r } diff --git a/internal/db/db.go b/internal/db/db.go index 9cc8b5f..a029d50 100644 --- a/internal/db/db.go +++ b/internal/db/db.go @@ -13,9 +13,12 @@ import ( ) func Open(cfg *config.Config) (*gorm.DB, error) { - dsn := strings.TrimPrefix(cfg.DatabaseURL, "sqlite://") - if dsn == cfg.DatabaseURL { - dsn = cfg.DatabaseURL + dsn := cfg.DatabaseURL + if strings.HasPrefix(dsn, "sqlite://") { + dsn = strings.TrimPrefix(dsn, "sqlite://") + if strings.HasPrefix(dsn, "/") { + dsn = dsn[1:] + } } gormConfig := &gorm.Config{ diff --git a/internal/web/dist/assets/ApiKeys-CKKTuRxD.js b/internal/web/dist/assets/ApiKeys-CKKTuRxD.js new file mode 100644 index 0000000..518ff63 --- /dev/null +++ b/internal/web/dist/assets/ApiKeys-CKKTuRxD.js @@ -0,0 +1,11 @@ +import{d as I,q as M,c as a,a as e,b as p,e as x,x as w,g as c,t as o,F as g,i as C,w as P,f as V,v as j,r,s as k,o as l}from"./index-r2SG-Kf3.js";import{P as T}from"./plus-Bfa9PGWP.js";import{c as _}from"./createLucideIcon-CUrbWv4G.js";/** + * @license lucide-vue-next v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $=_("CopyIcon",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @license lucide-vue-next v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const D=_("Trash2Icon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),F={class:"flex items-center justify-between mb-6"},L={key:0,class:"text-text-muted"},S={key:1,class:"card mb-6 bg-success/5 border-success/20"},B={class:"flex items-center justify-between"},q={class:"mt-4 p-3 bg-background rounded-lg font-mono text-sm break-all"},z={class:"card"},U={class:"table"},E={class:"font-mono text-text-muted"},H=["onClick"],O={key:1,class:"badge badge-info"},Y={key:0},G={key:2,class:"fixed inset-0 bg-black/50 flex items-center justify-center z-50"},J={class:"card w-full max-w-md"},Q={class:"mb-4"},R={class:"flex gap-3 justify-end"},te=I({__name:"ApiKeys",setup(W){const y=r([]),m=r(!0),u=r(!1),d=r(""),i=r(null),v=r(!1);async function b(){m.value=!0;try{const s=await k.get("/api/v1/admin/keys");y.value=s.data}catch(s){console.error("Failed to fetch keys:",s)}finally{m.value=!1}}async function K(){try{const s=await k.post("/api/v1/admin/keys",{name:d.value});i.value=s.data,u.value=!1,d.value="",await b()}catch(s){console.error("Failed to create key:",s)}}async function N(s){if(confirm("Are you sure you want to revoke this key?"))try{await k.delete(`/api/v1/admin/keys/${s}`),await b()}catch(t){console.error("Failed to revoke key:",t)}}async function A(s){await navigator.clipboard.writeText(s),v.value=!0,setTimeout(()=>v.value=!1,2e3)}function h(s){return s?new Date(s).toLocaleString():"Never"}return M(b),(s,t)=>(l(),a("div",null,[e("div",F,[t[6]||(t[6]=e("h1",{class:"text-2xl font-bold"},"API Keys",-1)),e("button",{onClick:t[0]||(t[0]=n=>u.value=!0),class:"btn btn-primary"},[p(x(T),{class:"w-4 h-4 mr-2"}),t[5]||(t[5]=w(" New Key ",-1))])]),m.value?(l(),a("div",L,"Loading...")):c("",!0),i.value?(l(),a("div",S,[e("div",B,[t[7]||(t[7]=e("div",null,[e("h3",{class:"font-semibold text-success"},"API Key Created"),e("p",{class:"text-sm text-text-muted mt-1"}," Copy this key now. You won't be able to see it again. ")],-1)),e("button",{onClick:t[1]||(t[1]=n=>A(i.value.key)),class:"btn btn-secondary"},[p(x($),{class:"w-4 h-4 mr-2"}),w(" "+o(v.value?"Copied!":"Copy"),1)])]),e("div",q,o(i.value.key),1),e("button",{onClick:t[2]||(t[2]=n=>i.value=null),class:"mt-4 text-sm text-text-muted hover:text-text"}," Close ")])):c("",!0),e("div",z,[e("table",U,[t[9]||(t[9]=e("thead",null,[e("tr",null,[e("th",null,"Name"),e("th",null,"Prefix"),e("th",null,"Scopes"),e("th",null,"Owner"),e("th",null,"Created"),e("th",null,"Last Used"),e("th",null,"Actions")])],-1)),e("tbody",null,[(l(!0),a(g,null,C(y.value,n=>(l(),a("tr",{key:n.id},[e("td",null,o(n.name),1),e("td",E,o(n.key_prefix)+"...",1),e("td",null,[(l(!0),a(g,null,C(n.scopes,f=>(l(),a("span",{key:f,class:"badge mr-1"},o(f),1))),128))]),e("td",null,o(n.owner_label||"-"),1),e("td",null,o(h(n.created_at)),1),e("td",null,o(h(n.last_used_at)),1),e("td",null,[n.is_admin?(l(),a("span",O,"Admin")):(l(),a("button",{key:0,onClick:f=>N(n.id),class:"btn btn-danger btn-sm"},[p(x(D),{class:"w-4 h-4"})],8,H))])]))),128)),y.value.length===0?(l(),a("tr",Y,[...t[8]||(t[8]=[e("td",{colspan:"7",class:"text-center text-text-muted py-8"}," No API keys yet. Create one to get started. ",-1)])])):c("",!0)])])]),u.value?(l(),a("div",G,[e("div",J,[t[12]||(t[12]=e("h2",{class:"text-lg font-semibold mb-4"},"Create API Key",-1)),e("form",{onSubmit:P(K,["prevent"])},[e("div",Q,[t[10]||(t[10]=e("label",{class:"block text-sm font-medium mb-2"},"Key Name",-1)),V(e("input",{"onUpdate:modelValue":t[3]||(t[3]=n=>d.value=n),type:"text",class:"input",placeholder:"My API Key",required:""},null,512),[[j,d.value]])]),e("div",R,[e("button",{type:"button",onClick:t[4]||(t[4]=n=>u.value=!1),class:"btn btn-secondary"}," Cancel "),t[11]||(t[11]=e("button",{type:"submit",class:"btn btn-primary"},"Create",-1))])],32)])])):c("",!0)]))}});export{te as default}; diff --git a/internal/web/dist/assets/Dashboard-Dx0SCBU1.js b/internal/web/dist/assets/Dashboard-Dx0SCBU1.js new file mode 100644 index 0000000..693a99b --- /dev/null +++ b/internal/web/dist/assets/Dashboard-Dx0SCBU1.js @@ -0,0 +1,11 @@ +import{d as A,q as C,c as e,a as t,t as d,F as h,b as _,e as m,n as L,g as b,i as M,r as u,s as v,o as a}from"./index-r2SG-Kf3.js";import{c as y}from"./createLucideIcon-CUrbWv4G.js";import{C as N}from"./cpu-ed4VmMFm.js";import{K as S}from"./key-D7ygKuN6.js";/** + * @license lucide-vue-next v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const j=y("ActivityIcon",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + * @license lucide-vue-next v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const D=y("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),F={key:0,class:"text-text-muted"},I={key:1,class:"p-4 bg-error/10 border border-error/20 rounded-lg text-error"},q={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"},R={class:"card"},B={class:"flex items-center gap-4"},K={class:"w-12 h-12 bg-primary/10 rounded-xl flex items-center justify-center"},T={class:"text-2xl font-bold"},V={class:"card"},z={class:"flex items-center gap-4"},P={class:"w-12 h-12 bg-success/10 rounded-xl flex items-center justify-center"},$={class:"text-2xl font-bold"},E={class:"card"},H={class:"flex items-center gap-4"},Y={class:"w-12 h-12 bg-warning/10 rounded-xl flex items-center justify-center"},G={class:"text-2xl font-bold"},J={class:"card"},O={class:"flex items-center gap-4"},Q={class:"w-12 h-12 bg-info/10 rounded-xl flex items-center justify-center"},U={class:"text-2xl font-bold"},W={class:"card mb-8"},X={class:"flex items-center justify-between mb-4"},Z={key:0,class:"mb-4"},tt={class:"text-lg font-mono"},st={key:1,class:"p-3 bg-error/10 border border-error/20 rounded-lg text-error text-sm"},et={class:"card"},at={class:"table"},ot={class:"font-mono"},lt={class:"font-mono text-text-muted"},dt={key:0,class:"badge badge-info"},nt={key:1,class:"badge"},rt={key:0,class:"badge badge-success"},it={key:1,class:"badge"},ct=["onClick"],ut={key:1,class:"badge badge-success"},_t={key:0},bt=A({__name:"Dashboard",setup(mt){const r=u({total_requests:0,total_tokens:0,avg_latency_ms:0,active_keys:0,total_models:0}),l=u({status:"stopped",current_model:null,loaded_at:null,last_error:null}),x=u([]),g=u(!0),i=u("");async function f(){var c,s,o;g.value=!0,i.value="";try{const[n,p,w]=await Promise.all([v.get("/api/v1/admin/dashboard"),v.get("/api/v1/admin/models"),v.get("/api/v1/admin/status")]);r.value=n.data.stats,x.value=p.data.data,l.value=w.data}catch(n){i.value=((o=(s=(c=n.response)==null?void 0:c.data)==null?void 0:s.error)==null?void 0:o.message)||"Failed to load dashboard"}finally{g.value=!1}}async function k(c){var s,o,n;try{await v.post(`/api/v1/admin/models/${c}/load`),await f()}catch(p){i.value=((n=(o=(s=p.response)==null?void 0:s.data)==null?void 0:o.error)==null?void 0:n.message)||"Failed to load model"}}return C(f),(c,s)=>(a(),e("div",null,[s[9]||(s[9]=t("h1",{class:"text-2xl font-bold mb-6"},"Dashboard",-1)),g.value?(a(),e("div",F,"Loading...")):i.value?(a(),e("div",I,d(i.value),1)):(a(),e(h,{key:2},[t("div",q,[t("div",R,[t("div",B,[t("div",K,[_(m(j),{class:"w-6 h-6 text-primary"})]),t("div",null,[s[0]||(s[0]=t("p",{class:"text-text-muted text-sm"},"Total Requests",-1)),t("p",T,d(r.value.total_requests.toLocaleString()),1)])])]),t("div",V,[t("div",z,[t("div",P,[_(m(N),{class:"w-6 h-6 text-success"})]),t("div",null,[s[1]||(s[1]=t("p",{class:"text-text-muted text-sm"},"Total Tokens",-1)),t("p",$,d(r.value.total_tokens.toLocaleString()),1)])])]),t("div",E,[t("div",H,[t("div",Y,[_(m(D),{class:"w-6 h-6 text-warning"})]),t("div",null,[s[2]||(s[2]=t("p",{class:"text-text-muted text-sm"},"Avg Latency",-1)),t("p",G,d(r.value.avg_latency_ms.toFixed(0))+"ms",1)])])]),t("div",J,[t("div",O,[t("div",Q,[_(m(S),{class:"w-6 h-6 text-info"})]),t("div",null,[s[3]||(s[3]=t("p",{class:"text-text-muted text-sm"},"Active Keys",-1)),t("p",U,d(r.value.active_keys),1)])])])]),t("div",W,[t("div",X,[s[4]||(s[4]=t("h2",{class:"text-lg font-semibold"},"Model Status",-1)),t("span",{class:L(["badge",{"badge-success":l.value.status==="ready","badge-warning":l.value.status==="loading"||l.value.status==="swapping","badge-error":l.value.status==="failed"}])},d(l.value.status),3)]),l.value.current_model?(a(),e("div",Z,[s[5]||(s[5]=t("p",{class:"text-text-muted text-sm"},"Current Model",-1)),t("p",tt,d(l.value.current_model),1)])):b("",!0),l.value.last_error?(a(),e("div",st,d(l.value.last_error),1)):b("",!0)]),t("div",et,[s[8]||(s[8]=t("h2",{class:"text-lg font-semibold mb-4"},"Models",-1)),t("table",at,[s[7]||(s[7]=t("thead",null,[t("tr",null,[t("th",null,"Name"),t("th",null,"Alias"),t("th",null,"Default"),t("th",null,"Status"),t("th",null,"Actions")])],-1)),t("tbody",null,[(a(!0),e(h,null,M(x.value,o=>(a(),e("tr",{key:o.id},[t("td",ot,d(o.name),1),t("td",lt,d(o.alias),1),t("td",null,[o.is_default?(a(),e("span",dt,"Yes")):(a(),e("span",nt,"No"))]),t("td",null,[o.is_active?(a(),e("span",rt,"Active")):(a(),e("span",it,"Inactive"))]),t("td",null,[o.is_active?(a(),e("span",ut,"Loaded")):(a(),e("button",{key:0,onClick:n=>k(o.name),class:"btn btn-primary btn-sm"}," Load ",8,ct))])]))),128)),x.value.length===0?(a(),e("tr",_t,[...s[6]||(s[6]=[t("td",{colspan:"5",class:"text-center text-text-muted py-8"}," No models configured. Add models via the API. ",-1)])])):b("",!0)])])])],64))]))}});export{bt as default}; diff --git a/internal/web/dist/assets/Layout-9-JcwyxV.js b/internal/web/dist/assets/Layout-9-JcwyxV.js new file mode 100644 index 0000000..005eb91 --- /dev/null +++ b/internal/web/dist/assets/Layout-9-JcwyxV.js @@ -0,0 +1,16 @@ +import{d as u,u as m,c as d,a as t,F as x,i as y,b as s,e as o,R as g,h as b,o as r,j as f,n as k,k as _,l as v,m as L,p as C,t as w}from"./index-r2SG-Kf3.js";import{c as n}from"./createLucideIcon-CUrbWv4G.js";import{K as I}from"./key-D7ygKuN6.js";import{C as M}from"./cpu-ed4VmMFm.js";/** + * @license lucide-vue-next v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const V=n("ChartColumnIcon",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** + * @license lucide-vue-next v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const D=n("LayoutDashboardIcon",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** + * @license lucide-vue-next v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const R=n("LogOutIcon",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),B={class:"min-h-screen bg-background"},z={class:"fixed left-0 top-0 h-full w-64 bg-surface border-r border-border flex flex-col"},A={class:"flex-1 p-4 space-y-1"},K={class:"p-4 border-t border-border"},S={class:"ml-64 min-h-screen p-8"},H=u({__name:"Layout",setup(F){const l=v(),i=b(),c=m(),h=[{name:"Dashboard",path:"/admin/",icon:D},{name:"API Keys",path:"/admin/keys",icon:I},{name:"Models",path:"/admin/models",icon:M},{name:"Usage",path:"/admin/usage",icon:V}];function p(){c.logout(),i.push("/admin/login")}return(N,a)=>(r(),d("div",B,[t("aside",z,[a[1]||(a[1]=t("div",{class:"p-6 border-b border-border"},[t("h1",{class:"text-xl font-bold text-primary"},"LlamaLink"),t("p",{class:"text-xs text-text-muted mt-1"},"Admin Panel")],-1)),t("nav",A,[(r(),d(x,null,y(h,e=>s(o(_),{key:e.path,to:e.path,class:k(["flex items-center gap-3 px-4 py-3 rounded-lg transition-colors",o(l).path===e.path||e.path!=="/admin/"&&o(l).path.startsWith(e.path)?"bg-primary/10 text-primary":"text-text-muted hover:text-text hover:bg-border"])},{default:f(()=>[(r(),L(C(e.icon),{class:"w-5 h-5"})),t("span",null,w(e.name),1)]),_:2},1032,["to","class"])),64))]),t("div",K,[t("button",{onClick:p,class:"flex items-center gap-3 w-full px-4 py-3 rounded-lg text-text-muted hover:text-error hover:bg-error/10 transition-colors"},[s(o(R),{class:"w-5 h-5"}),a[0]||(a[0]=t("span",null,"Logout",-1))])])]),t("main",S,[s(o(g))])]))}});export{H as default}; diff --git a/internal/web/dist/assets/Login-CTXEj7l9.js b/internal/web/dist/assets/Login-CTXEj7l9.js new file mode 100644 index 0000000..30e2a0c --- /dev/null +++ b/internal/web/dist/assets/Login-CTXEj7l9.js @@ -0,0 +1 @@ +import{d as p,u as f,c as r,a as e,b as v,e as i,w as _,f as b,v as g,t as x,g as h,r as l,o as a,h as y}from"./index-r2SG-Kf3.js";import{K as k}from"./key-D7ygKuN6.js";import"./createLucideIcon-CUrbWv4G.js";const w={class:"min-h-screen bg-background flex items-center justify-center"},L={class:"w-full max-w-md"},A={class:"card"},S={class:"flex items-center gap-3 mb-6"},V={class:"w-12 h-12 bg-primary/10 rounded-xl flex items-center justify-center"},B={key:0,class:"p-3 bg-error/10 border border-error/20 rounded-lg text-error text-sm"},N=["disabled"],T={key:0},j={key:1},M=p({__name:"Login",setup(C){const d=y(),s=f(),o=l(""),n=l("");async function u(){if(!o.value.trim()){n.value="Admin token is required";return}await s.login(o.value)?d.push("/admin/"):n.value=s.error||"Login failed"}return(c,t)=>(a(),r("div",w,[e("div",L,[e("div",A,[e("div",S,[e("div",V,[v(i(k),{class:"w-6 h-6 text-primary"})]),t[1]||(t[1]=e("div",null,[e("h1",{class:"text-2xl font-bold"},"LlamaLink"),e("p",{class:"text-text-muted text-sm"},"Admin Login")],-1))]),e("form",{onSubmit:_(u,["prevent"]),class:"space-y-4"},[e("div",null,[t[2]||(t[2]=e("label",{class:"block text-sm font-medium mb-2"},"Admin Token",-1)),b(e("input",{"onUpdate:modelValue":t[0]||(t[0]=m=>o.value=m),type:"password",class:"input",placeholder:"Enter your admin token",autocomplete:"current-password"},null,512),[[g,o.value]])]),n.value?(a(),r("div",B,x(n.value),1)):h("",!0),e("button",{type:"submit",class:"btn btn-primary w-full",disabled:i(s).loading},[i(s).loading?(a(),r("span",T,"Logging in...")):(a(),r("span",j,"Login"))],8,N)],32)])])]))}});export{M as default}; diff --git a/internal/web/dist/assets/Models-DBqDIbsA.js b/internal/web/dist/assets/Models-DBqDIbsA.js new file mode 100644 index 0000000..d2445f6 --- /dev/null +++ b/internal/web/dist/assets/Models-DBqDIbsA.js @@ -0,0 +1,6 @@ +import{d as w,q as h,c as a,a as t,b as y,e as x,x as g,g as v,F as M,i as C,w as U,f as d,v as i,y as V,r as m,s as f,o as n,t as u}from"./index-r2SG-Kf3.js";import{P as L}from"./plus-Bfa9PGWP.js";import{c as N}from"./createLucideIcon-CUrbWv4G.js";/** + * @license lucide-vue-next v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const z=N("UploadIcon",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),A={class:"flex items-center justify-between mb-6"},P={key:0,class:"text-text-muted"},S={class:"card"},q={class:"table"},D={class:"font-mono"},F={class:"font-mono text-text-muted text-sm"},j={class:"font-mono"},$={key:0,class:"badge badge-info"},B={key:1,class:"badge"},I={key:0,class:"badge badge-success"},G={key:1,class:"badge"},T=["onClick"],E={key:1,class:"badge badge-success"},H={key:0},O={key:1,class:"fixed inset-0 bg-black/50 flex items-center justify-center z-50"},J={class:"card w-full max-w-lg"},K={class:"grid grid-cols-2 gap-4"},Q={class:"flex items-center gap-2"},R={class:"flex gap-3 justify-end pt-2"},et=w({__name:"Models",setup(W){const p=m([]),c=m(!0),r=m(!1),s=m({name:"",model_path:"",alias:"",ctx_size:8192,n_gpu_layers:-1,is_default:!1});async function b(){c.value=!0;try{const o=await f.get("/api/v1/models");p.value=o.data.data}catch(o){console.error("Failed to fetch models:",o)}finally{c.value=!1}}async function _(){try{await f.post("/api/v1/models",s.value),r.value=!1,Object.assign(s.value,{name:"",model_path:"",alias:"",ctx_size:8192,n_gpu_layers:-1,is_default:!1}),await b()}catch(o){console.error("Failed to create model:",o)}}async function k(o){try{await f.post(`/api/v1/models/${o}/load`),await b()}catch(e){console.error("Failed to load model:",e)}}return h(b),(o,e)=>(n(),a("div",null,[t("div",A,[e[9]||(e[9]=t("h1",{class:"text-2xl font-bold"},"Models",-1)),t("button",{onClick:e[0]||(e[0]=l=>r.value=!0),class:"btn btn-primary"},[y(x(L),{class:"w-4 h-4 mr-2"}),e[8]||(e[8]=g(" Add Model ",-1))])]),c.value?(n(),a("div",P,"Loading...")):v("",!0),t("div",S,[t("table",q,[e[12]||(e[12]=t("thead",null,[t("tr",null,[t("th",null,"Name"),t("th",null,"Path"),t("th",null,"Alias"),t("th",null,"Context"),t("th",null,"GPU Layers"),t("th",null,"Default"),t("th",null,"Status"),t("th",null,"Actions")])],-1)),t("tbody",null,[(n(!0),a(M,null,C(p.value,l=>(n(),a("tr",{key:l.id},[t("td",D,u(l.name),1),t("td",F,u(l.model_path),1),t("td",j,u(l.alias),1),t("td",null,u(l.ctx_size.toLocaleString()),1),t("td",null,u(l.n_gpu_layers),1),t("td",null,[l.is_default?(n(),a("span",$,"Default")):(n(),a("span",B,"No"))]),t("td",null,[l.is_active?(n(),a("span",I,"Active")):(n(),a("span",G,"Inactive"))]),t("td",null,[l.is_active?(n(),a("span",E,"Loaded")):(n(),a("button",{key:0,onClick:X=>k(l.name),class:"btn btn-primary btn-sm"},[y(x(z),{class:"w-4 h-4 mr-1"}),e[10]||(e[10]=g(" Load ",-1))],8,T))])]))),128)),p.value.length===0?(n(),a("tr",H,[...e[11]||(e[11]=[t("td",{colspan:"8",class:"text-center text-text-muted py-8"}," No models configured. Add one to get started. ",-1)])])):v("",!0)])])]),r.value?(n(),a("div",O,[t("div",J,[e[20]||(e[20]=t("h2",{class:"text-lg font-semibold mb-4"},"Add Model",-1)),t("form",{onSubmit:U(_,["prevent"]),class:"space-y-4"},[t("div",null,[e[13]||(e[13]=t("label",{class:"block text-sm font-medium mb-2"},"Name",-1)),d(t("input",{"onUpdate:modelValue":e[1]||(e[1]=l=>s.value.name=l),type:"text",class:"input",placeholder:"llama-3.2-1b",required:""},null,512),[[i,s.value.name]])]),t("div",null,[e[14]||(e[14]=t("label",{class:"block text-sm font-medium mb-2"},"Model Path",-1)),d(t("input",{"onUpdate:modelValue":e[2]||(e[2]=l=>s.value.model_path=l),type:"text",class:"input",placeholder:"/models/llama-3.2-1b.q4_k_m.gguf",required:""},null,512),[[i,s.value.model_path]])]),t("div",null,[e[15]||(e[15]=t("label",{class:"block text-sm font-medium mb-2"},"Alias",-1)),d(t("input",{"onUpdate:modelValue":e[3]||(e[3]=l=>s.value.alias=l),type:"text",class:"input",placeholder:"llama-3.2-1b",required:""},null,512),[[i,s.value.alias]])]),t("div",K,[t("div",null,[e[16]||(e[16]=t("label",{class:"block text-sm font-medium mb-2"},"Context Size",-1)),d(t("input",{"onUpdate:modelValue":e[4]||(e[4]=l=>s.value.ctx_size=l),type:"number",class:"input"},null,512),[[i,s.value.ctx_size,void 0,{number:!0}]])]),t("div",null,[e[17]||(e[17]=t("label",{class:"block text-sm font-medium mb-2"},"GPU Layers",-1)),d(t("input",{"onUpdate:modelValue":e[5]||(e[5]=l=>s.value.n_gpu_layers=l),type:"number",class:"input"},null,512),[[i,s.value.n_gpu_layers,void 0,{number:!0}]])])]),t("div",Q,[d(t("input",{"onUpdate:modelValue":e[6]||(e[6]=l=>s.value.is_default=l),type:"checkbox",id:"is_default",class:"w-4 h-4 rounded"},null,512),[[V,s.value.is_default]]),e[18]||(e[18]=t("label",{for:"is_default",class:"text-sm"},"Set as default model",-1))]),t("div",R,[t("button",{type:"button",onClick:e[7]||(e[7]=l=>r.value=!1),class:"btn btn-secondary"}," Cancel "),e[19]||(e[19]=t("button",{type:"submit",class:"btn btn-primary"},"Create",-1))])],32)])])):v("",!0)]))}});export{et as default}; diff --git a/internal/web/dist/assets/Usage-CzJnYH5a.js b/internal/web/dist/assets/Usage-CzJnYH5a.js new file mode 100644 index 0000000..8ea97a8 --- /dev/null +++ b/internal/web/dist/assets/Usage-CzJnYH5a.js @@ -0,0 +1,18 @@ +var On=Object.defineProperty;var Dn=(i,t,e)=>t in i?On(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var D=(i,t,e)=>Dn(i,typeof t!="symbol"?t+"":t,e);import{d as ci,A as zs,z as Qe,B as Je,C as Cn,q as Es,D as Tn,r as ke,E as ti,G as Bs,H as An,c as lt,a as M,f as Ln,I as Fn,F as Si,t as q,g as ce,J as Rn,n as Mi,b as In,e as zn,i as En,s as Bn,o as ct}from"./index-r2SG-Kf3.js";/*! + * @kurkle/color v0.3.4 + * https://github.com/kurkle/color#readme + * (c) 2024 Jukka Kurkela + * Released under the MIT License + */function oe(i){return i+.5|0}const dt=(i,t,e)=>Math.max(Math.min(i,e),t);function qt(i){return dt(oe(i*2.55),0,255)}function gt(i){return dt(oe(i*255),0,255)}function rt(i){return dt(oe(i/2.55)/100,0,1)}function Pi(i){return dt(oe(i*100),0,100)}const K={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ei=[..."0123456789ABCDEF"],Hn=i=>ei[i&15],Wn=i=>ei[(i&240)>>4]+ei[i&15],he=i=>(i&240)>>4===(i&15),Vn=i=>he(i.r)&&he(i.g)&&he(i.b)&&he(i.a);function Nn(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&K[i[1]]*17,g:255&K[i[2]]*17,b:255&K[i[3]]*17,a:t===5?K[i[4]]*17:255}:(t===7||t===9)&&(e={r:K[i[1]]<<4|K[i[2]],g:K[i[3]]<<4|K[i[4]],b:K[i[5]]<<4|K[i[6]],a:t===9?K[i[7]]<<4|K[i[8]]:255})),e}const jn=(i,t)=>i<255?t(i):"";function $n(i){var t=Vn(i)?Hn:Wn;return i?"#"+t(i.r)+t(i.g)+t(i.b)+jn(i.a,t):void 0}const Yn=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Hs(i,t,e){const s=t*Math.min(e,1-e),n=(o,a=(o+i/30)%12)=>e-s*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function Un(i,t,e){const s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function qn(i,t,e){const s=Hs(i,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function Kn(i,t,e,s,n){return i===n?(t-e)/s+(t.5?h/(2-o-a):h/(o+a),l=Kn(e,s,n,h,o),l=l*60+.5),[l|0,c||0,r]}function di(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(gt)}function fi(i,t,e){return di(Hs,i,t,e)}function Xn(i,t,e){return di(qn,i,t,e)}function Gn(i,t,e){return di(Un,i,t,e)}function Ws(i){return(i%360+360)%360}function Zn(i){const t=Yn.exec(i);let e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?qt(+t[5]):gt(+t[5]));const n=Ws(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?s=Xn(n,o,a):t[1]==="hsv"?s=Gn(n,o,a):s=fi(n,o,a),{r:s[0],g:s[1],b:s[2],a:e}}function Qn(i,t){var e=hi(i);e[0]=Ws(e[0]+t),e=fi(e),i.r=e[0],i.g=e[1],i.b=e[2]}function Jn(i){if(!i)return;const t=hi(i),e=t[0],s=Pi(t[1]),n=Pi(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${rt(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}const Oi={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Di={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function to(){const i={},t=Object.keys(Di),e=Object.keys(Oi);let s,n,o,a,r;for(s=0;s>16&255,o>>8&255,o&255]}return i}let de;function eo(i){de||(de=to(),de.transparent=[0,0,0,0]);const t=de[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const io=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function so(i){const t=io.exec(i);let e=255,s,n,o;if(t){if(t[7]!==s){const a=+t[7];e=t[8]?qt(a):dt(a*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?qt(s):dt(s,0,255)),n=255&(t[4]?qt(n):dt(n,0,255)),o=255&(t[6]?qt(o):dt(o,0,255)),{r:s,g:n,b:o,a:e}}}function no(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${rt(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const We=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,At=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function oo(i,t,e){const s=At(rt(i.r)),n=At(rt(i.g)),o=At(rt(i.b));return{r:gt(We(s+e*(At(rt(t.r))-s))),g:gt(We(n+e*(At(rt(t.g))-n))),b:gt(We(o+e*(At(rt(t.b))-o))),a:i.a+e*(t.a-i.a)}}function fe(i,t,e){if(i){let s=hi(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=fi(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function Vs(i,t){return i&&Object.assign(t||{},i)}function Ci(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=gt(i[3]))):(t=Vs(i,{r:0,g:0,b:0,a:1}),t.a=gt(t.a)),t}function ao(i){return i.charAt(0)==="r"?so(i):Zn(i)}class te{constructor(t){if(t instanceof te)return t;const e=typeof t;let s;e==="object"?s=Ci(t):e==="string"&&(s=Nn(t)||eo(t)||ao(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=Vs(this._rgb);return t&&(t.a=rt(t.a)),t}set rgb(t){this._rgb=Ci(t)}rgbString(){return this._valid?no(this._rgb):void 0}hexString(){return this._valid?$n(this._rgb):void 0}hslString(){return this._valid?Jn(this._rgb):void 0}mix(t,e){if(t){const s=this.rgb,n=t.rgb;let o;const a=e===o?.5:e,r=2*a-1,l=s.a-n.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=a*s.a+(1-a)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=oo(this._rgb,t._rgb,e)),this}clone(){return new te(this.rgb)}alpha(t){return this._rgb.a=gt(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=oe(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return fe(this._rgb,2,t),this}darken(t){return fe(this._rgb,2,-t),this}saturate(t){return fe(this._rgb,1,t),this}desaturate(t){return fe(this._rgb,1,-t),this}rotate(t){return Qn(this._rgb,t),this}}/*! + * Chart.js v4.5.1 + * https://www.chartjs.org + * (c) 2025 Chart.js Contributors + * Released under the MIT License + */function nt(){}const ro=(()=>{let i=0;return()=>i++})();function R(i){return i==null}function B(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function C(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function G(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function et(i,t){return G(i)?i:t}function T(i,t){return typeof i>"u"?t:i}const lo=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function I(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function L(i,t,e,s){let n,o,a;if(B(i))for(o=i.length,n=0;ni,x:i=>i.x,y:i=>i.y};function fo(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function uo(i){const t=fo(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function zt(i,t){return(Ti[t]||(Ti[t]=uo(t)))(i)}function ui(i){return i.charAt(0).toUpperCase()+i.slice(1)}const ie=i=>typeof i<"u",bt=i=>typeof i=="function",Ai=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function go(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const N=Math.PI,pt=2*N,Te=Number.POSITIVE_INFINITY,po=N/180,Q=N/2,vt=N/4,Li=N*2/3,js=Math.log10,mt=Math.sign;function we(i,t,e){return Math.abs(i-t)n-o).pop(),t}function bo(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function Ae(i){return!bo(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function xo(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function _o(i,t,e){let s,n,o;for(s=0,n=i.length;sl&&c=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function gi(i,t,e){e=e||(a=>i[a]1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const ii=(i,t,e,s)=>gi(i,e,s?n=>{const o=i[n][t];return oi[n][t]gi(i,e,s=>i[s][t]>=e);function Po(i,t,e){let s=0,n=i.length;for(;ss&&i[n-1]>e;)n--;return s>0||n{const s="_onData"+ui(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const a=n.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...o)}),a}})})}function Ii(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&($s.forEach(o=>{delete i[o]}),delete i._chartjs)}function Ys(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const Us=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function qs(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,Us.call(window,()=>{s=!1,i.apply(t,e)}))}}function Do(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const pi=i=>i==="start"?"left":i==="end"?"right":"center",W=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Co=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t,ue=i=>i===0||i===1,zi=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*pt/e)),Ei=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*pt/e)+1,Zt={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*Q)+1,easeOutSine:i=>Math.sin(i*Q),easeInOutSine:i=>-.5*(Math.cos(N*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>ue(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>ue(i)?i:zi(i,.075,.3),easeOutElastic:i=>ue(i)?i:Ei(i,.075,.3),easeInOutElastic(i){return ue(i)?i:i<.5?.5*zi(i*2,.1125,.45):.5+.5*Ei(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Zt.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Zt.easeInBounce(i*2)*.5:Zt.easeOutBounce(i*2-1)*.5+.5};function Ks(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Bi(i){return Ks(i)?i:new te(i)}function Ve(i){return Ks(i)?i:new te(i).saturate(.5).darken(.1).hexString()}const To=["x","y","borderWidth","radius","tension"],Ao=["color","borderColor","backgroundColor"];function Lo(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Ao},numbers:{type:"number",properties:To}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Fo(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Hi=new Map;function Ro(i,t){t=t||{};const e=i+JSON.stringify(t);let s=Hi.get(e);return s||(s=new Intl.NumberFormat(i,t),Hi.set(e,s)),s}function Xs(i,t,e){return Ro(t,e).format(i)}const Io={values(i){return B(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const s=this.chart.options.locale;let n,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=zo(i,e)}const a=js(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Xs(i,s,l)}};function zo(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var Gs={formatters:Io};function Eo(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Gs.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Dt=Object.create(null),si=Object.create(null);function Qt(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;ss.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>Ve(n.backgroundColor),this.hoverBorderColor=(s,n)=>Ve(n.borderColor),this.hoverColor=(s,n)=>Ve(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Ne(this,t,e)}get(t){return Qt(this,t)}describe(t,e){return Ne(si,t,e)}override(t,e){return Ne(Dt,t,e)}route(t,e,s,n){const o=Qt(this,t),a=Qt(this,s),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[r],c=a[n];return C(l)?Object.assign({},c,l):T(l,c)},set(l){this[r]=l}}})}apply(t){t.forEach(e=>e(this))}}var E=new Bo({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Lo,Fo,Eo]);function Ho(i){return!i||R(i.size)||R(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Wi(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function wt(i,t,e){const s=i.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*s)/s+n}function Vi(i,t){!t&&!i||(t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore())}function Ni(i,t,e,s){Zs(i,t,e,s,null)}function Zs(i,t,e,s,n){let o,a,r,l,c,h,d,f;const u=t.pointStyle,p=t.rotation,g=t.radius;let m=(p||0)*po;if(u&&typeof u=="object"&&(o=u.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,s),i.rotate(m),i.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),i.restore();return}if(!(isNaN(g)||g<=0)){switch(i.beginPath(),u){default:n?i.ellipse(e,s,n/2,g,0,0,pt):i.arc(e,s,g,0,pt),i.closePath();break;case"triangle":h=n?n/2:g,i.moveTo(e+Math.sin(m)*h,s-Math.cos(m)*g),m+=Li,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*g),m+=Li,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*g),i.closePath();break;case"rectRounded":c=g*.516,l=g-c,a=Math.cos(m+vt)*l,d=Math.cos(m+vt)*(n?n/2-c:l),r=Math.sin(m+vt)*l,f=Math.sin(m+vt)*(n?n/2-c:l),i.arc(e-d,s-r,c,m-N,m-Q),i.arc(e+f,s-a,c,m-Q,m),i.arc(e+d,s+r,c,m,m+Q),i.arc(e-f,s+a,c,m+Q,m+N),i.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,h=n?n/2:l,i.rect(e-h,s-l,2*h,2*l);break}m+=vt;case"rectRot":d=Math.cos(m)*(n?n/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,f=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-r),i.lineTo(e+f,s-a),i.lineTo(e+d,s+r),i.lineTo(e-f,s+a),i.closePath();break;case"crossRot":m+=vt;case"cross":d=Math.cos(m)*(n?n/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,f=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-r),i.lineTo(e+d,s+r),i.moveTo(e+f,s-a),i.lineTo(e-f,s+a);break;case"star":d=Math.cos(m)*(n?n/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,f=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-r),i.lineTo(e+d,s+r),i.moveTo(e+f,s-a),i.lineTo(e-f,s+a),m+=vt,d=Math.cos(m)*(n?n/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,f=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-r),i.lineTo(e+d,s+r),i.moveTo(e+f,s-a),i.lineTo(e-f,s+a);break;case"line":a=n?n/2:Math.cos(m)*g,r=Math.sin(m)*g,i.moveTo(e-a,s-r),i.lineTo(e+a,s+r);break;case"dash":i.moveTo(e,s),i.lineTo(e+Math.cos(m)*(n?n/2:g),s+Math.sin(m)*g);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function Qs(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,Wo(i,o),l=0;l+i||0;function Js(i,t){const e={},s=C(t),n=s?Object.keys(t):t,o=C(i)?s?a=>T(i[a],i[t[a]]):a=>i[a]:()=>i;for(const a of n)e[a]=Uo(o(a));return e}function tn(i){return Js(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Rt(i){return Js(i,["topLeft","topRight","bottomLeft","bottomRight"])}function Z(i){const t=tn(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function V(i,t){i=i||{},t=t||E.font;let e=T(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=T(i.style,t.style);s&&!(""+s).match($o)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:T(i.family,t.family),lineHeight:Yo(T(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:T(i.weight,t.weight),string:""};return n.string=Ho(n),n}function ge(i,t,e,s){let n,o,a;for(n=0,o=i.length;ne&&r===0?0:r+l;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function Bt(i,t){return Object.assign(Object.create(i),t)}function xi(i,t=[""],e,s,n=()=>i[0]){const o=e||i;typeof s>"u"&&(s=on("_fallback",i));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:r=>xi([r,...i],t,o,s)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete i[0][l],!0},get(r,l){return sn(r,l,()=>ea(l,t,i,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(r,l){return $i(r).includes(l)},ownKeys(r){return $i(r)},set(r,l,c){const h=r._storage||(r._storage=n());return r[l]=h[l]=c,delete r._keys,!0}})}function Et(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:en(i,s),setContext:o=>Et(i,o,e,s),override:o=>Et(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,a){return delete o[a],delete i[a],!0},get(o,a,r){return sn(o,a,()=>Xo(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(i,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,a)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,a){return Reflect.has(i,a)},ownKeys(){return Reflect.ownKeys(i)},set(o,a,r){return i[a]=r,delete o[a],!0}})}function en(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:bt(e)?e:()=>e,isIndexable:bt(s)?s:()=>s}}const Ko=(i,t)=>i?i+ui(t):t,_i=(i,t)=>C(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function sn(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];const s=e();return i[t]=s,s}function Xo(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=i;let r=s[t];return bt(r)&&a.isScriptable(t)&&(r=Go(t,r,i,e)),B(r)&&r.length&&(r=Zo(t,r,i,a.isIndexable)),_i(t,r)&&(r=Et(r,n,o&&o[t],a)),r}function Go(i,t,e,s){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=e;if(r.has(i))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+i);r.add(i);let l=t(o,a||s);return r.delete(i),_i(i,l)&&(l=yi(n._scopes,n,i,l)),l}function Zo(i,t,e,s){const{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=e;if(typeof o.index<"u"&&s(i))return t[o.index%t.length];if(C(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=yi(c,n,i,h);t.push(Et(d,o,a&&a[i],r))}}return t}function nn(i,t,e){return bt(i)?i(t,e):i}const Qo=(i,t)=>i===!0?t:typeof i=="string"?zt(t,i):void 0;function Jo(i,t,e,s,n){for(const o of t){const a=Qo(e,o);if(a){i.add(a);const r=nn(a._fallback,e,n);if(typeof r<"u"&&r!==e&&r!==s)return r}else if(a===!1&&typeof s<"u"&&e!==s)return null}return!1}function yi(i,t,e,s){const n=t._rootScopes,o=nn(t._fallback,e,s),a=[...i,...n],r=new Set;r.add(s);let l=ji(r,a,e,o||e,s);return l===null||typeof o<"u"&&o!==e&&(l=ji(r,a,o,l,s),l===null)?!1:xi(Array.from(r),[""],n,o,()=>ta(t,e,s))}function ji(i,t,e,s,n){for(;e;)e=Jo(i,t,e,s,n);return e}function ta(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return B(n)&&C(e)?e:n||{}}function ea(i,t,e,s){let n;for(const o of t)if(n=on(Ko(o,i),e),typeof n<"u")return _i(i,n)?yi(e,s,i,n):n}function on(i,t){for(const e of t){if(!e)continue;const s=e[i];if(typeof s<"u")return s}}function $i(i){let t=i._keys;return t||(t=i._keys=ia(i._scopes)),t}function ia(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}function vi(){return typeof window<"u"&&typeof document<"u"}function ki(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Fe(i,t,e){let s;return typeof i=="string"?(s=parseInt(i,10),i.indexOf("%")!==-1&&(s=s/100*t.parentNode[e])):s=i,s}const ze=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function sa(i,t){return ze(i).getPropertyValue(t)}const na=["top","right","bottom","left"];function Ot(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=na[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const oa=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function aa(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let a=!1,r,l;if(oa(n,o,i.target))r=n,l=o;else{const c=t.getBoundingClientRect();r=s.clientX-c.left,l=s.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function Mt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=ze(e),o=n.boxSizing==="border-box",a=Ot(n,"padding"),r=Ot(n,"border","width"),{x:l,y:c,box:h}=aa(i,e),d=a.left+(h&&r.left),f=a.top+(h&&r.top);let{width:u,height:p}=t;return o&&(u-=a.width+r.width,p-=a.height+r.height),{x:Math.round((l-d)/u*e.width/s),y:Math.round((c-f)/p*e.height/s)}}function ra(i,t,e){let s,n;if(t===void 0||e===void 0){const o=i&&ki(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const a=o.getBoundingClientRect(),r=ze(o),l=Ot(r,"border","width"),c=Ot(r,"padding");t=a.width-c.width-l.width,e=a.height-c.height-l.height,s=Fe(r.maxWidth,o,"clientWidth"),n=Fe(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||Te,maxHeight:n||Te}}const ft=i=>Math.round(i*10)/10;function la(i,t,e,s){const n=ze(i),o=Ot(n,"margin"),a=Fe(n.maxWidth,i,"clientWidth")||Te,r=Fe(n.maxHeight,i,"clientHeight")||Te,l=ra(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const f=Ot(n,"border","width"),u=Ot(n,"padding");c-=u.width+f.width,h-=u.height+f.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=ft(Math.min(c,a,l.maxWidth)),h=ft(Math.min(h,r,l.maxHeight)),c&&!h&&(h=ft(c/2)),(t!==void 0||e!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=ft(Math.floor(h*s))),{width:c,height:h}}function Yi(i,t,e){const s=t||1,n=ft(i.height*s),o=ft(i.width*s);i.height=ft(i.height),i.width=ft(i.width);const a=i.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${i.height}px`,a.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||a.height!==n||a.width!==o?(i.currentDevicePixelRatio=s,a.height=n,a.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const ca=(function(){let i=!1;try{const t={get passive(){return i=!0,!1}};vi()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i})();function Ui(i,t){const e=sa(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}const ha=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},da=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function It(i,t,e){return i?ha(t,e):da()}function an(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function rn(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function pe(i,t,e){return i.options.clip?i[e]:t[e]}function fa(i,t){const{xScale:e,yScale:s}=i;return e&&s?{left:pe(e,t,"left"),right:pe(e,t,"right"),top:pe(s,t,"top"),bottom:pe(s,t,"bottom")}:t}function ua(i,t){const e=t._clip;if(e.disabled)return!1;const s=fa(t,i.chartArea);return{left:e.left===!1?0:s.left-(e.left===!0?0:e.left),right:e.right===!1?i.width:s.right+(e.right===!0?0:e.right),top:e.top===!1?0:s.top-(e.top===!0?0:e.top),bottom:e.bottom===!1?i.height:s.bottom+(e.bottom===!0?0:e.bottom)}}/*! + * Chart.js v4.5.1 + * https://www.chartjs.org + * (c) 2025 Chart.js Contributors + * Released under the MIT License + */class ga{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,s,n){const o=e.listeners[n],a=e.duration;o.forEach(r=>r({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(s-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Us.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ot=new ga;const qi="transparent",pa={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=Bi(i||qi),n=s.valid&&Bi(t||qi);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class ma{constructor(t,e,s,n){const o=e[s];n=ge([t.to,n,o,t.from]);const a=ge([t.from,o,n]);this._active=!0,this._fn=t.fn||pa[t.type||typeof a],this._easing=Zt[t.easing]||Zt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=ge([t.to,e,n,t.from]),this._from=ge([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n{const o=t[n];if(!C(o))return;const a={};for(const r of e)a[r]=o[r];(B(o.properties)&&o.properties||[n]).forEach(r=>{(r===n||!s.has(r))&&s.set(r,a)})})}_animateOptions(t,e){const s=e.options,n=xa(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&ba(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const f=s.get(c);if(d)if(f&&d.active()){d.update(f,h,r);continue}else d.cancel();if(!f||!f.duration){t[c]=h;continue}o[c]=d=new ma(f,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return ot.add(this._chart,s),!0}}function ba(i,t){const e=[],s=Object.keys(t);for(let n=0;n0||!e&&o<0)return n.index}return null}function Zi(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,c=a.axis,h=ka(o,a,s),d=t.length;let f;for(let u=0;ue[s].axis===t).shift()}function Ma(i,t){return Bt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Pa(i,t,e){return Bt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Nt(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}const Ye=i=>i==="reset"||i==="none",Qi=(i,t)=>t?i:Object.assign({},i),Oa=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:cn(e,!0),values:null};class Jt{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=je(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Nt(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,f,u,p)=>d==="x"?f:d==="r"?p:u,o=e.xAxisID=T(s.xAxisID,$e(t,"x")),a=e.yAxisID=T(s.yAxisID,$e(t,"y")),r=e.rAxisID=T(s.rAxisID,$e(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,a,r),h=e.vAxisID=n(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ii(this._data,this),t._stacked&&Nt(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(C(e)){const n=this._cachedMeta;this._data=va(e,n)}else if(s!==e){if(s){Ii(s,this);const n=this._cachedMeta;Nt(n),n._parsed=[]}e&&Object.isExtensible(e)&&Oo(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=je(e.vScale,e),e.stack!==s.stack&&(n=!0,Nt(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&(Zi(this,e._parsed),e._stacked=je(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:a}=s,r=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,f;if(this._parsing===!1)s._parsed=n,s._sorted=!0,f=n;else{B(n[t])?f=this.parseArrayData(s,n,t,e):C(n[t])?f=this.parseObjectData(s,n,t,e):f=this.parsePrimitiveData(s,n,t,e);const u=()=>d[r]===null||c&&d[r]g||d=0;--f)if(!p()){this.updateRangeFromParsed(c,t,u,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,a;for(n=0,o=e.length;n=0&&tthis.getContext(s,n,e),g=c.resolveNamedOptions(f,u,p,d);return g.$shared&&(g.$shared=l,o[a]=Object.freeze(Qi(g,l))),g}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(n.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),f=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(f,this.getContext(t,s,e))}const c=new ln(n,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ye(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),a=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:a}}updateElement(t,e,s,n){Ye(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!Ye(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[r,l,c]of this._syncList)this[r](l,c);this._syncList=[];const n=s.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o{for(c.length+=e,r=c.length-1;r>=a;r--)c[r]=c[r-e]};for(l(o),r=t;rn-o))}return i._cache.$bar}function Ca(i){const t=i.iScale,e=Da(t,i.type);let s=t._length,n,o,a,r;const l=()=>{a===32767||a===-32768||(ie(r)&&(s=Math.min(s,Math.abs(a-r)||s)),r=a)};for(n=0,o=e.length;n0?n[i-1]:null,r=iMath.abs(r)&&(l=r,c=a),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:a,max:r}}function hn(i,t,e,s){return B(i)?La(i,t,e,s):t[e.axis]=e.parse(i,s),t}function Ji(i,t,e,s){const n=i.iScale,o=i.vScale,a=n.getLabels(),r=n===o,l=[];let c,h,d,f;for(c=e,h=e+s;c=e?1:-1)}function Ra(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.baseh.controller.options.grouped),o=s.options.stacked,a=[],r=this._cachedMeta.controller.getParsed(e),l=r&&r[s.axis],c=h=>{const d=h._parsed.find(u=>u[s.axis]===l),f=d&&d[h.vScale.axis];if(R(f)||isNaN(f))return!0};for(const h of n)if(!(e!==void 0&&c(h))&&((o===!1||a.indexOf(h.stack)===-1||o===void 0&&h.stack===void 0)&&a.push(h.stack),h.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(s=>t[s].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)t[T(this.chart.options.indexAxis==="x"?s.xAxisID:s.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,s){const n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,s=e.iScale,n=[];let o,a;for(o=0,a=e.data.length;o!R(g[d.axis]));h.lo-=Math.max(0,u);const p=f.slice(h.hi).findIndex(g=>!R(g[d.axis]));h.hi+=Math.max(0,p)}return h}}return{lo:0,hi:o.length-1}}function Ee(i,t,e,s,n){const o=i.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r{l[a]&&l[a](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(t.x,t.y,n))}),s&&!r?[]:o}var ja={modes:{index(i,t,e,s){const n=Mt(t,i),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?qe(i,n,o,s,a):Ke(i,n,o,!1,s,a),l=[];return r.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){const n=Mt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;let r=e.intersect?qe(i,n,o,s,a):Ke(i,n,o,!1,s,a);if(r.length>0){const l=r[0].datasetIndex,c=i.getDatasetMeta(l).data;r=[];for(let h=0;he.pos===t)}function ss(i,t){return i.filter(e=>dn.indexOf(e.pos)===-1&&e.box.axis===t)}function $t(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function $a(i){const t=[];let e,s,n,o,a,r;for(e=0,s=(i||[]).length;ec.box.fullSize),!0),s=$t(jt(t,"left"),!0),n=$t(jt(t,"right")),o=$t(jt(t,"top"),!0),a=$t(jt(t,"bottom")),r=ss(t,"x"),l=ss(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:jt(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}function ns(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function fn(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function Ka(i,t,e,s){const{pos:n,box:o}=e,a=i.maxPadding;if(!C(n)){e.size&&(i[n]-=e.size);const d=s[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[n]+=e.size}o.getPadding&&fn(a,o.getPadding());const r=Math.max(0,t.outerWidth-ns(a,i,"left","right")),l=Math.max(0,t.outerHeight-ns(a,i,"top","bottom")),c=r!==i.w,h=l!==i.h;return i.w=r,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Xa(i){const t=i.maxPadding;function e(s){const n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Ga(i,t){const e=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return s(i?["left","right"]:["top","bottom"])}function Kt(i,t,e,s){const n=[];let o,a,r,l,c,h;for(o=0,a=i.length,c=0;o{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),f=Object.assign({},n);fn(f,Z(s));const u=Object.assign({maxPadding:f,w:o,h:a,x:n.left,y:n.top},n),p=Ua(l.concat(c),d);Kt(r.fullSize,u,d,p),Kt(l,u,d,p),Kt(c,u,d,p)&&Kt(l,u,d,p),Xa(u),os(r.leftAndTop,u,d,p),u.x+=u.w,u.y+=u.h,os(r.rightAndBottom,u,d,p),i.chartArea={left:u.left,top:u.top,right:u.left+u.w,bottom:u.top+u.h,height:u.h,width:u.w},L(r.chartArea,g=>{const m=g.box;Object.assign(m,i.chartArea),m.update(u.w,u.h,{left:0,top:0,right:0,bottom:0})})}};class un{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class Za extends un{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Me="$chartjs",Qa={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},as=i=>i===null||i==="";function Ja(i,t){const e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[Me]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",as(n)){const o=Ui(i,"width");o!==void 0&&(i.width=o)}if(as(s))if(i.style.height==="")i.height=i.width/(t||2);else{const o=Ui(i,"height");o!==void 0&&(i.height=o)}return i}const gn=ca?{passive:!0}:!1;function tr(i,t,e){i&&i.addEventListener(t,e,gn)}function er(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,gn)}function ir(i,t){const e=Qa[i.type]||i.type,{x:s,y:n}=Mt(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function Re(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function sr(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||Re(r.addedNodes,s),a=a&&!Re(r.removedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function nr(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||Re(r.removedNodes,s),a=a&&!Re(r.addedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const ne=new Map;let rs=0;function pn(){const i=window.devicePixelRatio;i!==rs&&(rs=i,ne.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function or(i,t){ne.size||window.addEventListener("resize",pn),ne.set(i,t)}function ar(i){ne.delete(i),ne.size||window.removeEventListener("resize",pn)}function rr(i,t,e){const s=i.canvas,n=s&&ki(s);if(!n)return;const o=qs((r,l)=>{const c=n.clientWidth;e(r,l),c{const l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(n),or(i,o),a}function Xe(i,t,e){e&&e.disconnect(),t==="resize"&&ar(i)}function lr(i,t,e){const s=i.canvas,n=qs(o=>{i.ctx!==null&&e(ir(o,i))},i);return tr(s,t,n),n}class cr extends un{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(Ja(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[Me])return!1;const s=e[Me].initial;["height","width"].forEach(o=>{const a=s[o];R(a)?e.removeAttribute(o):e.setAttribute(o,a)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[Me],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),a={attach:sr,detach:nr,resize:rr}[e]||lr;n[e]=a(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:Xe,detach:Xe,resize:Xe}[e]||er)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return la(t,e,s,n)}isAttached(t){const e=t&&ki(t);return!!(e&&e.isConnected)}}function hr(i){return!vi()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?Za:cr}class xt{constructor(){D(this,"x");D(this,"y");D(this,"active",!1);D(this,"options");D(this,"$animations")}tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return Ae(this.x)&&Ae(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}D(xt,"defaults",{}),D(xt,"defaultRoutes");function dr(i,t){const e=i.options.ticks,s=fr(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?gr(t):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>n)return pr(t,c,o,a/n),c;const h=ur(o,t,n);if(a>0){let d,f;const u=a>1?Math.round((l-r)/(a-1)):null;for(be(t,c,h,R(u)?0:r-u,r),d=0,f=a-1;dn)return l}return Math.max(n,1)}function gr(i){const t=[];let e,s;for(e=0,s=i.length;ei==="left"?"right":i==="right"?"left":i,ls=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,cs=(i,t)=>Math.min(t||i,i);function hs(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;oa+r)))return l}function _r(i,t){L(i,e=>{const s=e.gc,n=s.length/2;let o;if(n>t){for(o=0;os?s:e,s=n&&e>s?e:s,{min:et(e,et(s,e)),max:et(s,et(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){I(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=qo(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),d=h.widest.width,f=h.highest.height,u=J(this.chart.width-d,0,this.maxWidth);r=t.offset?this.maxWidth/s:u/(s-1),d+6>r&&(r=u/(s-(t.offset?.5:1)),l=this.maxHeight-Yt(t.grid)-e.padding-ds(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),a=yo(Math.min(Math.asin(J((h.highest.height+6)/r,-1,1)),Math.asin(J(l/c,-1,1))-Math.asin(J(f/c,-1,1)))),a=Math.max(n,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){I(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){I(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const l=ds(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=Yt(o)+l):(t.height=this.maxHeight,t.width=Yt(o)+l),s.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:f}=this._getLabelSizes(),u=s.padding*2,p=Pt(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(r){const b=s.mirror?0:m*d.width+g*f.height;t.height=Math.min(this.maxHeight,t.height+b+u)}else{const b=s.mirror?0:g*d.width+m*f.height;t.width=Math.min(this.maxWidth,t.width+b+u)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){const{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,u=0;l?c?(f=n*t.width,u=s*e.height):(f=s*t.height,u=n*e.width):o==="start"?u=e.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,u=e.width/2),this.paddingLeft=Math.max((f-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((u-d+a)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){I(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e({width:a[P]||0,height:r[P]||0});return{first:w(0),last:w(e-1),widest:w(k),highest:w(S),widths:a,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return So(this._alignToPixels?wt(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&tr*n?r/s:l/n:l*n0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:a,border:r}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Yt(o),u=[],p=r.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(H){return wt(s,H,g)};let x,_,v,y,k,S,w,P,F,O,A,j;if(a==="top")x=b(this.bottom),S=this.bottom-f,P=x-m,O=b(t.top)+m,j=t.bottom;else if(a==="bottom")x=b(this.top),O=t.top,j=b(t.bottom)-m,S=x+m,P=this.top+f;else if(a==="left")x=b(this.right),k=this.right-f,w=x-m,F=b(t.left)+m,A=t.right;else if(a==="right")x=b(this.left),F=t.left,A=b(t.right)-m,k=x+m,w=this.left+f;else if(e==="x"){if(a==="center")x=b((t.top+t.bottom)/2+.5);else if(C(a)){const H=Object.keys(a)[0],U=a[H];x=b(this.chart.scales[H].getPixelForValue(U))}O=t.top,j=t.bottom,S=x+m,P=S+f}else if(e==="y"){if(a==="center")x=b((t.left+t.right)/2);else if(C(a)){const H=Object.keys(a)[0],U=a[H];x=b(this.chart.scales[H].getPixelForValue(U))}k=x-m,w=k-f,F=t.left,A=t.right}const tt=T(n.ticks.maxTicksLimit,d),z=Math.max(1,Math.ceil(d/tt));for(_=0;_0&&(yt-=_t/2);break}le={left:yt,top:Vt,width:_t+Tt.width,height:Wt+Tt.height,color:z.backdropColor}}m.push({label:v,font:P,textOffset:A,options:{rotation:g,color:U,strokeColor:ae,strokeWidth:re,textAlign:Ct,textBaseline:j,translation:[y,k],backdrop:le}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Pt(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,a=this._getLabelSizes(),r=t+o,l=a.widest.width;let c,h;return e==="left"?n?(h=this.right+o,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-r,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?n?(h=this.left+o,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+r,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:s,top:n,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,n,o,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,a=n.length;o{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,a;for(o=0,a=e.length;o{const s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");E.route(o,n,l,r)})}function Pr(i){return"id"in i&&"defaults"in i}class Or{constructor(){this.controllers=new xe(Jt,"datasets",!0),this.elements=new xe(xt,"elements"),this.plugins=new xe(Object,"plugins"),this.scales=new xe(Ht,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):L(n,a=>{const r=s||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,s){const n=ui(t);I(s["before"+n],[],s),e[t](s),I(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;eo.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function Cr(i){const t={},e=[],s=Object.keys(st.plugins.items);for(let o=0;o1&&fs(i[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function us(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function zr(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(e.length)return us(i,"x",e[0])||us(i,"y",e[0])}return{}}function Er(i,t){const e=Dt[i.type]||{scales:{}},s=t.scales||{},n=ni(i.type,t),o=Object.create(null);return Object.keys(s).forEach(a=>{const r=s[a];if(!C(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=oi(a,r,zr(a,i),E.scales[r.type]),c=Rr(l,n),h=e.scales||{};o[a]=Gt(Object.create(null),[{axis:l},r,h[l],h[c]])}),i.data.datasets.forEach(a=>{const r=a.type||i.type,l=a.indexAxis||ni(r,t),h=(Dt[r]||{}).scales||{};Object.keys(h).forEach(d=>{const f=Fr(d,l),u=a[f+"AxisID"]||f;o[u]=o[u]||Object.create(null),Gt(o[u],[{axis:f},s[u],h[d]])})}),Object.keys(o).forEach(a=>{const r=o[a];Gt(r,[E.scales[r.type],E.scale])}),o}function mn(i){const t=i.options||(i.options={});t.plugins=T(t.plugins,{}),t.scales=Er(i,t)}function bn(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Br(i){return i=i||{},i.data=bn(i.data),mn(i),i}const gs=new Map,xn=new Set;function _e(i,t){let e=gs.get(i);return e||(e=t(),gs.set(i,e),xn.add(e)),e}const Ut=(i,t,e)=>{const s=zt(t,e);s!==void 0&&i.add(s)};class Hr{constructor(t){this._config=Br(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=bn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),mn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return _e(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return _e(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return _e(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,s=this.type;return _e(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,a=this._cachedScopes(t,s),r=a.get(e);if(r)return r;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>Ut(l,t,d))),h.forEach(d=>Ut(l,n,d)),h.forEach(d=>Ut(l,Dt[o]||{},d)),h.forEach(d=>Ut(l,E,d)),h.forEach(d=>Ut(l,si,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),xn.has(e)&&a.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Dt[e]||{},E.datasets[e]||{},{type:e},E,si]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=ps(this._resolverCache,t,n);let l=a;if(Vr(a,e)){o.$shared=!1,s=bt(s)?s():s;const c=this.createResolver(t,s,r);l=Et(a,s,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){const{resolver:o}=ps(this._resolverCache,t,s);return C(e)?Et(o,e,void 0,n):o}}function ps(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);return o||(o={resolver:xi(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},s.set(n,o)),o}const Wr=i=>C(i)&&Object.getOwnPropertyNames(i).some(t=>bt(i[t]));function Vr(i,t){const{isScriptable:e,isIndexable:s}=en(i);for(const n of t){const o=e(n),a=s(n),r=(a||o)&&i[n];if(o&&(bt(r)||Wr(r))||a&&B(r))return!0}return!1}var Nr="4.5.1";const jr=["top","bottom","left","right","chartArea"];function ms(i,t){return i==="top"||i==="bottom"||jr.indexOf(i)===-1&&t==="x"}function bs(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function xs(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),I(e&&e.onComplete,[i],t)}function $r(i){const t=i.chart,e=t.options.animation;I(e&&e.onProgress,[i],t)}function _n(i){return vi()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const Pe={},_s=i=>{const t=_n(i);return Object.values(Pe).filter(e=>e.canvas===t).pop()};function Yr(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const a=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=a)}}}function Ur(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}var ht;let Be=(ht=class{static register(...t){st.add(...t),ys()}static unregister(...t){st.remove(...t),ys()}constructor(t,e){const s=this.config=new Hr(e),n=_n(t),o=_s(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||hr(n)),this.platform.updateConfig(s);const r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,c=l&&l.height,h=l&&l.width;if(this.id=ro(),this.ctx=r,this.canvas=l,this.width=h,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Dr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Do(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],Pe[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}ot.listen(this,"complete",xs),ot.listen(this,"progress",$r),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return R(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return st}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Yi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Vi(this.canvas,this.ctx),this}stop(){return ot.stop(this),this}resize(t,e){ot.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,o),r=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Yi(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),I(s.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};L(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((a,r)=>(a[r]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const r=e[a],l=oi(a,r),c=l==="r",h=l==="x";return{options:r,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),L(o,a=>{const r=a.options,l=r.id,c=oi(l,r),h=T(r.type,a.dtype);(r.position===void 0||ms(r.position,c)!==ms(a.dposition))&&(r.position=a.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{const f=st.getScale(h);d=new f({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(r,t)}),L(n,(a,r)=>{a||delete s[r]}),L(s,a=>{X.configure(this,a,a.options),X.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(bs("z","_idx"));const{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){L(this.scales,t=>{X.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Ai(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e){const a=s==="_removeElements"?-o:o;Yr(t,n,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),n=s(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;X.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],L(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,s={meta:t,index:t.index,cancelable:!0},n=ua(this,t);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(n&&mi(e,n),t.controller.draw(),n&&bi(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Qs(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){const o=ja.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=Bt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){const s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);ie(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),a.update(o,{visible:s}),this.update(r=>r.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ot.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,a),t[o]=a},n=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};L(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const r=()=>{n("attach",r),this.attached=!0,this.resize(),s("resize",o),s("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){L(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},L(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const n=s?"set":"remove";let o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,l=t.length;r{const r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!De(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){const n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),a=o(e,t),r=s?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,a=e,r=this._getActiveElements(t,n,s,a),l=go(t),c=Ur(t,this._lastEvent,s,l);s&&(this._lastEvent=null,I(o.onHover,[t,r,this],this),l&&I(o.onClick,[t,r,this],this));const h=!De(r,n);return(h||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}},D(ht,"defaults",E),D(ht,"instances",Pe),D(ht,"overrides",Dt),D(ht,"registry",st),D(ht,"version",Nr),D(ht,"getChart",_s),ht);function ys(){return L(Be.instances,i=>i._plugins.invalidate())}function yn(i,t){const{x:e,y:s,base:n,width:o,height:a}=i.getProps(["x","y","base","width","height"],t);let r,l,c,h,d;return i.horizontal?(d=a/2,r=Math.min(e,n),l=Math.max(e,n),c=s-d,h=s+d):(d=o/2,r=e-d,l=e+d,c=Math.min(s,n),h=Math.max(s,n)),{left:r,top:c,right:l,bottom:h}}function ut(i,t,e,s){return i?0:J(t,e,s)}function qr(i,t,e){const s=i.options.borderWidth,n=i.borderSkipped,o=tn(s);return{t:ut(n.top,o.top,0,e),r:ut(n.right,o.right,0,t),b:ut(n.bottom,o.bottom,0,e),l:ut(n.left,o.left,0,t)}}function Kr(i,t,e){const{enableBorderRadius:s}=i.getProps(["enableBorderRadius"]),n=i.options.borderRadius,o=Rt(n),a=Math.min(t,e),r=i.borderSkipped,l=s||C(n);return{topLeft:ut(!l||r.top||r.left,o.topLeft,0,a),topRight:ut(!l||r.top||r.right,o.topRight,0,a),bottomLeft:ut(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:ut(!l||r.bottom||r.right,o.bottomRight,0,a)}}function Xr(i){const t=yn(i),e=t.right-t.left,s=t.bottom-t.top,n=qr(i,e/2,s/2),o=Kr(i,e/2,s/2);return{outer:{x:t.left,y:t.top,w:e,h:s,radius:o},inner:{x:t.left+n.l,y:t.top+n.t,w:e-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}function Ge(i,t,e,s){const n=t===null,o=e===null,r=i&&!(n&&o)&&yn(i,s);return r&&(n||Ft(t,r.left,r.right))&&(o||Ft(e,r.top,r.bottom))}function Gr(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function Zr(i,t){i.rect(t.x,t.y,t.w,t.h)}function Ze(i,t,e={}){const s=i.x!==e.x?-t:0,n=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-s,a=(i.y+i.h!==e.y+e.h?t:0)-n;return{x:i.x+s,y:i.y+n,w:i.w+o,h:i.h+a,radius:i.radius}}class Oe extends xt{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:s,backgroundColor:n}}=this,{inner:o,outer:a}=Xr(this),r=Gr(a.radius)?Le:Zr;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),r(t,Ze(a,e,o)),t.clip(),r(t,Ze(o,-e,a)),t.fillStyle=s,t.fill("evenodd")),t.beginPath(),r(t,Ze(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,s){return Ge(this,t,e,s)}inXRange(t,e){return Ge(this,t,null,e)}inYRange(t,e){return Ge(this,null,t,e)}getCenterPoint(t){const{x:e,y:s,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?s:(s+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}D(Oe,"id","bar"),D(Oe,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),D(Oe,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const vs=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},Qr=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class ks extends xt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=I(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels,n=V(s.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=vs(s,o);let c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,n,r,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+r;let d=t;o.textAlign="left",o.textBaseline="middle";let f=-1,u=-h;return this.legendItems.forEach((p,g)=>{const m=s+e/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*r>a)&&(d+=h,c[c.length-(g>0?0:1)]=0,u+=h,f++),l[g]={left:0,top:u,row:f,width:m,height:n},c[c.length-1]+=m+r}),d}_fitCols(t,e,s,n){const{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-t;let d=r,f=0,u=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:x,itemHeight:_}=Jr(s,e,o,m,n);b>0&&u+_+2*r>h&&(d+=f+r,c.push({width:f,height:u}),p+=f+r,g++,f=u=0),l[b]={left:p,top:u,col:g,width:x,height:_},f=Math.max(f,x),u+=_+r}),d+=f,c.push({width:f,height:u}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,a=It(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=W(s,this.left+n,this.right-this.lineWidths[r]);for(const c of e)r!==c.row&&(r=c.row,l=W(s,this.left+n,this.right-this.lineWidths[r])),c.top+=this.top+t+n,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+n}else{let r=0,l=W(s,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const c of e)c.col!==r&&(r=c.col,l=W(s,this.top+t+n,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+n,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;mi(t,this),this._draw(),bi(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:a}=t,r=E.color,l=It(t.rtl,this.left,this.width),c=V(a.font),{padding:h}=a,d=c.size,f=d/2;let u;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=vs(a,d),b=function(k,S,w){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const P=T(w.lineWidth,1);if(n.fillStyle=T(w.fillStyle,r),n.lineCap=T(w.lineCap,"butt"),n.lineDashOffset=T(w.lineDashOffset,0),n.lineJoin=T(w.lineJoin,"miter"),n.lineWidth=P,n.strokeStyle=T(w.strokeStyle,r),n.setLineDash(T(w.lineDash,[])),a.usePointStyle){const F={radius:g*Math.SQRT2/2,pointStyle:w.pointStyle,rotation:w.rotation,borderWidth:P},O=l.xPlus(k,p/2),A=S+f;Zs(n,F,O,A,a.pointStyleWidth&&p)}else{const F=S+Math.max((d-g)/2,0),O=l.leftForLtr(k,p),A=Rt(w.borderRadius);n.beginPath(),Object.values(A).some(j=>j!==0)?Le(n,{x:O,y:F,w:p,h:g,radius:A}):n.rect(O,F,p,g),n.fill(),P!==0&&n.stroke()}n.restore()},x=function(k,S,w){se(n,w.text,k,S+m/2,c,{strikethrough:w.hidden,textAlign:l.textAlign(w.textAlign)})},_=this.isHorizontal(),v=this._computeTitleHeight();_?u={x:W(o,this.left+h,this.right-s[0]),y:this.top+h+v,line:0}:u={x:this.left+h,y:W(o,this.top+v+h,this.bottom-e[0].height),line:0},an(this.ctx,t.textDirection);const y=m+h;this.legendItems.forEach((k,S)=>{n.strokeStyle=k.fontColor,n.fillStyle=k.fontColor;const w=n.measureText(k.text).width,P=l.textAlign(k.textAlign||(k.textAlign=a.textAlign)),F=p+f+w;let O=u.x,A=u.y;l.setWidth(this.width),_?S>0&&O+F+h>this.right&&(A=u.y+=y,u.line++,O=u.x=W(o,this.left+h,this.right-s[u.line])):S>0&&A+y>this.bottom&&(O=u.x=O+e[u.line].width+h,u.line++,A=u.y=W(o,this.top+v+h,this.bottom-e[u.line].height));const j=l.x(O);if(b(j,A,k),O=Co(P,O+p+f,_?O+F:this.right,t.rtl),x(l.x(O),A,k),_)u.x+=F+h;else if(typeof k.text!="string"){const tt=c.lineHeight;u.y+=vn(k,tt)+h}else u.y+=y}),rn(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,s=V(e.font),n=Z(e.padding);if(!e.display)return;const o=It(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=s.size/2,c=n.top+l;let h,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),h=this.top+c,d=W(t.align,d,this.right-f);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+W(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const u=W(r,d,d+f);a.textAlign=o.textAlign(pi(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=s.string,se(a,e.text,u,h,s)}_computeTitleHeight(){const t=this.options.title,e=V(t.font),s=Z(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(Ft(t,this.left,this.right)&&Ft(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;so.length>a.length?o:a)),t+e.size/2+s.measureText(n).width}function el(i,t,e){let s=i;return typeof t.text!="string"&&(s=vn(t,e)),s}function vn(i,t){const e=i.text?i.text.length:0;return t*e}function il(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var sl={id:"legend",_element:ks,start(i,t,e){const s=i.legend=new ks({ctx:i.ctx,options:e,chart:i});X.configure(i,s,e),X.addBox(i,s)},stop(i){X.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const s=i.legend;X.configure(i,s,e),s.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o,useBorderRadius:a,borderRadius:r}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=Z(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:a&&(r||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class kn extends xt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=B(s.text)?s.text.length:1;this._padding=Z(s.padding);const o=n*V(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:s,bottom:n,right:o,options:a}=this,r=a.align;let l=0,c,h,d;return this.isHorizontal()?(h=W(r,s,o),d=e+t,c=o-s):(a.position==="left"?(h=s+t,d=W(r,n,e),l=N*-.5):(h=o-t,d=W(r,e,n),l=N*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const s=V(e.font),o=s.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);se(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:pi(e.align),textBaseline:"middle",translation:[a,r]})}}function nl(i,t){const e=new kn({ctx:i.ctx,options:t,chart:i});X.configure(i,e,t),X.addBox(i,e),i.titleBlock=e}var ol={id:"title",_element:kn,start(i,t,e){nl(i,e)},stop(i){const t=i.titleBlock;X.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const s=i.titleBlock;X.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Xt={average(i){if(!i.length)return!1;let t,e,s=new Set,n=0,o=0;for(t=0,e=i.length;tr+l)/s.size,y:n/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,s=t.y,n=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=i.length;o-1?i.split(` +`):i}function al(i,t){const{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:i,label:a,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function ws(i,t){const e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:a,boxHeight:r}=t,l=V(t.bodyFont),c=V(t.titleFont),h=V(t.footerFont),d=o.length,f=n.length,u=s.length,p=Z(t.padding);let g=p.height,m=0,b=s.reduce((v,y)=>v+y.before.length+y.lines.length+y.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const v=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;g+=u*v+(b-u)*l.lineHeight+(b-1)*t.bodySpacing}f&&(g+=t.footerMarginTop+f*h.lineHeight+(f-1)*t.footerSpacing);let x=0;const _=function(v){m=Math.max(m,e.measureText(v).width+x)};return e.save(),e.font=c.string,L(i.title,_),e.font=l.string,L(i.beforeBody.concat(i.afterBody),_),x=t.displayColors?a+2+t.boxPadding:0,L(s,v=>{L(v.before,_),L(v.lines,_),L(v.after,_)}),x=0,e.font=h.string,L(i.footer,_),e.restore(),m+=p.width,{width:m,height:g}}function rl(i,t){const{y:e,height:s}=t;return ei.height-s/2?"bottom":"center"}function ll(i,t,e,s){const{x:n,width:o}=s,a=e.caretSize+e.caretPadding;if(i==="left"&&n+o+a>t.width||i==="right"&&n-o-a<0)return!0}function cl(i,t,e,s){const{x:n,width:o}=e,{width:a,chartArea:{left:r,right:l}}=i;let c="center";return s==="center"?c=n<=(r+l)/2?"left":"right":n<=o/2?c="left":n>=a-o/2&&(c="right"),ll(c,i,t,e)&&(c="center"),c}function Ss(i,t,e){const s=e.yAlign||t.yAlign||rl(i,e);return{xAlign:e.xAlign||t.xAlign||cl(i,t,e,s),yAlign:s}}function hl(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function dl(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function Ms(i,t,e,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:f,bottomRight:u}=Rt(a);let p=hl(t,r);const g=dl(t,l,c);return l==="center"?r==="left"?p+=c:r==="right"&&(p-=c):r==="left"?p-=Math.max(h,f)+n:r==="right"&&(p+=Math.max(d,u)+n),{x:J(p,0,s.width-t.width),y:J(g,0,s.height-t.height)}}function ye(i,t,e){const s=Z(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function Ps(i){return it([],at(i))}function fl(i,t,e){return Bt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Os(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const wn={beforeTitle:nt,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex"u"?wn[t].call(e,s):n}class ai extends xt{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new ln(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=fl(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:s}=e,n=$(s,"beforeTitle",this,t),o=$(s,"title",this,t),a=$(s,"afterTitle",this,t);let r=[];return r=it(r,at(n)),r=it(r,at(o)),r=it(r,at(a)),r}getBeforeBody(t,e){return Ps($(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:s}=e,n=[];return L(t,o=>{const a={before:[],lines:[],after:[]},r=Os(s,o);it(a.before,at($(r,"beforeLabel",this,o))),it(a.lines,$(r,"label",this,o)),it(a.after,at($(r,"afterLabel",this,o))),n.push(a)}),n}getAfterBody(t,e){return Ps($(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:s}=e,n=$(s,"beforeFooter",this,t),o=$(s,"footer",this,t),a=$(s,"afterFooter",this,t);let r=[];return r=it(r,at(n)),r=it(r,at(o)),r=it(r,at(a)),r}_createItems(t){const e=this._active,s=this.chart.data,n=[],o=[],a=[];let r=[],l,c;for(l=0,c=e.length;lt.filter(h,d,f,s))),t.itemSort&&(r=r.sort((h,d)=>t.itemSort(h,d,s))),L(r,h=>{const d=Os(t.callbacks,h);n.push($(d,"labelColor",this,h)),o.push($(d,"labelPointStyle",this,h)),a.push($(d,"labelTextColor",this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){const s=this.options.setContext(this.getContext()),n=this._active;let o,a=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const r=Xt[s.position].call(this,n,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);const l=this._size=ws(this,s),c=Object.assign({},r,l),h=Ss(this.chart,s,c),d=Ms(s,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){const o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){const{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=Rt(r),{x:f,y:u}=t,{width:p,height:g}=e;let m,b,x,_,v,y;return o==="center"?(v=u+g/2,n==="left"?(m=f,b=m-a,_=v+a,y=v-a):(m=f+p,b=m+a,_=v-a,y=v+a),x=m):(n==="left"?b=f+Math.max(l,h)+a:n==="right"?b=f+p-Math.max(c,d)-a:b=this.caretX,o==="top"?(_=u,v=_-a,m=b-a,x=b+a):(_=u+g,v=_+a,m=b+a,x=b-a),y=_),{x1:m,x2:b,x3:x,y1:_,y2:v,y3:y}}drawTitle(t,e,s){const n=this.title,o=n.length;let a,r,l;if(o){const c=It(s.rtl,this.x,this.width);for(t.x=ye(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",a=V(s.titleFont),r=s.titleSpacing,e.fillStyle=s.titleColor,e.font=a.string,l=0;lx!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Le(t,{x:g,y:p,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Le(t,{x:m,y:p+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,c,l),t.strokeRect(g,p,c,l),t.fillStyle=a.backgroundColor,t.fillRect(m,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){const{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:h}=s,d=V(s.bodyFont);let f=d.lineHeight,u=0;const p=It(s.rtl,this.x,this.width),g=function(w){e.fillText(w,p.x(t.x+u),t.y+f/2),t.y+=f+o},m=p.textAlign(a);let b,x,_,v,y,k,S;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=ye(this,m,s),e.fillStyle=s.bodyColor,L(this.beforeBody,g),u=r&&m!=="right"?a==="center"?c/2+h:c+2+h:0,v=0,k=n.length;v0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){const a=Xt[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=ws(this,t),l=Object.assign({},a,this._size),c=Ss(e,t,l),h=Ms(t,l,c,e);(n._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const a=Z(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),an(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),rn(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const s=this._active,n=t.map(({datasetIndex:r,index:l})=>{const c=this.chart.getDatasetMeta(r);if(!c)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:c.data[l],index:l}}),o=!De(s,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,s),r=this._positionChanged(a,t),l=e||!De(a,o)||r;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e.filter(r=>this.chart.data.datasets[r.datasetIndex]&&this.chart.getDatasetMeta(r.datasetIndex).controller.getParsed(r.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:s,caretY:n,options:o}=this,a=Xt[o.position].call(this,t,e);return a!==!1&&(s!==a.x||n!==a.y)}}D(ai,"positioners",Xt);var ul={id:"tooltip",_element:ai,positioners:Xt,afterInit(i,t,e){e&&(i.tooltip=new ai({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:wn},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const gl=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function pl(i,t,e,s){const n=i.indexOf(t);if(n===-1)return gl(i,t,e,s);const o=i.lastIndexOf(t);return n!==o?e:n}const ml=(i,t)=>i===null?null:J(Math.round(i),0,t);function Ds(i){const t=this.getLabels();return i>=0&&ie.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}D(ri,"id","category"),D(ri,"defaults",{ticks:{callback:Ds}});function bl(i,t){const e=[],{bounds:n,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:f}=i,u=o||1,p=h-1,{min:g,max:m}=t,b=!R(a),x=!R(r),_=!R(c),v=(m-g)/(d+1);let y=Fi((m-g)/p/u)*u,k,S,w,P;if(y<1e-14&&!b&&!x)return[{value:g},{value:m}];P=Math.ceil(m/y)-Math.floor(g/y),P>p&&(y=Fi(P*y/p/u)*u),R(l)||(k=Math.pow(10,l),y=Math.ceil(y*k)/k),n==="ticks"?(S=Math.floor(g/y)*y,w=Math.ceil(m/y)*y):(S=g,w=m),b&&x&&o&&xo((r-a)/o,y/1e3)?(P=Math.round(Math.min((r-a)/y,h)),y=(r-a)/P,S=a,w=r):_?(S=b?a:S,w=x?r:w,P=c-1,y=(w-S)/P):(P=(w-S)/y,we(P,Math.round(P),y/1e3)?P=Math.round(P):P=Math.ceil(P));const F=Math.max(Ri(y),Ri(S));k=Math.pow(10,R(l)?F:l),S=Math.round(S*k)/k,w=Math.round(w*k)/k;let O=0;for(b&&(f&&S!==a?(e.push({value:a}),Sr)break;e.push({value:A})}return x&&f&&w!==r?e.length&&we(e[e.length-1].value,r,Cs(r,v,i))?e[e.length-1].value=r:e.push({value:r}):(!x||w===r)&&e.push({value:w}),e}function Cs(i,t,{horizontal:e,minRotation:s}){const n=Pt(s),o=(e?Math.sin(n):Math.cos(n))||.001,a=.75*t*(""+i).length;return Math.min(t/o,a)}class xl extends Ht{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return R(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const a=l=>n=e?n:l,r=l=>o=s?o:l;if(t){const l=mt(n),c=mt(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);r(o+l),t||a(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,a=bl(n,o);return t.bounds==="ticks"&&_o(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return Xs(t,this.chart.options.locale,this.options.ticks.format)}}class li extends xl{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=G(t)?t:0,this.max=G(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=Pt(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}D(li,"id","linear"),D(li,"defaults",{ticks:{callback:Gs.formatters.numeric}});const He={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Y=Object.keys(He);function Ts(i,t){return i-t}function As(i,t){if(R(t))return null;const e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts;let a=t;return typeof s=="function"&&(a=s(a)),G(a)||(a=typeof s=="string"?e.parse(a,s):e.parse(a)),a===null?null:(n&&(a=n==="week"&&(Ae(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,n)),+a)}function Ls(i,t,e,s){const n=Y.length;for(let o=Y.indexOf(i);o=Y.indexOf(e);o--){const a=Y[o];if(He[a].common&&i._adapter.diff(n,s,a)>=t-1)return a}return Y[e?Y.indexOf(e):0]}function yl(i){for(let t=Y.indexOf(i)+1,e=Y.length;t=t?e[s]:e[n];i[o]=!0}}function vl(i,t,e,s){const n=i._adapter,o=+n.startOf(t[0].value,s),a=t[t.length-1].value;let r,l;for(r=o;r<=a;r=+n.add(r,1,s))l=e[r],l>=0&&(t[l].major=!0);return t}function Rs(i,t,e){const s=[],n={},o=t.length;let a,r;for(a=0;a+t.value))}initOffsets(t=[]){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=J(e,0,a),s=J(s,0,a),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){const t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,a=o.unit||Ls(o.minUnit,e,s,this._getLabelCapacity(e)),r=T(n.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Ae(l)||l===!0,h={};let d=e,f,u;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(s,e,a)>1e5*r)throw new Error(e+" and "+s+" are too far apart with stepSize of "+r+" "+a);const p=n.ticks.source==="data"&&this.getDataTimestamps();for(f=d,u=0;f+g)}getLabelForValue(t){const e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,a=e||n[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,s,n){const o=this.options,a=o.ticks.callback;if(a)return I(a,[t,e,s],this);const r=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&r[l],d=c&&r[c],f=s[e],u=c&&d&&f&&f.major;return this._adapter.format(t,n||(u?d:h))}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=ii(i,"pos",t)),{pos:o,time:r}=i[s],{pos:a,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=ii(i,"time",t)),{time:o,pos:r}=i[s],{time:a,pos:l}=i[n]);const c=a-o;return c?r+(l-r)*(t-o)/c:r}class Is extends Ie{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ve(e,this.min),this._tableRange=ve(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:s}=this,n=[],o=[];let a,r,l,c,h;for(a=0,r=t.length;a=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(a=0,r=n.length;an-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(ve(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return ve(this._table,s*this._tableRange+this._minPos,!0)}}D(Is,"id","timeseries"),D(Is,"defaults",Ie.defaults);const Sn={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},kl={ariaLabel:{type:String},ariaDescribedby:{type:String}},wl={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...Sn,...kl},Sl=Cn[0]==="2"?(i,t)=>Object.assign(i,{attrs:t}):(i,t)=>Object.assign(i,t);function Lt(i){return Bs(i)?ti(i):i}function Ml(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i;return Bs(t)?new Proxy(i,{}):i}function Pl(i,t){const e=i.options;e&&t&&Object.assign(e,t)}function Mn(i,t){i.labels=t}function Pn(i,t,e){const s=[];i.datasets=t.map(n=>{const o=i.datasets.find(a=>a[e]===n[e]);return!o||!n.data||s.includes(o)?{...n}:(s.push(o),Object.assign(o,n),o)})}function Ol(i,t){const e={labels:[],datasets:[]};return Mn(e,i.labels),Pn(e,i.datasets,t),e}const Dl=ci({props:wl,setup(i,t){let{expose:e,slots:s}=t;const n=ke(null),o=Je(null);e({chart:o});const a=()=>{if(!n.value)return;const{type:c,data:h,options:d,plugins:f,datasetIdKey:u}=i,p=Ol(h,u),g=Ml(p,h);o.value=new Be(n.value,{type:c,data:g,options:{...d},plugins:f})},r=()=>{const c=ti(o.value);c&&(i.destroyDelay>0?setTimeout(()=>{c.destroy(),o.value=null},i.destroyDelay):(c.destroy(),o.value=null))},l=c=>{c.update(i.updateMode)};return Es(a),Tn(r),zs([()=>i.options,()=>i.data],(c,h)=>{let[d,f]=c,[u,p]=h;const g=ti(o.value);if(!g)return;let m=!1;if(d){const b=Lt(d),x=Lt(u);b&&b!==x&&(Pl(g,b),m=!0)}if(f){const b=Lt(f.labels),x=Lt(p.labels),_=Lt(f.datasets),v=Lt(p.datasets);b!==x&&(Mn(g.config.data,b),m=!0),_&&_!==v&&(Pn(g.config.data,_,i.datasetIdKey),m=!0)}m&&An(()=>{l(g)})},{deep:!0}),()=>Qe("canvas",{role:"img","aria-label":i.ariaLabel,"aria-describedby":i.ariaDescribedby,ref:n},[Qe("p",{},[s.default?s.default():""])])}});function Cl(i,t){return Be.register(t),ci({props:Sn,setup(e,s){let{expose:n}=s;const o=Je(null),a=Je(null);zs(()=>{var l;return((l=a.value)==null?void 0:l.chart)??null},l=>{o.value=l},{flush:"sync"}),n({chart:o});const r=l=>{a.value=l};return()=>Qe(Dl,Sl({ref:r},{type:i,...e}))}})}const Tl=Cl("bar",Se),Al={class:"flex items-center justify-between mb-6"},Ll={key:0,class:"text-text-muted"},Fl={class:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8"},Rl={class:"card"},Il={class:"text-3xl font-bold"},zl={class:"card"},El={class:"text-3xl font-bold"},Bl={class:"card"},Hl={class:"text-3xl font-bold"},Wl={key:0,class:"card mb-8"},Vl={class:"mb-4"},Nl={class:"flex justify-between text-sm mb-2"},jl={key:0},$l={class:"h-3 bg-border rounded-full overflow-hidden"},Yl={class:"card mb-8"},Ul={class:"h-64"},ql={class:"card"},Kl={class:"table"},Xl={class:"font-mono"},Gl={class:"font-mono text-text-muted"},Zl={key:0},ec=ci({__name:"Usage",setup(i){Be.register(ri,li,Oe,ol,ul,sl);const t=ke(null),e=ke(!0),s=ke("month"),n={labels:["Requests","Tokens (÷1000)"],datasets:[{label:"Usage",data:[],backgroundColor:["#6366f1","#22c55e"]}]},o={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{grid:{color:"#30363d"},ticks:{color:"#8b949e"}},x:{grid:{display:!1},ticks:{color:"#8b949e"}}}};async function a(){e.value=!0;try{const c=await Bn.get(`/api/v1/admin/usage?period=${s.value}`);t.value=c.data,c.data.usage&&(n.datasets[0].data=[c.data.usage.total_requests,Math.round(c.data.usage.total_tokens/1e3)])}catch(c){console.error("Failed to fetch usage:",c)}finally{e.value=!1}}function r(c){return c.toLocaleString()}function l(c){return new Date(c).toLocaleString()}return Es(a),(c,h)=>{var d,f,u,p;return ct(),lt("div",null,[M("div",Al,[h[2]||(h[2]=M("h1",{class:"text-2xl font-bold"},"Usage",-1)),Ln(M("select",{"onUpdate:modelValue":h[0]||(h[0]=g=>s.value=g),onChange:a,class:"input w-auto"},[...h[1]||(h[1]=[M("option",{value:"week"},"Last 7 days",-1),M("option",{value:"month"},"This month",-1),M("option",{value:"year"},"This year",-1)])],544),[[Fn,s.value]])]),e.value?(ct(),lt("div",Ll,"Loading...")):t.value?(ct(),lt(Si,{key:1},[M("div",Fl,[M("div",Rl,[h[3]||(h[3]=M("p",{class:"text-text-muted text-sm mb-2"},"Total Requests",-1)),M("p",Il,q(r(((d=t.value.usage)==null?void 0:d.total_requests)||0)),1)]),M("div",zl,[h[4]||(h[4]=M("p",{class:"text-text-muted text-sm mb-2"},"Total Tokens",-1)),M("p",El,q(r(((f=t.value.usage)==null?void 0:f.total_tokens)||0)),1)]),M("div",Bl,[h[5]||(h[5]=M("p",{class:"text-text-muted text-sm mb-2"},"Avg Latency",-1)),M("p",Hl,q((((u=t.value.usage)==null?void 0:u.avg_latency_ms)||0).toFixed(0))+"ms",1)])]),t.value.quota?(ct(),lt("div",Wl,[h[6]||(h[6]=M("h2",{class:"text-lg font-semibold mb-4"},"Monthly Quota",-1)),M("div",Vl,[M("div",Nl,[M("span",null,q(r(t.value.quota.tokens_used))+" / "+q(r(t.value.quota.tokens_limit))+" tokens",1),t.value.quota.tokens_limit>0?(ct(),lt("span",jl,q(Math.round(t.value.quota.tokens_used/t.value.quota.tokens_limit*100))+"% ",1)):ce("",!0)]),M("div",$l,[M("div",{class:Mi(["h-full transition-all",{"bg-success":t.value.quota.tokens_used/t.value.quota.tokens_limit<.8,"bg-warning":t.value.quota.tokens_used/t.value.quota.tokens_limit>=.8,"bg-error":t.value.quota.tokens_used/t.value.quota.tokens_limit>=.95}]),style:Rn({width:`${Math.min(t.value.quota.tokens_used/t.value.quota.tokens_limit*100,100)}%`})},null,6)])])])):ce("",!0),M("div",Yl,[h[7]||(h[7]=M("h2",{class:"text-lg font-semibold mb-4"},"Usage Overview",-1)),M("div",Ul,[In(zn(Tl),{data:n,options:o})])]),M("div",ql,[h[10]||(h[10]=M("h2",{class:"text-lg font-semibold mb-4"},"Recent Requests",-1)),M("table",Kl,[h[9]||(h[9]=M("thead",null,[M("tr",null,[M("th",null,"Time"),M("th",null,"Model"),M("th",null,"Endpoint"),M("th",null,"Tokens"),M("th",null,"Latency"),M("th",null,"Status")])],-1)),M("tbody",null,[(ct(!0),lt(Si,null,En((t.value.logs||[]).slice(0,20),g=>(ct(),lt("tr",{key:g.id},[M("td",null,q(l(g.created_at)),1),M("td",Xl,q(g.model_name),1),M("td",Gl,q(g.endpoint),1),M("td",null,q(g.total_tokens),1),M("td",null,q(g.latency_ms)+"ms",1),M("td",null,[M("span",{class:Mi(["badge",{"badge-success":g.status==="success","badge-error":g.status==="error","badge-warning":g.status==="quota_exceeded"}])},q(g.status),3)])]))),128)),(p=t.value.logs)!=null&&p.length?ce("",!0):(ct(),lt("tr",Zl,[...h[8]||(h[8]=[M("td",{colspan:"6",class:"text-center text-text-muted py-8"}," No requests yet. ",-1)])]))])])])],64)):ce("",!0)])}}});export{ec as default}; diff --git a/internal/web/dist/assets/cpu-ed4VmMFm.js b/internal/web/dist/assets/cpu-ed4VmMFm.js new file mode 100644 index 0000000..725b3c8 --- /dev/null +++ b/internal/web/dist/assets/cpu-ed4VmMFm.js @@ -0,0 +1,6 @@ +import{c as e}from"./createLucideIcon-CUrbWv4G.js";/** + * @license lucide-vue-next v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const h=e("CpuIcon",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);export{h as C}; diff --git a/internal/web/dist/assets/createLucideIcon-CUrbWv4G.js b/internal/web/dist/assets/createLucideIcon-CUrbWv4G.js new file mode 100644 index 0000000..7af01f4 --- /dev/null +++ b/internal/web/dist/assets/createLucideIcon-CUrbWv4G.js @@ -0,0 +1,21 @@ +import{z as a}from"./index-r2SG-Kf3.js";/** + * @license lucide-vue-next v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const d=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** + * @license lucide-vue-next v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/** + * @license lucide-vue-next v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const h=({size:e,strokeWidth:t=2,absoluteStrokeWidth:r,color:s,iconNode:n,name:i,class:w,...l},{slots:c})=>a("svg",{...o,width:e||o.width,height:e||o.height,stroke:s||o.stroke,"stroke-width":r?Number(t)*24/Number(e):t,class:["lucide",`lucide-${d(i??"icon")}`],...l},[...n.map(u=>a(...u)),...c.default?[c.default()]:[]]);/** + * @license lucide-vue-next v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const m=(e,t)=>(r,{slots:s})=>a(h,{...r,iconNode:t,name:e},s);export{m as c}; diff --git a/internal/web/dist/assets/index-DkKprt_C.css b/internal/web/dist/assets/index-DkKprt_C.css new file mode 100644 index 0000000..9717607 --- /dev/null +++ b/internal/web/dist/assets/index-DkKprt_C.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,Consolas,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.btn{border-radius:.5rem;padding:.5rem 1rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.btn-primary{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.btn-primary:hover{--tw-bg-opacity: 1;background-color:rgb(129 140 248 / var(--tw-bg-opacity, 1))}.btn-secondary{border-width:1px;--tw-border-opacity: 1;border-color:rgb(48 54 61 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(22 27 34 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(230 237 243 / var(--tw-text-opacity, 1))}.btn-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(48 54 61 / var(--tw-bg-opacity, 1))}.btn-danger{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.btn-danger:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.btn-sm{padding:.375rem .75rem;font-size:.875rem;line-height:1.25rem}.input{width:100%;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(48 54 61 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(22 27 34 / var(--tw-bg-opacity, 1));padding:.5rem .75rem;--tw-text-opacity: 1;color:rgb(230 237 243 / var(--tw-text-opacity, 1))}.input::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(139 148 158 / var(--tw-placeholder-opacity, 1))}.input::placeholder{--tw-placeholder-opacity: 1;color:rgb(139 148 158 / var(--tw-placeholder-opacity, 1))}.input:focus{border-color:transparent;outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity, 1))}.card{border-radius:.75rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(48 54 61 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(22 27 34 / var(--tw-bg-opacity, 1));padding:1.5rem}.badge{display:inline-flex;align-items:center;border-radius:9999px;padding:.125rem .625rem;font-size:.75rem;line-height:1rem;font-weight:500}.badge-success{background-color:#22c55e26;--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.badge-warning{background-color:#f59e0b26;--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.badge-error{background-color:#ef444426;--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.badge-info{background-color:#6366f126;--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity, 1))}.table{width:100%;text-align:left}.table th{border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(48 54 61 / var(--tw-border-opacity, 1));padding:.75rem 1rem;font-size:.75rem;line-height:1rem;font-weight:500;text-transform:uppercase;letter-spacing:.05em;--tw-text-opacity: 1;color:rgb(139 148 158 / var(--tw-text-opacity, 1))}.table td{border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(48 54 61 / var(--tw-border-opacity, 1));padding:.75rem 1rem}.table tr:hover td{--tw-bg-opacity: 1;background-color:rgb(22 27 34 / var(--tw-bg-opacity, 1))}.fixed{position:fixed}.inset-0{top:0;right:0;bottom:0;left:0}.left-0{left:0}.top-0{top:0}.z-50{z-index:50}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-64{margin-left:16rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-4{margin-top:1rem}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.h-12{height:3rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-12{width:3rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-auto{width:auto}.w-full{width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-border{--tw-border-opacity: 1;border-color:rgb(48 54 61 / var(--tw-border-opacity, 1))}.border-error\/20{border-color:#ef444433}.border-success\/20{border-color:#22c55e33}.bg-background{--tw-bg-opacity: 1;background-color:rgb(13 17 23 / var(--tw-bg-opacity, 1))}.bg-black\/50{background-color:#00000080}.bg-border{--tw-bg-opacity: 1;background-color:rgb(48 54 61 / var(--tw-bg-opacity, 1))}.bg-error{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-error\/10{background-color:#ef44441a}.bg-primary\/10{background-color:#6366f11a}.bg-success{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-success\/10{background-color:#22c55e1a}.bg-success\/5{background-color:#22c55e0d}.bg-surface{--tw-bg-opacity: 1;background-color:rgb(22 27 34 / var(--tw-bg-opacity, 1))}.bg-warning{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-warning\/10{background-color:#f59e0b1a}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pt-2{padding-top:.5rem}.text-center{text-align:center}.font-mono{font-family:JetBrains Mono,Consolas,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-error{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-primary{--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity, 1))}.text-success{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-text{--tw-text-opacity: 1;color:rgb(230 237 243 / var(--tw-text-opacity, 1))}.text-text-muted{--tw-text-opacity: 1;color:rgb(139 148 158 / var(--tw-text-opacity, 1))}.text-warning{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}*{margin:0;padding:0;box-sizing:border-box}html{font-family:Inter,system-ui,sans-serif}body{background-color:#0d1117;color:#e6edf3;min-height:100vh}code,pre{font-family:JetBrains Mono,Consolas,monospace}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#0d1117}::-webkit-scrollbar-thumb{background:#30363d;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#484f58}.hover\:bg-border:hover{--tw-bg-opacity: 1;background-color:rgb(48 54 61 / var(--tw-bg-opacity, 1))}.hover\:bg-error\/10:hover{background-color:#ef44441a}.hover\:text-error:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.hover\:text-text:hover{--tw-text-opacity: 1;color:rgb(230 237 243 / var(--tw-text-opacity, 1))}@media(min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:1024px){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}} diff --git a/internal/web/dist/assets/index-r2SG-Kf3.js b/internal/web/dist/assets/index-r2SG-Kf3.js new file mode 100644 index 0000000..0214f89 --- /dev/null +++ b/internal/web/dist/assets/index-r2SG-Kf3.js @@ -0,0 +1,38 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Login-CTXEj7l9.js","assets/key-D7ygKuN6.js","assets/createLucideIcon-CUrbWv4G.js","assets/Layout-9-JcwyxV.js","assets/cpu-ed4VmMFm.js","assets/Dashboard-Dx0SCBU1.js","assets/ApiKeys-CKKTuRxD.js","assets/plus-Bfa9PGWP.js","assets/Models-DBqDIbsA.js"])))=>i.map(i=>d[i]); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();/** +* @vue/shared v3.5.40 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Er(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ce={},zt=[],ct=()=>{},pi=()=>!1,fs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ds=e=>e.startsWith("onUpdate:"),Ae=Object.assign,wr=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},bc=Object.prototype.hasOwnProperty,se=(e,t)=>bc.call(e,t),V=Array.isArray,Jt=e=>Ln(e)==="[object Map]",sn=e=>Ln(e)==="[object Set]",Xr=e=>Ln(e)==="[object Date]",W=e=>typeof e=="function",fe=e=>typeof e=="string",Ge=e=>typeof e=="symbol",re=e=>e!==null&&typeof e=="object",mi=e=>(re(e)||W(e))&&W(e.then)&&W(e.catch),gi=Object.prototype.toString,Ln=e=>gi.call(e),Ec=e=>Ln(e).slice(8,-1),yi=e=>Ln(e)==="[object Object]",hs=e=>fe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,gn=Er(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ps=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},wc=/-\w/g,De=ps(e=>e.replace(wc,t=>t.slice(1).toUpperCase())),Rc=/\B([A-Z])/g,Vt=ps(e=>e.replace(Rc,"-$1").toLowerCase()),ms=ps(e=>e.charAt(0).toUpperCase()+e.slice(1)),Is=ps(e=>e?`on${ms(e)}`:""),lt=(e,t)=>!Object.is(e,t),Kn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},gs=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Qr;const ys=()=>Qr||(Qr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Rr(e){if(V(e)){const t={};for(let n=0;n{if(n){const s=n.split(Oc);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Sr(e){let t="";if(fe(e))t=e;else if(V(e))for(let n=0;nrn(n,t))}const Ei=e=>!!(e&&e.__v_isRef===!0),Tc=e=>fe(e)?e:e==null?"":V(e)||re(e)&&(e.toString===gi||!W(e.toString))?Ei(e)?Tc(e.value):JSON.stringify(e,wi,2):String(e),wi=(e,t)=>Ei(t)?wi(e,t.value):Jt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[Ds(s,o)+" =>"]=r,n),{})}:sn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ds(n))}:Ge(t)?Ds(t):re(t)&&!V(t)&&!yi(t)?String(t):t,Ds=(e,t="")=>{var n;return Ge(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.40 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let _e;class Ri{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&_e&&(_e.active?(this.parent=_e,this.index=(_e.scopes||(_e.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(_e===this)_e=this.prevScope;else{let t=_e;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(_n){let t=_n;for(_n=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;yn;){let t=yn;for(yn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Ci(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Pi(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),vr(s),Ic(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function er(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ti(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ti(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===xn)||(e.globalVersion=xn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!er(e))))return;e.flags|=2;const t=e.dep,n=ae,s=Je;ae=e,Je=!0;try{Ci(e);const r=e.fn(e._value);(t.version===0||lt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{ae=n,Je=s,Pi(e),e.flags&=-3}}function vr(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)vr(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ic(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Je=!0;const Ni=[];function _t(){Ni.push(Je),Je=!1}function bt(){const e=Ni.pop();Je=e===void 0?!0:e}function Yr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ae;ae=void 0;try{t()}finally{ae=n}}}let xn=0;class Dc{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Cr{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ae||!Je||ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ae)n=this.activeLink=new Dc(ae,this),ae.deps?(n.prevDep=ae.depsTail,ae.depsTail.nextDep=n,ae.depsTail=n):ae.deps=ae.depsTail=n,Ii(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=ae.depsTail,n.nextDep=void 0,ae.depsTail.nextDep=n,ae.depsTail=n,ae.deps===n&&(ae.deps=s)}return n}trigger(t){this.version++,xn++,this.notify(t)}notify(t){Ar();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{xr()}}}function Ii(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Ii(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Yn=new WeakMap,Lt=Symbol(""),tr=Symbol(""),vn=Symbol("");function ve(e,t,n){if(Je&&ae){let s=Yn.get(e);s||Yn.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Cr),r.map=s,r.key=n),r.track()}}function pt(e,t,n,s,r,o){const i=Yn.get(e);if(!i){xn++;return}const l=c=>{c&&c.trigger()};if(Ar(),t==="clear")i.forEach(l);else{const c=V(e),u=c&&hs(n);if(c&&n==="length"){const a=Number(s);i.forEach((f,p)=>{(p==="length"||p===vn||!Ge(p)&&p>=a)&&l(f)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),u&&l(i.get(vn)),t){case"add":c?u&&l(i.get("length")):(l(i.get(Lt)),Jt(e)&&l(i.get(tr)));break;case"delete":c||(l(i.get(Lt)),Jt(e)&&l(i.get(tr)));break;case"set":Jt(e)&&l(i.get(Lt));break}}xr()}function Lc(e,t){const n=Yn.get(e);return n&&n.get(t)}function kt(e){const t=ee(e);return t===e?t:(ve(t,"iterate",vn),qe(e)?t:t.map(Xe))}function _s(e){return ve(e=ee(e),"iterate",vn),e}function ot(e,t){return Et(e)?Qt(gt(e)?Xe(t):t):Xe(t)}const Fc={__proto__:null,[Symbol.iterator](){return Fs(this,Symbol.iterator,e=>ot(this,e))},concat(...e){return kt(this).concat(...e.map(t=>V(t)?kt(t):t))},entries(){return Fs(this,"entries",e=>(e[1]=ot(this,e[1]),e))},every(e,t){return at(this,"every",e,t,void 0,arguments)},filter(e,t){return at(this,"filter",e,t,n=>n.map(s=>ot(this,s)),arguments)},find(e,t){return at(this,"find",e,t,n=>ot(this,n),arguments)},findIndex(e,t){return at(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return at(this,"findLast",e,t,n=>ot(this,n),arguments)},findLastIndex(e,t){return at(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return at(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ms(this,"includes",e)},indexOf(...e){return Ms(this,"indexOf",e)},join(e){return kt(this).join(e)},lastIndexOf(...e){return Ms(this,"lastIndexOf",e)},map(e,t){return at(this,"map",e,t,void 0,arguments)},pop(){return an(this,"pop")},push(...e){return an(this,"push",e)},reduce(e,...t){return Zr(this,"reduce",e,t)},reduceRight(e,...t){return Zr(this,"reduceRight",e,t)},shift(){return an(this,"shift")},some(e,t){return at(this,"some",e,t,void 0,arguments)},splice(...e){return an(this,"splice",e)},toReversed(){return kt(this).toReversed()},toSorted(e){return kt(this).toSorted(e)},toSpliced(...e){return kt(this).toSpliced(...e)},unshift(...e){return an(this,"unshift",e)},values(){return Fs(this,"values",e=>ot(this,e))}};function Fs(e,t,n){const s=_s(e),r=s[t]();return s!==e&&!qe(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const Mc=Array.prototype;function at(e,t,n,s,r,o){const i=_s(e),l=i!==e&&!qe(e),c=i[t];if(c!==Mc[t]){const f=c.apply(e,o);return l?Xe(f):f}let u=n;i!==e&&(l?u=function(f,p){return n.call(this,ot(e,f),p,e)}:n.length>2&&(u=function(f,p){return n.call(this,f,p,e)}));const a=c.call(i,u,s);return l&&r?r(a):a}function Zr(e,t,n,s){const r=_s(e),o=r!==e&&!qe(e);let i=n,l=!1;r!==e&&(o?(l=s.length===0,i=function(u,a,f){return l&&(l=!1,u=ot(e,u)),n.call(this,u,ot(e,a),f,e)}):n.length>3&&(i=function(u,a,f){return n.call(this,u,a,f,e)}));const c=r[t](i,...s);return l?ot(e,c):c}function Ms(e,t,n){const s=ee(e);ve(s,"iterate",vn);const r=s[t](...n);return(r===-1||r===!1)&&bs(n[0])?(n[0]=ee(n[0]),s[t](...n)):r}function an(e,t,n=[]){_t(),Ar();const s=ee(e)[t].apply(e,n);return xr(),bt(),s}const Uc=Er("__proto__,__v_isRef,__isVue"),Di=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ge));function jc(e){Ge(e)||(e=String(e));const t=ee(this);return ve(t,"has",e),t.hasOwnProperty(e)}class Li{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?zc:ji:o?Ui:Mi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=V(t);if(!r){let c;if(i&&(c=Fc[n]))return c;if(n==="hasOwnProperty")return jc}const l=Reflect.get(t,n,pe(t)?t:s);if((Ge(n)?Di.has(n):Uc(n))||(r||ve(t,"get",n),o))return l;if(pe(l)){const c=i&&hs(n)?l:l.value;return r&&re(c)?sr(c):c}return re(l)?r?sr(l):Fn(l):l}}class Fi extends Li{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=V(t)&&hs(n);if(!this._isShallow){const u=Et(o);if(!qe(s)&&!Et(s)&&(o=ee(o),s=ee(s)),!i&&pe(o)&&!pe(s))return u||(o.value=s),!0}const l=i?Number(n)e,kn=e=>Reflect.getPrototypeOf(e);function qc(e,t,n){return function(...s){const r=this.__v_raw,o=ee(r),i=Jt(o),l=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,u=r[e](...s),a=n?nr:t?Qt:Xe;return!t&&ve(o,"iterate",c?tr:Lt),Ae(Object.create(u),{next(){const{value:f,done:p}=u.next();return p?{value:f,done:p}:{value:l?[a(f[0]),a(f[1])]:a(f),done:p}}})}}function qn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function $c(e,t){const n={get(r){const o=this.__v_raw,i=ee(o),l=ee(r);e||(lt(r,l)&&ve(i,"get",r),ve(i,"get",l));const{has:c}=kn(i),u=t?nr:e?Qt:Xe;if(c.call(i,r))return u(o.get(r));if(c.call(i,l))return u(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&ve(ee(r),"iterate",Lt),r.size},has(r){const o=this.__v_raw,i=ee(o),l=ee(r);return e||(lt(r,l)&&ve(i,"has",r),ve(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,c=ee(l),u=t?nr:e?Qt:Xe;return!e&&ve(c,"iterate",Lt),l.forEach((a,f)=>r.call(o,u(a),u(f),i))}};return Ae(n,e?{add:qn("add"),set:qn("set"),delete:qn("delete"),clear:qn("clear")}:{add(r){const o=ee(this),i=kn(o),l=ee(r),c=!t&&!qe(r)&&!Et(r)?l:r;return i.has.call(o,c)||lt(r,c)&&i.has.call(o,r)||lt(l,c)&&i.has.call(o,l)||(o.add(c),pt(o,"add",c,c)),this},set(r,o){!t&&!qe(o)&&!Et(o)&&(o=ee(o));const i=ee(this),{has:l,get:c}=kn(i);let u=l.call(i,r);u||(r=ee(r),u=l.call(i,r));const a=c.call(i,r);return i.set(r,o),u?lt(o,a)&&pt(i,"set",r,o):pt(i,"add",r,o),this},delete(r){const o=ee(this),{has:i,get:l}=kn(o);let c=i.call(o,r);c||(r=ee(r),c=i.call(o,r)),l&&l.call(o,r);const u=o.delete(r);return c&&pt(o,"delete",r,void 0),u},clear(){const r=ee(this),o=r.size!==0,i=r.clear();return o&&pt(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=qc(r,e,t)}),n}function Pr(e,t){const n=$c(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(se(n,r)&&r in s?n:s,r,o)}const Wc={get:Pr(!1,!1)},Kc={get:Pr(!1,!0)},Gc={get:Pr(!0,!1)};const Mi=new WeakMap,Ui=new WeakMap,ji=new WeakMap,zc=new WeakMap;function Jc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Fn(e){return Et(e)?e:Tr(e,!1,Hc,Wc,Mi)}function Bi(e){return Tr(e,!1,kc,Kc,Ui)}function sr(e){return Tr(e,!0,Vc,Gc,ji)}function Tr(e,t,n,s,r){if(!re(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=r.get(e);if(o)return o;const i=Jc(Ec(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function gt(e){return Et(e)?gt(e.__v_raw):!!(e&&e.__v_isReactive)}function Et(e){return!!(e&&e.__v_isReadonly)}function qe(e){return!!(e&&e.__v_isShallow)}function bs(e){return e?!!e.__v_raw:!1}function ee(e){const t=e&&e.__v_raw;return t?ee(t):e}function Nr(e){return!se(e,"__v_skip")&&Object.isExtensible(e)&&_i(e,"__v_skip",!0),e}const Xe=e=>re(e)?Fn(e):e,Qt=e=>re(e)?sr(e):e;function pe(e){return e?e.__v_isRef===!0:!1}function bn(e){return Hi(e,!1)}function Xc(e){return Hi(e,!0)}function Hi(e,t){return pe(e)?e:new Qc(e,t)}class Qc{constructor(t,n){this.dep=new Cr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ee(t),this._value=n?t:Xe(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||qe(t)||Et(t);t=s?t:ee(t),lt(t,n)&&(this._rawValue=t,this._value=s?t:Xe(t),this.dep.trigger())}}function vt(e){return pe(e)?e.value:e}const Yc={get:(e,t,n)=>t==="__v_raw"?e:vt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return pe(r)&&!pe(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Vi(e){return gt(e)?e:new Proxy(e,Yc)}function Zc(e){const t=V(e)?new Array(e.length):{};for(const n in e)t[n]=ta(e,n);return t}class ea{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=Ge(n)?n:String(n),this._raw=ee(t);let r=!0,o=t;if(!V(t)||Ge(this._key)||!hs(this._key))do r=!bs(o)||qe(o);while(r&&(o=o.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=vt(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&pe(this._raw[this._key])){const n=this._object[this._key];if(pe(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Lc(this._raw,this._key)}}function ta(e,t,n){return new ea(e,t,n)}class na{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Cr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=xn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ae!==this)return vi(this,!0),!0}get value(){const t=this.dep.track();return Ti(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function sa(e,t,n=!1){let s,r;return W(e)?s=e:(s=e.get,r=e.set),new na(s,r,n)}const $n={},Zn=new WeakMap;let Nt;function ra(e,t=!1,n=Nt){if(n){let s=Zn.get(n);s||Zn.set(n,s=[]),s.push(e)}}function oa(e,t,n=ce){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:c}=n,u=P=>r?P:qe(P)||r===!1||r===0?mt(P,1):mt(P);let a,f,p,g,C=!1,O=!1;if(pe(e)?(f=()=>e.value,C=qe(e)):gt(e)?(f=()=>u(e),C=!0):V(e)?(O=!0,C=e.some(P=>gt(P)||qe(P)),f=()=>e.map(P=>{if(pe(P))return P.value;if(gt(P))return u(P);if(W(P))return c?c(P,2):P()})):W(e)?t?f=c?()=>c(e,2):e:f=()=>{if(p){_t();try{p()}finally{bt()}}const P=Nt;Nt=a;try{return c?c(e,3,[g]):e(g)}finally{Nt=P}}:f=ct,t&&r){const P=f,j=r===!0?1/0:r;f=()=>mt(P(),j)}const x=Oi(),b=()=>{a.stop(),x&&x.active&&wr(x.effects,a)};if(o&&t){const P=t;t=(...j)=>{const $=P(...j);return b(),$}}let S=O?new Array(e.length).fill($n):$n;const v=P=>{if(!(!(a.flags&1)||!a.dirty&&!P))if(t){const j=a.run();if(P||r||C||(O?j.some(($,J)=>lt($,S[J])):lt(j,S))){p&&p();const $=Nt;Nt=a;try{const J=[j,S===$n?void 0:O&&S[0]===$n?[]:S,g];S=j,c?c(t,3,J):t(...J)}finally{Nt=$}}}else a.run()};return l&&l(v),a=new Ai(f),a.scheduler=i?()=>i(v,!1):v,g=P=>ra(P,!1,a),p=a.onStop=()=>{const P=Zn.get(a);if(P){if(c)c(P,4);else for(const j of P)j();Zn.delete(a)}},t?s?v(!0):S=a.run():i?i(v.bind(null,!0),!0):a.run(),b.pause=a.pause.bind(a),b.resume=a.resume.bind(a),b.stop=b,b}function mt(e,t=1/0,n){if(t<=0||!re(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,pe(e))mt(e.value,t,n);else if(V(e))for(let s=0;s{mt(s,t,n)});else if(yi(e)){for(const s in e)mt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&mt(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.40 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Mn(e,t,n,s){try{return s?e(...s):e()}catch(r){Es(r,t,n)}}function Qe(e,t,n,s){if(W(e)){const r=Mn(e,t,n,s);return r&&mi(r)&&r.catch(o=>{Es(o,t,n)}),r}if(V(e)){const r=[];for(let o=0;o>>1,r=Ie[s],o=Cn(r);o=Cn(n)?Ie.push(e):Ie.splice(la(t),0,e),e.flags|=1,qi()}}function qi(){es||(es=ki.then(Wi))}function ca(e){V(e)?Xt.push(...e):Ot&&e.id===-1?Ot.splice(Kt+1,0,e):e.flags&1||(Xt.push(e),e.flags|=1),qi()}function eo(e,t,n=rt+1){for(;nCn(n)-Cn(s));if(Xt.length=0,Ot){Ot.push(...t);return}for(Ot=t,Kt=0;Kte.id==null?e.flags&2?-1:1/0:e.id;function Wi(e){try{for(rt=0;rt{s._d&&rs(-1);const o=ts(t),i=Mt.length;let l;try{l=e(...r)}finally{for(let c=Mt.length;c>i;c--)_l();ts(o),s._d&&rs(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function Ep(e,t){if(He===null)return e;const n=As(He),s=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&W(t)?t.call(s&&s.proxy):t}}function ua(){return!!(Sl()||Ft)}const fa=Symbol.for("v-scx"),da=()=>Ke(fa);function En(e,t,n){return Gi(e,t,n)}function Gi(e,t,n=ce){const{immediate:s,deep:r,flush:o,once:i}=n,l=Ae({},n),c=t&&s||!t&&o!=="post";let u;if(Tn){if(o==="sync"){const g=da();u=g.__watcherHandles||(g.__watcherHandles=[])}else if(!c){const g=()=>{};return g.stop=ct,g.resume=ct,g.pause=ct,g}}const a=Ce;l.call=(g,C,O)=>Qe(g,a,C,O);let f=!1;o==="post"?l.scheduler=g=>{Le(g,a&&a.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(g,C)=>{C?g():Ir(g)}),l.augmentJob=g=>{t&&(g.flags|=4),f&&(g.flags|=2,a&&(g.id=a.uid,g.i=a))};const p=oa(e,t,l);return Tn&&(u?u.push(p):c&&p()),p}function ha(e,t,n){const s=this.proxy,r=fe(e)?e.includes(".")?zi(s,e):()=>s[e]:e.bind(s,s);let o;W(t)?o=t:(o=t.handler,n=t);const i=Un(this),l=Gi(r,o.bind(s),n);return i(),l}function zi(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;re.__isTeleport,Us=Symbol("_leaveCb");function Dr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Dr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Lr(e,t){return W(e)?Ae({name:e.name},t,{setup:e}):e}function Ji(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function to(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const ns=new WeakMap;function wn(e,t,n,s,r=!1){if(V(e)){e.forEach((O,x)=>wn(O,t&&(V(t)?t[x]:t),n,s,r));return}if(Rn(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&wn(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?As(s.component):s.el,i=r?null:o,{i:l,r:c}=e,u=t&&t.r,a=l.refs===ce?l.refs={}:l.refs,f=l.setupState,p=ee(f),g=f===ce?pi:O=>to(a,O)?!1:se(p,O),C=(O,x)=>!(x&&to(a,x));if(u!=null&&u!==c){if(no(t),fe(u))a[u]=null,g(u)&&(f[u]=null);else if(pe(u)){const O=t;C(u,O.k)&&(u.value=null),O.k&&(a[O.k]=null)}}if(W(c))Mn(c,l,12,[i,a]);else{const O=fe(c),x=pe(c);if(O||x){const b=()=>{if(e.f){const S=O?g(c)?f[c]:a[c]:C()||!e.k?c.value:a[e.k];if(r)V(S)&&wr(S,o);else if(V(S))S.includes(o)||S.push(o);else if(O)a[c]=[o],g(c)&&(f[c]=a[c]);else{const v=[o];C(c,e.k)&&(c.value=v),e.k&&(a[e.k]=v)}}else O?(a[c]=i,g(c)&&(f[c]=i)):x&&(C(c,e.k)&&(c.value=i),e.k&&(a[e.k]=i))};if(i){const S=()=>{b(),ns.delete(e)};S.id=-1,ns.set(e,S),Le(S,n)}else no(e),b()}}}function no(e){const t=ns.get(e);t&&(t.flags|=8,ns.delete(e))}ys().requestIdleCallback;ys().cancelIdleCallback;const Rn=e=>!!e.type.__asyncLoader,Xi=e=>e.type.__isKeepAlive;function ga(e,t){Qi(e,"a",t)}function ya(e,t){Qi(e,"da",t)}function Qi(e,t,n=Ce){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Rs(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Xi(r.parent.vnode)&&_a(s,t,n,r),r=r.parent}}function _a(e,t,n,s){const r=Rs(t,e,s,!0);Yi(()=>{wr(s[t],r)},n)}function Rs(e,t,n=Ce,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{_t();const l=Un(n),c=Qe(t,n,e,i);return l(),bt(),c});return s?r.unshift(o):r.push(o),o}}const wt=e=>(t,n=Ce)=>{(!Tn||e==="sp")&&Rs(e,(...s)=>t(...s),n)},ba=wt("bm"),Ea=wt("m"),wa=wt("bu"),Ra=wt("u"),Sa=wt("bum"),Yi=wt("um"),Oa=wt("sp"),Aa=wt("rtg"),xa=wt("rtc");function va(e,t=Ce){Rs("ec",e,t)}const Ca="components",Zi=Symbol.for("v-ndc");function wp(e){return fe(e)?Pa(Ca,e,!1)||e:e||Zi}function Pa(e,t,n=!0,s=!1){const r=He||Ce;if(r){const o=r.type;{const l=hu(o,!1);if(l&&(l===t||l===De(t)||l===ms(De(t))))return o}const i=so(r[e]||o[e],t)||so(r.appContext[e],t);return!i&&s?o:i}}function so(e,t){return e&&(e[t]||e[De(t)]||e[ms(De(t))])}function Rp(e,t,n,s){let r;const o=n,i=V(e);if(i||fe(e)){const l=i&>(e);let c=!1,u=!1;l&&(c=!qe(e),u=Et(e),e=_s(e)),r=new Array(e.length);for(let a=0,f=e.length;at(l,c,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,u=l.length;ce?Ol(e)?As(e):rr(e.parent):null,Sn=Ae(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>rr(e.parent),$root:e=>rr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>tl(e),$forceUpdate:e=>e.f||(e.f=()=>{Ir(e.update)}),$nextTick:e=>e.n||(e.n=ws.bind(e.proxy)),$watch:e=>ha.bind(e)}),js=(e,t)=>e!==ce&&!e.__isScriptSetup&&se(e,t),Ta={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:c}=e;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(js(s,t))return i[t]=1,s[t];if(r!==ce&&se(r,t))return i[t]=2,r[t];if(se(o,t))return i[t]=3,o[t];if(n!==ce&&se(n,t))return i[t]=4,n[t];or&&(i[t]=0)}}const u=Sn[t];let a,f;if(u)return t==="$attrs"&&ve(e.attrs,"get",""),u(e);if((a=l.__cssModules)&&(a=a[t]))return a;if(n!==ce&&se(n,t))return i[t]=4,n[t];if(f=c.config.globalProperties,se(f,t))return f[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return js(r,t)?(r[t]=n,!0):s!==ce&&se(s,t)?(s[t]=n,!0):se(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:o,type:i}},l){let c;return!!(n[l]||e!==ce&&l[0]!=="$"&&se(e,l)||js(t,l)||se(o,l)||se(s,l)||se(Sn,l)||se(r.config.globalProperties,l)||(c=i.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:se(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function ro(e){return V(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let or=!0;function Na(e){const t=tl(e),n=e.proxy,s=e.ctx;or=!1,t.beforeCreate&&oo(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:c,inject:u,created:a,beforeMount:f,mounted:p,beforeUpdate:g,updated:C,activated:O,deactivated:x,beforeDestroy:b,beforeUnmount:S,destroyed:v,unmounted:P,render:j,renderTracked:$,renderTriggered:J,errorCaptured:G,serverPrefetch:z,expose:Y,inheritAttrs:ue,components:be,directives:we,filters:Ee}=t;if(u&&Ia(u,s,null),i)for(const q in i){const Z=i[q];W(Z)&&(s[q]=Z.bind(n))}if(r){const q=r.call(n,n);re(q)&&(e.data=Fn(q))}if(or=!0,o)for(const q in o){const Z=o[q],$e=W(Z)?Z.bind(n,n):W(Z.get)?Z.get.bind(n,n):ct,Re=!W(Z)&&W(Z.set)?Z.set.bind(n):ct,oe=Be({get:$e,set:Re});Object.defineProperty(s,q,{enumerable:!0,configurable:!0,get:()=>oe.value,set:de=>oe.value=de})}if(l)for(const q in l)el(l[q],s,n,q);if(c){const q=W(c)?c.call(n):c;Reflect.ownKeys(q).forEach(Z=>{Gn(Z,q[Z])})}a&&oo(a,e,"c");function te(q,Z){V(Z)?Z.forEach($e=>q($e.bind(n))):Z&&q(Z.bind(n))}if(te(ba,f),te(Ea,p),te(wa,g),te(Ra,C),te(ga,O),te(ya,x),te(va,G),te(xa,$),te(Aa,J),te(Sa,S),te(Yi,P),te(Oa,z),V(Y))if(Y.length){const q=e.exposed||(e.exposed={});Y.forEach(Z=>{Object.defineProperty(q,Z,{get:()=>n[Z],set:$e=>n[Z]=$e,enumerable:!0})})}else e.exposed||(e.exposed={});j&&e.render===ct&&(e.render=j),ue!=null&&(e.inheritAttrs=ue),be&&(e.components=be),we&&(e.directives=we),z&&Ji(e)}function Ia(e,t,n=ct){V(e)&&(e=ir(e));for(const s in e){const r=e[s];let o;re(r)?"default"in r?o=Ke(r.from||s,r.default,!0):o=Ke(r.from||s):o=Ke(r),pe(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function oo(e,t,n){Qe(V(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function el(e,t,n,s){let r=s.includes(".")?zi(n,s):()=>n[s];if(fe(e)){const o=t[e];W(o)&&En(r,o)}else if(W(e))En(r,e.bind(n));else if(re(e))if(V(e))e.forEach(o=>el(o,t,n,s));else{const o=W(e.handler)?e.handler.bind(n):t[e.handler];W(o)&&En(r,o,e)}}function tl(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(u=>ss(c,u,i,!0)),ss(c,t,i)),re(t)&&o.set(t,c),c}function ss(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&ss(e,o,n,!0),r&&r.forEach(i=>ss(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=Da[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Da={data:io,props:lo,emits:lo,methods:hn,computed:hn,beforeCreate:Te,created:Te,beforeMount:Te,mounted:Te,beforeUpdate:Te,updated:Te,beforeDestroy:Te,beforeUnmount:Te,destroyed:Te,unmounted:Te,activated:Te,deactivated:Te,errorCaptured:Te,serverPrefetch:Te,components:hn,directives:hn,watch:Fa,provide:io,inject:La};function io(e,t){return t?e?function(){return Ae(W(e)?e.call(this,this):e,W(t)?t.call(this,this):t)}:t:e}function La(e,t){return hn(ir(e),ir(t))}function ir(e){if(V(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${De(t)}Modifiers`]||e[`${Vt(t)}Modifiers`];function Ba(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ce;let r=n;const o=t.startsWith("update:"),i=o&&ja(s,t.slice(7));i&&(i.trim&&(r=n.map(a=>fe(a)?a.trim():a)),i.number&&(r=n.map(gs)));let l,c=s[l=Is(t)]||s[l=Is(De(t))];!c&&o&&(c=s[l=Is(Vt(t))]),c&&Qe(c,e,6,r);const u=s[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Qe(u,e,6,r)}}const Ha=new WeakMap;function sl(e,t,n=!1){const s=n?Ha:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!W(e)){const c=u=>{const a=sl(u,t,!0);a&&(l=!0,Ae(i,a))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(re(e)&&s.set(e,null),null):(V(o)?o.forEach(c=>i[c]=null):Ae(i,o),re(e)&&s.set(e,i),i)}function Ss(e,t){return!e||!fs(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),se(e,t[0].toLowerCase()+t.slice(1))||se(e,Vt(t))||se(e,t))}function co(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:c,render:u,renderCache:a,props:f,data:p,setupState:g,ctx:C,inheritAttrs:O}=e,x=ts(e);let b,S;try{if(n.shapeFlag&4){const P=r||s,j=P;b=it(u.call(j,P,a,f,g,p,C)),S=l}else{const P=t;b=it(P.length>1?P(f,{attrs:l,slots:i,emit:c}):P(f,null)),S=t.props?l:Va(l)}}catch(P){Mt.length=0,Es(P,e,1),b=ke(Ct)}let v=b;if(S&&O!==!1){const P=Object.keys(S),{shapeFlag:j}=v;P.length&&j&7&&(o&&P.some(ds)&&(S=ka(S,o)),v=Yt(v,S,!1,!0))}return n.dirs&&(v=Yt(v,null,!1,!0),v.dirs=v.dirs?v.dirs.concat(n.dirs):n.dirs),n.transition&&Dr(v,n.transition),b=v,ts(x),b}const Va=e=>{let t;for(const n in e)(n==="class"||n==="style"||fs(n))&&((t||(t={}))[n]=e[n]);return t},ka=(e,t)=>{const n={};for(const s in e)(!ds(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function qa(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:c}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?ao(s,i,u):!!i;if(c&8){const a=t.dynamicProps;for(let f=0;fObject.create(ol),ll=e=>Object.getPrototypeOf(e)===ol;function Wa(e,t,n,s=!1){const r={},o=il();e.propsDefaults=Object.create(null),cl(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:Bi(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Ka(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=ee(r),[c]=e.propsOptions;let u=!1;if((s||i>0)&&!(i&16)){if(i&8){const a=e.vnode.dynamicProps;for(let f=0;f{c=!0;const[p,g]=al(f,t,!0);Ae(i,p),g&&l.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}if(!o&&!c)return re(e)&&s.set(e,zt),zt;if(V(o))for(let a=0;ae==="_"||e==="_ctx"||e==="$stable",Mr=e=>V(e)?e.map(it):[it(e)],za=(e,t,n)=>{if(t._n)return t;const s=aa((...r)=>Mr(t(...r)),n);return s._c=!1,s},ul=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Fr(r))continue;const o=e[r];if(W(o))t[r]=za(r,o,s);else if(o!=null){const i=Mr(o);t[r]=()=>i}}},fl=(e,t)=>{const n=Mr(t);e.slots.default=()=>n},dl=(e,t,n)=>{for(const s in t)(n||!Fr(s))&&(e[s]=t[s])},Ja=(e,t,n)=>{const s=e.slots=il();if(e.vnode.shapeFlag&32){const r=t._;r?(dl(s,t,n),n&&_i(s,"_",r,!0)):ul(t,s)}else t&&fl(e,t)},Xa=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=ce;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:dl(r,t,n):(o=!t.$stable,ul(t,r)),i=t}else t&&(fl(e,t),i={default:1});if(o)for(const l in r)!Fr(l)&&i[l]==null&&delete r[l]},Le=tu;function Qa(e){return Ya(e)}function Ya(e,t){const n=ys();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:c,setText:u,setElementText:a,parentNode:f,nextSibling:p,setScopeId:g=ct,insertStaticContent:C}=e,O=(d,h,y,w=null,_=null,E=null,I=void 0,T=null,N=!!h.dynamicChildren)=>{if(d===h)return;d&&!un(d,h)&&(w=R(d),de(d,_,E,!0),d=null),h.patchFlag===-2&&(N=!1,h.dynamicChildren=null);const{type:A,ref:U,shapeFlag:M}=h;switch(A){case Os:x(d,h,y,w);break;case Ct:b(d,h,y,w);break;case Hs:d==null&&S(h,y,w,I);break;case dt:be(d,h,y,w,_,E,I,T,N);break;default:M&1?j(d,h,y,w,_,E,I,T,N):M&6?we(d,h,y,w,_,E,I,T,N):(M&64||M&128)&&A.process(d,h,y,w,_,E,I,T,N,B)}U!=null&&_?wn(U,d&&d.ref,E,h||d,!h):U==null&&d&&d.ref!=null&&wn(d.ref,null,E,d,!0)},x=(d,h,y,w)=>{if(d==null)s(h.el=l(h.children),y,w);else{const _=h.el=d.el;h.children!==d.children&&u(_,h.children)}},b=(d,h,y,w)=>{d==null?s(h.el=c(h.children||""),y,w):h.el=d.el},S=(d,h,y,w)=>{[d.el,d.anchor]=C(d.children,h,y,w,d.el,d.anchor)},v=({el:d,anchor:h},y,w)=>{let _;for(;d&&d!==h;)_=p(d),s(d,y,w),d=_;s(h,y,w)},P=({el:d,anchor:h})=>{let y;for(;d&&d!==h;)y=p(d),r(d),d=y;r(h)},j=(d,h,y,w,_,E,I,T,N)=>{if(h.type==="svg"?I="svg":h.type==="math"&&(I="mathml"),d==null)$(h,y,w,_,E,I,T,N);else{const A=d.el&&d.el._isVueCE?d.el:null;try{A&&A._beginPatch(),z(d,h,_,E,I,T,N)}finally{A&&A._endPatch()}}},$=(d,h,y,w,_,E,I,T)=>{let N,A;const{props:U,shapeFlag:M,transition:H,dirs:k}=d;if(N=d.el=i(d.type,E,U&&U.is,U),M&8?a(N,d.children):M&16&&G(d.children,N,null,w,_,Bs(d,E),I,T),k&&Pt(d,null,w,"created"),J(N,d,d.scopeId,I,w),U){for(const le in U)le!=="value"&&!gn(le)&&o(N,le,null,U[le],E,w);"value"in U&&o(N,"value",null,U.value,E),(A=U.onVnodeBeforeMount)&&st(A,w,d)}k&&Pt(d,null,w,"beforeMount");const Q=Za(_,H);Q&&H.beforeEnter(N),s(N,h,y),((A=U&&U.onVnodeMounted)||Q||k)&&Le(()=>{try{A&&st(A,w,d),Q&&H.enter(N),k&&Pt(d,null,w,"mounted")}finally{}},_)},J=(d,h,y,w,_)=>{if(y&&g(d,y),w)for(let E=0;E{for(let A=N;A{const T=h.el=d.el;let{patchFlag:N,dynamicChildren:A,dirs:U}=h;N|=d.patchFlag&16;const M=d.props||ce,H=h.props||ce;let k;if(y&&Tt(y,!1),(k=H.onVnodeBeforeUpdate)&&st(k,y,h,d),U&&Pt(h,d,y,"beforeUpdate"),y&&Tt(y,!0),A&&(!d.dynamicChildren||d.dynamicChildren.length!==A.length)&&(N=0,I=!1,A=null),(M.innerHTML&&H.innerHTML==null||M.textContent&&H.textContent==null)&&a(T,""),A?Y(d.dynamicChildren,A,T,y,w,Bs(h,_),E):I||Z(d,h,T,null,y,w,Bs(h,_),E,!1),N>0){if(N&16)ue(T,M,H,y,_);else if(N&2&&M.class!==H.class&&o(T,"class",null,H.class,_),N&4&&o(T,"style",M.style,H.style,_),N&8){const Q=h.dynamicProps;for(let le=0;le{k&&st(k,y,h,d),U&&Pt(h,d,y,"updated")},w)},Y=(d,h,y,w,_,E,I)=>{for(let T=0;T{if(h!==y){if(h!==ce)for(const E in h)!gn(E)&&!(E in y)&&o(d,E,h[E],null,_,w);for(const E in y){if(gn(E))continue;const I=y[E],T=h[E];I!==T&&E!=="value"&&o(d,E,T,I,_,w)}"value"in y&&o(d,"value",h.value,y.value,_)}},be=(d,h,y,w,_,E,I,T,N)=>{const A=h.el=d?d.el:l(""),U=h.anchor=d?d.anchor:l("");let{patchFlag:M,dynamicChildren:H,slotScopeIds:k}=h;k&&(T=T?T.concat(k):k),d==null?(s(A,y,w),s(U,y,w),G(h.children||[],y,U,_,E,I,T,N)):M>0&&M&64&&H&&d.dynamicChildren&&d.dynamicChildren.length===H.length?(Y(d.dynamicChildren,H,y,_,E,I,T),(h.key!=null||_&&h===_.subTree)&&hl(d,h,!0)):Z(d,h,y,U,_,E,I,T,N)},we=(d,h,y,w,_,E,I,T,N)=>{h.slotScopeIds=T,d==null?h.shapeFlag&512?_.ctx.activate(h,y,w,I,N):Ee(h,y,w,_,E,I,N):Me(d,h,N)},Ee=(d,h,y,w,_,E,I)=>{const T=d.component=cu(d,w,_);if(Xi(d)&&(T.ctx.renderer=B),au(T,!1,I),T.asyncDep){if(_&&_.registerDep(T,te,I),!d.el){const N=T.subTree=ke(Ct);b(null,N,h,y),d.placeholder=N.el}}else te(T,d,h,y,_,E,I)},Me=(d,h,y)=>{const w=h.component=d.component;if(qa(d,h,y))if(w.asyncDep&&!w.asyncResolved){q(w,h,y);return}else w.next=h,w.update();else h.el=d.el,w.vnode=h},te=(d,h,y,w,_,E,I)=>{const T=()=>{if(d.isMounted){let{next:M,bu:H,u:k,parent:Q,vnode:le}=d;{const tt=pl(d);if(tt){M&&(M.el=le.el,q(d,M,I)),tt.asyncDep.then(()=>{Le(()=>{d.isUnmounted||A()},_)});return}}let ie=M,ge;Tt(d,!1),M?(M.el=le.el,q(d,M,I)):M=le,H&&Kn(H),(ge=M.props&&M.props.onVnodeBeforeUpdate)&&st(ge,Q,M,le),Tt(d,!0);const Se=co(d),et=d.subTree;d.subTree=Se,O(et,Se,f(et.el),R(et),d,_,E),M.el=Se.el,ie===null&&$a(d,Se.el),k&&Le(k,_),(ge=M.props&&M.props.onVnodeUpdated)&&Le(()=>st(ge,Q,M,le),_)}else{let M;const{el:H,props:k}=h,{bm:Q,m:le,parent:ie,root:ge,type:Se}=d,et=Rn(h);Tt(d,!1),Q&&Kn(Q),!et&&(M=k&&k.onVnodeBeforeMount)&&st(M,ie,h),Tt(d,!0);{ge.ce&&ge.ce._hasShadowRoot()&&ge.ce._injectChildStyle(Se,d.parent?d.parent.type:void 0);const tt=d.subTree=co(d);O(null,tt,y,w,d,_,E),h.el=tt.el}if(le&&Le(le,_),!et&&(M=k&&k.onVnodeMounted)){const tt=h;Le(()=>st(M,ie,tt),_)}(h.shapeFlag&256||ie&&Rn(ie.vnode)&&ie.vnode.shapeFlag&256)&&d.a&&Le(d.a,_),d.isMounted=!0,h=y=w=null}};d.scope.on();const N=d.effect=new Ai(T);d.scope.off();const A=d.update=N.run.bind(N),U=d.job=N.runIfDirty.bind(N);U.i=d,U.id=d.uid,N.scheduler=()=>Ir(U),Tt(d,!0),A()},q=(d,h,y)=>{h.component=d;const w=d.vnode.props;d.vnode=h,d.next=null,Ka(d,h.props,w,y),Xa(d,h.children,y),_t(),eo(d),bt()},Z=(d,h,y,w,_,E,I,T,N=!1)=>{const A=d&&d.children,U=d?d.shapeFlag:0,M=h.children,{patchFlag:H,shapeFlag:k}=h;if(H>0){if(H&128){Re(A,M,y,w,_,E,I,T,N);return}else if(H&256){$e(A,M,y,w,_,E,I,T,N);return}}k&8?(U&16&&K(A,_,E),M!==A&&a(y,M)):U&16?k&16?Re(A,M,y,w,_,E,I,T,N):K(A,_,E,!0):(U&8&&a(y,""),k&16&&G(M,y,w,_,E,I,T,N))},$e=(d,h,y,w,_,E,I,T,N)=>{d=d||zt,h=h||zt;const A=d.length,U=h.length,M=Math.min(A,U);let H;for(H=0;HU?K(d,_,E,!0,!1,M):G(h,y,w,_,E,I,T,N,M)},Re=(d,h,y,w,_,E,I,T,N)=>{let A=0;const U=h.length;let M=d.length-1,H=U-1;for(;A<=M&&A<=H;){const k=d[A],Q=h[A]=N?ht(h[A]):it(h[A]);if(un(k,Q))O(k,Q,y,null,_,E,I,T,N);else break;A++}for(;A<=M&&A<=H;){const k=d[M],Q=h[H]=N?ht(h[H]):it(h[H]);if(un(k,Q))O(k,Q,y,null,_,E,I,T,N);else break;M--,H--}if(A>M){if(A<=H){const k=H+1,Q=kH)for(;A<=M;)de(d[A],_,E,!0),A++;else{const k=A,Q=A,le=new Map;for(A=Q;A<=H;A++){const je=h[A]=N?ht(h[A]):it(h[A]);je.key!=null&&le.set(je.key,A)}let ie,ge=0;const Se=H-Q+1;let et=!1,tt=0;const cn=new Array(Se);for(A=0;A=Se){de(je,_,E,!0);continue}let nt;if(je.key!=null)nt=le.get(je.key);else for(ie=Q;ie<=H;ie++)if(cn[ie-Q]===0&&un(je,h[ie])){nt=ie;break}nt===void 0?de(je,_,E,!0):(cn[nt-Q]=A+1,nt>=tt?tt=nt:et=!0,O(je,h[nt],y,null,_,E,I,T,N),ge++)}const Gr=et?eu(cn):zt;for(ie=Gr.length-1,A=Se-1;A>=0;A--){const je=Q+A,nt=h[je],zr=h[je+1],Jr=je+1{const{el:E,type:I,transition:T,children:N,shapeFlag:A}=d;if(A&6){oe(d.component.subTree,h,y,w);return}if(A&128){d.suspense.move(h,y,w);return}if(A&64){I.move(d,h,y,B);return}if(I===dt){s(E,h,y);for(let M=0;MT.enter(E),_));else{const{leave:M,delayLeave:H,afterLeave:k}=T,Q=()=>{d.ctx.isUnmounted?r(E):s(E,h,y)},le=()=>{const ie=E._isLeaving||!!E[Us];E._isLeaving&&E[Us](!0),T.persisted&&!ie?Q():M(E,()=>{Q(),k&&k()})};H?H(E,Q,le):le()}else s(E,h,y)},de=(d,h,y,w=!1,_=!1)=>{const{type:E,props:I,ref:T,children:N,dynamicChildren:A,shapeFlag:U,patchFlag:M,dirs:H,cacheIndex:k,memo:Q}=d;if(M===-2&&(_=!1),T!=null&&(_t(),wn(T,null,y,d,!0),bt()),k!=null&&(h.renderCache[k]=void 0),U&256){h.ctx.deactivate(d);return}const le=U&1&&H,ie=!Rn(d);let ge;if(ie&&(ge=I&&I.onVnodeBeforeUnmount)&&st(ge,h,d),U&6)Ze(d.component,y,w);else{if(U&128){d.suspense.unmount(y,w);return}le&&Pt(d,null,h,"beforeUnmount"),U&64?d.type.remove(d,h,y,B,w):A&&!A.hasOnce&&(E!==dt||M>0&&M&64)?K(A,h,y,!1,!0):(E===dt&&M&384||!_&&U&16)&&K(N,h,y),w&&Ue(d)}const Se=Q!=null&&k==null;(ie&&(ge=I&&I.onVnodeUnmounted)||le||Se)&&Le(()=>{ge&&st(ge,h,d),le&&Pt(d,null,h,"unmounted"),Se&&(d.el=null)},y)},Ue=d=>{const{type:h,el:y,anchor:w,transition:_}=d;if(h===dt){We(y,w);return}if(h===Hs){P(d);return}const E=()=>{r(y),_&&!_.persisted&&_.afterLeave&&_.afterLeave()};if(d.shapeFlag&1&&_&&!_.persisted){const{leave:I,delayLeave:T}=_,N=()=>I(y,E);T?T(d.el,E,N):N()}else E()},We=(d,h)=>{let y;for(;d!==h;)y=p(d),r(d),d=y;r(h)},Ze=(d,h,y)=>{const{bum:w,scope:_,job:E,subTree:I,um:T,m:N,a:A}=d;fo(N),fo(A),w&&Kn(w),_.stop(),E&&(E.flags|=8,de(I,d,h,y)),T&&Le(T,h),Le(()=>{d.isUnmounted=!0},h)},K=(d,h,y,w=!1,_=!1,E=0)=>{for(let I=E;I{if(d.shapeFlag&6)return R(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const h=p(d.anchor||d.el),y=h&&h[pa];return y?p(y):h};let F=!1;const L=(d,h,y)=>{let w;d==null?h._vnode&&(de(h._vnode,null,null,!0),w=h._vnode.component):O(h._vnode||null,d,h,null,null,null,y),h._vnode=d,F||(F=!0,eo(w),$i(),F=!1)},B={p:O,um:de,m:oe,r:Ue,mt:Ee,mc:G,pc:Z,pbc:Y,n:R,o:e};return{render:L,hydrate:void 0,createApp:Ua(L)}}function Bs({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Tt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Za(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function hl(e,t,n=!1){const s=e.children,r=t.children;if(V(s)&&V(r))for(let o=0;o>1,e[n[l]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function pl(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:pl(t)}function fo(e){if(e)for(let t=0;te.__isSuspense;function tu(e,t){t&&t.pendingBranch?V(e)?t.effects.push(...e):t.effects.push(e):ca(e)}const dt=Symbol.for("v-fgt"),Os=Symbol.for("v-txt"),Ct=Symbol.for("v-cmt"),Hs=Symbol.for("v-stc"),Mt=[];let Ve=null;function yl(e=!1){Mt.push(Ve=e?null:[])}function _l(){Mt.pop(),Ve=Mt[Mt.length-1]||null}let Pn=1;function rs(e,t=!1){Pn+=e,e<0&&Ve&&t&&(Ve.hasOnce=!0)}function bl(e){return e.dynamicChildren=Pn>0?Ve||zt:null,_l(),Pn>0&&Ve&&Ve.push(e),e}function Sp(e,t,n,s,r,o){return bl(Rl(e,t,n,s,r,o,!0))}function El(e,t,n,s,r){return bl(ke(e,t,n,s,r,!0))}function os(e){return e?e.__v_isVNode===!0:!1}function un(e,t){return e.type===t.type&&e.key===t.key}const wl=({key:e})=>e??null,zn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?fe(e)||pe(e)||W(e)?{i:He,r:e,k:t,f:!!n}:e:null);function Rl(e,t=null,n=null,s=0,r=null,o=e===dt?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&wl(t),ref:t&&zn(t),scopeId:Ki,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:He};return l?(is(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=fe(n)?8:16),Pn>0&&!i&&Ve&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Ve.push(c),c}const ke=nu;function nu(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Zi)&&(e=Ct),os(e)){const l=Yt(e,t,!0);return n&&is(l,n),Pn>0&&!o&&Ve&&(l.shapeFlag&6?Ve[Ve.indexOf(e)]=l:Ve.push(l)),l.patchFlag=-2,l}if(pu(e)&&(e=e.__vccOpts),t){t=su(t);let{class:l,style:c}=t;l&&!fe(l)&&(t.class=Sr(l)),re(c)&&(bs(c)&&!V(c)&&(c=Ae({},c)),t.style=Rr(c))}const i=fe(e)?1:gl(e)?128:ma(e)?64:re(e)?4:W(e)?2:0;return Rl(e,t,n,s,r,i,o,!0)}function su(e){return e?bs(e)||ll(e)?Ae({},e):e:null}function Yt(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:c}=e,u=t?ou(r||{},t):r,a={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&wl(u),ref:t&&t.ref?n&&o?V(o)?o.concat(zn(t)):[o,zn(t)]:zn(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==dt?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Yt(e.ssContent),ssFallback:e.ssFallback&&Yt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Dr(a,c.clone(a)),a}function ru(e=" ",t=0){return ke(Os,null,e,t)}function Op(e="",t=!1){return t?(yl(),El(Ct,null,e)):ke(Ct,null,e)}function it(e){return e==null||typeof e=="boolean"?ke(Ct):V(e)?ke(dt,null,e.slice()):os(e)?ht(e):ke(Os,null,String(e))}function ht(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Yt(e)}function is(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(V(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),is(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!ll(t)?t._ctx=He:r===3&&He&&(He.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(W(t)){if(s&65){is(e,{default:t});return}t={default:t,_ctx:He},n=32}else t=String(t),s&64?(n=16,t=[ru(t)]):n=8;e.children=t,e.shapeFlag|=n}function ou(...e){const t={};for(let n=0;nCe||He;let ls,cr;{const e=ys(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};ls=t("__VUE_INSTANCE_SETTERS__",n=>Ce=n),cr=t("__VUE_SSR_SETTERS__",n=>Tn=n)}const Un=e=>{const t=Ce;return ls(e),e.scope.on(),()=>{e.scope.off(),ls(t)}},ho=()=>{Ce&&Ce.scope.off(),ls(null)};function Ol(e){return e.vnode.shapeFlag&4}let Tn=!1;function au(e,t=!1,n=!1){t&&cr(t);const{props:s,children:r}=e.vnode,o=Ol(e);Wa(e,s,o,t),Ja(e,r,n||t);const i=o?uu(e,t):void 0;return t&&cr(!1),i}function uu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ta);const{setup:s}=n;if(s){_t();const r=e.setupContext=s.length>1?du(e):null,o=Un(e),i=Mn(s,e,0,[e.props,r]),l=mi(i);if(bt(),o(),(l||e.sp)&&!Rn(e)&&Ji(e),l){if(i.then(ho,ho),t)return i.then(c=>{po(e,c)}).catch(c=>{Es(c,e,0)});e.asyncDep=i}else po(e,i)}else Al(e)}function po(e,t,n){W(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:re(t)&&(e.setupState=Vi(t)),Al(e)}function Al(e,t,n){const s=e.type;e.render||(e.render=s.render||ct);{const r=Un(e);_t();try{Na(e)}finally{bt(),r()}}}const fu={get(e,t){return ve(e,"get",""),e[t]}};function du(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,fu),slots:e.slots,emit:e.emit,expose:t}}function As(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Vi(Nr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Sn)return Sn[n](e)},has(t,n){return n in t||n in Sn}})):e.proxy}function hu(e,t=!0){return W(e)?e.displayName||e.name:e.name||t&&e.__name}function pu(e){return W(e)&&"__vccOpts"in e}const Be=(e,t)=>sa(e,t,Tn);function xl(e,t,n){try{rs(-1);const s=arguments.length;return s===2?re(t)&&!V(t)?os(t)?ke(e,null,[t]):ke(e,t):ke(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&os(n)&&(n=[n]),ke(e,t,n))}finally{rs(1)}}const mu="3.5.40";/** +* @vue/runtime-dom v3.5.40 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let ar;const mo=typeof window<"u"&&window.trustedTypes;if(mo)try{ar=mo.createPolicy("vue",{createHTML:e=>e})}catch{}const vl=ar?e=>ar.createHTML(e):e=>e,gu="http://www.w3.org/2000/svg",yu="http://www.w3.org/1998/Math/MathML",ft=typeof document<"u"?document:null,go=ft&&ft.createElement("template"),_u={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?ft.createElementNS(gu,e):t==="mathml"?ft.createElementNS(yu,e):n?ft.createElement(e,{is:n}):ft.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>ft.createTextNode(e),createComment:e=>ft.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ft.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{go.innerHTML=vl(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=go.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},bu=Symbol("_vtc");function Eu(e,t,n){const s=e[bu];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const yo=Symbol("_vod"),wu=Symbol("_vsh"),Ru=Symbol(""),Su=/(?:^|;)\s*display\s*:/;function Ou(e,t,n){const s=e.style,r=fe(n);let o=!1;if(n&&!r){if(t)if(fe(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&pn(s,l,"")}else for(const i in t)n[i]==null&&pn(s,i,"");for(const i in n){i==="display"&&(o=!0);const l=n[i];l!=null?xu(e,i,!fe(t)&&t?t[i]:void 0,l)||pn(s,i,l):pn(s,i,"")}}else if(r){if(t!==n){const i=s[Ru];i&&(n+=";"+i),s.cssText=n,o=Su.test(n)}}else t&&e.removeAttribute("style");yo in e&&(e[yo]=o?s.display:"",e[wu]&&(s.display="none"))}const _o=/\s*!important$/;function pn(e,t,n){if(V(n))n.forEach(s=>pn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Au(e,t);_o.test(n)?e.setProperty(Vt(s),n.replace(_o,""),"important"):e[s]=n}}const bo=["Webkit","Moz","ms"],Vs={};function Au(e,t){const n=Vs[t];if(n)return n;let s=De(t);if(s!=="filter"&&s in e)return Vs[t]=s;s=ms(s);for(let r=0;rks||(Iu.then(()=>ks=0),ks=Date.now());function Lu(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(V(r)){const o=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{o.call(s),s._stopped=!0};const i=r.slice(),l=[s];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Fu=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?Eu(e,s,i):t==="style"?Ou(e,n,s):fs(t)?ds(t)||Cu(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Mu(e,t,s,i))?(Ro(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&wo(e,t,s,i,o,t!=="value")):e._isVueCE&&(Uu(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!fe(s)))?Ro(e,De(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),wo(e,t,s,i))};function Mu(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Oo(t)&&W(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Oo(t)&&fe(n)?!1:t in e}function Uu(e,t){const n=e._def.props;if(!n)return!1;const s=De(t);return Array.isArray(n)?n.some(r=>De(r)===s):Object.keys(n).some(r=>De(r)===s)}const Zt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return V(t)?n=>Kn(t,n):t};function ju(e){e.target.composing=!0}function Ao(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const yt=Symbol("_assign");function xo(e,t,n){return t&&(e=e.trim()),n&&(e=gs(e)),e}const Ap={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[yt]=Zt(r);const o=s||r.props&&r.props.type==="number";xt(e,t?"change":"input",i=>{i.target.composing||e[yt](xo(e.value,n,o))}),(n||o)&&xt(e,"change",()=>{e.value=xo(e.value,n,o)}),t||(xt(e,"compositionstart",ju),xt(e,"compositionend",Ao),xt(e,"change",Ao))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[yt]=Zt(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?gs(e.value):e.value,c=t??"";if(l===c)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c)}},xp={deep:!0,created(e,t,n){e[yt]=Zt(n),xt(e,"change",()=>{const s=e._modelValue,r=Nn(e),o=e.checked,i=e[yt];if(V(s)){const l=Or(s,r),c=l!==-1;if(o&&!c)i(s.concat(r));else if(!o&&c){const u=[...s];u.splice(l,1),i(u)}}else if(sn(s)){const l=new Set(s);o?l.add(r):l.delete(r),i(l)}else i(Cl(e,o))})},mounted:vo,beforeUpdate(e,t,n){e[yt]=Zt(n),vo(e,t,n)}};function vo(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(V(t))r=Or(t,s.props.value)>-1;else if(sn(t))r=t.has(s.props.value);else{if(t===n)return;r=rn(t,Cl(e,!0))}e.checked!==r&&(e.checked=r)}const vp={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,xt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?gs(Nn(o)):Nn(o));e[yt](e.multiple?sn(e._modelValue)?new Set(r):r:r[0]),e._assigning=!0,ws(()=>{e._assigning=!1})}),e[yt]=Zt(s)},mounted(e,{value:t}){Co(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[yt]=Zt(n)},updated(e,{value:t}){e._assigning||Co(e,t)}};function Co(e,t){const n=e.multiple,s=V(t);if(!(n&&!s&&!sn(t))){for(let r=0,o=e.options.length;rString(u)===String(l)):i.selected=Or(t,l)>-1}else i.selected=t.has(l);else if(rn(Nn(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Nn(e){return"_value"in e?e._value:e.value}function Cl(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Bu=["ctrl","shift","alt","meta"],Hu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Bu.some(n=>e[`${n}Key`]&&!t.includes(n))},Cp=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((r,...o)=>{for(let i=0;i{const t=ku().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Wu(s);if(!r)return;const o=t._component;!W(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,$u(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function $u(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Wu(e){return fe(e)?document.querySelector(e):e}/*! + * pinia v2.3.1 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let Pl;const xs=e=>Pl=e,Tl=Symbol();function ur(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var On;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(On||(On={}));function Ku(){const e=Si(!0),t=e.run(()=>bn({}));let n=[],s=[];const r=Nr({install(o){xs(r),r._a=o,o.provide(Tl,r),o.config.globalProperties.$pinia=r,s.forEach(i=>n.push(i)),s=[]},use(o){return this._a?n.push(o):s.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const Nl=()=>{};function To(e,t,n,s=Nl){e.push(t);const r=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&Oi()&&Nc(r),r}function qt(e,...t){e.slice().forEach(n=>{n(...t)})}const Gu=e=>e(),No=Symbol(),qs=Symbol();function fr(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];ur(r)&&ur(s)&&e.hasOwnProperty(n)&&!pe(s)&&!gt(s)?e[n]=fr(r,s):e[n]=s}return e}const zu=Symbol();function Ju(e){return!ur(e)||!e.hasOwnProperty(zu)}const{assign:St}=Object;function Xu(e){return!!(pe(e)&&e.effect)}function Qu(e,t,n,s){const{state:r,actions:o,getters:i}=t,l=n.state.value[e];let c;function u(){l||(n.state.value[e]=r?r():{});const a=Zc(n.state.value[e]);return St(a,o,Object.keys(i||{}).reduce((f,p)=>(f[p]=Nr(Be(()=>{xs(n);const g=n._s.get(e);return i[p].call(g,g)})),f),{}))}return c=Il(e,u,t,n,s,!0),c}function Il(e,t,n={},s,r,o){let i;const l=St({actions:{}},n),c={deep:!0};let u,a,f=[],p=[],g;const C=s.state.value[e];!o&&!C&&(s.state.value[e]={});let O;function x(G){let z;u=a=!1,typeof G=="function"?(G(s.state.value[e]),z={type:On.patchFunction,storeId:e,events:g}):(fr(s.state.value[e],G),z={type:On.patchObject,payload:G,storeId:e,events:g});const Y=O=Symbol();ws().then(()=>{O===Y&&(u=!0)}),a=!0,qt(f,z,s.state.value[e])}const b=o?function(){const{state:z}=n,Y=z?z():{};this.$patch(ue=>{St(ue,Y)})}:Nl;function S(){i.stop(),f=[],p=[],s._s.delete(e)}const v=(G,z="")=>{if(No in G)return G[qs]=z,G;const Y=function(){xs(s);const ue=Array.from(arguments),be=[],we=[];function Ee(q){be.push(q)}function Me(q){we.push(q)}qt(p,{args:ue,name:Y[qs],store:j,after:Ee,onError:Me});let te;try{te=G.apply(this&&this.$id===e?this:j,ue)}catch(q){throw qt(we,q),q}return te instanceof Promise?te.then(q=>(qt(be,q),q)).catch(q=>(qt(we,q),Promise.reject(q))):(qt(be,te),te)};return Y[No]=!0,Y[qs]=z,Y},P={_p:s,$id:e,$onAction:To.bind(null,p),$patch:x,$reset:b,$subscribe(G,z={}){const Y=To(f,G,z.detached,()=>ue()),ue=i.run(()=>En(()=>s.state.value[e],be=>{(z.flush==="sync"?a:u)&&G({storeId:e,type:On.direct,events:g},be)},St({},c,z)));return Y},$dispose:S},j=Fn(P);s._s.set(e,j);const J=(s._a&&s._a.runWithContext||Gu)(()=>s._e.run(()=>(i=Si()).run(()=>t({action:v}))));for(const G in J){const z=J[G];if(pe(z)&&!Xu(z)||gt(z))o||(C&&Ju(z)&&(pe(z)?z.value=C[G]:fr(z,C[G])),s.state.value[e][G]=z);else if(typeof z=="function"){const Y=v(z,G);J[G]=Y,l.actions[G]=z}}return St(j,J),St(ee(j),J),Object.defineProperty(j,"$state",{get:()=>s.state.value[e],set:G=>{x(z=>{St(z,G)})}}),s._p.forEach(G=>{St(j,i.run(()=>G({store:j,app:s._a,pinia:s,options:l})))}),C&&o&&n.hydrate&&n.hydrate(j.$state,C),u=!0,a=!0,j}/*! #__NO_SIDE_EFFECTS__ */function Yu(e,t,n){let s,r;const o=typeof t=="function";s=e,r=o?n:t;function i(l,c){const u=ua();return l=l||(u?Ke(Tl,null):null),l&&xs(l),l=Pl,l._s.has(s)||(o?Il(s,t,r,l):Qu(s,r,l)),l._s.get(s)}return i.$id=s,i}const Zu="modulepreload",ef=function(e){return"/"+e},Io={},$t=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(a=>Promise.resolve(a).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));r=i(n.map(u=>{if(u=ef(u),u in Io)return;Io[u]=!0;const a=u.endsWith(".css"),f=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const p=document.createElement("link");if(p.rel=a?"stylesheet":Zu,a||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),a)return new Promise((g,C)=>{p.addEventListener("load",g),p.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};/*! + * vue-router v4.6.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */const Gt=typeof document<"u";function Dl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function tf(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Dl(e.default)}const ne=Object.assign;function $s(e,t){const n={};for(const s in t){const r=t[s];n[s]=Ye(r)?r.map(e):e(r)}return n}const An=()=>{},Ye=Array.isArray;function Do(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Ll=/#/g,nf=/&/g,sf=/\//g,rf=/=/g,of=/\?/g,Fl=/\+/g,lf=/%5B/g,cf=/%5D/g,Ml=/%5E/g,af=/%60/g,Ul=/%7B/g,uf=/%7C/g,jl=/%7D/g,ff=/%20/g;function Ur(e){return e==null?"":encodeURI(""+e).replace(uf,"|").replace(lf,"[").replace(cf,"]")}function df(e){return Ur(e).replace(Ul,"{").replace(jl,"}").replace(Ml,"^")}function dr(e){return Ur(e).replace(Fl,"%2B").replace(ff,"+").replace(Ll,"%23").replace(nf,"%26").replace(af,"`").replace(Ul,"{").replace(jl,"}").replace(Ml,"^")}function hf(e){return dr(e).replace(rf,"%3D")}function pf(e){return Ur(e).replace(Ll,"%23").replace(of,"%3F")}function mf(e){return pf(e).replace(sf,"%2F")}function In(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const gf=/\/$/,yf=e=>e.replace(gf,"");function Ws(e,t,n="/"){let s,r={},o="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return c=l>=0&&c>l?-1:c,c>=0&&(s=t.slice(0,c),o=t.slice(c,l>0?l:t.length),r=e(o.slice(1))),l>=0&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=wf(s??t,n),{fullPath:s+o+i,path:s,query:r,hash:In(i)}}function _f(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Lo(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function bf(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&en(t.matched[s],n.matched[r])&&Bl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function en(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Bl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Ef(e[n],t[n]))return!1;return!0}function Ef(e,t){return Ye(e)?Fo(e,t):Ye(t)?Fo(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function Fo(e,t){return Ye(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function wf(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,l;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i).join("/")}const Rt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let hr=(function(e){return e.pop="pop",e.push="push",e})({}),Ks=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Rf(e){if(!e)if(Gt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),yf(e)}const Sf=/^[^#]+#/;function Of(e,t){return e.replace(Sf,"#")+t}function Af(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const vs=()=>({left:window.scrollX,top:window.scrollY});function xf(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Af(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Mo(e,t){return(history.state?history.state.position-t:-1)+e}const pr=new Map;function vf(e,t){pr.set(e,t)}function Cf(e){const t=pr.get(e);return pr.delete(e),t}function Pf(e){return typeof e=="string"||e&&typeof e=="object"}function Hl(e){return typeof e=="string"||typeof e=="symbol"}let he=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const Vl=Symbol("");he.MATCHER_NOT_FOUND+"",he.NAVIGATION_GUARD_REDIRECT+"",he.NAVIGATION_ABORTED+"",he.NAVIGATION_CANCELLED+"",he.NAVIGATION_DUPLICATED+"";function tn(e,t){return ne(new Error,{type:e,[Vl]:!0},t)}function ut(e,t){return e instanceof Error&&Vl in e&&(t==null||!!(e.type&t))}const Tf=["params","query","hash"];function Nf(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Tf)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function If(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;sr&&dr(r)):[s&&dr(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function Df(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Ye(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const Lf=Symbol(""),jo=Symbol(""),Cs=Symbol(""),jr=Symbol(""),mr=Symbol("");function fn(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function At(e,t,n,s,r,o=i=>i()){const i=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,c)=>{const u=p=>{p===!1?c(tn(he.NAVIGATION_ABORTED,{from:n,to:t})):p instanceof Error?c(p):Pf(p)?c(tn(he.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(i&&s.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),l())},a=o(()=>e.call(s&&s.instances[r],t,n,u));let f=Promise.resolve(a);e.length<3&&(f=f.then(u)),f.catch(p=>c(p))})}function Gs(e,t,n,s,r=o=>o()){const o=[];for(const i of e)for(const l in i.components){let c=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(Dl(c)){const u=(c.__vccOpts||c)[t];u&&o.push(At(u,n,s,i,l,r))}else{let u=c();o.push(()=>u.then(a=>{if(!a)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const f=tf(a)?a.default:a;i.mods[l]=a,i.components[l]=f;const p=(f.__vccOpts||f)[t];return p&&At(p,n,s,i,l,r)()}))}}return o}function Ff(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;ien(u,l))?s.push(l):n.push(l));const c=e.matched[i];c&&(t.matched.find(u=>en(u,c))||r.push(c))}return[n,s,r]}/*! + * vue-router v4.6.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let Mf=()=>location.protocol+"//"+location.host;function kl(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let i=r.includes(e.slice(o))?e.slice(o).length:1,l=r.slice(i);return l[0]!=="/"&&(l="/"+l),Lo(l,"")}return Lo(n,e)+s+r}function Uf(e,t,n,s){let r=[],o=[],i=null;const l=({state:p})=>{const g=kl(e,location),C=n.value,O=t.value;let x=0;if(p){if(n.value=g,t.value=p,i&&i===C){i=null;return}x=O?p.position-O.position:0}else s(g);r.forEach(b=>{b(n.value,C,{delta:x,type:hr.pop,direction:x?x>0?Ks.forward:Ks.back:Ks.unknown})})};function c(){i=n.value}function u(p){r.push(p);const g=()=>{const C=r.indexOf(p);C>-1&&r.splice(C,1)};return o.push(g),g}function a(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(ne({},p.state,{scroll:vs()}),"")}}function f(){for(const p of o)p();o=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",a),document.removeEventListener("visibilitychange",a)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",a),document.addEventListener("visibilitychange",a),{pauseListeners:c,listen:u,destroy:f}}function Bo(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?vs():null}}function jf(e){const{history:t,location:n}=window,s={value:kl(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,u,a){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+c:Mf()+e+c;try{t[a?"replaceState":"pushState"](u,"",p),r.value=u}catch(g){console.error(g),n[a?"replace":"assign"](p)}}function i(c,u){o(c,ne({},t.state,Bo(r.value.back,c,r.value.forward,!0),u,{position:r.value.position}),!0),s.value=c}function l(c,u){const a=ne({},r.value,t.state,{forward:c,scroll:vs()});o(a.current,a,!0),o(c,ne({},Bo(s.value,c,null),{position:a.position+1},u),!1),s.value=c}return{location:s,state:r,push:l,replace:i}}function Bf(e){e=Rf(e);const t=jf(e),n=Uf(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=ne({location:"",base:e,go:s,createHref:Of.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let It=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var ye=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(ye||{});const Hf={type:It.Static,value:""},Vf=/[a-zA-Z0-9_]/;function kf(e){if(!e)return[[]];if(e==="/")return[[Hf]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${u}": ${g}`)}let n=ye.Static,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,c,u="",a="";function f(){u&&(n===ye.Static?o.push({type:It.Static,value:u}):n===ye.Param||n===ye.ParamRegExp||n===ye.ParamRegExpEnd?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),o.push({type:It.Param,value:u,regexp:a,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=c}for(;lt.length?t.length===1&&t[0]===Ne.Static+Ne.Segment?1:-1:0}function ql(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Gf={strict:!1,end:!0,sensitive:!1};function zf(e,t,n){const s=Wf(kf(e.path),n),r=ne(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Jf(e,t){const n=[],s=new Map;t=Do(Gf,t);function r(f){return s.get(f)}function o(f,p,g){const C=!g,O=qo(f);O.aliasOf=g&&g.record;const x=Do(t,f),b=[O];if("alias"in f){const P=typeof f.alias=="string"?[f.alias]:f.alias;for(const j of P)b.push(qo(ne({},O,{components:g?g.record.components:O.components,path:j,aliasOf:g?g.record:O})))}let S,v;for(const P of b){const{path:j}=P;if(p&&j[0]!=="/"){const $=p.record.path,J=$[$.length-1]==="/"?"":"/";P.path=p.record.path+(j&&J+j)}if(S=zf(P,p,x),g?g.alias.push(S):(v=v||S,v!==S&&v.alias.push(S),C&&f.name&&!$o(S)&&i(f.name)),$l(S)&&c(S),O.children){const $=O.children;for(let J=0;J<$.length;J++)o($[J],S,g&&g.children[J])}g=g||S}return v?()=>{i(v)}:An}function i(f){if(Hl(f)){const p=s.get(f);p&&(s.delete(f),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(f);p>-1&&(n.splice(p,1),f.record.name&&s.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function l(){return n}function c(f){const p=Yf(f,n);n.splice(p,0,f),f.record.name&&!$o(f)&&s.set(f.record.name,f)}function u(f,p){let g,C={},O,x;if("name"in f&&f.name){if(g=s.get(f.name),!g)throw tn(he.MATCHER_NOT_FOUND,{location:f});x=g.record.name,C=ne(ko(p.params,g.keys.filter(v=>!v.optional).concat(g.parent?g.parent.keys.filter(v=>v.optional):[]).map(v=>v.name)),f.params&&ko(f.params,g.keys.map(v=>v.name))),O=g.stringify(C)}else if(f.path!=null)O=f.path,g=n.find(v=>v.re.test(O)),g&&(C=g.parse(O),x=g.record.name);else{if(g=p.name?s.get(p.name):n.find(v=>v.re.test(p.path)),!g)throw tn(he.MATCHER_NOT_FOUND,{location:f,currentLocation:p});x=g.record.name,C=ne({},p.params,f.params),O=g.stringify(C)}const b=[];let S=g;for(;S;)b.unshift(S.record),S=S.parent;return{name:x,path:O,params:C,matched:b,meta:Qf(b)}}e.forEach(f=>o(f));function a(){n.length=0,s.clear()}return{addRoute:o,resolve:u,removeRoute:i,clearRoutes:a,getRoutes:l,getRecordMatcher:r}}function ko(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function qo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Xf(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Xf(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function $o(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Qf(e){return e.reduce((t,n)=>ne(t,n.meta),{})}function Yf(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;ql(e,t[o])<0?s=o:n=o+1}const r=Zf(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function Zf(e){let t=e;for(;t=t.parent;)if($l(t)&&ql(e,t)===0)return t}function $l({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Wo(e){const t=Ke(Cs),n=Ke(jr),s=Be(()=>{const c=vt(e.to);return t.resolve(c)}),r=Be(()=>{const{matched:c}=s.value,{length:u}=c,a=c[u-1],f=n.matched;if(!a||!f.length)return-1;const p=f.findIndex(en.bind(null,a));if(p>-1)return p;const g=Ko(c[u-2]);return u>1&&Ko(a)===g&&f[f.length-1].path!==g?f.findIndex(en.bind(null,c[u-2])):p}),o=Be(()=>r.value>-1&&rd(n.params,s.value.params)),i=Be(()=>r.value>-1&&r.value===n.matched.length-1&&Bl(n.params,s.value.params));function l(c={}){if(sd(c)){const u=t[vt(e.replace)?"replace":"push"](vt(e.to)).catch(An);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:s,href:Be(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}function ed(e){return e.length===1?e[0]:e}const td=Lr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Wo,setup(e,{slots:t}){const n=Fn(Wo(e)),{options:s}=Ke(Cs),r=Be(()=>({[Go(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Go(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&ed(t.default(n));return e.custom?o:xl("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),nd=td;function sd(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function rd(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Ye(r)||r.length!==s.length||s.some((o,i)=>o.valueOf()!==r[i].valueOf()))return!1}return!0}function Ko(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Go=(e,t,n)=>e??t??n,od=Lr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Ke(mr),r=Be(()=>e.route||s.value),o=Ke(jo,0),i=Be(()=>{let u=vt(o);const{matched:a}=r.value;let f;for(;(f=a[u])&&!f.components;)u++;return u}),l=Be(()=>r.value.matched[i.value]);Gn(jo,Be(()=>i.value+1)),Gn(Lf,l),Gn(mr,r);const c=bn();return En(()=>[c.value,l.value,e.name],([u,a,f],[p,g,C])=>{a&&(a.instances[f]=u,g&&g!==a&&u&&u===p&&(a.leaveGuards.size||(a.leaveGuards=g.leaveGuards),a.updateGuards.size||(a.updateGuards=g.updateGuards))),u&&a&&(!g||!en(a,g)||!p)&&(a.enterCallbacks[f]||[]).forEach(O=>O(u))},{flush:"post"}),()=>{const u=r.value,a=e.name,f=l.value,p=f&&f.components[a];if(!p)return zo(n.default,{Component:p,route:u});const g=f.props[a],C=g?g===!0?u.params:typeof g=="function"?g(u):g:null,x=xl(p,ne({},C,t,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(f.instances[a]=null)},ref:c}));return zo(n.default,{Component:x,route:u})||x}}});function zo(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Wl=od;function id(e){const t=Jf(e.routes,e),n=e.parseQuery||If,s=e.stringifyQuery||Uo,r=e.history,o=fn(),i=fn(),l=fn(),c=Xc(Rt);let u=Rt;Gt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const a=$s.bind(null,R=>""+R),f=$s.bind(null,mf),p=$s.bind(null,In);function g(R,F){let L,B;return Hl(R)?(L=t.getRecordMatcher(R),B=F):B=R,t.addRoute(B,L)}function C(R){const F=t.getRecordMatcher(R);F&&t.removeRoute(F)}function O(){return t.getRoutes().map(R=>R.record)}function x(R){return!!t.getRecordMatcher(R)}function b(R,F){if(F=ne({},F||c.value),typeof R=="string"){const y=Ws(n,R,F.path),w=t.resolve({path:y.path},F),_=r.createHref(y.fullPath);return ne(y,w,{params:p(w.params),hash:In(y.hash),redirectedFrom:void 0,href:_})}let L;if(R.path!=null)L=ne({},R,{path:Ws(n,R.path,F.path).path});else{const y=ne({},R.params);for(const w in y)y[w]==null&&delete y[w];L=ne({},R,{params:f(y)}),F.params=f(F.params)}const B=t.resolve(L,F),X=R.hash||"";B.params=a(p(B.params));const d=_f(s,ne({},R,{hash:df(X),path:B.path})),h=r.createHref(d);return ne({fullPath:d,hash:X,query:s===Uo?Df(R.query):R.query||{}},B,{redirectedFrom:void 0,href:h})}function S(R){return typeof R=="string"?Ws(n,R,c.value.path):ne({},R)}function v(R,F){if(u!==R)return tn(he.NAVIGATION_CANCELLED,{from:F,to:R})}function P(R){return J(R)}function j(R){return P(ne(S(R),{replace:!0}))}function $(R,F){const L=R.matched[R.matched.length-1];if(L&&L.redirect){const{redirect:B}=L;let X=typeof B=="function"?B(R,F):B;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=S(X):{path:X},X.params={}),ne({query:R.query,hash:R.hash,params:X.path!=null?{}:R.params},X)}}function J(R,F){const L=u=b(R),B=c.value,X=R.state,d=R.force,h=R.replace===!0,y=$(L,B);if(y)return J(ne(S(y),{state:typeof y=="object"?ne({},X,y.state):X,force:d,replace:h}),F||L);const w=L;w.redirectedFrom=F;let _;return!d&&bf(s,B,L)&&(_=tn(he.NAVIGATION_DUPLICATED,{to:w,from:B}),oe(B,B,!0,!1)),(_?Promise.resolve(_):Y(w,B)).catch(E=>ut(E)?ut(E,he.NAVIGATION_GUARD_REDIRECT)?E:Re(E):Z(E,w,B)).then(E=>{if(E){if(ut(E,he.NAVIGATION_GUARD_REDIRECT))return J(ne({replace:h},S(E.to),{state:typeof E.to=="object"?ne({},X,E.to.state):X,force:d}),F||w)}else E=be(w,B,!0,h,X);return ue(w,B,E),E})}function G(R,F){const L=v(R,F);return L?Promise.reject(L):Promise.resolve()}function z(R){const F=We.values().next().value;return F&&typeof F.runWithContext=="function"?F.runWithContext(R):R()}function Y(R,F){let L;const[B,X,d]=Ff(R,F);L=Gs(B.reverse(),"beforeRouteLeave",R,F);for(const y of B)y.leaveGuards.forEach(w=>{L.push(At(w,R,F))});const h=G.bind(null,R,F);return L.push(h),K(L).then(()=>{L=[];for(const y of o.list())L.push(At(y,R,F));return L.push(h),K(L)}).then(()=>{L=Gs(X,"beforeRouteUpdate",R,F);for(const y of X)y.updateGuards.forEach(w=>{L.push(At(w,R,F))});return L.push(h),K(L)}).then(()=>{L=[];for(const y of d)if(y.beforeEnter)if(Ye(y.beforeEnter))for(const w of y.beforeEnter)L.push(At(w,R,F));else L.push(At(y.beforeEnter,R,F));return L.push(h),K(L)}).then(()=>(R.matched.forEach(y=>y.enterCallbacks={}),L=Gs(d,"beforeRouteEnter",R,F,z),L.push(h),K(L))).then(()=>{L=[];for(const y of i.list())L.push(At(y,R,F));return L.push(h),K(L)}).catch(y=>ut(y,he.NAVIGATION_CANCELLED)?y:Promise.reject(y))}function ue(R,F,L){l.list().forEach(B=>z(()=>B(R,F,L)))}function be(R,F,L,B,X){const d=v(R,F);if(d)return d;const h=F===Rt,y=Gt?history.state:{};L&&(B||h?r.replace(R.fullPath,ne({scroll:h&&y&&y.scroll},X)):r.push(R.fullPath,X)),c.value=R,oe(R,F,L,h),Re()}let we;function Ee(){we||(we=r.listen((R,F,L)=>{if(!Ze.listening)return;const B=b(R),X=$(B,Ze.currentRoute.value);if(X){J(ne(X,{replace:!0,force:!0}),B).catch(An);return}u=B;const d=c.value;Gt&&vf(Mo(d.fullPath,L.delta),vs()),Y(B,d).catch(h=>ut(h,he.NAVIGATION_ABORTED|he.NAVIGATION_CANCELLED)?h:ut(h,he.NAVIGATION_GUARD_REDIRECT)?(J(ne(S(h.to),{force:!0}),B).then(y=>{ut(y,he.NAVIGATION_ABORTED|he.NAVIGATION_DUPLICATED)&&!L.delta&&L.type===hr.pop&&r.go(-1,!1)}).catch(An),Promise.reject()):(L.delta&&r.go(-L.delta,!1),Z(h,B,d))).then(h=>{h=h||be(B,d,!1),h&&(L.delta&&!ut(h,he.NAVIGATION_CANCELLED)?r.go(-L.delta,!1):L.type===hr.pop&&ut(h,he.NAVIGATION_ABORTED|he.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),ue(B,d,h)}).catch(An)}))}let Me=fn(),te=fn(),q;function Z(R,F,L){Re(R);const B=te.list();return B.length?B.forEach(X=>X(R,F,L)):console.error(R),Promise.reject(R)}function $e(){return q&&c.value!==Rt?Promise.resolve():new Promise((R,F)=>{Me.add([R,F])})}function Re(R){return q||(q=!R,Ee(),Me.list().forEach(([F,L])=>R?L(R):F()),Me.reset()),R}function oe(R,F,L,B){const{scrollBehavior:X}=e;if(!Gt||!X)return Promise.resolve();const d=!L&&Cf(Mo(R.fullPath,0))||(B||!L)&&history.state&&history.state.scroll||null;return ws().then(()=>X(R,F,d)).then(h=>h&&xf(h)).catch(h=>Z(h,R,F))}const de=R=>r.go(R);let Ue;const We=new Set,Ze={currentRoute:c,listening:!0,addRoute:g,removeRoute:C,clearRoutes:t.clearRoutes,hasRoute:x,getRoutes:O,resolve:b,options:e,push:P,replace:j,go:de,back:()=>de(-1),forward:()=>de(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:te.add,isReady:$e,install(R){R.component("RouterLink",nd),R.component("RouterView",Wl),R.config.globalProperties.$router=Ze,Object.defineProperty(R.config.globalProperties,"$route",{enumerable:!0,get:()=>vt(c)}),Gt&&!Ue&&c.value===Rt&&(Ue=!0,P(r.location).catch(B=>{}));const F={};for(const B in Rt)Object.defineProperty(F,B,{get:()=>c.value[B],enumerable:!0});R.provide(Cs,Ze),R.provide(jr,Bi(F)),R.provide(mr,c);const L=R.unmount;We.add(R),R.unmount=function(){We.delete(R),We.size<1&&(u=Rt,we&&we(),we=null,c.value=Rt,Ue=!1,q=!1),L()}}};function K(R){return R.reduce((F,L)=>F.then(()=>z(L)),Promise.resolve())}return Ze}function Pp(){return Ke(Cs)}function Tp(e){return Ke(jr)}function Kl(e,t){return function(){return e.apply(t,arguments)}}const{toString:ld}=Object.prototype,{getPrototypeOf:nn}=Object,{iterator:jn,toStringTag:Gl}=Symbol,cs=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Dn=(e,t)=>{let n=e;const s=[];for(;n!=null&&n!==Object.prototype;){if(s.indexOf(n)!==-1)return!1;if(s.push(n),cs(n,t))return!0;n=nn(n)}return!1},cd=(e,t)=>e!=null&&Dn(e,t)?e[t]:void 0,Br=(e=>t=>{const n=ld.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ze=e=>(e=e.toLowerCase(),t=>Br(t)===e),Ps=e=>t=>typeof t===e,{isArray:jt}=Array,Bt=Ps("undefined");function on(e){return e!==null&&!Bt(e)&&e.constructor!==null&&!Bt(e.constructor)&&Fe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const zl=ze("ArrayBuffer");function ad(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&zl(e.buffer),t}const ud=Ps("string"),Fe=Ps("function"),Jl=Ps("number"),ln=e=>e!==null&&typeof e=="object",fd=e=>e===!0||e===!1,Jn=e=>{if(!ln(e))return!1;const t=nn(e);return(t===null||t===Object.prototype||nn(t)===null)&&!Dn(e,Gl)&&!Dn(e,jn)},dd=e=>{if(!ln(e)||on(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},hd=ze("Date"),pd=ze("File"),md=e=>!!(e&&typeof e.uri<"u"),gd=e=>e&&typeof e.getParts<"u",yd=ze("Blob"),_d=ze("FileList"),bd=ze("Set"),Ed=e=>ln(e)&&Fe(e.pipe);function wd(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Jo=wd(),Xo=typeof Jo.FormData<"u"?Jo.FormData:void 0,Rd=e=>{if(!e)return!1;if(Xo&&e instanceof Xo)return!0;const t=nn(e);if(!t||t===Object.prototype||!Fe(e.append))return!1;const n=Br(e);return n==="formdata"||n==="object"&&Fe(e.toString)&&e.toString()==="[object FormData]"},Sd=ze("URLSearchParams"),[Od,Ad,xd,vd]=["ReadableStream","Request","Response","Headers"].map(ze),Cd=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Bn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,r;if(typeof e!="object"&&(e=[e]),jt(e))for(s=0,r=e.length;s0;)if(r=n[s],t===r.toLowerCase())return r;return null}const Dt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ql=e=>!Bt(e)&&e!==Dt;function gr(...e){const{caseless:t,skipUndefined:n}=Ql(this)&&this||{},s={},r=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const l=t&&typeof i=="string"&&Xl(s,i)||i,c=cs(s,l)?s[l]:void 0;Jn(c)&&Jn(o)?s[l]=gr(c,o):Jn(o)?s[l]=gr({},o):jt(o)?s[l]=o.slice():(!n||!Bt(o))&&(s[l]=o)};for(let o=0,i=e.length;o(Bn(t,(r,o)=>{n&&Fe(r)?Object.defineProperty(e,o,{__proto__:null,value:Kl(r,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),e),Td=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Nd=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Id=(e,t,n,s)=>{let r,o,i;const l={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),o=r.length;o-- >0;)i=r[o],(!s||s(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=n!==!1&&nn(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Dd=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},Ld=e=>{if(!e)return null;if(jt(e))return e;let t=e.length;if(!Jl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Fd=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&nn(Uint8Array)),Md=(e,t)=>{const s=(e&&e[jn]).call(e);let r;for(;(r=s.next())&&!r.done;){const o=r.value;t.call(e,o[0],o[1])}},Ud=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},jd=ze("HTMLFormElement"),Bd=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,r){return s.toUpperCase()+r}),{propertyIsEnumerable:Hd}=Object.prototype,Vd=ze("RegExp"),Yl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};Bn(n,(r,o)=>{let i;(i=t(r,o,e))!==!1&&(s[o]=i||r)}),Object.defineProperties(e,s)},kd=e=>{Yl(e,(t,n)=>{if(Fe(e)&&["arguments","caller","callee"].includes(n))return!1;const s=e[n];if(Fe(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},qd=(e,t)=>{const n={},s=r=>{r.forEach(o=>{n[o]=!0})};return jt(e)?s(e):s(String(e).split(t)),n},$d=()=>{},Wd=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Kd(e){return!!(e&&Fe(e.append)&&e[Gl]==="FormData"&&e[jn])}const Gd=e=>{const t=new WeakSet,n=s=>{if(ln(s)){if(t.has(s))return;if(on(s))return s;if(!("toJSON"in s)){t.add(s);let r;if(bd(s)){r=[];for(const o of s){const i=n(o);!Bt(i)&&r.push(i)}}else r=jt(s)?[]:{},Bn(s,(o,i)=>{const l=n(o);!Bt(l)&&(r[i]=l)});return t.delete(s),r}}return s};return n(e)},zd=ze("AsyncFunction"),Jd=e=>e&&(ln(e)||Fe(e))&&Fe(e.then)&&Fe(e.catch),Zl=((e,t)=>e?setImmediate:t?((n,s)=>(Dt.addEventListener("message",({source:r,data:o})=>{r===Dt&&o===n&&s.length&&s.shift()()},!1),r=>{s.push(r),Dt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Fe(Dt.postMessage)),Xd=typeof queueMicrotask<"u"?queueMicrotask.bind(Dt):typeof process<"u"&&process.nextTick||Zl,ec=e=>e!=null&&Fe(e[jn]),Qd=e=>e!=null&&Dn(e,jn)&&ec(e),m={isArray:jt,isArrayBuffer:zl,isBuffer:on,isFormData:Rd,isArrayBufferView:ad,isString:ud,isNumber:Jl,isBoolean:fd,isObject:ln,isPlainObject:Jn,isEmptyObject:dd,isReadableStream:Od,isRequest:Ad,isResponse:xd,isHeaders:vd,isUndefined:Bt,isDate:hd,isFile:pd,isReactNativeBlob:md,isReactNative:gd,isBlob:yd,isRegExp:Vd,isFunction:Fe,isStream:Ed,isURLSearchParams:Sd,isTypedArray:Fd,isFileList:_d,forEach:Bn,merge:gr,extend:Pd,trim:Cd,stripBOM:Td,inherits:Nd,toFlatObject:Id,kindOf:Br,kindOfTest:ze,endsWith:Dd,toArray:Ld,forEachEntry:Md,matchAll:Ud,isHTMLForm:jd,hasOwnProperty:cs,hasOwnProp:cs,hasOwnInPrototypeChain:Dn,getSafeProp:cd,reduceDescriptors:Yl,freezeMethods:kd,toObjectSet:qd,toCamelCase:Bd,noop:$d,toFiniteNumber:Wd,findKey:Xl,global:Dt,isContextDefined:Ql,isSpecCompliantForm:Kd,toJSONObject:Gd,isAsyncFn:zd,isThenable:Jd,setImmediate:Zl,asap:Xd,isIterable:ec,isSafeIterable:Qd},Yd=m.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Zd=e=>{const t={};let n,s,r;return e&&e.split(` +`).forEach(function(i){r=i.indexOf(":"),n=i.substring(0,r).trim().toLowerCase(),s=i.substring(r+1).trim();const l=m.hasOwnProp(t,n);!n||l&&m.hasOwnProp(Yd,n)||(n==="set-cookie"?l?t[n].push(s):t[n]=[s]:t[n]=l?t[n]+", "+s:s)}),t};function eh(e){let t=0,n=e.length;for(;tt;){const s=e.charCodeAt(n-1);if(s!==9&&s!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const th=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),nh=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Hr(e,t){return m.isArray(e)?e.map(n=>Hr(n,t)):eh(String(e).replace(t,""))}const sh=e=>Hr(e,th),rh=e=>Hr(e,nh);function tc(e){const t=Object.create(null);return m.forEach(e.toJSON(),(n,s)=>{t[s]=rh(n)}),t}const Qo=Symbol("internals");function dn(e){return e&&String(e).trim().toLowerCase()}function Xn(e){return e===!1||e==null?e:m.isArray(e)?e.map(Xn):sh(String(e))}function oh(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const ih=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function zs(e){let t=0,n=e.length;for(;tt;){const s=e.charCodeAt(n-1);if(s!==9&&s!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function lh(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let s=1;s=t))return e;n+=e[s]}return n}function ch(e){const t=Object.create(null),n=String(e);let s=0,r=!1,o=!1;function i(l){const c=zs(n.slice(s,l)),u=c.indexOf("=");if(u<1)return;const a=zs(c.slice(0,u));if(!ih.test(a))return;const f=a.toLowerCase();if(f==="__proto__"||f==="constructor"||f==="prototype")return;const p=zs(c.slice(u+1));t[f]=lh(p)}for(let l=0;l/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Js(e,t,n,s,r){if(m.isFunction(s))return s.call(this,t,n);if(r&&(t=n),!!m.isString(t)){if(m.isString(s))return t.indexOf(s)!==-1;if(m.isRegExp(s))return s.test(t)}}function uh(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function fh(e,t){const n=m.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{__proto__:null,value:function(r,o,i){return this[s].call(this,t,r,o,i)},configurable:!0})})}let Pe=class{constructor(t){t&&this.set(t)}set(t,n,s){const r=this;function o(l,c,u){const a=dn(c);if(!a)return;const f=m.findKey(r,a);(!f||r[f]===void 0||u===!0||u===void 0&&r[f]!==!1)&&(r[f||c]=Xn(l))}const i=(l,c)=>m.forEach(l,(u,a)=>o(u,a,c));if(m.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(m.isString(t)&&(t=t.trim())&&!ah(t))i(Zd(t),n);else if(m.isObject(t)&&m.isSafeIterable(t)){let l=Object.create(null),c,u;for(const a of t){if(!m.isArray(a))throw new TypeError("Object iterator must return a key-value pair");u=a[0],m.hasOwnProp(l,u)?(c=l[u],l[u]=m.isArray(c)?[...c,a[1]]:[c,a[1]]):l[u]=a[1]}i(l,n)}else t!=null&&o(n,t,s);return this}get(t,n){if(t=dn(t),t){const s=m.findKey(this,t);if(s){const r=this[s];if(!n)return r;if(n===!0)return oh(r);if(m.isFunction(n))return n.call(this,r,s);if(m.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=dn(t),t){const s=m.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||Js(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let r=!1;function o(i){if(i=dn(i),i){const l=m.findKey(s,i);l&&(!n||Js(s,s[l],l,n))&&(delete s[l],r=!0)}}return m.isArray(t)?t.forEach(o):o(t),r}clear(t){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const o=n[s];(!t||Js(this,this[o],o,t,!0))&&(delete this[o],r=!0)}return r}normalize(t){const n=this,s={};return m.forEach(this,(r,o)=>{const i=m.findKey(s,o);if(i){n[i]=Xn(r),delete n[o];return}const l=t?uh(o):String(o).trim();l!==o&&delete n[o],n[l]=Xn(r),s[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return m.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=t&&m.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){const t=this.get("set-cookie");return m.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return ch(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[Qo]=this[Qo]={accessors:{}}).accessors,r=this.prototype;function o(i){const l=dn(i);s[l]||(fh(r,i),s[l]=!0)}return m.isArray(t)?t.forEach(o):o(t),this}};Pe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);m.reduceDescriptors(Pe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});m.freezeMethods(Pe);const as="[REDACTED ****]";function dh(e){if(m.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(m.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function hh(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),s=[],r=o=>{if(o===null||typeof o!="object"||m.isBuffer(o))return o;if(s.indexOf(o)!==-1)return;o instanceof Pe&&(o=o.toJSON()),s.push(o);let i;if(m.isArray(o))i=[],o.forEach((l,c)=>{const u=r(l);m.isUndefined(u)||(i[c]=u)});else{if(!m.isPlainObject(o)&&dh(o))return s.pop(),o;i=Object.create(null);for(const[l,c]of Object.entries(o)){const u=n.has(l.toLowerCase())?as:r(c);m.isUndefined(u)||(i[l]=u)}}return s.pop(),i};return r(e)}function Yo(e){try{return String(e)}catch{return""}}function ph(e){return e.errors.map(n=>{try{return n&&n.message?Yo(n.message):Yo(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let D=class nc extends Error{static from(t,n,s,r,o,i){let l=t.message;!l&&m.isArray(t.errors)&&t.errors.length&&(l=ph(t));const c=new nc(l,n||t.code,s,r,o);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),i&&Object.assign(c,i),c}constructor(t,n,s,r,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),s&&(this.config=s),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&m.hasOwnProp(t,"redact")?t.redact:void 0,s=m.isArray(n)&&n.length>0?hh(t,n):m.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:s,code:this.code,status:this.status}}};D.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";D.ERR_BAD_OPTION="ERR_BAD_OPTION";D.ECONNABORTED="ECONNABORTED";D.ETIMEDOUT="ETIMEDOUT";D.ECONNREFUSED="ECONNREFUSED";D.ERR_NETWORK="ERR_NETWORK";D.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";D.ERR_DEPRECATED="ERR_DEPRECATED";D.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";D.ERR_BAD_REQUEST="ERR_BAD_REQUEST";D.ERR_CANCELED="ERR_CANCELED";D.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";D.ERR_INVALID_URL="ERR_INVALID_URL";D.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const mh=null,sc=100;function yr(e){return m.isPlainObject(e)||m.isArray(e)}function rc(e){return m.endsWith(e,"[]")?e.slice(0,-2):e}function Xs(e,t,n){return e?e.concat(t).map(function(r,o){return r=rc(r),!n&&o?"["+r+"]":r}).join(n?".":""):t}function gh(e){return m.isArray(e)&&!e.some(yr)}const yh=m.toFlatObject(m,{},null,function(t){return/^is[A-Z]/.test(t)});function Ts(e,t,n){if(!m.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=m.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,v){return!m.isUndefined(v[S])});const s=n.metaTokens,r=n.visitor||C,o=n.dots,i=n.indexes,l=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?sc:n.maxDepth,u=l&&m.isSpecCompliantForm(t),a=[];if(!m.isFunction(r))throw new TypeError("visitor must be a function");function f(b){if(b===null)return"";if(m.isDate(b))return b.toISOString();if(m.isBoolean(b))return b.toString();if(!u&&m.isBlob(b))throw new D("Blob is not supported. Use a Buffer instead.");if(m.isArrayBuffer(b)||m.isTypedArray(b)){if(u&&typeof l=="function")return new l([b]);throw new D("Blob is not supported. Use a Buffer instead.",D.ERR_NOT_SUPPORT)}return b}function p(b){if(b>c)throw new D("Object is too deeply nested ("+b+" levels). Max depth: "+c,D.ERR_FORM_DATA_DEPTH_EXCEEDED)}function g(b,S){if(c===1/0)return JSON.stringify(b);const v=[];return JSON.stringify(b,function(j,$){if(!m.isObject($))return $;for(;v.length&&v[v.length-1]!==this;)v.pop();return v.push($),p(S+v.length-1),$})}function C(b,S,v){let P=b;if(m.isReactNative(t)&&m.isReactNativeBlob(b))return t.append(Xs(v,S,o),f(b)),!1;if(b&&!v&&typeof b=="object"){if(m.endsWith(S,"{}"))S=s?S:S.slice(0,-2),b=g(b,1);else if(m.isArray(b)&&gh(b)||(m.isFileList(b)||m.endsWith(S,"[]"))&&(P=m.toArray(b)))return S=rc(S),P.forEach(function($,J){!(m.isUndefined($)||$===null)&&t.append(i===!0?Xs([S],J,o):i===null?S:S+"[]",f($))}),!1}return yr(b)?!0:(t.append(Xs(v,S,o),f(b)),!1)}const O=Object.assign(yh,{defaultVisitor:C,convertValue:f,isVisitable:yr});function x(b,S,v=0){if(!m.isUndefined(b)){if(p(v),a.indexOf(b)!==-1)throw new Error("Circular reference detected in "+S.join("."));a.push(b),m.forEach(b,function(j,$){(!(m.isUndefined(j)||j===null)&&r.call(t,j,m.isString($)?$.trim():$,S,O))===!0&&x(j,S?S.concat($):[$],v+1)}),a.pop()}}if(!m.isObject(e))throw new TypeError("data must be an object");return x(e),t}function Zo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(s){return t[s]})}function Vr(e,t){this._pairs=[],e&&Ts(e,this,t)}const oc=Vr.prototype;oc.append=function(t,n){this._pairs.push([t,n])};oc.toString=function(t){const n=t?s=>t.call(this,s,Zo):Zo;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function _h(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ic(e,t,n){if(!t)return e;e=e||"";const s=m.isFunction(n)?{serialize:n}:n,r=m.getSafeProp(s,"encode")||_h,o=m.getSafeProp(s,"serialize");let i;if(o?i=o(t,s):i=m.isURLSearchParams(t)?t.toString():new Vr(t,s).toString(r),i){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class ei{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){m.forEach(this.handlers,function(s){s!==null&&t(s)})}}const kr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},bh=typeof URLSearchParams<"u"?URLSearchParams:Vr,Eh=typeof FormData<"u"?FormData:null,wh=typeof Blob<"u"?Blob:null,Rh={isBrowser:!0,classes:{URLSearchParams:bh,FormData:Eh,Blob:wh},protocols:["http","https","file","blob","url","data"]},qr=typeof window<"u"&&typeof document<"u",_r=typeof navigator=="object"&&navigator||void 0,Sh=qr&&(!_r||["ReactNative","NativeScript","NS"].indexOf(_r.product)<0),Oh=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ah=qr&&window.location.href||"http://localhost",xh=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qr,hasStandardBrowserEnv:Sh,hasStandardBrowserWebWorkerEnv:Oh,navigator:_r,origin:Ah},Symbol.toStringTag,{value:"Module"})),Oe={...xh,...Rh};function vh(e,t){return Ts(e,new Oe.classes.URLSearchParams,{visitor:function(n,s,r,o){return Oe.isNode&&m.isBuffer(n)?(this.append(s,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const ti=sc;function lc(e){if(e>ti)throw new D("FormData field is too deeply nested ("+e+" levels). Max depth: "+ti,D.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Ch(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let s;for(;(s=n.exec(e))!==null;)lc(t.length),t.push(s[0]==="[]"?"":s[1]||s[0]);return t}function Ph(e){const t={},n=Object.keys(e);let s;const r=n.length;let o;for(s=0;s=n.length;return i=!i&&m.isArray(r)?r.length:i,c?(m.hasOwnProp(r,i)?r[i]=m.isArray(r[i])?r[i].concat(s):[r[i],s]:r[i]=s,!l):((!m.hasOwnProp(r,i)||!m.isObject(r[i]))&&(r[i]=[]),t(n,s,r[i],o)&&m.isArray(r[i])&&(r[i]=Ph(r[i])),!l)}if(m.isFormData(e)&&m.isFunction(e.entries)){const n={};return m.forEachEntry(e,(s,r)=>{t(Ch(s),r,n,0)}),n}return null}const Wt=(e,t)=>e!=null&&m.hasOwnProp(e,t)?e[t]:void 0;function Th(e,t,n){if(m.isString(e))try{return(t||JSON.parse)(e),m.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const Hn={transitional:kr,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",r=s.indexOf("application/json")>-1,o=m.isObject(t);if(o&&m.isHTMLForm(t)&&(t=new FormData(t)),m.isFormData(t))return r?JSON.stringify(cc(t)):t;if(m.isArrayBuffer(t)||m.isBuffer(t)||m.isStream(t)||m.isFile(t)||m.isBlob(t)||m.isReadableStream(t))return t;if(m.isArrayBufferView(t))return t.buffer;if(m.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){const c=Wt(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return vh(t,c).toString();if((l=m.isFileList(t))||s.indexOf("multipart/form-data")>-1){const u=Wt(this,"env"),a=u&&u.FormData;return Ts(l?{"files[]":t}:t,a&&new a,c)}}return o||r?(n.setContentType("application/json",!1),Th(t)):t}],transformResponse:[function(t){const n=Wt(this,"transitional")||Hn.transitional,s=n&&n.forcedJSONParsing,r=Wt(this,"responseType"),o=r==="json";if(m.isResponse(t)||m.isReadableStream(t))return t;if(t&&m.isString(t)&&(s&&!r||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,Wt(this,"parseReviver"))}catch(c){if(l)throw c.name==="SyntaxError"?D.from(c,D.ERR_BAD_RESPONSE,this,null,Wt(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Oe.classes.FormData,Blob:Oe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};m.forEach(["delete","get","head","post","put","patch","query"],e=>{Hn.headers[e]={}});function Qs(e,t){const n=this||Hn,s=t||n,r=Pe.from(s.headers);let o=s.data;return m.forEach(e,function(l){o=l.call(n,o,r.normalize(),t?t.status:void 0)}),r.normalize(),o}function ac(e){return!!(e&&e.__CANCEL__)}let Vn=class extends D{constructor(t,n,s){super(t??"canceled",D.ERR_CANCELED,n,s),this.name="CanceledError",this.__CANCEL__=!0}};function uc(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new D("Request failed with status code "+n.status,n.status>=400&&n.status<500?D.ERR_BAD_REQUEST:D.ERR_BAD_RESPONSE,n.config,n.request,n))}function Nh(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Ih(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,o=0,i;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),a=s[o];i||(i=u),n[r]=c,s[r]=u;let f=o,p=0;for(;f!==r;)p+=n[f++],f=f%e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),u-i{n=a,r=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const a=Date.now(),f=a-n;f>=s?i(u,a):(r=u,o||(o=setTimeout(()=>{o=null,i(r)},s-f)))},()=>r&&i(r)]}const us=(e,t,n=3)=>{let s=0;const r=Ih(50,250);return Dh(o=>{if(!o||typeof o.loaded!="number")return;const i=o.loaded,l=o.lengthComputable?o.total:void 0,c=Math.max(0,l!=null?Math.min(i,l):i),u=Math.max(0,c-s),a=r(u);s=Math.max(s,c);const f={loaded:c,total:l,progress:l?c/l:void 0,bytes:u,rate:a||void 0,estimated:a&&l?(l-c)/a:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},ni=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},si=(e,t=m.asap)=>(...n)=>t(()=>e(...n)),Lh=Oe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Oe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Oe.origin),Oe.navigator&&/(msie|trident)/i.test(Oe.navigator.userAgent)):()=>!0,Fh=Oe.hasStandardBrowserEnv?{write(e,t,n,s,r,o,i){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];m.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),m.isString(s)&&l.push(`path=${s}`),m.isString(r)&&l.push(`domain=${r}`),o===!0&&l.push("secure"),m.isString(i)&&l.push(`SameSite=${i}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const jh=/^https?:(?!\/\/)/i,Bh=/[\t\n\r]/g;function Hh(e){let t=0;for(;t`${n}${s}${as}`)}function qh(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${as}@`),n=t.indexOf("#"),r=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${as}`);return n===-1?r:`${r}#${kh(t.slice(n+1))}`}function ri(e,t){if(typeof e=="string"){const n=Vh(e);if(jh.test(n))throw new D(`Invalid URL ${JSON.stringify(qh(n))}: missing "//" after protocol`,D.ERR_INVALID_URL,t)}}function fc(e,t,n,s){ri(t,s);let r=!Mh(t);return e&&(r||n===!1)?(ri(e,s),Uh(e,t)):t}const oi=e=>e instanceof Pe?{...e}:e,$h=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function Ht(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function s(a,f,p,g){return m.isPlainObject(a)&&m.isPlainObject(f)?m.merge.call({caseless:g},a,f):m.isPlainObject(f)?m.merge({},f):m.isArray(f)?f.slice():f}function r(a,f,p,g){if(m.isUndefined(f)){if(!m.isUndefined(a))return s(void 0,a,p,g)}else return s(a,f,p,g)}function o(a,f){if(!m.isUndefined(f))return s(void 0,f)}function i(a,f){if(m.isUndefined(f)){if(!m.isUndefined(a))return s(void 0,a)}else return s(void 0,f)}function l(a){const f=m.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!m.isUndefined(f))if(m.isPlainObject(f)){if(m.hasOwnProp(f,a))return f[a]}else return;const p=m.hasOwnProp(e,"transitional")?e.transitional:void 0;if(m.isPlainObject(p)&&m.hasOwnProp(p,a))return p[a]}function c(a,f,p){if(m.hasOwnProp(t,p))return s(a,f);if(m.hasOwnProp(e,p))return s(void 0,a)}const u={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:c,headers:(a,f,p)=>r(oi(a),oi(f),p,!0)};return m.forEach($h({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const p=m.hasOwnProp(u,f)?u[f]:r,g=m.hasOwnProp(e,f)?e[f]:void 0,C=m.hasOwnProp(t,f)?t[f]:void 0,O=p(g,C,f);m.isUndefined(O)&&p!==c||(n[f]=O)}),m.hasOwnProp(t,"validateStatus")&&m.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(m.hasOwnProp(e,"validateStatus")?n.validateStatus=s(void 0,e.validateStatus):delete n.validateStatus),n}const Wh=["content-type","content-length"];function Kh(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([s,r])=>{Wh.includes(s.toLowerCase())&&e.set(s,r)})}const Gh=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function dc(e){const t=Ht({},e),n=p=>m.hasOwnProp(t,p)?t[p]:void 0,s=n("data");let r=n("withXSRFToken");const o=n("xsrfHeaderName"),i=n("xsrfCookieName");let l=n("headers");const c=n("auth"),u=n("baseURL"),a=n("allowAbsoluteUrls"),f=n("url");if(t.headers=l=Pe.from(l),t.url=ic(fc(u,f,a,t),n("params"),n("paramsSerializer")),c){const p=m.getSafeProp(c,"username")||"",g=m.getSafeProp(c,"password")||"";try{l.set("Authorization","Basic "+btoa(p+":"+(g?Gh(g):"")))}catch(C){throw D.from(C,D.ERR_BAD_OPTION_VALUE,e)}}if(m.isFormData(s)&&(Oe.hasStandardBrowserEnv||Oe.hasStandardBrowserWebWorkerEnv||m.isReactNative(s)?l.setContentType(void 0):m.isFunction(s.getHeaders)&&Kh(l,s.getHeaders(),n("formDataHeaderPolicy"))),Oe.hasStandardBrowserEnv&&(m.isFunction(r)&&(r=r(t)),r===!0||r==null&&Lh(t.url))){const g=o&&i&&Fh.read(i);g&&l.set(o,g)}return t}const zh=typeof XMLHttpRequest<"u",Jh=zh&&function(e){return new Promise(function(n,s){const r=dc(e);let o=r.data;const i=Pe.from(r.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=r,a,f,p,g,C;function O(){g&&g(),C&&C(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let x=new XMLHttpRequest;x.open(r.method.toUpperCase(),r.url,!0),x.timeout=r.timeout;function b(){if(!x)return;const v=Pe.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),j={data:!l||l==="text"||l==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:v,config:e,request:x};uc(function(J){n(J),O()},function(J){s(J),O()},j),x=null}"onloadend"in x?x.onloadend=b:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(b)},x.onabort=function(){x&&(s(new D("Request aborted",D.ECONNABORTED,e,x)),O(),x=null)},x.onerror=function(P){const j=P&&P.message?P.message:"Network Error",$=new D(j,D.ERR_NETWORK,e,x);$.event=P||null,s($),O(),x=null},x.ontimeout=function(){let P=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const j=r.transitional||kr;r.timeoutErrorMessage&&(P=r.timeoutErrorMessage),s(new D(P,j.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,e,x)),O(),x=null},o===void 0&&i.setContentType(null),"setRequestHeader"in x&&m.forEach(tc(i),function(P,j){x.setRequestHeader(j,P)}),m.isUndefined(r.withCredentials)||(x.withCredentials=!!r.withCredentials),l&&l!=="json"&&(x.responseType=r.responseType),u&&([p,C]=us(u,!0),x.addEventListener("progress",p)),c&&x.upload&&([f,g]=us(c),x.upload.addEventListener("progress",f),x.upload.addEventListener("loadend",g)),(r.cancelToken||r.signal)&&(a=v=>{x&&(s(!v||v.type?new Vn(null,e,x):v),x.abort(),O(),x=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const S=Nh(r.url);if(S&&!Oe.protocols.includes(S)){s(new D("Unsupported protocol "+S+":",D.ERR_BAD_REQUEST,e)),O();return}x.send(o||null)})},Xh=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let s=!1;const r=function(c){if(!s){s=!0,i();const u=c instanceof Error?c:this.reason;n.abort(u instanceof D?u:new Vn(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,r(new D(`timeout of ${t}ms exceeded`,D.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),e=null)};e.forEach(c=>{if(!s){if(c.aborted){r.call(c);return}c.addEventListener("abort",r,{once:!0})}});const{signal:l}=n;return l.unsubscribe=()=>m.asap(i),l},Qh=function*(e,t){let n=e.byteLength;if(n{const r=Yh(e,t);let o=0,i,l=c=>{i||(i=!0,s&&s(c))};return new ReadableStream({async pull(c){try{const{done:u,value:a}=await r.next();if(u){l(),c.close();return}let f=a.byteLength;if(n){let p=o+=f;n(p)}c.enqueue(new Uint8Array(a))}catch(u){throw l(u),u}},cancel(c){return l(c),r.return()}},{highWaterMark:2})},li=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,hc=(e,t,n)=>t+2e<=57?e-48:(e&223)-55,ep=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,tp=e=>e===9||e===10||e===12||e===13||e===32,np=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},sp=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},rp=e=>{const t=e.length;let n=0,s=0,r=!1;for(let o=0;o0){r=!0;continue}n++}}return r||s>2||s>0&&(n+s)%4!==0||n%4===1?sp(e):np(n)},op=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const s=e.slice(5,n),r=e.slice(n+1);if(/;base64/i.test(s))return t(r);let i=0;for(let l=0,c=r.length;l=55296&&u<=56319&&l+1=56320&&a<=57343?(i+=4,l++):i+=3}else i+=3}return i};function ip(e){const t=typeof e=="string"?e.indexOf("#"):-1;return op(t===-1?e:e.slice(0,t),rp)}const $r="1.19.0",ai=64*1024,{isFunction:Wn}=m,lp=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),ui=e=>{if(!m.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},fi=(e,...t)=>{try{return!!e(...t)}catch{return!1}},cp=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},ap=e=>{const t=m.global!==void 0&&m.global!==null?m.global:globalThis,{ReadableStream:n,TextEncoder:s}=t;e=m.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:r,Request:o,Response:i}=e,l=r?Wn(r):typeof fetch=="function",c=Wn(o),u=Wn(i);if(!l)return!1;const a=l&&Wn(n),f=l&&(typeof s=="function"?(b=>S=>b.encode(S))(new s):async b=>new Uint8Array(await new o(b).arrayBuffer())),p=c&&a&&fi(()=>{let b=!1;const S=new o(Oe.origin,{body:new n,method:"POST",get duplex(){return b=!0,"half"}}),v=S.headers.has("Content-Type");return S.body!=null&&S.body.cancel(),b&&!v}),g=u&&a&&fi(()=>m.isReadableStream(new i("").body)),C={stream:g&&(b=>b.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!C[b]&&(C[b]=(S,v)=>{let P=S&&S[b];if(P)return P.call(S);throw new D(`Response type '${b}' is not supported`,D.ERR_NOT_SUPPORT,v)})});const O=async b=>{if(b==null)return 0;if(m.isBlob(b))return b.size;if(m.isSpecCompliantForm(b))return(await new o(Oe.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(m.isArrayBufferView(b)||m.isArrayBuffer(b))return b.byteLength;if(m.isURLSearchParams(b)&&(b=b+""),m.isString(b))return(await f(b)).byteLength},x=async(b,S)=>{const v=m.toFiniteNumber(b.getContentLength());return v??O(S)};return async b=>{let{url:S,method:v,data:P,signal:j,cancelToken:$,timeout:J,onDownloadProgress:G,onUploadProgress:z,responseType:Y,headers:ue,withCredentials:be="same-origin",fetchOptions:we,maxContentLength:Ee,maxBodyLength:Me}=dc(b);const te=m.isNumber(Ee)&&Ee>-1,q=m.isNumber(Me)&&Me>-1,Z=K=>m.hasOwnProp(b,K)?b[K]:void 0;let $e=r||fetch;Y=Y?(Y+"").toLowerCase():"text";let Re=Xh([j,$&&$.toAbortSignal()],J),oe=null;const de=Re&&Re.unsubscribe&&(()=>{Re.unsubscribe()});let Ue,We=null;const Ze=()=>new D("Request body larger than maxBodyLength limit",D.ERR_BAD_REQUEST,b,oe);try{let K;const R=Z("auth");if(R){const _=m.getSafeProp(R,"username")||"",E=m.getSafeProp(R,"password")||"";K={username:_,password:E}}if(cp(S)){const _=new URL(S,Oe.origin);if(!K&&(_.username||_.password)){const E=ui(_.username),I=ui(_.password);K={username:E,password:I}}(_.username||_.password)&&(_.username="",_.password="",S=_.href)}if(K&&(ue.delete("authorization"),ue.set("Authorization","Basic "+btoa(lp((K.username||"")+":"+(K.password||""))))),te&&typeof S=="string"&&S.startsWith("data:")&&ip(S)>Ee)throw new D("maxContentLength size of "+Ee+" exceeded",D.ERR_BAD_RESPONSE,b,oe);if(q&&v!=="get"&&v!=="head"){const _=await O(P);if(typeof _=="number"&&isFinite(_)&&(Ue=_,_>Me))throw Ze()}const F=q&&(m.isReadableStream(P)||m.isStream(P)),L=(_,E,I)=>ii(_,ai,T=>{if(q&&T>Me)throw We=Ze();E&&E(T)},I);if(p&&v!=="get"&&v!=="head"&&(z||F)){if(Ue=Ue??await x(ue,P),Ue!==0||F){let _=new o(S,{method:"POST",body:P,duplex:"half"}),E;if(m.isFormData(P)&&(E=_.headers.get("content-type"))&&ue.setContentType(E),_.body){const[I,T]=z&&ni(Ue,us(si(z)))||[];P=L(_.body,I,T)}}}else if(F&&!c&&a&&v!=="get"&&v!=="head")P=L(P);else if(F&&c&&!p&&v!=="get"&&v!=="head")throw new D("Stream request bodies are not supported by the current fetch implementation",D.ERR_NOT_SUPPORT,b,oe);m.isString(be)||(be=be?"include":"omit");const B=c&&"credentials"in o.prototype;if(m.isFormData(P)){const _=ue.getContentType();_&&/^multipart\/form-data/i.test(_)&&!/boundary=/i.test(_)&&ue.delete("content-type")}ue.set("User-Agent","axios/"+$r,!1);const X={...we,signal:Re,method:v.toUpperCase(),headers:tc(ue.normalize()),body:P,duplex:"half",credentials:B?be:void 0};oe=c&&new o(S,X);let d=await(c?$e(oe,we):$e(S,X));const h=Pe.from(d.headers);if(te){const _=m.toFiniteNumber(h.getContentLength());if(_!=null&&_>Ee)throw new D("maxContentLength size of "+Ee+" exceeded",D.ERR_BAD_RESPONSE,b,oe)}const y=g&&(Y==="stream"||Y==="response");if(g&&d.body&&(G||te||y&&de)){const _={};["status","statusText","headers"].forEach(U=>{_[U]=d[U]});const E=m.toFiniteNumber(h.getContentLength()),[I,T]=G&&ni(E,us(si(G),!0))||[];let N=0;const A=U=>{if(te&&(N=U,N>Ee))throw new D("maxContentLength size of "+Ee+" exceeded",D.ERR_BAD_RESPONSE,b,oe);I&&I(U)};d=new i(ii(d.body,ai,A,()=>{T&&T(),de&&de()}),_)}Y=Y||"text";let w=await C[m.findKey(C,Y)||"text"](d,b);if(te&&!g&&!y){let _;if(w!=null&&(typeof w.byteLength=="number"?_=w.byteLength:typeof w.size=="number"?_=w.size:typeof w=="string"&&(_=typeof s=="function"?new s().encode(w).byteLength:w.length)),typeof _=="number"&&_>Ee)throw new D("maxContentLength size of "+Ee+" exceeded",D.ERR_BAD_RESPONSE,b,oe)}return!y&&de&&de(),await new Promise((_,E)=>{uc(_,E,{data:w,headers:Pe.from(d.headers),status:d.status,statusText:d.statusText,config:b,request:oe})})}catch(K){if(de&&de(),Re&&Re.aborted&&Re.reason instanceof D){const R=Re.reason;throw R.config=b,oe&&(R.request=oe),K!==R&&Object.defineProperty(R,"cause",{__proto__:null,value:K,writable:!0,enumerable:!1,configurable:!0}),R}if(We)throw oe&&!We.request&&(We.request=oe),We;if(K instanceof D)throw oe&&!K.request&&(K.request=oe),K;if(K&&K.name==="TypeError"&&/Load failed|fetch/i.test(K.message)){const R=new D("Network Error",D.ERR_NETWORK,b,oe,K&&K.response);throw Object.defineProperty(R,"cause",{__proto__:null,value:K.cause||K,writable:!0,enumerable:!1,configurable:!0}),R}throw D.from(K,K&&K.code,b,oe,K&&K.response)}}},up=new Map,pc=e=>{let t=e&&e.env||{};const{fetch:n,Request:s,Response:r}=t,o=[s,r,n];let i=o.length,l=i,c,u,a=up;for(;l--;)c=o[l],u=a.get(c),u===void 0&&a.set(c,u=l?new Map:ap(t)),a=u;return u};pc();const Wr={http:mh,xhr:Jh,fetch:{get:pc}};m.forEach(Wr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const di=e=>`- ${e}`,fp=e=>m.isFunction(e)||e===null||e===!1;function dp(e,t){e=m.isArray(e)?e:[e];const{length:n}=e;let s,r;const o={};for(let i=0;i`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=n?i.length>1?`since : +`+i.map(di).join(` +`):" "+di(i[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+l,D.ERR_NOT_SUPPORT)}return r}const mc={getAdapter:dp,adapters:Wr};function Ys(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vn(null,e)}function Zs(e){return Ys(e),e.headers=Pe.from(e.headers),e.data=Qs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),mc.getAdapter(e.adapter||Hn.adapter,e)(e).then(function(s){Ys(e),e.response=s;try{s.data=Qs.call(e,e.transformResponse,s)}finally{delete e.response}return s.headers=Pe.from(s.headers),s},function(s){if(!ac(s)&&(Ys(e),s&&s.response)){e.response=s.response;try{s.response.data=Qs.call(e,e.transformResponse,s.response)}finally{delete e.response}s.response.headers=Pe.from(s.response.headers)}return Promise.reject(s)})}const Ns={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ns[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const hi={};Ns.transitional=function(t,n,s){function r(o,i){return"[Axios v"+$r+"] Transitional option '"+o+"'"+i+(s?". "+s:"")}return(o,i,l)=>{if(t===!1)throw new D(r(i," has been removed"+(n?" in "+n:"")),D.ERR_DEPRECATED);return n&&!hi[i]&&(hi[i]=!0,console.warn(r(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,l):!0}};Ns.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function hp(e,t,n){if(typeof e!="object"||e===null)throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const o=s[r],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const l=e[o],c=l===void 0||i(l,o,e);if(c!==!0)throw new D("option "+o+" must be "+c,D.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new D("Unknown option "+o,D.ERR_BAD_OPTION)}}const Qn={assertOptions:hp,validators:Ns},xe=Qn.validators;let Ut=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ei,response:new ei}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const o=(()=>{if(!r.stack)return"";const i=r.stack.indexOf(` +`);return i===-1?"":r.stack.slice(i+1)})();try{if(!s.stack)s.stack=o;else if(o){const i=o.indexOf(` +`),l=i===-1?-1:o.indexOf(` +`,i+1),c=l===-1?"":o.slice(l+1);String(s.stack).endsWith(c)||(s.stack+=` +`+o)}}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ht(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&Qn.assertOptions(s,{silentJSONParsing:xe.transitional(xe.boolean),forcedJSONParsing:xe.transitional(xe.boolean),clarifyTimeoutError:xe.transitional(xe.boolean),legacyInterceptorReqResOrdering:xe.transitional(xe.boolean),advertiseZstdAcceptEncoding:xe.transitional(xe.boolean),validateStatusUndefinedResolves:xe.transitional(xe.boolean)},!1),r!=null&&(m.isFunction(r)?n.paramsSerializer={serialize:r}:Qn.assertOptions(r,{encode:xe.function,serialize:xe.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Qn.assertOptions(n,{baseUrl:xe.spelling("baseURL"),withXsrfToken:xe.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&m.merge(o.common,o[n.method]);o&&m.forEach(["delete","get","head","post","put","patch","query","common"],C=>{delete o[C]}),n.headers=Pe.concat(i,o);const l=[];let c=!0;this.interceptors.request.forEach(function(O){if(typeof O.runWhen=="function"&&O.runWhen(n)===!1)return;c=c&&O.synchronous;const x=n.transitional||kr;x&&x.legacyInterceptorReqResOrdering?l.unshift(O.fulfilled,O.rejected):l.push(O.fulfilled,O.rejected)});const u=[];this.interceptors.response.forEach(function(O){u.push(O.fulfilled,O.rejected)});let a,f=0,p;if(!c){const C=[Zs.bind(this),void 0];for(C.unshift(...l),C.push(...u),p=C.length,a=Promise.resolve(n);fZs.call(this,g)))}catch(b){a=Promise.reject(b)}break}}if(!a)try{a=Zs.call(this,g)}catch(C){a=Promise.reject(C)}for(f=0,p=u.length;f{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](r);s._listeners=null}),this.promise.then=r=>{let o;const i=new Promise(l=>{s.subscribe(l),o=l}).then(r);return i.cancel=function(){s.unsubscribe(o)},i},t(function(o,i,l){s.reason||(s.reason=new Vn(o,i,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new gc(function(r){t=r}),cancel:t}}};function mp(e){return function(n){return e.apply(null,n)}}function gp(e){return m.isObject(e)&&e.isAxiosError===!0}const br={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(br).forEach(([e,t])=>{br[t]=e});function yc(e){const t=new Ut(e),n=Kl(Ut.prototype.request,t);return m.extend(n,Ut.prototype,t,{allOwnKeys:!0}),m.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return yc(Ht(e,r))},n}const me=yc(Hn);me.Axios=Ut;me.CanceledError=Vn;me.CancelToken=pp;me.isCancel=ac;me.VERSION=$r;me.toFormData=Ts;me.AxiosError=D;me.Cancel=me.CanceledError;me.all=function(t){return Promise.all(t)};me.spread=mp;me.isAxiosError=gp;me.mergeConfig=Ht;me.AxiosHeaders=Pe;me.formToJSON=e=>cc(m.isHTMLForm(e)?new FormData(e):e);me.getAdapter=mc.getAdapter;me.HttpStatusCode=br;me.default=me;const{Axios:Lp,AxiosError:Fp,CanceledError:Mp,isCancel:Up,CancelToken:jp,VERSION:Bp,all:Hp,Cancel:Vp,isAxiosError:kp,spread:qp,toFormData:$p,AxiosHeaders:Wp,HttpStatusCode:Kp,formToJSON:Gp,getAdapter:zp,mergeConfig:Jp,create:Xp}=me,mn=me.create({baseURL:"/api",timeout:3e4,headers:{"Content-Type":"application/json"}});mn.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem("admin_token"),window.location.href="/admin/login"),Promise.reject(e)});const yp=Yu("auth",()=>{const e=bn(localStorage.getItem("admin_token")),t=bn(!1),n=bn(null),s=Be(()=>!!e.value);async function r(l){var c,u,a;t.value=!0,n.value=null;try{const f=await mn.post("/api/v1/admin/login",{admin_token:l});return e.value=f.data.token,localStorage.setItem("admin_token",f.data.token),mn.defaults.headers.common.Authorization=`Bearer ${f.data.token}`,!0}catch(f){return n.value=((a=(u=(c=f.response)==null?void 0:c.data)==null?void 0:u.error)==null?void 0:a.message)||"Login failed",!1}finally{t.value=!1}}function o(){e.value=null,localStorage.removeItem("admin_token"),delete mn.defaults.headers.common.Authorization}function i(){e.value&&(mn.defaults.headers.common.Authorization=`Bearer ${e.value}`)}return{token:e,loading:t,error:n,isAuthenticated:s,login:r,logout:o,init:i}}),_p=[{path:"/admin/login",name:"Login",component:()=>$t(()=>import("./Login-CTXEj7l9.js"),__vite__mapDeps([0,1,2])),meta:{guest:!0}},{path:"/admin/",component:()=>$t(()=>import("./Layout-9-JcwyxV.js"),__vite__mapDeps([3,2,1,4])),meta:{requiresAuth:!0},children:[{path:"",name:"Dashboard",component:()=>$t(()=>import("./Dashboard-Dx0SCBU1.js"),__vite__mapDeps([5,2,4,1]))},{path:"keys",name:"ApiKeys",component:()=>$t(()=>import("./ApiKeys-CKKTuRxD.js"),__vite__mapDeps([6,7,2]))},{path:"models",name:"Models",component:()=>$t(()=>import("./Models-DBqDIbsA.js"),__vite__mapDeps([8,7,2]))},{path:"usage",name:"Usage",component:()=>$t(()=>import("./Usage-CzJnYH5a.js"),[])}]},{path:"/:pathMatch(.*)*",redirect:"/admin/"}],_c=id({history:Bf("/admin"),routes:_p});_c.beforeEach((e,t,n)=>{const s=yp();e.meta.requiresAuth&&!s.isAuthenticated?n({name:"Login"}):e.meta.guest&&s.isAuthenticated?n({name:"Dashboard"}):n()});const bp=Lr({__name:"App",setup(e){return(t,n)=>(yl(),El(vt(Wl)))}}),Kr=qu(bp);Kr.use(Ku());Kr.use(_c);Kr.mount("#app");export{En as A,Xc as B,mu as C,Yi as D,ee as E,dt as F,bs as G,ws as H,vp as I,Rr as J,Wl as R,Rl as a,ke as b,Sp as c,Lr as d,vt as e,Ep as f,Op as g,Pp as h,Rp as i,aa as j,nd as k,Tp as l,El as m,Sr as n,yl as o,wp as p,Ea as q,bn as r,mn as s,Tc as t,yp as u,Ap as v,Cp as w,ru as x,xp as y,xl as z}; diff --git a/internal/web/dist/assets/key-D7ygKuN6.js b/internal/web/dist/assets/key-D7ygKuN6.js new file mode 100644 index 0000000..7d64b14 --- /dev/null +++ b/internal/web/dist/assets/key-D7ygKuN6.js @@ -0,0 +1,6 @@ +import{c}from"./createLucideIcon-CUrbWv4G.js";/** + * @license lucide-vue-next v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const a=c("KeyIcon",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);export{a as K}; diff --git a/internal/web/dist/assets/plus-Bfa9PGWP.js b/internal/web/dist/assets/plus-Bfa9PGWP.js new file mode 100644 index 0000000..d90291d --- /dev/null +++ b/internal/web/dist/assets/plus-Bfa9PGWP.js @@ -0,0 +1,6 @@ +import{c as e}from"./createLucideIcon-CUrbWv4G.js";/** + * @license lucide-vue-next v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const a=e("PlusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);export{a as P}; diff --git a/internal/web/dist/index.html b/internal/web/dist/index.html new file mode 100644 index 0000000..e4c1cb3 --- /dev/null +++ b/internal/web/dist/index.html @@ -0,0 +1,17 @@ + + + + + + + LlamaLink Admin + + + + + + + +
+ + diff --git a/internal/web/web.go b/internal/web/web.go new file mode 100644 index 0000000..09e453b --- /dev/null +++ b/internal/web/web.go @@ -0,0 +1,25 @@ +package web + +import ( + "embed" + "io/fs" + "net/http" + "path" +) + +//go:embed all:dist +var distFS embed.FS + +func FileSystem() http.FileSystem { + sub, _ := fs.Sub(distFS, "dist") + return http.FS(sub) +} + +func Index() ([]byte, error) { + return distFS.ReadFile("dist/index.html") +} + +func ServeAsset(filepath string) ([]byte, error) { + fullPath := path.Join("dist/assets", filepath) + return distFS.ReadFile(fullPath) +}