cognova 0.2.26 → 0.2.27

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 (170) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{C4Ii8cYC.js → 2Eo3qwxj.js} +1 -1
  3. package/.output/public/_nuxt/{lfg-J79K.js → 2ixlK8td.js} +1 -1
  4. package/.output/public/_nuxt/{D57E8FC4.js → 2nDmPuey.js} +1 -1
  5. package/.output/public/_nuxt/{rVZcJ6Pz.js → 6f0CtDWh.js} +1 -1
  6. package/.output/public/_nuxt/{46eRQaVv.js → 7VIfpS3K.js} +1 -1
  7. package/.output/public/_nuxt/{BD07a6OS.js → 8T7bItPs.js} +3 -3
  8. package/.output/public/_nuxt/{Dc_VwXJs.js → B2ejvp4F.js} +1 -1
  9. package/.output/public/_nuxt/{bHsFNLQP.js → B3EVQLy0.js} +1 -1
  10. package/.output/public/_nuxt/{D_1GDAlv.js → B3WWnSJo.js} +1 -1
  11. package/.output/public/_nuxt/{CtNN2F57.js → B6kGLfxE.js} +1 -1
  12. package/.output/public/_nuxt/{BHAaeL5L.js → B8E4nRtc.js} +1 -1
  13. package/.output/public/_nuxt/{CIDjuJ7I.js → BF1GoXYw.js} +1 -1
  14. package/.output/public/_nuxt/{DEmzTuCa.js → BFhzL-L6.js} +1 -1
  15. package/.output/public/_nuxt/{CruI_TS3.js → BH_Lonko.js} +1 -1
  16. package/.output/public/_nuxt/{DEBOaUgW.js → BIRrab0B.js} +1 -1
  17. package/.output/public/_nuxt/{swgNRlWy.js → BIRvCR2S.js} +1 -1
  18. package/.output/public/_nuxt/{B8fLdQfp.js → BISpLSKY.js} +1 -1
  19. package/.output/public/_nuxt/{qI8JV5dU.js → BIhmDjJ8.js} +1 -1
  20. package/.output/public/_nuxt/BMsNdiuj.js +1 -0
  21. package/.output/public/_nuxt/{Bxs6RCfp.js → BP60VAOa.js} +1 -1
  22. package/.output/public/_nuxt/{D4wS6gzr.js → BRHBOpyl.js} +1 -1
  23. package/.output/public/_nuxt/{FGRiZ9J1.js → BSHWLnRg.js} +1 -1
  24. package/.output/public/_nuxt/BUa1DKMp.js +1 -0
  25. package/.output/public/_nuxt/{CIMG8oEU.js → BWgA6Icb.js} +1 -1
  26. package/.output/public/_nuxt/{Cwdn7ZtG.js → BY7b-3vi.js} +1 -1
  27. package/.output/public/_nuxt/{VRRYjCaC.js → BYRCVlFB.js} +1 -1
  28. package/.output/public/_nuxt/{C1wI_STa.js → B_IIr5Dj.js} +2 -2
  29. package/.output/public/_nuxt/{DFPu4h4a.js → BcGMY6mI.js} +1 -1
  30. package/.output/public/_nuxt/{CZvTOsiz.js → Bes0SO2V.js} +1 -1
  31. package/.output/public/_nuxt/{DmGbOc_e.js → Bf_52ujb.js} +1 -1
  32. package/.output/public/_nuxt/BgQoNHMg.js +1 -0
  33. package/.output/public/_nuxt/{BVkPh7-9.js → BiDXeTfW.js} +1 -1
  34. package/.output/public/_nuxt/{iTZxBLAr.js → BiIuqBpS.js} +3 -3
  35. package/.output/public/_nuxt/{9vdFTPZC.js → BiQQLbjx.js} +1 -1
  36. package/.output/public/_nuxt/{FmfogFAR.js → BivpMuR_.js} +1 -1
  37. package/.output/public/_nuxt/{CZQeFnOf.js → Bl7M4LXt.js} +1 -1
  38. package/.output/public/_nuxt/{zvDhkxQS.js → Bo6WXrLP.js} +1 -1
  39. package/.output/public/_nuxt/{rY0W1r76.js → BpN402qF.js} +2 -2
  40. package/.output/public/_nuxt/{DM9s28TO.js → BpyMs36w.js} +1 -1
  41. package/.output/public/_nuxt/{Brmj91Ns.js → Bq9rkJSd.js} +1 -1
  42. package/.output/public/_nuxt/{C3dJrgZH.js → BqSmw12h.js} +1 -1
  43. package/.output/public/_nuxt/{Dkpxacka.js → BrN_ntKk.js} +1 -1
  44. package/.output/public/_nuxt/{ChIzYvpz.js → Bx3A9QLd.js} +1 -1
  45. package/.output/public/_nuxt/{D5AjrkGO.js → Bzkzi9GX.js} +1 -1
  46. package/.output/public/_nuxt/{CCmSsj4q.js → C1pt3HyX.js} +1 -1
  47. package/.output/public/_nuxt/{B0_Iu2zi.js → C4XDZQVz.js} +1 -1
  48. package/.output/public/_nuxt/{BZjMzGZM.js → C4zN4OGX.js} +1 -1
  49. package/.output/public/_nuxt/{w3RSHXA6.js → C5IBUVPW.js} +1 -1
  50. package/.output/public/_nuxt/{wSCSxjgr.js → C6IV65Gy.js} +1 -1
  51. package/.output/public/_nuxt/{3AgfIirx.js → C6M-e7pT.js} +1 -1
  52. package/.output/public/_nuxt/{B1ea1Zc2.js → CAANELnI.js} +1 -1
  53. package/.output/public/_nuxt/{C7Wu2u5C.js → CAaAX5yO.js} +1 -1
  54. package/.output/public/_nuxt/{BGV4_re9.js → CAdrgifl.js} +1 -1
  55. package/.output/public/_nuxt/{BTImkTzA.js → CDX3o-x3.js} +1 -1
  56. package/.output/public/_nuxt/{CD6r4z4e.js → CJAiAVnY.js} +1 -1
  57. package/.output/public/_nuxt/{CjkXqgrT.js → CJa5E6Hb.js} +1 -1
  58. package/.output/public/_nuxt/{BHcVB9Fo.js → CKcctj3r.js} +1 -1
  59. package/.output/public/_nuxt/{Co86ycpI.js → CLk-ZoD9.js} +1 -1
  60. package/.output/public/_nuxt/{P3qGksT8.js → CSQciH0m.js} +1 -1
  61. package/.output/public/_nuxt/{BqyI8nU4.js → CSZw5eEq.js} +1 -1
  62. package/.output/public/_nuxt/{CrHLmWKE.js → CSu09NYz.js} +1 -1
  63. package/.output/public/_nuxt/{CZ5B974o.js → CSwU6kaw.js} +1 -1
  64. package/.output/public/_nuxt/{v-LIF5tR.js → CU58Jr3-.js} +1 -1
  65. package/.output/public/_nuxt/{DIMnGgEU.js → CXWZZrP6.js} +1 -1
  66. package/.output/public/_nuxt/{CGgHmnnS.js → CZT64TBr.js} +3 -3
  67. package/.output/public/_nuxt/{CLmiWiqr.js → CZZl10o-.js} +1 -1
  68. package/.output/public/_nuxt/{BwLYFg9w.js → CbLDrSEX.js} +1 -1
  69. package/.output/public/_nuxt/{DfAWgXhg.js → CfTBjUgE.js} +1 -1
  70. package/.output/public/_nuxt/{6k0gxaWW.js → CfiM4f33.js} +1 -1
  71. package/.output/public/_nuxt/{3hFj0Mf_.js → Cj2M_iYP.js} +1 -1
  72. package/.output/public/_nuxt/{BigIAhcT.js → CjPpmwck.js} +1 -1
  73. package/.output/public/_nuxt/{n5X4vNX9.js → CjhuD2Kg.js} +2 -2
  74. package/.output/public/_nuxt/{UQIfAAmf.js → CnLzT6v5.js} +1 -1
  75. package/.output/public/_nuxt/{DwEfItxe.js → CnViW7-O.js} +1 -1
  76. package/.output/public/_nuxt/{NNQizITf.js → Ctt1B8Lg.js} +1 -1
  77. package/.output/public/_nuxt/{m9zGH_2s.js → CuzrMna6.js} +1 -1
  78. package/.output/public/_nuxt/{B02JOKtW.js → Cv0TenvS.js} +1 -1
  79. package/.output/public/_nuxt/{BhtKu4xV.js → CzSXUP4q.js} +1 -1
  80. package/.output/public/_nuxt/{Dfi2mj_-.js → CzYLEcMN.js} +1 -1
  81. package/.output/public/_nuxt/{Cj3gDP-y.js → D-ysM-Cd.js} +1 -1
  82. package/.output/public/_nuxt/{CD_jDSWh.js → D2A5WweU.js} +1 -1
  83. package/.output/public/_nuxt/{Ehiy7Wkv.js → D5dMt776.js} +1 -1
  84. package/.output/public/_nuxt/{lA6pb86B.js → D5ut0FcJ.js} +1 -1
  85. package/.output/public/_nuxt/{CPb6IrVT.js → D7PJ9LEZ.js} +1 -1
  86. package/.output/public/_nuxt/{DmHn_Ae8.js → DA0qOQ-H.js} +1 -1
  87. package/.output/public/_nuxt/{BW0bq0Nu.js → DCKH9QC5.js} +1 -1
  88. package/.output/public/_nuxt/{DMCE1Up6.js → DCj0VKbE.js} +1 -1
  89. package/.output/public/_nuxt/{pFPRVtL-.js → DD864DXc.js} +1 -1
  90. package/.output/public/_nuxt/{CjVBL0o-.js → DEZB2UVM.js} +1 -1
  91. package/.output/public/_nuxt/{B27NM422.js → DGMjiZpH.js} +1 -1
  92. package/.output/public/_nuxt/{BMTKvzsm.js → DH9moCuc.js} +1 -1
  93. package/.output/public/_nuxt/{DuH9QzIG.js → DHmoYAOF.js} +1 -1
  94. package/.output/public/_nuxt/{QmdcFt0E.js → DKFnR3f3.js} +1 -1
  95. package/.output/public/_nuxt/{81-iumfM.js → DM2gKi5N.js} +1 -1
  96. package/.output/public/_nuxt/{d85YwuyC.js → DMar0qcv.js} +1 -1
  97. package/.output/public/_nuxt/{7msxmF5v.js → DNNOQPuJ.js} +1 -1
  98. package/.output/public/_nuxt/{CbLvLXmb.js → DSNEk90K.js} +1 -1
  99. package/.output/public/_nuxt/{B38X0n2w.js → DTb_yOmO.js} +1 -1
  100. package/.output/public/_nuxt/{QNqSZCYh.js → DWJ2tQkX.js} +1 -1
  101. package/.output/public/_nuxt/{uCsI7fpg.js → DbARsMbj.js} +1 -1
  102. package/.output/public/_nuxt/{Irw5CrIe.js → DbpzXcer.js} +1 -1
  103. package/.output/public/_nuxt/{6DKJrPTD.js → DcC8s2L0.js} +1 -1
  104. package/.output/public/_nuxt/{CxNJcty6.js → DcU1vVta.js} +1 -1
  105. package/.output/public/_nuxt/{BTs0cu3F.js → De4iE8YV.js} +1 -1
  106. package/.output/public/_nuxt/{B3TXSB_R.js → De94RhMH.js} +1 -1
  107. package/.output/public/_nuxt/{B8na0pik.js → DfIQdSBL.js} +1 -1
  108. package/.output/public/_nuxt/{pJF5jz72.js → DfLpZE5I.js} +1 -1
  109. package/.output/public/_nuxt/{DOs_ozN6.js → DhGDBmGP.js} +1 -1
  110. package/.output/public/_nuxt/{mLs_Q7_U.js → Dhf7T8TT.js} +1 -1
  111. package/.output/public/_nuxt/{CVTUqEcr.js → DjY2CmhB.js} +1 -1
  112. package/.output/public/_nuxt/{DfP6jcEM.js → Dj__3Bye.js} +1 -1
  113. package/.output/public/_nuxt/{iVfmia7K.js → DlOqPmYc.js} +1 -1
  114. package/.output/public/_nuxt/{Dbv2gAYq.js → Dm4dqn9Q.js} +1 -1
  115. package/.output/public/_nuxt/{BW-7wimi.js → Dn0NJtvh.js} +1 -1
  116. package/.output/public/_nuxt/{CDKJK4wW.js → DuDOxoNd.js} +1 -1
  117. package/.output/public/_nuxt/{CcJ0pNID.js → DwIL_HsX.js} +1 -1
  118. package/.output/public/_nuxt/DwbYPACo.js +1 -0
  119. package/.output/public/_nuxt/{Cfce_cVw.js → Dzjd35Uu.js} +1 -1
  120. package/.output/public/_nuxt/{BGa5KqPj.js → FOQllft2.js} +1 -1
  121. package/.output/public/_nuxt/{DoGLYOlq.js → FZ4DGVUC.js} +1 -1
  122. package/.output/public/_nuxt/{ByXbV9Xa.js → IwZpKn7a.js} +1 -1
  123. package/.output/public/_nuxt/{By5L5Smf.js → J00SROjJ.js} +1 -1
  124. package/.output/public/_nuxt/{1_nO5SO6.js → KEgU3jLl.js} +1 -1
  125. package/.output/public/_nuxt/{eB60bVen.js → KtLDewau.js} +1 -1
  126. package/.output/public/_nuxt/{IIvTjJqa.js → LFbgE4QY.js} +1 -1
  127. package/.output/public/_nuxt/{BtVAOj3K.js → MwLHW_S3.js} +1 -1
  128. package/.output/public/_nuxt/{Bn175bDC.js → SbeB_1mT.js} +1 -1
  129. package/.output/public/_nuxt/{Bk_mzzQ3.js → T9m6PG7Q.js} +1 -1
  130. package/.output/public/_nuxt/{DLfV22bF.js → UPUPLBes.js} +1 -1
  131. package/.output/public/_nuxt/{BaHB7JKe.js → UmRz2svG.js} +1 -1
  132. package/.output/public/_nuxt/{DB0uzc_1.js → UvHHDzTl.js} +1 -1
  133. package/.output/public/_nuxt/{C-tfM08H.js → YJeqx4Ll.js} +1 -1
  134. package/.output/public/_nuxt/{CSyssKl8.js → _fMejg0f.js} +1 -1
  135. package/.output/public/_nuxt/{DOTIy97K.js → aIIZqPga.js} +1 -1
  136. package/.output/public/_nuxt/{DXAD_aZW.js → awkGRsuS.js} +1 -1
  137. package/.output/public/_nuxt/builds/latest.json +1 -1
  138. package/.output/public/_nuxt/builds/meta/61420747-850d-4496-817a-d86f57e0fb7d.json +1 -0
  139. package/.output/public/_nuxt/{AMPsjNHJ.js → dGa7RyJ8.js} +1 -1
  140. package/.output/public/_nuxt/{gTGPvkTX.js → eTB2hbQs.js} +1 -1
  141. package/.output/public/_nuxt/{n_Arasow.js → iGKcFJAp.js} +1 -1
  142. package/.output/public/_nuxt/{D45gWhSU.js → k5H4Okf8.js} +1 -1
  143. package/.output/public/_nuxt/{DN5cHXGS.js → kbSxj5Sa.js} +1 -1
  144. package/.output/public/_nuxt/{CBJQYyqD.js → l0zNTVMN.js} +1 -1
  145. package/.output/public/_nuxt/{C_hl3kCw.js → lheR7PB2.js} +1 -1
  146. package/.output/public/_nuxt/{BVcLiEDk.js → p1xXbtMk.js} +1 -1
  147. package/.output/public/_nuxt/{B5oEzB-M.js → qBDqAV_3.js} +1 -1
  148. package/.output/public/_nuxt/{CJLlvuDm.js → qEwYRBS3.js} +1 -1
  149. package/.output/public/_nuxt/{RIAd5Wd1.js → tHI-osWJ.js} +1 -1
  150. package/.output/public/_nuxt/{DoSrePUc.js → tIRQIyWk.js} +1 -1
  151. package/.output/public/_nuxt/{D5IKvGig.js → uP6kBJyw.js} +1 -1
  152. package/.output/public/_nuxt/{By6urPVf.js → yyeTZy_R.js} +1 -1
  153. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  154. package/.output/server/chunks/build/styles.mjs +2 -2
  155. package/.output/server/chunks/nitro/nitro.mjs +900 -891
  156. package/.output/server/chunks/routes/{terminal.mjs → _ws/terminal.mjs} +39 -28
  157. package/.output/server/chunks/routes/_ws/terminal.mjs.map +1 -0
  158. package/.output/server/chunks/routes/notifications.mjs +1 -1
  159. package/.output/server/package.json +1 -1
  160. package/app/composables/useTerminal.ts +1 -1
  161. package/package.json +1 -1
  162. package/server/routes/_ws/terminal.ts +111 -0
  163. package/server/utils/pty-manager.ts +12 -3
  164. package/.output/public/_nuxt/CNB4wNeh.js +0 -1
  165. package/.output/public/_nuxt/CnB-ybCZ.js +0 -1
  166. package/.output/public/_nuxt/DAjV9Cip.js +0 -1
  167. package/.output/public/_nuxt/Suor9Vto.js +0 -1
  168. package/.output/public/_nuxt/builds/meta/d37c41da-8cec-4479-a3ac-3097aa4fb2e0.json +0 -1
  169. package/.output/server/chunks/routes/terminal.mjs.map +0 -1
  170. package/server/routes/terminal.ts +0 -98
@@ -1 +1 @@
1
- import{W as r,h as l,M as n,o as p,r as u,$ as i,ap as e}from"./CGgHmnnS.js";const d={base:"border-s-4 border-accented ps-4 italic"},b={__name:"ProseBlockquote",props:{class:{type:null,required:!1}},setup(s){const o=s,a=r(),t=l(()=>e({extend:e(d),...a.ui?.prose?.blockquote||{}}));return(c,m)=>(p(),n("blockquote",{class:i(t.value({class:o.class}))},[u(c.$slots,"default")],2))}};export{b as default};
1
+ import{W as r,h as l,M as n,o as p,r as u,$ as i,ap as e}from"./CZT64TBr.js";const d={base:"border-s-4 border-accented ps-4 italic"},b={__name:"ProseBlockquote",props:{class:{type:null,required:!1}},setup(s){const o=s,a=r(),t=l(()=>e({extend:e(d),...a.ui?.prose?.blockquote||{}}));return(c,m)=>(p(),n("blockquote",{class:i(t.value({class:o.class}))},[u(c.$slots,"default")],2))}};export{b as default};
@@ -1 +1 @@
1
- import{W as n,h as r,M as p,o as c,r as u,$ as i,ap as s}from"./CGgHmnnS.js";const m={base:"my-1.5 ps-1.5 leading-7 [&>ul]:my-0"},_={__name:"ProseLi",props:{class:{type:null,required:!1}},setup(e){const a=e,o=n(),l=r(()=>s({extend:s(m),...o.ui?.prose?.li||{}}));return(t,d)=>(c(),p("li",{class:i(l.value({class:a.class}))},[u(t.$slots,"default")],2))}};export{_ as default};
1
+ import{W as n,h as r,M as p,o as c,r as u,$ as i,ap as s}from"./CZT64TBr.js";const m={base:"my-1.5 ps-1.5 leading-7 [&>ul]:my-0"},_={__name:"ProseLi",props:{class:{type:null,required:!1}},setup(e){const a=e,o=n(),l=r(()=>s({extend:s(m),...o.ui?.prose?.li||{}}));return(t,d)=>(c(),p("li",{class:i(l.value({class:a.class}))},[u(t.$slots,"default")],2))}};export{_ as default};
@@ -1 +1 @@
1
- import{r as f}from"./DXAD_aZW.js";import{W as v,h as u,M as _,o,c as a,aa as s,w as m,ac as y,m as p,aw as g,$ as c,_ as b,a as h,ap as x}from"./CGgHmnnS.js";import"./iik6CYzq.js";const k={slots:{base:["group relative block px-4 py-3 rounded-md text-sm/6 my-5 last:mb-0 [&_code]:text-xs/5 [&_code]:bg-default [&_pre]:bg-default [&>div]:my-2.5 [&_ul]:my-2.5 [&_ol]:my-2.5 [&>*]:last:!mb-0 [&_ul]:ps-4.5 [&_ol]:ps-4.5 [&_li]:my-0","transition-colors"],icon:["size-4 shrink-0 align-sub me-1.5 inline-block","transition-colors"],externalIcon:["size-4 align-top absolute right-2 top-2 pointer-events-none","transition-colors"]},variants:{color:{primary:{base:"border border-primary/25 bg-primary/10 text-primary-600 dark:text-primary-300 [&_a]:text-primary [&_a]:hover:border-primary [&_a]:focus-visible:outline-primary [&_code]:text-primary-600 dark:[&_code]:text-primary-300 [&_code]:border-primary/25 [&_a]:hover:[&>code]:border-primary [&_a]:hover:[&>code]:text-primary [&_a]:focus-visible:[&>code]:border-primary [&_a]:focus-visible:[&>code]:text-primary [&>ul]:marker:text-primary/50",icon:"text-primary",externalIcon:"text-primary-600 dark:text-primary-300"},secondary:{base:"border border-secondary/25 bg-secondary/10 text-secondary-600 dark:text-secondary-300 [&_a]:text-secondary [&_a]:hover:border-secondary [&_a]:focus-visible:outline-secondary [&_code]:text-secondary-600 dark:[&_code]:text-secondary-300 [&_code]:border-secondary/25 [&_a]:hover:[&>code]:border-secondary [&_a]:hover:[&>code]:text-secondary [&_a]:focus-visible:[&>code]:border-secondary [&_a]:focus-visible:[&>code]:text-secondary [&>ul]:marker:text-secondary/50",icon:"text-secondary",externalIcon:"text-secondary-600 dark:text-secondary-300"},success:{base:"border border-success/25 bg-success/10 text-success-600 dark:text-success-300 [&_a]:text-success [&_a]:hover:border-success [&_a]:focus-visible:outline-success [&_code]:text-success-600 dark:[&_code]:text-success-300 [&_code]:border-success/25 [&_a]:hover:[&>code]:border-success [&_a]:hover:[&>code]:text-success [&_a]:focus-visible:[&>code]:border-success [&_a]:focus-visible:[&>code]:text-success [&>ul]:marker:text-success/50",icon:"text-success",externalIcon:"text-success-600 dark:text-success-300"},info:{base:"border border-info/25 bg-info/10 text-info-600 dark:text-info-300 [&_a]:text-info [&_a]:hover:border-info [&_a]:focus-visible:outline-info [&_code]:text-info-600 dark:[&_code]:text-info-300 [&_code]:border-info/25 [&_a]:hover:[&>code]:border-info [&_a]:hover:[&>code]:text-info [&_a]:focus-visible:[&>code]:border-info [&_a]:focus-visible:[&>code]:text-info [&>ul]:marker:text-info/50",icon:"text-info",externalIcon:"text-info-600 dark:text-info-300"},warning:{base:"border border-warning/25 bg-warning/10 text-warning-600 dark:text-warning-300 [&_a]:text-warning [&_a]:hover:border-warning [&_a]:focus-visible:outline-warning [&_code]:text-warning-600 dark:[&_code]:text-warning-300 [&_code]:border-warning/25 [&_a]:hover:[&>code]:border-warning [&_a]:hover:[&>code]:text-warning [&_a]:focus-visible:[&>code]:border-warning [&_a]:focus-visible:[&>code]:text-warning [&>ul]:marker:text-warning/50",icon:"text-warning",externalIcon:"text-warning-600 dark:text-warning-300"},error:{base:"border border-error/25 bg-error/10 text-error-600 dark:text-error-300 [&_a]:text-error [&_a]:hover:border-error [&_a]:focus-visible:outline-error [&_code]:text-error-600 dark:[&_code]:text-error-300 [&_code]:border-error/25 [&_a]:hover:[&>code]:border-error [&_a]:hover:[&>code]:text-error [&_a]:focus-visible:[&>code]:border-error [&_a]:focus-visible:[&>code]:text-error [&>ul]:marker:text-error/50",icon:"text-error",externalIcon:"text-error-600 dark:text-error-300"},neutral:{base:"border border-muted bg-muted text-default",icon:"text-highlighted",externalIcon:"text-dimmed"}},to:{true:"border-dashed"}},compoundVariants:[{color:"primary",to:!0,class:{base:"hover:border-primary has-focus-visible:border-primary",externalIcon:"group-hover:text-primary"}},{color:"secondary",to:!0,class:{base:"hover:border-secondary has-focus-visible:border-secondary",externalIcon:"group-hover:text-secondary"}},{color:"success",to:!0,class:{base:"hover:border-success has-focus-visible:border-success",externalIcon:"group-hover:text-success"}},{color:"info",to:!0,class:{base:"hover:border-info has-focus-visible:border-info",externalIcon:"group-hover:text-info"}},{color:"warning",to:!0,class:{base:"hover:border-warning has-focus-visible:border-warning",externalIcon:"group-hover:text-warning"}},{color:"error",to:!0,class:{base:"hover:border-error has-focus-visible:border-error",externalIcon:"group-hover:text-error"}},{color:"neutral",to:!0,class:{base:"hover:border-inverted has-focus-visible:border-inverted",externalIcon:"group-hover:text-highlighted"}}],defaultVariants:{color:"neutral"}},C=Object.assign({inheritAttrs:!1},{__name:"ProseCallout",props:{to:{type:null,required:!1},target:{type:[String,Object,null],required:!1},icon:{type:null,required:!1},color:{type:null,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(r){const e=r,n=v(),t=u(()=>x({extend:x(k),...n.ui?.prose?.callout||{}})({color:e.color,to:!!e.to})),i=u(()=>e.target||(e.to&&typeof e.to=="string"&&e.to.startsWith("http")?"_blank":void 0));return(d,l)=>(o(),_("div",{class:c(t.value.base({class:e.class}))},[r.to?(o(),a(g,p({key:0},{to:r.to,target:i.value,...d.$attrs},{class:"focus:outline-none",raw:""}),{default:m(()=>[...l[0]||(l[0]=[y("span",{class:"absolute inset-0","aria-hidden":"true"},null,-1)])]),_:1},16)):s("",!0),r.icon?(o(),a(b,{key:1,name:r.icon,class:c(t.value.icon({class:e.ui?.icon}))},null,8,["name","class"])):s("",!0),r.to&&i.value==="_blank"?(o(),a(b,{key:2,name:h(n).ui.icons.external,class:c(t.value.externalIcon({class:e.ui?.externalIcon}))},null,8,["name","class"])):s("",!0),f(d.$slots,"default",{mdcUnwrap:"p"})],2))}});export{C as default};
1
+ import{r as f}from"./awkGRsuS.js";import{W as v,h as u,M as _,o,c as a,aa as s,w as m,ac as y,m as p,aw as g,$ as c,_ as b,a as h,ap as x}from"./CZT64TBr.js";import"./iik6CYzq.js";const k={slots:{base:["group relative block px-4 py-3 rounded-md text-sm/6 my-5 last:mb-0 [&_code]:text-xs/5 [&_code]:bg-default [&_pre]:bg-default [&>div]:my-2.5 [&_ul]:my-2.5 [&_ol]:my-2.5 [&>*]:last:!mb-0 [&_ul]:ps-4.5 [&_ol]:ps-4.5 [&_li]:my-0","transition-colors"],icon:["size-4 shrink-0 align-sub me-1.5 inline-block","transition-colors"],externalIcon:["size-4 align-top absolute right-2 top-2 pointer-events-none","transition-colors"]},variants:{color:{primary:{base:"border border-primary/25 bg-primary/10 text-primary-600 dark:text-primary-300 [&_a]:text-primary [&_a]:hover:border-primary [&_a]:focus-visible:outline-primary [&_code]:text-primary-600 dark:[&_code]:text-primary-300 [&_code]:border-primary/25 [&_a]:hover:[&>code]:border-primary [&_a]:hover:[&>code]:text-primary [&_a]:focus-visible:[&>code]:border-primary [&_a]:focus-visible:[&>code]:text-primary [&>ul]:marker:text-primary/50",icon:"text-primary",externalIcon:"text-primary-600 dark:text-primary-300"},secondary:{base:"border border-secondary/25 bg-secondary/10 text-secondary-600 dark:text-secondary-300 [&_a]:text-secondary [&_a]:hover:border-secondary [&_a]:focus-visible:outline-secondary [&_code]:text-secondary-600 dark:[&_code]:text-secondary-300 [&_code]:border-secondary/25 [&_a]:hover:[&>code]:border-secondary [&_a]:hover:[&>code]:text-secondary [&_a]:focus-visible:[&>code]:border-secondary [&_a]:focus-visible:[&>code]:text-secondary [&>ul]:marker:text-secondary/50",icon:"text-secondary",externalIcon:"text-secondary-600 dark:text-secondary-300"},success:{base:"border border-success/25 bg-success/10 text-success-600 dark:text-success-300 [&_a]:text-success [&_a]:hover:border-success [&_a]:focus-visible:outline-success [&_code]:text-success-600 dark:[&_code]:text-success-300 [&_code]:border-success/25 [&_a]:hover:[&>code]:border-success [&_a]:hover:[&>code]:text-success [&_a]:focus-visible:[&>code]:border-success [&_a]:focus-visible:[&>code]:text-success [&>ul]:marker:text-success/50",icon:"text-success",externalIcon:"text-success-600 dark:text-success-300"},info:{base:"border border-info/25 bg-info/10 text-info-600 dark:text-info-300 [&_a]:text-info [&_a]:hover:border-info [&_a]:focus-visible:outline-info [&_code]:text-info-600 dark:[&_code]:text-info-300 [&_code]:border-info/25 [&_a]:hover:[&>code]:border-info [&_a]:hover:[&>code]:text-info [&_a]:focus-visible:[&>code]:border-info [&_a]:focus-visible:[&>code]:text-info [&>ul]:marker:text-info/50",icon:"text-info",externalIcon:"text-info-600 dark:text-info-300"},warning:{base:"border border-warning/25 bg-warning/10 text-warning-600 dark:text-warning-300 [&_a]:text-warning [&_a]:hover:border-warning [&_a]:focus-visible:outline-warning [&_code]:text-warning-600 dark:[&_code]:text-warning-300 [&_code]:border-warning/25 [&_a]:hover:[&>code]:border-warning [&_a]:hover:[&>code]:text-warning [&_a]:focus-visible:[&>code]:border-warning [&_a]:focus-visible:[&>code]:text-warning [&>ul]:marker:text-warning/50",icon:"text-warning",externalIcon:"text-warning-600 dark:text-warning-300"},error:{base:"border border-error/25 bg-error/10 text-error-600 dark:text-error-300 [&_a]:text-error [&_a]:hover:border-error [&_a]:focus-visible:outline-error [&_code]:text-error-600 dark:[&_code]:text-error-300 [&_code]:border-error/25 [&_a]:hover:[&>code]:border-error [&_a]:hover:[&>code]:text-error [&_a]:focus-visible:[&>code]:border-error [&_a]:focus-visible:[&>code]:text-error [&>ul]:marker:text-error/50",icon:"text-error",externalIcon:"text-error-600 dark:text-error-300"},neutral:{base:"border border-muted bg-muted text-default",icon:"text-highlighted",externalIcon:"text-dimmed"}},to:{true:"border-dashed"}},compoundVariants:[{color:"primary",to:!0,class:{base:"hover:border-primary has-focus-visible:border-primary",externalIcon:"group-hover:text-primary"}},{color:"secondary",to:!0,class:{base:"hover:border-secondary has-focus-visible:border-secondary",externalIcon:"group-hover:text-secondary"}},{color:"success",to:!0,class:{base:"hover:border-success has-focus-visible:border-success",externalIcon:"group-hover:text-success"}},{color:"info",to:!0,class:{base:"hover:border-info has-focus-visible:border-info",externalIcon:"group-hover:text-info"}},{color:"warning",to:!0,class:{base:"hover:border-warning has-focus-visible:border-warning",externalIcon:"group-hover:text-warning"}},{color:"error",to:!0,class:{base:"hover:border-error has-focus-visible:border-error",externalIcon:"group-hover:text-error"}},{color:"neutral",to:!0,class:{base:"hover:border-inverted has-focus-visible:border-inverted",externalIcon:"group-hover:text-highlighted"}}],defaultVariants:{color:"neutral"}},C=Object.assign({inheritAttrs:!1},{__name:"ProseCallout",props:{to:{type:null,required:!1},target:{type:[String,Object,null],required:!1},icon:{type:null,required:!1},color:{type:null,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(r){const e=r,n=v(),t=u(()=>x({extend:x(k),...n.ui?.prose?.callout||{}})({color:e.color,to:!!e.to})),i=u(()=>e.target||(e.to&&typeof e.to=="string"&&e.to.startsWith("http")?"_blank":void 0));return(d,l)=>(o(),_("div",{class:c(t.value.base({class:e.class}))},[r.to?(o(),a(g,p({key:0},{to:r.to,target:i.value,...d.$attrs},{class:"focus:outline-none",raw:""}),{default:m(()=>[...l[0]||(l[0]=[y("span",{class:"absolute inset-0","aria-hidden":"true"},null,-1)])]),_:1},16)):s("",!0),r.icon?(o(),a(b,{key:1,name:r.icon,class:c(t.value.icon({class:e.ui?.icon}))},null,8,["name","class"])):s("",!0),r.to&&i.value==="_blank"?(o(),a(b,{key:2,name:h(n).ui.icons.external,class:c(t.value.externalIcon({class:e.ui?.externalIcon}))},null,8,["name","class"])):s("",!0),f(d.$slots,"default",{mdcUnwrap:"p"})],2))}});export{C as default};
@@ -1 +1 @@
1
- import{W as l,h as n,M as c,o as p,r as u,$ as d,ap as e}from"./CGgHmnnS.js";const m={base:"bg-muted"},h={__name:"ProseThead",props:{class:{type:null,required:!1}},setup(s){const a=s,t=l(),o=n(()=>e({extend:e(m),...t.ui?.prose?.thead||{}}));return(r,i)=>(p(),c("thead",{class:d(o.value({class:a.class}))},[u(r.$slots,"default")],2))}};export{h as default};
1
+ import{W as l,h as n,M as c,o as p,r as u,$ as d,ap as e}from"./CZT64TBr.js";const m={base:"bg-muted"},h={__name:"ProseThead",props:{class:{type:null,required:!1}},setup(s){const a=s,t=l(),o=n(()=>e({extend:e(m),...t.ui?.prose?.thead||{}}));return(r,i)=>(p(),c("thead",{class:d(o.value({class:a.class}))},[u(r.$slots,"default")],2))}};export{h as default};
@@ -1 +1 @@
1
- import{W as d,h as o,M as c,o as n,r as i,$ as p,ap as s}from"./CGgHmnnS.js";const u={base:"[&:first-child>th:first-child]:rounded-tl-md [&:first-child>th:last-child]:rounded-tr-md [&:last-child>td:first-child]:rounded-bl-md [&:last-child>td:last-child]:rounded-br-md"},f={__name:"ProseTr",props:{class:{type:null,required:!1}},setup(t){const e=t,l=d(),r=o(()=>s({extend:s(u),...l.ui?.prose?.tr||{}}));return(a,h)=>(n(),c("tr",{class:p(r.value({class:e.class}))},[i(a.$slots,"default")],2))}};export{f as default};
1
+ import{W as d,h as o,M as c,o as n,r as i,$ as p,ap as s}from"./CZT64TBr.js";const u={base:"[&:first-child>th:first-child]:rounded-tl-md [&:first-child>th:last-child]:rounded-tr-md [&:last-child>td:first-child]:rounded-bl-md [&:last-child>td:last-child]:rounded-br-md"},f={__name:"ProseTr",props:{class:{type:null,required:!1}},setup(t){const e=t,l=d(),r=o(()=>s({extend:s(u),...l.ui?.prose?.tr||{}}));return(a,h)=>(n(),c("tr",{class:p(r.value({class:e.class}))},[i(a.$slots,"default")],2))}};export{f as default};
@@ -1 +1 @@
1
- import{d as V,c as v,o as s,w as r,ac as c,M as m,aa as C,af as g,Z as a,ab as y,_ as D,a as i,ao as $,a0 as M,aj as it,bh as st,e as b,f as lt,C as ct,ak as rt,al as T,am as j}from"./CGgHmnnS.js";import{_ as ut}from"./w3RSHXA6.js";import{_ as dt,a as mt}from"./81-iumfM.js";import{u as gt,_ as pt,a as ft,b as _t}from"./DoSrePUc.js";import{a as vt}from"./B8na0pik.js";import{_ as yt}from"./NNQizITf.js";import{_ as ht}from"./D5AjrkGO.js";import{_ as At}from"./B3TXSB_R.js";import{g as xt,b as kt,a as bt}from"./B6lDOV4_.js";import{_ as Ct}from"./Dc_VwXJs.js";import{u as wt}from"./CcJ0pNID.js";import{u as $t}from"./CIMG8oEU.js";import"./C8ut0f5H.js";import"./CqkleIqs.js";import"./CZ5B974o.js";import"./pFPRVtL-.js";import"./CD6r4z4e.js";import"./B8fLdQfp.js";import"./CxNJcty6.js";import"./DlAUqK2U.js";import"./Ehiy7Wkv.js";import"./BGV4_re9.js";import"./CPb6IrVT.js";import"./C7Wu2u5C.js";import"./Cj3gDP-y.js";import"./CNB4wNeh.js";import"./DIMnGgEU.js";import"./B02JOKtW.js";import"./DEmzTuCa.js";import"./6k0gxaWW.js";import"./CZQeFnOf.js";import"./Suor9Vto.js";import"./BTImkTzA.js";import"./BtVAOj3K.js";import"./BGa5KqPj.js";import"./C4Ii8cYC.js";import"./C6Y-ieo6.js";import"./d85YwuyC.js";import"./ByXbV9Xa.js";import"./D_1GDAlv.js";import"./Vcq4gwWv.js";import"./P3qGksT8.js";import"./D57E8FC4.js";import"./rVZcJ6Pz.js";import"./CnB-ybCZ.js";const St={class:"flex items-start justify-between gap-4"},Ut={class:"flex-1 min-w-0"},Rt={class:"flex items-center gap-2"},Bt={class:"font-medium truncate"},Nt={key:0,class:"text-sm text-muted truncate mt-1"},Ft={class:"flex items-center gap-4 mt-2 text-sm text-muted"},zt={class:"flex items-center gap-1"},Et={key:0,class:"flex items-center gap-1"},Pt={key:1,class:"flex items-center gap-1"},Tt={class:"flex items-center gap-2"},jt=V({__name:"AgentCard",props:{agent:{},running:{type:Boolean}},emits:["toggle","run","cancel","edit","navigate"],setup(t,{emit:u}){const p=u;return(S,o)=>{const h=D,w=yt,U=ht,x=M,R=At;return s(),v(R,{class:"cursor-pointer transition-all hover:ring-2 hover:ring-primary/50",onClick:o[5]||(o[5]=d=>p("navigate",t.agent))},{default:r(()=>[c("div",St,[c("div",Ut,[c("div",Rt,[c("h3",Bt,g(t.agent.name),1),t.running?(s(),v(w,{key:0,color:"info",variant:"subtle",size:"sm"},{default:r(()=>[a(h,{name:"i-lucide-loader-2",class:"w-3 h-3 animate-spin mr-1"}),o[6]||(o[6]=y(" Running ",-1))]),_:1})):t.agent.lastStatus?(s(),v(w,{key:1,color:i(xt)(t.agent.lastStatus),size:"sm"},{default:r(()=>[y(g(t.agent.lastStatus),1)]),_:1},8,["color"])):C("",!0)]),t.agent.description?(s(),m("p",Nt,g(t.agent.description),1)):C("",!0),c("div",Ft,[c("span",zt,[a(h,{name:"i-lucide-clock"}),y(" "+g(i(kt)(t.agent.schedule)),1)]),t.agent.lastRunAt?(s(),m("span",Et,[a(h,{name:"i-lucide-activity"}),y(" "+g(i(bt)(t.agent.lastRunAt)),1)])):C("",!0),t.agent.maxBudgetUsd?(s(),m("span",Pt,[a(h,{name:"i-lucide-dollar-sign"}),y(" $"+g(t.agent.maxBudgetUsd)+" limit ",1)])):C("",!0)])]),c("div",Tt,[a(U,{"model-value":t.agent.enabled,onClick:o[0]||(o[0]=$(()=>{},["stop"])),"onUpdate:modelValue":o[1]||(o[1]=d=>p("toggle",t.agent.id))},null,8,["model-value"]),t.running?(s(),v(x,{key:0,icon:"i-lucide-square",variant:"ghost",size:"sm",color:"error",onClick:o[2]||(o[2]=$(d=>p("cancel",t.agent.id,d),["stop"]))})):(s(),v(x,{key:1,icon:"i-lucide-play",variant:"ghost",size:"sm",disabled:!t.agent.enabled,onClick:o[3]||(o[3]=$(d=>p("run",t.agent.id,d),["stop"]))},null,8,["disabled"])),a(x,{icon:"i-lucide-pencil",variant:"ghost",size:"sm",onClick:o[4]||(o[4]=$(d=>p("edit",t.agent,d),["stop"]))})])])]),_:1})}}}),Vt=Object.assign(jt,{__name:"AgentsAgentCard"}),Dt=vt(_t),Mt={class:"contents"},Ot={class:"p-4 space-y-6"},Gt={key:1,class:"flex items-center justify-center h-64"},It={key:2,class:"flex flex-col items-center justify-center h-64 text-neutral-500"},Lt={key:3,class:"space-y-4"},je=V({__name:"index",setup(t){const u=it(),p=st(),{agents:S,loading:o,fetchAgents:h,createAgent:w,updateAgent:U,toggleEnabled:x,runAgent:R,cancelAgent:d,fetchGlobalStats:O}=gt(),{isAgentRunning:G}=wt(),{agentStatsPeriod:z}=$t(),k=b(z.value),A=b(null),B=b(!1);function I(n){return G(n)?!0:A.value?.runningAgentIds?.includes(n)??!1}const f=b(!1),_=b(null),L=[{label:"24h",value:"24h"},{label:"7d",value:"7d"},{label:"30d",value:"30d"}];function E(){_.value=null,f.value=!0}function q(n,e){e.stopPropagation(),_.value=n,f.value=!0}function Z(n){p.push(`/agents/${n.id}`)}async function H(n){try{_.value?(await U(_.value.id,n),u.add({title:"Agent updated",color:"success",icon:"i-lucide-check"})):(await w(n),u.add({title:"Agent created",color:"success",icon:"i-lucide-check"}),N()),f.value=!1,_.value=null}catch(e){u.add({title:"Failed to save agent",description:e instanceof Error?e.message:"An unexpected error occurred",color:"error",icon:"i-lucide-alert-circle"})}}async function J(n){try{await x(n)}catch{u.add({title:"Failed to toggle agent",color:"error",icon:"i-lucide-alert-circle"})}}async function K(n,e){e.stopPropagation();try{await R(n)}catch{u.add({title:"Failed to run agent",color:"error",icon:"i-lucide-alert-circle"})}}async function Q(n,e){e.stopPropagation();try{await d(n),u.add({title:"Agent cancelled",color:"warning",icon:"i-lucide-x-circle"})}catch{u.add({title:"Failed to cancel agent",color:"error",icon:"i-lucide-alert-circle"})}}async function N(){B.value=!0;try{A.value=await O(k.value)}catch{}finally{B.value=!1}}return lt(k,n=>{z.value=n,N()}),ct(async()=>{await h(),N()}),(n,e)=>{const F=M,W=ut,X=mt,Y=pt,tt=Dt,P=D,et=Vt,nt=dt,at=ft,ot=Ct;return s(),m("div",Mt,[a(nt,{id:"agents",grow:""},{header:r(()=>[a(X,{title:"Scheduled Agents"},{right:r(()=>[a(W,null,{default:r(()=>[(s(),m(T,null,j(L,l=>a(F,{key:l.value,color:i(k)===l.value?"primary":"neutral",variant:i(k)===l.value?"solid":"ghost",size:"sm",onClick:qt=>k.value=l.value},{default:r(()=>[y(g(l.label),1)]),_:2},1032,["color","variant","onClick"])),64))]),_:1}),a(F,{icon:"i-lucide-plus",label:"New Agent",onClick:E})]),_:1})]),body:r(()=>[c("div",Ot,[a(Y,{stats:i(A),loading:i(B),variant:"global"},null,8,["stats","loading"]),i(A)&&i(A).dailyRuns.length>0?(s(),v(tt,{key:0,data:i(A).dailyRuns,title:"Run Activity"},null,8,["data"])):C("",!0),i(o)?(s(),m("div",Gt,[a(P,{name:"i-lucide-loader-2",class:"w-8 h-8 animate-spin text-neutral-400"})])):i(S).length===0?(s(),m("div",It,[a(P,{name:"i-lucide-bot",class:"w-12 h-12 mb-4"}),e[2]||(e[2]=c("p",{class:"text-lg font-medium"}," No agents yet ",-1)),e[3]||(e[3]=c("p",{class:"text-sm"}," Create your first scheduled agent to automate tasks ",-1)),a(F,{class:"mt-4",icon:"i-lucide-plus",label:"Create Agent",onClick:E})])):(s(),m("div",Lt,[e[4]||(e[4]=c("h2",{class:"text-lg font-semibold"}," Agents ",-1)),(s(!0),m(T,null,j(i(S),l=>(s(),v(et,{key:l.id,agent:l,running:I(l.id),onToggle:J,onRun:K,onCancel:Q,onEdit:q,onNavigate:Z},null,8,["agent","running"]))),128))]))])]),_:1}),a(ot,{open:i(f),"onUpdate:open":e[1]||(e[1]=l=>rt(f)?f.value=l:null)},{title:r(()=>[y(g(i(_)?"Edit Agent":"New Agent"),1)]),body:r(()=>[a(at,{agent:i(_),onSubmit:H,onCancel:e[0]||(e[0]=l=>f.value=!1)},null,8,["agent"])]),_:1},8,["open"])])}}});export{je as default};
1
+ import{d as V,c as v,o as s,w as r,ac as c,M as m,aa as C,af as g,Z as a,ab as y,_ as D,a as i,ao as $,a0 as M,aj as it,bh as st,e as b,f as lt,C as ct,ak as rt,al as T,am as j}from"./CZT64TBr.js";import{_ as ut}from"./C5IBUVPW.js";import{_ as dt,a as mt}from"./DM2gKi5N.js";import{u as gt,_ as pt,a as ft,b as _t}from"./tIRQIyWk.js";import{a as vt}from"./DfIQdSBL.js";import{_ as yt}from"./Ctt1B8Lg.js";import{_ as ht}from"./Bzkzi9GX.js";import{_ as At}from"./De94RhMH.js";import{g as xt,b as kt,a as bt}from"./B6lDOV4_.js";import{_ as Ct}from"./B2ejvp4F.js";import{u as wt}from"./DwIL_HsX.js";import{u as $t}from"./BWgA6Icb.js";import"./C8ut0f5H.js";import"./CqkleIqs.js";import"./CSwU6kaw.js";import"./DD864DXc.js";import"./CJAiAVnY.js";import"./BISpLSKY.js";import"./DcU1vVta.js";import"./DlAUqK2U.js";import"./D5dMt776.js";import"./CAdrgifl.js";import"./D7PJ9LEZ.js";import"./CAaAX5yO.js";import"./D-ysM-Cd.js";import"./BUa1DKMp.js";import"./CXWZZrP6.js";import"./Cv0TenvS.js";import"./BFhzL-L6.js";import"./CfiM4f33.js";import"./Bl7M4LXt.js";import"./DwbYPACo.js";import"./CDX3o-x3.js";import"./MwLHW_S3.js";import"./FOQllft2.js";import"./2Eo3qwxj.js";import"./C6Y-ieo6.js";import"./DMar0qcv.js";import"./IwZpKn7a.js";import"./B3WWnSJo.js";import"./Vcq4gwWv.js";import"./CSQciH0m.js";import"./2nDmPuey.js";import"./6f0CtDWh.js";import"./BMsNdiuj.js";const St={class:"flex items-start justify-between gap-4"},Ut={class:"flex-1 min-w-0"},Rt={class:"flex items-center gap-2"},Bt={class:"font-medium truncate"},Nt={key:0,class:"text-sm text-muted truncate mt-1"},Ft={class:"flex items-center gap-4 mt-2 text-sm text-muted"},zt={class:"flex items-center gap-1"},Et={key:0,class:"flex items-center gap-1"},Pt={key:1,class:"flex items-center gap-1"},Tt={class:"flex items-center gap-2"},jt=V({__name:"AgentCard",props:{agent:{},running:{type:Boolean}},emits:["toggle","run","cancel","edit","navigate"],setup(t,{emit:u}){const p=u;return(S,o)=>{const h=D,w=yt,U=ht,x=M,R=At;return s(),v(R,{class:"cursor-pointer transition-all hover:ring-2 hover:ring-primary/50",onClick:o[5]||(o[5]=d=>p("navigate",t.agent))},{default:r(()=>[c("div",St,[c("div",Ut,[c("div",Rt,[c("h3",Bt,g(t.agent.name),1),t.running?(s(),v(w,{key:0,color:"info",variant:"subtle",size:"sm"},{default:r(()=>[a(h,{name:"i-lucide-loader-2",class:"w-3 h-3 animate-spin mr-1"}),o[6]||(o[6]=y(" Running ",-1))]),_:1})):t.agent.lastStatus?(s(),v(w,{key:1,color:i(xt)(t.agent.lastStatus),size:"sm"},{default:r(()=>[y(g(t.agent.lastStatus),1)]),_:1},8,["color"])):C("",!0)]),t.agent.description?(s(),m("p",Nt,g(t.agent.description),1)):C("",!0),c("div",Ft,[c("span",zt,[a(h,{name:"i-lucide-clock"}),y(" "+g(i(kt)(t.agent.schedule)),1)]),t.agent.lastRunAt?(s(),m("span",Et,[a(h,{name:"i-lucide-activity"}),y(" "+g(i(bt)(t.agent.lastRunAt)),1)])):C("",!0),t.agent.maxBudgetUsd?(s(),m("span",Pt,[a(h,{name:"i-lucide-dollar-sign"}),y(" $"+g(t.agent.maxBudgetUsd)+" limit ",1)])):C("",!0)])]),c("div",Tt,[a(U,{"model-value":t.agent.enabled,onClick:o[0]||(o[0]=$(()=>{},["stop"])),"onUpdate:modelValue":o[1]||(o[1]=d=>p("toggle",t.agent.id))},null,8,["model-value"]),t.running?(s(),v(x,{key:0,icon:"i-lucide-square",variant:"ghost",size:"sm",color:"error",onClick:o[2]||(o[2]=$(d=>p("cancel",t.agent.id,d),["stop"]))})):(s(),v(x,{key:1,icon:"i-lucide-play",variant:"ghost",size:"sm",disabled:!t.agent.enabled,onClick:o[3]||(o[3]=$(d=>p("run",t.agent.id,d),["stop"]))},null,8,["disabled"])),a(x,{icon:"i-lucide-pencil",variant:"ghost",size:"sm",onClick:o[4]||(o[4]=$(d=>p("edit",t.agent,d),["stop"]))})])])]),_:1})}}}),Vt=Object.assign(jt,{__name:"AgentsAgentCard"}),Dt=vt(_t),Mt={class:"contents"},Ot={class:"p-4 space-y-6"},Gt={key:1,class:"flex items-center justify-center h-64"},It={key:2,class:"flex flex-col items-center justify-center h-64 text-neutral-500"},Lt={key:3,class:"space-y-4"},je=V({__name:"index",setup(t){const u=it(),p=st(),{agents:S,loading:o,fetchAgents:h,createAgent:w,updateAgent:U,toggleEnabled:x,runAgent:R,cancelAgent:d,fetchGlobalStats:O}=gt(),{isAgentRunning:G}=wt(),{agentStatsPeriod:z}=$t(),k=b(z.value),A=b(null),B=b(!1);function I(n){return G(n)?!0:A.value?.runningAgentIds?.includes(n)??!1}const f=b(!1),_=b(null),L=[{label:"24h",value:"24h"},{label:"7d",value:"7d"},{label:"30d",value:"30d"}];function E(){_.value=null,f.value=!0}function q(n,e){e.stopPropagation(),_.value=n,f.value=!0}function Z(n){p.push(`/agents/${n.id}`)}async function H(n){try{_.value?(await U(_.value.id,n),u.add({title:"Agent updated",color:"success",icon:"i-lucide-check"})):(await w(n),u.add({title:"Agent created",color:"success",icon:"i-lucide-check"}),N()),f.value=!1,_.value=null}catch(e){u.add({title:"Failed to save agent",description:e instanceof Error?e.message:"An unexpected error occurred",color:"error",icon:"i-lucide-alert-circle"})}}async function J(n){try{await x(n)}catch{u.add({title:"Failed to toggle agent",color:"error",icon:"i-lucide-alert-circle"})}}async function K(n,e){e.stopPropagation();try{await R(n)}catch{u.add({title:"Failed to run agent",color:"error",icon:"i-lucide-alert-circle"})}}async function Q(n,e){e.stopPropagation();try{await d(n),u.add({title:"Agent cancelled",color:"warning",icon:"i-lucide-x-circle"})}catch{u.add({title:"Failed to cancel agent",color:"error",icon:"i-lucide-alert-circle"})}}async function N(){B.value=!0;try{A.value=await O(k.value)}catch{}finally{B.value=!1}}return lt(k,n=>{z.value=n,N()}),ct(async()=>{await h(),N()}),(n,e)=>{const F=M,W=ut,X=mt,Y=pt,tt=Dt,P=D,et=Vt,nt=dt,at=ft,ot=Ct;return s(),m("div",Mt,[a(nt,{id:"agents",grow:""},{header:r(()=>[a(X,{title:"Scheduled Agents"},{right:r(()=>[a(W,null,{default:r(()=>[(s(),m(T,null,j(L,l=>a(F,{key:l.value,color:i(k)===l.value?"primary":"neutral",variant:i(k)===l.value?"solid":"ghost",size:"sm",onClick:qt=>k.value=l.value},{default:r(()=>[y(g(l.label),1)]),_:2},1032,["color","variant","onClick"])),64))]),_:1}),a(F,{icon:"i-lucide-plus",label:"New Agent",onClick:E})]),_:1})]),body:r(()=>[c("div",Ot,[a(Y,{stats:i(A),loading:i(B),variant:"global"},null,8,["stats","loading"]),i(A)&&i(A).dailyRuns.length>0?(s(),v(tt,{key:0,data:i(A).dailyRuns,title:"Run Activity"},null,8,["data"])):C("",!0),i(o)?(s(),m("div",Gt,[a(P,{name:"i-lucide-loader-2",class:"w-8 h-8 animate-spin text-neutral-400"})])):i(S).length===0?(s(),m("div",It,[a(P,{name:"i-lucide-bot",class:"w-12 h-12 mb-4"}),e[2]||(e[2]=c("p",{class:"text-lg font-medium"}," No agents yet ",-1)),e[3]||(e[3]=c("p",{class:"text-sm"}," Create your first scheduled agent to automate tasks ",-1)),a(F,{class:"mt-4",icon:"i-lucide-plus",label:"Create Agent",onClick:E})])):(s(),m("div",Lt,[e[4]||(e[4]=c("h2",{class:"text-lg font-semibold"}," Agents ",-1)),(s(!0),m(T,null,j(i(S),l=>(s(),v(et,{key:l.id,agent:l,running:I(l.id),onToggle:J,onRun:K,onCancel:Q,onEdit:q,onNavigate:Z},null,8,["agent","running"]))),128))]))])]),_:1}),a(ot,{open:i(f),"onUpdate:open":e[1]||(e[1]=l=>rt(f)?f.value=l:null)},{title:r(()=>[y(g(i(_)?"Edit Agent":"New Agent"),1)]),body:r(()=>[a(at,{agent:i(_),onSubmit:H,onCancel:e[0]||(e[0]=l=>f.value=!1)},null,8,["agent"])]),_:1},8,["open"])])}}});export{je as default};
@@ -1 +1 @@
1
- import{T as O,a as F}from"./Dfi2mj_-.js";import{c as X}from"./pFPRVtL-.js";import{aq as Y,W as Z,h as _,e as k,f as x,aX as G,M as v,o as d,Z as m,ac as y,w as I,al as W,am as H,$ as u,a as c,aa as E,c as w,_ as P,af as J,aY as K,m as Q,ap as j}from"./CGgHmnnS.js";import ee from"./DOs_ozN6.js";import"./Cwdn7ZtG.js";import"./Suor9Vto.js";import"./d85YwuyC.js";import"./Cj3gDP-y.js";import"./B1ea1Zc2.js";import"./6k0gxaWW.js";const le={slots:{root:"relative lg:h-[450px] my-5 grid lg:grid-cols-3 border border-muted rounded-md",list:"isolate relative p-2 border-b lg:border-b-0 lg:border-e border-muted overflow-y-auto",item:"",listWithChildren:"ms-4.5 border-s border-default",itemWithChildren:"ps-1.5 -ms-px",link:"relative group peer w-full px-2.5 py-1.5 before:inset-y-px before:inset-x-0 flex items-center gap-1.5 text-sm before:absolute before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",linkLeadingIcon:"size-4 shrink-0",linkLabel:"truncate",linkTrailing:"ms-auto inline-flex gap-1.5 items-center",linkTrailingIcon:"size-5 transform transition-transform duration-200 shrink-0 group-data-expanded:rotate-180",content:"overflow-hidden lg:col-span-2 flex flex-col [&>div]:my-0 [&>div]:flex-1 [&>div]:flex [&>div]:flex-col [&>div>div]:border-0 [&>div>pre]:border-b-0 [&>div>pre]:border-s-0 [&>div>pre]:border-e-0 [&>div>pre]:rounded-l-none [&>div>pre]:flex-1 [&>div]:overflow-y-auto"},variants:{active:{true:{link:"text-highlighted before:bg-elevated"},false:{link:["hover:text-highlighted hover:before:bg-elevated/50","transition-colors before:transition-colors"]}}}},pe=Object.assign({inheritAttrs:!1},{__name:"ProseCodeTree",props:{items:{type:Array,required:!1},modelValue:{type:String,required:!1},defaultValue:{type:String,required:!1},expandAll:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},emits:["update:modelValue"],setup(z,{emit:D}){const l=z,M=D,N=Y(),b=Z(),[R,L]=X(),r=_(()=>j({extend:j(le),...b.ui?.prose?.codeTree||{}})()),$=l.modelValue??l.defaultValue,p=k($?{path:$}:void 0),q=k();x(p,e=>{e?.path!==l.modelValue&&M("update:modelValue",e?.path)}),x(()=>l.modelValue,e=>{if(e===p.value?.path)return;p.value=e?{path:e}:void 0;const t=T(e);for(const a of t)f.value.includes(a)||f.value.push(a)});const A=k(1),g=_(()=>(A.value,l.items||N.default?.()?.flatMap(S).filter(Boolean)||[])),B=_(()=>U(g.value));function U(e){const t=new Map,a=[];e.forEach(n=>{const i=n.label.split("/");let s="";i.forEach((h,C)=>{if(s=s?`${s}/${h}`:h,!t.has(s)){const V={label:h,path:s,...C<i.length-1&&{children:[]}};t.set(s,V),C===0?a.push(V):t.get(i.slice(0,C).join("/"))?.children?.push(V)}})});const o=n=>n.sort((i,s)=>!!i.children==!!s.children?i.label.localeCompare(s.label):s.children?1:-1).map(i=>({...i,children:i.children&&o(i.children)}));return o(a)}function S(e,t){return typeof e.type=="symbol"?e.children?.map(S):{label:e.props?.filename||e.props?.label||`${t}`,icon:e.props?.icon,component:e}}function T(e){if(l.expandAll){const a=new Set;return g.value.forEach(o=>{const n=o.label.split("/");for(let i=1;i<n.length;i++)a.add(n.slice(0,i).join("/"))}),Array.from(a)}if(!e)return[];const t=e.split("/");return t.slice(0,-1).map((a,o)=>t.slice(0,o+1).join("/"))}const f=k(T(p.value?.path));return x(g,()=>{l.expandAll&&(f.value=T())},{immediate:!0}),x(p,e=>{const t=g.value.find(a=>e?.path===a.label);t?.component&&(q.value=t)},{immediate:!0}),G(()=>A.value++),(e,t)=>(d(),v(W,null,[m(c(R),null,{default:I(({items:a,level:o})=>[(d(!0),v(W,null,H(a,(n,i)=>(d(),v("li",{key:`${o}-${i}`,role:"presentation",class:u(o>1?r.value.itemWithChildren({class:l.ui?.itemWithChildren}):r.value.item({class:l.ui?.item}))},[m(c(O),{level:o,value:n,"as-child":""},{default:I(({isExpanded:s,isSelected:h})=>[y("button",{type:"button",class:u(r.value.link({class:l.ui?.link,active:h}))},[n.children?.length?(d(),w(P,{key:0,name:s?c(b).ui.icons.folderOpen:c(b).ui.icons.folder,class:u(r.value.linkLeadingIcon({class:l.ui?.linkLeadingIcon}))},null,8,["name","class"])):(d(),w(ee,{key:1,filename:n.label,class:u(r.value.linkLeadingIcon({class:l.ui?.linkLeadingIcon}))},null,8,["filename","class"])),y("span",{class:u(r.value.linkLabel({class:l.ui?.linkLabel}))},J(n.label),3),n.children?.length?(d(),v("span",{key:2,class:u(r.value.linkTrailing({class:l.ui?.linkTrailing}))},[m(P,{name:c(b).ui.icons.chevronDown,class:u(r.value.linkTrailingIcon({class:l.ui?.linkTrailingIcon}))},null,8,["name","class"])],2)):E("",!0)],2),n.children?.length&&s?(d(),v("ul",{key:0,role:"group",class:u(r.value.listWithChildren({class:l.ui?.listWithChildren}))},[m(c(L),{items:n.children,level:o+1},null,8,["items","level"])],2)):E("",!0)]),_:2},1032,["level","value"])],2))),128))]),_:1}),y("div",Q(e.$attrs,{class:r.value.root({class:[l.ui?.root,l.class]})}),[m(c(F),{modelValue:p.value,"onUpdate:modelValue":t[0]||(t[0]=a=>p.value=a),expanded:f.value,"onUpdate:expanded":t[1]||(t[1]=a=>f.value=a),class:u(r.value.list({class:l.ui?.list})),items:B.value,"get-key":a=>a.path},{default:I(()=>[m(c(L),{items:B.value,level:1},null,8,["items"])]),_:1},8,["modelValue","expanded","class","items","get-key"]),y("div",{class:u(r.value.content({class:l.ui?.content}))},[(d(),w(K(q.value?.component)))],2)],16)],64))}});export{pe as default};
1
+ import{T as O,a as F}from"./CzYLEcMN.js";import{c as X}from"./DD864DXc.js";import{aq as Y,W as Z,h as _,e as k,f as x,aX as G,M as v,o as d,Z as m,ac as y,w as I,al as W,am as H,$ as u,a as c,aa as E,c as w,_ as P,af as J,aY as K,m as Q,ap as j}from"./CZT64TBr.js";import ee from"./DhGDBmGP.js";import"./BY7b-3vi.js";import"./DwbYPACo.js";import"./DMar0qcv.js";import"./D-ysM-Cd.js";import"./CAANELnI.js";import"./CfiM4f33.js";const le={slots:{root:"relative lg:h-[450px] my-5 grid lg:grid-cols-3 border border-muted rounded-md",list:"isolate relative p-2 border-b lg:border-b-0 lg:border-e border-muted overflow-y-auto",item:"",listWithChildren:"ms-4.5 border-s border-default",itemWithChildren:"ps-1.5 -ms-px",link:"relative group peer w-full px-2.5 py-1.5 before:inset-y-px before:inset-x-0 flex items-center gap-1.5 text-sm before:absolute before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",linkLeadingIcon:"size-4 shrink-0",linkLabel:"truncate",linkTrailing:"ms-auto inline-flex gap-1.5 items-center",linkTrailingIcon:"size-5 transform transition-transform duration-200 shrink-0 group-data-expanded:rotate-180",content:"overflow-hidden lg:col-span-2 flex flex-col [&>div]:my-0 [&>div]:flex-1 [&>div]:flex [&>div]:flex-col [&>div>div]:border-0 [&>div>pre]:border-b-0 [&>div>pre]:border-s-0 [&>div>pre]:border-e-0 [&>div>pre]:rounded-l-none [&>div>pre]:flex-1 [&>div]:overflow-y-auto"},variants:{active:{true:{link:"text-highlighted before:bg-elevated"},false:{link:["hover:text-highlighted hover:before:bg-elevated/50","transition-colors before:transition-colors"]}}}},pe=Object.assign({inheritAttrs:!1},{__name:"ProseCodeTree",props:{items:{type:Array,required:!1},modelValue:{type:String,required:!1},defaultValue:{type:String,required:!1},expandAll:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},emits:["update:modelValue"],setup(z,{emit:D}){const l=z,M=D,N=Y(),b=Z(),[R,L]=X(),r=_(()=>j({extend:j(le),...b.ui?.prose?.codeTree||{}})()),$=l.modelValue??l.defaultValue,p=k($?{path:$}:void 0),q=k();x(p,e=>{e?.path!==l.modelValue&&M("update:modelValue",e?.path)}),x(()=>l.modelValue,e=>{if(e===p.value?.path)return;p.value=e?{path:e}:void 0;const t=T(e);for(const a of t)f.value.includes(a)||f.value.push(a)});const A=k(1),g=_(()=>(A.value,l.items||N.default?.()?.flatMap(S).filter(Boolean)||[])),B=_(()=>U(g.value));function U(e){const t=new Map,a=[];e.forEach(n=>{const i=n.label.split("/");let s="";i.forEach((h,C)=>{if(s=s?`${s}/${h}`:h,!t.has(s)){const V={label:h,path:s,...C<i.length-1&&{children:[]}};t.set(s,V),C===0?a.push(V):t.get(i.slice(0,C).join("/"))?.children?.push(V)}})});const o=n=>n.sort((i,s)=>!!i.children==!!s.children?i.label.localeCompare(s.label):s.children?1:-1).map(i=>({...i,children:i.children&&o(i.children)}));return o(a)}function S(e,t){return typeof e.type=="symbol"?e.children?.map(S):{label:e.props?.filename||e.props?.label||`${t}`,icon:e.props?.icon,component:e}}function T(e){if(l.expandAll){const a=new Set;return g.value.forEach(o=>{const n=o.label.split("/");for(let i=1;i<n.length;i++)a.add(n.slice(0,i).join("/"))}),Array.from(a)}if(!e)return[];const t=e.split("/");return t.slice(0,-1).map((a,o)=>t.slice(0,o+1).join("/"))}const f=k(T(p.value?.path));return x(g,()=>{l.expandAll&&(f.value=T())},{immediate:!0}),x(p,e=>{const t=g.value.find(a=>e?.path===a.label);t?.component&&(q.value=t)},{immediate:!0}),G(()=>A.value++),(e,t)=>(d(),v(W,null,[m(c(R),null,{default:I(({items:a,level:o})=>[(d(!0),v(W,null,H(a,(n,i)=>(d(),v("li",{key:`${o}-${i}`,role:"presentation",class:u(o>1?r.value.itemWithChildren({class:l.ui?.itemWithChildren}):r.value.item({class:l.ui?.item}))},[m(c(O),{level:o,value:n,"as-child":""},{default:I(({isExpanded:s,isSelected:h})=>[y("button",{type:"button",class:u(r.value.link({class:l.ui?.link,active:h}))},[n.children?.length?(d(),w(P,{key:0,name:s?c(b).ui.icons.folderOpen:c(b).ui.icons.folder,class:u(r.value.linkLeadingIcon({class:l.ui?.linkLeadingIcon}))},null,8,["name","class"])):(d(),w(ee,{key:1,filename:n.label,class:u(r.value.linkLeadingIcon({class:l.ui?.linkLeadingIcon}))},null,8,["filename","class"])),y("span",{class:u(r.value.linkLabel({class:l.ui?.linkLabel}))},J(n.label),3),n.children?.length?(d(),v("span",{key:2,class:u(r.value.linkTrailing({class:l.ui?.linkTrailing}))},[m(P,{name:c(b).ui.icons.chevronDown,class:u(r.value.linkTrailingIcon({class:l.ui?.linkTrailingIcon}))},null,8,["name","class"])],2)):E("",!0)],2),n.children?.length&&s?(d(),v("ul",{key:0,role:"group",class:u(r.value.listWithChildren({class:l.ui?.listWithChildren}))},[m(c(L),{items:n.children,level:o+1},null,8,["items","level"])],2)):E("",!0)]),_:2},1032,["level","value"])],2))),128))]),_:1}),y("div",Q(e.$attrs,{class:r.value.root({class:[l.ui?.root,l.class]})}),[m(c(F),{modelValue:p.value,"onUpdate:modelValue":t[0]||(t[0]=a=>p.value=a),expanded:f.value,"onUpdate:expanded":t[1]||(t[1]=a=>f.value=a),class:u(r.value.list({class:l.ui?.list})),items:B.value,"get-key":a=>a.path},{default:I(()=>[m(c(L),{items:B.value,level:1},null,8,["items"])]),_:1},8,["modelValue","expanded","class","items","get-key"]),y("div",{class:u(r.value.content({class:l.ui?.content}))},[(d(),w(K(q.value?.component)))],2)],16)],64))}});export{pe as default};
@@ -1,4 +1,4 @@
1
- import{X as Tt,c as M,i as Ot,a as Pt,D as Q,e as H,b as J,g as F,k as E,j as Nt,u as Ct,v as ai,s as D,h as ri,w as hi,n as li,q as At,r as jt,t as Et}from"./w3RSHXA6.js";import{d as Dt,ar as $t,h as Bt,e as Rt,M as Lt,C as Ht,B as Ft,a5 as It,f as I,o as Xt}from"./CGgHmnnS.js";var K=Math.PI,tt=2*K,N=1e-6,_i=tt-N;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function lt(){return new it}it.prototype=lt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,e,n){this._+="Q"+ +t+","+ +i+","+(this._x1=+e)+","+(this._y1=+n)},bezierCurveTo:function(t,i,e,n,s,o){this._+="C"+ +t+","+ +i+","+ +e+","+ +n+","+(this._x1=+s)+","+(this._y1=+o)},arcTo:function(t,i,e,n,s){t=+t,i=+i,e=+e,n=+n,s=+s;var o=this._x1,r=this._y1,a=e-t,h=n-i,u=o-t,_=r-i,l=u*u+_*_;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(l>N)if(!(Math.abs(_*a-h*u)>N)||!s)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var c=e-o,d=n-r,x=a*a+h*h,m=c*c+d*d,f=Math.sqrt(x),y=Math.sqrt(l),v=s*Math.tan((K-Math.acos((x+l-m)/(2*f*y)))/2),p=v/y,b=v/f;Math.abs(p-1)>N&&(this._+="L"+(t+p*u)+","+(i+p*_)),this._+="A"+s+","+s+",0,0,"+ +(_*c>u*d)+","+(this._x1=t+b*a)+","+(this._y1=i+b*h)}},arc:function(t,i,e,n,s,o){t=+t,i=+i,e=+e,o=!!o;var r=e*Math.cos(n),a=e*Math.sin(n),h=t+r,u=i+a,_=1^o,l=o?n-s:s-n;if(e<0)throw new Error("negative radius: "+e);this._x1===null?this._+="M"+h+","+u:(Math.abs(this._x1-h)>N||Math.abs(this._y1-u)>N)&&(this._+="L"+h+","+u),e&&(l<0&&(l=l%tt+tt),l>_i?this._+="A"+e+","+e+",0,1,"+_+","+(t-r)+","+(i-a)+"A"+e+","+e+",0,1,"+_+","+(this._x1=h)+","+(this._y1=u):l>N&&(this._+="A"+e+","+e+",0,"+ +(l>=K)+","+_+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=i+e*Math.sin(s))))},rect:function(t,i,e,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +e+"v"+ +n+"h"+-e+"Z"},toString:function(){return this._}};function k(t){return function(){return t}}var Ji=Math.abs,Ki=Math.atan2,te=Math.cos,ie=Math.max,ee=Math.min,ne=Math.sin,se=Math.sqrt,vt=1e-12,_t=Math.PI,dt=_t/2,oe=2*_t;function ae(t){return t>1?0:t<-1?_t:Math.acos(t)}function re(t){return t>=1?dt:t<=-1?-dt:Math.asin(t)}function Yt(t){this._context=t}Yt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i);break}}};function ct(t){return new Yt(t)}function zt(t){return t[0]}function Gt(t){return t[1]}function Vt(){var t=zt,i=Gt,e=k(!0),n=null,s=ct,o=null;function r(a){var h,u=a.length,_,l=!1,c;for(n==null&&(o=s(c=lt())),h=0;h<=u;++h)!(h<u&&e(_=a[h],h,a))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(_,h,a),+i(_,h,a));if(c)return o=null,c+""||null}return r.x=function(a){return arguments.length?(t=typeof a=="function"?a:k(+a),r):t},r.y=function(a){return arguments.length?(i=typeof a=="function"?a:k(+a),r):i},r.defined=function(a){return arguments.length?(e=typeof a=="function"?a:k(!!a),r):e},r.curve=function(a){return arguments.length?(s=a,n!=null&&(o=s(n)),r):s},r.context=function(a){return arguments.length?(a==null?n=o=null:o=s(n=a),r):n},r}function ci(){var t=zt,i=null,e=k(0),n=Gt,s=k(!0),o=null,r=ct,a=null;function h(_){var l,c,d,x=_.length,m,f=!1,y,v=new Array(x),p=new Array(x);for(o==null&&(a=r(y=lt())),l=0;l<=x;++l){if(!(l<x&&s(m=_[l],l,_))===f)if(f=!f)c=l,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=l-1;d>=c;--d)a.point(v[d],p[d]);a.lineEnd(),a.areaEnd()}f&&(v[l]=+t(m,l,_),p[l]=+e(m,l,_),a.point(i?+i(m,l,_):v[l],n?+n(m,l,_):p[l]))}if(y)return a=null,y+""||null}function u(){return Vt().defined(s).curve(r).context(o)}return h.x=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),i=null,h):t},h.x0=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),h):t},h.x1=function(_){return arguments.length?(i=_==null?null:typeof _=="function"?_:k(+_),h):i},h.y=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),n=null,h):e},h.y0=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),h):e},h.y1=function(_){return arguments.length?(n=_==null?null:typeof _=="function"?_:k(+_),h):n},h.lineX0=h.lineY0=function(){return u().x(t).y(e)},h.lineY1=function(){return u().x(t).y(n)},h.lineX1=function(){return u().x(i).y(e)},h.defined=function(_){return arguments.length?(s=typeof _=="function"?_:k(!!_),h):s},h.curve=function(_){return arguments.length?(r=_,o!=null&&(a=r(o)),h):r},h.context=function(_){return arguments.length?(_==null?o=a=null:a=r(o=_),h):o},h}function w(){}function X(t,i,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+e)/6)}function V(t){this._context=t}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:X(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function ui(t){return new V(t)}function Zt(t){this._context=t}Zt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function fi(t){return new Zt(t)}function qt(t){this._context=t}qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 3:this._point=4;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function pi(t){return new qt(t)}function Wt(t,i){this._basis=new V(t),this._beta=i}Wt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,e=t.length-1;if(e>0)for(var n=t[0],s=i[0],o=t[e]-n,r=i[e]-s,a=-1,h;++a<=e;)h=a/e,this._basis.point(this._beta*t[a]+(1-this._beta)*(n+h*o),this._beta*i[a]+(1-this._beta)*(s+h*r));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const yi=(function t(i){function e(n){return i===1?new V(n):new Wt(n,i)}return e.beta=function(n){return t(+n)},e})(.85);function Y(t,i,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function ut(t,i){this._context=t,this._k=(1-i)/6}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Y(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:Y(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const vi=(function t(i){function e(n){return new ut(n,i)}return e.tension=function(n){return t(+n)},e})(0);function ft(t,i){this._context=t,this._k=(1-i)/6}ft.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:Y(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const di=(function t(i){function e(n){return new ft(n,i)}return e.tension=function(n){return t(+n)},e})(0);function pt(t,i){this._context=t,this._k=(1-i)/6}pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Y(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const xi=(function t(i){function e(n){return new pt(n,i)}return e.tension=function(n){return t(+n)},e})(0);function yt(t,i,e){var n=t._x1,s=t._y1,o=t._x2,r=t._y2;if(t._l01_a>vt){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,s=(s*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>vt){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,_=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-i*t._l12_2a)/_,r=(r*u+t._y1*t._l23_2a-e*t._l12_2a)/_}t._context.bezierCurveTo(n,s,o,r,t._x2,t._y2)}function Qt(t,i){this._context=t,this._alpha=i}Qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const gi=(function t(i){function e(n){return i?new Qt(n,i):new ut(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Ut(t,i){this._context=t,this._alpha=i}Ut.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const bi=(function t(i){function e(n){return i?new Ut(n,i):new ft(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Jt(t,i){this._context=t,this._alpha=i}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const mi=(function t(i){function e(n){return i?new Jt(n,i):new pt(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Kt(t){this._context=t}Kt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function ki(t){return new Kt(t)}function xt(t){return t<0?-1:1}function gt(t,i,e){var n=t._x1-t._x0,s=i-t._x1,o=(t._y1-t._y0)/(n||s<0&&-0),r=(e-t._y1)/(s||n<0&&-0),a=(o*s+r*n)/(n+s);return(xt(o)+xt(r))*Math.min(Math.abs(o),Math.abs(r),.5*Math.abs(a))||0}function bt(t,i){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-i)/2:i}function U(t,i,e){var n=t._x0,s=t._y0,o=t._x1,r=t._y1,a=(o-n)/3;t._context.bezierCurveTo(n+a,s+a*i,o-a,r-a*e,o,r)}function z(t){this._context=t}z.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:U(this,this._t0,bt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var e=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,U(this,bt(this,e=gt(this,t,i)),e);break;default:U(this,this._t0,e=gt(this,t,i));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=e}}};function ti(t){this._context=new ii(t)}(ti.prototype=Object.create(z.prototype)).point=function(t,i){z.prototype.point.call(this,i,t)};function ii(t){this._context=t}ii.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,e,n,s,o){this._context.bezierCurveTo(i,t,n,e,o,s)}};function Si(t){return new z(t)}function wi(t){return new ti(t)}function ei(t){this._context=t}ei.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),e===2)this._context.lineTo(t[1],i[1]);else for(var n=mt(t),s=mt(i),o=0,r=1;r<e;++o,++r)this._context.bezierCurveTo(n[0][o],s[0][o],n[1][o],s[1][o],t[r],i[r]);(this._line||this._line!==0&&e===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}};function mt(t){var i,e=t.length-1,n,s=new Array(e),o=new Array(e),r=new Array(e);for(s[0]=0,o[0]=2,r[0]=t[0]+2*t[1],i=1;i<e-1;++i)s[i]=1,o[i]=4,r[i]=4*t[i]+2*t[i+1];for(s[e-1]=2,o[e-1]=7,r[e-1]=8*t[e-1]+t[e],i=1;i<e;++i)n=s[i]/o[i-1],o[i]-=n,r[i]-=n*r[i-1];for(s[e-1]=r[e-1]/o[e-1],i=e-2;i>=0;--i)s[i]=(r[i]-s[i+1])/o[i];for(o[e-1]=(t[e]+s[e-1])/2,i=0;i<e-1;++i)o[i]=2*t[i+1]-s[i+1];return[s,o]}function Mi(t){return new ei(t)}function Z(t,i){this._context=t,this._t=i}Z.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,i)}break}}this._x=t,this._y=i}};function Ti(t){return new Z(t,.5)}function Oi(t){return new Z(t,0)}function Pi(t){return new Z(t,1)}function kt(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),e.push.apply(e,n)}return e}function Ni(t){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?kt(Object(e),!0).forEach(function(n){Ci(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):kt(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function $(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$=function(i){return typeof i}:$=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},$(t)}function Ci(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function G(){return G=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},G.apply(this,arguments)}function Ai(t,i){if(t){if(typeof t=="string")return St(t,i);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return St(t,i)}}function St(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=new Array(i);e<i;e++)n[e]=t[e];return n}function ni(t,i){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Ai(t))||i){e&&(t=e);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1
+ import{X as Tt,c as M,i as Ot,a as Pt,D as Q,e as H,b as J,g as F,k as E,j as Nt,u as Ct,v as ai,s as D,h as ri,w as hi,n as li,q as At,r as jt,t as Et}from"./C5IBUVPW.js";import{d as Dt,ar as $t,h as Bt,e as Rt,M as Lt,C as Ht,B as Ft,a5 as It,f as I,o as Xt}from"./CZT64TBr.js";var K=Math.PI,tt=2*K,N=1e-6,_i=tt-N;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function lt(){return new it}it.prototype=lt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,e,n){this._+="Q"+ +t+","+ +i+","+(this._x1=+e)+","+(this._y1=+n)},bezierCurveTo:function(t,i,e,n,s,o){this._+="C"+ +t+","+ +i+","+ +e+","+ +n+","+(this._x1=+s)+","+(this._y1=+o)},arcTo:function(t,i,e,n,s){t=+t,i=+i,e=+e,n=+n,s=+s;var o=this._x1,r=this._y1,a=e-t,h=n-i,u=o-t,_=r-i,l=u*u+_*_;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(l>N)if(!(Math.abs(_*a-h*u)>N)||!s)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var c=e-o,d=n-r,x=a*a+h*h,m=c*c+d*d,f=Math.sqrt(x),y=Math.sqrt(l),v=s*Math.tan((K-Math.acos((x+l-m)/(2*f*y)))/2),p=v/y,b=v/f;Math.abs(p-1)>N&&(this._+="L"+(t+p*u)+","+(i+p*_)),this._+="A"+s+","+s+",0,0,"+ +(_*c>u*d)+","+(this._x1=t+b*a)+","+(this._y1=i+b*h)}},arc:function(t,i,e,n,s,o){t=+t,i=+i,e=+e,o=!!o;var r=e*Math.cos(n),a=e*Math.sin(n),h=t+r,u=i+a,_=1^o,l=o?n-s:s-n;if(e<0)throw new Error("negative radius: "+e);this._x1===null?this._+="M"+h+","+u:(Math.abs(this._x1-h)>N||Math.abs(this._y1-u)>N)&&(this._+="L"+h+","+u),e&&(l<0&&(l=l%tt+tt),l>_i?this._+="A"+e+","+e+",0,1,"+_+","+(t-r)+","+(i-a)+"A"+e+","+e+",0,1,"+_+","+(this._x1=h)+","+(this._y1=u):l>N&&(this._+="A"+e+","+e+",0,"+ +(l>=K)+","+_+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=i+e*Math.sin(s))))},rect:function(t,i,e,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +e+"v"+ +n+"h"+-e+"Z"},toString:function(){return this._}};function k(t){return function(){return t}}var Ji=Math.abs,Ki=Math.atan2,te=Math.cos,ie=Math.max,ee=Math.min,ne=Math.sin,se=Math.sqrt,vt=1e-12,_t=Math.PI,dt=_t/2,oe=2*_t;function ae(t){return t>1?0:t<-1?_t:Math.acos(t)}function re(t){return t>=1?dt:t<=-1?-dt:Math.asin(t)}function Yt(t){this._context=t}Yt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i);break}}};function ct(t){return new Yt(t)}function zt(t){return t[0]}function Gt(t){return t[1]}function Vt(){var t=zt,i=Gt,e=k(!0),n=null,s=ct,o=null;function r(a){var h,u=a.length,_,l=!1,c;for(n==null&&(o=s(c=lt())),h=0;h<=u;++h)!(h<u&&e(_=a[h],h,a))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(_,h,a),+i(_,h,a));if(c)return o=null,c+""||null}return r.x=function(a){return arguments.length?(t=typeof a=="function"?a:k(+a),r):t},r.y=function(a){return arguments.length?(i=typeof a=="function"?a:k(+a),r):i},r.defined=function(a){return arguments.length?(e=typeof a=="function"?a:k(!!a),r):e},r.curve=function(a){return arguments.length?(s=a,n!=null&&(o=s(n)),r):s},r.context=function(a){return arguments.length?(a==null?n=o=null:o=s(n=a),r):n},r}function ci(){var t=zt,i=null,e=k(0),n=Gt,s=k(!0),o=null,r=ct,a=null;function h(_){var l,c,d,x=_.length,m,f=!1,y,v=new Array(x),p=new Array(x);for(o==null&&(a=r(y=lt())),l=0;l<=x;++l){if(!(l<x&&s(m=_[l],l,_))===f)if(f=!f)c=l,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=l-1;d>=c;--d)a.point(v[d],p[d]);a.lineEnd(),a.areaEnd()}f&&(v[l]=+t(m,l,_),p[l]=+e(m,l,_),a.point(i?+i(m,l,_):v[l],n?+n(m,l,_):p[l]))}if(y)return a=null,y+""||null}function u(){return Vt().defined(s).curve(r).context(o)}return h.x=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),i=null,h):t},h.x0=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),h):t},h.x1=function(_){return arguments.length?(i=_==null?null:typeof _=="function"?_:k(+_),h):i},h.y=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),n=null,h):e},h.y0=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),h):e},h.y1=function(_){return arguments.length?(n=_==null?null:typeof _=="function"?_:k(+_),h):n},h.lineX0=h.lineY0=function(){return u().x(t).y(e)},h.lineY1=function(){return u().x(t).y(n)},h.lineX1=function(){return u().x(i).y(e)},h.defined=function(_){return arguments.length?(s=typeof _=="function"?_:k(!!_),h):s},h.curve=function(_){return arguments.length?(r=_,o!=null&&(a=r(o)),h):r},h.context=function(_){return arguments.length?(_==null?o=a=null:a=r(o=_),h):o},h}function w(){}function X(t,i,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+e)/6)}function V(t){this._context=t}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:X(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function ui(t){return new V(t)}function Zt(t){this._context=t}Zt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function fi(t){return new Zt(t)}function qt(t){this._context=t}qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 3:this._point=4;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function pi(t){return new qt(t)}function Wt(t,i){this._basis=new V(t),this._beta=i}Wt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,e=t.length-1;if(e>0)for(var n=t[0],s=i[0],o=t[e]-n,r=i[e]-s,a=-1,h;++a<=e;)h=a/e,this._basis.point(this._beta*t[a]+(1-this._beta)*(n+h*o),this._beta*i[a]+(1-this._beta)*(s+h*r));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const yi=(function t(i){function e(n){return i===1?new V(n):new Wt(n,i)}return e.beta=function(n){return t(+n)},e})(.85);function Y(t,i,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function ut(t,i){this._context=t,this._k=(1-i)/6}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Y(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:Y(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const vi=(function t(i){function e(n){return new ut(n,i)}return e.tension=function(n){return t(+n)},e})(0);function ft(t,i){this._context=t,this._k=(1-i)/6}ft.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:Y(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const di=(function t(i){function e(n){return new ft(n,i)}return e.tension=function(n){return t(+n)},e})(0);function pt(t,i){this._context=t,this._k=(1-i)/6}pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Y(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const xi=(function t(i){function e(n){return new pt(n,i)}return e.tension=function(n){return t(+n)},e})(0);function yt(t,i,e){var n=t._x1,s=t._y1,o=t._x2,r=t._y2;if(t._l01_a>vt){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,s=(s*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>vt){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,_=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-i*t._l12_2a)/_,r=(r*u+t._y1*t._l23_2a-e*t._l12_2a)/_}t._context.bezierCurveTo(n,s,o,r,t._x2,t._y2)}function Qt(t,i){this._context=t,this._alpha=i}Qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const gi=(function t(i){function e(n){return i?new Qt(n,i):new ut(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Ut(t,i){this._context=t,this._alpha=i}Ut.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const bi=(function t(i){function e(n){return i?new Ut(n,i):new ft(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Jt(t,i){this._context=t,this._alpha=i}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const mi=(function t(i){function e(n){return i?new Jt(n,i):new pt(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Kt(t){this._context=t}Kt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function ki(t){return new Kt(t)}function xt(t){return t<0?-1:1}function gt(t,i,e){var n=t._x1-t._x0,s=i-t._x1,o=(t._y1-t._y0)/(n||s<0&&-0),r=(e-t._y1)/(s||n<0&&-0),a=(o*s+r*n)/(n+s);return(xt(o)+xt(r))*Math.min(Math.abs(o),Math.abs(r),.5*Math.abs(a))||0}function bt(t,i){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-i)/2:i}function U(t,i,e){var n=t._x0,s=t._y0,o=t._x1,r=t._y1,a=(o-n)/3;t._context.bezierCurveTo(n+a,s+a*i,o-a,r-a*e,o,r)}function z(t){this._context=t}z.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:U(this,this._t0,bt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var e=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,U(this,bt(this,e=gt(this,t,i)),e);break;default:U(this,this._t0,e=gt(this,t,i));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=e}}};function ti(t){this._context=new ii(t)}(ti.prototype=Object.create(z.prototype)).point=function(t,i){z.prototype.point.call(this,i,t)};function ii(t){this._context=t}ii.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,e,n,s,o){this._context.bezierCurveTo(i,t,n,e,o,s)}};function Si(t){return new z(t)}function wi(t){return new ti(t)}function ei(t){this._context=t}ei.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),e===2)this._context.lineTo(t[1],i[1]);else for(var n=mt(t),s=mt(i),o=0,r=1;r<e;++o,++r)this._context.bezierCurveTo(n[0][o],s[0][o],n[1][o],s[1][o],t[r],i[r]);(this._line||this._line!==0&&e===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}};function mt(t){var i,e=t.length-1,n,s=new Array(e),o=new Array(e),r=new Array(e);for(s[0]=0,o[0]=2,r[0]=t[0]+2*t[1],i=1;i<e-1;++i)s[i]=1,o[i]=4,r[i]=4*t[i]+2*t[i+1];for(s[e-1]=2,o[e-1]=7,r[e-1]=8*t[e-1]+t[e],i=1;i<e;++i)n=s[i]/o[i-1],o[i]-=n,r[i]-=n*r[i-1];for(s[e-1]=r[e-1]/o[e-1],i=e-2;i>=0;--i)s[i]=(r[i]-s[i+1])/o[i];for(o[e-1]=(t[e]+s[e-1])/2,i=0;i<e-1;++i)o[i]=2*t[i+1]-s[i+1];return[s,o]}function Mi(t){return new ei(t)}function Z(t,i){this._context=t,this._t=i}Z.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,i)}break}}this._x=t,this._y=i}};function Ti(t){return new Z(t,.5)}function Oi(t){return new Z(t,0)}function Pi(t){return new Z(t,1)}function kt(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),e.push.apply(e,n)}return e}function Ni(t){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?kt(Object(e),!0).forEach(function(n){Ci(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):kt(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function $(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$=function(i){return typeof i}:$=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},$(t)}function Ci(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function G(){return G=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},G.apply(this,arguments)}function Ai(t,i){if(t){if(typeof t=="string")return St(t,i);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return St(t,i)}}function St(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=new Array(i);e<i;e++)n[e]=t[e];return n}function ni(t,i){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Ai(t))||i){e&&(t=e);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,r=!1,a;return{s:function(){e=e.call(t)},n:function(){var h=e.next();return o=h.done,h},e:function(h){r=!0,a=h},f:function(){try{!o&&e.return!=null&&e.return()}finally{if(r)throw a}}}}function ji(t,i){var e=[],n=[];function s(o,r){if(o.length===1)e.push(o[0]),n.push(o[0]);else{for(var a=Array(o.length-1),h=0;h<a.length;h++)h===0&&e.push(o[0]),h===a.length-1&&n.push(o[h+1]),a[h]=[(1-r)*o[h][0]+r*o[h+1][0],(1-r)*o[h][1]+r*o[h+1][1]];s(a,r)}}return t.length&&s(t,i),{left:e,right:n.reverse()}}function Ei(t){var i={};return t.length===4&&(i.x2=t[2][0],i.y2=t[2][1]),t.length>=3&&(i.x1=t[1][0],i.y1=t[1][1]),i.x=t[t.length-1][0],i.y=t[t.length-1][1],t.length===4?i.type="C":t.length===3?i.type="Q":i.type="L",i}function Di(t,i){i=i||2;for(var e=[],n=t,s=1/i,o=0;o<i-1;o++){var r=s/(1-s*o),a=ji(n,r);e.push(a.left),n=a.right}return e.push(n),e}function $i(t,i,e){var n=[[t.x,t.y]];return i.x1!=null&&n.push([i.x1,i.y1]),i.x2!=null&&n.push([i.x2,i.y2]),n.push([i.x,i.y]),Di(n,e).map(Ei)}var Bi=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,A={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};Object.keys(A).forEach(function(t){A[t.toLowerCase()]=A[t]});function et(t,i){for(var e=Array(t),n=0;n<t;n++)e[n]=i;return e}function Ri(t){return"".concat(t.type).concat(A[t.type].map(function(i){return t[i]}).join(","))}function Li(t,i){var e={x1:"x",y1:"y",x2:"x",y2:"y"},n=["xAxisRotation","largeArcFlag","sweepFlag"];if(t.type!==i.type&&i.type.toUpperCase()!=="M"){var s={};Object.keys(i).forEach(function(o){var r=i[o],a=t[o];a===void 0&&(n.includes(o)?a=r:(a===void 0&&e[o]&&(a=t[e[o]]),a===void 0&&(a=0))),s[o]=a}),s.type=i.type,t=s}return t}function Hi(t,i,e){var n=[];if(i.type==="L"||i.type==="Q"||i.type==="C")n=n.concat($i(t,i,e));else{var s=G({},t);s.type==="M"&&(s.type="L"),n=n.concat(et(e-1).map(function(){return s})),n.push(i)}return n}function wt(t,i,e){var n=t.length-1,s=i.length-1,o=n/s,r=et(s).reduce(function(h,u,_){var l=Math.floor(o*_);if(e&&l<t.length-1&&e(t[l],t[l+1])){var c=o*_%1<.5;h[l]&&(c?l>0?l-=1:l<t.length-1&&(l+=1):l<t.length-1?l+=1:l>0&&(l-=1))}return h[l]=(h[l]||0)+1,h},[]),a=r.reduce(function(h,u,_){if(_===t.length-1){var l=et(u,G({},t[t.length-1]));return l[0].type==="M"&&l.forEach(function(c){c.type="L"}),h.concat(l)}return h.concat(Hi(t[_],t[_+1],u))},[]);return a.unshift(t[0]),a}function Mt(t){for(var i=(t||"").match(Bi)||[],e=[],n,s,o=0;o<i.length;++o)if(n=A[i[o]],n){s={type:i[o]};for(var r=0;r<n.length;++r)s[n[r]]=+i[o+r+1];o+=n.length,e.push(s)}return e}function Fi(t,i,e){var n=t==null?[]:t.slice(),s=i==null?[]:i.slice(),o=$(e)==="object"?e:{excludeSegment:e,snapEndsToInput:!0},r=o.excludeSegment,a=o.snapEndsToInput;if(!n.length&&!s.length)return function(){return[]};var h=(n.length===0||n[n.length-1].type==="Z")&&(s.length===0||s[s.length-1].type==="Z");n.length>0&&n[n.length-1].type==="Z"&&n.pop(),s.length>0&&s[s.length-1].type==="Z"&&s.pop(),n.length?s.length||s.push(n[0]):n.push(s[0]);var u=Math.abs(s.length-n.length);u!==0&&(s.length>n.length?n=wt(n,s,r):s.length<n.length&&(s=wt(s,n,r))),n=n.map(function(l,c){return Li(l,s[c])});var _=n.map(function(l){return Ni({},l)});return h&&(_.push({type:"Z"}),n.push({type:"Z"})),function(c){if(c===1&&a)return i??[];if(c===0)return n;for(var d=0;d<_.length;++d){var x=n[d],m=s[d],f=_[d],y=ni(A[f.type]),v;try{for(y.s();!(v=y.n()).done;){var p=v.value;f[p]=(1-c)*x[p]+c*m[p],(p==="largeArcFlag"||p==="sweepFlag")&&(f[p]=Math.round(f[p]))}}catch(b){y.e(b)}finally{y.f()}}return _}}function si(t,i,e){var n=Mt(t),s=Mt(i),o=$(e)==="object"?e:{excludeSegment:e,snapEndsToInput:!0},r=o.excludeSegment,a=o.snapEndsToInput;if(!n.length&&!s.length)return function(){return""};var h=Fi(n,s,{excludeSegment:r,snapEndsToInput:a});return function(_){if(_===1&&a)return i??"";var l=h(_),c="",d=ni(l),x;try{for(d.s();!(x=d.n()).done;){var m=x.value;c+=Ri(m)}}catch(f){d.e(f)}finally{d.f()}return c}}var g;(function(t){t.Basis="basis",t.BasisClosed="basisClosed",t.BasisOpen="basisOpen",t.Bundle="bundle",t.Cardinal="cardinal",t.CardinalClosed="cardinalClosed",t.CardinalOpen="cardinalOpen",t.CatmullRom="catmullRom",t.CatmullRomClosed="catmullRomClosed",t.CatmullRomOpen="catmullRomOpen",t.Linear="linear",t.LinearClosed="linearClosed",t.MonotoneX="monotoneX",t.MonotoneY="monotoneY",t.Natural="natural",t.Step="step",t.StepAfter="stepAfter",t.StepBefore="stepBefore"})(g||(g={}));const nt={[g.Basis]:ui,[g.BasisClosed]:fi,[g.BasisOpen]:pi,[g.Bundle]:yi,[g.Cardinal]:vi,[g.CardinalClosed]:di,[g.CardinalOpen]:xi,[g.CatmullRom]:gi,[g.CatmullRomClosed]:bi,[g.CatmullRomOpen]:mi,[g.Linear]:ct,[g.LinearClosed]:ki,[g.MonotoneX]:Si,[g.MonotoneY]:wi,[g.Natural]:Mi,[g.Step]:Ti,[g.StepAfter]:Pi,[g.StepBefore]:Oi},Ii=Object.assign(Object.assign({},Tt),{curveType:g.MonotoneX,lineWidth:2,lineDashArray:void 0,fallbackValue:void 0,highlightOnHover:!1,cursor:null,interpolateMissingData:!1}),Xi=Ot`
3
3
  :root {
4
4
  --vis-line-cursor: default;
@@ -1 +1 @@
1
- import{W as l,h as c,c as r,o as n,$ as u,ap as s}from"./CGgHmnnS.js";import{_ as p}from"./ByXbV9Xa.js";const i={base:"align-text-top"},v={__name:"ProseKbd",props:{value:{type:String,required:!0},class:{type:null,required:!1}},setup(e){const a=e,t=l(),o=c(()=>s({extend:s(i),...t.ui?.prose?.kbd||{}}));return(m,f)=>(n(),r(p,{value:e.value,class:u(o.value({class:a.class}))},null,8,["value","class"]))}};export{v as default};
1
+ import{W as l,h as c,c as r,o as n,$ as u,ap as s}from"./CZT64TBr.js";import{_ as p}from"./IwZpKn7a.js";const i={base:"align-text-top"},v={__name:"ProseKbd",props:{value:{type:String,required:!0},class:{type:null,required:!1}},setup(e){const a=e,t=l(),o=c(()=>s({extend:s(i),...t.ui?.prose?.kbd||{}}));return(m,f)=>(n(),r(p,{value:e.value,class:u(o.value({class:a.class}))},null,8,["value","class"]))}};export{v as default};
@@ -1 +1 @@
1
- import{aq as f,W as v,h as p,ap as n,c as m,o as t,w as y,M as l,aa as d,$ as s,r as i,a as g,P as h}from"./CGgHmnnS.js";const b={slots:{root:"rounded-lg overflow-hidden",header:"p-4 sm:px-6",body:"p-4 sm:p-6",footer:"p-4 sm:px-6"},variants:{variant:{solid:{root:"bg-inverted text-inverted"},outline:{root:"bg-default ring ring-default divide-y divide-default"},soft:{root:"bg-elevated/50 divide-y divide-default"},subtle:{root:"bg-elevated/50 ring ring-default divide-y divide-default"}}},defaultVariants:{variant:"outline"}},q={__name:"UCard",props:{as:{type:null,required:!1},variant:{type:null,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(u){const e=u,o=f(),c=v(),a=p(()=>n({extend:n(b),...c.ui?.card||{}})({variant:e.variant}));return(r,k)=>(t(),m(g(h),{as:u.as,"data-slot":"root",class:s(a.value.root({class:[e.ui?.root,e.class]}))},{default:y(()=>[o.header?(t(),l("div",{key:0,"data-slot":"header",class:s(a.value.header({class:e.ui?.header}))},[i(r.$slots,"header")],2)):d("",!0),o.default?(t(),l("div",{key:1,"data-slot":"body",class:s(a.value.body({class:e.ui?.body}))},[i(r.$slots,"default")],2)):d("",!0),o.footer?(t(),l("div",{key:2,"data-slot":"footer",class:s(a.value.footer({class:e.ui?.footer}))},[i(r.$slots,"footer")],2)):d("",!0)]),_:3},8,["as","class"]))}};export{q as _};
1
+ import{aq as f,W as v,h as p,ap as n,c as m,o as t,w as y,M as l,aa as d,$ as s,r as i,a as g,P as h}from"./CZT64TBr.js";const b={slots:{root:"rounded-lg overflow-hidden",header:"p-4 sm:px-6",body:"p-4 sm:p-6",footer:"p-4 sm:px-6"},variants:{variant:{solid:{root:"bg-inverted text-inverted"},outline:{root:"bg-default ring ring-default divide-y divide-default"},soft:{root:"bg-elevated/50 divide-y divide-default"},subtle:{root:"bg-elevated/50 ring ring-default divide-y divide-default"}}},defaultVariants:{variant:"outline"}},q={__name:"UCard",props:{as:{type:null,required:!1},variant:{type:null,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(u){const e=u,o=f(),c=v(),a=p(()=>n({extend:n(b),...c.ui?.card||{}})({variant:e.variant}));return(r,k)=>(t(),m(g(h),{as:u.as,"data-slot":"root",class:s(a.value.root({class:[e.ui?.root,e.class]}))},{default:y(()=>[o.header?(t(),l("div",{key:0,"data-slot":"header",class:s(a.value.header({class:e.ui?.header}))},[i(r.$slots,"header")],2)):d("",!0),o.default?(t(),l("div",{key:1,"data-slot":"body",class:s(a.value.body({class:e.ui?.body}))},[i(r.$slots,"default")],2)):d("",!0),o.footer?(t(),l("div",{key:2,"data-slot":"footer",class:s(a.value.footer({class:e.ui?.footer}))},[i(r.$slots,"footer")],2)):d("",!0)]),_:3},8,["as","class"]))}};export{q as _};
@@ -1,4 +1,4 @@
1
- import{d as b,s as p,C as m,K as f,L as v,M as k,g as y,N as h,O as T,Q as _,R as C}from"./CGgHmnnS.js";const O=Symbol.for("nuxt:client-only"),d="<div></div>",N=b({name:"ClientOnly",inheritAttrs:!1,props:["fallback","placeholder","placeholderTag","fallbackTag"],setup(t,{slots:n,attrs:s}){const u=p(!1);m(()=>{u.value=!0});const o=y();return o&&(o._nuxtClientOnly=!0),C(O,!0),()=>{if(u.value){const e=n.default?.();return e&&e.length===1?[f(e[0],s)]:e}const r=n.fallback||n.placeholder;if(r)return v(r);const l=t.fallback||t.placeholder||"",a=t.fallbackTag||t.placeholderTag||"span";return k(a,s,l)}}}),g=new WeakMap;function x(t){if(g.has(t))return g.get(t);const n={...t};return n.render?n.render=(s,u,o,r,l,a)=>{if(r.mounted$??s.mounted$){const e=t.render?.bind(s)(s,u,o,r,l,a);return e.children===null||typeof e.children=="string"?f(e):v(e)}return h(s._.vnode.el,d)}:n.template&&=`
1
+ import{d as b,s as p,C as m,K as f,L as v,M as k,g as y,N as h,O as T,Q as _,R as C}from"./CZT64TBr.js";const O=Symbol.for("nuxt:client-only"),d="<div></div>",N=b({name:"ClientOnly",inheritAttrs:!1,props:["fallback","placeholder","placeholderTag","fallbackTag"],setup(t,{slots:n,attrs:s}){const u=p(!1);m(()=>{u.value=!0});const o=y();return o&&(o._nuxtClientOnly=!0),C(O,!0),()=>{if(u.value){const e=n.default?.();return e&&e.length===1?[f(e[0],s)]:e}const r=n.fallback||n.placeholder;if(r)return v(r);const l=t.fallback||t.placeholder||"",a=t.fallbackTag||t.placeholderTag||"span";return k(a,s,l)}}}),g=new WeakMap;function x(t){if(g.has(t))return g.get(t);const n={...t};return n.render?n.render=(s,u,o,r,l,a)=>{if(r.mounted$??s.mounted$){const e=t.render?.bind(s)(s,u,o,r,l,a);return e.children===null||typeof e.children=="string"?f(e):v(e)}return h(s._.vnode.el,d)}:n.template&&=`
2
2
  <template v-if="mounted$">${t.template}</template>
3
3
  <template v-else>${d}</template>
4
4
  `,n.setup=(s,u)=>{const o=T(),r=p(o.isHydrating===!1),l=y();if(o.isHydrating){const e={...l.attrs},c=$(l);for(const i in e)delete l.attrs[i];m(()=>{Object.assign(l.attrs,e),l.vnode.dirs=c})}m(()=>{r.value=!0});const a=t.setup?.(s,u)||{};return _(a)?Promise.resolve(a).then(e=>typeof e!="function"?(e||={},e.mounted$=r,e):(...c)=>{if(r.value||!o.isHydrating){const i=e(...c);return i.children===null||typeof i.children=="string"?f(i):v(i)}return h(l?.vnode.el,d)}):typeof a=="function"?(...e)=>{if(r.value){const c=a(...e),i=n.inheritAttrs!==!1?u.attrs:void 0;return c.children===null||typeof c.children=="string"?f(c,i):v(c,i)}return h(l?.vnode.el,d)}:Object.assign(a,{mounted$:r})},g.set(t,n),n}function $(t){if(!t||!t.vnode.dirs)return null;const n=t.vnode.dirs;return t.vnode.dirs=null,n}export{N as _,x as a,O as c};
@@ -1 +1 @@
1
- import{h as s,aS as w,a7 as I,d as m,aQ as x,aR as R,u as A,c as g,o as _,w as y,r as b,a as o,P as k,bm as O}from"./CGgHmnnS.js";import{b as E,a as M,C as D}from"./RIAd5Wd1.js";import{u as T}from"./Suor9Vto.js";import{u as H}from"./Cj3gDP-y.js";import{i as K}from"./3AgfIirx.js";import{u as P}from"./C6Y-ieo6.js";function $({type:t,defaultValue:l,modelValue:a}){const e=a||l;return a!==void 0||l!==void 0?Array.isArray(e)?"multiple":"single":t??"single"}function j({type:t,defaultValue:l,modelValue:a}){return t||$({type:t,defaultValue:l,modelValue:a})}function F({type:t,defaultValue:l}){return l!==void 0?l:t==="single"?void 0:[]}function N(t,l){const a=s(()=>j(t)),e=w(t,"modelValue",l,{defaultValue:F(t),passive:t.modelValue===void 0,deep:!0});function n(i){if(a.value==="single")e.value=I(i,e.value)?void 0:i;else{const d=Array.isArray(e.value)?[...e.value||[]]:[e.value].filter(Boolean);if(K(d,i)){const u=d.findIndex(p=>I(p,i));d.splice(u,1)}else d.push(i);e.value=d}}const r=s(()=>a.value==="single");return{modelValue:e,changeModelValue:n,isSingle:r}}const[q,Q]=x("AccordionRoot");var z=m({__name:"AccordionRoot",props:{collapsible:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},orientation:{type:String,required:!1,default:"vertical"},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},type:{type:String,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1}},emits:["update:modelValue"],setup(t,{emit:l}){const a=t,e=l,{dir:n,disabled:r,unmountOnHide:i}=R(a),d=H(n),{modelValue:u,changeModelValue:p,isSingle:h}=N(a,e),{forwardRef:c,currentElement:f}=A();return Q({disabled:r,direction:d,orientation:a.orientation,parentElement:f,isSingle:h,collapsible:a.collapsible,modelValue:u,changeModelValue:p,unmountOnHide:i}),(v,B)=>(_(),g(o(k),{ref:o(c),"as-child":v.asChild,as:v.as},{default:y(()=>[b(v.$slots,"default",{modelValue:o(u)})]),_:3},8,["as-child","as"]))}}),te=z,C=(function(t){return t.Open="open",t.Closed="closed",t})(C||{});const[V,G]=x("AccordionItem");var J=m({__name:"AccordionItem",props:{disabled:{type:Boolean,required:!1},value:{type:String,required:!0},unmountOnHide:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t,{expose:l}){const a=t,e=q(),n=s(()=>e.isSingle.value?a.value===e.modelValue.value:Array.isArray(e.modelValue.value)&&e.modelValue.value.includes(a.value)),r=s(()=>e.disabled.value||a.disabled),i=s(()=>r.value?"":void 0),d=s(()=>n.value?C.Open:C.Closed);l({open:n,dataDisabled:i});const{currentRef:u,currentElement:p}=A();G({open:n,dataState:d,disabled:r,dataDisabled:i,triggerId:"",currentRef:u,currentElement:p,value:s(()=>a.value)});function h(c){const f=c.target;if(Array.from(e.parentElement.value?.querySelectorAll("[data-reka-collection-item]")??[]).findIndex(S=>S===f)===-1)return null;P(c,f,e.parentElement.value,{arrowKeyOptions:e.orientation,dir:e.direction.value,focus:!0})}return(c,f)=>(_(),g(o(E),{"data-orientation":o(e).orientation,"data-disabled":i.value,"data-state":d.value,disabled:r.value,open:n.value,as:a.as,"as-child":a.asChild,"unmount-on-hide":a.unmountOnHide??o(e).unmountOnHide.value,onKeydown:O(h,["up","down","left","right","home","end"])},{default:y(()=>[b(c.$slots,"default",{open:n.value})]),_:3},8,["data-orientation","data-disabled","data-state","disabled","open","as","as-child","unmount-on-hide"]))}}),oe=J,L=m({__name:"AccordionContent",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const l=t,a=q(),e=V();return A(),(n,r)=>(_(),g(o(M),{role:"region","as-child":l.asChild,as:n.as,"force-mount":l.forceMount,"aria-labelledby":o(e).triggerId,"data-state":o(e).dataState.value,"data-disabled":o(e).dataDisabled.value,"data-orientation":o(a).orientation,style:{"--reka-accordion-content-width":"var(--reka-collapsible-content-width)","--reka-accordion-content-height":"var(--reka-collapsible-content-height)"},onContentFound:r[0]||(r[0]=i=>o(a).changeModelValue(o(e).value.value))},{default:y(()=>[b(n.$slots,"default")]),_:3},8,["as-child","as","force-mount","aria-labelledby","data-state","data-disabled","data-orientation"]))}}),le=L,U=m({__name:"AccordionTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const l=t,a=q(),e=V();e.triggerId||=T(void 0,"reka-accordion-trigger");function n(){const r=a.isSingle.value&&e.open.value&&!a.collapsible;e.disabled.value||r||a.changeModelValue(e.value.value)}return(r,i)=>(_(),g(o(D),{id:o(e).triggerId,ref:o(e).currentRef,"data-reka-collection-item":"",as:l.as,"as-child":l.asChild,"aria-disabled":o(e).disabled.value||void 0,"aria-expanded":o(e).open.value||!1,"data-disabled":o(e).dataDisabled.value,"data-orientation":o(a).orientation,"data-state":o(e).dataState.value,disabled:o(e).disabled.value,onClick:n},{default:y(()=>[b(r.$slots,"default")]),_:3},8,["id","as","as-child","aria-disabled","aria-expanded","data-disabled","data-orientation","data-state","disabled"]))}}),ne=U;export{oe as A,V as a,ne as b,le as c,te as d,q as i};
1
+ import{h as s,aS as w,a7 as I,d as m,aQ as x,aR as R,u as A,c as g,o as _,w as y,r as b,a as o,P as k,bm as O}from"./CZT64TBr.js";import{b as E,a as M,C as D}from"./tHI-osWJ.js";import{u as T}from"./DwbYPACo.js";import{u as H}from"./D-ysM-Cd.js";import{i as K}from"./C6M-e7pT.js";import{u as P}from"./C6Y-ieo6.js";function $({type:t,defaultValue:l,modelValue:a}){const e=a||l;return a!==void 0||l!==void 0?Array.isArray(e)?"multiple":"single":t??"single"}function j({type:t,defaultValue:l,modelValue:a}){return t||$({type:t,defaultValue:l,modelValue:a})}function F({type:t,defaultValue:l}){return l!==void 0?l:t==="single"?void 0:[]}function N(t,l){const a=s(()=>j(t)),e=w(t,"modelValue",l,{defaultValue:F(t),passive:t.modelValue===void 0,deep:!0});function n(i){if(a.value==="single")e.value=I(i,e.value)?void 0:i;else{const d=Array.isArray(e.value)?[...e.value||[]]:[e.value].filter(Boolean);if(K(d,i)){const u=d.findIndex(p=>I(p,i));d.splice(u,1)}else d.push(i);e.value=d}}const r=s(()=>a.value==="single");return{modelValue:e,changeModelValue:n,isSingle:r}}const[q,Q]=x("AccordionRoot");var z=m({__name:"AccordionRoot",props:{collapsible:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},orientation:{type:String,required:!1,default:"vertical"},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},type:{type:String,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1}},emits:["update:modelValue"],setup(t,{emit:l}){const a=t,e=l,{dir:n,disabled:r,unmountOnHide:i}=R(a),d=H(n),{modelValue:u,changeModelValue:p,isSingle:h}=N(a,e),{forwardRef:c,currentElement:f}=A();return Q({disabled:r,direction:d,orientation:a.orientation,parentElement:f,isSingle:h,collapsible:a.collapsible,modelValue:u,changeModelValue:p,unmountOnHide:i}),(v,B)=>(_(),g(o(k),{ref:o(c),"as-child":v.asChild,as:v.as},{default:y(()=>[b(v.$slots,"default",{modelValue:o(u)})]),_:3},8,["as-child","as"]))}}),te=z,C=(function(t){return t.Open="open",t.Closed="closed",t})(C||{});const[V,G]=x("AccordionItem");var J=m({__name:"AccordionItem",props:{disabled:{type:Boolean,required:!1},value:{type:String,required:!0},unmountOnHide:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t,{expose:l}){const a=t,e=q(),n=s(()=>e.isSingle.value?a.value===e.modelValue.value:Array.isArray(e.modelValue.value)&&e.modelValue.value.includes(a.value)),r=s(()=>e.disabled.value||a.disabled),i=s(()=>r.value?"":void 0),d=s(()=>n.value?C.Open:C.Closed);l({open:n,dataDisabled:i});const{currentRef:u,currentElement:p}=A();G({open:n,dataState:d,disabled:r,dataDisabled:i,triggerId:"",currentRef:u,currentElement:p,value:s(()=>a.value)});function h(c){const f=c.target;if(Array.from(e.parentElement.value?.querySelectorAll("[data-reka-collection-item]")??[]).findIndex(S=>S===f)===-1)return null;P(c,f,e.parentElement.value,{arrowKeyOptions:e.orientation,dir:e.direction.value,focus:!0})}return(c,f)=>(_(),g(o(E),{"data-orientation":o(e).orientation,"data-disabled":i.value,"data-state":d.value,disabled:r.value,open:n.value,as:a.as,"as-child":a.asChild,"unmount-on-hide":a.unmountOnHide??o(e).unmountOnHide.value,onKeydown:O(h,["up","down","left","right","home","end"])},{default:y(()=>[b(c.$slots,"default",{open:n.value})]),_:3},8,["data-orientation","data-disabled","data-state","disabled","open","as","as-child","unmount-on-hide"]))}}),oe=J,L=m({__name:"AccordionContent",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const l=t,a=q(),e=V();return A(),(n,r)=>(_(),g(o(M),{role:"region","as-child":l.asChild,as:n.as,"force-mount":l.forceMount,"aria-labelledby":o(e).triggerId,"data-state":o(e).dataState.value,"data-disabled":o(e).dataDisabled.value,"data-orientation":o(a).orientation,style:{"--reka-accordion-content-width":"var(--reka-collapsible-content-width)","--reka-accordion-content-height":"var(--reka-collapsible-content-height)"},onContentFound:r[0]||(r[0]=i=>o(a).changeModelValue(o(e).value.value))},{default:y(()=>[b(n.$slots,"default")]),_:3},8,["as-child","as","force-mount","aria-labelledby","data-state","data-disabled","data-orientation"]))}}),le=L,U=m({__name:"AccordionTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const l=t,a=q(),e=V();e.triggerId||=T(void 0,"reka-accordion-trigger");function n(){const r=a.isSingle.value&&e.open.value&&!a.collapsible;e.disabled.value||r||a.changeModelValue(e.value.value)}return(r,i)=>(_(),g(o(D),{id:o(e).triggerId,ref:o(e).currentRef,"data-reka-collection-item":"",as:l.as,"as-child":l.asChild,"aria-disabled":o(e).disabled.value||void 0,"aria-expanded":o(e).open.value||!1,"data-disabled":o(e).dataDisabled.value,"data-orientation":o(a).orientation,"data-state":o(e).dataState.value,disabled:o(e).disabled.value,onClick:n},{default:y(()=>[b(r.$slots,"default")]),_:3},8,["id","as","as-child","aria-disabled","aria-expanded","data-disabled","data-orientation","data-state","disabled"]))}}),ne=U;export{oe as A,V as a,ne as b,le as c,te as d,q as i};
@@ -1 +1 @@
1
- import{W as d,h as t,c as f,aa as y,o as v,_ as a,aZ as r}from"./CGgHmnnS.js";const u={"package.json":"i-vscode-icons-file-type-node","tsconfig.json":"i-vscode-icons-file-type-tsconfig",".npmrc":"i-vscode-icons-file-type-npm",".editorconfig":"i-vscode-icons-file-type-editorconfig",".eslintrc":"i-vscode-icons-file-type-eslint",".eslintrc.cjs":"i-vscode-icons-file-type-eslint",".eslintignore":"i-vscode-icons-file-type-eslint","eslint.config.js":"i-vscode-icons-file-type-eslint","eslint.config.mjs":"i-vscode-icons-file-type-eslint","eslint.config.cjs":"i-vscode-icons-file-type-eslint",".gitignore":"i-vscode-icons-file-type-git","yarn.lock":"i-vscode-icons-file-type-yarn",".env":"i-vscode-icons-file-type-dotenv",".env.example":"i-vscode-icons-file-type-dotenv",".vscode/settings.json":"i-vscode-icons-file-type-vscode",nuxt:"i-vscode-icons-file-type-nuxt",".nuxtrc":"i-vscode-icons-file-type-nuxt",".nuxtignore":"i-vscode-icons-file-type-nuxt","nuxt.config.js":"i-vscode-icons-file-type-nuxt","nuxt.config.ts":"i-vscode-icons-file-type-nuxt","nuxt.schema.ts":"i-vscode-icons-file-type-nuxt","tailwind.config.js":"i-vscode-icons-file-type-tailwind","tailwind.config.ts":"i-vscode-icons-file-type-tailwind",vue:"i-vscode-icons-file-type-vue",ts:"i-vscode-icons-file-type-typescript",tsx:"i-vscode-icons-file-type-typescript",mjs:"i-vscode-icons-file-type-js",cjs:"i-vscode-icons-file-type-js",js:"i-vscode-icons-file-type-js",jsx:"i-vscode-icons-file-type-js",md:"i-vscode-icons-file-type-markdown",py:"i-vscode-icons-file-type-python",cs:"i-vscode-icons-file-type-csharp",asm:"i-vscode-icons-file-type-assembly",f:"i-vscode-icons-file-type-fortran",hs:"i-vscode-icons-file-type-haskell",fs:"i-vscode-icons-file-type-fsharp",kt:"i-vscode-icons-file-type-kotlin",rs:"i-vscode-icons-file-type-rust",rb:"i-vscode-icons-file-type-ruby",lsp:"i-vscode-icons-file-type-lisp",ps1:"i-vscode-icons-file-type-powershell",psd1:"i-vscode-icons-file-type-powershell",psm1:"i-vscode-icons-file-type-powershell",go:"i-vscode-icons-file-type-go",gleam:"i-vscode-icons-file-type-gleam",bicep:"i-vscode-icons-file-type-bicep",bicepparam:"i-vscode-icons-file-type-bicep",exs:"i-vscode-icons-file-type-elixir",erl:"i-vscode-icons-file-type-erlang",sbt:"i-vscode-icons-file-type-scala",h:"i-vscode-icons-file-type-cppheader",ino:"i-vscode-icons-file-type-arduino",pl:"i-vscode-icons-file-type-perl",jl:"i-vscode-icons-file-type-julia",dart:"i-vscode-icons-file-type-dartlang",ico:"i-vscode-icons-file-type-favicon",npm:"i-vscode-icons-file-type-npm",pnpm:"i-vscode-icons-file-type-pnpm",npx:"i-vscode-icons-file-type-npm",yarn:"i-vscode-icons-file-type-yarn",bun:"i-vscode-icons-file-type-bun",deno:"i-vscode-icons-file-type-deno",yml:"i-vscode-icons-file-type-yaml",terminal:"i-lucide-terminal"},g={__name:"ProseCodeIcon",props:{icon:{type:null,required:!1},filename:{type:String,required:!1}},setup(l){const e=l,p=d(),o=t(()=>r(p.ui?.prose?.codeIcon||{},u)),c=t(()=>{if(e.icon)return e.icon;if(!e.filename)return;const i=e.filename.replace(/\s*\(.*\)\s*$/,""),s=i.includes(".")&&i.split(".").pop(),n=i.split("/").pop();return(n&&o.value[n.toLowerCase()])??(s&&(o.value[s]??`i-vscode-icons-file-type-${s}`))});return(i,s)=>c.value?(v(),f(a,{key:0,name:c.value},null,8,["name"])):y("",!0)}};export{g as default};
1
+ import{W as d,h as t,c as f,aa as y,o as v,_ as a,aZ as r}from"./CZT64TBr.js";const u={"package.json":"i-vscode-icons-file-type-node","tsconfig.json":"i-vscode-icons-file-type-tsconfig",".npmrc":"i-vscode-icons-file-type-npm",".editorconfig":"i-vscode-icons-file-type-editorconfig",".eslintrc":"i-vscode-icons-file-type-eslint",".eslintrc.cjs":"i-vscode-icons-file-type-eslint",".eslintignore":"i-vscode-icons-file-type-eslint","eslint.config.js":"i-vscode-icons-file-type-eslint","eslint.config.mjs":"i-vscode-icons-file-type-eslint","eslint.config.cjs":"i-vscode-icons-file-type-eslint",".gitignore":"i-vscode-icons-file-type-git","yarn.lock":"i-vscode-icons-file-type-yarn",".env":"i-vscode-icons-file-type-dotenv",".env.example":"i-vscode-icons-file-type-dotenv",".vscode/settings.json":"i-vscode-icons-file-type-vscode",nuxt:"i-vscode-icons-file-type-nuxt",".nuxtrc":"i-vscode-icons-file-type-nuxt",".nuxtignore":"i-vscode-icons-file-type-nuxt","nuxt.config.js":"i-vscode-icons-file-type-nuxt","nuxt.config.ts":"i-vscode-icons-file-type-nuxt","nuxt.schema.ts":"i-vscode-icons-file-type-nuxt","tailwind.config.js":"i-vscode-icons-file-type-tailwind","tailwind.config.ts":"i-vscode-icons-file-type-tailwind",vue:"i-vscode-icons-file-type-vue",ts:"i-vscode-icons-file-type-typescript",tsx:"i-vscode-icons-file-type-typescript",mjs:"i-vscode-icons-file-type-js",cjs:"i-vscode-icons-file-type-js",js:"i-vscode-icons-file-type-js",jsx:"i-vscode-icons-file-type-js",md:"i-vscode-icons-file-type-markdown",py:"i-vscode-icons-file-type-python",cs:"i-vscode-icons-file-type-csharp",asm:"i-vscode-icons-file-type-assembly",f:"i-vscode-icons-file-type-fortran",hs:"i-vscode-icons-file-type-haskell",fs:"i-vscode-icons-file-type-fsharp",kt:"i-vscode-icons-file-type-kotlin",rs:"i-vscode-icons-file-type-rust",rb:"i-vscode-icons-file-type-ruby",lsp:"i-vscode-icons-file-type-lisp",ps1:"i-vscode-icons-file-type-powershell",psd1:"i-vscode-icons-file-type-powershell",psm1:"i-vscode-icons-file-type-powershell",go:"i-vscode-icons-file-type-go",gleam:"i-vscode-icons-file-type-gleam",bicep:"i-vscode-icons-file-type-bicep",bicepparam:"i-vscode-icons-file-type-bicep",exs:"i-vscode-icons-file-type-elixir",erl:"i-vscode-icons-file-type-erlang",sbt:"i-vscode-icons-file-type-scala",h:"i-vscode-icons-file-type-cppheader",ino:"i-vscode-icons-file-type-arduino",pl:"i-vscode-icons-file-type-perl",jl:"i-vscode-icons-file-type-julia",dart:"i-vscode-icons-file-type-dartlang",ico:"i-vscode-icons-file-type-favicon",npm:"i-vscode-icons-file-type-npm",pnpm:"i-vscode-icons-file-type-pnpm",npx:"i-vscode-icons-file-type-npm",yarn:"i-vscode-icons-file-type-yarn",bun:"i-vscode-icons-file-type-bun",deno:"i-vscode-icons-file-type-deno",yml:"i-vscode-icons-file-type-yaml",terminal:"i-lucide-terminal"},g={__name:"ProseCodeIcon",props:{icon:{type:null,required:!1},filename:{type:String,required:!1}},setup(l){const e=l,p=d(),o=t(()=>r(p.ui?.prose?.codeIcon||{},u)),c=t(()=>{if(e.icon)return e.icon;if(!e.filename)return;const i=e.filename.replace(/\s*\(.*\)\s*$/,""),s=i.includes(".")&&i.split(".").pop(),n=i.split("/").pop();return(n&&o.value[n.toLowerCase()])??(s&&(o.value[s]??`i-vscode-icons-file-type-${s}`))});return(i,s)=>c.value?(v(),f(a,{key:0,name:c.value},null,8,["name"])):y("",!0)}};export{g as default};
@@ -1 +1 @@
1
- import{_ as me}from"./Ehiy7Wkv.js";import{_ as ve}from"./Cfce_cVw.js";import{d as G,aU as re,aV as te,e as x,f as se,M as z,o as F,al as ye,Z as l,w as i,bm as ie,ak as B,a as o,ac as n,a0 as ae,ab as P,_ as J,aa as H,af as Q,h as M,C as de,c as O,$ as Z,X as he,Y as _e,U as we,W as be,ap as ue,m as ge,bD as xe,a5 as ke,aj as $e,b0 as ce,ah as Ce}from"./CGgHmnnS.js";import{_ as Fe,a as De}from"./D4wS6gzr.js";import{_ as Ue}from"./B3TXSB_R.js";import{_ as pe}from"./CCmSsj4q.js";import{_ as Te,a as Se}from"./81-iumfM.js";import{u as je}from"./CZ5B974o.js";import{_ as Me}from"./DN5cHXGS.js";import{_ as qe}from"./C_hl3kCw.js";import{_ as Ve}from"./D5AjrkGO.js";import{_ as Ie}from"./CJLlvuDm.js";import{_ as Ne}from"./BGV4_re9.js";import{_ as ze}from"./BW0bq0Nu.js";import{_ as Pe,a as Be}from"./BTImkTzA.js";import{a as Ee,_ as Oe}from"./B8na0pik.js";import{_ as Re}from"./1_nO5SO6.js";import{i as Le,d as Ae,_ as Ke,u as He}from"./CruI_TS3.js";import{u as Qe}from"./CjVBL0o-.js";import{u as fe}from"./CIMG8oEU.js";import"./pFPRVtL-.js";import"./BtVAOj3K.js";import"./Dfi2mj_-.js";import"./Cwdn7ZtG.js";import"./Suor9Vto.js";import"./d85YwuyC.js";import"./Cj3gDP-y.js";import"./B1ea1Zc2.js";import"./6k0gxaWW.js";import"./iVfmia7K.js";import"./By5L5Smf.js";import"./C4Ii8cYC.js";import"./DIMnGgEU.js";import"./CZQeFnOf.js";import"./C6Y-ieo6.js";import"./B02JOKtW.js";import"./DEmzTuCa.js";import"./ByXbV9Xa.js";import"./D57E8FC4.js";import"./rVZcJ6Pz.js";import"./CD6r4z4e.js";import"./CPb6IrVT.js";import"./CNB4wNeh.js";import"./P3qGksT8.js";import"./BGa5KqPj.js";import"./D_1GDAlv.js";import"./Vcq4gwWv.js";import"./AMPsjNHJ.js";const We={class:"flex items-center gap-2"},Xe={class:"flex justify-end gap-2"},Ye={class:"flex items-center gap-2"},Ze={class:"flex justify-end gap-2"},Ge={class:"flex items-center gap-2"},Je={class:"flex justify-end gap-2"},et={class:"flex items-center gap-2 text-error"},tt={key:0,class:"text-sm text-dimmed mt-1"},at={class:"flex justify-end gap-2"},lt=G({__name:"FileTreeModals",props:re({contextTarget:{}},{showNewFile:{type:Boolean,required:!0},showNewFileModifiers:{},showNewFolder:{type:Boolean,required:!0},showNewFolderModifiers:{},showRename:{type:Boolean,required:!0},showRenameModifiers:{},showDelete:{type:Boolean,required:!0},showDeleteModifiers:{}}),emits:re(["createFile","createFolder","rename","delete"],["update:showNewFile","update:showNewFolder","update:showRename","update:showDelete"]),setup(d,{emit:v}){const c=te(d,"showNewFile"),h=te(d,"showNewFolder"),u=te(d,"showRename"),f=te(d,"showDelete"),w=d,y=v,m=x("");se(u,_=>{_&&w.contextTarget&&(m.value=w.contextTarget.label)}),se(c,_=>{_&&(m.value="")}),se(h,_=>{_&&(m.value="")});function U(){m.value.trim()&&(y("createFile",m.value.trim()),c.value=!1,m.value="")}function D(){m.value.trim()&&(y("createFolder",m.value.trim()),h.value=!1,m.value="")}function b(){m.value.trim()&&(y("rename",m.value.trim()),u.value=!1,m.value="")}function q(){y("delete"),f.value=!1}return(_,e)=>{const T=J,a=me,t=ae,r=Ue,$=pe;return F(),z(ye,null,[l($,{open:c.value,"onUpdate:open":e[2]||(e[2]=s=>c.value=s)},{content:i(()=>[l(r,null,{header:i(()=>[n("div",We,[l(T,{name:"i-lucide-file-plus",class:"size-5"}),e[11]||(e[11]=n("span",{class:"font-semibold"},"New File",-1))])]),footer:i(()=>[n("div",Xe,[l(t,{color:"neutral",variant:"ghost",onClick:e[1]||(e[1]=s=>c.value=!1)},{default:i(()=>[...e[12]||(e[12]=[P(" Cancel ",-1)])]),_:1}),l(t,{onClick:U},{default:i(()=>[...e[13]||(e[13]=[P(" Create ",-1)])]),_:1})])]),default:i(()=>[l(a,{modelValue:o(m),"onUpdate:modelValue":e[0]||(e[0]=s=>B(m)?m.value=s:null),placeholder:"filename.md",autofocus:"",onKeyup:ie(U,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),l($,{open:h.value,"onUpdate:open":e[5]||(e[5]=s=>h.value=s)},{content:i(()=>[l(r,null,{header:i(()=>[n("div",Ye,[l(T,{name:"i-lucide-folder-plus",class:"size-5"}),e[14]||(e[14]=n("span",{class:"font-semibold"},"New Folder",-1))])]),footer:i(()=>[n("div",Ze,[l(t,{color:"neutral",variant:"ghost",onClick:e[4]||(e[4]=s=>h.value=!1)},{default:i(()=>[...e[15]||(e[15]=[P(" Cancel ",-1)])]),_:1}),l(t,{onClick:D},{default:i(()=>[...e[16]||(e[16]=[P(" Create ",-1)])]),_:1})])]),default:i(()=>[l(a,{modelValue:o(m),"onUpdate:modelValue":e[3]||(e[3]=s=>B(m)?m.value=s:null),placeholder:"folder-name",autofocus:"",onKeyup:ie(D,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),l($,{open:u.value,"onUpdate:open":e[8]||(e[8]=s=>u.value=s)},{content:i(()=>[l(r,null,{header:i(()=>[n("div",Ge,[l(T,{name:"i-lucide-pencil",class:"size-5"}),e[17]||(e[17]=n("span",{class:"font-semibold"},"Rename",-1))])]),footer:i(()=>[n("div",Je,[l(t,{color:"neutral",variant:"ghost",onClick:e[7]||(e[7]=s=>u.value=!1)},{default:i(()=>[...e[18]||(e[18]=[P(" Cancel ",-1)])]),_:1}),l(t,{onClick:b},{default:i(()=>[...e[19]||(e[19]=[P(" Rename ",-1)])]),_:1})])]),default:i(()=>[l(a,{modelValue:o(m),"onUpdate:modelValue":e[6]||(e[6]=s=>B(m)?m.value=s:null),placeholder:"new-name",autofocus:"",onKeyup:ie(b,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),l($,{open:f.value,"onUpdate:open":e[10]||(e[10]=s=>f.value=s)},{content:i(()=>[l(r,null,{header:i(()=>[n("div",et,[l(T,{name:"i-lucide-trash-2",class:"size-5"}),e[20]||(e[20]=n("span",{class:"font-semibold"},"Delete",-1))])]),footer:i(()=>[n("div",at,[l(t,{color:"neutral",variant:"ghost",onClick:e[9]||(e[9]=s=>f.value=!1)},{default:i(()=>[...e[23]||(e[23]=[P(" Cancel ",-1)])]),_:1}),l(t,{color:"error",onClick:q},{default:i(()=>[...e[24]||(e[24]=[P(" Delete ",-1)])]),_:1})])]),default:i(()=>[n("p",null,[e[21]||(e[21]=P(" Are you sure you want to delete ",-1)),n("strong",null,Q(d.contextTarget?.label),1),e[22]||(e[22]=P("? ",-1))]),d.contextTarget?.type==="directory"?(F(),z("p",tt," This will delete all files and folders inside. ")):H("",!0)]),_:1})]),_:1},8,["open"])],64)}}}),ot=Object.assign(lt,{__name:"FilesFileTreeModals"});function nt(){const d=x([]),v=x(null),c=x(!1),h=x(null),u=x("");function f(a,t=!1){const r=a.type==="directory"?void 0:w(a.name);return{id:a.path,label:a.name,icon:r,path:a.path,type:a.type,defaultExpanded:t,children:a.children?.map($=>f($))}}function w(a){switch(a.split(".").pop()?.toLowerCase()){case"md":return"i-lucide-file-text";case"ts":case"tsx":return"i-lucide-file-code";case"js":case"jsx":return"i-lucide-file-code";case"vue":return"i-lucide-file-code";case"json":return"i-lucide-file-json";case"css":case"scss":return"i-lucide-file-code";case"png":case"jpg":case"jpeg":case"gif":case"svg":return"i-lucide-file-image";default:return"i-lucide-file"}}async function y(a="/"){c.value=!0,h.value=null;try{const t=await $fetch("/api/fs/list",{query:{path:a,recursive:"true"}});d.value=t.data.map(r=>f(r,!0))}catch(t){h.value="Failed to load file tree",console.error("Failed to load file tree:",t)}finally{c.value=!1}}async function m(a){try{return(await $fetch("/api/fs/read",{method:"POST",body:{path:a}})).data}catch(t){throw console.error("Failed to read file:",t),t}}async function U(a,t){try{return(await $fetch("/api/fs/write",{method:"POST",body:{path:a,content:t}})).data}catch(r){throw console.error("Failed to write file:",r),r}}async function D(a,t){const r=a==="/"?`/${t}`:`${a}/${t}`;return await U(r,""),await y(),r}async function b(a,t){const r=a==="/"?`/${t}`:`${a}/${t}`;try{return await $fetch("/api/fs/mkdir",{method:"POST",body:{path:r}}),await y(),r}catch($){throw console.error("Failed to create folder:",$),$}}async function q(a,t){const r=a.split("/");r.pop();const $=[...r,t].join("/");try{return await $fetch("/api/fs/rename",{method:"POST",body:{oldPath:a,newPath:$}}),await y(),$}catch(s){throw console.error("Failed to rename:",s),s}}async function _(a){try{await $fetch("/api/fs/delete",{method:"POST",body:{path:a}}),v.value===a&&(v.value=null),await y()}catch(t){throw console.error("Failed to delete:",t),t}}async function e(a,t){try{const r=await $fetch("/api/fs/move",{method:"POST",body:{sourcePath:a,destinationPath:t}});return await y(),r.data.newPath}catch(r){throw console.error("Failed to move:",r),r}}const T=M(()=>{if(!u.value)return d.value;const a=u.value.toLowerCase();function t(r){return r.reduce(($,s)=>{const I=s.label.toLowerCase().includes(a),V=s.children?t(s.children):[];return(I||V.length>0)&&$.push({...s,children:V.length>0?V:s.children,defaultExpanded:V.length>0||I}),$},[])}return t(d.value)});return{items:d,filteredItems:T,selectedFile:v,loading:c,error:h,searchQuery:u,loadTree:y,readFile:m,writeFile:U,createFile:D,createFolder:b,renameItem:q,deleteItem:_,moveItem:e}}const st={class:"h-full flex flex-col"},it={class:"-mt-1 pb-2"},dt={key:0,class:"flex items-center justify-center py-8"},rt={key:1,class:"h-full min-h-32 flex flex-col items-center justify-center text-dimmed text-sm"},ut=["onContextmenu","onDragstart","onDragover","onDrop"],ct={class:"truncate"},mt=G({__name:"FileTree",emits:["select"],setup(d,{emit:v}){const c=v,{filteredItems:h,selectedFile:u,loading:f,searchQuery:w,loadTree:y,createFile:m,createFolder:U,renameItem:D,deleteItem:b,moveItem:q}=nt(),_=x(null),e=x(null);function T(k,p){_.value=p,k.dataTransfer&&(k.dataTransfer.effectAllowed="move",k.dataTransfer.setData("text/plain",p.path))}function a(k,p){_.value&&p.type==="directory"&&_.value.path!==p.path&&(p.path.startsWith(_.value.path+"/")||(k.preventDefault(),e.value=p))}function t(){e.value=null}function r(){_.value=null,e.value=null}async function $(k,p){if(k.preventDefault(),!(!_.value||p.type!=="directory")){try{await q(_.value.path,p.path)}catch{}_.value=null,e.value=null}}const s=x(null),I=x(!1),V=x(!1),E=x(!1),N=x(!1),A=M(()=>[[{label:"New File",icon:"i-lucide-file-plus",onSelect:()=>{I.value=!0}},{label:"New Folder",icon:"i-lucide-folder-plus",onSelect:()=>{V.value=!0}}],[{label:"Rename",icon:"i-lucide-pencil",onSelect:()=>{s.value&&(E.value=!0)}},{label:"Delete",icon:"i-lucide-trash-2",color:"error",onSelect:()=>{N.value=!0}}]]);function W(k){k.type==="file"&&(u.value=k.path,c("select",k.path))}async function ee(k){const p=s.value?.type==="directory"?s.value.path:"/";let R=k;R.includes(".")||(R+=".md");try{const K=await m(p,R);u.value=K,c("select",K)}catch{}}async function X(k){const p=s.value?.type==="directory"?s.value.path:"/";try{await U(p,k)}catch{}}async function S(k){if(s.value)try{await D(s.value.path,k)}catch{}}async function C(){if(s.value)try{await b(s.value.path)}catch{}}return de(()=>{y()}),(k,p)=>{const R=me,K=ve,L=J,le=Fe,oe=De,ne=ot;return F(),z("div",st,[n("div",it,[l(R,{modelValue:o(w),"onUpdate:modelValue":p[0]||(p[0]=g=>B(w)?w.value=g:null),placeholder:"Search files...",icon:"i-lucide-search",size:"sm",class:"w-full"},null,8,["modelValue"])]),l(K,{class:"mt-2"}),l(oe,{items:o(A),class:"flex-1 h-full overflow-auto p-2",onContextmenu:p[2]||(p[2]=g=>s.value=null)},{default:i(()=>[o(f)?(F(),z("div",dt,[l(L,{name:"i-lucide-loader-2",class:"size-6 animate-spin text-dimmed"})])):o(h).length===0?(F(),z("div",rt,[l(L,{name:"i-lucide-folder-open",class:"size-8 mx-auto mb-2 opacity-50"}),p[7]||(p[7]=n("p",null,"No files found",-1)),p[8]||(p[8]=n("p",{class:"text-xs mt-1"}," Right-click to create a file ",-1))])):(F(),O(le,{key:2,items:o(h),"get-key":g=>g.id,color:"primary","expanded-icon":"i-lucide-folder-open","collapsed-icon":"i-lucide-folder",onSelect:p[1]||(p[1]=(g,Y)=>W(Y))},{item:i(({item:g,expanded:Y})=>[n("div",{class:Z(["flex items-center gap-2 w-full",{"bg-primary/10 rounded":o(e)?.path===g.path}]),draggable:"true",onContextmenu:j=>s.value=g,onDragstart:j=>T(j,g),onDragover:j=>a(j,g),onDragleave:t,onDragend:r,onDrop:j=>$(j,g)},[g.children?.length?(F(),O(L,{key:0,name:Y?"i-lucide-folder-open":"i-lucide-folder",class:"size-4 shrink-0 text-dimmed"},null,8,["name"])):g.icon?(F(),O(L,{key:1,name:g.icon,class:"size-4 shrink-0 text-dimmed"},null,8,["name"])):(F(),O(L,{key:2,name:"i-lucide-file",class:"size-4 shrink-0 text-dimmed"})),n("span",ct,Q(g.label),1)],42,ut)]),_:1},8,["items","get-key"]))]),_:1},8,["items"]),l(ne,{"show-new-file":o(I),"onUpdate:showNewFile":p[3]||(p[3]=g=>B(I)?I.value=g:null),"show-new-folder":o(V),"onUpdate:showNewFolder":p[4]||(p[4]=g=>B(V)?V.value=g:null),"show-rename":o(E),"onUpdate:showRename":p[5]||(p[5]=g=>B(E)?E.value=g:null),"show-delete":o(N),"onUpdate:showDelete":p[6]||(p[6]=g=>B(N)?N.value=g:null),"context-target":o(s),onCreateFile:ee,onCreateFolder:X,onRename:S,onDelete:C},null,8,["show-new-file","show-new-folder","show-rename","show-delete","context-target"])])}}}),pt=Object.assign(mt,{__name:"FilesFileTree"}),ft={base:"hidden lg:flex",variants:{side:{left:"",right:""}}},vt={__name:"UDashboardSidebarCollapse",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"},side:{type:String,required:!1,default:"left"},label:{type:String,required:!1},activeColor:{type:null,required:!1},activeVariant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},block:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},as:{type:null,required:!1},type:{type:null,required:!1},disabled:{type:Boolean,required:!1},exactActiveClass:{type:String,required:!1},viewTransition:{type:Boolean,required:!1}},setup(d){const v=d,c=he(_e(v,"icon","side","class")),{t:h}=we(),u=be(),{sidebarCollapsed:f,collapseSidebar:w}=je({sidebarCollapsed:x(!1),collapseSidebar:()=>{}}),y=M(()=>ue({extend:ue(ft),...u.ui?.dashboardSidebarCollapse||{}}));return(m,U)=>(F(),O(ae,ge({...o(c),icon:v.icon||(o(f)?o(u).ui.icons.panelOpen:o(u).ui.icons.panelClose),"aria-label":o(f)?o(h)("dashboardSidebarCollapse.expand"):o(h)("dashboardSidebarCollapse.collapse"),...m.$attrs},{class:y.value({class:v.class,side:v.side}),onClick:U[0]||(U[0]=D=>o(w)?.(!o(f)))}),null,16,["class"]))}},yt={class:"border-b border-default px-4 py-3 bg-elevated/50"},ht={class:"flex flex-wrap items-start gap-3"},_t={class:"flex items-start gap-2 py-0.5"},wt={class:"min-w-0"},bt={class:"font-medium"},gt={class:"text-xs text-dimmed truncate"},xt=G({__name:"DocumentMetadata",props:{metadata:{},projects:{}},emits:["update:metadata"],setup(d,{emit:v}){const c=d,h=v,u=[{label:"Hidden",value:"hidden",icon:"i-lucide-lock",description:"Hidden behind authentication and never viewable by the public"},{label:"Private",value:"private",icon:"i-lucide-eye-off",description:"Viewable by anyone with the link, but will not be indexed by search engines"},{label:"Public",value:"public",icon:"i-lucide-eye",description:"Viewable to the public and indexed by search engines"}],f=M(()=>c.metadata.shared?c.metadata.shareType||"private":"hidden"),w=M(()=>u.find(b=>b.value===f.value)),y=M({get:()=>c.metadata.tags||[],set:b=>h("update:metadata",{tags:b})});function m(b){h("update:metadata",{projectId:b||void 0})}function U(b){b==="hidden"?h("update:metadata",{shared:!1,shareType:void 0}):h("update:metadata",{shared:!0,shareType:b})}const D=M(()=>[{label:"None",value:void 0},...c.projects.map(b=>({label:b.name,value:b.id}))]);return(b,q)=>{const _=Ie,e=Ne,T=J,a=ze;return F(),z("div",yt,[n("div",ht,[l(e,{label:"Project",class:"w-40"},{default:i(()=>[l(_,{"model-value":d.metadata.projectId,items:o(D),"value-key":"value",placeholder:"None",class:"w-full","search-input":!1,"onUpdate:modelValue":m},null,8,["model-value","items"])]),_:1}),l(e,{label:"Visibility",class:"w-44"},{default:i(()=>[l(_,{"model-value":o(f),items:u,"value-key":"value",class:"w-full","search-input":!1,"onUpdate:modelValue":U},{leading:i(()=>[o(w)?(F(),O(T,{key:0,name:o(w).icon,class:"size-4 text-dimmed"},null,8,["name"])):H("",!0)]),item:i(({item:t})=>[n("div",_t,[l(T,{name:t.icon,class:"size-4 mt-0.5 shrink-0"},null,8,["name"]),n("div",wt,[n("div",bt,Q(t.label),1),n("div",gt,Q(t.description),1)])])]),_:1},8,["model-value"])]),_:1}),l(e,{label:"Tags",class:"flex-1 min-w-48"},{default:i(()=>[l(a,{modelValue:o(y),"onUpdate:modelValue":q[0]||(q[0]=t=>B(y)?y.value=t:null),placeholder:"Add tags...",class:"w-full"},null,8,["modelValue"])]),_:1})])])}}}),kt=Object.assign(xt,{__name:"EditorDocumentMetadata"}),$t=Ee(Re),Ct={class:"h-full flex flex-col"},Ft={class:"border-b border-default py-2 flex items-center justify-between"},Dt={class:"flex items-center gap-2 text-sm text-dimmed min-w-0"},Ut={class:"truncate"},Tt={key:0,class:"w-40"},St={class:"flex items-center gap-3"},jt={key:0,class:"flex items-center gap-1 text-sm text-dimmed"},Mt={class:"space-y-4"},qt={class:"flex items-center gap-3"},Vt={class:"flex items-center gap-3"},It={class:"flex items-center gap-3"},Nt=G({__name:"DocumentEditor",props:{document:{},body:{},metadata:{},filePath:{},saveStatus:{},isDirty:{type:Boolean},metadataDirty:{type:Boolean}},emits:["update:body","update:metadata","save"],async setup(d,{emit:v}){let c,h;const u=d,f=v,{data:w}=([c,h]=xe(()=>Qe("/api/projects","$c96-63t_ij")),c=await c,h(),c),y=M(()=>w.value?.data||[]),m=x(!0),{editorMode:U}=fe(),D=M({get:()=>U.value==="editor",set:S=>U.value=S?"editor":"code"}),b=M(()=>u.document.fileType==="markdown"||Le(u.filePath)),q=M(()=>Ae(u.filePath)),_=M(()=>b.value),e=[[{kind:"heading",level:1,icon:"i-lucide-heading-1"},{kind:"heading",level:2,icon:"i-lucide-heading-2"},{kind:"heading",level:3,icon:"i-lucide-heading-3"}],[{kind:"mark",mark:"bold",icon:"i-lucide-bold"},{kind:"mark",mark:"italic",icon:"i-lucide-italic"},{kind:"mark",mark:"code",icon:"i-lucide-code"}],[{kind:"bulletList",icon:"i-lucide-list"},{kind:"orderedList",icon:"i-lucide-list-ordered"},{kind:"blockquote",icon:"i-lucide-quote"}],[{kind:"link",icon:"i-lucide-link"},{kind:"codeBlock",icon:"i-lucide-file-code"},{kind:"horizontalRule",icon:"i-lucide-minus"}],[{kind:"undo",icon:"i-lucide-undo"},{kind:"redo",icon:"i-lucide-redo"}]],T=M(()=>{switch(u.saveStatus){case"saving":return"i-lucide-loader-2";case"saved":return"i-lucide-check";case"error":return"i-lucide-alert-circle";default:return u.isDirty||u.metadataDirty?"i-lucide-circle-dot":null}}),a=M(()=>{switch(u.saveStatus){case"saving":return"Saving...";case"saved":return"Saved";case"error":return"Error saving";default:return u.isDirty||u.metadataDirty?"Unsaved changes":""}}),t=M(()=>u.body||void 0);function r(S){f("update:body",S)}function $(S){f("update:metadata",S)}function s(S){(S.metaKey||S.ctrlKey)&&S.key==="s"&&(S.preventDefault(),f("save"))}de(()=>window.addEventListener("keydown",s)),ke(()=>window.removeEventListener("keydown",s));const I=$e(),V=M(()=>u.document?.id?`${window.location.origin}/view/${u.document.id}`:""),E=x(!1),N=x(!1);function A(){u.metadata.shared?ee():N.value=!0}const{copy:W}=He();async function ee(){await W(V.value)?(E.value=!0,I.add({title:"Link copied!",icon:"i-lucide-check",color:"success"}),setTimeout(()=>{E.value=!1},2e3)):I.add({title:"Failed to copy link",icon:"i-lucide-x",color:"error"})}function X(S,C){f("update:metadata",{shared:S,shareType:C??void 0}),N.value=!1,S&&setTimeout(()=>ee(),100)}return(S,C)=>{const k=J,p=Ve,R=ae,K=kt,L=Pe,le=Be,oe=$t,ne=Ke,g=Oe,Y=pe;return F(),z("div",Ct,[n("div",Ft,[n("div",Dt,[l(k,{name:"i-lucide-file-text",class:"size-4 shrink-0"}),n("span",Ut,Q(d.filePath),1)]),o(_)?(F(),z("div",Tt,[l(p,{modelValue:o(D),"onUpdate:modelValue":C[0]||(C[0]=j=>B(D)?D.value=j:null),"unchecked-icon":"i-lucide-code","checked-icon":"i-lucide-pencil",label:o(D)?"Editor Mode":"Code Mode",ui:{base:"data-[state=unchecked]:bg-info",icon:"group-data-[state=unchecked]:text-info"}},null,8,["modelValue","label"])])):H("",!0),n("div",St,[l(R,{icon:o(E)?"i-lucide-check":"i-lucide-share",size:"xs",variant:"ghost",class:"rounded-full",onClick:A},null,8,["icon"]),l(R,{icon:o(m)?"i-lucide-panel-top-close":"i-lucide-panel-top-open",size:"xs",variant:"ghost",class:"rounded-full",onClick:C[1]||(C[1]=j=>m.value=!o(m))},null,8,["icon"]),o(T)?(F(),z("div",jt,[l(k,{name:o(T),class:Z(["size-4",d.saveStatus==="saving"&&"animate-spin",d.saveStatus==="error"&&"text-error"])},null,8,["name","class"]),n("span",null,Q(o(a)),1)])):H("",!0)])]),o(m)?(F(),O(K,{key:0,metadata:d.metadata,projects:o(y),"onUpdate:metadata":$},null,8,["metadata","projects"])):H("",!0),o(b)&&o(D)?(F(),O(le,{key:1,"model-value":o(t),"content-type":"markdown",placeholder:"Start writing...",class:"markdown-editor w-full min-h-64 flex-1","onUpdate:modelValue":r},{default:i(({editor:j})=>[l(L,{editor:j,items:e,class:"border-b border-default"},null,8,["editor"])]),_:1},8,["model-value"])):(F(),O(g,{key:2},{fallback:i(()=>[l(ne,{class:"flex-1"})]),default:i(()=>[l(oe,{"model-value":d.body,language:o(q),class:"flex-1","onUpdate:modelValue":r},null,8,["model-value","language"])]),_:1})),l(Y,{open:o(N),"onUpdate:open":C[5]||(C[5]=j=>B(N)?N.value=j:null),title:"Share Document",description:"Choose how you want to share this document"},{body:i(()=>[n("div",Mt,[n("div",{class:Z(["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors",{"border-primary bg-elevated":!d.metadata.shared}]),onClick:C[2]||(C[2]=j=>X(!1,null))},[n("div",qt,[l(k,{name:"i-lucide-eye-off",class:"size-5 text-dimmed"}),C[6]||(C[6]=n("div",null,[n("div",{class:"font-medium"}," Hidden "),n("div",{class:"text-sm text-dimmed"}," Only you can view this document. Not accessible via link. ")],-1))])],2),n("div",{class:Z(["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors",{"border-primary bg-elevated":d.metadata.shared&&d.metadata.shareType==="private"}]),onClick:C[3]||(C[3]=j=>X(!0,"private"))},[n("div",Vt,[l(k,{name:"i-lucide-link",class:"size-5 text-dimmed"}),C[7]||(C[7]=n("div",null,[n("div",{class:"font-medium"}," Private (Link Only) "),n("div",{class:"text-sm text-dimmed"}," Anyone with the link can view. Not indexed by search engines. ")],-1))])],2),n("div",{class:Z(["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors",{"border-primary bg-elevated":d.metadata.shared&&d.metadata.shareType==="public"}]),onClick:C[4]||(C[4]=j=>X(!0,"public"))},[n("div",It,[l(k,{name:"i-lucide-globe",class:"size-5 text-dimmed"}),C[8]||(C[8]=n("div",null,[n("div",{class:"font-medium"}," Public "),n("div",{class:"text-sm text-dimmed"}," Visible to everyone. Indexed by search engines. ")],-1))])],2)])]),_:1},8,["open"])])}}}),zt=Object.assign(Nt,{__name:"EditorDocumentEditor"});function Pt(){const d=x(null),v=x(null),c=x(""),h=x(null),u=x(!1),f=x("idle"),w=x(!1),y=x(!1),m=ce(async()=>{!d.value||!w.value||await _({body:c.value})},2e3),U=ce(async()=>{!d.value||!y.value||await _()},500);async function D(a){u.value=!0,h.value=a,w.value=!1,y.value=!1,f.value="idle";try{const t=await $fetch("/api/documents/by-path",{method:"POST",body:{path:a}});d.value=t.data.document,v.value=t.data.metadata,c.value=t.data.body||""}catch(t){console.error("Failed to load document:",t),d.value=null,v.value=null,c.value=""}finally{u.value=!1}}function b(a){c.value!==a&&(c.value=a,w.value=!0,m())}function q(a){v.value&&(v.value={...v.value,...a},y.value=!0,U())}async function _(a={}){if(d.value){f.value="saving";try{const t={...a};y.value&&v.value&&(t.title=v.value.title,t.tags=v.value.tags,t.projectId=v.value.projectId,t.shared=v.value.shared,t.shareType=v.value.shareType),w.value&&a.body===void 0&&(t.body=c.value);const r=await $fetch(`/api/documents/${d.value.id}`,{method:"PUT",body:t});d.value=r.data.document,v.value=r.data.metadata,c.value=r.data.body||"",w.value=!1,y.value=!1,f.value="saved",setTimeout(()=>{f.value==="saved"&&(f.value="idle")},2e3)}catch(t){console.error("Failed to save document:",t),f.value="error"}}}async function e(){!w.value&&!y.value||await _({body:c.value})}function T(){d.value=null,v.value=null,c.value="",h.value=null,w.value=!1,y.value=!1,f.value="idle"}return{document:d,metadata:v,body:c,filePath:h,loading:u,saveStatus:f,isDirty:w,metadataDirty:y,loadDocument:D,updateBody:b,updateMetadata:q,saveDocument:_,saveNow:e,closeDocument:T}}const Bt={class:"flex flex-1 min-w-0"},Et={key:0,class:"flex-1 flex items-center justify-center h-full"},Ot={key:1,class:"flex-1 flex items-center justify-center h-full text-dimmed"},Rt={class:"text-center"},za=G({__name:"docs",setup(d){const v=Ce(),{document:c,metadata:h,body:u,filePath:f,loading:w,saveStatus:y,isDirty:m,metadataDirty:U,loadDocument:D,updateBody:b,updateMetadata:q,saveNow:_}=Pt(),{lastDocumentPath:e}=fe();async function T(a){await D(a),e.value=a}return de(async()=>{const a=v.query.path;a?(await D(a),e.value=a):e.value&&await D(e.value)}),(a,t)=>{const r=pt,$=Te,s=vt,I=Me,V=ae,E=qe,N=Se,A=J,W=zt;return F(),z("div",Bt,[l($,{id:"docs-filetree",collapsible:"",resizable:"","min-size":12,"default-size":16,"max-size":24,class:"hidden lg:flex"},{body:i(()=>[l(r,{class:"h-full",onSelect:T})]),_:1}),l($,{id:"docs-editor",grow:"",ui:{body:"sm:py-0"}},{header:i(()=>[l(N,null,{title:i(()=>[l(s),t[0]||(t[0]=P(" Editor ",-1))]),right:i(()=>[l(I),l(E,null,{content:i(()=>[l(r,{class:"h-full",onSelect:T})]),default:i(()=>[l(V,{icon:"i-lucide-folder-tree",class:"block lg:hidden"})]),_:1})]),_:1})]),body:i(()=>[o(w)?(F(),z("div",Et,[l(A,{name:"i-lucide-loader-2",class:"size-6 animate-spin text-dimmed"})])):o(f)?o(h)&&o(c)?(F(),O(W,{key:o(f),document:o(c),body:o(u),metadata:o(h),"file-path":o(f),"save-status":o(y),"is-dirty":o(m),"metadata-dirty":o(U),class:"h-full","onUpdate:body":o(b),"onUpdate:metadata":o(q),onSave:o(_)},null,8,["document","body","metadata","file-path","save-status","is-dirty","metadata-dirty","onUpdate:body","onUpdate:metadata","onSave"])):H("",!0):(F(),z("div",Ot,[n("div",Rt,[l(A,{name:"i-lucide-file-text",class:"size-32 mx-auto mb-4 opacity-50"}),t[1]||(t[1]=n("p",null,"Select a file to edit",-1))])]))]),_:1})])}}});export{za as default};
1
+ import{_ as me}from"./D5dMt776.js";import{_ as ve}from"./Dzjd35Uu.js";import{d as G,aU as re,aV as te,e as x,f as se,M as z,o as F,al as ye,Z as l,w as i,bm as ie,ak as B,a as o,ac as n,a0 as ae,ab as P,_ as J,aa as H,af as Q,h as M,C as de,c as O,$ as Z,X as he,Y as _e,U as we,W as be,ap as ue,m as ge,bD as xe,a5 as ke,aj as $e,b0 as ce,ah as Ce}from"./CZT64TBr.js";import{_ as Fe,a as De}from"./BRHBOpyl.js";import{_ as Ue}from"./De94RhMH.js";import{_ as pe}from"./C1pt3HyX.js";import{_ as Te,a as Se}from"./DM2gKi5N.js";import{u as je}from"./CSwU6kaw.js";import{_ as Me}from"./kbSxj5Sa.js";import{_ as qe}from"./lheR7PB2.js";import{_ as Ve}from"./Bzkzi9GX.js";import{_ as Ie}from"./qEwYRBS3.js";import{_ as Ne}from"./CAdrgifl.js";import{_ as ze}from"./DCKH9QC5.js";import{_ as Pe,a as Be}from"./CDX3o-x3.js";import{a as Ee,_ as Oe}from"./DfIQdSBL.js";import{_ as Re}from"./KEgU3jLl.js";import{i as Le,d as Ae,_ as Ke,u as He}from"./BH_Lonko.js";import{u as Qe}from"./DEZB2UVM.js";import{u as fe}from"./BWgA6Icb.js";import"./DD864DXc.js";import"./MwLHW_S3.js";import"./CzYLEcMN.js";import"./BY7b-3vi.js";import"./DwbYPACo.js";import"./DMar0qcv.js";import"./D-ysM-Cd.js";import"./CAANELnI.js";import"./CfiM4f33.js";import"./DlOqPmYc.js";import"./J00SROjJ.js";import"./2Eo3qwxj.js";import"./CXWZZrP6.js";import"./Bl7M4LXt.js";import"./C6Y-ieo6.js";import"./Cv0TenvS.js";import"./BFhzL-L6.js";import"./IwZpKn7a.js";import"./2nDmPuey.js";import"./6f0CtDWh.js";import"./CJAiAVnY.js";import"./D7PJ9LEZ.js";import"./BUa1DKMp.js";import"./CSQciH0m.js";import"./FOQllft2.js";import"./B3WWnSJo.js";import"./Vcq4gwWv.js";import"./dGa7RyJ8.js";const We={class:"flex items-center gap-2"},Xe={class:"flex justify-end gap-2"},Ye={class:"flex items-center gap-2"},Ze={class:"flex justify-end gap-2"},Ge={class:"flex items-center gap-2"},Je={class:"flex justify-end gap-2"},et={class:"flex items-center gap-2 text-error"},tt={key:0,class:"text-sm text-dimmed mt-1"},at={class:"flex justify-end gap-2"},lt=G({__name:"FileTreeModals",props:re({contextTarget:{}},{showNewFile:{type:Boolean,required:!0},showNewFileModifiers:{},showNewFolder:{type:Boolean,required:!0},showNewFolderModifiers:{},showRename:{type:Boolean,required:!0},showRenameModifiers:{},showDelete:{type:Boolean,required:!0},showDeleteModifiers:{}}),emits:re(["createFile","createFolder","rename","delete"],["update:showNewFile","update:showNewFolder","update:showRename","update:showDelete"]),setup(d,{emit:v}){const c=te(d,"showNewFile"),h=te(d,"showNewFolder"),u=te(d,"showRename"),f=te(d,"showDelete"),w=d,y=v,m=x("");se(u,_=>{_&&w.contextTarget&&(m.value=w.contextTarget.label)}),se(c,_=>{_&&(m.value="")}),se(h,_=>{_&&(m.value="")});function U(){m.value.trim()&&(y("createFile",m.value.trim()),c.value=!1,m.value="")}function D(){m.value.trim()&&(y("createFolder",m.value.trim()),h.value=!1,m.value="")}function b(){m.value.trim()&&(y("rename",m.value.trim()),u.value=!1,m.value="")}function q(){y("delete"),f.value=!1}return(_,e)=>{const T=J,a=me,t=ae,r=Ue,$=pe;return F(),z(ye,null,[l($,{open:c.value,"onUpdate:open":e[2]||(e[2]=s=>c.value=s)},{content:i(()=>[l(r,null,{header:i(()=>[n("div",We,[l(T,{name:"i-lucide-file-plus",class:"size-5"}),e[11]||(e[11]=n("span",{class:"font-semibold"},"New File",-1))])]),footer:i(()=>[n("div",Xe,[l(t,{color:"neutral",variant:"ghost",onClick:e[1]||(e[1]=s=>c.value=!1)},{default:i(()=>[...e[12]||(e[12]=[P(" Cancel ",-1)])]),_:1}),l(t,{onClick:U},{default:i(()=>[...e[13]||(e[13]=[P(" Create ",-1)])]),_:1})])]),default:i(()=>[l(a,{modelValue:o(m),"onUpdate:modelValue":e[0]||(e[0]=s=>B(m)?m.value=s:null),placeholder:"filename.md",autofocus:"",onKeyup:ie(U,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),l($,{open:h.value,"onUpdate:open":e[5]||(e[5]=s=>h.value=s)},{content:i(()=>[l(r,null,{header:i(()=>[n("div",Ye,[l(T,{name:"i-lucide-folder-plus",class:"size-5"}),e[14]||(e[14]=n("span",{class:"font-semibold"},"New Folder",-1))])]),footer:i(()=>[n("div",Ze,[l(t,{color:"neutral",variant:"ghost",onClick:e[4]||(e[4]=s=>h.value=!1)},{default:i(()=>[...e[15]||(e[15]=[P(" Cancel ",-1)])]),_:1}),l(t,{onClick:D},{default:i(()=>[...e[16]||(e[16]=[P(" Create ",-1)])]),_:1})])]),default:i(()=>[l(a,{modelValue:o(m),"onUpdate:modelValue":e[3]||(e[3]=s=>B(m)?m.value=s:null),placeholder:"folder-name",autofocus:"",onKeyup:ie(D,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),l($,{open:u.value,"onUpdate:open":e[8]||(e[8]=s=>u.value=s)},{content:i(()=>[l(r,null,{header:i(()=>[n("div",Ge,[l(T,{name:"i-lucide-pencil",class:"size-5"}),e[17]||(e[17]=n("span",{class:"font-semibold"},"Rename",-1))])]),footer:i(()=>[n("div",Je,[l(t,{color:"neutral",variant:"ghost",onClick:e[7]||(e[7]=s=>u.value=!1)},{default:i(()=>[...e[18]||(e[18]=[P(" Cancel ",-1)])]),_:1}),l(t,{onClick:b},{default:i(()=>[...e[19]||(e[19]=[P(" Rename ",-1)])]),_:1})])]),default:i(()=>[l(a,{modelValue:o(m),"onUpdate:modelValue":e[6]||(e[6]=s=>B(m)?m.value=s:null),placeholder:"new-name",autofocus:"",onKeyup:ie(b,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),l($,{open:f.value,"onUpdate:open":e[10]||(e[10]=s=>f.value=s)},{content:i(()=>[l(r,null,{header:i(()=>[n("div",et,[l(T,{name:"i-lucide-trash-2",class:"size-5"}),e[20]||(e[20]=n("span",{class:"font-semibold"},"Delete",-1))])]),footer:i(()=>[n("div",at,[l(t,{color:"neutral",variant:"ghost",onClick:e[9]||(e[9]=s=>f.value=!1)},{default:i(()=>[...e[23]||(e[23]=[P(" Cancel ",-1)])]),_:1}),l(t,{color:"error",onClick:q},{default:i(()=>[...e[24]||(e[24]=[P(" Delete ",-1)])]),_:1})])]),default:i(()=>[n("p",null,[e[21]||(e[21]=P(" Are you sure you want to delete ",-1)),n("strong",null,Q(d.contextTarget?.label),1),e[22]||(e[22]=P("? ",-1))]),d.contextTarget?.type==="directory"?(F(),z("p",tt," This will delete all files and folders inside. ")):H("",!0)]),_:1})]),_:1},8,["open"])],64)}}}),ot=Object.assign(lt,{__name:"FilesFileTreeModals"});function nt(){const d=x([]),v=x(null),c=x(!1),h=x(null),u=x("");function f(a,t=!1){const r=a.type==="directory"?void 0:w(a.name);return{id:a.path,label:a.name,icon:r,path:a.path,type:a.type,defaultExpanded:t,children:a.children?.map($=>f($))}}function w(a){switch(a.split(".").pop()?.toLowerCase()){case"md":return"i-lucide-file-text";case"ts":case"tsx":return"i-lucide-file-code";case"js":case"jsx":return"i-lucide-file-code";case"vue":return"i-lucide-file-code";case"json":return"i-lucide-file-json";case"css":case"scss":return"i-lucide-file-code";case"png":case"jpg":case"jpeg":case"gif":case"svg":return"i-lucide-file-image";default:return"i-lucide-file"}}async function y(a="/"){c.value=!0,h.value=null;try{const t=await $fetch("/api/fs/list",{query:{path:a,recursive:"true"}});d.value=t.data.map(r=>f(r,!0))}catch(t){h.value="Failed to load file tree",console.error("Failed to load file tree:",t)}finally{c.value=!1}}async function m(a){try{return(await $fetch("/api/fs/read",{method:"POST",body:{path:a}})).data}catch(t){throw console.error("Failed to read file:",t),t}}async function U(a,t){try{return(await $fetch("/api/fs/write",{method:"POST",body:{path:a,content:t}})).data}catch(r){throw console.error("Failed to write file:",r),r}}async function D(a,t){const r=a==="/"?`/${t}`:`${a}/${t}`;return await U(r,""),await y(),r}async function b(a,t){const r=a==="/"?`/${t}`:`${a}/${t}`;try{return await $fetch("/api/fs/mkdir",{method:"POST",body:{path:r}}),await y(),r}catch($){throw console.error("Failed to create folder:",$),$}}async function q(a,t){const r=a.split("/");r.pop();const $=[...r,t].join("/");try{return await $fetch("/api/fs/rename",{method:"POST",body:{oldPath:a,newPath:$}}),await y(),$}catch(s){throw console.error("Failed to rename:",s),s}}async function _(a){try{await $fetch("/api/fs/delete",{method:"POST",body:{path:a}}),v.value===a&&(v.value=null),await y()}catch(t){throw console.error("Failed to delete:",t),t}}async function e(a,t){try{const r=await $fetch("/api/fs/move",{method:"POST",body:{sourcePath:a,destinationPath:t}});return await y(),r.data.newPath}catch(r){throw console.error("Failed to move:",r),r}}const T=M(()=>{if(!u.value)return d.value;const a=u.value.toLowerCase();function t(r){return r.reduce(($,s)=>{const I=s.label.toLowerCase().includes(a),V=s.children?t(s.children):[];return(I||V.length>0)&&$.push({...s,children:V.length>0?V:s.children,defaultExpanded:V.length>0||I}),$},[])}return t(d.value)});return{items:d,filteredItems:T,selectedFile:v,loading:c,error:h,searchQuery:u,loadTree:y,readFile:m,writeFile:U,createFile:D,createFolder:b,renameItem:q,deleteItem:_,moveItem:e}}const st={class:"h-full flex flex-col"},it={class:"-mt-1 pb-2"},dt={key:0,class:"flex items-center justify-center py-8"},rt={key:1,class:"h-full min-h-32 flex flex-col items-center justify-center text-dimmed text-sm"},ut=["onContextmenu","onDragstart","onDragover","onDrop"],ct={class:"truncate"},mt=G({__name:"FileTree",emits:["select"],setup(d,{emit:v}){const c=v,{filteredItems:h,selectedFile:u,loading:f,searchQuery:w,loadTree:y,createFile:m,createFolder:U,renameItem:D,deleteItem:b,moveItem:q}=nt(),_=x(null),e=x(null);function T(k,p){_.value=p,k.dataTransfer&&(k.dataTransfer.effectAllowed="move",k.dataTransfer.setData("text/plain",p.path))}function a(k,p){_.value&&p.type==="directory"&&_.value.path!==p.path&&(p.path.startsWith(_.value.path+"/")||(k.preventDefault(),e.value=p))}function t(){e.value=null}function r(){_.value=null,e.value=null}async function $(k,p){if(k.preventDefault(),!(!_.value||p.type!=="directory")){try{await q(_.value.path,p.path)}catch{}_.value=null,e.value=null}}const s=x(null),I=x(!1),V=x(!1),E=x(!1),N=x(!1),A=M(()=>[[{label:"New File",icon:"i-lucide-file-plus",onSelect:()=>{I.value=!0}},{label:"New Folder",icon:"i-lucide-folder-plus",onSelect:()=>{V.value=!0}}],[{label:"Rename",icon:"i-lucide-pencil",onSelect:()=>{s.value&&(E.value=!0)}},{label:"Delete",icon:"i-lucide-trash-2",color:"error",onSelect:()=>{N.value=!0}}]]);function W(k){k.type==="file"&&(u.value=k.path,c("select",k.path))}async function ee(k){const p=s.value?.type==="directory"?s.value.path:"/";let R=k;R.includes(".")||(R+=".md");try{const K=await m(p,R);u.value=K,c("select",K)}catch{}}async function X(k){const p=s.value?.type==="directory"?s.value.path:"/";try{await U(p,k)}catch{}}async function S(k){if(s.value)try{await D(s.value.path,k)}catch{}}async function C(){if(s.value)try{await b(s.value.path)}catch{}}return de(()=>{y()}),(k,p)=>{const R=me,K=ve,L=J,le=Fe,oe=De,ne=ot;return F(),z("div",st,[n("div",it,[l(R,{modelValue:o(w),"onUpdate:modelValue":p[0]||(p[0]=g=>B(w)?w.value=g:null),placeholder:"Search files...",icon:"i-lucide-search",size:"sm",class:"w-full"},null,8,["modelValue"])]),l(K,{class:"mt-2"}),l(oe,{items:o(A),class:"flex-1 h-full overflow-auto p-2",onContextmenu:p[2]||(p[2]=g=>s.value=null)},{default:i(()=>[o(f)?(F(),z("div",dt,[l(L,{name:"i-lucide-loader-2",class:"size-6 animate-spin text-dimmed"})])):o(h).length===0?(F(),z("div",rt,[l(L,{name:"i-lucide-folder-open",class:"size-8 mx-auto mb-2 opacity-50"}),p[7]||(p[7]=n("p",null,"No files found",-1)),p[8]||(p[8]=n("p",{class:"text-xs mt-1"}," Right-click to create a file ",-1))])):(F(),O(le,{key:2,items:o(h),"get-key":g=>g.id,color:"primary","expanded-icon":"i-lucide-folder-open","collapsed-icon":"i-lucide-folder",onSelect:p[1]||(p[1]=(g,Y)=>W(Y))},{item:i(({item:g,expanded:Y})=>[n("div",{class:Z(["flex items-center gap-2 w-full",{"bg-primary/10 rounded":o(e)?.path===g.path}]),draggable:"true",onContextmenu:j=>s.value=g,onDragstart:j=>T(j,g),onDragover:j=>a(j,g),onDragleave:t,onDragend:r,onDrop:j=>$(j,g)},[g.children?.length?(F(),O(L,{key:0,name:Y?"i-lucide-folder-open":"i-lucide-folder",class:"size-4 shrink-0 text-dimmed"},null,8,["name"])):g.icon?(F(),O(L,{key:1,name:g.icon,class:"size-4 shrink-0 text-dimmed"},null,8,["name"])):(F(),O(L,{key:2,name:"i-lucide-file",class:"size-4 shrink-0 text-dimmed"})),n("span",ct,Q(g.label),1)],42,ut)]),_:1},8,["items","get-key"]))]),_:1},8,["items"]),l(ne,{"show-new-file":o(I),"onUpdate:showNewFile":p[3]||(p[3]=g=>B(I)?I.value=g:null),"show-new-folder":o(V),"onUpdate:showNewFolder":p[4]||(p[4]=g=>B(V)?V.value=g:null),"show-rename":o(E),"onUpdate:showRename":p[5]||(p[5]=g=>B(E)?E.value=g:null),"show-delete":o(N),"onUpdate:showDelete":p[6]||(p[6]=g=>B(N)?N.value=g:null),"context-target":o(s),onCreateFile:ee,onCreateFolder:X,onRename:S,onDelete:C},null,8,["show-new-file","show-new-folder","show-rename","show-delete","context-target"])])}}}),pt=Object.assign(mt,{__name:"FilesFileTree"}),ft={base:"hidden lg:flex",variants:{side:{left:"",right:""}}},vt={__name:"UDashboardSidebarCollapse",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"},side:{type:String,required:!1,default:"left"},label:{type:String,required:!1},activeColor:{type:null,required:!1},activeVariant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},block:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},as:{type:null,required:!1},type:{type:null,required:!1},disabled:{type:Boolean,required:!1},exactActiveClass:{type:String,required:!1},viewTransition:{type:Boolean,required:!1}},setup(d){const v=d,c=he(_e(v,"icon","side","class")),{t:h}=we(),u=be(),{sidebarCollapsed:f,collapseSidebar:w}=je({sidebarCollapsed:x(!1),collapseSidebar:()=>{}}),y=M(()=>ue({extend:ue(ft),...u.ui?.dashboardSidebarCollapse||{}}));return(m,U)=>(F(),O(ae,ge({...o(c),icon:v.icon||(o(f)?o(u).ui.icons.panelOpen:o(u).ui.icons.panelClose),"aria-label":o(f)?o(h)("dashboardSidebarCollapse.expand"):o(h)("dashboardSidebarCollapse.collapse"),...m.$attrs},{class:y.value({class:v.class,side:v.side}),onClick:U[0]||(U[0]=D=>o(w)?.(!o(f)))}),null,16,["class"]))}},yt={class:"border-b border-default px-4 py-3 bg-elevated/50"},ht={class:"flex flex-wrap items-start gap-3"},_t={class:"flex items-start gap-2 py-0.5"},wt={class:"min-w-0"},bt={class:"font-medium"},gt={class:"text-xs text-dimmed truncate"},xt=G({__name:"DocumentMetadata",props:{metadata:{},projects:{}},emits:["update:metadata"],setup(d,{emit:v}){const c=d,h=v,u=[{label:"Hidden",value:"hidden",icon:"i-lucide-lock",description:"Hidden behind authentication and never viewable by the public"},{label:"Private",value:"private",icon:"i-lucide-eye-off",description:"Viewable by anyone with the link, but will not be indexed by search engines"},{label:"Public",value:"public",icon:"i-lucide-eye",description:"Viewable to the public and indexed by search engines"}],f=M(()=>c.metadata.shared?c.metadata.shareType||"private":"hidden"),w=M(()=>u.find(b=>b.value===f.value)),y=M({get:()=>c.metadata.tags||[],set:b=>h("update:metadata",{tags:b})});function m(b){h("update:metadata",{projectId:b||void 0})}function U(b){b==="hidden"?h("update:metadata",{shared:!1,shareType:void 0}):h("update:metadata",{shared:!0,shareType:b})}const D=M(()=>[{label:"None",value:void 0},...c.projects.map(b=>({label:b.name,value:b.id}))]);return(b,q)=>{const _=Ie,e=Ne,T=J,a=ze;return F(),z("div",yt,[n("div",ht,[l(e,{label:"Project",class:"w-40"},{default:i(()=>[l(_,{"model-value":d.metadata.projectId,items:o(D),"value-key":"value",placeholder:"None",class:"w-full","search-input":!1,"onUpdate:modelValue":m},null,8,["model-value","items"])]),_:1}),l(e,{label:"Visibility",class:"w-44"},{default:i(()=>[l(_,{"model-value":o(f),items:u,"value-key":"value",class:"w-full","search-input":!1,"onUpdate:modelValue":U},{leading:i(()=>[o(w)?(F(),O(T,{key:0,name:o(w).icon,class:"size-4 text-dimmed"},null,8,["name"])):H("",!0)]),item:i(({item:t})=>[n("div",_t,[l(T,{name:t.icon,class:"size-4 mt-0.5 shrink-0"},null,8,["name"]),n("div",wt,[n("div",bt,Q(t.label),1),n("div",gt,Q(t.description),1)])])]),_:1},8,["model-value"])]),_:1}),l(e,{label:"Tags",class:"flex-1 min-w-48"},{default:i(()=>[l(a,{modelValue:o(y),"onUpdate:modelValue":q[0]||(q[0]=t=>B(y)?y.value=t:null),placeholder:"Add tags...",class:"w-full"},null,8,["modelValue"])]),_:1})])])}}}),kt=Object.assign(xt,{__name:"EditorDocumentMetadata"}),$t=Ee(Re),Ct={class:"h-full flex flex-col"},Ft={class:"border-b border-default py-2 flex items-center justify-between"},Dt={class:"flex items-center gap-2 text-sm text-dimmed min-w-0"},Ut={class:"truncate"},Tt={key:0,class:"w-40"},St={class:"flex items-center gap-3"},jt={key:0,class:"flex items-center gap-1 text-sm text-dimmed"},Mt={class:"space-y-4"},qt={class:"flex items-center gap-3"},Vt={class:"flex items-center gap-3"},It={class:"flex items-center gap-3"},Nt=G({__name:"DocumentEditor",props:{document:{},body:{},metadata:{},filePath:{},saveStatus:{},isDirty:{type:Boolean},metadataDirty:{type:Boolean}},emits:["update:body","update:metadata","save"],async setup(d,{emit:v}){let c,h;const u=d,f=v,{data:w}=([c,h]=xe(()=>Qe("/api/projects","$c96-63t_ij")),c=await c,h(),c),y=M(()=>w.value?.data||[]),m=x(!0),{editorMode:U}=fe(),D=M({get:()=>U.value==="editor",set:S=>U.value=S?"editor":"code"}),b=M(()=>u.document.fileType==="markdown"||Le(u.filePath)),q=M(()=>Ae(u.filePath)),_=M(()=>b.value),e=[[{kind:"heading",level:1,icon:"i-lucide-heading-1"},{kind:"heading",level:2,icon:"i-lucide-heading-2"},{kind:"heading",level:3,icon:"i-lucide-heading-3"}],[{kind:"mark",mark:"bold",icon:"i-lucide-bold"},{kind:"mark",mark:"italic",icon:"i-lucide-italic"},{kind:"mark",mark:"code",icon:"i-lucide-code"}],[{kind:"bulletList",icon:"i-lucide-list"},{kind:"orderedList",icon:"i-lucide-list-ordered"},{kind:"blockquote",icon:"i-lucide-quote"}],[{kind:"link",icon:"i-lucide-link"},{kind:"codeBlock",icon:"i-lucide-file-code"},{kind:"horizontalRule",icon:"i-lucide-minus"}],[{kind:"undo",icon:"i-lucide-undo"},{kind:"redo",icon:"i-lucide-redo"}]],T=M(()=>{switch(u.saveStatus){case"saving":return"i-lucide-loader-2";case"saved":return"i-lucide-check";case"error":return"i-lucide-alert-circle";default:return u.isDirty||u.metadataDirty?"i-lucide-circle-dot":null}}),a=M(()=>{switch(u.saveStatus){case"saving":return"Saving...";case"saved":return"Saved";case"error":return"Error saving";default:return u.isDirty||u.metadataDirty?"Unsaved changes":""}}),t=M(()=>u.body||void 0);function r(S){f("update:body",S)}function $(S){f("update:metadata",S)}function s(S){(S.metaKey||S.ctrlKey)&&S.key==="s"&&(S.preventDefault(),f("save"))}de(()=>window.addEventListener("keydown",s)),ke(()=>window.removeEventListener("keydown",s));const I=$e(),V=M(()=>u.document?.id?`${window.location.origin}/view/${u.document.id}`:""),E=x(!1),N=x(!1);function A(){u.metadata.shared?ee():N.value=!0}const{copy:W}=He();async function ee(){await W(V.value)?(E.value=!0,I.add({title:"Link copied!",icon:"i-lucide-check",color:"success"}),setTimeout(()=>{E.value=!1},2e3)):I.add({title:"Failed to copy link",icon:"i-lucide-x",color:"error"})}function X(S,C){f("update:metadata",{shared:S,shareType:C??void 0}),N.value=!1,S&&setTimeout(()=>ee(),100)}return(S,C)=>{const k=J,p=Ve,R=ae,K=kt,L=Pe,le=Be,oe=$t,ne=Ke,g=Oe,Y=pe;return F(),z("div",Ct,[n("div",Ft,[n("div",Dt,[l(k,{name:"i-lucide-file-text",class:"size-4 shrink-0"}),n("span",Ut,Q(d.filePath),1)]),o(_)?(F(),z("div",Tt,[l(p,{modelValue:o(D),"onUpdate:modelValue":C[0]||(C[0]=j=>B(D)?D.value=j:null),"unchecked-icon":"i-lucide-code","checked-icon":"i-lucide-pencil",label:o(D)?"Editor Mode":"Code Mode",ui:{base:"data-[state=unchecked]:bg-info",icon:"group-data-[state=unchecked]:text-info"}},null,8,["modelValue","label"])])):H("",!0),n("div",St,[l(R,{icon:o(E)?"i-lucide-check":"i-lucide-share",size:"xs",variant:"ghost",class:"rounded-full",onClick:A},null,8,["icon"]),l(R,{icon:o(m)?"i-lucide-panel-top-close":"i-lucide-panel-top-open",size:"xs",variant:"ghost",class:"rounded-full",onClick:C[1]||(C[1]=j=>m.value=!o(m))},null,8,["icon"]),o(T)?(F(),z("div",jt,[l(k,{name:o(T),class:Z(["size-4",d.saveStatus==="saving"&&"animate-spin",d.saveStatus==="error"&&"text-error"])},null,8,["name","class"]),n("span",null,Q(o(a)),1)])):H("",!0)])]),o(m)?(F(),O(K,{key:0,metadata:d.metadata,projects:o(y),"onUpdate:metadata":$},null,8,["metadata","projects"])):H("",!0),o(b)&&o(D)?(F(),O(le,{key:1,"model-value":o(t),"content-type":"markdown",placeholder:"Start writing...",class:"markdown-editor w-full min-h-64 flex-1","onUpdate:modelValue":r},{default:i(({editor:j})=>[l(L,{editor:j,items:e,class:"border-b border-default"},null,8,["editor"])]),_:1},8,["model-value"])):(F(),O(g,{key:2},{fallback:i(()=>[l(ne,{class:"flex-1"})]),default:i(()=>[l(oe,{"model-value":d.body,language:o(q),class:"flex-1","onUpdate:modelValue":r},null,8,["model-value","language"])]),_:1})),l(Y,{open:o(N),"onUpdate:open":C[5]||(C[5]=j=>B(N)?N.value=j:null),title:"Share Document",description:"Choose how you want to share this document"},{body:i(()=>[n("div",Mt,[n("div",{class:Z(["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors",{"border-primary bg-elevated":!d.metadata.shared}]),onClick:C[2]||(C[2]=j=>X(!1,null))},[n("div",qt,[l(k,{name:"i-lucide-eye-off",class:"size-5 text-dimmed"}),C[6]||(C[6]=n("div",null,[n("div",{class:"font-medium"}," Hidden "),n("div",{class:"text-sm text-dimmed"}," Only you can view this document. Not accessible via link. ")],-1))])],2),n("div",{class:Z(["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors",{"border-primary bg-elevated":d.metadata.shared&&d.metadata.shareType==="private"}]),onClick:C[3]||(C[3]=j=>X(!0,"private"))},[n("div",Vt,[l(k,{name:"i-lucide-link",class:"size-5 text-dimmed"}),C[7]||(C[7]=n("div",null,[n("div",{class:"font-medium"}," Private (Link Only) "),n("div",{class:"text-sm text-dimmed"}," Anyone with the link can view. Not indexed by search engines. ")],-1))])],2),n("div",{class:Z(["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors",{"border-primary bg-elevated":d.metadata.shared&&d.metadata.shareType==="public"}]),onClick:C[4]||(C[4]=j=>X(!0,"public"))},[n("div",It,[l(k,{name:"i-lucide-globe",class:"size-5 text-dimmed"}),C[8]||(C[8]=n("div",null,[n("div",{class:"font-medium"}," Public "),n("div",{class:"text-sm text-dimmed"}," Visible to everyone. Indexed by search engines. ")],-1))])],2)])]),_:1},8,["open"])])}}}),zt=Object.assign(Nt,{__name:"EditorDocumentEditor"});function Pt(){const d=x(null),v=x(null),c=x(""),h=x(null),u=x(!1),f=x("idle"),w=x(!1),y=x(!1),m=ce(async()=>{!d.value||!w.value||await _({body:c.value})},2e3),U=ce(async()=>{!d.value||!y.value||await _()},500);async function D(a){u.value=!0,h.value=a,w.value=!1,y.value=!1,f.value="idle";try{const t=await $fetch("/api/documents/by-path",{method:"POST",body:{path:a}});d.value=t.data.document,v.value=t.data.metadata,c.value=t.data.body||""}catch(t){console.error("Failed to load document:",t),d.value=null,v.value=null,c.value=""}finally{u.value=!1}}function b(a){c.value!==a&&(c.value=a,w.value=!0,m())}function q(a){v.value&&(v.value={...v.value,...a},y.value=!0,U())}async function _(a={}){if(d.value){f.value="saving";try{const t={...a};y.value&&v.value&&(t.title=v.value.title,t.tags=v.value.tags,t.projectId=v.value.projectId,t.shared=v.value.shared,t.shareType=v.value.shareType),w.value&&a.body===void 0&&(t.body=c.value);const r=await $fetch(`/api/documents/${d.value.id}`,{method:"PUT",body:t});d.value=r.data.document,v.value=r.data.metadata,c.value=r.data.body||"",w.value=!1,y.value=!1,f.value="saved",setTimeout(()=>{f.value==="saved"&&(f.value="idle")},2e3)}catch(t){console.error("Failed to save document:",t),f.value="error"}}}async function e(){!w.value&&!y.value||await _({body:c.value})}function T(){d.value=null,v.value=null,c.value="",h.value=null,w.value=!1,y.value=!1,f.value="idle"}return{document:d,metadata:v,body:c,filePath:h,loading:u,saveStatus:f,isDirty:w,metadataDirty:y,loadDocument:D,updateBody:b,updateMetadata:q,saveDocument:_,saveNow:e,closeDocument:T}}const Bt={class:"flex flex-1 min-w-0"},Et={key:0,class:"flex-1 flex items-center justify-center h-full"},Ot={key:1,class:"flex-1 flex items-center justify-center h-full text-dimmed"},Rt={class:"text-center"},za=G({__name:"docs",setup(d){const v=Ce(),{document:c,metadata:h,body:u,filePath:f,loading:w,saveStatus:y,isDirty:m,metadataDirty:U,loadDocument:D,updateBody:b,updateMetadata:q,saveNow:_}=Pt(),{lastDocumentPath:e}=fe();async function T(a){await D(a),e.value=a}return de(async()=>{const a=v.query.path;a?(await D(a),e.value=a):e.value&&await D(e.value)}),(a,t)=>{const r=pt,$=Te,s=vt,I=Me,V=ae,E=qe,N=Se,A=J,W=zt;return F(),z("div",Bt,[l($,{id:"docs-filetree",collapsible:"",resizable:"","min-size":12,"default-size":16,"max-size":24,class:"hidden lg:flex"},{body:i(()=>[l(r,{class:"h-full",onSelect:T})]),_:1}),l($,{id:"docs-editor",grow:"",ui:{body:"sm:py-0"}},{header:i(()=>[l(N,null,{title:i(()=>[l(s),t[0]||(t[0]=P(" Editor ",-1))]),right:i(()=>[l(I),l(E,null,{content:i(()=>[l(r,{class:"h-full",onSelect:T})]),default:i(()=>[l(V,{icon:"i-lucide-folder-tree",class:"block lg:hidden"})]),_:1})]),_:1})]),body:i(()=>[o(w)?(F(),z("div",Et,[l(A,{name:"i-lucide-loader-2",class:"size-6 animate-spin text-dimmed"})])):o(f)?o(h)&&o(c)?(F(),O(W,{key:o(f),document:o(c),body:o(u),metadata:o(h),"file-path":o(f),"save-status":o(y),"is-dirty":o(m),"metadata-dirty":o(U),class:"h-full","onUpdate:body":o(b),"onUpdate:metadata":o(q),onSave:o(_)},null,8,["document","body","metadata","file-path","save-status","is-dirty","metadata-dirty","onUpdate:body","onUpdate:metadata","onSave"])):H("",!0):(F(),z("div",Ot,[n("div",Rt,[l(A,{name:"i-lucide-file-text",class:"size-32 mx-auto mb-4 opacity-50"}),t[1]||(t[1]=n("p",null,"Select a file to edit",-1))])]))]),_:1})])}}});export{za as default};
@@ -1 +1 @@
1
- import{W as l,h as c,M as n,o as p,r as u,$ as i,ap as s}from"./CGgHmnnS.js";const m={base:"list-disc ps-6 my-5 marker:text-(--ui-border-accented)"},_={__name:"ProseUl",props:{class:{type:null,required:!1}},setup(e){const a=e,t=l(),o=c(()=>s({extend:s(m),...t.ui?.prose?.ul||{}}));return(r,d)=>(p(),n("ul",{class:i(o.value({class:a.class}))},[u(r.$slots,"default")],2))}};export{_ as default};
1
+ import{W as l,h as c,M as n,o as p,r as u,$ as i,ap as s}from"./CZT64TBr.js";const m={base:"list-disc ps-6 my-5 marker:text-(--ui-border-accented)"},_={__name:"ProseUl",props:{class:{type:null,required:!1}},setup(e){const a=e,t=l(),o=c(()=>s({extend:s(m),...t.ui?.prose?.ul||{}}));return(r,d)=>(p(),n("ul",{class:i(o.value({class:a.class}))},[u(r.$slots,"default")],2))}};export{_ as default};
@@ -1 +1 @@
1
- import{W as n,h as c,M as i,o as l,r as p,$ as u,ap as s,ab as d,af as m}from"./CGgHmnnS.js";const f={base:"pb-4 text-muted *:first:mt-0 *:last:mb-0 *:my-1.5"},y={__name:"ProseAccordionItem",props:{label:{type:String,required:!0},description:{type:String,required:!1},class:{type:null,required:!1}},setup(e){const t=e,a=n(),r=c(()=>s({extend:s(f),...a.ui?.prose?.accordionItem||{}}));return(o,b)=>(l(),i("div",{class:u(r.value({class:t.class}))},[p(o.$slots,"default",{},()=>[d(m(e.description),1)])],2))}};export{y as default};
1
+ import{W as n,h as c,M as i,o as l,r as p,$ as u,ap as s,ab as d,af as m}from"./CZT64TBr.js";const f={base:"pb-4 text-muted *:first:mt-0 *:last:mb-0 *:my-1.5"},y={__name:"ProseAccordionItem",props:{label:{type:String,required:!0},description:{type:String,required:!1},class:{type:null,required:!1}},setup(e){const t=e,a=n(),r=c(()=>s({extend:s(f),...a.ui?.prose?.accordionItem||{}}));return(o,b)=>(l(),i("div",{class:u(r.value({class:t.class}))},[p(o.$slots,"default",{},()=>[d(m(e.description),1)])],2))}};export{y as default};
@@ -1,4 +1,4 @@
1
- import{h as R,a as x,s as _,f as z,aK as k,bd as C}from"./CGgHmnnS.js";function w(r,l,e){let s=e.initialDeps??[],t,n=!0;function o(){var i,h,u;let c;e.key&&((i=e.debug)!=null&&i.call(e))&&(c=Date.now());const d=r();if(!(d.length!==s.length||d.some((g,f)=>s[f]!==g)))return t;s=d;let m;if(e.key&&((h=e.debug)!=null&&h.call(e))&&(m=Date.now()),t=l(...d),e.key&&((u=e.debug)!=null&&u.call(e))){const g=Math.round((Date.now()-c)*100)/100,f=Math.round((Date.now()-m)*100)/100,b=f/16,S=(p,M)=>{for(p=String(p);p.length<M;)p=" "+p;return p};console.info(`%c⏱ ${S(f,5)} /${S(g,5)} ms`,`
1
+ import{h as R,a as x,s as _,f as z,aK as k,bd as C}from"./CZT64TBr.js";function w(r,l,e){let s=e.initialDeps??[],t,n=!0;function o(){var i,h,u;let c;e.key&&((i=e.debug)!=null&&i.call(e))&&(c=Date.now());const d=r();if(!(d.length!==s.length||d.some((g,f)=>s[f]!==g)))return t;s=d;let m;if(e.key&&((h=e.debug)!=null&&h.call(e))&&(m=Date.now()),t=l(...d),e.key&&((u=e.debug)!=null&&u.call(e))){const g=Math.round((Date.now()-c)*100)/100,f=Math.round((Date.now()-m)*100)/100,b=f/16,S=(p,M)=>{for(p=String(p);p.length<M;)p=" "+p;return p};console.info(`%c⏱ ${S(f,5)} /${S(g,5)} ms`,`
2
2
  font-size: .6rem;
3
3
  font-weight: bold;
4
4
  color: hsl(${Math.max(0,Math.min(120-120*b,120))}deg 100% 31%);`,e?.key)}return e?.onChange&&!(n&&e.skipInitialOnChange)&&e.onChange(t),n=!1,t}return o.updateDeps=i=>{s=i},o}function E(r,l){if(r===void 0)throw new Error("Unexpected undefined");return r}const T=(r,l)=>Math.abs(r-l)<1.01,D=(r,l,e)=>{let s;return function(...t){r.clearTimeout(s),s=r.setTimeout(()=>l.apply(this,t),e)}},O=r=>{const{offsetWidth:l,offsetHeight:e}=r;return{width:l,height:e}},W=r=>r,L=r=>{const l=Math.max(r.startIndex-r.overscan,0),e=Math.min(r.endIndex+r.overscan,r.count-1),s=[];for(let t=l;t<=e;t++)s.push(t);return s},j=(r,l)=>{const e=r.scrollElement;if(!e)return;const s=r.targetWindow;if(!s)return;const t=o=>{const{width:i,height:h}=o;l({width:Math.round(i),height:Math.round(h)})};if(t(O(e)),!s.ResizeObserver)return()=>{};const n=new s.ResizeObserver(o=>{const i=()=>{const h=o[0];if(h?.borderBoxSize){const u=h.borderBoxSize[0];if(u){t({width:u.inlineSize,height:u.blockSize});return}}t(O(e))};r.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return n.observe(e,{box:"border-box"}),()=>{n.unobserve(e)}},I={passive:!0},A=typeof window>"u"?!0:"onscrollend"in window,P=(r,l)=>{const e=r.scrollElement;if(!e)return;const s=r.targetWindow;if(!s)return;let t=0;const n=r.options.useScrollendEvent&&A?()=>{}:D(s,()=>{l(t,!1)},r.options.isScrollingResetDelay),o=c=>()=>{const{horizontal:d,isRtl:a}=r.options;t=d?e.scrollLeft*(a&&-1||1):e.scrollTop,n(),l(t,c)},i=o(!0),h=o(!1);h(),e.addEventListener("scroll",i,I);const u=r.options.useScrollendEvent&&A;return u&&e.addEventListener("scrollend",h,I),()=>{e.removeEventListener("scroll",i),u&&e.removeEventListener("scrollend",h)}},B=(r,l,e)=>{if(l?.borderBoxSize){const s=l.borderBoxSize[0];if(s)return Math.round(s[e.options.horizontal?"inlineSize":"blockSize"])}return r[e.options.horizontal?"offsetWidth":"offsetHeight"]},V=(r,{adjustments:l=0,behavior:e},s)=>{var t,n;const o=r+l;(n=(t=s.scrollElement)==null?void 0:t.scrollTo)==null||n.call(t,{[s.options.horizontal?"left":"top"]:o,behavior:e})};class N{constructor(l){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const s=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(t=>{t.forEach(n=>{const o=()=>{this._measureElement(n.target,n)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var t;(t=s())==null||t.disconnect(),e=null},observe:t=>{var n;return(n=s())==null?void 0:n.observe(t,{box:"border-box"})},unobserve:t=>{var n;return(n=s())==null?void 0:n.unobserve(t)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([s,t])=>{typeof t>"u"&&delete e[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:W,rangeExtractor:L,onChange:()=>{},measureElement:B,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var s,t;(t=(s=this.options).onChange)==null||t.call(s,this,e)},this.maybeNotify=w(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(t=>{this.observer.observe(t)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,t=>{this.scrollRect=t,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(t,n)=>{this.scrollAdjustments=0,this.scrollDirection=n?this.getScrollOffset()<t?"forward":"backward":null,this.scrollOffset=t,this.isScrolling=n,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,s)=>{const t=new Map,n=new Map;for(let o=s-1;o>=0;o--){const i=e[o];if(t.has(i.lane))continue;const h=n.get(i.lane);if(h==null||i.end>h.end?n.set(i.lane,i):i.end<h.end&&t.set(i.lane,!0),t.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort((o,i)=>o.end===i.end?o.index-i.index:o.end-i.end)[0]:void 0},this.getMeasurementOptions=w(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,s,t,n,o,i)=>(this.prevLanes!==void 0&&this.prevLanes!==i&&(this.lanesChangedFlag=!0),this.prevLanes=i,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:s,scrollMargin:t,getItemKey:n,enabled:o,lanes:i}),{key:!1,skipInitialOnChange:!0,onChange:()=>{this.notify(this.isScrolling)}}),this.getMeasurements=w(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:s,scrollMargin:t,getItemKey:n,enabled:o,lanes:i},h)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(const a of this.laneAssignments.keys())a>=e&&this.laneAssignments.delete(a);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(a=>{this.itemSizeCache.set(a.key,a.size)}));const u=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);const c=this.measurementsCache.slice(0,u),d=new Array(i).fill(void 0);for(let a=0;a<u;a++){const m=c[a];m&&(d[m.lane]=a)}for(let a=u;a<e;a++){const m=n(a),g=this.laneAssignments.get(a);let f,b;if(g!==void 0&&this.options.lanes>1){f=g;const v=d[f],y=v!==void 0?c[v]:void 0;b=y?y.end+this.options.gap:s+t}else{const v=this.options.lanes===1?c[a-1]:this.getFurthestMeasurement(c,a);b=v?v.end+this.options.gap:s+t,f=v?v.lane:a%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(a,f)}const S=h.get(m),p=typeof S=="number"?S:this.options.estimateSize(a),M=b+p;c[a]={index:a,start:b,size:p,end:M,key:m,lane:f},d[f]=a}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=w(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,s,t,n)=>this.range=e.length>0&&s>0?$({measurements:e,outerSize:s,scrollOffset:t,lanes:n}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=w(()=>{let e=null,s=null;const t=this.calculateRange();return t&&(e=t.startIndex,s=t.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,s]},(e,s,t,n,o)=>n===null||o===null?[]:e({startIndex:n,endIndex:o,overscan:s,count:t}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const s=this.options.indexAttribute,t=e.getAttribute(s);return t?parseInt(t,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(e,s)=>{const t=this.indexFromElement(e),n=this.measurementsCache[t];if(!n)return;const o=n.key,i=this.elementsCache.get(o);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(o,e)),e.isConnected&&this.resizeItem(t,this.options.measureElement(e,s,this))},this.resizeItem=(e,s)=>{const t=this.measurementsCache[e];if(!t)return;const n=this.itemSizeCache.get(t.key)??t.size,o=s-n;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(t,o,this):t.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(t.index),this.itemSizeCache=new Map(this.itemSizeCache.set(t.key,s)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((s,t)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(t))});return}this._measureElement(e,void 0)},this.getVirtualItems=w(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,s)=>{const t=[];for(let n=0,o=e.length;n<o;n++){const i=e[n],h=s[i];t.push(h)}return t},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const s=this.getMeasurements();if(s.length!==0)return E(s[F(0,s.length-1,t=>E(s[t]).start,e)])},this.getOffsetForAlignment=(e,s,t=0)=>{const n=this.getSize(),o=this.getScrollOffset();s==="auto"&&(s=e>=o+n?"end":"start"),s==="center"?e+=(t-n)/2:s==="end"&&(e-=n);const i=this.getTotalSize()+this.options.scrollMargin-n;return Math.max(Math.min(i,e),0)},this.getOffsetForIndex=(e,s="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const t=this.measurementsCache[e];if(!t)return;const n=this.getSize(),o=this.getScrollOffset();if(s==="auto")if(t.end>=o+n-this.options.scrollPaddingEnd)s="end";else if(t.start<=o+this.options.scrollPaddingStart)s="start";else return[o,s];const i=s==="end"?t.end+this.options.scrollPaddingEnd:t.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,s,t.size),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:s="start",behavior:t}={})=>{t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,s),{adjustments:void 0,behavior:t})},this.scrollToIndex=(e,{align:s="auto",behavior:t}={})=>{t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1));let n=0;const o=10,i=u=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(e,u);if(!c){console.warn("Failed to get offset for index:",e);return}const[d,a]=c;this._scrollToOffset(d,{adjustments:void 0,behavior:t}),this.targetWindow.requestAnimationFrame(()=>{const m=this.getScrollOffset(),g=this.getOffsetForIndex(e,a);if(!g){console.warn("Failed to get offset for index:",e);return}T(g[0],m)||h(a)})},h=u=>{this.targetWindow&&(n++,n<o?this.targetWindow.requestAnimationFrame(()=>i(u)):console.warn(`Failed to scroll to index ${e} after ${o} attempts.`))};i(s)},this.scrollBy=(e,{behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var e;const s=this.getMeasurements();let t;if(s.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=((e=s[s.length-1])==null?void 0:e.end)??0;else{const n=Array(this.options.lanes).fill(null);let o=s.length-1;for(;o>=0&&n.some(i=>i===null);){const i=s[o];n[i.lane]===null&&(n[i.lane]=i.end),o--}t=Math.max(...n.filter(i=>i!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:s,behavior:t})=>{this.options.scrollToFn(e,{behavior:t,adjustments:s},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(l)}}const F=(r,l,e,s)=>{for(;r<=l;){const t=(r+l)/2|0,n=e(t);if(n<s)r=t+1;else if(n>s)l=t-1;else return t}return r>0?r-1:0};function $({measurements:r,outerSize:l,scrollOffset:e,lanes:s}){const t=r.length-1,n=h=>r[h].start;if(r.length<=s)return{startIndex:0,endIndex:t};let o=F(0,t,n,e),i=o;if(s===1)for(;i<t&&r[i].end<e+l;)i++;else if(s>1){const h=Array(s).fill(0);for(;i<t&&h.some(c=>c<e+l);){const c=r[i];h[c.lane]=c.end,i++}const u=Array(s).fill(e+l);for(;o>=0&&u.some(c=>c>=e);){const c=r[o];u[c.lane]=c.start,o--}o=Math.max(0,o-o%s),i=Math.min(t,i+(s-1-i%s))}return{startIndex:o,endIndex:i}}function q(r){const l=new N(x(r)),e=_(l),s=l._didMount();return z(()=>x(r).getScrollElement(),t=>{t&&l._willUpdate()},{immediate:!0}),z(()=>x(r),t=>{l.setOptions({...t,onChange:(n,o)=>{var i;C(e),(i=t.onChange)==null||i.call(t,n,o)}}),l._willUpdate(),C(e)},{immediate:!0}),k(s),e}function H(r){return q(R(()=>({observeElementRect:j,observeElementOffset:P,scrollToFn:V,...x(r)})))}export{H as u};
@@ -1 +1 @@
1
- import{ae as s,M as a,o as i,ac as t,af as n,Z as u,w as c,ab as l,ag as d}from"./CGgHmnnS.js";import{_ as f}from"./DlAUqK2U.js";const p={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},m={class:"max-w-520px text-center"},h=["textContent"],g=["textContent"],b=["textContent"],x={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(e){const r=e;return s({title:`${r.statusCode} - ${r.statusMessage} | ${r.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(k,w)=>{const o=d;return i(),a("div",p,[t("div",m,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:n(e.statusCode)},null,8,h),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:n(e.statusMessage)},null,8,g),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:n(e.description)},null,8,b),t("div",x,[u(o,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:c(()=>[l(n(e.backHome),1)]),_:1})])])])}}},v=f(y,[["__scopeId","data-v-8f98a97f"]]);export{v as default};
1
+ import{ae as s,M as a,o as i,ac as t,af as n,Z as u,w as c,ab as l,ag as d}from"./CZT64TBr.js";import{_ as f}from"./DlAUqK2U.js";const p={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},m={class:"max-w-520px text-center"},h=["textContent"],g=["textContent"],b=["textContent"],x={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(e){const r=e;return s({title:`${r.statusCode} - ${r.statusMessage} | ${r.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(k,w)=>{const o=d;return i(),a("div",p,[t("div",m,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:n(e.statusCode)},null,8,h),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:n(e.statusMessage)},null,8,g),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:n(e.description)},null,8,b),t("div",x,[u(o,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:c(()=>[l(n(e.backHome),1)]),_:1})])])])}}},v=f(y,[["__scopeId","data-v-8f98a97f"]]);export{v as default};