contentrain 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +168 -0
- package/dist/context-An3xrvcP.mjs +50 -0
- package/dist/diff-otz0kGqT.mjs +116 -0
- package/dist/doctor-DyKjAIKH.mjs +187 -0
- package/dist/generate-DDEDRLdy.mjs +76 -0
- package/dist/index.mjs +21 -0
- package/dist/init-D5L_7bKE.mjs +415 -0
- package/dist/serve-CaCZMeHF.mjs +111 -0
- package/dist/serve-ui/assets/AgentPromptGroup.vue_vue_type_script_setup_true_lang-Dy-5bpEY.js +16 -0
- package/dist/serve-ui/assets/AppLayout-CJFq2ApF.js +16 -0
- package/dist/serve-ui/assets/BranchDetailPage-DzSu3JlE.js +17 -0
- package/dist/serve-ui/assets/BranchesPage-ZSG-l44J.js +6 -0
- package/dist/serve-ui/assets/CollapsibleTrigger.vue_vue_type_script_setup_true_lang-C4oejwcu.js +1 -0
- package/dist/serve-ui/assets/Collection-zzx9pNd2.js +6 -0
- package/dist/serve-ui/assets/ConfigProvider-BGjDLViI.js +1 -0
- package/dist/serve-ui/assets/ContentListPage-DTFaQB8N.js +51 -0
- package/dist/serve-ui/assets/ContentListPage-vXxAeSg8.css +1 -0
- package/dist/serve-ui/assets/ContentPage-4sQsAlY2.js +1 -0
- package/dist/serve-ui/assets/DashboardPage-CZDlnvAE.js +21 -0
- package/dist/serve-ui/assets/DialogTitle.vue_vue_type_script_setup_true_lang-CBu_dmA6.js +1 -0
- package/dist/serve-ui/assets/Input.vue_vue_type_script_setup_true_lang-otPltlZG.js +6 -0
- package/dist/serve-ui/assets/ModelDetailPage-BMquKCtH.js +49 -0
- package/dist/serve-ui/assets/ModelsPage-C_K-aWXf.js +1 -0
- package/dist/serve-ui/assets/NormalizePage-CHkT6yLV.js +11 -0
- package/dist/serve-ui/assets/PageHeader.vue_vue_type_script_setup_true_lang-C7aWxNSw.js +11 -0
- package/dist/serve-ui/assets/Presence-cbB6AqkQ.js +3 -0
- package/dist/serve-ui/assets/Separator.vue_vue_type_script_setup_true_lang-fePFl24S.js +1 -0
- package/dist/serve-ui/assets/StudioHint.vue_vue_type_script_setup_true_lang-B45TG2r1.js +6 -0
- package/dist/serve-ui/assets/TrustBadge.vue_vue_type_script_setup_true_lang-CgoQGS6k.js +11 -0
- package/dist/serve-ui/assets/ValidatePage-BW8DO6WC.js +21 -0
- package/dist/serve-ui/assets/arrow-down-DqOfGL7C.js +6 -0
- package/dist/serve-ui/assets/arrow-left-BRvgeveW.js +6 -0
- package/dist/serve-ui/assets/book-marked-D8StxRZP.js +6 -0
- package/dist/serve-ui/assets/book-open-BrGAe3tk.js +6 -0
- package/dist/serve-ui/assets/box-7olVZr5D.js +6 -0
- package/dist/serve-ui/assets/chevron-down-B9YdCtsj.js +6 -0
- package/dist/serve-ui/assets/chevron-right-DFKsmZVd.js +6 -0
- package/dist/serve-ui/assets/content-BQE3NEm5.js +1 -0
- package/dist/serve-ui/assets/database-BGEFn4Oq.js +6 -0
- package/dist/serve-ui/assets/file-code-BGiS4dun.js +6 -0
- package/dist/serve-ui/assets/file-text-BDHXQ95W.js +6 -0
- package/dist/serve-ui/assets/getActiveElement-FUKBWQwh.js +1 -0
- package/dist/serve-ui/assets/git-branch-DdE7bk9-.js +6 -0
- package/dist/serve-ui/assets/git-merge-iStuJS69.js +6 -0
- package/dist/serve-ui/assets/hash-B-ibLpM1.js +6 -0
- package/dist/serve-ui/assets/index-C-RjMzFm.css +1 -0
- package/dist/serve-ui/assets/index-CoUshYEB.js +80 -0
- package/dist/serve-ui/assets/index-WHgvdYOs.js +1 -0
- package/dist/serve-ui/assets/languages-BTcd2Rl1.js +6 -0
- package/dist/serve-ui/assets/model-empty-state-B6AM4bil.js +1 -0
- package/dist/serve-ui/assets/plus-D8Nd3YnG.js +11 -0
- package/dist/serve-ui/assets/project-B1qSm0Fz.js +1 -0
- package/dist/serve-ui/assets/scan-search-DGPL_VJu.js +6 -0
- package/dist/serve-ui/assets/settings-DL-0RaxD.js +6 -0
- package/dist/serve-ui/assets/shield-check-CUL7KkSA.js +6 -0
- package/dist/serve-ui/assets/trash-2-83QhL6-T.js +11 -0
- package/dist/serve-ui/assets/useDirection-Cd3C7VdT.js +1 -0
- package/dist/serve-ui/assets/useFormatters-DgWFpsAv.js +1 -0
- package/dist/serve-ui/assets/useId-C0uR6mdj.js +1 -0
- package/dist/serve-ui/assets/useNonce-DTGvzOJz.js +1 -0
- package/dist/serve-ui/assets/useWatch-COpVIQvm.js +1 -0
- package/dist/serve-ui/favicon.svg +19 -0
- package/dist/serve-ui/for-developers-1.svg +65 -0
- package/dist/serve-ui/icon-color.svg +18 -0
- package/dist/serve-ui/index.html +17 -0
- package/dist/serve-ui/logo/color-icon-black-text.svg +65 -0
- package/dist/serve-ui/logo/color-icon-white-text.svg +61 -0
- package/dist/serve-ui/merge-1.svg +131 -0
- package/dist/serve-ui/merge-2.svg +161 -0
- package/dist/serve-ui/model-empty-state.svg +12 -0
- package/dist/serve-ui/select-data-type.svg +23 -0
- package/dist/server-DW0KXB0T.mjs +607 -0
- package/dist/status-kF5miVty.mjs +122 -0
- package/dist/ui-B5mXontH.mjs +33 -0
- package/dist/validate-DnVamp3p.mjs +155 -0
- package/package.json +66 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import{c as x,a as oe,i as ae,w as ne,p as r,j as i,e as m,q as e,u as t,F as v,y as C,z as M,b as y,A as j,B as s,g as p,x as q,s as c,h as g,r as J,o,C as re,v as le}from"./index-CoUshYEB.js";import{u as ie}from"./content-BQE3NEm5.js";import{_ as de,a as Q,E as ce}from"./PageHeader.vue_vue_type_script_setup_true_lang-C7aWxNSw.js";import{_ as ue,C as me,a as I}from"./AgentPromptGroup.vue_vue_type_script_setup_true_lang-Dy-5bpEY.js";import{_ as b}from"./index-WHgvdYOs.js";import{_ as pe}from"./Separator.vue_vue_type_script_setup_true_lang-fePFl24S.js";import{c as xe,t as G}from"./useFormatters-DgWFpsAv.js";import{d as fe}from"./useWatch-COpVIQvm.js";import{B as ge}from"./book-open-BrGAe3tk.js";import{F as ye}from"./file-code-BGiS4dun.js";import{F as A}from"./file-text-BDHXQ95W.js";import{B as he}from"./box-7olVZr5D.js";import{H as P}from"./hash-B-ibLpM1.js";import{D as ve}from"./database-BGEFn4Oq.js";import{C as be}from"./chevron-down-B9YdCtsj.js";import{C as _e}from"./chevron-right-DFKsmZVd.js";import{A as ke}from"./arrow-left-BRvgeveW.js";import{L as we}from"./languages-BTcd2Rl1.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const U=x("AsteriskIcon",[["path",{d:"M12 6v12",key:"1vza4d"}],["path",{d:"M17.196 9 6.804 15",key:"1ah31z"}],["path",{d:"m6.804 9 10.392 6",key:"1b6pxd"}]]);/**
|
|
7
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const $=x("BracesIcon",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);/**
|
|
12
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const K=x("CalendarIcon",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
17
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const ze=x("ClipboardIcon",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]);/**
|
|
22
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const F=x("ImageIcon",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
27
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const L=x("LinkIcon",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
|
|
32
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const W=x("ListIcon",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
37
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const Ce=x("ToggleLeftIcon",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]]);/**
|
|
42
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const X=x("TypeIcon",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),Me={class:"px-6 py-6 space-y-6"},je={key:0,class:"flex justify-center py-16"},Ie={class:"rounded-xl border border-border bg-card p-5"},$e={class:"flex items-start gap-4"},Le={class:"min-w-0 flex-1"},Be={class:"flex flex-wrap items-center gap-2"},De={class:"text-base font-semibold text-foreground"},Te={class:"mt-3 flex flex-wrap items-center gap-4 text-sm"},qe={class:"flex items-center gap-1.5 text-muted-foreground"},Ae={class:"font-medium text-foreground"},Fe={class:"flex items-center gap-1.5 text-muted-foreground"},Se={class:"font-medium text-foreground"},Oe={class:"flex items-center gap-2"},Ve={class:"font-medium text-foreground"},Ne={key:0},Ee={class:"mb-3 text-sm font-medium text-muted-foreground"},He={class:"ml-1 text-xs text-muted-foreground/60"},Re={class:"space-y-2"},Je={class:"min-w-0 flex-1"},Qe={class:"font-mono text-sm font-medium text-foreground"},Ge={class:"flex w-16 shrink-0 justify-end"},Pe={key:0,class:"inline-flex items-center gap-0.5 text-xs font-medium text-status-warning"},Ue={key:1,class:"text-xs text-muted-foreground/40"},Ke={class:"hidden w-32 shrink-0 justify-end sm:flex"},We={key:0,class:"max-w-full truncate rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground"},Xe={key:1},Ye={class:"mb-3 text-sm font-medium text-muted-foreground"},Ze={class:"ml-1 text-xs text-muted-foreground/60"},et={class:"space-y-2"},tt={class:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground"},st={class:"min-w-0 flex-1"},ot={class:"font-mono text-sm text-muted-foreground"},at={class:"flex w-16 shrink-0 justify-end"},nt={key:0,class:"inline-flex items-center gap-0.5 text-xs text-muted-foreground"},rt={key:1,class:"text-xs text-muted-foreground/40"},lt={class:"hidden w-32 shrink-0 justify-end sm:flex"},it={key:0,class:"max-w-full truncate rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground"},dt={class:"mb-3 text-sm font-medium text-muted-foreground"},ct={class:"relative rounded-xl border border-border bg-muted/30 p-4"},ut={class:"overflow-x-auto font-mono text-xs leading-relaxed text-foreground"},mt={key:2},pt={key:0,class:"rounded-xl border border-border bg-muted/30 p-4"},xt={class:"max-h-80 overflow-auto font-mono text-xs leading-relaxed text-foreground"},qt=oe({__name:"ModelDetailPage",setup(ft){const u=fe("serve-ui-texts").locale("en").get(),Y=le(),S=re(),_=ie(),f=g(()=>Y.params.modelId),n=g(()=>_.modelDescription),k=J(!1),B=J(!1),w=g(()=>{var l;return(l=n.value)!=null&&l.fields?Object.entries(n.value.fields).map(([d,h])=>Object.assign({name:d},h)):[]}),D=g(()=>w.value.filter(l=>!O(l.name))),T=g(()=>w.value.filter(l=>O(l.name)));function O(l){return["ID","createdAt","updatedAt","status","slug"].includes(l)}const V=g(()=>n.value?`import { createQuery } from '#contentrain'
|
|
47
|
+
|
|
48
|
+
const ${n.value.id} = await createQuery('${n.value.id}')
|
|
49
|
+
.getAll()`:""),N=g(()=>{var l,d;return(d=(l=n.value)==null?void 0:l.stats)!=null&&d.locales?Object.entries(n.value.stats.locales).map(([h,z])=>({locale:h,count:z})):[]}),E=g(()=>{var l;if(!((l=n.value)!=null&&l.sample))return null;try{return JSON.stringify(n.value.sample,null,2)}catch{return null}}),Z={collection:he,singleton:A,document:ye,dictionary:ge},ee={collection:"bg-primary/10 text-primary",singleton:"bg-sky-500/10 text-sky-600",document:"bg-emerald-500/10 text-emerald-600",dictionary:"bg-amber-500/10 text-amber-600"},te={collection:"bg-primary/10 text-primary border-primary/20",singleton:"bg-sky-500/10 text-sky-600 border-sky-500/20",document:"bg-emerald-500/10 text-emerald-600 border-emerald-500/20",dictionary:"bg-amber-500/10 text-amber-600 border-amber-500/20"},H={string:X,number:P,boolean:Ce,date:K,datetime:K,image:F,file:F,video:F,relation:L,relations:L,array:W,object:$,markdown:A,richtext:A,color:$,enum:W,url:L,email:X,slug:L},R={string:"bg-blue-500/10 text-blue-600 border-blue-500/20",number:"bg-violet-500/10 text-violet-600 border-violet-500/20",boolean:"bg-emerald-500/10 text-emerald-600 border-emerald-500/20",date:"bg-orange-500/10 text-orange-600 border-orange-500/20",datetime:"bg-orange-500/10 text-orange-600 border-orange-500/20",image:"bg-pink-500/10 text-pink-600 border-pink-500/20",file:"bg-pink-500/10 text-pink-600 border-pink-500/20",video:"bg-pink-500/10 text-pink-600 border-pink-500/20",relation:"bg-amber-500/10 text-amber-600 border-amber-500/20",relations:"bg-amber-500/10 text-amber-600 border-amber-500/20",array:"bg-cyan-500/10 text-cyan-600 border-cyan-500/20",object:"bg-slate-500/10 text-slate-600 border-slate-500/20",markdown:"bg-teal-500/10 text-teal-600 border-teal-500/20",richtext:"bg-teal-500/10 text-teal-600 border-teal-500/20",enum:"bg-indigo-500/10 text-indigo-600 border-indigo-500/20"};async function se(){await xe(V.value)&&(B.value=!0,setTimeout(()=>{B.value=!1},2e3))}return ae(()=>{_.fetchModelDescription(f.value)}),ne(f,l=>{l&&_.fetchModelDescription(l)}),(l,d)=>{var h,z;return o(),r("div",null,[i(de,{title:f.value,description:((h=n.value)==null?void 0:h.description)||`${((z=n.value)==null?void 0:z.kind)??""} model`},{actions:m(()=>[i(t(Q),{variant:"ghost",size:"sm",onClick:d[0]||(d[0]=a=>t(S).push("/models"))},{default:m(()=>[i(t(ke),{class:"mr-1.5 size-4"}),c(" "+s(t(u)["model-detail.models"]),1)]),_:1}),i(t(Q),{variant:"outline",size:"sm",onClick:d[1]||(d[1]=a=>t(S).push(`/content/${f.value}`))},{default:m(()=>[i(t(ce),{class:"mr-1.5 size-3.5"}),c(" "+s(t(u)["model-detail.view-content"]),1)]),_:1})]),_:1},8,["title","description"]),e("div",Me,[t(_).loading&&!n.value?(o(),r("div",je,[...d[3]||(d[3]=[e("div",{class:"size-6 animate-spin rounded-full border-2 border-primary border-t-transparent"},null,-1)])])):n.value?(o(),r(v,{key:1},[e("div",Ie,[e("div",$e,[e("div",{class:C(t(M)("flex size-12 shrink-0 items-center justify-center rounded-xl",ee[n.value.kind]??"bg-muted text-muted-foreground"))},[(o(),y(j(Z[n.value.kind]??t(P)),{class:"size-6"}))],2),e("div",Le,[e("div",Be,[e("h2",De,s(n.value.id),1),i(t(b),{variant:"outline",class:C(t(M)("text-[10px] font-medium",te[n.value.kind]??""))},{default:m(()=>[c(s(n.value.kind),1)]),_:1},8,["class"]),i(t(b),{variant:"secondary",class:"text-[10px]"},{default:m(()=>[c(s(n.value.domain),1)]),_:1}),n.value.i18n?(o(),y(t(b),{key:0,variant:"outline",class:"text-[10px] border-sky-500/20 bg-sky-500/10 text-sky-600"},{default:m(()=>[i(t(we),{class:"mr-1 size-3"}),c(" "+s(t(u)["model-detail.i18n"]),1)]),_:1})):p("",!0)]),e("div",Te,[e("div",qe,[i(t(ve),{class:"size-3.5"}),e("span",Ae,s(n.value.stats.total_entries),1),e("span",null,s(n.value.stats.total_entries===1?"entry":"entries"),1)]),d[5]||(d[5]=e("span",{class:"size-0.5 rounded-full bg-muted-foreground/40"},null,-1)),e("div",Fe,[e("span",Se,s(w.value.length),1),e("span",null,s(w.value.length===1?"field":"fields"),1)]),N.value.length>0?(o(),r(v,{key:0},[d[4]||(d[4]=e("span",{class:"size-0.5 rounded-full bg-muted-foreground/40"},null,-1)),e("div",Oe,[(o(!0),r(v,null,q(N.value,a=>(o(),r("span",{key:a.locale,class:"inline-flex items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground"},[e("span",Ve,s(a.locale),1),c(" "+s(a.count),1)]))),128))])],64)):p("",!0)])])])]),i(ue,{title:t(u)["model-detail.ask-your-agent"]},{default:m(()=>[i(I,{prompt:`Add a 'category' field to ${f.value}`},null,8,["prompt"]),i(I,{prompt:`Update ${f.value} to support i18n`},null,8,["prompt"]),i(I,{prompt:`Delete the ${f.value} model`},null,8,["prompt"]),i(I,{prompt:`Generate 5 sample entries for ${f.value}`},null,8,["prompt"])]),_:1},8,["title"]),D.value.length>0?(o(),r("section",Ne,[e("h3",Ee,[c(s(t(u)["model-detail.fields"])+" ",1),e("span",He,"("+s(D.value.length)+")",1)]),e("div",Re,[(o(!0),r(v,null,q(D.value,a=>(o(),r("div",{key:a.name,class:"flex items-center gap-4 rounded-xl border border-border bg-card px-4 py-3 transition-colors hover:bg-accent/30"},[e("div",{class:C(t(M)("flex size-9 shrink-0 items-center justify-center rounded-lg",R[a.type]??"bg-muted text-muted-foreground"))},[(o(),y(j(H[a.type]??t($)),{class:"size-4"}))],2),e("div",Je,[e("span",Qe,s(a.name),1)]),i(t(b),{variant:"outline",class:C(t(M)("shrink-0 font-mono text-[10px]",R[a.type]??""))},{default:m(()=>[c(s(a.type),1)]),_:2},1032,["class"]),e("div",Ge,[a.required?(o(),r("span",Pe,[i(t(U),{class:"size-3"}),c(" "+s(t(u)["model-detail.req"]),1)])):(o(),r("span",Ue,"--"))]),e("div",Ke,[a.default!==void 0?(o(),r("span",We,s(t(G)(a.default,20)),1)):p("",!0)])]))),128))])])):p("",!0),T.value.length>0?(o(),r("section",Xe,[e("h3",Ye,[c(s(t(u)["model-detail.system-fields"])+" ",1),e("span",Ze,"("+s(T.value.length)+")",1)]),e("div",et,[(o(!0),r(v,null,q(T.value,a=>(o(),r("div",{key:a.name,class:"flex items-center gap-4 rounded-xl border border-border/60 bg-muted/30 px-4 py-3"},[e("div",tt,[(o(),y(j(H[a.type]??t($)),{class:"size-4"}))]),e("div",st,[e("span",ot,s(a.name),1)]),i(t(b),{variant:"secondary",class:"shrink-0 font-mono text-[10px]"},{default:m(()=>[c(s(a.type),1)]),_:2},1024),e("div",at,[a.required?(o(),r("span",nt,[i(t(U),{class:"size-3"}),c(" "+s(t(u)["model-detail.req"]),1)])):(o(),r("span",rt,"--"))]),e("div",lt,[a.default!==void 0?(o(),r("span",it,s(t(G)(a.default,20)),1)):p("",!0)])]))),128))])])):p("",!0),i(t(pe)),e("section",null,[e("h3",dt,s(t(u)["model-detail.import-snippet"]),1),e("div",ct,[e("pre",ut,[e("code",null,s(V.value),1)]),e("button",{class:"absolute right-3 top-3 rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",onClick:se},[B.value?(o(),y(t(me),{key:0,class:"size-3.5 text-status-success"})):(o(),y(t(ze),{key:1,class:"size-3.5"}))])])]),E.value?(o(),r("section",mt,[e("button",{class:"mb-3 flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",onClick:d[2]||(d[2]=a=>k.value=!k.value)},[(o(),y(j(k.value?t(be):t(_e)),{class:"size-4"})),c(" "+s(t(u)["model-detail.sample-data"]),1)]),k.value?(o(),r("div",pt,[e("pre",xt,[e("code",null,s(E.value),1)])])):p("",!0)])):p("",!0)],64)):p("",!0)])])}}});export{qt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as E}from"./model-empty-state-B6AM4bil.js";import{a as I,p as a,j as i,e as f,u as e,q as t,X as M,g as u,B as s,s as p,F as g,x as w,r as D,h as k,o as l,y as x,z as _,b as N,A as q,C as Q}from"./index-CoUshYEB.js";import{u as R}from"./project-B1qSm0Fz.js";import{_ as U}from"./PageHeader.vue_vue_type_script_setup_true_lang-C7aWxNSw.js";import{_ as X}from"./StudioHint.vue_vue_type_script_setup_true_lang-B45TG2r1.js";import{_ as O,a as y}from"./AgentPromptGroup.vue_vue_type_script_setup_true_lang-Dy-5bpEY.js";import{_ as $}from"./index-WHgvdYOs.js";import{S as B,_ as G}from"./Input.vue_vue_type_script_setup_true_lang-otPltlZG.js";import{d as J}from"./useWatch-COpVIQvm.js";import{B as K}from"./book-open-BrGAe3tk.js";import{F as W}from"./file-code-BGiS4dun.js";import{F as Y}from"./file-text-BDHXQ95W.js";import{B as Z}from"./box-7olVZr5D.js";import{H}from"./hash-B-ibLpM1.js";import{L as P}from"./languages-BTcd2Rl1.js";const ee={class:"hidden sm:inline"},te={class:"px-6 py-6 space-y-6"},se={key:0,class:"flex items-center gap-2"},oe={class:"relative flex-1"},re={key:1,class:"flex items-center justify-center py-20"},ne={key:2,class:"flex flex-col items-center py-16 text-center"},le={class:"text-lg font-semibold text-foreground"},ae={class:"mt-2 max-w-sm text-sm text-muted-foreground"},ie={key:3,class:"flex flex-col items-center py-16 text-center"},de={class:"text-lg font-semibold text-foreground"},me={class:"mt-2 text-sm text-muted-foreground"},ce={class:"font-medium"},ue={key:0,class:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-3"},pe=["onClick"],fe={class:"min-w-0 flex-1"},ge={class:"flex items-center gap-2"},xe={class:"font-medium text-foreground group-hover:text-primary transition-colors truncate"},_e={class:"mt-1.5 flex items-center gap-3 text-xs text-muted-foreground"},ve={class:"inline-flex items-center gap-1 text-sky-600"},he={class:"mb-3 flex items-center gap-2"},ye={class:"text-sm font-medium text-muted-foreground"},be={class:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-3 mb-6"},ke=["onClick"],Ce={class:"min-w-0 flex-1"},ze={class:"flex items-center gap-2"},we={class:"font-medium text-foreground group-hover:text-primary transition-colors truncate"},$e={class:"mt-1.5 flex items-center gap-3 text-xs text-muted-foreground"},Be={class:"inline-flex items-center gap-1 text-sky-600"},je={class:"flex items-center gap-4 text-xs text-muted-foreground"},Le={key:0,class:"size-0.5 rounded-full bg-muted-foreground/40"},Ve={key:1},Ge=I({__name:"ModelsPage",setup(Fe){const o=J("serve-ui-texts").locale("en").get(),C=R(),j=Q(),m=D(""),b=D(!1),v=k(()=>{var d;return((d=C.status)==null?void 0:d.models)??[]}),h=k(()=>{const d=m.value.toLowerCase().trim();return d?v.value.filter(r=>r.id.toLowerCase().includes(d)||r.domain.toLowerCase().includes(d)||r.kind.toLowerCase().includes(d)):v.value}),L=k(()=>{const d={};for(const r of h.value){const n=r.domain||"default";d[n]||(d[n]=[]),d[n].push(r)}return d}),T=k(()=>Object.keys(L.value).length>1),V={collection:Z,singleton:Y,document:W,dictionary:K},F={collection:"bg-primary/10 text-primary",singleton:"bg-sky-500/10 text-sky-600",document:"bg-emerald-500/10 text-emerald-600",dictionary:"bg-amber-500/10 text-amber-600"},S={collection:"bg-primary/10 text-primary border-primary/20",singleton:"bg-sky-500/10 text-sky-600 border-sky-500/20",document:"bg-emerald-500/10 text-emerald-600 border-emerald-500/20",dictionary:"bg-amber-500/10 text-amber-600 border-amber-500/20"};function A(){m.value="",b.value=!1}return(d,r)=>(l(),a("div",null,[i(U,{title:e(o)["models.models"],description:e(o)["models.content-model-definitions"]},{actions:f(()=>[v.value.length>0?(l(),a("button",{key:0,class:"flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",onClick:r[0]||(r[0]=n=>b.value=!b.value)},[i(e(B),{class:"size-3.5"}),t("span",ee,s(e(o)["models.search"]),1)])):u("",!0)]),_:1},8,["title","description"]),t("div",te,[b.value?(l(),a("div",se,[t("div",oe,[i(e(B),{class:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),i(e(G),{modelValue:m.value,"onUpdate:modelValue":r[1]||(r[1]=n=>m.value=n),placeholder:e(o)["models.search-models-by-name"],class:"pl-9 pr-9",autofocus:""},null,8,["modelValue","placeholder"]),m.value?(l(),a("button",{key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",onClick:r[2]||(r[2]=n=>m.value="")},[i(e(M),{class:"size-3.5"})])):u("",!0)]),t("button",{class:"shrink-0 rounded-md px-2.5 py-2 text-xs text-muted-foreground hover:bg-accent",onClick:A},s(e(o)["models.close"]),1)])):u("",!0),e(C).loading&&!e(C).status?(l(),a("div",re,[...r[4]||(r[4]=[t("div",{class:"size-6 animate-spin rounded-full border-2 border-primary border-t-transparent"},null,-1)])])):v.value.length===0?(l(),a("div",ne,[r[5]||(r[5]=t("img",{src:E,alt:"",class:"empty-illustration mb-6"},null,-1)),t("h2",le,s(e(o)["models.no-models-yet"]),1),t("p",ae,s(e(o)["models.create-content-models-using"]),1),i(O,{title:e(o)["models.ask-your-agent"],class:"mt-6 w-full max-w-md"},{default:f(()=>[i(y,{prompt:e(o)["models.create-a-blog-model"]},null,8,["prompt"]),i(y,{prompt:e(o)["models.create-a-faq-model"]},null,8,["prompt"]),i(y,{prompt:e(o)["models.scaffold-my-project-with"]},null,8,["prompt"])]),_:1},8,["title"])])):h.value.length===0&&m.value?(l(),a("div",ie,[i(e(B),{class:"mb-4 size-10 text-muted-foreground/40"}),t("h2",de,s(e(o)["models.no-models-found"]),1),t("p",me,[p(s(e(o)["models.no-models-match"]),1),t("span",ce,s(m.value),1),p(s(e(o)["models.try-a-different-search"]),1)]),t("button",{class:"mt-4 text-sm font-medium text-primary hover:underline",onClick:r[3]||(r[3]=n=>m.value="")},s(e(o)["models.clear-search"]),1)])):(l(),a(g,{key:4},[T.value?(l(!0),a(g,{key:1},w(L.value,(n,z)=>(l(),a("section",{key:z},[t("div",he,[t("h2",ye,s(z),1),i(e($),{variant:"secondary",class:"text-[10px]"},{default:f(()=>[p(s(n.length),1)]),_:2},1024)]),t("div",be,[(l(!0),a(g,null,w(n,c=>(l(),a("button",{key:c.id,class:x(e(_)("group flex items-start gap-4 rounded-xl border bg-card p-4 text-left transition-all hover:shadow-sm","border-border hover:border-primary/30")),onClick:Se=>e(j).push(`/models/${c.id}`)},[t("div",{class:x(e(_)("flex size-10 shrink-0 items-center justify-center rounded-lg",F[c.kind]??"bg-muted text-muted-foreground"))},[(l(),N(q(V[c.kind]??e(H)),{class:"size-5"}))],2),t("div",Ce,[t("div",ze,[t("span",we,s(c.id),1),i(e($),{variant:"outline",class:x(e(_)("shrink-0 text-[10px] font-medium",S[c.kind]??""))},{default:f(()=>[p(s(c.kind),1)]),_:2},1032,["class"])]),t("div",$e,[t("span",null,s(c.fields)+" "+s(e(o)["models.fields"]),1),c.i18n?(l(),a(g,{key:0},[r[8]||(r[8]=t("span",{class:"size-0.5 rounded-full bg-muted-foreground/40"},null,-1)),t("span",Be,[i(e(P),{class:"size-3"}),p(" "+s(e(o)["models.i18n"]),1)])],64)):u("",!0)])])],10,ke))),128))])]))),128)):(l(),a("div",ue,[(l(!0),a(g,null,w(h.value,n=>(l(),a("button",{key:n.id,class:x(e(_)("group flex items-start gap-4 rounded-xl border bg-card p-4 text-left transition-all hover:shadow-sm","border-border hover:border-primary/30")),onClick:z=>e(j).push(`/models/${n.id}`)},[t("div",{class:x(e(_)("flex size-10 shrink-0 items-center justify-center rounded-lg",F[n.kind]??"bg-muted text-muted-foreground"))},[(l(),N(q(V[n.kind]??e(H)),{class:"size-5"}))],2),t("div",fe,[t("div",ge,[t("span",xe,s(n.id),1),i(e($),{variant:"outline",class:x(e(_)("shrink-0 text-[10px] font-medium",S[n.kind]??""))},{default:f(()=>[p(s(n.kind),1)]),_:2},1032,["class"])]),t("div",_e,[t("span",null,s(n.fields)+" "+s(e(o)["models.fields"]),1),r[7]||(r[7]=t("span",{class:"size-0.5 rounded-full bg-muted-foreground/40"},null,-1)),t("span",null,s(n.domain),1),n.i18n?(l(),a(g,{key:0},[r[6]||(r[6]=t("span",{class:"size-0.5 rounded-full bg-muted-foreground/40"},null,-1)),t("span",ve,[i(e(P),{class:"size-3"}),p(" "+s(e(o)["models.i18n"]),1)])],64)):u("",!0)])])],10,pe))),128))])),t("div",je,[t("span",null,s(h.value.length)+" "+s(e(o)["models.model"])+s(h.value.length===1?"":"s"),1),m.value?(l(),a("span",Le)):u("",!0),m.value?(l(),a("span",Ve,s(e(o)["models.filtered-from"])+" "+s(v.value.length)+" "+s(e(o)["models.total"]),1)):u("",!0)])],64)),i(O,{title:e(o)["models.ask-your-agent"]},{default:f(()=>[i(y,{prompt:e(o)["models.create-a-new-content"]},null,8,["prompt"]),i(y,{prompt:e(o)["models.add-a-testimonials-collection"]},null,8,["prompt"])]),_:1},8,["title"]),i(X,{message:e(o)["models.create-and-manage-models"],class:"mt-4"},null,8,["message"])])]))}});export{Ge as default};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{c as Z,a as T,o as l,p as m,y as E,u as e,z as N,f as I,F as S,x as L,h as U,b as h,e as r,j as s,q as t,A as ie,B as n,s as u,g as C,w as ce,X as de,L as F,r as P,i as ue,E as B,a8 as J}from"./index-CoUshYEB.js";import{j as me,d as fe,u as pe}from"./useWatch-COpVIQvm.js";import{u as xe}from"./content-BQE3NEm5.js";import{_ as _e,S as ge,a as G}from"./PageHeader.vue_vue_type_script_setup_true_lang-C7aWxNSw.js";import{A as ee,_ as he}from"./StudioHint.vue_vue_type_script_setup_true_lang-B45TG2r1.js";import{_ as H,a as j}from"./AgentPromptGroup.vue_vue_type_script_setup_true_lang-Dy-5bpEY.js";import{_ as w}from"./index-WHgvdYOs.js";import{b as te,c as se,_ as A,d as ne,a as q}from"./CollapsibleTrigger.vue_vue_type_script_setup_true_lang-C4oejwcu.js";import{_ as W}from"./Separator.vue_vue_type_script_setup_true_lang-fePFl24S.js";import{C as ae}from"./chevron-down-B9YdCtsj.js";import{B as ve}from"./book-marked-D8StxRZP.js";import{B as ye}from"./book-open-BrGAe3tk.js";import{F as X}from"./file-code-BGiS4dun.js";import{L as ze,T as Q}from"./trash-2-83QhL6-T.js";import{A as Y}from"./arrow-down-DqOfGL7C.js";import{D as be}from"./database-BGEFn4Oq.js";import{M as ke,P as we}from"./plus-D8Nd3YnG.js";import{G as K}from"./git-merge-iStuJS69.js";import"./useId-C0uR6mdj.js";import"./Presence-cbB6AqkQ.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const $e=Z("CodeIcon",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
7
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const oe=Z("MapPinIcon",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),le=T({__name:"CardHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(g){const o=g;return(a,z)=>(l(),m("div",{"data-slot":"card-header",class:E(e(N)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",o.class))},[I(a.$slots,"default")],2))}}),re=T({__name:"CardTitle",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(g){const o=g;return(a,z)=>(l(),m("h3",{"data-slot":"card-title",class:E(e(N)("leading-none font-semibold",o.class))},[I(a.$slots,"default")],2))}}),Pe="/select-data-type.svg",je={class:"space-y-4"},Ce={class:"flex items-center gap-3"},Be={class:"font-medium text-sm font-mono"},Re={class:"divide-y divide-border"},Se=["onClick"],Me={class:"flex-1 min-w-0"},Ae={class:"text-sm font-medium text-foreground truncate"},Ee={class:"flex items-center gap-2 mt-1 flex-wrap"},Fe={class:"font-mono text-xs text-muted-foreground"},Ne={class:"font-mono text-xs text-primary"},Le=T({__name:"ExtractionReviewPanel",props:{models:{},extractions:{},selectedModels:{}},emits:["select-extraction"],setup(g,{emit:o}){const a=g,z=o,v={collection:{icon:ze,color:"text-blue-500",bg:"bg-blue-500/10"},singleton:{icon:X,color:"text-teal-500",bg:"bg-teal-500/10"},document:{icon:ye,color:"text-green-500",bg:"bg-green-500/10"},dictionary:{icon:ve,color:"text-amber-500",bg:"bg-amber-500/10"}};function x(f){return v[f]??v.collection}const b=U(()=>{const f=new Map;for(const i of a.extractions)f.has(i.model)||f.set(i.model,[]),f.get(i.model).push(i);return[...f.entries()].toSorted((i,_)=>_[1].length-i[1].length)});function p(f){return a.models.find(i=>i.id===f)}function $(f){return a.selectedModels.has(f)}return(f,i)=>(l(),m("div",je,[(l(!0),m(S,null,L(b.value,([_,R])=>(l(),h(e(ne),{key:_,"default-open":b.value.length<=5},{default:r(()=>[s(e(A),{class:E(e(N)(!$(_)&&"opacity-50"))},{default:r(()=>[s(e(te),{class:"flex w-full items-center justify-between p-4 hover:bg-muted/50 transition-colors rounded-t-lg"},{default:r(()=>{var y,M,D,V;return[t("div",Ce,[t("div",{class:E(e(N)("flex size-8 items-center justify-center rounded-md",x(((y=p(_))==null?void 0:y.kind)??"collection").bg))},[(l(),h(ie(x(((M=p(_))==null?void 0:M.kind)??"collection").icon),{class:E(e(N)("size-4",x(((D=p(_))==null?void 0:D.kind)??"collection").color))},null,8,["class"]))],2),t("span",Be,n(_),1),s(e(w),{variant:"secondary",class:"text-[10px]"},{default:r(()=>[u(n(R.length)+" strings",1)]),_:2},1024),(V=p(_))!=null&&V.domain?(l(),h(e(w),{key:0,variant:"outline",class:"text-[10px]"},{default:r(()=>{var c;return[u(n((c=p(_))==null?void 0:c.domain),1)]}),_:2},1024)):C("",!0)]),s(e(ae),{class:"size-4 text-muted-foreground transition-transform"})]}),_:2},1024),s(e(se),null,{default:r(()=>[s(e(W)),t("div",Re,[(l(!0),m(S,null,L(R,(y,M)=>(l(),m("button",{key:M,class:"flex w-full items-start gap-3 p-4 text-left hover:bg-muted/30 transition-colors",onClick:D=>z("select-extraction",y)},[s(e(oe),{class:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),t("div",Me,[t("p",Ae,'"'+n(y.value)+'"',1),t("div",Ee,[t("span",Fe,n(y.file),1),s(e(w),{variant:"outline",class:"text-[10px]"},{default:r(()=>[u("L"+n(y.line),1)]),_:2},1024),s(e(ee),{class:"size-3 text-muted-foreground"}),t("span",Ne,n(y.model)+"."+n(y.field),1),y.locale?(l(),h(e(w),{key:0,variant:"secondary",class:"text-[10px]"},{default:r(()=>[u(n(y.locale),1)]),_:2},1024)):C("",!0)])])],8,Se))),128))])]),_:2},1024)]),_:2},1032,["class"])]),_:2},1032,["default-open"]))),128))]))}}),Te={class:"flex items-center justify-between"},De={class:"flex items-center gap-2 mb-2"},qe={class:"flex size-6 items-center justify-center rounded bg-blue-500/10"},Ve={class:"font-mono text-xs text-muted-foreground"},Oe={key:0,class:"flex items-center justify-center py-4"},Ge={key:1,class:"rounded-md border bg-muted/30 overflow-hidden font-mono text-xs"},He={class:"w-8 shrink-0 text-right text-muted-foreground/50 select-none"},Ke={class:"flex justify-center"},Ue={class:"flex items-center gap-2 mb-2"},We={class:"flex size-6 items-center justify-center rounded bg-emerald-500/10"},Xe={class:"rounded-md border bg-muted/30 p-3"},Je={class:"flex items-center gap-2 flex-wrap"},Qe={class:"font-mono text-xs text-primary"},Ye={class:"text-xs text-foreground"},Ze={class:"flex justify-center"},Ie={class:"flex items-center gap-2 mb-2"},et={class:"flex size-6 items-center justify-center rounded bg-violet-500/10"},tt={class:"rounded-md border overflow-hidden font-mono text-xs"},st={class:"flex gap-3 px-3 py-1.5 bg-red-500/5 text-red-600 dark:text-red-400 line-through"},nt={class:"flex gap-3 px-3 py-1.5 bg-green-500/5 text-green-600 dark:text-green-400"},at=T({__name:"SourceTracePanel",props:{extraction:{},patches:{}},emits:["close"],setup(g,{emit:o}){const a=g,z=o,v=me(),x=P([]),b=P(0),p=P(!1);function $(){return a.extraction?a.patches.find(f=>f.file===a.extraction.file&&f.line===a.extraction.line):null}return ce(()=>a.extraction,async f=>{if(!f){x.value=[];return}p.value=!0;try{const i=await v.get(`/normalize/file-context?file=${encodeURIComponent(f.file)}&line=${f.line}&range=4`);x.value=i.lines,b.value=i.highlight}catch{x.value=[]}finally{p.value=!1}},{immediate:!0}),(f,i)=>g.extraction?(l(),h(e(A),{key:0,class:"border-primary/20"},{default:r(()=>[s(e(le),{class:"pb-3"},{default:r(()=>[t("div",Te,[s(e(re),{class:"text-sm"},{default:r(()=>[...i[1]||(i[1]=[u("Source Trace",-1)])]),_:1}),t("button",{class:"rounded-md p-1 hover:bg-muted transition-colors",onClick:i[0]||(i[0]=_=>z("close"))},[s(e(de),{class:"size-4 text-muted-foreground"})])])]),_:1}),s(e(q),{class:"space-y-4"},{default:r(()=>[t("div",null,[t("div",De,[t("div",qe,[s(e(X),{class:"size-3.5 text-blue-500"})]),i[2]||(i[2]=t("span",{class:"text-xs font-medium text-foreground"},"Source File",-1)),t("span",Ve,n(g.extraction.file)+":"+n(g.extraction.line),1)]),p.value?(l(),m("div",Oe,[s(e(F),{class:"size-4 animate-spin text-muted-foreground"})])):x.value.length>0?(l(),m("div",Ge,[(l(!0),m(S,null,L(x.value,_=>(l(),m("div",{key:_.num,class:E(e(N)("flex gap-3 px-3 py-0.5",_.num===b.value&&"bg-primary/10 border-l-2 border-primary"))},[t("span",He,n(_.num),1),t("span",{class:E(["whitespace-pre overflow-x-auto",_.num===b.value&&"text-foreground font-medium"])},n(_.content),3)],2))),128))])):C("",!0)]),t("div",Ke,[s(e(Y),{class:"size-5 text-muted-foreground"})]),t("div",null,[t("div",Ue,[t("div",We,[s(e(be),{class:"size-3.5 text-emerald-500"})]),i[3]||(i[3]=t("span",{class:"text-xs font-medium text-foreground"},"Content Entry",-1))]),t("div",Xe,[t("div",Je,[s(e(w),{variant:"secondary",class:"font-mono text-[10px]"},{default:r(()=>[u(n(g.extraction.model),1)]),_:1}),s(e(ee),{class:"size-3 text-muted-foreground"}),t("span",Qe,n(g.extraction.field),1),i[4]||(i[4]=t("span",{class:"text-xs text-muted-foreground"},"=",-1)),t("span",Ye,'"'+n(g.extraction.value)+'"',1),g.extraction.locale?(l(),h(e(w),{key:0,variant:"outline",class:"text-[10px]"},{default:r(()=>[u(n(g.extraction.locale),1)]),_:1})):C("",!0)])])]),$()?(l(),m(S,{key:0},[t("div",Ze,[s(e(Y),{class:"size-5 text-muted-foreground"})]),t("div",null,[t("div",Ie,[t("div",et,[s(e($e),{class:"size-3.5 text-violet-500"})]),i[5]||(i[5]=t("span",{class:"text-xs font-medium text-foreground"},"Reuse Patch",-1))]),t("div",tt,[t("div",st,[i[6]||(i[6]=t("span",{class:"w-6 shrink-0 text-right select-none"},"-",-1)),t("span",null,n($().old_value),1)]),t("div",nt,[i[7]||(i[7]=t("span",{class:"w-6 shrink-0 text-right select-none"},"+",-1)),t("span",null,n($().new_expression),1)])])])],64)):C("",!0)]),_:1})]),_:1})):C("",!0)}}),ot={class:"space-y-3"},lt={class:"flex items-center gap-2"},rt={class:"font-mono text-xs text-foreground"},it={class:"divide-y divide-border"},ct={class:"flex items-center gap-2 mb-2"},dt={class:"rounded-md border overflow-hidden font-mono text-xs"},ut={class:"flex items-start gap-2 px-3 py-1.5 bg-red-500/5"},mt={class:"text-red-600 dark:text-red-400 line-through whitespace-pre-wrap break-all"},ft={class:"flex items-start gap-2 px-3 py-1.5 bg-green-500/5"},pt={class:"text-green-600 dark:text-green-400 whitespace-pre-wrap break-all"},xt=T({__name:"PatchPreviewPanel",props:{patches:{}},setup(g){const o=g,a=U(()=>{const z=new Map;for(const v of o.patches)z.has(v.file)||z.set(v.file,[]),z.get(v.file).push(v);return[...z.entries()].toSorted((v,x)=>x[1].length-v[1].length)});return(z,v)=>(l(),m("div",ot,[(l(!0),m(S,null,L(a.value,([x,b])=>(l(),h(e(ne),{key:x,"default-open":a.value.length<=5},{default:r(()=>[s(e(A),null,{default:r(()=>[s(e(te),{class:"flex w-full items-center justify-between p-3 hover:bg-muted/50 transition-colors rounded-t-lg"},{default:r(()=>[t("div",lt,[s(e(X),{class:"size-4 text-muted-foreground"}),t("span",rt,n(x),1),s(e(w),{variant:"secondary",class:"text-[10px]"},{default:r(()=>[u(n(b.length),1)]),_:2},1024)]),s(e(ae),{class:"size-4 text-muted-foreground transition-transform"})]),_:2},1024),s(e(se),null,{default:r(()=>[s(e(W)),t("div",it,[(l(!0),m(S,null,L(b,(p,$)=>(l(),m("div",{key:$,class:"p-3"},[t("div",ct,[s(e(w),{variant:"outline",class:"text-[10px]"},{default:r(()=>[u("L"+n(p.line),1)]),_:2},1024)]),t("div",dt,[t("div",ut,[s(e(ke),{class:"mt-0.5 size-3 shrink-0 text-red-500"}),t("span",mt,n(p.old_value),1)]),t("div",ft,[s(e(we),{class:"mt-0.5 size-3 shrink-0 text-green-500"}),t("span",pt,n(p.new_expression),1)])])]))),128))])]),_:2},1024)]),_:2},1024)]),_:2},1032,["default-open"]))),128))]))}}),_t={class:"px-6 py-6"},gt={key:0,class:"flex justify-center py-12"},ht={key:1,class:"space-y-8"},vt={class:"flex flex-col items-center py-12 text-center"},yt={class:"text-xl font-semibold"},zt={class:"mt-2 max-w-md text-sm text-muted-foreground"},bt={class:"mx-auto max-w-2xl"},kt={class:"space-y-4"},wt={class:"flex items-start gap-4"},$t={class:"text-sm font-medium"},Pt={class:"text-xs text-muted-foreground mt-0.5"},jt={class:"flex items-start gap-4"},Ct={class:"text-sm font-medium"},Bt={class:"text-xs text-muted-foreground mt-0.5"},Rt={class:"flex items-start gap-4"},St={class:"text-sm font-medium"},Mt={class:"text-xs text-muted-foreground mt-0.5"},At={class:"flex items-start gap-4"},Et={class:"text-sm font-medium"},Ft={class:"text-xs text-muted-foreground mt-0.5"},Nt={key:2,class:"space-y-6"},Lt={class:"text-sm font-semibold"},Tt={class:"text-xs text-muted-foreground mt-0.5"},Dt={class:"flex items-center gap-2"},qt={class:"max-w-md"},Vt={class:"text-foreground tabular-nums"},Ot={class:"text-foreground tabular-nums"},Gt={class:"text-foreground tabular-nums"},Ht={class:"text-foreground tabular-nums"},Kt={class:"text-foreground tabular-nums"},Ut={class:"grid grid-cols-1 lg:grid-cols-2 gap-4"},Wt={class:"text-sm font-semibold text-foreground mb-3"},Xt={class:"text-sm font-semibold text-foreground mb-3"},Jt={key:1,class:"flex flex-col items-center justify-center rounded-xl border border-dashed border-border py-12 text-center"},Qt={class:"text-xs text-muted-foreground"},Yt={key:1},Zt={class:"text-sm font-semibold text-foreground mb-3"},It={key:3,class:"space-y-6"},es={class:"flex flex-col items-center py-6 text-center"},ts={class:"flex size-14 items-center justify-center rounded-full bg-status-info/10 mb-4"},ss={class:"text-lg font-semibold"},ns={class:"mt-1 text-sm text-muted-foreground"},as={class:"space-y-3 max-w-2xl mx-auto"},os={class:"font-mono text-xs text-foreground flex-1 truncate"},ls={class:"max-w-2xl mx-auto"},rs={key:4,class:"space-y-8"},is={class:"flex flex-col items-center py-12 text-center"},cs={class:"flex size-16 items-center justify-center rounded-full bg-status-success/10 mb-4"},ds={class:"max-w-2xl mx-auto space-y-4"},Ss=T({__name:"NormalizePage",setup(g){const o=xe(),a=fe("serve-ui-texts").locale("en").get(),z=U(()=>{var c,d;return o.normalizePlan?"plan":(d=(c=o.normalizeResults)==null?void 0:c.pendingBranches)!=null&&d.length?"branches":M.value?"done":"empty"}),v=P(null),x=P(new Set),b=P(!1),p=P(!1),$=P(!1);function f(c){v.value=c}async function i(){b.value=!0;try{const c=x.value.size?[...x.value]:void 0;await o.approvePlan(c),B.success("Plan approved — extraction branch created. Review and merge below.",{duration:6e3}),await Promise.all([o.fetchNormalizePlan(),o.fetchNormalizeResults()])}catch(c){B.error(c instanceof Error?c.message:"Failed to approve plan")}finally{b.value=!1}}async function _(){p.value=!0;try{await o.rejectPlan(),o.normalizePlan=null,B.success("Plan rejected")}catch(c){B.error(c instanceof Error?c.message:"Failed to reject plan")}finally{p.value=!1}}const R=P(null),y=P(null),M=P(!1);async function D(c){var d,k;R.value=c;try{await o.approveBranch(c),await o.fetchNormalizeResults(),B.success("Branch merged — tell your agent to continue with Phase 2",{duration:6e3}),(k=(d=o.normalizeResults)==null?void 0:d.pendingBranches)!=null&&k.length||(M.value=!0)}catch(O){B.error(O instanceof Error?O.message:"Failed to merge branch")}finally{R.value=null}}async function V(c){y.value=c;try{await o.rejectBranch(c),await o.fetchNormalizeResults(),B.success("Branch deleted successfully")}catch(d){B.error(d instanceof Error?d.message:"Failed to delete branch")}finally{y.value=null}}return pe(c=>{c.type==="normalize:plan-updated"&&o.fetchNormalizePlan(),(c.type==="branch:created"||c.type==="branch:merged")&&o.fetchNormalizeResults()}),ue(async()=>{$.value=!0;try{if(await Promise.all([o.fetchNormalizePlan(),o.fetchNormalizeResults()]),o.normalizePlan)for(const c of o.normalizePlan.models)x.value.add(c.id)}catch(c){B.error(c instanceof Error?c.message:"Failed to load normalize data")}finally{$.value=!1}}),(c,d)=>(l(),m("div",null,[s(_e,{title:e(a)["normalize.normalize"],description:e(a)["normalize.content-extraction-and-i18n"]},null,8,["title","description"]),t("div",_t,[$.value?(l(),m("div",gt,[s(e(F),{class:"size-5 animate-spin text-muted-foreground"})])):z.value==="empty"?(l(),m("div",ht,[t("div",vt,[d[1]||(d[1]=t("img",{src:Pe,alt:"",class:"empty-illustration mb-6"},null,-1)),t("h2",yt,n(e(a)["normalize.extract-hardcoded-strings"]),1),t("p",zt,n(e(a)["normalize.normalize-scans-your-source"]),1)]),t("div",bt,[s(H,{title:e(a)["normalize.ask-your-ai-agent"]},{default:r(()=>[s(j,{prompt:e(a)["normalize.normalize-my-vue-project"]},null,8,["prompt"]),s(j,{prompt:e(a)["normalize.scan-srcpages-for-content"]},null,8,["prompt"]),s(j,{prompt:e(a)["normalize.extract-hero-section-text"]},null,8,["prompt"]),s(j,{prompt:e(a)["normalize.make-my-landing-page"]},null,8,["prompt"])]),_:1},8,["title"])]),s(e(A),{class:"mx-auto max-w-2xl"},{default:r(()=>[s(e(le),{class:"pb-3"},{default:r(()=>[s(e(re),{class:"text-sm font-medium flex items-center gap-2"},{default:r(()=>[s(e(ge),{class:"size-4 text-primary"}),u(" "+n(e(a)["normalize.how-it-works"]),1)]),_:1})]),_:1}),s(e(W)),s(e(q),{class:"pt-4"},{default:r(()=>[t("div",kt,[t("div",wt,[s(e(w),{variant:"secondary",class:"mt-0.5 shrink-0 size-7 flex items-center justify-center rounded-full font-mono text-xs"},{default:r(()=>[...d[2]||(d[2]=[u("1",-1)])]),_:1}),t("div",null,[t("p",$t,n(e(a)["normalize.prompt-your-ai-agent"]),1),t("p",Pt,n(e(a)["normalize.copy-a-prompt-above"]),1)])]),t("div",jt,[s(e(w),{variant:"secondary",class:"mt-0.5 shrink-0 size-7 flex items-center justify-center rounded-full font-mono text-xs"},{default:r(()=>[...d[3]||(d[3]=[u("2",-1)])]),_:1}),t("div",null,[t("p",Ct,n(e(a)["normalize.review-the-plan-here"]),1),t("p",Bt,n(e(a)["normalize.the-agent-sends-the"]),1)])]),t("div",Rt,[s(e(w),{variant:"secondary",class:"mt-0.5 shrink-0 size-7 flex items-center justify-center rounded-full font-mono text-xs"},{default:r(()=>[...d[4]||(d[4]=[u("3",-1)])]),_:1}),t("div",null,[t("p",St,n(e(a)["normalize.approve-or-request-changes"]),1),t("p",Mt,n(e(a)["normalize.approve-to-write-extractions"]),1)])]),t("div",At,[s(e(w),{variant:"secondary",class:"mt-0.5 shrink-0 size-7 flex items-center justify-center rounded-full font-mono text-xs"},{default:r(()=>[...d[5]||(d[5]=[u("4",-1)])]),_:1}),t("div",null,[t("p",Et,n(e(a)["normalize.merge-and-continue"]),1),t("p",Ft,n(e(a)["normalize.merge-review-branches-into"]),1)])])])]),_:1})]),_:1})])):z.value==="plan"&&e(o).normalizePlan?(l(),m("div",Nt,[s(e(A),null,{default:r(()=>[s(e(q),{class:"flex items-center justify-between p-4"},{default:r(()=>[t("div",null,[t("h3",Lt,n(e(a)["normalize.normalize-plan"]),1),t("p",Tt,[u(n(e(o).normalizePlan.extractions.length)+" "+n(e(a)["normalize.extractions-across"])+" "+n(e(o).normalizePlan.models.length)+" "+n(e(a)["normalize.models"])+" ",1),e(o).normalizePlan.patches.length?(l(),m(S,{key:0},[u(" · "+n(e(o).normalizePlan.patches.length)+" "+n(e(a)["normalize.patches"]),1)],64)):C("",!0)])]),t("div",Dt,[s(e(G),{variant:"outline",disabled:p.value||b.value,onClick:_},{default:r(()=>[p.value?(l(),h(e(F),{key:0,class:"size-4 animate-spin"})):(l(),h(e(Q),{key:1})),u(" "+n(p.value?"Rejecting...":"Reject"),1)]),_:1},8,["disabled"]),s(e(G),{disabled:b.value||p.value,onClick:i},{default:r(()=>[b.value?(l(),h(e(F),{key:0,class:"size-4 animate-spin"})):(l(),h(e(J),{key:1})),u(" "+n(b.value?"Applying...":"Approve & Apply"),1)]),_:1},8,["disabled"])])]),_:1})]),_:1}),t("div",qt,[s(H,{title:e(a)["normalize.request-changes-from-your"]},{default:r(()=>[s(j,{prompt:e(a)["normalize.adjust-the-normalize-plan"]},null,8,["prompt"]),s(j,{prompt:e(a)["normalize.remove-navigation-labels-from"]},null,8,["prompt"])]),_:1},8,["title"])]),e(o).normalizePlan.scan_stats?(l(),h(e(A),{key:0,class:"bg-muted/30"},{default:r(()=>[s(e(q),{class:"flex items-center gap-6 p-4 text-xs text-muted-foreground"},{default:r(()=>[t("span",null,[t("strong",Vt,n(e(o).normalizePlan.scan_stats.files_scanned),1),u(" "+n(e(a)["normalize.files-scanned"]),1)]),t("span",null,[t("strong",Ot,n(e(o).normalizePlan.scan_stats.raw_strings),1),u(" "+n(e(a)["normalize.strings-found"]),1)]),t("span",null,[t("strong",Gt,n(e(o).normalizePlan.scan_stats.candidates_sent),1),u(" "+n(e(a)["normalize.candidates"]),1)]),t("span",null,[t("strong",Ht,n(e(o).normalizePlan.scan_stats.extracted),1),u(" "+n(e(a)["normalize.extracted"]),1)]),t("span",null,[t("strong",Kt,n(e(o).normalizePlan.scan_stats.skipped),1),u(" "+n(e(a)["normalize.skipped"]),1)])]),_:1})]),_:1})):C("",!0),t("div",Ut,[t("div",null,[t("h3",Wt,n(e(a)["normalize.extractions"]),1),s(Le,{models:e(o).normalizePlan.models,extractions:e(o).normalizePlan.extractions,"selected-models":x.value,onSelectExtraction:f},null,8,["models","extractions","selected-models"])]),t("div",null,[t("h3",Xt,n(e(a)["normalize.source-trace"]),1),v.value?(l(),h(at,{key:0,extraction:v.value,patches:e(o).normalizePlan.patches,onClose:d[0]||(d[0]=k=>v.value=null)},null,8,["extraction","patches"])):(l(),m("div",Jt,[s(e(oe),{class:"size-6 text-muted-foreground/40 mb-2"}),t("p",Qt,n(e(a)["normalize.click-an-extraction-to"]),1)]))])]),e(o).normalizePlan.patches.length>0?(l(),m("div",Yt,[t("h3",Zt,n(e(a)["normalize.source-patches"]),1),s(xt,{patches:e(o).normalizePlan.patches},null,8,["patches"])])):C("",!0)])):z.value==="branches"&&e(o).normalizeResults?(l(),m("div",It,[t("div",es,[t("div",ts,[s(e(K),{class:"size-7 text-status-info"})]),t("h2",ss,n(e(a)["normalize.pending-normalize-branches"]),1),t("p",ns,n(e(a)["normalize.review-and-merge-normalize"]),1)]),t("div",as,[(l(!0),m(S,null,L(e(o).normalizeResults.pendingBranches,k=>(l(),h(e(A),{key:k.name,class:"overflow-hidden"},{default:r(()=>[s(e(q),{class:"flex items-center gap-3 p-4"},{default:r(()=>[s(e(K),{class:"size-4 text-status-info shrink-0"}),t("span",os,n(k.name),1),s(e(G),{variant:"outline",size:"sm",disabled:y.value===k.name||R.value===k.name,onClick:O=>V(k.name)},{default:r(()=>[y.value===k.name?(l(),h(e(F),{key:0,class:"size-4 animate-spin"})):(l(),h(e(Q),{key:1})),u(" "+n(e(a)["normalize.delete"]),1)]),_:2},1032,["disabled","onClick"]),s(e(G),{size:"sm",disabled:R.value===k.name||y.value===k.name,onClick:O=>D(k.name)},{default:r(()=>[R.value===k.name?(l(),h(e(F),{key:0,class:"size-4 animate-spin"})):(l(),h(e(K),{key:1})),u(" "+n(e(a)["normalize.merge"]),1)]),_:2},1032,["disabled","onClick"])]),_:2},1024)]),_:2},1024))),128))]),t("div",ls,[s(H,{title:e(a)["normalize.whats-next-ask-your"]},{default:r(()=>[s(j,{prompt:e(a)["normalize.continue-to-phase-2"]},null,8,["prompt"]),s(j,{prompt:e(a)["normalize.start-reuse-for-the"]},null,8,["prompt"])]),_:1},8,["title"])])])):z.value==="done"?(l(),m("div",rs,[t("div",is,[t("div",cs,[s(e(J),{class:"size-8 text-status-success"})]),d[6]||(d[6]=t("h2",{class:"text-xl font-semibold"},"Phase 1 complete",-1)),d[7]||(d[7]=t("p",{class:"mt-2 max-w-md text-sm text-muted-foreground"}," Content strings have been extracted into models and merged. Tell your AI agent to continue with Phase 2 — patching source files with content references. ",-1))]),t("div",ds,[s(H,{title:"Tell your agent"},{default:r(()=>[s(j,{prompt:"Continue to Phase 2 — patch serve-ui source files with content references",label:"recommended"}),s(j,{prompt:"Start reuse for all extracted content models in serve-ui domain"})]),_:1})])])):C("",!0),s(he,{message:e(a)["normalize.track-normalize-history-and"],class:"mt-6"},null,8,["message"])])]))}});export{Ss as default};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{P as m,k as b,d as f,u as x}from"./useWatch-COpVIQvm.js";import{c as u,a as h,b as y,e as v,y as g,u as t,z as k,o,f as p,p as c,q as a,B as r,g as z,s as l,j as n}from"./index-CoUshYEB.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const _=u("ExternalLinkIcon",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
7
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const w=u("SparklesIcon",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),B=h({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:"button"}},setup(e){const i=e;return(s,d)=>(o(),y(t(m),{"data-slot":"button","data-variant":e.variant,"data-size":e.size,as:e.as,"as-child":e.asChild,class:g(t(k)(t(M)({variant:e.variant,size:e.size}),i.class))},{default:v(()=>[p(s.$slots,"default")]),_:3},8,["data-variant","data-size","as","as-child","class"]))}}),M=b("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),V={class:"sticky top-0 z-10 border-b border-border bg-background/95 backdrop-blur"},C={class:"flex items-center justify-between px-6 py-4"},L={class:"min-w-0"},S={class:"text-lg font-semibold text-foreground truncate"},j={key:0,class:"text-sm text-muted-foreground truncate"},q={class:"flex items-center gap-3 shrink-0"},A={class:"hidden items-center gap-1.5 text-xs text-muted-foreground sm:flex"},I=h({__name:"PageHeader",props:{title:{},description:{}},setup(e){const i=f("serve-ui-texts").locale("en").get(),{connected:s}=x();return(d,E)=>(o(),c("header",V,[a("div",C,[a("div",L,[a("h1",S,r(e.title),1),e.description?(o(),c("p",j,r(e.description),1)):z("",!0)]),a("div",q,[a("div",A,[a("span",{class:g(["size-1.5 rounded-full",t(s)?"bg-status-success animate-pulse":"bg-status-error"])},null,2),l(" "+r(t(s)?"watching":"disconnected"),1)]),p(d.$slots,"actions"),n(t(B),{as:"a",href:"https://studio.contentrain.io",target:"_blank",rel:"noopener",size:"sm",class:"hidden sm:inline-flex bg-linear-to-r from-primary to-primary/80 shadow-sm hover:shadow-md hover:from-primary/90 hover:to-primary/70"},{default:v(()=>[n(t(w),{class:"size-3.5"}),l(" "+r(t(i)["header.open-in-studio"])+" ",1),n(t(_),{class:"size-3 opacity-60"})]),_:1})])])]))}});export{_ as E,w as S,I as _,B as a};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{Z as B,a0 as V,a5 as W,U as D,G as p,ad as z,w as g,k as G,ae as J,a3 as q,a4 as H,M as Y,af as F,S as T,W as N,a1 as R,u as k,h as A,t as _,r as O,i as Z,K,ag as Q,ah as X,l as ee,a as te,_ as ne}from"./index-CoUshYEB.js";import{l as re}from"./useWatch-COpVIQvm.js";function Se(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,r=Symbol(n);return[a=>{const u=B(r,a);if(u||u===null)return u;throw new Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},a=>(V(r,a),a)]}function Pe(e,t){var n;const r=D();return G(()=>{r.value=e()},{...t,flush:(n=t==null?void 0:t.flush)!==null&&n!==void 0?n:"sync"}),J(r)}function x(e,t){return q()?(H(e,t),!0):!1}function Te(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const a=()=>t(i);return x(a),{off:a}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(a=>a(...i))),clear:()=>{e.clear()}}}function xe(e){let t=!1,n;const r=F(!0);return((...o)=>(t||(n=r.run(()=>e(...o)),t=!0),n))}const M=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ie=e=>typeof e<"u",oe=Object.prototype.toString,ae=e=>oe.call(e)==="[object Object]",L=()=>{},Me=ue();function ue(){var e,t,n;return M&&!!(!((e=window)===null||e===void 0||(e=e.navigator)===null||e===void 0)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)===null||t===void 0||(t=t.navigator)===null||t===void 0?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test((n=window)===null||n===void 0?void 0:n.navigator.userAgent))}function se(e,t){function n(...r){return new Promise((o,i)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(i)})}return n}function le(e,t={}){let n,r,o=L;const i=f=>{clearTimeout(f),o(),o=L};let a;return f=>{const d=p(e),s=p(t.maxWait);return n&&i(n),d<=0||s!==void 0&&s<=0?(r&&(i(r),r=void 0),Promise.resolve(f())):new Promise((l,v)=>{o=t.rejectOnCancel?v:l,a=f,s&&!r&&(r=setTimeout(()=>{n&&i(n),r=void 0,l(a())},s)),n=setTimeout(()=>{r&&i(r),r=void 0,l(f())},d)})}}function U(e){return Array.isArray(e)?e:[e]}function ce(e){return T()}function Ce(e){if(!M)return e;let t=0,n,r;const o=()=>{t-=1,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return((...i)=>(t+=1,r||(r=F(!0),n=r.run(()=>e(...i))),x(o),n))}function fe(e){return N(e)?R(new Proxy({},{get(t,n,r){return k(Reflect.get(e.value,n,r))},set(t,n,r){return N(e.value[n])&&!N(r)?e.value[n].value=r:e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}})):R(e)}function de(e){return fe(A(e))}function je(e,...t){const n=t.flat(),r=n[0];return de(()=>Object.fromEntries(typeof r=="function"?Object.entries(_(e)).filter(([o,i])=>!r(p(i),o)):Object.entries(_(e)).filter(o=>!n.includes(o[0]))))}function $e(e,t=1e4){return z((n,r)=>{let o=p(e),i;const a=()=>setTimeout(()=>{o=p(e),r()},p(t));return x(()=>{clearTimeout(i)}),{get(){return n(),o},set(u){o=u,r(),clearTimeout(i),i=a()}}})}function Ie(e,t=200,n={}){return se(le(t,n),e)}function Ne(e,t){ce()&&Y(e,t)}function Ue(e,t,n={}){const{immediate:r=!0,immediateCallback:o=!1}=n,i=D(!1);let a;function u(){a&&(clearTimeout(a),a=void 0)}function f(){i.value=!1,u()}function d(...s){o&&e(),u(),i.value=!0,a=setTimeout(()=>{i.value=!1,a=void 0,e(...s)},p(t))}return r&&(i.value=!0,M&&d()),x(f),{isPending:W(i),start:d,stop:f}}function me(e,t,n){return g(e,t,{...n,immediate:!0})}function _e(e,t,n){return g(e,t,{...n,once:!0})}const j=M?window:void 0;function P(e){var t;const n=p(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function ve(...e){const t=(r,o,i,a)=>(r.addEventListener(o,i,a),()=>r.removeEventListener(o,i,a)),n=A(()=>{const r=U(p(e[0])).filter(o=>o!=null);return r.every(o=>typeof o!="string")?r:void 0});return me(()=>{var r,o;return[(r=(o=n.value)===null||o===void 0?void 0:o.map(i=>P(i)))!==null&&r!==void 0?r:[j].filter(i=>i!=null),U(p(n.value?e[1]:e[0])),U(k(n.value?e[2]:e[1])),p(n.value?e[3]:e[2])]},([r,o,i,a],u,f)=>{if(!(r!=null&&r.length)||!(o!=null&&o.length)||!(i!=null&&i.length))return;const d=ae(a)?{...a}:a,s=r.flatMap(l=>o.flatMap(v=>i.map(w=>t(l,v,w,d))));f(()=>{s.forEach(l=>l())})},{flush:"post"})}function pe(){const e=D(!1),t=T();return t&&Z(()=>{e.value=!0},t),e}function ye(e){const t=pe();return A(()=>(t.value,!!e()))}function he(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function De(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:o=j,eventName:i="keydown",passive:a=!1,dedupe:u=!1}=r,f=he(t);return ve(o,i,s=>{s.repeat&&p(u)||f(s)&&n(s)},a)}function ge(e){return JSON.parse(JSON.stringify(e))}function Re(e,t,n={}){const{window:r=j,...o}=n;let i;const a=ye(()=>r&&"ResizeObserver"in r),u=()=>{i&&(i.disconnect(),i=void 0)},f=g(A(()=>{const s=p(e);return Array.isArray(s)?s.map(l=>P(l)):[P(s)]}),s=>{if(u(),a.value&&r){i=new ResizeObserver(t);for(const l of s)l&&i.observe(l,o)}},{immediate:!0,flush:"post"}),d=()=>{u(),f()};return x(d),{isSupported:a,stop:d}}function Le(e,t,n,r={}){var o,i;const{clone:a=!1,passive:u=!1,eventName:f,deep:d=!1,defaultValue:s,shouldEmit:l}=r,v=T(),w=n||(v==null?void 0:v.emit)||(v==null||(o=v.$emit)===null||o===void 0?void 0:o.bind(v))||(v==null||(i=v.proxy)===null||i===void 0||(i=i.$emit)===null||i===void 0?void 0:i.bind(v==null?void 0:v.proxy));let E=f;t||(t="modelValue"),E=E||`update:${t.toString()}`;const $=c=>a?typeof a=="function"?a(c):ge(c):c,S=()=>ie(e[t])?$(e[t]):s,m=c=>{l?l(c)&&w(E,c):w(E,c)};if(u){const c=O(S());let y=!1;return g(()=>e[t],h=>{y||(y=!0,c.value=$(h),K(()=>y=!1))}),g(c,h=>{!y&&(h!==e[t]||d)&&m(h)},{deep:d}),c}else return A({get(){return S()},set(c){m(c)}})}function Fe(){const e=T(),t=O(),n=A(()=>r());Q(()=>{n.value!==r()&&X(t)});function r(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:P(t)}const o=Object.assign({},e.exposed),i={};for(const u in e.props)Object.defineProperty(i,u,{enumerable:!0,configurable:!0,get:()=>e.props[u]});if(Object.keys(o).length>0)for(const u in o)Object.defineProperty(i,u,{enumerable:!0,configurable:!0,get:()=>o[u]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function a(u){if(t.value=u,!!u&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>u instanceof Element?u:u.$el}),!(u instanceof Element)&&!Object.prototype.hasOwnProperty.call(u,"$el"))){const f=u.$.exposed,d=Object.assign({},i);for(const s in f)Object.defineProperty(d,s,{enumerable:!0,configurable:!0,get:()=>f[s]});e.exposed=d}}return{forwardRef:a,currentRef:t,currentElement:n}}function be(e,t){const n=O(e);function r(i){return t[n.value][i]??n.value}return{state:n,dispatch:i=>{n.value=r(i)}}}function Oe(e,t){var S;const n=O({}),r=O("none"),o=O(e),i=e.value?"mounted":"unmounted";let a;const u=((S=t.value)==null?void 0:S.ownerDocument.defaultView)??j,{state:f,dispatch:d}=be(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),s=m=>{var c;if(M){const y=new CustomEvent(m,{bubbles:!1,cancelable:!1});(c=t.value)==null||c.dispatchEvent(y)}};g(e,async(m,c)=>{var h;const y=c!==m;if(await K(),y){const I=r.value,b=C(t.value);m?(d("MOUNT"),s("enter"),b==="none"&&s("after-enter")):b==="none"||b==="undefined"||((h=n.value)==null?void 0:h.display)==="none"?(d("UNMOUNT"),s("leave"),s("after-leave")):c&&I!==b?(d("ANIMATION_OUT"),s("leave")):(d("UNMOUNT"),s("after-leave"))}},{immediate:!0});const l=m=>{const c=C(t.value),y=c.includes(CSS.escape(m.animationName)),h=f.value==="mounted"?"enter":"leave";if(m.target===t.value&&y&&(s(`after-${h}`),d("ANIMATION_END"),!o.value)){const I=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",a=u==null?void 0:u.setTimeout(()=>{var b;((b=t.value)==null?void 0:b.style.animationFillMode)==="forwards"&&(t.value.style.animationFillMode=I)})}m.target===t.value&&c==="none"&&d("ANIMATION_END")},v=m=>{m.target===t.value&&(r.value=C(t.value))},w=g(t,(m,c)=>{m?(n.value=getComputedStyle(m),m.addEventListener("animationstart",v),m.addEventListener("animationcancel",l),m.addEventListener("animationend",l)):(d("ANIMATION_END"),a!==void 0&&(u==null||u.clearTimeout(a)),c==null||c.removeEventListener("animationstart",v),c==null||c.removeEventListener("animationcancel",l),c==null||c.removeEventListener("animationend",l))},{immediate:!0}),E=g(f,()=>{const m=C(t.value);r.value=f.value==="mounted"?m:"none"});return ee(()=>{w(),E()}),{isPresent:A(()=>["mounted","unmountSuspended"].includes(f.value))}}function C(e){return e&&getComputedStyle(e).animationName||"none"}var ke=te({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var d;const{present:r,forceMount:o}=_(e),i=O(),{isPresent:a}=Oe(r,i);n({present:a});let u=t.default({present:a.value});u=re(u||[]);const f=T();if(u&&(u==null?void 0:u.length)>1){const s=(d=f==null?void 0:f.parent)!=null&&d.type.name?`<${f.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${s}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(l=>` - ${l}`).join(`
|
|
2
|
+
`)].join(`
|
|
3
|
+
`))}return()=>o.value||r.value||a.value?ne(t.default({present:a.value})[0],{ref:s=>{const l=P(s);return typeof(l==null?void 0:l.hasAttribute)>"u"||(l!=null&&l.hasAttribute("data-reka-popper-content-wrapper")?i.value=l.firstElementChild:i.value=l),l}}):null}});export{ke as P,Re as a,Ie as b,Se as c,be as d,P as e,Le as f,je as g,Ce as h,M as i,Me as j,ve as k,xe as l,x as m,Te as n,De as o,pe as p,Pe as q,$e as r,Ue as s,Ne as t,Fe as u,_e as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{P as h,r as m}from"./useWatch-COpVIQvm.js";import{a as l,o as u,b as p,e as d,f as c,m as _,u as o,h as s,I as y,J as B,z as S}from"./index-CoUshYEB.js";var g=l({__name:"BaseSeparator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(a){const e=a,t=["horizontal","vertical"];function n(r){return t.includes(r)}const i=s(()=>n(e.orientation)?e.orientation:"horizontal"),f=s(()=>i.value==="vertical"?e.orientation:void 0),v=s(()=>e.decorative?{role:"none"}:{"aria-orientation":f.value,role:"separator"});return(r,P)=>(u(),p(o(h),_({as:r.as,"as-child":r.asChild,"data-orientation":i.value},v.value),{default:d(()=>[c(r.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),z=g,q=l({__name:"Separator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(a){const e=a;return(t,n)=>(u(),p(z,y(B(e)),{default:d(()=>[c(t.$slots,"default")]),_:3},16))}}),O=q;const k=l({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(a){const e=a,t=m(e,"class");return(n,i)=>(u(),p(o(O),_({"data-slot":"separator"},o(t),{class:o(S)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e.class)}),null,16,["class"]))}});export{k as _};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as n}from"./PageHeader.vue_vue_type_script_setup_true_lang-C7aWxNSw.js";import{d as l}from"./useWatch-COpVIQvm.js";import{c,a as d,p,q as t,B as o,j as r,u as s,e as m,o as u,s as f}from"./index-CoUshYEB.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const _=c("ArrowRightIcon",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),g="/for-developers-1.svg",x={class:"relative overflow-hidden rounded-xl border border-primary/15"},v={class:"relative flex items-center gap-5 px-6 py-6"},y={class:"flex-1 text-sm text-muted-foreground leading-relaxed"},z=d({__name:"StudioHint",props:{message:{}},setup(a){const i=l("serve-ui-texts").locale("en").get();return(h,e)=>(u(),p("div",x,[e[0]||(e[0]=t("div",{class:"absolute inset-0 bg-linear-to-r from-primary/8 via-primary/4 to-primary/8"},null,-1)),e[1]||(e[1]=t("img",{src:g,alt:"",class:"absolute inset-0 size-full object-cover opacity-[0.04] dark:opacity-[0.08] pointer-events-none select-none"},null,-1)),t("div",v,[t("p",y,o(a.message),1),r(s(n),{as:"a",href:"https://studio.contentrain.io",target:"_blank",rel:"noopener",size:"sm"},{default:m(()=>[f(o(s(i)["studio-hint.open-studio"])+" ",1),r(s(_),{class:"size-3.5"})]),_:1})])]))}});export{_ as A,z as _};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{u as Ft,a as Ye,b as Mt}from"./useId-C0uR6mdj.js";import{r as Ht,m as Wt,n as zt,e as It,i as mt,u as j,o as Vt,p as jt,c as Ae,q as Kt,s as wt,f as Xt,k as rt,P as Yt}from"./Presence-cbB6AqkQ.js";import{c as bt,k as le,r as B,i as Ue,h as _,G as ve,K as Fe,a as S,o as T,b as R,e as D,f as k,u as y,n as Ge,a1 as Ut,T as Gt,g as Me,a2 as xt,p as ae,m as Q,w as xe,a3 as Jt,a4 as Qt,a5 as de,U as Zt,j as G,a6 as en,I as Te,J as De,t as tn,s as nn,B as _e,H as on,A as He,a7 as rn,z as We,y as it,q as st,Y as sn,Q as an}from"./index-CoUshYEB.js";import{P as ge,r as ln}from"./useWatch-COpVIQvm.js";import{S as un}from"./shield-check-CUL7KkSA.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const cn=bt("BanIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
|
|
7
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const dn=bt("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);function _t(e,t,n){const o=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),o.dispatchEvent(r)}function fn(e){return e==null}function Le(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function ze(e,t,n=".",o){if(!Le(t))return ze(e,{},n,o);const r=Object.assign({},t);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const s=e[i];s!=null&&(o&&o(r,i,s,n)||(Array.isArray(s)&&Array.isArray(r[i])?r[i]=[...s,...r[i]]:Le(s)&&Le(r[i])?r[i]=ze(s,r[i],(n?`${n}.`:"")+i.toString(),o):r[i]=s))}return r}function pn(e){return(...t)=>t.reduce((n,o)=>ze(n,o,"",e),{})}const hn=pn();function gn(e,t){const n=Ht(!1,300);Wt(()=>{n.value=!1});const o=B(null),r=zt();function i(){o.value=null,n.value=!1}function s(a,c){const f=a.currentTarget,l={x:a.clientX,y:a.clientY},d=yn(l,f.getBoundingClientRect()),p=vn(l,d,1),u=mn(c.getBoundingClientRect()),h=bn([...p,...u]);o.value=h,n.value=!0}return le(a=>{if(e.value&&t.value){const c=l=>s(l,t.value),f=l=>s(l,e.value);e.value.addEventListener("pointerleave",c),t.value.addEventListener("pointerleave",f),a(()=>{var l,d;(l=e.value)==null||l.removeEventListener("pointerleave",c),(d=t.value)==null||d.removeEventListener("pointerleave",f)})}}),le(a=>{var c;if(o.value){const f=l=>{var v,m;if(!o.value||!(l.target instanceof Element))return;const d=l.target,p={x:l.clientX,y:l.clientY},u=((v=e.value)==null?void 0:v.contains(d))||((m=t.value)==null?void 0:m.contains(d)),h=!wn(p,o.value),g=!!d.closest("[data-grace-area-trigger]");u?i():(h||g)&&(i(),r.trigger())};(c=e.value)==null||c.ownerDocument.addEventListener("pointermove",f),a(()=>{var l;return(l=e.value)==null?void 0:l.ownerDocument.removeEventListener("pointermove",f)})}}),{isPointerInTransit:n,onPointerExit:r.on}}function yn(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function vn(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function mn(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function wn(e,t){const{x:n,y:o}=e;let r=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i].x,c=t[i].y,f=t[s].x,l=t[s].y;c>o!=l>o&&n<(f-a)*(o-c)/(l-c)+a&&(r=!r)}return r}function bn(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),xn(t)}function xn(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}function _n(e){const t=B(),n=_(()=>{var r;return((r=t.value)==null?void 0:r.width)??0}),o=_(()=>{var r;return((r=t.value)==null?void 0:r.height)??0});return Ue(()=>{const r=It(e);if(r){t.value={width:r.offsetWidth,height:r.offsetHeight};const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let c,f;if("borderBoxSize"in a){const l=a.borderBoxSize,d=Array.isArray(l)?l[0]:l;c=d.inlineSize,f=d.blockSize}else c=r.offsetWidth,f=r.offsetHeight;t.value={width:c,height:f}});return i.observe(r,{box:"border-box"}),()=>i.unobserve(r)}else t.value=void 0}),{width:n,height:o}}const Cn="dismissableLayer.pointerDownOutside",On="dismissableLayer.focusOutside";function Ct(e,t){if(!(t instanceof Element))return!1;const n=t.closest("[data-dismissable-layer]"),o=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),r=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&(o===n||r.indexOf(o)<r.indexOf(n)))}function Pn(e,t,n=!0){var s;const o=((s=t==null?void 0:t.value)==null?void 0:s.ownerDocument)??(globalThis==null?void 0:globalThis.document),r=B(!1),i=B(()=>{});return le(a=>{if(!mt||!ve(n))return;const c=async l=>{const d=l.target;if(!(!(t!=null&&t.value)||!d)){if(Ct(t.value,d)){r.value=!1;return}if(l.target&&!r.value){let u=function(){_t(Cn,e,p)};const p={originalEvent:l};l.pointerType==="touch"?(o.removeEventListener("click",i.value),i.value=u,o.addEventListener("click",i.value,{once:!0})):u()}else o.removeEventListener("click",i.value);r.value=!1}},f=window.setTimeout(()=>{o.addEventListener("pointerdown",c)},0);a(()=>{window.clearTimeout(f),o.removeEventListener("pointerdown",c),o.removeEventListener("click",i.value)})}),{onPointerDownCapture:()=>{ve(n)&&(r.value=!0)}}}function An(e,t,n=!0){var i;const o=((i=t==null?void 0:t.value)==null?void 0:i.ownerDocument)??(globalThis==null?void 0:globalThis.document),r=B(!1);return le(s=>{if(!mt||!ve(n))return;const a=async c=>{if(!(t!=null&&t.value))return;await Fe(),await Fe();const f=c.target;!t.value||!f||Ct(t.value,f)||c.target&&!r.value&&_t(On,e,{originalEvent:c})};o.addEventListener("focusin",a),s(()=>o.removeEventListener("focusin",a))}),{onFocusCapture:()=>{ve(n)&&(r.value=!0)},onBlurCapture:()=>{ve(n)&&(r.value=!1)}}}const V=Ut({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set});var Tn=S({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,o=t,{forwardRef:r,currentElement:i}=j(),s=_(()=>{var u;return((u=i.value)==null?void 0:u.ownerDocument)??globalThis.document}),a=_(()=>V.layersRoot),c=_(()=>i.value?Array.from(a.value).indexOf(i.value):-1),f=_(()=>V.layersWithOutsidePointerEventsDisabled.size>0),l=_(()=>{const u=Array.from(a.value),[h]=[...V.layersWithOutsidePointerEventsDisabled].slice(-1),g=u.indexOf(h);return c.value>=g}),d=Pn(async u=>{const h=[...V.branches].some(g=>g==null?void 0:g.contains(u.target));!l.value||h||(o("pointerDownOutside",u),o("interactOutside",u),await Fe(),u.defaultPrevented||o("dismiss"))},i),p=An(u=>{[...V.branches].some(g=>g==null?void 0:g.contains(u.target))||(o("focusOutside",u),o("interactOutside",u),u.defaultPrevented||o("dismiss"))},i);return Vt("Escape",u=>{c.value===a.value.size-1&&(o("escapeKeyDown",u),u.defaultPrevented||o("dismiss"))}),le(u=>{i.value&&(n.disableOutsidePointerEvents&&(V.layersWithOutsidePointerEventsDisabled.size===0&&(V.originalBodyPointerEvents=s.value.body.style.pointerEvents,s.value.body.style.pointerEvents="none"),V.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),u(()=>{n.disableOutsidePointerEvents&&V.layersWithOutsidePointerEventsDisabled.size===1&&!fn(V.originalBodyPointerEvents)&&(s.value.body.style.pointerEvents=V.originalBodyPointerEvents)}))}),le(u=>{u(()=>{i.value&&(a.value.delete(i.value),V.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(u,h)=>(T(),R(y(ge),{ref:y(r),"as-child":u.asChild,as:u.as,"data-dismissable-layer":"",style:Ge({pointerEvents:f.value?l.value?"auto":"none":void 0}),onFocusCapture:y(p).onFocusCapture,onBlurCapture:y(p).onBlurCapture,onPointerdownCapture:y(d).onPointerDownCapture},{default:D(()=>[k(u.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),Dn=Tn,Sn=S({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=jt();return(n,o)=>y(t)||n.forceMount?(T(),R(Gt,{key:0,to:n.to,disabled:n.disabled,defer:n.defer},[k(n.$slots,"default")],8,["to","disabled","defer"])):Me("v-if",!0)}}),En=Sn,qn=S({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,n)=>(T(),R(y(ge),{as:t.as,"as-child":t.asChild,"aria-hidden":t.feature==="focusable"?"true":void 0,"data-hidden":t.feature==="fully-hidden"?"":void 0,tabindex:t.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:D(()=>[k(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Bn=qn;const[Ot,Rn]=Ae("PopperRoot");var kn=S({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=B();return Rn({anchor:t,onAnchorChange:n=>t.value=n}),(n,o)=>k(n.$slots,"default")}}),Ln=kn,$n=S({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:n,currentElement:o}=j(),r=Ot();return xt(()=>{r.onAnchorChange(t.reference??o.value)}),(i,s)=>(T(),R(y(ge),{ref:y(n),as:i.as,"as-child":i.asChild},{default:D(()=>[k(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),Nn=$n;const Fn={key:0,d:"M0 0L6 6L12 0"},Mn={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"};var Hn=S({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return j(),(n,o)=>(T(),R(y(ge),Q(t,{width:n.width,height:n.height,viewBox:n.asChild?void 0:"0 0 12 6",preserveAspectRatio:n.asChild?void 0:"none"}),{default:D(()=>[k(n.$slots,"default",{},()=>[n.rounded?(T(),ae("path",Mn)):(T(),ae("path",Fn))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),Wn=Hn;function zn(e){return e!==null}function In(e){return{name:"transformOrigin",options:e,fn(t){var v,m,w;const{placement:n,rects:o,middlewareData:r}=t,s=((v=r.arrow)==null?void 0:v.centerOffset)!==0,a=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[f,l]=Ie(n),d={start:"0%",center:"50%",end:"100%"}[l],p=(((m=r.arrow)==null?void 0:m.x)??0)+a/2,u=(((w=r.arrow)==null?void 0:w.y)??0)+c/2;let h="",g="";return f==="bottom"?(h=s?d:`${p}px`,g=`${-c}px`):f==="top"?(h=s?d:`${p}px`,g=`${o.floating.height+c}px`):f==="right"?(h=`${-c}px`,g=s?d:`${u}px`):f==="left"&&(h=`${o.floating.width+c}px`,g=s?d:`${u}px`),{data:{x:h,y:g}}}}}function Ie(e){const[t,n="center"]=e.split("-");return[t,n]}const Vn=["top","right","bottom","left"],re=Math.min,W=Math.max,Ce=Math.round,be=Math.floor,J=e=>({x:e,y:e}),jn={left:"right",right:"left",bottom:"top",top:"bottom"};function Ve(e,t,n){return W(e,re(t,n))}function ee(e,t){return typeof e=="function"?e(t):e}function te(e){return e.split("-")[0]}function ye(e){return e.split("-")[1]}function Je(e){return e==="x"?"y":"x"}function Qe(e){return e==="y"?"height":"width"}function U(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ze(e){return Je(U(e))}function Kn(e,t,n){n===void 0&&(n=!1);const o=ye(e),r=Ze(e),i=Qe(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Oe(s)),[s,Oe(s)]}function Xn(e){const t=Oe(e);return[je(e),t,je(t)]}function je(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const at=["left","right"],lt=["right","left"],Yn=["top","bottom"],Un=["bottom","top"];function Gn(e,t,n){switch(e){case"top":case"bottom":return n?t?lt:at:t?at:lt;case"left":case"right":return t?Yn:Un;default:return[]}}function Jn(e,t,n,o){const r=ye(e);let i=Gn(te(e),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(je)))),i}function Oe(e){const t=te(e);return jn[t]+e.slice(t.length)}function Qn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pt(e){return typeof e!="number"?Qn(e):{top:e,right:e,bottom:e,left:e}}function Pe(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function ut(e,t,n){let{reference:o,floating:r}=e;const i=U(t),s=Ze(t),a=Qe(s),c=te(t),f=i==="y",l=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let u;switch(c){case"top":u={x:l,y:o.y-r.height};break;case"bottom":u={x:l,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:d};break;case"left":u={x:o.x-r.width,y:d};break;default:u={x:o.x,y:o.y}}switch(ye(t)){case"start":u[s]-=p*(n&&f?-1:1);break;case"end":u[s]+=p*(n&&f?-1:1);break}return u}async function Zn(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:p=!1,padding:u=0}=ee(t,e),h=Pt(u),v=a[p?d==="floating"?"reference":"floating":d],m=Pe(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:f,rootBoundary:l,strategy:c})),w=d==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},O=Pe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:c}):w);return{top:(m.top-O.top+h.top)/x.y,bottom:(O.bottom-m.bottom+h.bottom)/x.y,left:(m.left-O.left+h.left)/x.x,right:(O.right-m.right+h.right)/x.x}}const eo=50,to=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:Zn},c=await(s.isRTL==null?void 0:s.isRTL(t));let f=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:l,y:d}=ut(f,o,c),p=o,u=0;const h={};for(let g=0;g<i.length;g++){const v=i[g];if(!v)continue;const{name:m,fn:w}=v,{x:b,y:x,data:O,reset:A}=await w({x:l,y:d,initialPlacement:o,placement:p,strategy:r,middlewareData:h,rects:f,platform:a,elements:{reference:e,floating:t}});l=b??l,d=x??d,h[m]={...h[m],...O},A&&u<eo&&(u++,typeof A=="object"&&(A.placement&&(p=A.placement),A.rects&&(f=A.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):A.rects),{x:l,y:d}=ut(f,p,c)),g=-1)}return{x:l,y:d,placement:p,strategy:r,middlewareData:h}},no=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:s,elements:a,middlewareData:c}=t,{element:f,padding:l=0}=ee(e,t)||{};if(f==null)return{};const d=Pt(l),p={x:n,y:o},u=Ze(r),h=Qe(u),g=await s.getDimensions(f),v=u==="y",m=v?"top":"left",w=v?"bottom":"right",b=v?"clientHeight":"clientWidth",x=i.reference[h]+i.reference[u]-p[u]-i.floating[h],O=p[u]-i.reference[u],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f));let C=A?A[b]:0;(!C||!await(s.isElement==null?void 0:s.isElement(A)))&&(C=a.floating[b]||i.floating[h]);const E=x/2-O/2,L=C/2-g[h]/2-1,F=re(d[m],L),Y=re(d[w],L),P=F,N=C-g[h]-Y,q=C/2-g[h]/2+E,I=Ve(P,q,N),M=!c.arrow&&ye(r)!=null&&q!==I&&i.reference[h]/2-(q<P?F:Y)-g[h]/2<0,H=M?q<P?q-P:q-N:0;return{[u]:p[u]+H,data:{[u]:I,centerOffset:q-I-H,...M&&{alignmentOffset:H}},reset:M}}}),oo=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:c,elements:f}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...v}=ee(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const m=te(r),w=U(a),b=te(a)===a,x=await(c.isRTL==null?void 0:c.isRTL(f.floating)),O=p||(b||!g?[Oe(a)]:Xn(a)),A=h!=="none";!p&&A&&O.push(...Jn(a,g,h,x));const C=[a,...O],E=await c.detectOverflow(t,v),L=[];let F=((o=i.flip)==null?void 0:o.overflows)||[];if(l&&L.push(E[m]),d){const q=Kn(r,s,x);L.push(E[q[0]],E[q[1]])}if(F=[...F,{placement:r,overflows:L}],!L.every(q=>q<=0)){var Y,P;const q=(((Y=i.flip)==null?void 0:Y.index)||0)+1,I=C[q];if(I&&(!(d==="alignment"?w!==U(I):!1)||F.every($=>U($.placement)===w?$.overflows[0]>0:!0)))return{data:{index:q,overflows:F},reset:{placement:I}};let M=(P=F.filter(H=>H.overflows[0]<=0).sort((H,$)=>H.overflows[1]-$.overflows[1])[0])==null?void 0:P.placement;if(!M)switch(u){case"bestFit":{var N;const H=(N=F.filter($=>{if(A){const oe=U($.placement);return oe===w||oe==="y"}return!0}).map($=>[$.placement,$.overflows.filter(oe=>oe>0).reduce((oe,Nt)=>oe+Nt,0)]).sort(($,oe)=>$[1]-oe[1])[0])==null?void 0:N[0];H&&(M=H);break}case"initialPlacement":M=a;break}if(r!==M)return{reset:{placement:M}}}return{}}}};function ct(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dt(e){return Vn.some(t=>e[t]>=0)}const ro=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...i}=ee(e,t);switch(r){case"referenceHidden":{const s=await o.detectOverflow(t,{...i,elementContext:"reference"}),a=ct(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:dt(a)}}}case"escaped":{const s=await o.detectOverflow(t,{...i,altBoundary:!0}),a=ct(s,n.floating);return{data:{escapedOffsets:a,escaped:dt(a)}}}default:return{}}}}},At=new Set(["left","top"]);async function io(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=te(n),a=ye(n),c=U(n)==="y",f=At.has(s)?-1:1,l=i&&c?-1:1,d=ee(t,e);let{mainAxis:p,crossAxis:u,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(u=a==="end"?h*-1:h),c?{x:u*l,y:p*f}:{x:p*f,y:u*l}}const so=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=t,c=await io(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:s}}}}},ao=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:m=>{let{x:w,y:b}=m;return{x:w,y:b}}},...f}=ee(e,t),l={x:n,y:o},d=await i.detectOverflow(t,f),p=U(te(r)),u=Je(p);let h=l[u],g=l[p];if(s){const m=u==="y"?"top":"left",w=u==="y"?"bottom":"right",b=h+d[m],x=h-d[w];h=Ve(b,h,x)}if(a){const m=p==="y"?"top":"left",w=p==="y"?"bottom":"right",b=g+d[m],x=g-d[w];g=Ve(b,g,x)}const v=c.fn({...t,[u]:h,[p]:g});return{...v,data:{x:v.x-n,y:v.y-o,enabled:{[u]:s,[p]:a}}}}}},lo=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:f=!0}=ee(e,t),l={x:n,y:o},d=U(r),p=Je(d);let u=l[p],h=l[d];const g=ee(a,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const b=p==="y"?"height":"width",x=i.reference[p]-i.floating[b]+v.mainAxis,O=i.reference[p]+i.reference[b]-v.mainAxis;u<x?u=x:u>O&&(u=O)}if(f){var m,w;const b=p==="y"?"width":"height",x=At.has(te(r)),O=i.reference[d]-i.floating[b]+(x&&((m=s.offset)==null?void 0:m[d])||0)+(x?0:v.crossAxis),A=i.reference[d]+i.reference[b]+(x?0:((w=s.offset)==null?void 0:w[d])||0)-(x?v.crossAxis:0);h<O?h=O:h>A&&(h=A)}return{[p]:u,[d]:h}}}},uo=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:s,elements:a}=t,{apply:c=()=>{},...f}=ee(e,t),l=await s.detectOverflow(t,f),d=te(r),p=ye(r),u=U(r)==="y",{width:h,height:g}=i.floating;let v,m;d==="top"||d==="bottom"?(v=d,m=p===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(m=d,v=p==="end"?"top":"bottom");const w=g-l.top-l.bottom,b=h-l.left-l.right,x=re(g-l[v],w),O=re(h-l[m],b),A=!t.middlewareData.shift;let C=x,E=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(C=w),A&&!p){const F=W(l.left,0),Y=W(l.right,0),P=W(l.top,0),N=W(l.bottom,0);u?E=h-2*(F!==0||Y!==0?F+Y:W(l.left,l.right)):C=g-2*(P!==0||N!==0?P+N:W(l.top,l.bottom))}await c({...t,availableWidth:E,availableHeight:C});const L=await s.getDimensions(a.floating);return h!==L.width||g!==L.height?{reset:{rects:!0}}:{}}}};function Se(){return typeof window<"u"}function ce(e){return et(e)?(e.nodeName||"").toLowerCase():"#document"}function z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Z(e){var t;return(t=(et(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function et(e){return Se()?e instanceof Node||e instanceof z(e).Node:!1}function K(e){return Se()?e instanceof Element||e instanceof z(e).Element:!1}function ne(e){return Se()?e instanceof HTMLElement||e instanceof z(e).HTMLElement:!1}function ft(e){return!Se()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof z(e).ShadowRoot}function we(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function co(e){return/^(table|td|th)$/.test(ce(e))}function Ee(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const fo=/transform|translate|scale|rotate|perspective|filter/,po=/paint|layout|strict|content/,se=e=>!!e&&e!=="none";let $e;function tt(e){const t=K(e)?X(e):e;return se(t.transform)||se(t.translate)||se(t.scale)||se(t.rotate)||se(t.perspective)||!nt()&&(se(t.backdropFilter)||se(t.filter))||fo.test(t.willChange||"")||po.test(t.contain||"")}function ho(e){let t=ie(e);for(;ne(t)&&!he(t);){if(tt(t))return t;if(Ee(t))return null;t=ie(t)}return null}function nt(){return $e==null&&($e=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),$e}function he(e){return/^(html|body|#document)$/.test(ce(e))}function X(e){return z(e).getComputedStyle(e)}function qe(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ie(e){if(ce(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ft(e)&&e.host||Z(e);return ft(t)?t.host:t}function Tt(e){const t=ie(e);return he(t)?e.ownerDocument?e.ownerDocument.body:e.body:ne(t)&&we(t)?t:Tt(t)}function me(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Tt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),s=z(r);if(i){const a=Ke(s);return t.concat(s,s.visualViewport||[],we(r)?r:[],a&&n?me(a):[])}else return t.concat(r,me(r,[],n))}function Ke(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Dt(e){const t=X(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ne(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,a=Ce(n)!==i||Ce(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function ot(e){return K(e)?e:e.contextElement}function pe(e){const t=ot(e);if(!ne(t))return J(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Dt(t);let s=(i?Ce(n.width):n.width)/o,a=(i?Ce(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const go=J(0);function St(e){const t=z(e);return!nt()||!t.visualViewport?go:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==z(e)?!1:t}function ue(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=ot(e);let s=J(1);t&&(o?K(o)&&(s=pe(o)):s=pe(e));const a=yo(i,n,o)?St(i):J(0);let c=(r.left+a.x)/s.x,f=(r.top+a.y)/s.y,l=r.width/s.x,d=r.height/s.y;if(i){const p=z(i),u=o&&K(o)?z(o):o;let h=p,g=Ke(h);for(;g&&o&&u!==h;){const v=pe(g),m=g.getBoundingClientRect(),w=X(g),b=m.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,x=m.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;c*=v.x,f*=v.y,l*=v.x,d*=v.y,c+=b,f+=x,h=z(g),g=Ke(h)}}return Pe({width:l,height:d,x:c,y:f})}function Be(e,t){const n=qe(e).scrollLeft;return t?t.left+n:ue(Z(e)).left+n}function Et(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Be(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function vo(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",s=Z(o),a=t?Ee(t.floating):!1;if(o===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},f=J(1);const l=J(0),d=ne(o);if((d||!d&&!i)&&((ce(o)!=="body"||we(s))&&(c=qe(o)),d)){const u=ue(o);f=pe(o),l.x=u.x+o.clientLeft,l.y=u.y+o.clientTop}const p=s&&!d&&!i?Et(s,c):J(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+l.x+p.x,y:n.y*f.y-c.scrollTop*f.y+l.y+p.y}}function mo(e){return Array.from(e.getClientRects())}function wo(e){const t=Z(e),n=qe(e),o=e.ownerDocument.body,r=W(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=W(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Be(e);const a=-n.scrollTop;return X(o).direction==="rtl"&&(s+=W(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}const pt=25;function bo(e,t){const n=z(e),o=Z(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,c=0;if(r){i=r.width,s=r.height;const l=nt();(!l||l&&t==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}const f=Be(o);if(f<=0){const l=o.ownerDocument,d=l.body,p=getComputedStyle(d),u=l.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,h=Math.abs(o.clientWidth-d.clientWidth-u);h<=pt&&(i-=h)}else f<=pt&&(i+=f);return{width:i,height:s,x:a,y:c}}function xo(e,t){const n=ue(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=ne(e)?pe(e):J(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,c=r*i.x,f=o*i.y;return{width:s,height:a,x:c,y:f}}function ht(e,t,n){let o;if(t==="viewport")o=bo(e,n);else if(t==="document")o=wo(Z(e));else if(K(t))o=xo(t,n);else{const r=St(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Pe(o)}function qt(e,t){const n=ie(e);return n===t||!K(n)||he(n)?!1:X(n).position==="fixed"||qt(n,t)}function _o(e,t){const n=t.get(e);if(n)return n;let o=me(e,[],!1).filter(a=>K(a)&&ce(a)!=="body"),r=null;const i=X(e).position==="fixed";let s=i?ie(e):e;for(;K(s)&&!he(s);){const a=X(s),c=tt(s);!c&&a.position==="fixed"&&(r=null),(i?!c&&!r:!c&&a.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||we(s)&&!c&&qt(e,s))?o=o.filter(l=>l!==s):r=a,s=ie(s)}return t.set(e,o),o}function Co(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?Ee(t)?[]:_o(t,this._c):[].concat(n),o],a=ht(t,s[0],r);let c=a.top,f=a.right,l=a.bottom,d=a.left;for(let p=1;p<s.length;p++){const u=ht(t,s[p],r);c=W(u.top,c),f=re(u.right,f),l=re(u.bottom,l),d=W(u.left,d)}return{width:f-d,height:l-c,x:d,y:c}}function Oo(e){const{width:t,height:n}=Dt(e);return{width:t,height:n}}function Po(e,t,n){const o=ne(t),r=Z(t),i=n==="fixed",s=ue(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=J(0);function f(){c.x=Be(r)}if(o||!o&&!i)if((ce(t)!=="body"||we(r))&&(a=qe(t)),o){const u=ue(t,!0,i,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else r&&f();i&&!o&&r&&f();const l=r&&!o&&!i?Et(r,a):J(0),d=s.left+a.scrollLeft-c.x-l.x,p=s.top+a.scrollTop-c.y-l.y;return{x:d,y:p,width:s.width,height:s.height}}function Ne(e){return X(e).position==="static"}function gt(e,t){if(!ne(e)||X(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Z(e)===n&&(n=n.ownerDocument.body),n}function Bt(e,t){const n=z(e);if(Ee(e))return n;if(!ne(e)){let r=ie(e);for(;r&&!he(r);){if(K(r)&&!Ne(r))return r;r=ie(r)}return n}let o=gt(e,t);for(;o&&co(o)&&Ne(o);)o=gt(o,t);return o&&he(o)&&Ne(o)&&!tt(o)?n:o||ho(e)||n}const Ao=async function(e){const t=this.getOffsetParent||Bt,n=this.getDimensions,o=await n(e.floating);return{reference:Po(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function To(e){return X(e).direction==="rtl"}const Do={convertOffsetParentRelativeRectToViewportRelativeRect:vo,getDocumentElement:Z,getClippingRect:Co,getOffsetParent:Bt,getElementRects:Ao,getClientRects:mo,getDimensions:Oo,getScale:pe,isElement:K,isRTL:To};function Rt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function So(e,t){let n=null,o;const r=Z(e);function i(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const f=e.getBoundingClientRect(),{left:l,top:d,width:p,height:u}=f;if(a||t(),!p||!u)return;const h=be(d),g=be(r.clientWidth-(l+p)),v=be(r.clientHeight-(d+u)),m=be(l),b={rootMargin:-h+"px "+-g+"px "+-v+"px "+-m+"px",threshold:W(0,re(1,c))||1};let x=!0;function O(A){const C=A[0].intersectionRatio;if(C!==c){if(!x)return s();C?s(!1,C):o=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!Rt(f,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(O,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(O,b)}n.observe(e)}return s(!0),i}function Eo(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,f=ot(e),l=r||i?[...f?me(f):[],...t?me(t):[]]:[];l.forEach(m=>{r&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const d=f&&a?So(f,n):null;let p=-1,u=null;s&&(u=new ResizeObserver(m=>{let[w]=m;w&&w.target===f&&u&&t&&(u.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=u)==null||b.observe(t)})),n()}),f&&!c&&u.observe(f),t&&u.observe(t));let h,g=c?ue(e):null;c&&v();function v(){const m=ue(e);g&&!Rt(g,m)&&n(),g=m,h=requestAnimationFrame(v)}return n(),()=>{var m;l.forEach(w=>{r&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),d==null||d(),(m=u)==null||m.disconnect(),u=null,c&&cancelAnimationFrame(h)}}const qo=so,Bo=ao,yt=oo,Ro=uo,ko=ro,Lo=no,$o=lo,No=(e,t,n)=>{const o=new Map,r={platform:Do,...n},i={...r.platform,_c:o};return to(e,t,{...r,platform:i})};function Fo(e){return e!=null&&typeof e=="object"&&"$el"in e}function Xe(e){if(Fo(e)){const t=e.$el;return et(t)&&ce(t)==="#comment"?null:t}return e}function fe(e){return typeof e=="function"?e():y(e)}function Mo(e){return{name:"arrow",options:e,fn(t){const n=Xe(fe(e.element));return n==null?{}:Lo({element:n,padding:e.padding}).fn(t)}}}function kt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vt(e,t){const n=kt(e);return Math.round(t*n)/n}function Ho(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,r=_(()=>{var C;return(C=fe(n.open))!=null?C:!0}),i=_(()=>fe(n.middleware)),s=_(()=>{var C;return(C=fe(n.placement))!=null?C:"bottom"}),a=_(()=>{var C;return(C=fe(n.strategy))!=null?C:"absolute"}),c=_(()=>{var C;return(C=fe(n.transform))!=null?C:!0}),f=_(()=>Xe(e.value)),l=_(()=>Xe(t.value)),d=B(0),p=B(0),u=B(a.value),h=B(s.value),g=Zt({}),v=B(!1),m=_(()=>{const C={position:u.value,left:"0",top:"0"};if(!l.value)return C;const E=vt(l.value,d.value),L=vt(l.value,p.value);return c.value?{...C,transform:"translate("+E+"px, "+L+"px)",...kt(l.value)>=1.5&&{willChange:"transform"}}:{position:u.value,left:E+"px",top:L+"px"}});let w;function b(){if(f.value==null||l.value==null)return;const C=r.value;No(f.value,l.value,{middleware:i.value,placement:s.value,strategy:a.value}).then(E=>{d.value=E.x,p.value=E.y,u.value=E.strategy,h.value=E.placement,g.value=E.middlewareData,v.value=C!==!1})}function x(){typeof w=="function"&&(w(),w=void 0)}function O(){if(x(),o===void 0){b();return}if(f.value!=null&&l.value!=null){w=o(f.value,l.value,b);return}}function A(){r.value||(v.value=!1)}return xe([i,s,a,r],b,{flush:"sync"}),xe([f,l],O,{flush:"sync"}),xe(r,A,{flush:"sync"}),Jt()&&Qt(x),{x:de(d),y:de(p),strategy:de(u),placement:de(h),middlewareData:de(g),isPositioned:de(v),floatingStyles:m,update:b}}const Wo={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[zo,Io]=Ae("PopperContent");var Vo=S({inheritAttrs:!1,__name:"PopperContent",props:en({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Wo}),emits:["placed"],setup(e,{emit:t}){const n=e,o=t,r=Ot(),{forwardRef:i,currentElement:s}=j(),a=B(),c=B(),{width:f,height:l}=_n(c),d=_(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),p=_(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),u=_(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),h=_(()=>({padding:p.value,boundary:u.value.filter(zn),altBoundary:u.value.length>0})),g=_(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),v=Kt(()=>[qo({mainAxis:n.sideOffset+l.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&yt({...h.value,...g.value}),n.avoidCollisions&&Bo({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?$o():void 0,...h.value}),!n.prioritizePosition&&n.avoidCollisions&&yt({...h.value,...g.value}),Ro({...h.value,apply:({elements:P,rects:N,availableWidth:q,availableHeight:I})=>{const{width:M,height:H}=N.reference,$=P.floating.style;$.setProperty("--reka-popper-available-width",`${q}px`),$.setProperty("--reka-popper-available-height",`${I}px`),$.setProperty("--reka-popper-anchor-width",`${M}px`),$.setProperty("--reka-popper-anchor-height",`${H}px`)}}),c.value&&Mo({element:c.value,padding:n.arrowPadding}),In({arrowWidth:f.value,arrowHeight:l.value}),n.hideWhenDetached&&ko({strategy:"referenceHidden",...h.value})]),m=_(()=>n.reference??r.anchor.value),{floatingStyles:w,placement:b,isPositioned:x,middlewareData:O}=Ho(m,a,{strategy:n.positionStrategy,placement:d,whileElementsMounted:(...P)=>Eo(...P,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:v}),A=_(()=>Ie(b.value)[0]),C=_(()=>Ie(b.value)[1]);xt(()=>{x.value&&o("placed")});const E=_(()=>{var N;const P=((N=O.value.arrow)==null?void 0:N.centerOffset)!==0;return n.hideShiftedArrow&&P}),L=B("");le(()=>{s.value&&(L.value=window.getComputedStyle(s.value).zIndex)});const F=_(()=>{var P;return((P=O.value.arrow)==null?void 0:P.x)??0}),Y=_(()=>{var P;return((P=O.value.arrow)==null?void 0:P.y)??0});return Io({placedSide:A,onArrowChange:P=>c.value=P,arrowX:F,arrowY:Y,shouldHideArrow:E}),(P,N)=>{var q,I,M;return T(),ae("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:Ge({...y(w),transform:y(x)?y(w).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L.value,"--reka-popper-transform-origin":[(q=y(O).transformOrigin)==null?void 0:q.x,(I=y(O).transformOrigin)==null?void 0:I.y].join(" "),...((M=y(O).hide)==null?void 0:M.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[G(y(ge),Q({ref:y(i)},P.$attrs,{"as-child":n.asChild,as:P.as,"data-side":A.value,"data-align":C.value,style:{animation:y(x)?void 0:"none"}}),{default:D(()=>[k(P.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),jo=Vo;const Ko={top:"bottom",right:"left",bottom:"top",left:"right"};var Xo=S({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const{forwardRef:t}=j(),n=zo(),o=_(()=>Ko[n.placedSide.value]);return(r,i)=>{var s,a,c,f;return T(),ae("span",{ref:l=>{y(n).onArrowChange(l)},style:Ge({position:"absolute",left:(s=y(n).arrowX)!=null&&s.value?`${(a=y(n).arrowX)==null?void 0:a.value}px`:void 0,top:(c=y(n).arrowY)!=null&&c.value?`${(f=y(n).arrowY)==null?void 0:f.value}px`:void 0,[o.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[y(n).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[y(n).placedSide.value],visibility:y(n).shouldHideArrow.value?"hidden":void 0})},[G(Wn,Q(r.$attrs,{ref:y(t),style:{display:"block"},as:r.as,"as-child":r.asChild,rounded:r.rounded,width:r.width,height:r.height}),{default:D(()=>[k(r.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4)}}}),Yo=Xo,Uo=S({__name:"TooltipArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return j(),(n,o)=>(T(),R(y(Yo),Te(De(t)),{default:D(()=>[k(n.$slots,"default")]),_:3},16))}}),Go=Uo;const[Re,Jo]=Ae("TooltipProvider");var Qo=S({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{type:Number,required:!1,default:700},skipDelayDuration:{type:Number,required:!1,default:300},disableHoverableContent:{type:Boolean,required:!1,default:!1},disableClosingTrigger:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:!1},content:{type:Object,required:!1}},setup(e){const t=e,{delayDuration:n,skipDelayDuration:o,disableHoverableContent:r,disableClosingTrigger:i,ignoreNonKeyboardFocus:s,disabled:a,content:c}=tn(t);j();const f=B(!0),l=B(!1),{start:d,stop:p}=wt(()=>{f.value=!0},o,{immediate:!1});return Jo({isOpenDelayed:f,delayDuration:n,onOpen(){p(),f.value=!1},onClose(){d()},isPointerInTransitRef:l,disableHoverableContent:r,disableClosingTrigger:i,disabled:a,ignoreNonKeyboardFocus:s,content:c}),(u,h)=>k(u.$slots,"default")}}),Zo=Qo;const Lt="tooltip.open",[ke,er]=Ae("TooltipRoot");var tr=S({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},delayDuration:{type:Number,required:!1,default:void 0},disableHoverableContent:{type:Boolean,required:!1,default:void 0},disableClosingTrigger:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(e,{emit:t}){const n=e,o=t;j();const r=Re(),i=_(()=>n.disableHoverableContent??r.disableHoverableContent.value),s=_(()=>n.disableClosingTrigger??r.disableClosingTrigger.value),a=_(()=>n.disabled??r.disabled.value),c=_(()=>n.delayDuration??r.delayDuration.value),f=_(()=>n.ignoreNonKeyboardFocus??r.ignoreNonKeyboardFocus.value),l=Xt(n,"open",o,{defaultValue:n.defaultOpen,passive:n.open===void 0});xe(l,b=>{r.onClose&&(b?(r.onOpen(),document.dispatchEvent(new CustomEvent(Lt))):r.onClose())});const d=B(!1),p=B(),u=_(()=>l.value?d.value?"delayed-open":"instant-open":"closed"),{start:h,stop:g}=wt(()=>{d.value=!0,l.value=!0},c,{immediate:!1});function v(){g(),d.value=!1,l.value=!0}function m(){g(),l.value=!1}function w(){h()}return er({contentId:"",open:l,stateAttribute:u,trigger:p,onTriggerChange(b){p.value=b},onTriggerEnter(){r.isOpenDelayed.value?w():v()},onTriggerLeave(){i.value?m():g()},onOpen:v,onClose:m,disableHoverableContent:i,disableClosingTrigger:s,disabled:a,ignoreNonKeyboardFocus:f}),(b,x)=>(T(),R(y(Ln),null,{default:D(()=>[k(b.$slots,"default",{open:y(l)})]),_:3}))}}),nr=tr,or=S({__name:"TooltipContentImpl",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1,default:void 0},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1,default:void 0},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1,default:void 0},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=ke(),i=Re(),{forwardRef:s,currentElement:a}=j(),c=_(()=>{var l;return n.ariaLabel||((l=a.value)==null?void 0:l.textContent)}),f=_(()=>{const{ariaLabel:l,...d}=n;return hn(d,i.content.value??{},{side:"top",sideOffset:0,align:"center",avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:"partial",hideWhenDetached:!1})});return Ue(()=>{rt(window,"scroll",l=>{const d=l.target;d!=null&&d.contains(r.trigger.value)&&r.onClose()}),rt(window,Lt,r.onClose)}),(l,d)=>(T(),R(y(Dn),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:d[0]||(d[0]=p=>o("escapeKeyDown",p)),onPointerDownOutside:d[1]||(d[1]=p=>{var u;y(r).disableClosingTrigger.value&&((u=y(r).trigger.value)!=null&&u.contains(p.target))&&p.preventDefault(),o("pointerDownOutside",p)}),onFocusOutside:d[2]||(d[2]=on(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=p=>y(r).onClose())},{default:D(()=>[G(y(jo),Q({ref:y(s),"data-state":y(r).stateAttribute.value},{...l.$attrs,...f.value},{style:{"--reka-tooltip-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-tooltip-content-available-width":"var(--reka-popper-available-width)","--reka-tooltip-content-available-height":"var(--reka-popper-available-height)","--reka-tooltip-trigger-width":"var(--reka-popper-anchor-width)","--reka-tooltip-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:D(()=>[k(l.$slots,"default"),G(y(Bn),{id:y(r).contentId,role:"tooltip"},{default:D(()=>[nn(_e(c.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),$t=or,rr=S({__name:"TooltipContentHoverable",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},setup(e){const n=Ft(e),{forwardRef:o,currentElement:r}=j(),{trigger:i,onClose:s}=ke(),a=Re(),{isPointerInTransit:c,onPointerExit:f}=gn(i,r);return a.isPointerInTransitRef=c,f(()=>{s()}),(l,d)=>(T(),R($t,Q({ref:y(o)},y(n)),{default:D(()=>[k(l.$slots,"default")]),_:3},16))}}),ir=rr,sr=S({__name:"TooltipContent",props:{forceMount:{type:Boolean,required:!1},ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=ke(),i=Ye(n,o),{forwardRef:s}=j();return(a,c)=>(T(),R(y(Yt),{present:a.forceMount||y(r).open.value},{default:D(()=>[(T(),R(He(y(r).disableHoverableContent.value?$t:ir),Q({ref:y(s)},y(i)),{default:D(()=>[k(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),ar=sr,lr=S({__name:"TooltipPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(n,o)=>(T(),R(y(En),Te(De(t)),{default:D(()=>[k(n.$slots,"default")]),_:3},16))}}),ur=lr,cr=S({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,n=ke(),o=Re();n.contentId||(n.contentId=Mt(void 0,"reka-tooltip-content"));const{forwardRef:r,currentElement:i}=j(),s=B(!1),a=B(!1),c=_(()=>n.disabled.value?{}:{click:g,focus:u,pointermove:d,pointerleave:p,pointerdown:l,blur:h});Ue(()=>{n.onTriggerChange(i.value)});function f(){setTimeout(()=>{s.value=!1},1)}function l(){n.open&&!n.disableClosingTrigger.value&&n.onClose(),s.value=!0,document.addEventListener("pointerup",f,{once:!0})}function d(v){v.pointerType!=="touch"&&!a.value&&!o.isPointerInTransitRef.value&&(n.onTriggerEnter(),a.value=!0)}function p(){n.onTriggerLeave(),a.value=!1}function u(v){var m,w;s.value||n.ignoreNonKeyboardFocus.value&&!((w=(m=v.target).matches)!=null&&w.call(m,":focus-visible"))||n.onOpen()}function h(){n.onClose()}function g(){n.disableClosingTrigger.value||n.onClose()}return(v,m)=>(T(),R(y(Nn),{"as-child":"",reference:v.reference},{default:D(()=>[G(y(ge),Q({ref:y(r),"aria-describedby":y(n).open.value?y(n).contentId:void 0,"data-state":y(n).stateAttribute.value,as:v.as,"as-child":t.asChild,"data-grace-area-trigger":""},rn(c.value)),{default:D(()=>[k(v.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),dr=cr;const fr=S({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Ye(e,t);return(i,s)=>(T(),R(y(nr),Q({"data-slot":"tooltip"},y(r)),{default:D(a=>[k(i.$slots,"default",Te(De(a)))]),_:3},16))}}),pr=S({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=ln(n,"class"),i=Ye(r,o);return(s,a)=>(T(),R(y(ur),null,{default:D(()=>[G(y(ar),Q({"data-slot":"tooltip-content"},{...y(i),...s.$attrs},{class:y(We)("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",n.class)}),{default:D(()=>[k(s.$slots,"default"),G(y(Go),{class:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px]"})]),_:3},16,["class"])]),_:3}))}}),hr=S({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean},content:{}},setup(e){const t=e;return(n,o)=>(T(),R(y(Zo),Te(De(t)),{default:D(()=>[k(n.$slots,"default")]),_:3},16))}}),gr=S({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(T(),R(y(dr),Q({"data-slot":"tooltip-trigger"},t),{default:D(()=>[k(n.$slots,"default")]),_:3},16))}}),yr={key:0},vr={class:"text-xs"},mr={key:0},Or=S({__name:"TrustBadge",props:{status:{},count:{},reason:{},compact:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n={validated:{icon:un,label:"Validated",cls:"border-status-success/30 bg-status-success/10 text-status-success"},warning:{icon:an,label:"warnings",cls:"border-status-warning/30 bg-status-warning/10 text-status-warning"},blocked:{icon:cn,label:"Blocked",cls:"border-status-error/30 bg-status-error/10 text-status-error"},partial:{icon:sn,label:"Partial",cls:"border-status-info/30 bg-status-info/10 text-status-info"},pending:{icon:dn,label:"Pending review",cls:"border-border bg-muted/50 text-muted-foreground"}},o=_(()=>n[t.status]),r=_(()=>t.status==="warning"&&t.count!==void 0?`${t.count} warning${t.count!==1?"s":""}`:o.value.label),i=_(()=>{if(t.status==="blocked"&&t.reason)return t.reason;if(t.compact)return r.value});return(s,a)=>i.value?(T(),R(y(hr),{key:0},{default:D(()=>[G(y(fr),null,{default:D(()=>[G(y(gr),{"as-child":""},{default:D(()=>[st("span",{"data-slot":"trust-badge",class:it(y(We)("inline-flex items-center justify-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap shrink-0 transition-colors",e.compact&&"px-1.5",o.value.cls,t.class))},[(T(),R(He(o.value.icon),{class:"size-3 shrink-0"})),e.compact?Me("",!0):(T(),ae("span",yr,_e(r.value),1))],2)]),_:1}),G(y(pr),null,{default:D(()=>[st("p",vr,_e(i.value),1)]),_:1})]),_:1})]),_:1})):(T(),ae("span",{key:1,"data-slot":"trust-badge",class:it(y(We)("inline-flex items-center justify-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap shrink-0 transition-colors",e.compact&&"px-1.5",o.value.cls,t.class))},[(T(),R(He(o.value.icon),{class:"size-3 shrink-0"})),e.compact?Me("",!0):(T(),ae("span",mr,_e(r.value),1))],2))}});export{dn as C,Dn as D,Ln as P,En as T,Bn as V,Or as _,jo as a,Nn as b,hr as c,fr as d,gr as e,pr as f,hn as g,_t as h,fn as i};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{c as S,a as ce,i as ue,p as u,j as t,e as n,u as e,q as a,L as J,g as f,s as m,B as l,F as k,y as g,z as w,x as L,h as y,r as h,E as ve,o,Q as T,Y as A,b as _,A as U,C as me}from"./index-CoUshYEB.js";import{d as fe,u as _e}from"./useWatch-COpVIQvm.js";import{u as xe}from"./content-BQE3NEm5.js";import{_ as pe,a as C}from"./PageHeader.vue_vue_type_script_setup_true_lang-C7aWxNSw.js";import{_ as ye}from"./StudioHint.vue_vue_type_script_setup_true_lang-B45TG2r1.js";import{_ as K,a as D}from"./AgentPromptGroup.vue_vue_type_script_setup_true_lang-Dy-5bpEY.js";import{_ as b}from"./index-WHgvdYOs.js";import{_ as ge}from"./TrustBadge.vue_vue_type_script_setup_true_lang-CgoQGS6k.js";import{_ as z,a as M,b as X,c as ee,d as te}from"./CollapsibleTrigger.vue_vue_type_script_setup_true_lang-C4oejwcu.js";import{_ as se}from"./Separator.vue_vue_type_script_setup_true_lang-fePFl24S.js";import{S as he}from"./shield-check-CUL7KkSA.js";import{D as ae}from"./database-BGEFn4Oq.js";import{C as le}from"./chevron-down-B9YdCtsj.js";import"./useId-C0uR6mdj.js";import"./Presence-cbB6AqkQ.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const G=S("CircleAlertIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
7
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const be=S("FileWarningIcon",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
12
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const ke=S("FilterIcon",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
17
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const we=S("ListChecksIcon",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]),ze={key:0,class:"text-xs text-muted-foreground tabular-nums"},Ce={class:"px-6 py-6 space-y-6"},$e={key:0,class:"flex justify-center py-12"},je={key:1,class:"flex items-center gap-2 text-sm text-muted-foreground"},Ie={class:"grid grid-cols-2 gap-3 lg:grid-cols-5"},Me={class:"flex size-10 items-center justify-center rounded-lg bg-status-error/10"},Fe={class:"text-2xl font-bold tabular-nums"},Ve={class:"text-xs text-muted-foreground"},qe={class:"flex size-10 items-center justify-center rounded-lg bg-status-warning/10"},Be={class:"text-2xl font-bold tabular-nums"},Le={class:"text-xs text-muted-foreground"},Ae={class:"flex size-10 items-center justify-center rounded-lg bg-status-info/10"},De={class:"text-2xl font-bold tabular-nums"},Se={class:"text-xs text-muted-foreground"},Ne={class:"flex size-10 items-center justify-center rounded-lg bg-status-success/10"},We={class:"text-2xl font-bold tabular-nums"},Ee={class:"text-xs text-muted-foreground"},Oe={class:"flex size-10 items-center justify-center rounded-lg bg-muted"},Te={class:"text-2xl font-bold tabular-nums"},Ue={class:"text-xs text-muted-foreground"},Ge={key:0,class:"flex flex-col items-center py-16 text-center"},He={class:"flex size-20 items-center justify-center rounded-full bg-status-success/10 mb-4"},Pe={class:"text-xl font-semibold"},Qe={class:"mt-2 text-sm text-muted-foreground max-w-sm"},Re={class:"mt-6 w-full max-w-md"},Ye={class:"flex items-center gap-2 flex-wrap"},Ze={class:"flex items-center border rounded-md overflow-hidden mr-2"},Je={key:0,class:"space-y-4"},Ke={class:"flex items-center gap-3"},Xe={class:"flex size-8 items-center justify-center rounded-md bg-primary/10"},et={class:"font-medium text-sm font-mono"},tt={class:"divide-y divide-border"},st={class:"flex-1 min-w-0"},at={class:"flex items-center gap-2 flex-wrap"},lt={key:0,class:"font-mono text-xs text-muted-foreground"},nt={key:1,class:"font-mono text-xs text-muted-foreground"},ot={class:"mt-1.5 text-sm text-foreground"},rt={key:0,class:"space-y-4"},it={class:"flex items-center gap-3"},dt={class:"font-medium text-sm"},ct={class:"divide-y divide-border"},ut={class:"flex-1 min-w-0"},vt={class:"flex items-center gap-2 flex-wrap"},mt={key:1,class:"font-mono text-xs text-muted-foreground"},ft={key:2,class:"font-mono text-xs text-muted-foreground"},_t={class:"mt-1.5 text-sm text-foreground"},xt={key:1,class:"flex flex-col items-center py-12 text-center"},pt={class:"text-sm text-muted-foreground"},Lt=ce({__name:"ValidatePage",setup(yt){const F=xe(),ne=me(),r=fe("serve-ui-texts").locale("en").get(),x=y(()=>F.validation),$=y(()=>{var i;return(i=x.value)==null?void 0:i.summary}),j=y(()=>{var i;return((i=x.value)==null?void 0:i.issues)??[]}),V=h(!0),q=h(!0),B=h(!0),I=h("severity"),oe=h(!0),re=h(!0),ie=h(!0),p={error:{icon:G,color:"text-status-error",bg:"bg-status-error/10",border:"border-status-error/20",label:r["validate.errors"]},warning:{icon:T,color:"text-status-warning",bg:"bg-status-warning/10",border:"border-status-warning/20",label:r["validate.warnings"]},notice:{icon:A,color:"text-status-info",bg:"bg-status-info/10",border:"border-status-info/20",label:r["validate.notices"]}},N=y(()=>j.value.filter(i=>i.severity==="error")),W=y(()=>j.value.filter(i=>i.severity==="warning")),E=y(()=>j.value.filter(i=>i.severity==="notice")),H=y(()=>{const i=[];return V.value&&N.value.length>0&&i.push({severity:"error",issues:N.value,open:oe}),q.value&&W.value.length>0&&i.push({severity:"warning",issues:W.value,open:re}),B.value&&E.value.length>0&&i.push({severity:"notice",issues:E.value,open:ie}),i}),de=y(()=>H.value.length>0),P=y(()=>{const i=new Map;for(const v of j.value){const s=v.model??"unknown";i.has(s)||i.set(s,[]),i.get(s).push(v)}return[...i.entries()].toSorted((v,s)=>s[1].length-v[1].length)}),O=h(null);async function Q(){try{await F.fetchValidation(),O.value=new Date}catch{ve.error("Failed to load validation results.")}}return _e(i=>{i.type==="validation:updated"&&Q()}),ue(()=>{Q()}),(i,v)=>(o(),u("div",null,[t(pe,{title:e(r)["validate.validation"],description:e(r)["validate.content-quality-report"]},{actions:n(()=>{var s,d,c;return[t(e(ge),{status:(s=x.value)!=null&&s.valid?"validated":x.value?"warning":"pending",count:(((d=x.value)==null?void 0:d.summary.errors)??0)+(((c=x.value)==null?void 0:c.summary.warnings)??0)},null,8,["status","count"]),O.value?(o(),u("span",ze,l(e(r)["validate.updated"])+" "+l(O.value.toLocaleTimeString()),1)):f("",!0)]}),_:1},8,["title","description"]),a("div",Ce,[e(F).loading&&!x.value?(o(),u("div",$e,[t(e(J),{class:"size-6 animate-spin text-primary"})])):f("",!0),e(F).loading&&x.value?(o(),u("div",je,[t(e(J),{class:"size-4 animate-spin text-primary"}),m(" "+l(e(r)["validate.refreshing-validation"]),1)])):f("",!0),x.value?(o(),u(k,{key:2},[a("div",Ie,[t(e(z),{class:"border-status-error/20"},{default:n(()=>[t(e(M),{class:"flex items-center gap-3 p-4"},{default:n(()=>{var s;return[a("div",Me,[t(e(G),{class:"size-5 text-status-error"})]),a("div",null,[a("div",Fe,l(((s=$.value)==null?void 0:s.errors)??0),1),a("div",Ve,l(e(r)["validate.errors"]),1)])]}),_:1})]),_:1}),t(e(z),{class:"border-status-warning/20"},{default:n(()=>[t(e(M),{class:"flex items-center gap-3 p-4"},{default:n(()=>{var s;return[a("div",qe,[t(e(T),{class:"size-5 text-status-warning"})]),a("div",null,[a("div",Be,l(((s=$.value)==null?void 0:s.warnings)??0),1),a("div",Le,l(e(r)["validate.warnings"]),1)])]}),_:1})]),_:1}),t(e(z),{class:"border-status-info/20"},{default:n(()=>[t(e(M),{class:"flex items-center gap-3 p-4"},{default:n(()=>{var s;return[a("div",Ae,[t(e(A),{class:"size-5 text-status-info"})]),a("div",null,[a("div",De,l(((s=$.value)==null?void 0:s.notices)??0),1),a("div",Se,l(e(r)["validate.notices"]),1)])]}),_:1})]),_:1}),t(e(z),null,{default:n(()=>[t(e(M),{class:"flex items-center gap-3 p-4"},{default:n(()=>{var s;return[a("div",Ne,[t(e(ae),{class:"size-5 text-status-success"})]),a("div",null,[a("div",We,l(((s=$.value)==null?void 0:s.models_checked)??0),1),a("div",Ee,l(e(r)["validate.models"]),1)])]}),_:1})]),_:1}),t(e(z),null,{default:n(()=>[t(e(M),{class:"flex items-center gap-3 p-4"},{default:n(()=>{var s;return[a("div",Oe,[t(e(we),{class:"size-5 text-muted-foreground"})]),a("div",null,[a("div",Te,l(((s=$.value)==null?void 0:s.entries_checked)??0),1),a("div",Ue,l(e(r)["validate.entries"]),1)])]}),_:1})]),_:1})]),j.value.length===0?(o(),u("div",Ge,[a("div",He,[t(e(he),{class:"size-10 text-status-success"})]),a("h2",Pe,l(e(r)["validate.all-checks-passed"]),1),a("p",Qe,l(e(r)["validate.your-content-and-models"]),1),a("div",Re,[t(K,{title:e(r)["validate.ask-your-agent"]},{default:n(()=>[t(D,{prompt:e(r)["validate.validate-my-content-models"],label:"re-validate"},null,8,["prompt"]),t(D,{prompt:e(r)["validate.check-content-quality-and"],label:e(r)["validate.quality-check"]},null,8,["prompt","label"])]),_:1},8,["title"])])])):(o(),u(k,{key:1},[a("div",Ye,[t(e(ke),{class:"size-4 text-muted-foreground"}),a("div",Ze,[t(e(C),{variant:"ghost",size:"sm",class:g(e(w)("px-2.5 py-1 h-auto text-xs font-medium rounded-none transition-colors",I.value==="severity"?"bg-primary text-primary-foreground":"hover:bg-muted")),onClick:v[0]||(v[0]=s=>I.value="severity")},{default:n(()=>[m(l(e(r)["validate.by-severity"]),1)]),_:1},8,["class"]),t(e(C),{variant:"ghost",size:"sm",class:g(e(w)("px-2.5 py-1 h-auto text-xs font-medium rounded-none transition-colors",I.value==="model"?"bg-primary text-primary-foreground":"hover:bg-muted")),onClick:v[1]||(v[1]=s=>I.value="model")},{default:n(()=>[m(l(e(r)["validate.by-model"]),1)]),_:1},8,["class"])]),t(e(C),{variant:V.value?"default":"outline",size:"sm",class:"h-7 text-xs",onClick:v[2]||(v[2]=s=>V.value=!V.value)},{default:n(()=>[t(e(G),{class:"mr-1 size-3"}),m(" "+l(e(r)["validate.errors-2"])+l(N.value.length)+") ",1)]),_:1},8,["variant"]),t(e(C),{variant:q.value?"default":"outline",size:"sm",class:"h-7 text-xs",onClick:v[3]||(v[3]=s=>q.value=!q.value)},{default:n(()=>[t(e(T),{class:"mr-1 size-3"}),m(" "+l(e(r)["validate.warnings-2"])+l(W.value.length)+") ",1)]),_:1},8,["variant"]),t(e(C),{variant:B.value?"default":"outline",size:"sm",class:"h-7 text-xs",onClick:v[4]||(v[4]=s=>B.value=!B.value)},{default:n(()=>[t(e(A),{class:"mr-1 size-3"}),m(" "+l(e(r)["validate.notices-2"])+l(E.value.length)+") ",1)]),_:1},8,["variant"])]),t(K,{title:e(r)["validate.ask-your-agent"]},{default:n(()=>[t(D,{prompt:e(r)["validate.fix-all-validation-errors"],label:"auto-fix"},null,8,["prompt"]),t(D,{prompt:e(r)["validate.review-and-fix-validation"],label:e(r)["validate.fix-warnings"]},null,8,["prompt","label"])]),_:1},8,["title"]),I.value==="model"?(o(),u("div",Je,[(o(!0),u(k,null,L(P.value,([s,d])=>(o(),_(e(te),{key:s,"default-open":P.value.length<=5},{default:n(()=>[t(e(z),null,{default:n(()=>[t(e(X),{class:"flex w-full items-center justify-between p-4 hover:bg-muted/50 transition-colors rounded-t-lg"},{default:n(()=>[a("div",Ke,[a("div",Xe,[t(e(ae),{class:"size-4 text-primary"})]),a("span",et,l(s),1),t(e(b),{variant:"secondary",class:"text-[10px]"},{default:n(()=>[m(l(d.length),1)]),_:2},1024),d.filter(c=>c.severity==="error").length>0?(o(),_(e(b),{key:0,variant:"destructive",class:"text-[10px]"},{default:n(()=>[m(l(d.filter(c=>c.severity==="error").length)+"E ",1)]),_:2},1024)):f("",!0),d.filter(c=>c.severity==="warning").length>0?(o(),_(e(b),{key:1,variant:"outline",class:"text-[10px] border-status-warning/50 text-status-warning"},{default:n(()=>[m(l(d.filter(c=>c.severity==="warning").length)+"W ",1)]),_:2},1024)):f("",!0)]),t(e(le),{class:"size-4 text-muted-foreground transition-transform"})]),_:2},1024),t(e(ee),null,{default:n(()=>[t(e(se)),a("div",tt,[(o(!0),u(k,null,L(d,(c,R)=>{var Y,Z;return o(),u("div",{key:R,class:"flex items-start gap-3 p-4"},[(o(),_(U(((Y=p[c.severity])==null?void 0:Y.icon)??e(A)),{class:g(e(w)("mt-0.5 size-4 shrink-0",((Z=p[c.severity])==null?void 0:Z.color)??"text-muted-foreground"))},null,8,["class"])),a("div",st,[a("div",at,[t(e(b),{variant:c.severity==="error"?"destructive":"secondary",class:"text-[10px] uppercase"},{default:n(()=>[m(l(c.severity),1)]),_:2},1032,["variant"]),c.entry?(o(),u("span",lt,l(c.entry),1)):f("",!0),c.field?(o(),u("span",nt,"."+l(c.field),1)):f("",!0),c.locale?(o(),_(e(b),{key:2,variant:"outline",class:"text-[10px]"},{default:n(()=>[m(l(c.locale),1)]),_:2},1024)):f("",!0)]),a("p",ot,l(c.message),1)])])}),128))])]),_:2},1024)]),_:2},1024)]),_:2},1032,["default-open"]))),128))])):(o(),u(k,{key:1},[de.value?(o(),u("div",rt,[(o(!0),u(k,null,L(H.value,s=>(o(),_(e(te),{key:s.severity,open:s.open.value,"onUpdate:open":d=>s.open.value=d},{default:n(()=>[t(e(z),null,{default:n(()=>[t(e(X),{class:"flex w-full items-center justify-between p-4 hover:bg-muted/50 transition-colors rounded-t-lg"},{default:n(()=>[a("div",it,[a("div",{class:g(e(w)("flex size-8 items-center justify-center rounded-md",p[s.severity].bg))},[(o(),_(U(p[s.severity].icon),{class:g(e(w)("size-4",p[s.severity].color))},null,8,["class"]))],2),a("span",dt,l(p[s.severity].label),1),t(e(b),{variant:"secondary",class:"text-[10px]"},{default:n(()=>[m(l(s.issues.length),1)]),_:2},1024)]),t(e(le),{class:g(["size-4 text-muted-foreground transition-transform",s.open.value&&"rotate-180"])},null,8,["class"])]),_:2},1024),t(e(ee),null,{default:n(()=>[t(e(se)),a("div",ct,[(o(!0),u(k,null,L(s.issues,(d,c)=>(o(),u("div",{key:c,class:g(e(w)("flex items-start gap-3 p-4",p[s.severity].bg))},[(o(),_(U(p[s.severity].icon),{class:g(e(w)("mt-0.5 size-4 shrink-0",p[s.severity].color))},null,8,["class"])),a("div",ut,[a("div",vt,[t(e(b),{variant:d.severity==="error"?"destructive":"secondary",class:"text-[10px] uppercase"},{default:n(()=>[m(l(d.severity),1)]),_:2},1032,["variant"]),d.model?(o(),_(e(C),{key:0,variant:"ghost",size:"sm",class:"h-auto font-mono text-xs text-primary hover:underline bg-muted px-1.5 py-0.5 rounded",onClick:R=>e(ne).push(`/content/${d.model}`)},{default:n(()=>[m(l(d.model),1)]),_:2},1032,["onClick"])):f("",!0),d.entry?(o(),u("span",mt,l(d.entry),1)):f("",!0),d.field?(o(),u("span",ft," ."+l(d.field),1)):f("",!0),d.locale?(o(),_(e(b),{key:3,variant:"outline",class:"text-[10px]"},{default:n(()=>[m(l(d.locale),1)]),_:2},1024)):f("",!0)]),a("p",_t,l(d.message),1)])],2))),128))])]),_:2},1024)]),_:2},1024)]),_:2},1032,["open","onUpdate:open"]))),128))])):(o(),u("div",xt,[t(e(be),{class:"size-8 text-muted-foreground mb-3"}),a("p",pt,l(e(r)["validate.all-issue-types-are"]),1)]))],64))],64))],64)):f("",!0),t(ye,{message:e(r)["validate.validation-results-update-automatically"],class:"mt-4"},null,8,["message"])])]))}});export{Lt as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as o}from"./index-CoUshYEB.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const r=o("ArrowDownIcon",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);export{r as A};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as e}from"./index-CoUshYEB.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const r=e("ArrowLeftIcon",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);export{r as A};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as a}from"./index-CoUshYEB.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=a("BookMarkedIcon",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);export{e as B};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as a}from"./index-CoUshYEB.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=a("BookOpenIcon",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);export{e as B};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as a}from"./index-CoUshYEB.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const o=a("BoxIcon",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);export{o as B};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as o}from"./index-CoUshYEB.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=o("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);export{e as C};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as o}from"./index-CoUshYEB.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=o("ChevronRightIcon",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);export{e as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as C,r as n}from"./index-CoUshYEB.js";import{j as L}from"./useWatch-COpVIQvm.js";const V=C("content",()=>{const e=L(),o=n(null),u=n(null),c=n(null),f=n([]),v=n(null),a=n(!1),i=n(null);async function d(t,l,h,p){a.value=!0;try{const r=new URLSearchParams;l&&r.set("locale",l),h!==void 0&&r.set("limit",String(h)),p!==void 0&&r.set("offset",String(p));const m=r.toString();o.value=await e.get(`/content/${t}${m?`?${m}`:""}`)}finally{a.value=!1}}async function g(t){a.value=!0;try{u.value=await e.get(`/describe/${t}`)}finally{a.value=!1}}async function b(t){a.value=!0;try{c.value=await e.get(`/validate${t?`?model=${t}`:""}`)}finally{a.value=!1}}async function w(){a.value=!0;try{c.value=await e.get("/validate?fix=true")}finally{a.value=!1}}async function z(){a.value=!0;try{const t=await e.get("/branches");f.value=t.branches}finally{a.value=!1}}async function $(t){a.value=!0;try{v.value=await e.get(`/branches/diff?name=${encodeURIComponent(t)}`)}finally{a.value=!1}}const y=n([]);async function S(t=50){a.value=!0;try{const l=await e.get(`/history?limit=${t}`);y.value=l.entries}finally{a.value=!1}}async function j(t){return e.post("/branches/approve",{branch:t})}async function P(t){return e.post("/branches/reject",{branch:t})}const s=n(null);async function B(){try{const t=await e.get("/normalize/plan");s.value=t.plan}catch{s.value=null}}async function D(){try{i.value=await e.get("/normalize/results")}catch{i.value=null}}async function R(t){return e.post("/normalize/plan/approve",t?{models:t}:{})}async function x(){return e.post("/normalize/plan/reject",{})}return{contentList:o,modelDescription:u,validation:c,branches:f,branchDiff:v,history:y,normalizePlan:s,loading:a,normalizeResults:i,fetchContent:d,fetchModelDescription:g,fetchValidation:b,fetchValidationWithFix:w,fetchBranches:z,fetchBranchDiff:$,fetchHistory:S,approveBranch:j,rejectBranch:P,fetchNormalizePlan:B,fetchNormalizeResults:D,approvePlan:R,rejectPlan:x}});export{V as u};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as e}from"./index-CoUshYEB.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const c=e("DatabaseIcon",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);export{c as D};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as a}from"./index-CoUshYEB.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const t=a("FileCodeIcon",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);export{t as F};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as e}from"./index-CoUshYEB.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const t=e("FileTextIcon",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);export{t as F};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}export{t as g};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c}from"./index-CoUshYEB.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const r=c("GitBranchIcon",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);export{r as G};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c}from"./index-CoUshYEB.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const r=c("GitMergeIcon",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);export{r as G};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as y}from"./index-CoUshYEB.js";/**
|
|
2
|
+
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const x=y("HashIcon",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);export{x as H};
|