contentrain 0.1.0 → 0.1.3

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.
Files changed (59) hide show
  1. package/README.md +10 -3
  2. package/dist/index.mjs +2 -1
  3. package/dist/serve-ui/assets/{AgentPromptGroup.vue_vue_type_script_setup_true_lang-Dy-5bpEY.js → AgentPromptGroup.vue_vue_type_script_setup_true_lang-BMp7LstJ.js} +1 -1
  4. package/dist/serve-ui/assets/{AppLayout-CJFq2ApF.js → AppLayout-DVU3pVVx.js} +1 -1
  5. package/dist/serve-ui/assets/{BranchDetailPage-DzSu3JlE.js → BranchDetailPage-0mjYT8hQ.js} +1 -1
  6. package/dist/serve-ui/assets/{BranchesPage-ZSG-l44J.js → BranchesPage-CD87MWWL.js} +1 -1
  7. package/dist/serve-ui/assets/{CollapsibleTrigger.vue_vue_type_script_setup_true_lang-C4oejwcu.js → CollapsibleTrigger.vue_vue_type_script_setup_true_lang-J5CJUyNC.js} +1 -1
  8. package/dist/serve-ui/assets/{Collection-zzx9pNd2.js → Collection-Ba6qM261.js} +1 -1
  9. package/dist/serve-ui/assets/ConfigProvider-RwBwhpvF.js +1 -0
  10. package/dist/serve-ui/assets/ContentListPage-BOo6tllk.js +109 -0
  11. package/dist/serve-ui/assets/ContentListPage-tCu3OQw5.css +1 -0
  12. package/dist/serve-ui/assets/{ContentPage-4sQsAlY2.js → ContentPage-s5AH95JG.js} +1 -1
  13. package/dist/serve-ui/assets/{DashboardPage-CZDlnvAE.js → DashboardPage-RZb06SoC.js} +1 -1
  14. package/dist/serve-ui/assets/{DialogTitle.vue_vue_type_script_setup_true_lang-CBu_dmA6.js → DialogTitle.vue_vue_type_script_setup_true_lang-CmziXzbX.js} +1 -1
  15. package/dist/serve-ui/assets/{Input.vue_vue_type_script_setup_true_lang-otPltlZG.js → Input.vue_vue_type_script_setup_true_lang-BM6hi7u6.js} +1 -1
  16. package/dist/serve-ui/assets/{ModelDetailPage-BMquKCtH.js → ModelDetailPage-BKq0bvlh.js} +1 -1
  17. package/dist/serve-ui/assets/{ModelsPage-C_K-aWXf.js → ModelsPage-B6o55zfN.js} +1 -1
  18. package/dist/serve-ui/assets/{NormalizePage-CHkT6yLV.js → NormalizePage-BNbCNf4k.js} +1 -1
  19. package/dist/serve-ui/assets/{PageHeader.vue_vue_type_script_setup_true_lang-C7aWxNSw.js → PageHeader.vue_vue_type_script_setup_true_lang-C8ntGi1-.js} +1 -1
  20. package/dist/serve-ui/assets/{Presence-cbB6AqkQ.js → Presence-DnRF6qHR.js} +1 -1
  21. package/dist/serve-ui/assets/{Separator.vue_vue_type_script_setup_true_lang-fePFl24S.js → Separator.vue_vue_type_script_setup_true_lang-KWrsPkDE.js} +1 -1
  22. package/dist/serve-ui/assets/{StudioHint.vue_vue_type_script_setup_true_lang-B45TG2r1.js → StudioHint.vue_vue_type_script_setup_true_lang-C0ksRF07.js} +1 -1
  23. package/dist/serve-ui/assets/{TrustBadge.vue_vue_type_script_setup_true_lang-CgoQGS6k.js → TrustBadge.vue_vue_type_script_setup_true_lang-CPVK2uFu.js} +1 -1
  24. package/dist/serve-ui/assets/{ValidatePage-BW8DO6WC.js → ValidatePage-Dk5IdJ1E.js} +1 -1
  25. package/dist/serve-ui/assets/{arrow-down-DqOfGL7C.js → arrow-down-Cil3QmGC.js} +1 -1
  26. package/dist/serve-ui/assets/{arrow-left-BRvgeveW.js → arrow-left-BgRAFAbm.js} +1 -1
  27. package/dist/serve-ui/assets/{book-marked-D8StxRZP.js → book-marked-D_7zWMoS.js} +1 -1
  28. package/dist/serve-ui/assets/{book-open-BrGAe3tk.js → book-open-BMIAduGI.js} +1 -1
  29. package/dist/serve-ui/assets/{box-7olVZr5D.js → box-DTosQIFW.js} +1 -1
  30. package/dist/serve-ui/assets/{chevron-down-B9YdCtsj.js → chevron-down-BU7Oh9xS.js} +1 -1
  31. package/dist/serve-ui/assets/{chevron-right-DFKsmZVd.js → chevron-right-BrS8cLgS.js} +1 -1
  32. package/dist/serve-ui/assets/{content-BQE3NEm5.js → content-9wt2LBkC.js} +1 -1
  33. package/dist/serve-ui/assets/{database-BGEFn4Oq.js → database-wAPnOXAq.js} +1 -1
  34. package/dist/serve-ui/assets/{file-code-BGiS4dun.js → file-code-DbO-oPNK.js} +1 -1
  35. package/dist/serve-ui/assets/{file-text-BDHXQ95W.js → file-text-B83xaNeI.js} +1 -1
  36. package/dist/serve-ui/assets/{git-branch-DdE7bk9-.js → git-branch-D_wEQy04.js} +1 -1
  37. package/dist/serve-ui/assets/{git-merge-iStuJS69.js → git-merge-CK4R9if8.js} +1 -1
  38. package/dist/serve-ui/assets/{hash-B-ibLpM1.js → hash-DOFJZrkk.js} +1 -1
  39. package/dist/serve-ui/assets/{index-CoUshYEB.js → index-BL1I-H3q.js} +2 -2
  40. package/dist/serve-ui/assets/index-CG5NtNtt.css +1 -0
  41. package/dist/serve-ui/assets/{index-WHgvdYOs.js → index-cUml-HE9.js} +1 -1
  42. package/dist/serve-ui/assets/{languages-BTcd2Rl1.js → languages-CXKcy1-I.js} +1 -1
  43. package/dist/serve-ui/assets/{plus-D8Nd3YnG.js → plus-yXR6ZCCF.js} +1 -1
  44. package/dist/serve-ui/assets/{project-B1qSm0Fz.js → project-Cr3_1TVE.js} +1 -1
  45. package/dist/serve-ui/assets/{scan-search-DGPL_VJu.js → scan-search-DHnQpSxc.js} +1 -1
  46. package/dist/serve-ui/assets/{settings-DL-0RaxD.js → settings-DQbK7D0N.js} +1 -1
  47. package/dist/serve-ui/assets/{shield-check-CUL7KkSA.js → shield-check-WNk6I8NY.js} +1 -1
  48. package/dist/serve-ui/assets/{trash-2-83QhL6-T.js → trash-2-B7ngAUqJ.js} +1 -1
  49. package/dist/serve-ui/assets/useDirection-JtiaofuP.js +1 -0
  50. package/dist/serve-ui/assets/{useId-C0uR6mdj.js → useId-Bc2_q_4f.js} +1 -1
  51. package/dist/serve-ui/assets/{useNonce-DTGvzOJz.js → useNonce-BJjEh3mR.js} +1 -1
  52. package/dist/serve-ui/assets/{useWatch-COpVIQvm.js → useWatch-CEXwnJFx.js} +1 -1
  53. package/dist/serve-ui/index.html +2 -2
  54. package/package.json +12 -8
  55. package/dist/serve-ui/assets/ConfigProvider-BGjDLViI.js +0 -1
  56. package/dist/serve-ui/assets/ContentListPage-DTFaQB8N.js +0 -51
  57. package/dist/serve-ui/assets/ContentListPage-vXxAeSg8.css +0 -1
  58. package/dist/serve-ui/assets/index-C-RjMzFm.css +0 -1
  59. package/dist/serve-ui/assets/useDirection-Cd3C7VdT.js +0 -1
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # `contentrain`
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/contentrain?label=contentrain)](https://www.npmjs.com/package/contentrain)
4
+ [![GitHub source](https://img.shields.io/badge/source-Contentrain%2Fai-181717?logo=github)](https://github.com/Contentrain/ai/tree/main/packages/cli)
5
+
3
6
  CLI for Contentrain.
4
7
 
5
8
  `contentrain` is the local operations surface for a Contentrain project:
@@ -13,9 +16,9 @@ CLI for Contentrain.
13
16
 
14
17
  This package is the human-facing companion to:
15
18
 
16
- - [`@contentrain/mcp`](https://github.com/contentrain/contentrain-ai/tree/main/packages/mcp) for deterministic content operations
17
- - [`@contentrain/query`](https://github.com/contentrain/contentrain-ai/tree/main/packages/sdk/js) for generated runtime queries
18
- - [`@contentrain/rules`](https://github.com/contentrain/contentrain-ai/tree/main/packages/rules) and [`@contentrain/skills`](https://github.com/contentrain/contentrain-ai/tree/main/packages/skills) for agent guidance
19
+ - [`@contentrain/mcp`](https://github.com/Contentrain/ai/tree/main/packages/mcp) for deterministic content operations
20
+ - [`@contentrain/query`](https://github.com/Contentrain/ai/tree/main/packages/sdk/js) for generated runtime queries
21
+ - [`@contentrain/rules`](https://github.com/Contentrain/ai/tree/main/packages/rules) and [`@contentrain/skills`](https://github.com/Contentrain/ai/tree/main/packages/skills) for agent guidance
19
22
 
20
23
  ## 🚀 Install
21
24
 
@@ -157,6 +160,10 @@ to understand:
157
160
 
158
161
  If the target file already exists, Contentrain appends its rules instead of overwriting unrelated content where possible.
159
162
 
163
+ ## 📚 Documentation
164
+
165
+ Full documentation at **[ai.contentrain.io/packages/cli](https://ai.contentrain.io/packages/cli)**.
166
+
160
167
  ## 🛠 Development
161
168
 
162
169
  From the monorepo root:
package/dist/index.mjs CHANGED
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from "citty";
3
+ //#endregion
3
4
  //#region src/index.ts
4
5
  runMain(defineCommand({
5
6
  meta: {
6
7
  name: "contentrain",
7
- version: "0.1.0",
8
+ version: "0.1.3",
8
9
  description: "Contentrain CLI — AI content governance infrastructure"
9
10
  },
10
11
  subCommands: {
@@ -1,4 +1,4 @@
1
- import{c as i,a as p,o as t,p as o,q as s,j as u,u as a,B as n,g as m,b as l,r as x,E as d,f as g}from"./index-CoUshYEB.js";/**
1
+ import{c as i,a as p,o as t,p as o,q as s,j as u,u as a,B as n,g as m,b as l,r as x,E as d,f as g}from"./index-BL1I-H3q.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as re,d as Ae,r as w,w as F,a as E,t as le,o as v,b as g,e as b,f as C,n as G,u as t,m as A,g as N,h as x,i as z,j as k,k as X,l as Y,p as $,q as S,s as M,F as K,v as J,x as ae,R as ve,y as V,z as B,A as he,B as P,C as Le,D as de}from"./index-CoUshYEB.js";import{u as Pe,S as $e,_ as Re}from"./Input.vue_vue_type_script_setup_true_lang-otPltlZG.js";import{u as Z}from"./project-B1qSm0Fz.js";import{_ as oe}from"./index-WHgvdYOs.js";import{B as be}from"./box-7olVZr5D.js";import{F as me}from"./file-text-BDHXQ95W.js";import{S as _e}from"./shield-check-CUL7KkSA.js";import{G as ge}from"./git-branch-DdE7bk9-.js";import{S as Te}from"./scan-search-DGPL_VJu.js";import{u as R,c as ne,a as q,P as Q,b as se,d as Se,w as De}from"./Presence-cbB6AqkQ.js";import{u as Ie}from"./useDirection-Cd3C7VdT.js";import{P as W,r as ye,d as ie,u as we}from"./useWatch-COpVIQvm.js";import{c as ze,u as He}from"./useNonce-DTGvzOJz.js";import"./ConfigProvider-BGjDLViI.js";/**
1
+ import{c as re,d as Ae,r as w,w as F,a as E,t as le,o as v,b as g,e as b,f as C,n as G,u as t,m as A,g as N,h as x,i as z,j as k,k as X,l as Y,p as $,q as S,s as M,F as K,v as J,x as ae,R as ve,y as V,z as B,A as he,B as P,C as Le,D as de}from"./index-BL1I-H3q.js";import{u as Pe,S as $e,_ as Re}from"./Input.vue_vue_type_script_setup_true_lang-BM6hi7u6.js";import{u as Z}from"./project-Cr3_1TVE.js";import{_ as oe}from"./index-cUml-HE9.js";import{B as be}from"./box-DTosQIFW.js";import{F as me}from"./file-text-B83xaNeI.js";import{S as _e}from"./shield-check-WNk6I8NY.js";import{G as ge}from"./git-branch-D_wEQy04.js";import{S as Te}from"./scan-search-DHnQpSxc.js";import{u as R,c as ne,a as q,P as Q,b as se,d as Se,w as De}from"./Presence-DnRF6qHR.js";import{u as Ie}from"./useDirection-JtiaofuP.js";import{P as W,r as ye,d as ie,u as we}from"./useWatch-CEXwnJFx.js";import{c as ze,u as He}from"./useNonce-BJjEh3mR.js";import"./ConfigProvider-RwBwhpvF.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as M,a as w,o as n,b as m,e as s,f as j,m as N,u as e,i as te,z as O,p as f,y as L,j as t,s as d,g as z,E as D,q as u,B as o,L as R,F as T,x as E,h as k,r as A,X as V,C as ue,v as de}from"./index-CoUshYEB.js";import{u as pe}from"./content-BQE3NEm5.js";import{a as C,_ as fe}from"./PageHeader.vue_vue_type_script_setup_true_lang-C7aWxNSw.js";import{_ as me,C as _e,a as W}from"./AgentPromptGroup.vue_vue_type_script_setup_true_lang-Dy-5bpEY.js";import{_ as he}from"./TrustBadge.vue_vue_type_script_setup_true_lang-CgoQGS6k.js";import{_ as G,a as ve,b as ge,c as ye,d as be}from"./CollapsibleTrigger.vue_vue_type_script_setup_true_lang-C4oejwcu.js";import{_ as xe}from"./Separator.vue_vue_type_script_setup_true_lang-fePFl24S.js";import{i as se,D as ke,_ as U,b as X,c as H,d as Z}from"./DialogTitle.vue_vue_type_script_setup_true_lang-CBu_dmA6.js";import{b as ze,u as Ce}from"./useId-C0uR6mdj.js";import{u as ae}from"./Presence-cbB6AqkQ.js";import{P as le,r as we,d as $e}from"./useWatch-COpVIQvm.js";import{A as Be}from"./arrow-left-BRvgeveW.js";import{G as J}from"./git-merge-iStuJS69.js";import{G as K}from"./git-branch-DdE7bk9-.js";import{P as De,M as je}from"./plus-D8Nd3YnG.js";import{F as Fe}from"./file-text-BDHXQ95W.js";import"./shield-check-CUL7KkSA.js";import"./getActiveElement-FUKBWQwh.js";import"./ConfigProvider-BGjDLViI.js";/**
1
+ import{c as M,a as w,o as n,b as m,e as s,f as j,m as N,u as e,i as te,z as O,p as f,y as L,j as t,s as d,g as z,E as D,q as u,B as o,L as R,F as T,x as E,h as k,r as A,X as V,C as ue,v as de}from"./index-BL1I-H3q.js";import{u as pe}from"./content-9wt2LBkC.js";import{a as C,_ as fe}from"./PageHeader.vue_vue_type_script_setup_true_lang-C8ntGi1-.js";import{_ as me,C as _e,a as W}from"./AgentPromptGroup.vue_vue_type_script_setup_true_lang-BMp7LstJ.js";import{_ as he}from"./TrustBadge.vue_vue_type_script_setup_true_lang-CPVK2uFu.js";import{_ as G,a as ve,b as ge,c as ye,d as be}from"./CollapsibleTrigger.vue_vue_type_script_setup_true_lang-J5CJUyNC.js";import{_ as xe}from"./Separator.vue_vue_type_script_setup_true_lang-KWrsPkDE.js";import{i as se,D as ke,_ as U,b as X,c as H,d as Z}from"./DialogTitle.vue_vue_type_script_setup_true_lang-CmziXzbX.js";import{b as ze,u as Ce}from"./useId-Bc2_q_4f.js";import{u as ae}from"./Presence-DnRF6qHR.js";import{P as le,r as we,d as $e}from"./useWatch-CEXwnJFx.js";import{A as Be}from"./arrow-left-BgRAFAbm.js";import{G as J}from"./git-merge-CK4R9if8.js";import{G as K}from"./git-branch-D_wEQy04.js";import{P as De,M as je}from"./plus-yXR6ZCCF.js";import{F as Fe}from"./file-text-B83xaNeI.js";import"./shield-check-WNk6I8NY.js";import"./getActiveElement-FUKBWQwh.js";import"./ConfigProvider-RwBwhpvF.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as he,a as I,t as J,o as d,b as C,e as c,j as p,u as e,f as k,r as $,i as W,l as _e,h as T,K as ye,U as xe,M as we,n as Ce,g as Y,P as Se,H as Te,m as O,z as F,I as Ie,J as ke,p as S,q as m,E as Be,L as K,s as R,B as w,F as U,x as H,y as z,A as X,C as Fe}from"./index-CoUshYEB.js";import{u as qe}from"./content-BQE3NEm5.js";import{P as A,r as D,d as Re,u as $e}from"./useWatch-COpVIQvm.js";import{_ as Ae,a as Z}from"./PageHeader.vue_vue_type_script_setup_true_lang-C7aWxNSw.js";import{_ as Ve}from"./StudioHint.vue_vue_type_script_setup_true_lang-B45TG2r1.js";import{_ as ee,a as E}from"./AgentPromptGroup.vue_vue_type_script_setup_true_lang-Dy-5bpEY.js";import{_ as N}from"./index-WHgvdYOs.js";import{b as le,a as Me,u as ze}from"./useId-C0uR6mdj.js";import{f as ie,c as ue,u as L,P as Pe}from"./Presence-cbB6AqkQ.js";import{u as de}from"./useDirection-Cd3C7VdT.js";import{u as ce,R as Ee}from"./Collection-zzx9pNd2.js";import{g as te}from"./getActiveElement-FUKBWQwh.js";import{G}from"./git-branch-DdE7bk9-.js";import{C as Oe}from"./chevron-right-DFKsmZVd.js";import{S as De}from"./shield-check-CUL7KkSA.js";import{S as Le}from"./scan-search-DGPL_VJu.js";import{D as je}from"./database-BGEFn4Oq.js";import{F as ae}from"./file-text-BDHXQ95W.js";import{S as se}from"./settings-DL-0RaxD.js";import{L as Ke,T as Ue}from"./trash-2-83QhL6-T.js";import{G as He}from"./git-merge-iStuJS69.js";import{B as Ne}from"./box-7olVZr5D.js";import"./ConfigProvider-BGjDLViI.js";/**
1
+ import{c as he,a as I,t as J,o as d,b as C,e as c,j as p,u as e,f as k,r as $,i as W,l as _e,h as T,K as ye,U as xe,M as we,n as Ce,g as Y,P as Se,H as Te,m as O,z as F,I as Ie,J as ke,p as S,q as m,E as Be,L as K,s as R,B as w,F as U,x as H,y as z,A as X,C as Fe}from"./index-BL1I-H3q.js";import{u as qe}from"./content-9wt2LBkC.js";import{P as A,r as D,d as Re,u as $e}from"./useWatch-CEXwnJFx.js";import{_ as Ae,a as Z}from"./PageHeader.vue_vue_type_script_setup_true_lang-C8ntGi1-.js";import{_ as Ve}from"./StudioHint.vue_vue_type_script_setup_true_lang-C0ksRF07.js";import{_ as ee,a as E}from"./AgentPromptGroup.vue_vue_type_script_setup_true_lang-BMp7LstJ.js";import{_ as N}from"./index-cUml-HE9.js";import{b as le,a as Me,u as ze}from"./useId-Bc2_q_4f.js";import{f as ie,c as ue,u as L,P as Pe}from"./Presence-DnRF6qHR.js";import{u as de}from"./useDirection-JtiaofuP.js";import{u as ce,R as Ee}from"./Collection-Ba6qM261.js";import{g as te}from"./getActiveElement-FUKBWQwh.js";import{G}from"./git-branch-D_wEQy04.js";import{C as Oe}from"./chevron-right-BrS8cLgS.js";import{S as De}from"./shield-check-WNk6I8NY.js";import{S as Le}from"./scan-search-DHnQpSxc.js";import{D as je}from"./database-wAPnOXAq.js";import{F as ae}from"./file-text-B83xaNeI.js";import{S as se}from"./settings-DQbK7D0N.js";import{L as Ke,T as Ue}from"./trash-2-B7ngAUqJ.js";import{G as He}from"./git-merge-CK4R9if8.js";import{B as Ne}from"./box-DTosQIFW.js";import"./ConfigProvider-RwBwhpvF.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{a as d,t as N,o as u,b as m,e as c,f as p,u as e,r as v,w as F,i as I,j as M,m as y,g as D,h as w,K as E,p as R,y as x,z as P,I as H,J as j}from"./index-CoUshYEB.js";import{b as S,a as V}from"./useId-C0uR6mdj.js";import{f as z,u as B,c as J,k as K,P as L}from"./Presence-cbB6AqkQ.js";import{P as $}from"./useWatch-COpVIQvm.js";const[T,G]=J("CollapsibleRoot");var Q=d({__name:"CollapsibleRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:open"],setup(n,{expose:l,emit:a}){const o=n,r=z(o,"open",a,{defaultValue:o.defaultOpen,passive:o.open===void 0}),{disabled:i,unmountOnHide:f}=N(o);return G({contentId:"",disabled:i,open:r,unmountOnHide:f,onOpenToggle:()=>{i.value||(r.value=!r.value)}}),l({open:r}),B(),(_,C)=>(u(),m(e($),{as:_.as,"as-child":o.asChild,"data-state":e(r)?"open":"closed","data-disabled":e(i)?"":void 0},{default:c(()=>[p(_.$slots,"default",{open:e(r)})]),_:3},8,["as","as-child","data-state","data-disabled"]))}}),U=Q,W=d({inheritAttrs:!1,__name:"CollapsibleContent",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["contentFound"],setup(n,{emit:l}){const a=n,o=l,s=T();s.contentId||(s.contentId=S(void 0,"reka-collapsible-content"));const r=v(),{forwardRef:i,currentElement:f}=B(),_=v(0),C=v(0),O=w(()=>s.open.value),h=v(O.value),b=v();F(()=>{var t;return[O.value,(t=r.value)==null?void 0:t.present]},async()=>{await E();const t=f.value;if(!t)return;b.value=b.value||{transitionDuration:t.style.transitionDuration,animationName:t.style.animationName},t.style.transitionDuration="0s",t.style.animationName="none";const g=t.getBoundingClientRect();C.value=g.height,_.value=g.width,h.value||(t.style.transitionDuration=b.value.transitionDuration,t.style.animationName=b.value.animationName)},{immediate:!0});const A=w(()=>h.value&&s.open.value);return I(()=>{requestAnimationFrame(()=>{h.value=!1})}),K(f,"beforematch",t=>{requestAnimationFrame(()=>{s.onOpenToggle(),o("contentFound")})}),(t,g)=>(u(),m(e(L),{ref_key:"presentRef",ref:r,present:t.forceMount||e(s).open.value,"force-mount":!0},{default:c(({present:k})=>{var q;return[M(e($),y(t.$attrs,{id:e(s).contentId,ref:e(i),"as-child":a.asChild,as:t.as,hidden:k?void 0:e(s).unmountOnHide.value?"":"until-found","data-state":A.value?void 0:e(s).open.value?"open":"closed","data-disabled":(q=e(s).disabled)!=null&&q.value?"":void 0,style:{"--reka-collapsible-content-height":`${C.value}px`,"--reka-collapsible-content-width":`${_.value}px`}}),{default:c(()=>[!e(s).unmountOnHide.value||k?p(t.$slots,"default",{key:0}):D("v-if",!0)]),_:2},1040,["id","as-child","as","hidden","data-state","data-disabled","style"])]}),_:3},8,["present"]))}}),X=W,Y=d({__name:"CollapsibleTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(n){const l=n;B();const a=T();return(o,s)=>{var r,i;return u(),m(e($),{type:o.as==="button"?"button":void 0,as:o.as,"as-child":l.asChild,"aria-controls":e(a).contentId,"aria-expanded":e(a).open.value,"data-state":e(a).open.value?"open":"closed","data-disabled":(r=e(a).disabled)!=null&&r.value?"":void 0,disabled:(i=e(a).disabled)==null?void 0:i.value,onClick:e(a).onOpenToggle},{default:c(()=>[p(o.$slots,"default")]),_:3},8,["type","as","as-child","aria-controls","aria-expanded","data-state","data-disabled","disabled","onClick"])}}}),Z=Y;const se=d({__name:"Card",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(n){const l=n;return(a,o)=>(u(),R("div",{"data-slot":"card",class:x(e(P)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",l.class))},[p(a.$slots,"default")],2))}}),ne=d({__name:"CardContent",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(n){const l=n;return(a,o)=>(u(),R("div",{"data-slot":"card-content",class:x(e(P)("px-6",l.class))},[p(a.$slots,"default")],2))}}),le=d({__name:"Collapsible",props:{defaultOpen:{type:Boolean},open:{type:Boolean},disabled:{type:Boolean},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["update:open"],setup(n,{emit:l}){const s=V(n,l);return(r,i)=>(u(),m(e(U),y({"data-slot":"collapsible"},e(s)),{default:c(f=>[p(r.$slots,"default",H(j(f)))]),_:3},16))}}),re=d({__name:"CollapsibleContent",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(n){const l=n;return(a,o)=>(u(),m(e(X),y({"data-slot":"collapsible-content"},l),{default:c(()=>[p(a.$slots,"default")]),_:3},16))}}),ie=d({__name:"CollapsibleTrigger",props:{asChild:{type:Boolean},as:{}},setup(n){const l=n;return(a,o)=>(u(),m(e(Z),y({"data-slot":"collapsible-trigger"},l),{default:c(()=>[p(a.$slots,"default")]),_:3},16))}});export{se as _,ne as a,ie as b,re as c,le as d};
1
+ import{a as d,t as N,o as u,b as m,e as c,f as p,u as e,r as v,w as F,i as I,j as M,m as y,g as D,h as w,K as E,p as R,y as x,z as P,I as H,J as j}from"./index-BL1I-H3q.js";import{b as S,a as V}from"./useId-Bc2_q_4f.js";import{f as z,u as B,c as J,k as K,P as L}from"./Presence-DnRF6qHR.js";import{P as $}from"./useWatch-CEXwnJFx.js";const[T,G]=J("CollapsibleRoot");var Q=d({__name:"CollapsibleRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:open"],setup(n,{expose:l,emit:a}){const o=n,r=z(o,"open",a,{defaultValue:o.defaultOpen,passive:o.open===void 0}),{disabled:i,unmountOnHide:f}=N(o);return G({contentId:"",disabled:i,open:r,unmountOnHide:f,onOpenToggle:()=>{i.value||(r.value=!r.value)}}),l({open:r}),B(),(_,C)=>(u(),m(e($),{as:_.as,"as-child":o.asChild,"data-state":e(r)?"open":"closed","data-disabled":e(i)?"":void 0},{default:c(()=>[p(_.$slots,"default",{open:e(r)})]),_:3},8,["as","as-child","data-state","data-disabled"]))}}),U=Q,W=d({inheritAttrs:!1,__name:"CollapsibleContent",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["contentFound"],setup(n,{emit:l}){const a=n,o=l,s=T();s.contentId||(s.contentId=S(void 0,"reka-collapsible-content"));const r=v(),{forwardRef:i,currentElement:f}=B(),_=v(0),C=v(0),O=w(()=>s.open.value),h=v(O.value),b=v();F(()=>{var t;return[O.value,(t=r.value)==null?void 0:t.present]},async()=>{await E();const t=f.value;if(!t)return;b.value=b.value||{transitionDuration:t.style.transitionDuration,animationName:t.style.animationName},t.style.transitionDuration="0s",t.style.animationName="none";const g=t.getBoundingClientRect();C.value=g.height,_.value=g.width,h.value||(t.style.transitionDuration=b.value.transitionDuration,t.style.animationName=b.value.animationName)},{immediate:!0});const A=w(()=>h.value&&s.open.value);return I(()=>{requestAnimationFrame(()=>{h.value=!1})}),K(f,"beforematch",t=>{requestAnimationFrame(()=>{s.onOpenToggle(),o("contentFound")})}),(t,g)=>(u(),m(e(L),{ref_key:"presentRef",ref:r,present:t.forceMount||e(s).open.value,"force-mount":!0},{default:c(({present:k})=>{var q;return[M(e($),y(t.$attrs,{id:e(s).contentId,ref:e(i),"as-child":a.asChild,as:t.as,hidden:k?void 0:e(s).unmountOnHide.value?"":"until-found","data-state":A.value?void 0:e(s).open.value?"open":"closed","data-disabled":(q=e(s).disabled)!=null&&q.value?"":void 0,style:{"--reka-collapsible-content-height":`${C.value}px`,"--reka-collapsible-content-width":`${_.value}px`}}),{default:c(()=>[!e(s).unmountOnHide.value||k?p(t.$slots,"default",{key:0}):D("v-if",!0)]),_:2},1040,["id","as-child","as","hidden","data-state","data-disabled","style"])]}),_:3},8,["present"]))}}),X=W,Y=d({__name:"CollapsibleTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(n){const l=n;B();const a=T();return(o,s)=>{var r,i;return u(),m(e($),{type:o.as==="button"?"button":void 0,as:o.as,"as-child":l.asChild,"aria-controls":e(a).contentId,"aria-expanded":e(a).open.value,"data-state":e(a).open.value?"open":"closed","data-disabled":(r=e(a).disabled)!=null&&r.value?"":void 0,disabled:(i=e(a).disabled)==null?void 0:i.value,onClick:e(a).onOpenToggle},{default:c(()=>[p(o.$slots,"default")]),_:3},8,["type","as","as-child","aria-controls","aria-expanded","data-state","data-disabled","disabled","onClick"])}}}),Z=Y;const se=d({__name:"Card",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(n){const l=n;return(a,o)=>(u(),R("div",{"data-slot":"card",class:x(e(P)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",l.class))},[p(a.$slots,"default")],2))}}),ne=d({__name:"CardContent",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(n){const l=n;return(a,o)=>(u(),R("div",{"data-slot":"card-content",class:x(e(P)("px-6",l.class))},[p(a.$slots,"default")],2))}}),le=d({__name:"Collapsible",props:{defaultOpen:{type:Boolean},open:{type:Boolean},disabled:{type:Boolean},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["update:open"],setup(n,{emit:l}){const s=V(n,l);return(r,i)=>(u(),m(e(U),y({"data-slot":"collapsible"},e(s)),{default:c(f=>[p(r.$slots,"default",H(j(f)))]),_:3},16))}}),re=d({__name:"CollapsibleContent",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(n){const l=n;return(a,o)=>(u(),m(e(X),y({"data-slot":"collapsible-content"},l),{default:c(()=>[p(a.$slots,"default")]),_:3},16))}}),ie=d({__name:"CollapsibleTrigger",props:{asChild:{type:Boolean},as:{}},setup(n){const l=n;return(a,o)=>(u(),m(e(Z),y({"data-slot":"collapsible-trigger"},l),{default:c(()=>[p(a.$slots,"default")]),_:3},16))}});export{se as _,ne as a,ie as b,re as c,le as d};
@@ -1,4 +1,4 @@
1
- import{c as I,h as f,r as v,Z as w,a as d,k as S,_ as p,w as x,$,a0 as T}from"./index-CoUshYEB.js";import{S as h}from"./useWatch-COpVIQvm.js";import{e as _}from"./Presence-cbB6AqkQ.js";/**
1
+ import{c as I,h as f,r as v,Z as w,a as d,k as S,_ as p,w as x,$,a0 as T}from"./index-BL1I-H3q.js";import{S as h}from"./useWatch-CEXwnJFx.js";import{e as _}from"./Presence-DnRF6qHR.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1 @@
1
+ import{c as o}from"./Presence-DnRF6qHR.js";const[e]=o("ConfigProvider");export{e as i};
@@ -0,0 +1,109 @@
1
+ var Yr=Object.defineProperty;var Wt=r=>{throw TypeError(r)};var en=(r,e,t)=>e in r?Yr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Z=(r,e,t)=>en(r,typeof e!="symbol"?e+"":e,t),tn=(r,e,t)=>e.has(r)||Wt("Cannot "+t);var Ue=(r,e,t)=>(tn(r,e,"read from private field"),t?t.call(r):e.get(r)),Zt=(r,e,t)=>e.has(r)?Wt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t);import{c as _e,k as Ye,h as Q,G as rn,a as D,t as gt,o as p,b as C,e as h,f as I,u as l,r as O,j as k,m as X,H as re,I as et,J as tt,i as $e,A as Te,p as q,g as te,x as xe,F as se,w as ke,q as $,K as Ge,n as dt,T as nn,s as K,l as sn,M as ln,B as S,y as ee,z as J,L as Qt,N as an,O as on,P as un,E as Ke,Q as Gt,v as cn}from"./index-BL1I-H3q.js";import{u as dn}from"./content-9wt2LBkC.js";import{u as pn}from"./project-Cr3_1TVE.js";import{P as de,r as Le,d as fn,u as hn}from"./useWatch-CEXwnJFx.js";import{f as ot,t as gn,d as mn,c as Jt}from"./useFormatters-DgWFpsAv.js";import{_ as vn,a as ue}from"./PageHeader.vue_vue_type_script_setup_true_lang-C8ntGi1-.js";import{_ as yn}from"./StudioHint.vue_vue_type_script_setup_true_lang-C0ksRF07.js";import{C as Bt,_ as Xt,a as Me,b as Yt}from"./AgentPromptGroup.vue_vue_type_script_setup_true_lang-BMp7LstJ.js";import{_ as ie}from"./index-cUml-HE9.js";import{P as mr,D as vr,a as yr,T as xr,b as br,i as er,V as xn,h as bn,_ as kn,c as _n,d as wn,e as Sn,f as $n}from"./TrustBadge.vue_vue_type_script_setup_true_lang-CPVK2uFu.js";import{S as qn,_ as Cn}from"./Input.vue_vue_type_script_setup_true_lang-BM6hi7u6.js";import{u as Re,a as qe,b as mt}from"./useId-Bc2_q_4f.js";import{i as Bn,e as kr,r as Pn,f as Pt,c as rt,g as Tn,u as pe,P as _r,a as An}from"./Presence-DnRF6qHR.js";import{u as zn}from"./useDirection-JtiaofuP.js";import{u as je,R as Rn}from"./Collection-Ba6qM261.js";import{F as wr,u as Sr,a as $r,f as tr,_ as On,b as In,c as En,d as Dn}from"./DialogTitle.vue_vue_type_script_setup_true_lang-CmziXzbX.js";import{g as Ot}from"./getActiveElement-FUKBWQwh.js";import{c as rr,u as Mn}from"./useNonce-BJjEh3mR.js";import{C as It}from"./chevron-down-BU7Oh9xS.js";import{F as Ln}from"./file-text-B83xaNeI.js";import{A as jn}from"./arrow-down-Cil3QmGC.js";import{C as Fn}from"./chevron-right-BrS8cLgS.js";import"./shield-check-WNk6I8NY.js";import"./ConfigProvider-RwBwhpvF.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 Nn=_e("ArrowUpIcon",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
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 Vn=_e("ChevronLeftIcon",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
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 qr=_e("ChevronUpIcon",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
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 Hn=_e("EyeOffIcon",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
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 Un=_e("EyeIcon",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
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 Kn=_e("GripVerticalIcon",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
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 Wn=_e("Maximize2Icon",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
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 Zn=_e("PinOffIcon",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);/**
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 nr=_e("PinIcon",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/**
47
+ * @license lucide-vue-next v0.474.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const Qn=_e("SlidersHorizontalIcon",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);function sr(r){return typeof r=="string"?`'${r}'`:new Gn().serialize(r)}const Gn=(function(){var e;class r{constructor(){Zt(this,e,new Map)}compare(n,s){const a=typeof n,i=typeof s;return a==="string"&&i==="string"?n.localeCompare(s):a==="number"&&i==="number"?n-s:String.prototype.localeCompare.call(this.serialize(n,!0),this.serialize(s,!0))}serialize(n,s){if(n===null)return"null";switch(typeof n){case"string":return s?n:`'${n}'`;case"bigint":return`${n}n`;case"object":return this.$object(n);case"function":return this.$function(n)}return String(n)}serializeObject(n){const s=Object.prototype.toString.call(n);if(s!=="[object Object]")return this.serializeBuiltInType(s.length<10?`unknown:${s}`:s.slice(8,-1),n);const a=n.constructor,i=a===Object||a===void 0?"":a.name;if(i!==""&&globalThis[i]===a)return this.serializeBuiltInType(i,n);if(typeof n.toJSON=="function"){const o=n.toJSON();return i+(o!==null&&typeof o=="object"?this.$object(o):`(${this.serialize(o)})`)}return this.serializeObjectEntries(i,Object.entries(n))}serializeBuiltInType(n,s){const a=this["$"+n];if(a)return a.call(this,s);if(typeof(s==null?void 0:s.entries)=="function")return this.serializeObjectEntries(n,s.entries());throw new Error(`Cannot serialize ${n}`)}serializeObjectEntries(n,s){const a=Array.from(s).sort((o,c)=>this.compare(o[0],c[0]));let i=`${n}{`;for(let o=0;o<a.length;o++){const[c,u]=a[o];i+=`${this.serialize(c,!0)}:${this.serialize(u)}`,o<a.length-1&&(i+=",")}return i+"}"}$object(n){let s=Ue(this,e).get(n);return s===void 0&&(Ue(this,e).set(n,`#${Ue(this,e).size}`),s=this.serializeObject(n),Ue(this,e).set(n,s)),s}$function(n){const s=Function.prototype.toString.call(n);return s.slice(-15)==="[native code] }"?`${n.name||""}()[native]`:`${n.name}(${n.length})${s.replace(/\s*\n\s*/g,"")}`}$Array(n){let s="[";for(let a=0;a<n.length;a++)s+=this.serialize(n[a]),a<n.length-1&&(s+=",");return s+"]"}$Date(n){try{return`Date(${n.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(n){return`ArrayBuffer[${new Uint8Array(n).join(",")}]`}$Set(n){return`Set${this.$Array(Array.from(n).sort((s,a)=>this.compare(s,a)))}`}$Map(n){return this.serializeObjectEntries("Map",n.entries())}}e=new WeakMap;for(const t of["Error","RegExp","URL"])r.prototype["$"+t]=function(n){return`${t}(${n})`};for(const t of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])r.prototype["$"+t]=function(n){return`${t}[${n.join(",")}]`};for(const t of["BigInt64Array","BigUint64Array"])r.prototype["$"+t]=function(n){return`${t}[${n.join("n,")}${n.length>0?"n":""}]`};return r})();function Jn(r,e){return r===e||sr(r)===sr(e)}let $t=0;function Cr(){Ye(r=>{if(!Bn)return;const e=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??lr()),document.body.insertAdjacentElement("beforeend",e[1]??lr()),$t++,r(()=>{$t===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(t=>t.remove()),$t--})})}function lr(){const r=document.createElement("span");return r.setAttribute("data-reka-focus-guard",""),r.tabIndex=0,r.style.outline="none",r.style.opacity="0",r.style.position="fixed",r.style.pointerEvents="none",r}function Xn(r){return Q(()=>{var e;return rn(r)?!!((e=kr(r))!=null&&e.closest("form")):!0})}function Br(r){const e=Pn("",1e3);return{search:e,handleTypeaheadSearch:(s,a)=>{e.value=e.value+s;{const i=Ot(),o=a.map(m=>{var f,B;return{...m,textValue:((f=m.value)==null?void 0:f.textValue)??((B=m.ref.textContent)==null?void 0:B.trim())??""}}),c=o.find(m=>m.ref===i),u=o.map(m=>m.textValue),d=es(u,e.value,c==null?void 0:c.textValue),v=o.find(m=>m.textValue===d);return v&&v.ref.focus(),v==null?void 0:v.ref}},resetTypeahead:()=>{e.value=""}}}function Yn(r,e){return r.map((t,n)=>r[(e+n)%r.length])}function es(r,e,t){const s=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,a=t?r.indexOf(t):-1;let i=Yn(r,Math.max(a,0));s.length===1&&(i=i.filter(u=>u!==t));const c=i.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==t?c:void 0}const[nt,ts]=rt("PopoverRoot");var rs=D({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1}},emits:["update:open"],setup(r,{emit:e}){const t=r,n=e,{modal:s}=gt(t),a=Pt(t,"open",n,{defaultValue:t.defaultOpen,passive:t.open===void 0}),i=O(),o=O(!1);return ts({contentId:"",triggerId:"",modal:s,open:a,onOpenChange:c=>{a.value=c},onOpenToggle:()=>{a.value=!a.value},triggerElement:i,hasCustomAnchor:o}),(c,u)=>(p(),C(l(mr),null,{default:h(()=>[I(c.$slots,"default",{open:l(a),close:()=>a.value=!1})]),_:3}))}}),ns=rs,ss=D({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean,required:!1},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},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:e}){const t=r,n=e,s=Re(Tn(t,"trapFocus","disableOutsidePointerEvents")),{forwardRef:a}=pe(),i=nt();return Cr(),(o,c)=>(p(),C(l(wr),{"as-child":"",loop:"",trapped:o.trapFocus,onMountAutoFocus:c[5]||(c[5]=u=>n("openAutoFocus",u)),onUnmountAutoFocus:c[6]||(c[6]=u=>n("closeAutoFocus",u))},{default:h(()=>[k(l(vr),{"as-child":"","disable-outside-pointer-events":o.disableOutsidePointerEvents,onPointerDownOutside:c[0]||(c[0]=u=>n("pointerDownOutside",u)),onInteractOutside:c[1]||(c[1]=u=>n("interactOutside",u)),onEscapeKeyDown:c[2]||(c[2]=u=>n("escapeKeyDown",u)),onFocusOutside:c[3]||(c[3]=u=>n("focusOutside",u)),onDismiss:c[4]||(c[4]=u=>l(i).onOpenChange(!1))},{default:h(()=>[k(l(yr),X(l(s),{id:l(i).contentId,ref:l(a),"data-state":l(i).open.value?"open":"closed","aria-labelledby":l(i).triggerId,style:{"--reka-popover-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-popover-content-available-width":"var(--reka-popper-available-width)","--reka-popover-content-available-height":"var(--reka-popper-available-height)","--reka-popover-trigger-width":"var(--reka-popper-anchor-width)","--reka-popover-trigger-height":"var(--reka-popper-anchor-height)"},role:"dialog"}),{default:h(()=>[I(o.$slots,"default")]),_:3},16,["id","data-state","aria-labelledby"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),Pr=ss,ls=D({__name:"PopoverContentModal",props:{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},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:e}){const t=r,n=e,s=nt(),a=O(!1);Sr(!0);const i=qe(t,n),{forwardRef:o,currentElement:c}=pe();return $r(c),(u,d)=>(p(),C(Pr,X(l(i),{ref:l(o),"trap-focus":l(s).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:d[0]||(d[0]=re(v=>{var m;n("closeAutoFocus",v),a.value||(m=l(s).triggerElement.value)==null||m.focus()},["prevent"])),onPointerDownOutside:d[1]||(d[1]=v=>{n("pointerDownOutside",v);const m=v.detail.originalEvent,f=m.button===0&&m.ctrlKey===!0,B=m.button===2||f;a.value=B}),onFocusOutside:d[2]||(d[2]=re(()=>{},["prevent"]))}),{default:h(()=>[I(u.$slots,"default")]),_:3},16,["trap-focus"]))}}),as=ls,os=D({__name:"PopoverContentNonModal",props:{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},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:e}){const t=r,n=e,s=nt(),a=O(!1),i=O(!1),o=qe(t,n);return(c,u)=>(p(),C(Pr,X(l(o),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=d=>{var v;n("closeAutoFocus",d),d.defaultPrevented||(a.value||(v=l(s).triggerElement.value)==null||v.focus(),d.preventDefault()),a.value=!1,i.value=!1}),onInteractOutside:u[1]||(u[1]=async d=>{var f;n("interactOutside",d),d.defaultPrevented||(a.value=!0,d.detail.originalEvent.type==="pointerdown"&&(i.value=!0));const v=d.target;((f=l(s).triggerElement.value)==null?void 0:f.contains(v))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&i.value&&d.preventDefault()})}),{default:h(()=>[I(c.$slots,"default")]),_:3},16))}}),is=os,us=D({__name:"PopoverContent",props:{forceMount:{type:Boolean,required:!1},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},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:e}){const t=r,n=e,s=nt(),a=qe(t,n),{forwardRef:i}=pe();return s.contentId||(s.contentId=mt(void 0,"reka-popover-content")),(o,c)=>(p(),C(l(_r),{present:o.forceMount||l(s).open.value},{default:h(()=>[l(s).modal.value?(p(),C(as,X({key:0},l(a),{ref:l(i)}),{default:h(()=>[I(o.$slots,"default")]),_:3},16)):(p(),C(is,X({key:1},l(a),{ref:l(i)}),{default:h(()=>[I(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),cs=us,ds=D({__name:"PopoverPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(r){const e=r;return(t,n)=>(p(),C(l(xr),et(tt(e)),{default:h(()=>[I(t.$slots,"default")]),_:3},16))}}),ps=ds,fs=D({__name:"PopoverTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=nt(),{forwardRef:n,currentElement:s}=pe();return t.triggerId||(t.triggerId=mt(void 0,"reka-popover-trigger")),$e(()=>{t.triggerElement.value=s.value}),(a,i)=>(p(),C(Te(l(t).hasCustomAnchor.value?l(de):l(br)),{"as-child":""},{default:h(()=>[k(l(de),{id:l(t).triggerId,ref:l(n),type:a.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":l(t).open.value,"aria-controls":l(t).contentId,"data-state":l(t).open.value?"open":"closed",as:a.as,"as-child":e.asChild,onClick:l(t).onOpenToggle},{default:h(()=>[I(a.$slots,"default")]),_:3},8,["id","type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),hs=fs;const gs=[" ","Enter","ArrowUp","ArrowDown"],ms=[" ","Enter"],ge=10;function Xe(r,e,t){return r===void 0?!1:Array.isArray(r)?r.some(n=>Tt(n,e,t)):Tt(r,e,t)}function Tt(r,e,t){return r===void 0||e===void 0?!1:typeof r=="string"?r===e:typeof t=="function"?t(r,e):typeof t=="string"?(r==null?void 0:r[t])===(e==null?void 0:e[t]):Jn(r,e)}function vs(r){return r==null||r===""||Array.isArray(r)&&r.length===0}const ys={key:0,value:""},[Ce,Tr]=rt("SelectRoot");var xs=D({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(r,{emit:e}){const t=r,n=e,{required:s,disabled:a,multiple:i,dir:o}=gt(t),c=Pt(t,"modelValue",n,{defaultValue:t.defaultValue??(i.value?[]:void 0),passive:t.modelValue===void 0,deep:!0}),u=Pt(t,"open",n,{defaultValue:t.defaultOpen,passive:t.open===void 0}),d=O(),v=O(),m=O({x:0,y:0}),f=Q(()=>{var _;return i.value&&Array.isArray(c.value)?((_=c.value)==null?void 0:_.length)===0:er(c.value)});je({isProvider:!0});const B=zn(o),w=Xn(d),A=O(new Set),H=Q(()=>Array.from(A.value).map(_=>_.value).join(";"));function z(_){if(i.value){const R=Array.isArray(c.value)?[...c.value]:[],P=R.findIndex(L=>Tt(L,_,t.by));P===-1?R.push(_):R.splice(P,1),c.value=[...R]}else c.value=_}function M(_){return Array.from(A.value).find(R=>Xe(_,R.value,t.by))}return Tr({triggerElement:d,onTriggerChange:_=>{d.value=_},valueElement:v,onValueElementChange:_=>{v.value=_},contentId:"",modelValue:c,onValueChange:z,by:t.by,open:u,multiple:i,required:s,onOpenChange:_=>{u.value=_},dir:B,triggerPointerDownPosRef:m,disabled:a,isEmptyModelValue:f,optionsSet:A,onOptionAdd:_=>{const R=M(_.value);R&&A.value.delete(R),A.value.add(_)},onOptionRemove:_=>{const R=M(_.value);R&&A.value.delete(R)}}),(_,R)=>(p(),C(l(mr),null,{default:h(()=>[I(_.$slots,"default",{modelValue:l(c),open:l(u)}),l(w)?(p(),C(_s,{key:H.value,"aria-hidden":"true",tabindex:"-1",multiple:l(i),required:l(s),name:_.name,autocomplete:_.autocomplete,disabled:l(a),value:l(c)},{default:h(()=>[l(er)(l(c))?(p(),q("option",ys)):te("v-if",!0),(p(!0),q(se,null,xe(Array.from(A.value),P=>(p(),q("option",X({key:P.value??""},{ref_for:!0},P),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):te("v-if",!0)]),_:3}))}}),bs=xs,ks=D({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(r){const e=r,t=O(),n=Ce();ke(()=>e.value,(a,i)=>{const o=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(o,"value").set;if(a!==i&&u&&t.value){const d=new Event("change",{bubbles:!0});u.call(t.value,a),t.value.dispatchEvent(d)}});function s(a){n.onValueChange(a.target.value)}return(a,i)=>(p(),C(l(xn),{"as-child":""},{default:h(()=>[$("select",X({ref_key:"selectElement",ref:t},e,{onInput:s}),[I(a.$slots,"default")],16)]),_:3}))}}),_s=ks,ws=D({__name:"SelectPopperPosition",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},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,default:ge},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}},setup(r){const t=Re(r);return(n,s)=>(p(),C(l(yr),X(l(t),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:h(()=>[I(n.$slots,"default")]),_:3},16))}}),Ss=ws;const $s={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[Oe,Ar]=rt("SelectContent");var qs=D({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},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},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(r,{emit:e}){const t=r,n=e,s=Ce();Cr(),Sr(t.bodyLock);const{CollectionSlot:a,getItems:i}=je(),o=O();$r(o);const{search:c,handleTypeaheadSearch:u}=Br(),d=O(),v=O(),m=O(),f=O(!1),B=O(!1),w=O(!1);function A(){v.value&&o.value&&tr([v.value,o.value])}ke(f,()=>{A()});const{onOpenChange:H,triggerPointerDownPosRef:z}=s;Ye(P=>{if(!o.value)return;let L={x:0,y:0};const j=N=>{var Y,ae;L={x:Math.abs(Math.round(N.pageX)-(((Y=z.value)==null?void 0:Y.x)??0)),y:Math.abs(Math.round(N.pageY)-(((ae=z.value)==null?void 0:ae.y)??0))}},E=N=>{var Y;N.pointerType!=="touch"&&(L.x<=10&&L.y<=10?N.preventDefault():(Y=o.value)!=null&&Y.contains(N.target)||H(!1),document.removeEventListener("pointermove",j),z.value=null)};z.value!==null&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",E,{capture:!0,once:!0})),P(()=>{document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",E,{capture:!0})})});function M(P){const L=P.ctrlKey||P.altKey||P.metaKey;if(P.key==="Tab"&&P.preventDefault(),!L&&P.key.length===1&&u(P.key,i()),["ArrowUp","ArrowDown","Home","End"].includes(P.key)){let E=[...i().map(N=>N.ref)];if(["ArrowUp","End"].includes(P.key)&&(E=E.slice().reverse()),["ArrowUp","ArrowDown"].includes(P.key)){const N=P.target,Y=E.indexOf(N);E=E.slice(Y+1)}setTimeout(()=>tr(E)),P.preventDefault()}}const _=Q(()=>t.position==="popper"?t:{}),R=Re(_.value);return Ar({content:o,viewport:d,onViewportChange:P=>{d.value=P},itemRefCallback:(P,L,j)=>{const E=!B.value&&!j,N=Xe(s.modelValue.value,L,s.by);if(s.multiple.value){if(w.value)return;(N||E)&&(v.value=P,N&&(w.value=!0))}else(N||E)&&(v.value=P);E&&(B.value=!0)},selectedItem:v,selectedItemText:m,onItemLeave:()=>{var P;(P=o.value)==null||P.focus()},itemTextRefCallback:(P,L,j)=>{const E=!B.value&&!j;(Xe(s.modelValue.value,L,s.by)||E)&&(m.value=P)},focusSelectedItem:A,position:t.position,isPositioned:f,searchRef:c}),(P,L)=>(p(),C(l(a),null,{default:h(()=>[k(l(wr),{"as-child":"",onMountAutoFocus:L[6]||(L[6]=re(()=>{},["prevent"])),onUnmountAutoFocus:L[7]||(L[7]=j=>{var E;n("closeAutoFocus",j),!j.defaultPrevented&&((E=l(s).triggerElement.value)==null||E.focus({preventScroll:!0}),j.preventDefault())})},{default:h(()=>[k(l(vr),{"as-child":"","disable-outside-pointer-events":P.disableOutsidePointerEvents,onFocusOutside:L[2]||(L[2]=re(()=>{},["prevent"])),onDismiss:L[3]||(L[3]=j=>l(s).onOpenChange(!1)),onEscapeKeyDown:L[4]||(L[4]=j=>n("escapeKeyDown",j)),onPointerDownOutside:L[5]||(L[5]=j=>n("pointerDownOutside",j))},{default:h(()=>[(p(),C(Te(P.position==="popper"?Ss:Ts),X({...P.$attrs,...l(R)},{id:l(s).contentId,ref:j=>{const E=l(kr)(j);E!=null&&E.hasAttribute("data-reka-popper-content-wrapper")?o.value=E.firstElementChild:o.value=E},role:"listbox","data-state":l(s).open.value?"open":"closed",dir:l(s).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:L[0]||(L[0]=re(()=>{},["prevent"])),onPlaced:L[1]||(L[1]=j=>f.value=!0),onKeydown:M}),{default:h(()=>[I(P.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),Cs=qs;const[Et,Bs]=rt("SelectItemAlignedPosition");var Ps=D({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(r,{emit:e}){const t=r,n=e,{getItems:s}=je(),a=Ce(),i=Oe(),o=O(!1),c=O(!0),u=O(),{forwardRef:d,currentElement:v}=pe(),{viewport:m,selectedItem:f,selectedItemText:B,focusSelectedItem:w}=i;function A(){if(a.triggerElement.value&&a.valueElement.value&&u.value&&v.value&&(m!=null&&m.value)&&(f!=null&&f.value)&&(B!=null&&B.value)){const M=a.triggerElement.value.getBoundingClientRect(),_=v.value.getBoundingClientRect(),R=a.valueElement.value.getBoundingClientRect(),P=B.value.getBoundingClientRect();if(a.dir.value!=="rtl"){const ce=P.left-_.left,oe=R.left-ce,we=M.left-oe,fe=M.width+we,De=Math.max(fe,_.width),he=window.innerWidth-ge,Se=rr(oe,ge,Math.max(ge,he-De));u.value.style.minWidth=`${fe}px`,u.value.style.left=`${Se}px`}else{const ce=_.right-P.right,oe=window.innerWidth-R.right-ce,we=window.innerWidth-M.right-oe,fe=M.width+we,De=Math.max(fe,_.width),he=window.innerWidth-ge,Se=rr(oe,ge,Math.max(ge,he-De));u.value.style.minWidth=`${fe}px`,u.value.style.right=`${Se}px`}const L=s().map(ce=>ce.ref),j=window.innerHeight-ge*2,E=m.value.scrollHeight,N=window.getComputedStyle(v.value),Y=Number.parseInt(N.borderTopWidth,10),ae=Number.parseInt(N.paddingTop,10),Fe=Number.parseInt(N.borderBottomWidth,10),Ne=Number.parseInt(N.paddingBottom,10),Be=Y+ae+E+Ne+Fe,xt=Math.min(f.value.offsetHeight*5,Be),lt=window.getComputedStyle(m.value),bt=Number.parseInt(lt.paddingTop,10),kt=Number.parseInt(lt.paddingBottom,10),Pe=M.top+M.height/2-ge,_t=j-Pe,Ve=f.value.offsetHeight/2,wt=f.value.offsetTop+Ve,Ee=Y+ae+wt,U=Be-Ee;if(Ee<=Pe){const ce=f.value===L[L.length-1];u.value.style.bottom="0px";const oe=v.value.clientHeight-m.value.offsetTop-m.value.offsetHeight,we=Math.max(_t,Ve+(ce?kt:0)+oe+Fe),fe=Ee+we;u.value.style.height=`${fe}px`}else{const ce=f.value===L[0];u.value.style.top="0px";const we=Math.max(Pe,Y+m.value.offsetTop+(ce?bt:0)+Ve)+U;u.value.style.height=`${we}px`,m.value.scrollTop=Ee-Pe+m.value.offsetTop}u.value.style.margin=`${ge}px 0`,u.value.style.minHeight=`${xt}px`,u.value.style.maxHeight=`${j}px`,n("placed"),requestAnimationFrame(()=>o.value=!0)}}const H=O("");$e(async()=>{await Ge(),A(),v.value&&(H.value=window.getComputedStyle(v.value).zIndex)});function z(M){M&&c.value===!0&&(A(),w==null||w(),c.value=!1)}return An(a.triggerElement,()=>{A()}),Bs({contentWrapper:u,shouldExpandOnScrollRef:o,onScrollButtonChange:z}),(M,_)=>(p(),q("div",{ref_key:"contentWrapperElement",ref:u,style:dt({display:"flex",flexDirection:"column",position:"fixed",zIndex:H.value})},[k(l(de),X({ref:l(d),style:{boxSizing:"border-box",maxHeight:"100%"}},{...M.$attrs,...t}),{default:h(()=>[I(M.$slots,"default")]),_:3},16)],4))}}),Ts=Ps,As=D({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(r){return Tr(r.context),Ar($s),(t,n)=>I(t.$slots,"default")}}),zs=As;const Rs={key:1};var Os=D({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},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},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(r,{emit:e}){const t=r,s=qe(t,e),a=Ce(),i=O();$e(()=>{i.value=new DocumentFragment});const o=O(),c=Q(()=>t.forceMount||a.open.value),u=O(c.value);return ke(c,()=>{setTimeout(()=>u.value=c.value)}),(d,v)=>{var m;return c.value||u.value||(m=o.value)!=null&&m.present?(p(),C(l(_r),{key:0,ref_key:"presenceRef",ref:o,present:c.value},{default:h(()=>[k(Cs,et(tt({...l(s),...d.$attrs})),{default:h(()=>[I(d.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?(p(),q("div",Rs,[(p(),C(nn,{to:i.value},[k(zs,{context:l(a)},{default:h(()=>[I(d.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):te("v-if",!0)}}}),Is=Os,Es=D({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(r){return(e,t)=>(p(),C(l(de),{"aria-hidden":"true",as:e.as,"as-child":e.asChild},{default:h(()=>[I(e.$slots,"default",{},()=>[t[0]||(t[0]=K("▼"))])]),_:3},8,["as","as-child"]))}}),Ds=Es;const[zr,Ms]=rt("SelectItem");var Ls=D({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(r,{emit:e}){const t=r,n=e,{disabled:s}=gt(t),a=Ce(),i=Oe(),{forwardRef:o,currentElement:c}=pe(),{CollectionItem:u}=je(),d=Q(()=>{var _;return Xe((_=a.modelValue)==null?void 0:_.value,t.value,a.by)}),v=O(!1),m=O(t.textValue??""),f=mt(void 0,"reka-select-item-text"),B="select.select";async function w(_){if(_.defaultPrevented)return;const R={originalEvent:_,value:t.value};bn(B,A,R)}async function A(_){await Ge(),n("select",_),!_.defaultPrevented&&(s.value||(a.onValueChange(t.value),a.multiple.value||a.onOpenChange(!1)))}async function H(_){var R,P;await Ge(),!_.defaultPrevented&&(s.value?(R=i.onItemLeave)==null||R.call(i):(P=_.currentTarget)==null||P.focus({preventScroll:!0}))}async function z(_){var R;await Ge(),!_.defaultPrevented&&_.currentTarget===Ot()&&((R=i.onItemLeave)==null||R.call(i))}async function M(_){var P;await Ge(),!(_.defaultPrevented||((P=i.searchRef)==null?void 0:P.value)!==""&&_.key===" ")&&(ms.includes(_.key)&&w(_),_.key===" "&&_.preventDefault())}if(t.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return $e(()=>{c.value&&i.itemRefCallback(c.value,t.value,t.disabled)}),Ms({value:t.value,disabled:s,textId:f,isSelected:d,onItemTextChange:_=>{m.value=((m.value||(_==null?void 0:_.textContent))??"").trim()}}),(_,R)=>(p(),C(l(u),{value:{textValue:m.value}},{default:h(()=>[k(l(de),{ref:l(o),role:"option","aria-labelledby":l(f),"data-highlighted":v.value?"":void 0,"aria-selected":d.value,"data-state":d.value?"checked":"unchecked","aria-disabled":l(s)||void 0,"data-disabled":l(s)?"":void 0,tabindex:l(s)?void 0:-1,as:_.as,"as-child":_.asChild,onFocus:R[0]||(R[0]=P=>v.value=!0),onBlur:R[1]||(R[1]=P=>v.value=!1),onPointerup:w,onPointerdown:R[2]||(R[2]=P=>{P.currentTarget.focus({preventScroll:!0})}),onTouchend:R[3]||(R[3]=re(()=>{},["prevent","stop"])),onPointermove:H,onPointerleave:z,onKeydown:M},{default:h(()=>[I(_.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),js=Ls,Fs=D({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(r){const e=r,t=zr();return(n,s)=>l(t).isSelected.value?(p(),C(l(de),X({key:0,"aria-hidden":"true"},e),{default:h(()=>[I(n.$slots,"default")]),_:3},16)):te("v-if",!0)}}),Ns=Fs,Vs=D({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(r){const e=r,t=Ce(),n=Oe(),s=zr(),{forwardRef:a,currentElement:i}=pe(),o=Q(()=>{var c,u;return{value:s.value,disabled:s.disabled.value,textContent:((c=i.value)==null?void 0:c.textContent)??((u=s.value)==null?void 0:u.toString())??""}});return $e(()=>{i.value&&(s.onItemTextChange(i.value),n.itemTextRefCallback(i.value,s.value,s.disabled.value),t.onOptionAdd(o.value))}),sn(()=>{t.onOptionRemove(o.value)}),(c,u)=>(p(),C(l(de),X({id:l(s).textId,ref:l(a)},{...e,...c.$attrs}),{default:h(()=>[I(c.$slots,"default")]),_:3},16,["id"]))}}),Hs=Vs,Us=D({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(r){const e=r;return(t,n)=>(p(),C(l(xr),et(tt(e)),{default:h(()=>[I(t.$slots,"default")]),_:3},16))}}),Ks=Us,Ws=D({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(r,{emit:e}){const t=e,{getItems:n}=je(),s=Oe(),a=O(null);function i(){a.value!==null&&(window.clearInterval(a.value),a.value=null)}Ye(()=>{const u=n().map(d=>d.ref).find(d=>d===Ot());u==null||u.scrollIntoView({block:"nearest"})});function o(){a.value===null&&(a.value=window.setInterval(()=>{t("autoScroll")},50))}function c(){var u;(u=s.onItemLeave)==null||u.call(s),a.value===null&&(a.value=window.setInterval(()=>{t("autoScroll")},50))}return ln(()=>i()),(u,d)=>{var v;return p(),C(l(de),X({"aria-hidden":"true",style:{flexShrink:0}},(v=u.$parent)==null?void 0:v.$props,{onPointerdown:o,onPointermove:c,onPointerleave:d[0]||(d[0]=()=>{i()})}),{default:h(()=>[I(u.$slots,"default")]),_:3},16)}}}),Rr=Ws,Zs=D({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=Oe(),t=e.position==="item-aligned"?Et():void 0,{forwardRef:n,currentElement:s}=pe(),a=O(!1);return Ye(i=>{var o,c;if((o=e.viewport)!=null&&o.value&&((c=e.isPositioned)!=null&&c.value)){let d=function(){const v=u.scrollHeight-u.clientHeight;a.value=Math.ceil(u.scrollTop)<v};const u=e.viewport.value;d(),u.addEventListener("scroll",d),i(()=>u.removeEventListener("scroll",d))}}),ke(s,()=>{s.value&&(t==null||t.onScrollButtonChange(s.value))}),(i,o)=>a.value?(p(),C(Rr,{key:0,ref:l(n),onAutoScroll:o[0]||(o[0]=()=>{const{viewport:c,selectedItem:u}=l(e);c!=null&&c.value&&(u!=null&&u.value)&&(c.value.scrollTop=c.value.scrollTop+u.value.offsetHeight)})},{default:h(()=>[I(i.$slots,"default")]),_:3},512)):te("v-if",!0)}}),Qs=Zs,Gs=D({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=Oe(),t=e.position==="item-aligned"?Et():void 0,{forwardRef:n,currentElement:s}=pe(),a=O(!1);return Ye(i=>{var o,c;if((o=e.viewport)!=null&&o.value&&((c=e.isPositioned)!=null&&c.value)){let d=function(){a.value=u.scrollTop>0};const u=e.viewport.value;d(),u.addEventListener("scroll",d),i(()=>u.removeEventListener("scroll",d))}}),ke(s,()=>{s.value&&(t==null||t.onScrollButtonChange(s.value))}),(i,o)=>a.value?(p(),C(Rr,{key:0,ref:l(n),onAutoScroll:o[0]||(o[0]=()=>{const{viewport:c,selectedItem:u}=l(e);c!=null&&c.value&&(u!=null&&u.value)&&(c.value.scrollTop=c.value.scrollTop-u.value.offsetHeight)})},{default:h(()=>[I(i.$slots,"default")]),_:3},512)):te("v-if",!0)}}),Js=Gs,Xs=D({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=Ce(),{forwardRef:n,currentElement:s}=pe(),a=Q(()=>{var m;return((m=t.disabled)==null?void 0:m.value)||e.disabled});t.contentId||(t.contentId=mt(void 0,"reka-select-content")),$e(()=>{t.onTriggerChange(s.value)});const{getItems:i}=je(),{search:o,handleTypeaheadSearch:c,resetTypeahead:u}=Br();function d(){a.value||(t.onOpenChange(!0),u())}function v(m){d(),t.triggerPointerDownPosRef.value={x:Math.round(m.pageX),y:Math.round(m.pageY)}}return(m,f)=>(p(),C(l(br),{"as-child":"",reference:m.reference},{default:h(()=>{var B,w,A,H;return[k(l(de),{ref:l(n),role:"combobox",type:m.as==="button"?"button":void 0,"aria-controls":l(t).contentId,"aria-expanded":l(t).open.value||!1,"aria-required":(B=l(t).required)==null?void 0:B.value,"aria-autocomplete":"none",disabled:a.value,dir:(w=l(t))==null?void 0:w.dir.value,"data-state":(A=l(t))!=null&&A.open.value?"open":"closed","data-disabled":a.value?"":void 0,"data-placeholder":l(vs)((H=l(t).modelValue)==null?void 0:H.value)?"":void 0,"as-child":m.asChild,as:m.as,onClick:f[0]||(f[0]=z=>{var M;(M=z==null?void 0:z.currentTarget)==null||M.focus()}),onPointerdown:f[1]||(f[1]=z=>{if(z.pointerType==="touch")return z.preventDefault();const M=z.target;M.hasPointerCapture(z.pointerId)&&M.releasePointerCapture(z.pointerId),z.button===0&&z.ctrlKey===!1&&(v(z),z.preventDefault())}),onPointerup:f[2]||(f[2]=re(z=>{z.pointerType==="touch"&&v(z)},["prevent"])),onKeydown:f[3]||(f[3]=z=>{const M=l(o)!=="";!(z.ctrlKey||z.altKey||z.metaKey)&&z.key.length===1&&M&&z.key===" "||(l(c)(z.key,l(i)()),l(gs).includes(z.key)&&(d(),z.preventDefault()))})},{default:h(()=>[I(m.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3},8,["reference"]))}}),Ys=Xs,el=D({__name:"SelectValue",props:{placeholder:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(r){const e=r,{forwardRef:t,currentElement:n}=pe(),s=Ce();$e(()=>{s.valueElement=n});const a=Q(()=>{var d;let o=[];const c=Array.from(s.optionsSet.value),u=v=>c.find(m=>Xe(v,m.value,s.by));return Array.isArray(s.modelValue.value)?o=s.modelValue.value.map(v=>{var m;return((m=u(v))==null?void 0:m.textContent)??""}):o=[((d=u(s.modelValue.value))==null?void 0:d.textContent)??""],o.filter(Boolean)}),i=Q(()=>a.value.length?a.value.join(", "):e.placeholder);return(o,c)=>(p(),C(l(de),{ref:l(t),as:o.as,"as-child":o.asChild,style:{pointerEvents:"none"},"data-placeholder":a.value.length?void 0:e.placeholder},{default:h(()=>[I(o.$slots,"default",{selectedLabel:a.value,modelValue:l(s).modelValue.value},()=>[K(S(i.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),tl=el,rl=D({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r,{nonce:t}=gt(e),n=Mn(t),s=Oe(),a=s.position==="item-aligned"?Et():void 0,{forwardRef:i,currentElement:o}=pe();$e(()=>{s==null||s.onViewportChange(o.value)});const c=O(0);function u(d){const v=d.currentTarget,{shouldExpandOnScrollRef:m,contentWrapper:f}=a??{};if(m!=null&&m.value&&(f!=null&&f.value)){const B=Math.abs(c.value-v.scrollTop);if(B>0){const w=window.innerHeight-ge*2,A=Number.parseFloat(f.value.style.minHeight),H=Number.parseFloat(f.value.style.height),z=Math.max(A,H);if(z<w){const M=z+B,_=Math.min(w,M),R=M-_;f.value.style.height=`${_}px`,f.value.style.bottom==="0px"&&(v.scrollTop=R>0?R:0,f.value.style.justifyContent="flex-end")}}}c.value=v.scrollTop}return(d,v)=>(p(),q(se,null,[k(l(de),X({ref:l(i),"data-reka-select-viewport":"",role:"presentation"},{...d.$attrs,...e},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:u}),{default:h(()=>[I(d.$slots,"default")]),_:3},16),k(l(de),{as:"style",nonce:l(n)},{default:h(()=>v[0]||(v[0]=[K(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),nl=rl;function Dt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ie=Dt();function Or(r){Ie=r}var Ae={exec:()=>null};function V(r,e=""){let t=typeof r=="string"?r:r.source,n={replace:(s,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(le.caret,"$1"),t=t.replace(s,i),n},getRegex:()=>new RegExp(t,e)};return n}var sl=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),le={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}>`)},ll=/^(?:[ \t]*(?:\n|$))+/,al=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ol=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,st=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,il=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Mt=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ir=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Er=V(Ir).replace(/bull/g,Mt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ul=V(Ir).replace(/bull/g,Mt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Lt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,cl=/^[^\n]+/,jt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,dl=V(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",jt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),pl=V(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Mt).getRegex(),vt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ft=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,fl=V("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ft).replace("tag",vt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Dr=V(Lt).replace("hr",st).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vt).getRegex(),hl=V(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Dr).getRegex(),Nt={blockquote:hl,code:al,def:dl,fences:ol,heading:il,hr:st,html:fl,lheading:Er,list:pl,newline:ll,paragraph:Dr,table:Ae,text:cl},ar=V("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",st).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vt).getRegex(),gl={...Nt,lheading:ul,table:ar,paragraph:V(Lt).replace("hr",st).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ar).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vt).getRegex()},ml={...Nt,html:V(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ft).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ae,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:V(Lt).replace("hr",st).replace("heading",` *#{1,6} *[^
52
+ ]`).replace("lheading",Er).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},vl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,yl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Mr=/^( {2,}|\\)\n(?!\s*$)/,xl=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,yt=/[\p{P}\p{S}]/u,Vt=/[\s\p{P}\p{S}]/u,Lr=/[^\s\p{P}\p{S}]/u,bl=V(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Vt).getRegex(),jr=/(?!~)[\p{P}\p{S}]/u,kl=/(?!~)[\s\p{P}\p{S}]/u,_l=/(?:[^\s\p{P}\p{S}]|~)/u,Fr=/(?![*_])[\p{P}\p{S}]/u,wl=/(?![*_])[\s\p{P}\p{S}]/u,Sl=/(?:[^\s\p{P}\p{S}]|[*_])/u,$l=V(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",sl?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Nr=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ql=V(Nr,"u").replace(/punct/g,yt).getRegex(),Cl=V(Nr,"u").replace(/punct/g,jr).getRegex(),Vr="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Bl=V(Vr,"gu").replace(/notPunctSpace/g,Lr).replace(/punctSpace/g,Vt).replace(/punct/g,yt).getRegex(),Pl=V(Vr,"gu").replace(/notPunctSpace/g,_l).replace(/punctSpace/g,kl).replace(/punct/g,jr).getRegex(),Tl=V("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Lr).replace(/punctSpace/g,Vt).replace(/punct/g,yt).getRegex(),Al=V(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Fr).getRegex(),zl="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Rl=V(zl,"gu").replace(/notPunctSpace/g,Sl).replace(/punctSpace/g,wl).replace(/punct/g,Fr).getRegex(),Ol=V(/\\(punct)/,"gu").replace(/punct/g,yt).getRegex(),Il=V(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),El=V(Ft).replace("(?:-->|$)","-->").getRegex(),Dl=V("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",El).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),pt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ml=V(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",pt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Hr=V(/^!?\[(label)\]\[(ref)\]/).replace("label",pt).replace("ref",jt).getRegex(),Ur=V(/^!?\[(ref)\](?:\[\])?/).replace("ref",jt).getRegex(),Ll=V("reflink|nolink(?!\\()","g").replace("reflink",Hr).replace("nolink",Ur).getRegex(),or=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ht={_backpedal:Ae,anyPunctuation:Ol,autolink:Il,blockSkip:$l,br:Mr,code:yl,del:Ae,delLDelim:Ae,delRDelim:Ae,emStrongLDelim:ql,emStrongRDelimAst:Bl,emStrongRDelimUnd:Tl,escape:vl,link:Ml,nolink:Ur,punctuation:bl,reflink:Hr,reflinkSearch:Ll,tag:Dl,text:xl,url:Ae},jl={...Ht,link:V(/^!?\[(label)\]\((.*?)\)/).replace("label",pt).getRegex(),reflink:V(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",pt).getRegex()},At={...Ht,emStrongRDelimAst:Pl,emStrongLDelim:Cl,delLDelim:Al,delRDelim:Rl,url:V(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",or).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:V(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",or).getRegex()},Fl={...At,br:V(Mr).replace("{2,}","*").getRegex(),text:V(At.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},it={normal:Nt,gfm:gl,pedantic:ml},We={normal:Ht,gfm:At,breaks:Fl,pedantic:jl},Nl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ir=r=>Nl[r];function be(r,e){if(e){if(le.escapeTest.test(r))return r.replace(le.escapeReplace,ir)}else if(le.escapeTestNoEncode.test(r))return r.replace(le.escapeReplaceNoEncode,ir);return r}function ur(r){try{r=encodeURI(r).replace(le.percentDecode,"%")}catch{return null}return r}function cr(r,e){var a;let t=r.replace(le.findPipe,(i,o,c)=>{let u=!1,d=o;for(;--d>=0&&c[d]==="\\";)u=!u;return u?"|":" |"}),n=t.split(le.splitPipe),s=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(le.slashPipe,"|");return n}function Ze(r,e,t){let n=r.length;if(n===0)return"";let s=0;for(;s<n&&r.charAt(n-s-1)===e;)s++;return r.slice(0,n-s)}function Vl(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<r.length;n++)if(r[n]==="\\")n++;else if(r[n]===e[0])t++;else if(r[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function Hl(r,e=0){let t=e,n="";for(let s of r)if(s===" "){let a=4-t%4;n+=" ".repeat(a),t+=a}else n+=s,t++;return n}function dr(r,e,t,n,s){let a=e.href,i=e.title||null,o=r[1].replace(s.other.outputLinkReplace,"$1");n.state.inLink=!0;let c={type:r[0].charAt(0)==="!"?"image":"link",raw:t,href:a,title:i,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,c}function Ul(r,e,t){let n=r.match(t.other.indentCodeCompensation);if(n===null)return e;let s=n[1];return e.split(`
53
+ `).map(a=>{let i=a.match(t.other.beginningSpace);if(i===null)return a;let[o]=i;return o.length>=s.length?a.slice(s.length):a}).join(`
54
+ `)}var ft=class{constructor(r){Z(this,"options");Z(this,"rules");Z(this,"lexer");this.options=r||Ie}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Ze(t,`
55
+ `)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],n=Ul(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let n=Ze(t,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(t=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:Ze(e[0],`
56
+ `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=Ze(e[0],`
57
+ `).split(`
58
+ `),n="",s="",a=[];for(;t.length>0;){let i=!1,o=[],c;for(c=0;c<t.length;c++)if(this.rules.other.blockquoteStart.test(t[c]))o.push(t[c]),i=!0;else if(!i)o.push(t[c]);else break;t=t.slice(c);let u=o.join(`
59
+ `),d=u.replace(this.rules.other.blockquoteSetextReplace,`
60
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
61
+ ${u}`:u,s=s?`${s}
62
+ ${d}`:d;let v=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=v,t.length===0)break;let m=a.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let f=m,B=f.raw+`
63
+ `+t.join(`
64
+ `),w=this.blockquote(B);a[a.length-1]=w,n=n.substring(0,n.length-f.raw.length)+w.raw,s=s.substring(0,s.length-f.text.length)+w.text;break}else if((m==null?void 0:m.type)==="list"){let f=m,B=f.raw+`
65
+ `+t.join(`
66
+ `),w=this.list(B);a[a.length-1]=w,n=n.substring(0,n.length-m.raw.length)+w.raw,s=s.substring(0,s.length-f.raw.length)+w.raw,t=B.substring(a.at(-1).raw.length).split(`
67
+ `);continue}}return{type:"blockquote",raw:n,tokens:a,text:s}}}list(r){var t,n;let e=this.rules.block.list.exec(r);if(e){let s=e[1].trim(),a=s.length>1,i={type:"list",raw:"",ordered:a,start:a?+s.slice(0,-1):"",loose:!1,items:[]};s=a?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=a?s:"[*+-]");let o=this.rules.other.listItemRegex(s),c=!1;for(;r;){let d=!1,v="",m="";if(!(e=o.exec(r))||this.rules.block.hr.test(r))break;v=e[0],r=r.substring(v.length);let f=Hl(e[2].split(`
68
+ `,1)[0],e[1].length),B=r.split(`
69
+ `,1)[0],w=!f.trim(),A=0;if(this.options.pedantic?(A=2,m=f.trimStart()):w?A=e[1].length+1:(A=f.search(this.rules.other.nonSpaceChar),A=A>4?1:A,m=f.slice(A),A+=e[1].length),w&&this.rules.other.blankLine.test(B)&&(v+=B+`
70
+ `,r=r.substring(B.length+1),d=!0),!d){let H=this.rules.other.nextBulletRegex(A),z=this.rules.other.hrRegex(A),M=this.rules.other.fencesBeginRegex(A),_=this.rules.other.headingBeginRegex(A),R=this.rules.other.htmlBeginRegex(A),P=this.rules.other.blockquoteBeginRegex(A);for(;r;){let L=r.split(`
71
+ `,1)[0],j;if(B=L,this.options.pedantic?(B=B.replace(this.rules.other.listReplaceNesting," "),j=B):j=B.replace(this.rules.other.tabCharGlobal," "),M.test(B)||_.test(B)||R.test(B)||P.test(B)||H.test(B)||z.test(B))break;if(j.search(this.rules.other.nonSpaceChar)>=A||!B.trim())m+=`
72
+ `+j.slice(A);else{if(w||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||M.test(f)||_.test(f)||z.test(f))break;m+=`
73
+ `+B}w=!B.trim(),v+=L+`
74
+ `,r=r.substring(L.length+1),f=j.slice(A)}}i.loose||(c?i.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(c=!0)),i.items.push({type:"list_item",raw:v,task:!!this.options.gfm&&this.rules.other.listIsTask.test(m),loose:!1,text:m,tokens:[]}),i.raw+=v}let u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let d of i.items){if(this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]),d.task){if(d.text=d.text.replace(this.rules.other.listReplaceTask,""),((t=d.tokens[0])==null?void 0:t.type)==="text"||((n=d.tokens[0])==null?void 0:n.type)==="paragraph"){d.tokens[0].raw=d.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),d.tokens[0].text=d.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let m=this.lexer.inlineQueue.length-1;m>=0;m--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[m].src)){this.lexer.inlineQueue[m].src=this.lexer.inlineQueue[m].src.replace(this.rules.other.listReplaceTask,"");break}}let v=this.rules.other.listTaskCheckbox.exec(d.raw);if(v){let m={type:"checkbox",raw:v[0]+" ",checked:v[0]!=="[ ]"};d.checked=m.checked,i.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=m.raw+d.tokens[0].raw,d.tokens[0].text=m.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(m)):d.tokens.unshift({type:"paragraph",raw:m.raw,text:m.raw,tokens:[m]}):d.tokens.unshift(m)}}if(!i.loose){let v=d.tokens.filter(f=>f.type==="space"),m=v.length>0&&v.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=m}}if(i.loose)for(let d of i.items){d.loose=!0;for(let v of d.tokens)v.type==="text"&&(v.type="paragraph")}return i}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){let e=this.rules.block.def.exec(r);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:s}}}table(r){var i;let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=cr(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(i=e[3])!=null&&i.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
75
+ `):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?a.align.push("right"):this.rules.other.tableAlignCenter.test(o)?a.align.push("center"):this.rules.other.tableAlignLeft.test(o)?a.align.push("left"):a.align.push(null);for(let o=0;o<t.length;o++)a.header.push({text:t[o],tokens:this.lexer.inline(t[o]),header:!0,align:a.align[o]});for(let o of s)a.rows.push(cr(o,a.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:a.align[u]})));return a}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===`
76
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let a=Ze(t.slice(0,-1),"\\");if((t.length-a.length)%2===0)return}else{let a=Vl(e[2],"()");if(a===-2)return;if(a>-1){let i=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,i).trim(),e[3]=""}}let n=e[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],s=a[3])}else s=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n=n.slice(1):n=n.slice(1,-1)),dr(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let n=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[n.toLowerCase()];if(!s){let a=t[0].charAt(0);return{type:"text",raw:a,text:a}}return dr(t,s,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let n=this.rules.inline.emStrongLDelim.exec(r);if(!(!n||n[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!t||this.rules.inline.punctuation.exec(t))){let s=[...n[0]].length-1,a,i,o=s,c=0,u=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*r.length+s);(n=u.exec(e))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(i=[...a].length,n[3]||n[4]){o+=i;continue}else if((n[5]||n[6])&&s%3&&!((s+i)%3)){c+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o+c);let d=[...n[0]][0].length,v=r.slice(0,s+n.index+d+i);if(Math.min(s,i)%2){let f=v.slice(1,-1);return{type:"em",raw:v,text:f,tokens:this.lexer.inlineTokens(f)}}let m=v.slice(2,-2);return{type:"strong",raw:v,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(t),s=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&s&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let n=this.rules.inline.delLDelim.exec(r);if(n&&(!n[1]||!t||this.rules.inline.punctuation.exec(t))){let s=[...n[0]].length-1,a,i,o=s,c=this.rules.inline.delRDelim;for(c.lastIndex=0,e=e.slice(-1*r.length+s);(n=c.exec(e))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a||(i=[...a].length,i!==s))continue;if(n[3]||n[4]){o+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o);let u=[...n[0]][0].length,d=r.slice(0,s+n.index+u+i),v=d.slice(s,-s);return{type:"del",raw:d,text:v,tokens:this.lexer.inlineTokens(v)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,n;return e[2]==="@"?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(r){var t;let e;if(e=this.rules.inline.url.exec(r)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let a;do a=e[0],e[0]=((t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])??"";while(a!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},me=class zt{constructor(e){Z(this,"tokens");Z(this,"options");Z(this,"state");Z(this,"inlineQueue");Z(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ie,this.options.tokenizer=this.options.tokenizer||new ft,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:le,block:it.normal,inline:We.normal};this.options.pedantic?(t.block=it.pedantic,t.inline=We.pedantic):this.options.gfm&&(t.block=it.gfm,this.options.breaks?t.inline=We.breaks:t.inline=We.gfm),this.tokenizer.rules=t}static get rules(){return{block:it,inline:We}}static lex(e,t){return new zt(t).lex(e)}static lexInline(e,t){return new zt(t).inlineTokens(e)}lex(e){e=e.replace(le.carriageReturn,`
77
+ `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){var s,a,i;for(this.options.pedantic&&(e=e.replace(le.tabCharGlobal," ").replace(le.spaceLine,""));e;){let o;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(u=>(o=u.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let u=t.at(-1);o.raw.length===1&&u!==void 0?u.raw+=`
78
+ `:t.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let u=t.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
79
+ `)?"":`
80
+ `)+o.raw,u.text+=`
81
+ `+o.text,this.inlineQueue.at(-1).src=u.text):t.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let u=t.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
82
+ `)?"":`
83
+ `)+o.raw,u.text+=`
84
+ `+o.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},t.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),t.push(o);continue}let c=e;if((i=this.options.extensions)!=null&&i.startBlock){let u=1/0,d=e.slice(1),v;this.options.extensions.startBlock.forEach(m=>{v=m.call({lexer:this},d),typeof v=="number"&&v>=0&&(u=Math.min(u,v))}),u<1/0&&u>=0&&(c=e.substring(0,u+1))}if(this.state.top&&(o=this.tokenizer.paragraph(c))){let u=t.at(-1);n&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=(u.raw.endsWith(`
85
+ `)?"":`
86
+ `)+o.raw,u.text+=`
87
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):t.push(o),n=c.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let u=t.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
88
+ `)?"":`
89
+ `)+o.raw,u.text+=`
90
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):t.push(o);continue}if(e){let u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var c,u,d,v,m;let n=e,s=null;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)f.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,s.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)a=s[2]?s[2].length:0,n=n.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((u=(c=this.options.hooks)==null?void 0:c.emStrongMask)==null?void 0:u.call({lexer:this},n))??n;let i=!1,o="";for(;e;){i||(o=""),i=!1;let f;if((v=(d=this.options.extensions)==null?void 0:d.inline)!=null&&v.some(w=>(f=w.call({lexer:this},e,t))?(e=e.substring(f.raw.length),t.push(f),!0):!1))continue;if(f=this.tokenizer.escape(e)){e=e.substring(f.raw.length),t.push(f);continue}if(f=this.tokenizer.tag(e)){e=e.substring(f.raw.length),t.push(f);continue}if(f=this.tokenizer.link(e)){e=e.substring(f.raw.length),t.push(f);continue}if(f=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(f.raw.length);let w=t.at(-1);f.type==="text"&&(w==null?void 0:w.type)==="text"?(w.raw+=f.raw,w.text+=f.text):t.push(f);continue}if(f=this.tokenizer.emStrong(e,n,o)){e=e.substring(f.raw.length),t.push(f);continue}if(f=this.tokenizer.codespan(e)){e=e.substring(f.raw.length),t.push(f);continue}if(f=this.tokenizer.br(e)){e=e.substring(f.raw.length),t.push(f);continue}if(f=this.tokenizer.del(e,n,o)){e=e.substring(f.raw.length),t.push(f);continue}if(f=this.tokenizer.autolink(e)){e=e.substring(f.raw.length),t.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(e))){e=e.substring(f.raw.length),t.push(f);continue}let B=e;if((m=this.options.extensions)!=null&&m.startInline){let w=1/0,A=e.slice(1),H;this.options.extensions.startInline.forEach(z=>{H=z.call({lexer:this},A),typeof H=="number"&&H>=0&&(w=Math.min(w,H))}),w<1/0&&w>=0&&(B=e.substring(0,w+1))}if(f=this.tokenizer.inlineText(B)){e=e.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(o=f.raw.slice(-1)),i=!0;let w=t.at(-1);(w==null?void 0:w.type)==="text"?(w.raw+=f.raw,w.text+=f.text):t.push(f);continue}if(e){let w="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(w);break}else throw new Error(w)}}return t}},ht=class{constructor(r){Z(this,"options");Z(this,"parser");this.options=r||Ie}space(r){return""}code({text:r,lang:e,escaped:t}){var a;let n=(a=(e||"").match(le.notSpaceStart))==null?void 0:a[0],s=r.replace(le.endingNewline,"")+`
91
+ `;return n?'<pre><code class="language-'+be(n)+'">'+(t?s:be(s,!0))+`</code></pre>
92
+ `:"<pre><code>"+(t?s:be(s,!0))+`</code></pre>
93
+ `}blockquote({tokens:r}){return`<blockquote>
94
+ ${this.parser.parse(r)}</blockquote>
95
+ `}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
96
+ `}hr(r){return`<hr>
97
+ `}list(r){let e=r.ordered,t=r.start,n="";for(let i=0;i<r.items.length;i++){let o=r.items[i];n+=this.listitem(o)}let s=e?"ol":"ul",a=e&&t!==1?' start="'+t+'"':"";return"<"+s+a+`>
98
+ `+n+"</"+s+`>
99
+ `}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
100
+ `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
101
+ `}table(r){let e="",t="";for(let s=0;s<r.header.length;s++)t+=this.tablecell(r.header[s]);e+=this.tablerow({text:t});let n="";for(let s=0;s<r.rows.length;s++){let a=r.rows[s];t="";for(let i=0;i<a.length;i++)t+=this.tablecell(a[i]);n+=this.tablerow({text:t})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
102
+ <thead>
103
+ `+e+`</thead>
104
+ `+n+`</table>
105
+ `}tablerow({text:r}){return`<tr>
106
+ ${r}</tr>
107
+ `}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
108
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${be(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:t}){let n=this.parser.parseInline(t),s=ur(r);if(s===null)return n;r=s;let a='<a href="'+r+'"';return e&&(a+=' title="'+be(e)+'"'),a+=">"+n+"</a>",a}image({href:r,title:e,text:t,tokens:n}){n&&(t=this.parser.parseInline(n,this.parser.textRenderer));let s=ur(r);if(s===null)return be(t);r=s;let a=`<img src="${r}" alt="${be(t)}"`;return e&&(a+=` title="${be(e)}"`),a+=">",a}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:be(r.text)}},Ut=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},ve=class Rt{constructor(e){Z(this,"options");Z(this,"renderer");Z(this,"textRenderer");this.options=e||Ie,this.options.renderer=this.options.renderer||new ht,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ut}static parse(e,t){return new Rt(t).parse(e)}static parseInline(e,t){return new Rt(t).parseInline(e)}parse(e){var n,s;let t="";for(let a=0;a<e.length;a++){let i=e[a];if((s=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&s[i.type]){let c=i,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){t+=u||"";continue}}let o=i;switch(o.type){case"space":{t+=this.renderer.space(o);break}case"hr":{t+=this.renderer.hr(o);break}case"heading":{t+=this.renderer.heading(o);break}case"code":{t+=this.renderer.code(o);break}case"table":{t+=this.renderer.table(o);break}case"blockquote":{t+=this.renderer.blockquote(o);break}case"list":{t+=this.renderer.list(o);break}case"checkbox":{t+=this.renderer.checkbox(o);break}case"html":{t+=this.renderer.html(o);break}case"def":{t+=this.renderer.def(o);break}case"paragraph":{t+=this.renderer.paragraph(o);break}case"text":{t+=this.renderer.text(o);break}default:{let c='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return t}parseInline(e,t=this.renderer){var s,a;let n="";for(let i=0;i<e.length;i++){let o=e[i];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[o.type]){let u=this.options.extensions.renderers[o.type].call({parser:this},o);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=u||"";continue}}let c=o;switch(c.type){case"escape":{n+=t.text(c);break}case"html":{n+=t.html(c);break}case"link":{n+=t.link(c);break}case"image":{n+=t.image(c);break}case"checkbox":{n+=t.checkbox(c);break}case"strong":{n+=t.strong(c);break}case"em":{n+=t.em(c);break}case"codespan":{n+=t.codespan(c);break}case"br":{n+=t.br(c);break}case"del":{n+=t.del(c);break}case"text":{n+=t.text(c);break}default:{let u='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}},ct,Je=(ct=class{constructor(r){Z(this,"options");Z(this,"block");this.options=r||Ie}preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(){return this.block?me.lex:me.lexInline}provideParser(){return this.block?ve.parse:ve.parseInline}},Z(ct,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Z(ct,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),ct),Kl=class{constructor(...r){Z(this,"defaults",Dt());Z(this,"options",this.setOptions);Z(this,"parse",this.parseMarkdown(!0));Z(this,"parseInline",this.parseMarkdown(!1));Z(this,"Parser",ve);Z(this,"Renderer",ht);Z(this,"TextRenderer",Ut);Z(this,"Lexer",me);Z(this,"Tokenizer",ft);Z(this,"Hooks",Je);this.use(...r)}walkTokens(r,e){var n,s;let t=[];for(let a of r)switch(t=t.concat(e.call(this,a)),a.type){case"table":{let i=a;for(let o of i.header)t=t.concat(this.walkTokens(o.tokens,e));for(let o of i.rows)for(let c of o)t=t.concat(this.walkTokens(c.tokens,e));break}case"list":{let i=a;t=t.concat(this.walkTokens(i.items,e));break}default:{let i=a;(s=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&s[i.type]?this.defaults.extensions.childTokens[i.type].forEach(o=>{let c=i[o].flat(1/0);t=t.concat(this.walkTokens(c,e))}):i.tokens&&(t=t.concat(this.walkTokens(i.tokens,e)))}}return t}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=e.renderers[s.name];a?e.renderers[s.name]=function(...i){let o=s.renderer.apply(this,i);return o===!1&&(o=a.apply(this,i)),o}:e.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=e[s.level];a?a.unshift(s.tokenizer):e[s.level]=[s.tokenizer],s.start&&(s.level==="block"?e.startBlock?e.startBlock.push(s.start):e.startBlock=[s.start]:s.level==="inline"&&(e.startInline?e.startInline.push(s.start):e.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(e.childTokens[s.name]=s.childTokens)}),n.extensions=e),t.renderer){let s=this.defaults.renderer||new ht(this.defaults);for(let a in t.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let i=a,o=t.renderer[i],c=s[i];s[i]=(...u)=>{let d=o.apply(s,u);return d===!1&&(d=c.apply(s,u)),d||""}}n.renderer=s}if(t.tokenizer){let s=this.defaults.tokenizer||new ft(this.defaults);for(let a in t.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let i=a,o=t.tokenizer[i],c=s[i];s[i]=(...u)=>{let d=o.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}n.tokenizer=s}if(t.hooks){let s=this.defaults.hooks||new Je;for(let a in t.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let i=a,o=t.hooks[i],c=s[i];Je.passThroughHooks.has(a)?s[i]=u=>{if(this.defaults.async&&Je.passThroughHooksRespectAsync.has(a))return(async()=>{let v=await o.call(s,u);return c.call(s,v)})();let d=o.call(s,u);return c.call(s,d)}:s[i]=(...u)=>{if(this.defaults.async)return(async()=>{let v=await o.apply(s,u);return v===!1&&(v=await c.apply(s,u)),v})();let d=o.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}n.hooks=s}if(t.walkTokens){let s=this.defaults.walkTokens,a=t.walkTokens;n.walkTokens=function(i){let o=[];return o.push(a.call(this,i)),s&&(o=o.concat(s.call(this,i))),o}}this.defaults={...this.defaults,...n}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return me.lex(r,e??this.defaults)}parser(r,e){return ve.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let n={...t},s={...this.defaults,...n},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=r),s.async)return(async()=>{let i=s.hooks?await s.hooks.preprocess(e):e,o=await(s.hooks?await s.hooks.provideLexer():r?me.lex:me.lexInline)(i,s),c=s.hooks?await s.hooks.processAllTokens(o):o;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let u=await(s.hooks?await s.hooks.provideParser():r?ve.parse:ve.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(u):u})().catch(a);try{s.hooks&&(e=s.hooks.preprocess(e));let i=(s.hooks?s.hooks.provideLexer():r?me.lex:me.lexInline)(e,s);s.hooks&&(i=s.hooks.processAllTokens(i)),s.walkTokens&&this.walkTokens(i,s.walkTokens);let o=(s.hooks?s.hooks.provideParser():r?ve.parse:ve.parseInline)(i,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(i){return a(i)}}}onError(r,e){return t=>{if(t.message+=`
109
+ Please report this to https://github.com/markedjs/marked.`,r){let n="<p>An error occurred:</p><pre>"+be(t.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},ze=new Kl;function W(r,e){return ze.parse(r,e)}W.options=W.setOptions=function(r){return ze.setOptions(r),W.defaults=ze.defaults,Or(W.defaults),W};W.getDefaults=Dt;W.defaults=Ie;W.use=function(...r){return ze.use(...r),W.defaults=ze.defaults,Or(W.defaults),W};W.walkTokens=function(r,e){return ze.walkTokens(r,e)};W.parseInline=ze.parseInline;W.Parser=ve;W.parser=ve.parse;W.Renderer=ht;W.TextRenderer=Ut;W.Lexer=me;W.lexer=me.lex;W.Tokenizer=ft;W.Hooks=Je;W.parse=W;W.options;W.setOptions;W.use;W.walkTokens;W.parseInline;ve.parse;me.lex;const Wl={"data-slot":"table-container",class:"relative w-full overflow-auto"},Zl=D({__name:"Table",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(r){const e=r;return(t,n)=>(p(),q("div",Wl,[$("table",{"data-slot":"table",class:ee(l(J)("w-full caption-bottom text-sm",e.class))},[I(t.$slots,"default")],2)]))}}),Ql=D({__name:"TableBody",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(r){const e=r;return(t,n)=>(p(),q("tbody",{"data-slot":"table-body",class:ee(l(J)("[&_tr:last-child]:border-0",e.class))},[I(t.$slots,"default")],2))}}),ut=D({__name:"TableCell",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(r){const e=r;return(t,n)=>(p(),q("td",{"data-slot":"table-cell",class:ee(l(J)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e.class))},[I(t.$slots,"default")],2))}}),qt=D({__name:"TableRow",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(r){const e=r;return(t,n)=>(p(),q("tr",{"data-slot":"table-row",class:ee(l(J)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e.class))},[I(t.$slots,"default")],2))}}),Ct=D({__name:"TableHead",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(r){const e=r;return(t,n)=>(p(),q("th",{"data-slot":"table-head",class:ee(l(J)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e.class))},[I(t.$slots,"default")],2))}}),Gl=D({__name:"TableHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(r){const e=r;return(t,n)=>(p(),q("thead",{"data-slot":"table-header",class:ee(l(J)("[&_tr]:border-b",e.class))},[I(t.$slots,"default")],2))}}),pr=D({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(r,{emit:e}){const s=qe(r,e);return(a,i)=>(p(),C(l(bs),X({"data-slot":"select"},l(s)),{default:h(o=>[I(a.$slots,"default",et(tt(o)))]),_:3},16))}}),fr=D({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(r,{emit:e}){const t=r,n=e,s=Le(t,"class"),a=qe(s,n);return(i,o)=>(p(),C(l(Ks),null,{default:h(()=>[k(l(Is),X({"data-slot":"select-content"},{...i.$attrs,...l(a)},{class:l(J)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t.class)}),{default:h(()=>[k(l(Yl)),k(l(nl),{class:ee(l(J)("p-1",r.position==="popper"&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:h(()=>[I(i.$slots,"default")]),_:3},8,["class"]),k(l(Xl))]),_:3},16,["class"])]),_:3}))}}),Jl={class:"absolute right-2 flex size-3.5 items-center justify-center"},Qe=D({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(r){const e=r,t=Le(e,"class"),n=Re(t);return(s,a)=>(p(),C(l(js),X({"data-slot":"select-item"},l(n),{class:l(J)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e.class)}),{default:h(()=>[$("span",Jl,[k(l(Ns),null,{default:h(()=>[I(s.$slots,"indicator-icon",{},()=>[k(l(Bt),{class:"size-4"})])]),_:3})]),k(l(Hs),null,{default:h(()=>[I(s.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),Xl=D({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(r){const e=r,t=Le(e,"class"),n=Re(t);return(s,a)=>(p(),C(l(Qs),X({"data-slot":"select-scroll-down-button"},l(n),{class:l(J)("flex cursor-default items-center justify-center py-1",e.class)}),{default:h(()=>[I(s.$slots,"default",{},()=>[k(l(It),{class:"size-4"})])]),_:3},16,["class"]))}}),Yl=D({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(r){const e=r,t=Le(e,"class"),n=Re(t);return(s,a)=>(p(),C(l(Js),X({"data-slot":"select-scroll-up-button"},l(n),{class:l(J)("flex cursor-default items-center justify-center py-1",e.class)}),{default:h(()=>[I(s.$slots,"default",{},()=>[k(l(qr),{class:"size-4"})])]),_:3},16,["class"]))}}),hr=D({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},size:{default:"default"}},setup(r){const e=r,t=Le(e,"class","size"),n=Re(t);return(s,a)=>(p(),C(l(Ys),X({"data-slot":"select-trigger","data-size":r.size},l(n),{class:l(J)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e.class)}),{default:h(()=>[I(s.$slots,"default"),k(l(Ds),{"as-child":""},{default:h(()=>[k(l(It),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),gr=D({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(r){const e=r;return(t,n)=>(p(),C(l(tl),X({"data-slot":"select-value"},e),{default:h(()=>[I(t.$slots,"default")]),_:3},16))}}),ea=D({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(r,{emit:e}){const s=qe(r,e);return(a,i)=>(p(),C(l(ns),X({"data-slot":"popover"},l(s)),{default:h(o=>[I(a.$slots,"default",et(tt(o)))]),_:3},16))}}),ta=D({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{default:"center"},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:e}){const t=r,n=e,s=Le(t,"class"),a=qe(s,n);return(i,o)=>(p(),C(l(ps),null,{default:h(()=>[k(l(cs),X({"data-slot":"popover-content"},{...i.$attrs,...l(a)},{class:l(J)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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-72 rounded-md border p-4 shadow-md origin-(--reka-popover-content-transform-origin) outline-hidden",t.class)}),{default:h(()=>[I(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),ra=D({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(r){const e=r;return(t,n)=>(p(),C(l(hs),X({"data-slot":"popover-trigger"},e),{default:h(()=>[I(t.$slots,"default")]),_:3},16))}});function na(r){const e=Q(()=>{if(!r.value)return"pending";const{errors:n,warnings:s}=r.value.summary;return n>0?"warning":s>0?"partial":"validated"}),t=Q(()=>r.value?r.value.summary.errors+r.value.summary.warnings:0);return{trustStatus:e,trustCount:t}}const sa={class:"flex h-full flex-col"},la={class:"flex flex-1 flex-col overflow-hidden px-6 py-4"},aa={class:"mb-4 flex items-center gap-3"},oa={class:"border-b border-border px-3 py-2.5"},ia={class:"flex items-center justify-between"},ua={class:"text-xs font-medium text-foreground"},ca={class:"flex gap-1"},da={class:"max-h-85 overflow-y-auto custom-scrollbar p-1.5"},pa=["onDragstart","onDrop"],fa={class:"flex shrink-0 items-center"},ha={class:"flex flex-col -space-y-0.5 ml-0.5"},ga={class:"text-xs text-muted-foreground"},ma={class:"grid gap-1.5 sm:grid-cols-2 lg:grid-cols-4"},va={key:0,class:"flex flex-1 items-center justify-center"},ya={key:1,class:"flex flex-1 flex-col items-center justify-center text-center"},xa={class:"mb-4 flex size-14 items-center justify-center rounded-full bg-muted"},ba={class:"text-lg font-semibold"},ka={class:"mt-2 max-w-sm text-sm text-muted-foreground"},_a={key:2,class:"flex flex-1 flex-col items-center justify-center text-center"},wa={class:"text-sm text-muted-foreground"},Sa={class:"flex-1 overflow-auto rounded-lg border border-border"},$a={class:"flex items-center gap-1"},qa={class:"flex items-center justify-center gap-1"},Ca={class:"text-[11px] text-muted-foreground"},Ba={key:0,class:"inline-flex items-center gap-1 text-[11px] text-status-warning"},Pa={key:1,class:"text-[11px] text-muted-foreground/40"},Ta={key:3,class:"font-mono text-sm text-foreground tabular-nums text-right block"},Aa={key:4,class:"max-w-60"},za={class:"truncate text-sm font-medium text-foreground"},Ra={class:"truncate text-[11px] text-muted-foreground"},Oa={key:5,class:"flex items-center gap-2"},Ia={class:"font-mono text-xs text-muted-foreground"},Ea={key:8,class:"block max-w-60 truncate text-sm text-foreground"},Da={class:"text-xs"},Ma={class:"border-t border-border/50 px-6 py-5"},La={class:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3"},ja={class:"flex items-center gap-1.5"},Fa={class:"font-mono text-[11px] font-medium text-muted-foreground"},Na={class:"ml-auto flex items-center gap-1 opacity-0 group-hover/card:opacity-100 transition-opacity"},Va={key:0,class:"inline-flex items-center gap-1 text-xs text-status-warning"},Ha={key:1,class:"text-xs text-muted-foreground/40"},Ua={key:1,class:"flex items-center gap-2"},Ka={class:"text-xs text-muted-foreground"},Wa={key:2,class:"flex items-center gap-2"},Za={class:"font-mono text-xs text-foreground"},Qa={key:3,class:"flex items-center gap-0.5"},Ga={class:"ml-1.5 text-xs text-muted-foreground"},Ja={key:4,class:"flex items-center gap-2"},Xa={class:"h-2 flex-1 rounded-full bg-muted overflow-hidden"},Ya={class:"text-xs font-medium text-foreground tabular-nums"},eo=["href"],to=["href"],ro=["href"],no={key:8,class:"flex items-center gap-2"},so={class:"flex size-10 items-center justify-center rounded-md border border-border bg-muted"},lo=["src","alt"],ao={class:"text-xs text-muted-foreground truncate"},oo={key:9,class:"flex items-center gap-2"},io={class:"text-xs text-muted-foreground truncate"},uo={key:11,class:"flex flex-wrap gap-1"},co={key:12,class:"flex flex-wrap gap-1"},po={key:14,class:"text-xs text-foreground"},fo={key:0,class:"text-muted-foreground ml-1"},ho={key:15,class:"font-mono text-xs text-foreground"},go={key:16,class:"line-clamp-2 rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] text-foreground"},mo={key:17,class:"flex items-center gap-2"},vo={class:"line-clamp-1 text-xs text-muted-foreground"},yo={key:18,class:"font-mono text-xs font-medium text-foreground tabular-nums"},xo={key:19,class:"line-clamp-2 text-xs text-foreground"},bo={key:0,class:"mt-4 flex items-center justify-between border-t border-border pt-4"},ko={class:"flex items-center gap-2"},_o={class:"text-xs text-muted-foreground"},wo={class:"flex items-center gap-2"},So={class:"flex items-center gap-1.5 text-xs text-muted-foreground"},$o={class:"font-mono text-sm"},qo={class:"flex-1 overflow-auto custom-scrollbar rounded-md border border-border bg-muted/30 p-4"},Co=["innerHTML"],Bo=["innerHTML"],Po={key:2,class:"font-mono text-sm text-foreground whitespace-pre-wrap"},To={key:3,class:"font-mono text-xs text-foreground whitespace-pre-wrap"},Ao={key:4,class:"whitespace-pre-wrap font-mono text-sm text-foreground"},zo=D({__name:"ContentListPage",setup(r){const e=fn("serve-ui-texts").locale("en").get(),t=cn(),n=dn(),s=pn(),a=Q(()=>t.params.modelId),i=Q(()=>{var g,y;return(y=(g=s.status)==null?void 0:g.models)==null?void 0:y.find(T=>T.id===a.value)}),{trustStatus:o,trustCount:c}=na(Q(()=>n.validation)),u=Q(()=>{var g,y;return((y=(g=s.status)==null?void 0:g.config)==null?void 0:y.locales.supported)??[]}),d=Q(()=>{var g;return((g=i.value)==null?void 0:g.i18n)??!1}),v=O(void 0),m=O(""),f=O(!1),B=O(20),w=O(1),A=O("1"),H=O(null),z=O(null),M=Q(()=>{const g=n.contentList;if(!g)return[];if(g.kind==="document"){const y=Array.isArray(g.data)?g.data:[],T=[];for(const x of y){const G=x,b=G.frontmatter,F={slug:G.slug};b&&Object.assign(F,b),F.body=G.body??"",T.push(F)}return T}return g.kind==="collection"?Array.isArray(g.data)?g.data:[]:g.kind==="singleton"?[g.data]:g.kind==="dictionary"?Object.entries(g.data).map(([y,T])=>({key:y,value:T})):[]}),_=Q(()=>{if(!m.value)return M.value;const g=m.value.toLowerCase();return M.value.filter(y=>Object.values(y).some(T=>T==null?!1:String(T).toLowerCase().includes(g)))}),R=Q(()=>_.value.length),P=Q(()=>Math.max(1,Math.ceil(R.value/B.value))),L=Q(()=>{const g=(w.value-1)*B.value;return _.value.slice(g,g+B.value)}),j=Q(()=>{const g=n.modelDescription;if(g!=null&&g.fields)return Object.keys(g.fields);if(M.value.length===0)return[];const y=M.value[0];return!y||typeof y!="object"?[]:Object.keys(y).filter(T=>T!=="id"&&!T.startsWith("_"))}),E=O(new Set),N=O(new Set),Y=O([]),ae=O(null),Fe=Q(()=>{const g=n.modelDescription;if(!(g!=null&&g.fields))return j.value.slice(0,6);const y={string:1,text:2,email:3,url:3,slug:3,select:4,number:5,integer:5,decimal:5,percent:5,rating:5,boolean:6,date:7,datetime:7,color:8,phone:8,code:9,icon:9,image:10,video:10,file:10,markdown:11,richtext:11,relation:12,relations:12,array:13,object:14};return Object.entries(g.fields).map(([T,x])=>({name:T,priority:(x.required?0:100)+(y[x.type]??50)})).toSorted((T,x)=>T.priority-x.priority).slice(0,6).map(T=>T.name)});ke(j,g=>{if(g.length>0&&Y.value.length===0){Y.value=[...g];const y=new Set(Fe.value);E.value.clear();for(const T of g)y.has(T)||E.value.add(T)}},{immediate:!0});const Ne=Q(()=>Y.value.length===0?j.value:Y.value.filter(g=>j.value.includes(g))),Be=Q(()=>{const g=Ne.value.filter(x=>!E.value.has(x)),y=g.filter(x=>N.value.has(x)),T=g.filter(x=>!N.value.has(x));return[...y,...T]});function xt(g){N.value.has(g)||(E.value.has(g)?E.value.delete(g):E.value.add(g))}function lt(g){N.value.has(g)?N.value.delete(g):(N.value.add(g),E.value.delete(g))}function bt(){E.value.clear()}function kt(){E.value.clear(),N.value.clear(),Y.value=[...j.value];const g=new Set(Fe.value);for(const y of j.value)g.has(y)||E.value.add(y)}function Pe(g,y){const T=[...Y.value],x=T.indexOf(g);if(x===-1)return;const G=y==="up"?x-1:x+1;if(G<0||G>=T.length)return;const b=T[G];T[G]=g,T[x]=b,Y.value=T}function _t(g,y){ae.value=y,g.dataTransfer&&(g.dataTransfer.effectAllowed="move",g.dataTransfer.setData("text/plain",y))}function Ve(g){g.preventDefault(),g.dataTransfer&&(g.dataTransfer.dropEffect="move")}function wt(g,y){if(g.preventDefault(),!ae.value||ae.value===y)return;const T=[...Y.value],x=T.indexOf(ae.value),G=T.indexOf(y);x===-1||G===-1||(T.splice(x,1),T.splice(G,0,ae.value),Y.value=T,ae.value=null)}function Ee(){ae.value=null}const U=Q(()=>{const g=n.modelDescription,y={body:"markdown"};if(!(g!=null&&g.fields))return y;for(const[T,x]of Object.entries(g.fields))y[T]=x.type;return y}),Kt=Q(()=>{const g=n.modelDescription;if(!(g!=null&&g.fields))return{};const y={};for(const[T,x]of Object.entries(g.fields))y[T]=x.required===!0;return y});function ce(g){return Kt.value[g]===!0}const oe=O(null);async function we(g){const y=JSON.stringify(g,null,2);await Jt(y)?(oe.value=g.id??Object.values(g)[0],Ke.success("Entry copied to clipboard."),setTimeout(()=>{oe.value=null},2e3)):Ke.error("Failed to copy entry.")}const fe=O(!1),De=O(""),he=O(""),Se=O("");function Kr(g,y){De.value=g,he.value=y,Se.value=g==="body"?"markdown":U.value[g]??"string",fe.value=!0}function Wr(g){return W.parse(g,{async:!1})}function Zr(g,y){const T=U.value[y];return T==="markdown"||T==="richtext"||T==="code"||T==="text"||typeof g=="string"&&g.length>100||typeof g=="object"&&g!==null&&!Array.isArray(g)}async function He(){try{await Promise.all([n.fetchContent(a.value,v.value),n.fetchModelDescription(a.value),n.fetchValidation(a.value)])}catch{Ke.error("Failed to load content. Please try again.")}}async function Qr(){H.value=null,await He()}function Gr(g){H.value=H.value===g?null:g}function at(g){const y=Math.max(1,Math.min(g,P.value));w.value=y,A.value=String(y),H.value=null}function Jr(g){const y=g.target,T=Number.parseInt(y.value,10);Number.isNaN(T)?A.value=String(w.value):at(T)}async function Xr(g){await Jt(g)?(z.value=g,Ke.success("ID copied to clipboard."),setTimeout(()=>{z.value=null},2e3)):Ke.error("Failed to copy ID.")}function ye(g,y){return mn(g,U.value[y])}return $e(He),ke(a,()=>{w.value=1,A.value="1",m.value="",H.value=null,Y.value=[],E.value.clear(),N.value.clear(),He()}),ke(v,()=>{w.value=1,A.value="1",H.value=null,He()}),ke(m,()=>{w.value=1,A.value="1",H.value=null}),ke(w,g=>{A.value=String(g)}),hn(g=>{g.type==="content:changed"&&g.modelId===a.value&&He()}),(g,y)=>{var T;return p(),q("div",sa,[k(vn,{title:a.value,description:`${R.value} ${R.value===1?"entry":"entries"}${(T=l(n).contentList)!=null&&T.kind?` · ${l(n).contentList.kind}`:""}`},{actions:h(()=>[d.value&&u.value.length>1?(p(),C(l(pr),{key:0,"model-value":v.value??"__all__","onUpdate:modelValue":y[0]||(y[0]=x=>v.value=x==="__all__"?void 0:String(x))},{default:h(()=>[k(l(hr),{size:"sm",class:"h-8 w-auto gap-1.5 text-xs"},{default:h(()=>[k(l(gr),{placeholder:l(e)["content-list.all-locales"]},null,8,["placeholder"])]),_:1}),k(l(fr),null,{default:h(()=>[k(l(Qe),{value:"__all__"},{default:h(()=>[K(S(l(e)["content-list.all-locales"]),1)]),_:1}),(p(!0),q(se,null,xe(u.value,x=>(p(),C(l(Qe),{key:x,value:x},{default:h(()=>[K(S(x),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])):te("",!0),k(l(ue),{variant:"outline",size:"sm",class:"h-8",disabled:l(n).loading,onClick:Qr},{default:h(()=>[l(n).loading?(p(),C(l(Qt),{key:0,class:"mr-1.5 size-3.5 animate-spin"})):(p(),C(l(Rn),{key:1,class:"mr-1.5 size-3.5"})),K(" "+S(l(e)["content-list.refresh"]),1)]),_:1},8,["disabled"])]),_:1},8,["title","description"]),$("div",la,[$("div",aa,[k(l(kn),{status:l(o),count:l(c)},null,8,["status","count"]),$("div",{class:ee(l(J)("relative transition-all duration-200",f.value||m.value?"w-72":"w-48"))},[k(l(qn),{class:"absolute left-3 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground"}),k(l(Cn),{modelValue:m.value,"onUpdate:modelValue":y[1]||(y[1]=x=>m.value=x),placeholder:l(e)["content-list.search-entries"],class:"h-8 pl-8 text-xs",onFocus:y[2]||(y[2]=x=>f.value=!0),onBlur:y[3]||(y[3]=x=>f.value=!1)},null,8,["modelValue","placeholder"])],2),y[15]||(y[15]=$("div",{class:"flex-1"},null,-1)),k(l(ea),null,{default:h(()=>[k(l(ra),{"as-child":""},{default:h(()=>[k(l(ue),{variant:"outline",size:"sm",class:"h-8 gap-1.5 text-xs"},{default:h(()=>[k(l(Qn),{class:"size-3.5"}),K(" "+S(l(e)["content-list.columns"])+" ",1),E.value.size>0?(p(),C(l(ie),{key:0,variant:"secondary",class:"h-4 px-1 text-[10px]"},{default:h(()=>[K(S(Be.value.length)+"/"+S(j.value.length),1)]),_:1})):te("",!0)]),_:1})]),_:1}),k(l(ta),{align:"end",class:"w-65 p-0"},{default:h(()=>[$("div",oa,[$("div",ia,[$("span",ua,S(l(e)["content-list.toggle-columns"]),1),$("div",ca,[k(l(ue),{variant:"link",size:"sm",class:"h-auto p-0 text-[10px] text-primary hover:underline",onClick:bt},{default:h(()=>[K(S(l(e)["content-list.show-all"]),1)]),_:1}),y[14]||(y[14]=$("span",{class:"text-[10px] text-muted-foreground"},"·",-1)),k(l(ue),{variant:"link",size:"sm",class:"h-auto p-0 text-[10px] text-muted-foreground hover:text-foreground hover:underline",onClick:kt},{default:h(()=>[K(S(l(e)["content-list.reset"]),1)]),_:1})])])]),$("div",da,[(p(!0),q(se,null,xe(Ne.value,(x,G)=>(p(),q("div",{key:x,draggable:!0,class:ee(l(J)("flex w-full items-center gap-1 rounded-md px-1.5 py-1.5 text-xs transition-all",ae.value===x?"opacity-30 bg-accent scale-95":"hover:bg-accent",N.value.has(x)&&"bg-primary/5 border border-primary/10")),onDragstart:b=>_t(b,x),onDragover:Ve,onDrop:b=>wt(b,x),onDragend:Ee},[$("div",fa,[k(l(Kn),{class:"size-3.5 cursor-grab text-muted-foreground/40 active:cursor-grabbing"}),$("div",ha,[k(l(ue),{variant:"ghost",size:"sm",class:"h-auto p-0 text-muted-foreground/30 hover:text-foreground disabled:opacity-20",disabled:G===0,onClick:re(b=>Pe(x,"up"),["stop"])},{default:h(()=>[k(l(Nn),{class:"size-2.5"})]),_:1},8,["disabled","onClick"]),k(l(ue),{variant:"ghost",size:"sm",class:"h-auto p-0 text-muted-foreground/30 hover:text-foreground disabled:opacity-20",disabled:G===Ne.value.length-1,onClick:re(b=>Pe(x,"down"),["stop"])},{default:h(()=>[k(l(jn),{class:"size-2.5"})]),_:1},8,["disabled","onClick"])])]),k(l(ue),{variant:"ghost",size:"sm",class:"shrink-0 h-auto p-0.5",onClick:re(b=>xt(x),["stop"])},{default:h(()=>[(p(),C(Te(E.value.has(x)?l(Hn):l(Un)),{class:ee(l(J)("size-3.5",E.value.has(x)?"text-muted-foreground/30":"text-foreground"))},null,8,["class"]))]),_:2},1032,["onClick"]),$("span",{class:ee(l(J)("flex-1 truncate",E.value.has(x)&&"text-muted-foreground/50 line-through"))},S(x),3),U.value[x]?(p(),C(l(ie),{key:0,variant:"secondary",class:ee(l(J)("text-[9px] h-4 px-1 shrink-0",E.value.has(x)&&"opacity-30"))},{default:h(()=>[K(S(U.value[x]),1)]),_:2},1032,["class"])):te("",!0),k(l(ue),{variant:"ghost",size:"sm",class:"shrink-0 h-auto p-0.5",onClick:re(b=>lt(x),["stop"])},{default:h(()=>[(p(),C(Te(N.value.has(x)?l(nr):l(Zn)),{class:ee(l(J)("size-3",N.value.has(x)?"text-primary":"text-muted-foreground/30 hover:text-muted-foreground"))},null,8,["class"]))]),_:2},1032,["onClick"])],42,pa))),128))])]),_:1})]),_:1}),$("span",ga,S(R.value)+" "+S(R.value===1?"entry":"entries"),1)]),k(Xt,{title:l(e)["content-list.ask-your-agent"],class:"mb-4"},{default:h(()=>[$("div",ma,[k(Me,{prompt:`Add a new entry to ${a.value}`},null,8,["prompt"]),k(Me,{prompt:`Update the content of ${a.value}`},null,8,["prompt"]),k(Me,{prompt:`Translate ${a.value} content to Turkish`},null,8,["prompt"]),k(Me,{prompt:`Delete draft entries from ${a.value}`},null,8,["prompt"])])]),_:1},8,["title"]),l(n).loading&&M.value.length===0?(p(),q("div",va,[k(l(Qt),{class:"size-6 animate-spin text-primary"})])):M.value.length===0?(p(),q("div",ya,[$("div",xa,[k(l(Ln),{class:"size-6 text-muted-foreground"})]),$("h2",ba,S(l(e)["content-list.no-entries-yet"]),1),$("p",ka,S(l(e)["content-list.create-content-using-ai"]),1),k(Xt,{title:l(e)["content-list.ask-your-agent"],class:"mt-6 w-full max-w-md"},{default:h(()=>[k(Me,{prompt:`Create sample content for ${a.value}`},null,8,["prompt"]),k(Me,{prompt:`Generate 5 entries for ${a.value}`},null,8,["prompt"])]),_:1},8,["title"])])):_.value.length===0?(p(),q("div",_a,[$("p",wa,S(l(e)["content-list.no-entries-matching"])+S(m.value)+'" ',1)])):(p(),q(se,{key:3},[$("div",Sa,[k(l(Zl),null,{default:h(()=>[k(l(Gl),null,{default:h(()=>[k(l(qt),{class:"hover:bg-transparent"},{default:h(()=>[k(l(Ct),{class:"w-10 text-center text-[11px] font-medium text-muted-foreground"},{default:h(()=>[...y[16]||(y[16]=[K("#",-1)])]),_:1}),(p(!0),q(se,null,xe(Be.value,x=>(p(),C(l(Ct),{key:x,class:ee(l(J)("text-[11px] font-medium uppercase tracking-wider text-muted-foreground",N.value.has(x)&&"bg-background/95 backdrop-blur"))},{default:h(()=>[$("div",$a,[N.value.has(x)?(p(),C(l(nr),{key:0,class:"size-2.5 text-primary/50"})):te("",!0),K(" "+S(x),1)])]),_:2},1032,["class"]))),128)),k(l(Ct),{class:"w-10"})]),_:1})]),_:1}),k(l(Ql),null,{default:h(()=>[(p(!0),q(se,null,xe(L.value,(x,G)=>(p(),q(se,{key:G},[k(l(qt),{class:ee(l(J)("group/row cursor-pointer transition-colors",H.value===G?"bg-muted/50":"hover:bg-muted/30",G%2===1&&H.value!==G&&"bg-muted/15")),onClick:b=>Gr(G)},{default:h(()=>[k(l(ut),{class:"w-10 text-center"},{default:h(()=>[$("div",qa,[$("span",Ca,S((w.value-1)*B.value+G+1),1),(p(),C(Te(H.value===G?l(qr):l(It)),{class:"size-3 text-muted-foreground/50"}))])]),_:2},1024),(p(!0),q(se,null,xe(Be.value,b=>(p(),C(l(ut),{key:b,class:"max-w-60"},{default:h(()=>[ye(x[b],b)==="empty"?(p(),q(se,{key:0},[ce(b)?(p(),q("span",Ba,[k(l(Gt),{class:"size-3"}),K(" "+S(l(e)["content-list.missing"]),1)])):(p(),q("span",Pa,"—"))],64)):ye(x[b],b)==="boolean"?(p(),q("div",{key:1,class:ee(l(J)("inline-flex h-5 w-9 items-center rounded-full px-0.5 transition-colors",x[b]?"bg-primary/20":"bg-muted"))},[$("div",{class:ee(l(J)("size-4 rounded-full shadow-sm transition-transform",x[b]?"translate-x-4 bg-primary":"translate-x-0 bg-muted-foreground/40"))},null,2)],2)):ye(x[b],b)==="array"?(p(),C(l(ie),{key:2,variant:"secondary",class:"text-[10px]"},{default:h(()=>[K(S(x[b].length)+" "+S(x[b].length===1?"item":"items"),1)]),_:2},1024)):ye(x[b],b)==="number"?(p(),q("span",Ta,S(x[b]),1)):ye(x[b],b)==="date"?(p(),q("div",Aa,[$("p",za,S(l(ot)(x[b]).title),1),$("p",Ra,S(l(ot)(x[b]).subtitle),1)])):ye(x[b],b)==="color"?(p(),q("div",Oa,[$("span",{class:"inline-block size-4 rounded border border-border shadow-sm",style:dt({backgroundColor:String(x[b])})},null,4),$("span",Ia,S(x[b]),1)])):ye(x[b],b)==="markdown"||ye(x[b],b)==="richtext"?(p(),C(l(ie),{key:6,variant:"outline",class:"text-[10px]"},{default:h(()=>[K(S(ye(x[b],b)==="markdown"?"MD":"Rich"),1)]),_:2},1024)):ye(x[b],b)==="relation"?(p(),C(l(ie),{key:7,variant:"outline",class:"text-[10px] font-mono"},{default:h(()=>[K(S(Array.isArray(x[b])?`${x[b].length} refs`:"ref"),1)]),_:2},1024)):(p(),q("span",Ea,S(l(gn)(x[b],60)),1))]),_:2},1024))),128)),k(l(ut),{class:"w-10 text-center"},{default:h(()=>[k(l(_n),null,{default:h(()=>[k(l(wn),null,{default:h(()=>[k(l(Sn),{"as-child":""},{default:h(()=>[k(l(ue),{variant:"ghost",size:"sm",class:"size-7 p-0 text-muted-foreground opacity-0 transition-all group-hover/row:opacity-100 hover:bg-accent hover:text-foreground",onClick:re(b=>we(x),["stop"])},{default:h(()=>[(p(),C(Te(oe.value===(x.id??G)?l(Bt):l(Yt)),{class:ee(["size-3.5",oe.value===(x.id??G)&&"text-status-success"])},null,8,["class"]))]),_:2},1032,["onClick"])]),_:2},1024),k(l($n),{side:"left"},{default:h(()=>[$("p",Da,S(oe.value===(x.id??G)?"Copied!":"Copy entry as JSON"),1)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1032,["class","onClick"]),H.value===G?(p(),C(l(qt),{key:0,class:"bg-muted/30 hover:bg-muted/30"},{default:h(()=>[k(l(ut),{colspan:Be.value.length+2,class:"p-0"},{default:h(()=>[$("div",Ma,[$("div",La,[(p(!0),q(se,null,xe(x,(b,F)=>(p(),q("div",{key:String(F),class:"group/card flex flex-col gap-1 rounded-md border border-border/50 bg-background/50 px-3 py-2 overflow-hidden"},[$("div",ja,[$("span",Fa,S(F),1),U.value[String(F)]?(p(),C(l(ie),{key:0,variant:"secondary",class:"text-[8px] h-3.5 px-1"},{default:h(()=>[K(S(U.value[String(F)]),1)]),_:2},1024)):te("",!0),$("div",Na,[String(F)==="id"?(p(),C(l(ue),{key:0,variant:"ghost",size:"sm",class:"size-5 p-0 text-muted-foreground hover:bg-accent hover:text-foreground",onClick:re(ne=>Xr(String(b)),["stop"])},{default:h(()=>[(p(),C(Te(z.value===String(b)?l(Bt):l(Yt)),{class:ee(["size-3",z.value===String(b)&&"text-status-success"])},null,8,["class"]))]),_:2},1032,["onClick"])):te("",!0),b!=null&&b!==""&&Zr(b,String(F))?(p(),C(l(ue),{key:1,variant:"ghost",size:"sm",class:"size-5 p-0 text-muted-foreground hover:bg-accent hover:text-foreground",onClick:re(ne=>Kr(String(F),b),["stop"])},{default:h(()=>[k(l(Wn),{class:"size-3"})]),_:1},8,["onClick"])):te("",!0)])]),b==null||b===""?(p(),q(se,{key:0},[ce(String(F))?(p(),q("span",Va,[k(l(Gt),{class:"size-3"}),K(" "+S(l(e)["content-list.required"]),1)])):(p(),q("span",Ha,"—"))],64)):U.value[String(F)]==="boolean"||typeof b=="boolean"?(p(),q("div",Ua,[$("div",{class:ee(l(J)("h-5 w-9 rounded-full p-0.5 transition-colors",b?"bg-primary":"bg-muted"))},[$("div",{class:ee(l(J)("size-4 rounded-full bg-white shadow transition-transform",b?"translate-x-4":"translate-x-0"))},null,2)],2),$("span",Ka,S(b?"Yes":"No"),1)])):U.value[String(F)]==="color"?(p(),q("div",Wa,[$("span",{class:"size-6 rounded-md border border-border shadow-sm",style:dt({backgroundColor:String(b)})},null,4),$("span",Za,S(b),1)])):U.value[String(F)]==="rating"?(p(),q("div",Qa,[(p(),q(se,null,xe(5,ne=>$("span",{key:ne,class:ee(l(J)("text-base",ne<=Number(b)?"text-amber-400":"text-muted/50"))},"★",2)),64)),$("span",Ga,S(b)+"/5",1)])):U.value[String(F)]==="percent"?(p(),q("div",Ja,[$("div",Xa,[$("div",{class:"h-full rounded-full bg-primary transition-all",style:dt({width:`${Math.min(Number(b),100)}%`})},null,4)]),$("span",Ya,S(b)+"%",1)])):U.value[String(F)]==="email"?(p(),q("a",{key:5,href:`mailto:${b}`,class:"inline-flex items-center gap-1.5 text-xs text-primary hover:underline",onClick:y[4]||(y[4]=re(()=>{},["stop"]))},S(b),9,eo)):U.value[String(F)]==="url"?(p(),q("a",{key:6,href:String(b),target:"_blank",rel:"noopener",class:"inline-flex items-center gap-1.5 text-xs text-primary hover:underline truncate max-w-full",onClick:y[5]||(y[5]=re(()=>{},["stop"]))},S(String(b).replace(/^https?:\/\//,"")),9,to)):U.value[String(F)]==="phone"?(p(),q("a",{key:7,href:`tel:${b}`,class:"inline-flex items-center gap-1.5 text-xs text-primary hover:underline",onClick:y[6]||(y[6]=re(()=>{},["stop"]))},S(b),9,ro)):U.value[String(F)]==="image"?(p(),q("div",no,[$("div",so,[$("img",{src:String(b),alt:String(F),class:"size-10 rounded-md object-cover",onError:y[7]||(y[7]=ne=>ne.target.style.display="none")},null,40,lo)]),$("span",ao,S(String(b).split("/").pop()),1)])):U.value[String(F)]==="video"||U.value[String(F)]==="file"?(p(),q("div",oo,[k(l(ie),{variant:"outline",class:"text-[10px] shrink-0"},{default:h(()=>{var ne;return[K(S(U.value[String(F)]==="video"?"▶":"📎")+" "+S((ne=String(b).split(".").pop())==null?void 0:ne.toUpperCase()),1)]}),_:2},1024),$("span",io,S(String(b).split("/").pop()),1)])):U.value[String(F)]==="relation"?(p(),C(l(ie),{key:10,variant:"outline",class:"text-[10px] font-mono gap-1"},{default:h(()=>[K(" 🔗 "+S(b),1)]),_:2},1024)):U.value[String(F)]==="relations"&&Array.isArray(b)?(p(),q("div",uo,[(p(!0),q(se,null,xe(b,(ne,St)=>(p(),C(l(ie),{key:St,variant:"outline",class:"text-[10px] font-mono gap-1"},{default:h(()=>[K(" 🔗 "+S(ne),1)]),_:2},1024))),128))])):Array.isArray(b)?(p(),q("div",co,[(p(!0),q(se,null,xe(b.slice(0,8),(ne,St)=>(p(),C(l(ie),{key:St,variant:"outline",class:"text-[10px]"},{default:h(()=>[K(S(typeof ne=="string"?ne:JSON.stringify(ne)),1)]),_:2},1024))),128)),b.length>8?(p(),C(l(ie),{key:0,variant:"secondary",class:"text-[10px]"},{default:h(()=>[K("+"+S(b.length-8),1)]),_:2},1024)):te("",!0)])):U.value[String(F)]==="select"?(p(),C(l(ie),{key:13,variant:"secondary",class:"text-[10px] w-fit"},{default:h(()=>[K(S(b),1)]),_:2},1024)):U.value[String(F)]==="date"||U.value[String(F)]==="datetime"?(p(),q("span",po,[K(S(l(ot)(String(b)).title)+" ",1),U.value[String(F)]==="datetime"?(p(),q("span",fo,S(l(ot)(String(b)).subtitle),1)):te("",!0)])):U.value[String(F)]==="slug"?(p(),q("span",ho,"/"+S(b),1)):U.value[String(F)]==="code"?(p(),q("code",go,S(b),1)):U.value[String(F)]==="markdown"||U.value[String(F)]==="richtext"?(p(),q("div",mo,[k(l(ie),{variant:"secondary",class:"text-[9px] shrink-0"},{default:h(()=>[K(S(U.value[String(F)]==="markdown"?"MD":"HTML"),1)]),_:2},1024),$("span",vo,S(String(b).replace(/<[^>]*>/g,"").replace(/[#*`_\[\]]/g,"")),1)])):["number","integer","decimal"].includes(U.value[String(F)]??"")?(p(),q("span",yo,S(b),1)):(p(),q("span",xo,S(typeof b=="string"?b:JSON.stringify(b)),1))]))),128))])])]),_:2},1032,["colspan"])]),_:2},1024)):te("",!0)],64))),128))]),_:1})]),_:1})]),P.value>1||R.value>10?(p(),q("div",bo,[$("div",ko,[$("span",_o,S(l(e)["content-list.show"]),1),k(l(pr),{"model-value":String(B.value),"onUpdate:modelValue":y[8]||(y[8]=x=>{B.value=Number(x),at(1)})},{default:h(()=>[k(l(hr),{size:"sm",class:"h-7 w-16 text-xs"},{default:h(()=>[k(l(gr))]),_:1}),k(l(fr),null,{default:h(()=>[k(l(Qe),{value:"10"},{default:h(()=>[...y[17]||(y[17]=[K("10",-1)])]),_:1}),k(l(Qe),{value:"20"},{default:h(()=>[...y[18]||(y[18]=[K("20",-1)])]),_:1}),k(l(Qe),{value:"50"},{default:h(()=>[...y[19]||(y[19]=[K("50",-1)])]),_:1})]),_:1})]),_:1},8,["model-value"])]),$("div",wo,[k(l(ue),{variant:"outline",size:"sm",class:"size-7 p-0",disabled:w.value<=1,onClick:y[9]||(y[9]=x=>at(w.value-1))},{default:h(()=>[k(l(Vn),{class:"size-4"})]),_:1},8,["disabled"]),$("div",So,[$("span",null,S(l(e)["content-list.page"]),1),an($("input",{"onUpdate:modelValue":y[10]||(y[10]=x=>A.value=x),type:"text",inputmode:"numeric",class:"h-7 w-10 rounded-md border border-input bg-background text-center text-xs text-foreground outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50",onBlur:Jr,onKeydown:y[11]||(y[11]=un(x=>x.target.blur(),["enter"]))},null,544),[[on,A.value]]),$("span",null,"of "+S(P.value),1)]),k(l(ue),{variant:"outline",size:"sm",class:"size-7 p-0",disabled:w.value>=P.value,onClick:y[12]||(y[12]=x=>at(w.value+1))},{default:h(()=>[k(l(Fn),{class:"size-4"})]),_:1},8,["disabled"])]),y[20]||(y[20]=$("div",{class:"w-24"},null,-1))])):te("",!0)],64)),k(yn,{message:l(e)["content-list.content-mutations-are-agent"],class:"mt-4"},null,8,["message"]),k(l(On),{open:fe.value,"onUpdate:open":y[13]||(y[13]=x=>fe.value=x)},{default:h(()=>[k(l(In),{class:"max-w-2xl max-h-[80vh] flex flex-col"},{default:h(()=>[k(l(En),null,{default:h(()=>[k(l(Dn),{class:"flex items-center gap-2"},{default:h(()=>[$("span",$o,S(De.value),1),k(l(ie),{variant:"secondary",class:"text-[10px]"},{default:h(()=>[K(S(Se.value),1)]),_:1})]),_:1})]),_:1}),$("div",qo,[Se.value==="markdown"?(p(),q("div",{key:0,class:"prose prose-sm dark:prose-invert max-w-none",innerHTML:Wr(String(he.value))},null,8,Co)):Se.value==="richtext"?(p(),q("div",{key:1,class:"prose prose-sm dark:prose-invert max-w-none",innerHTML:he.value},null,8,Bo)):Se.value==="code"?(p(),q("pre",Po,[$("code",null,S(he.value),1)])):typeof he.value=="object"?(p(),q("pre",To,[y[21]||(y[21]=K(" ",-1)),$("code",null,S(JSON.stringify(he.value,null,2)),1)])):(p(),q("p",Ao,S(he.value),1))])]),_:1})]),_:1},8,["open"])])])}}}),Ro=(r,e)=>{const t=r.__vccOpts||r;for(const[n,s]of e)t[n]=s;return t},li=Ro(zo,[["__scopeId","data-v-d027bdab"]]);export{li as default};
@@ -0,0 +1 @@
1
+ input[type=text][inputmode=numeric][data-v-d027bdab]{-moz-appearance:textfield}input[type=text][inputmode=numeric][data-v-d027bdab]::-webkit-outer-spin-button,input[type=text][inputmode=numeric][data-v-d027bdab]::-webkit-inner-spin-button{-webkit-appearance:none}
@@ -1 +1 @@
1
- import{a as $,p as l,j as d,u as t,q as s,B as n,F as p,x as C,g as w,r as F,h as z,o as a,y as B,z as V,b as L,A as N,e as x,s as _,C as S}from"./index-CoUshYEB.js";import{u as q}from"./project-B1qSm0Fz.js";import{_ as P}from"./PageHeader.vue_vue_type_script_setup_true_lang-C7aWxNSw.js";import{_ as g}from"./index-WHgvdYOs.js";import{S as T,_ as A}from"./Input.vue_vue_type_script_setup_true_lang-otPltlZG.js";import{d as E}from"./useWatch-COpVIQvm.js";import{F as h}from"./file-text-BDHXQ95W.js";import{L as K}from"./languages-BTcd2Rl1.js";import{B as O}from"./book-open-BrGAe3tk.js";import{D as R}from"./database-BGEFn4Oq.js";const U={class:"px-6 py-6"},G={key:0,class:"flex flex-col items-center py-16 text-center"},H={class:"mb-4 flex size-14 items-center justify-center rounded-full bg-muted"},I={class:"text-lg font-semibold"},J={class:"mt-2 max-w-sm text-sm text-muted-foreground"},M={class:"relative mb-6 max-w-sm"},Q={class:"mb-3 text-xs font-medium uppercase tracking-wider text-muted-foreground"},W={class:"space-y-1.5"},X=["onClick"],Y={class:"min-w-0 flex-1"},Z={class:"font-medium text-foreground"},tt={class:"flex items-center gap-2 shrink-0"},et={key:0,class:"py-12 text-center text-sm text-muted-foreground"},pt=$({__name:"ContentPage",setup(st){const e=E("serve-ui-texts").locale("en").get(),v=q(),j=S(),u=F(""),b=z(()=>{var r;const o=((r=v.status)==null?void 0:r.models)??[];if(!u.value)return o;const i=u.value.toLowerCase();return o.filter(m=>m.id.toLowerCase().includes(i)||m.domain.toLowerCase().includes(i))}),D=z(()=>{const o={};for(const i of b.value){const r=i.domain||"default";o[r]||(o[r]=[]),o[r].push(i)}return o}),y={collection:{icon:R,color:"bg-primary/10 text-primary",label:e["content.collection"]},singleton:{icon:h,color:"bg-status-info/10 text-status-info",label:e["content.singleton"]},document:{icon:O,color:"bg-status-success/10 text-status-success",label:e["content.document"]},dictionary:{icon:h,color:"bg-status-warning/10 text-status-warning",label:e["content.dictionary"]}};function f(o){return y[o]??y.collection}return(o,i)=>{var r;return a(),l("div",null,[d(P,{title:t(e)["content.content"],description:t(e)["content.browse-and-inspect-content"]},null,8,["title","description"]),s("div",U,[(((r=t(v).status)==null?void 0:r.models)??[]).length===0?(a(),l("div",G,[s("div",H,[d(t(h),{class:"size-6 text-muted-foreground"})]),s("h2",I,n(t(e)["content.no-models-yet"]),1),s("p",J,n(t(e)["content.create-models-using-your"]),1)])):(a(),l(p,{key:1},[s("div",M,[d(t(T),{class:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),d(t(A),{modelValue:u.value,"onUpdate:modelValue":i[0]||(i[0]=m=>u.value=m),placeholder:t(e)["content.filter-models"],class:"h-9 pl-9 text-sm"},null,8,["modelValue","placeholder"])]),(a(!0),l(p,null,C(D.value,(m,k)=>(a(),l("div",{key:k,class:"mb-8 last:mb-0"},[s("h3",Q,n(k),1),s("div",W,[(a(!0),l(p,null,C(m,c=>(a(),l("button",{key:c.id,class:B(t(V)("group flex w-full items-center gap-3 rounded-lg border border-border bg-card px-4 py-3 text-left transition-all","hover:border-primary/30 hover:shadow-sm")),onClick:ot=>t(j).push(`/content/${c.id}`)},[s("div",{class:B(t(V)("flex size-8 shrink-0 items-center justify-center rounded-md",f(c.kind).color))},[(a(),L(N(f(c.kind).icon),{class:"size-4"}))],2),s("div",Y,[s("span",Z,n(c.id),1)]),s("div",tt,[d(t(g),{variant:"secondary",class:"text-[10px]"},{default:x(()=>[_(n(f(c.kind).label),1)]),_:2},1024),d(t(g),{variant:"outline",class:"text-[10px]"},{default:x(()=>[_(n(c.fields)+" "+n(t(e)["content.fields"]),1)]),_:2},1024),c.i18n?(a(),L(t(g),{key:0,variant:"outline",class:"text-[10px] text-status-info border-status-info/30"},{default:x(()=>[d(t(K),{class:"mr-0.5 size-3"}),_(" "+n(t(e)["content.i18n"]),1)]),_:1})):w("",!0)])],10,X))),128))])]))),128)),b.value.length===0&&u.value?(a(),l("div",et,n(t(e)["content.no-models-matching"])+n(u.value)+'" ',1)):w("",!0)],64))])])}}});export{pt as default};
1
+ import{a as $,p as l,j as d,u as t,q as s,B as n,F as p,x as C,g as w,r as F,h as z,o as a,y as B,z as V,b as L,A as N,e as x,s as _,C as S}from"./index-BL1I-H3q.js";import{u as q}from"./project-Cr3_1TVE.js";import{_ as P}from"./PageHeader.vue_vue_type_script_setup_true_lang-C8ntGi1-.js";import{_ as g}from"./index-cUml-HE9.js";import{S as T,_ as A}from"./Input.vue_vue_type_script_setup_true_lang-BM6hi7u6.js";import{d as E}from"./useWatch-CEXwnJFx.js";import{F as h}from"./file-text-B83xaNeI.js";import{L as K}from"./languages-CXKcy1-I.js";import{B as O}from"./book-open-BMIAduGI.js";import{D as R}from"./database-wAPnOXAq.js";const U={class:"px-6 py-6"},G={key:0,class:"flex flex-col items-center py-16 text-center"},H={class:"mb-4 flex size-14 items-center justify-center rounded-full bg-muted"},I={class:"text-lg font-semibold"},J={class:"mt-2 max-w-sm text-sm text-muted-foreground"},M={class:"relative mb-6 max-w-sm"},Q={class:"mb-3 text-xs font-medium uppercase tracking-wider text-muted-foreground"},W={class:"space-y-1.5"},X=["onClick"],Y={class:"min-w-0 flex-1"},Z={class:"font-medium text-foreground"},tt={class:"flex items-center gap-2 shrink-0"},et={key:0,class:"py-12 text-center text-sm text-muted-foreground"},pt=$({__name:"ContentPage",setup(st){const e=E("serve-ui-texts").locale("en").get(),v=q(),j=S(),u=F(""),b=z(()=>{var r;const o=((r=v.status)==null?void 0:r.models)??[];if(!u.value)return o;const i=u.value.toLowerCase();return o.filter(m=>m.id.toLowerCase().includes(i)||m.domain.toLowerCase().includes(i))}),D=z(()=>{const o={};for(const i of b.value){const r=i.domain||"default";o[r]||(o[r]=[]),o[r].push(i)}return o}),y={collection:{icon:R,color:"bg-primary/10 text-primary",label:e["content.collection"]},singleton:{icon:h,color:"bg-status-info/10 text-status-info",label:e["content.singleton"]},document:{icon:O,color:"bg-status-success/10 text-status-success",label:e["content.document"]},dictionary:{icon:h,color:"bg-status-warning/10 text-status-warning",label:e["content.dictionary"]}};function f(o){return y[o]??y.collection}return(o,i)=>{var r;return a(),l("div",null,[d(P,{title:t(e)["content.content"],description:t(e)["content.browse-and-inspect-content"]},null,8,["title","description"]),s("div",U,[(((r=t(v).status)==null?void 0:r.models)??[]).length===0?(a(),l("div",G,[s("div",H,[d(t(h),{class:"size-6 text-muted-foreground"})]),s("h2",I,n(t(e)["content.no-models-yet"]),1),s("p",J,n(t(e)["content.create-models-using-your"]),1)])):(a(),l(p,{key:1},[s("div",M,[d(t(T),{class:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),d(t(A),{modelValue:u.value,"onUpdate:modelValue":i[0]||(i[0]=m=>u.value=m),placeholder:t(e)["content.filter-models"],class:"h-9 pl-9 text-sm"},null,8,["modelValue","placeholder"])]),(a(!0),l(p,null,C(D.value,(m,k)=>(a(),l("div",{key:k,class:"mb-8 last:mb-0"},[s("h3",Q,n(k),1),s("div",W,[(a(!0),l(p,null,C(m,c=>(a(),l("button",{key:c.id,class:B(t(V)("group flex w-full items-center gap-3 rounded-lg border border-border bg-card px-4 py-3 text-left transition-all","hover:border-primary/30 hover:shadow-sm")),onClick:ot=>t(j).push(`/content/${c.id}`)},[s("div",{class:B(t(V)("flex size-8 shrink-0 items-center justify-center rounded-md",f(c.kind).color))},[(a(),L(N(f(c.kind).icon),{class:"size-4"}))],2),s("div",Y,[s("span",Z,n(c.id),1)]),s("div",tt,[d(t(g),{variant:"secondary",class:"text-[10px]"},{default:x(()=>[_(n(f(c.kind).label),1)]),_:2},1024),d(t(g),{variant:"outline",class:"text-[10px]"},{default:x(()=>[_(n(c.fields)+" "+n(t(e)["content.fields"]),1)]),_:2},1024),c.i18n?(a(),L(t(g),{key:0,variant:"outline",class:"text-[10px] text-status-info border-status-info/30"},{default:x(()=>[d(t(K),{class:"mr-0.5 size-3"}),_(" "+n(t(e)["content.i18n"]),1)]),_:1})):w("",!0)])],10,X))),128))])]))),128)),b.value.length===0&&u.value?(a(),l("div",et,n(t(e)["content.no-models-matching"])+n(u.value)+'" ',1)):w("",!0)],64))])])}}});export{pt as default};