@acedatacloud/nexior 3.353.4 → 3.353.5

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 (246) hide show
  1. package/dist/assets/{ApiCodeButton-BoYfR8v5.js → ApiCodeButton-Bt2k7qL8.js} +1 -1
  2. package/dist/assets/{Artifacts-D2nQo4tU.js → Artifacts-Cqhmxp4e.js} +1 -1
  3. package/dist/assets/{AskUserQuestionCard-roLNRaCn.js → AskUserQuestionCard-DdoOZ2Ta.js} +1 -1
  4. package/dist/assets/{Auth-K5YCbBk2.js → Auth-pNw9duS9.js} +1 -1
  5. package/dist/assets/{Bare-D5W9OqtC.js → Bare-Bco3pzBz.js} +1 -1
  6. package/dist/assets/{BotPlaceholder-C42Ymqvl.js → BotPlaceholder-CLTY9lhO.js} +1 -1
  7. package/dist/assets/{BottomFooter-wiCnN85k.js → BottomFooter-GfpwQLyY.js} +1 -1
  8. package/dist/assets/{BrowserPairingDialog--ujU3DsW.js → BrowserPairingDialog-D9AFwEep.js} +1 -1
  9. package/dist/assets/{Callback-COmMgA5x.js → Callback-BIM4i4cD.js} +1 -1
  10. package/dist/assets/{CodeSnippet-CHGLu7DJ.js → CodeSnippet-CPyHsuDv.js} +1 -1
  11. package/dist/assets/{Console-L7JJpzyh.js → Console-DEZj6CBu.js} +1 -1
  12. package/dist/assets/{Consumption-DGykzGxC.js → Consumption-BkShIJXX.js} +1 -1
  13. package/dist/assets/{Conversation-dOY7hKiQ.js → Conversation-CxA6bbIh.js} +1 -1
  14. package/dist/assets/{Conversation-DLC9y3KR.js → Conversation-D4A5nEr4.js} +1 -1
  15. package/dist/assets/{CopyToClipboard-CP5bh5uq.js → CopyToClipboard-HUYQps1a.js} +1 -1
  16. package/dist/assets/{Detail-CttCSTZq.js → Detail-_-ssDhS-.js} +2 -2
  17. package/dist/assets/{Extra-bL5dtE9Y.js → Extra-2FyfG6no.js} +1 -1
  18. package/dist/assets/{FilePreview-BaSJGB_a.js → FilePreview-DtqMmBrf.js} +1 -1
  19. package/dist/assets/{Hailuo-ClFOkALJ.js → Hailuo-DVaAIR4Q.js} +1 -1
  20. package/dist/assets/{History-7TfR3bG5.js → History-Bjfox_rn.js} +1 -1
  21. package/dist/assets/{ImagePreview-fQJvI010.js → ImagePreview-B_7eKC5t.js} +1 -1
  22. package/dist/assets/{ImageWrapper-COWOs7PX.js → ImageWrapper-DkGrmpJ2.js} +1 -1
  23. package/dist/assets/{Index-CUq80NZF.js → Index-0fnmfVt6.js} +1 -1
  24. package/dist/assets/{Index-Bbk1rAHB.js → Index-9HUf2OYl.js} +1 -1
  25. package/dist/assets/{Index-CpsA-lJv.js → Index-B9QjKvPO.js} +1 -1
  26. package/dist/assets/{Index-D6G3PR4-.js → Index-BMYAOwhj.js} +1 -1
  27. package/dist/assets/{Index-BwkDhmFE.js → Index-BPCyhYqk.js} +1 -1
  28. package/dist/assets/{Index-CCx7gQCe.js → Index-BeGdRrM4.js} +1 -1
  29. package/dist/assets/{Index-iostdk_R2.js → Index-Boo4hYGk2.js} +1 -1
  30. package/dist/assets/{Index-d_eDrmfZ.js → Index-BpxUhul5.js} +1 -1
  31. package/dist/assets/{Index-CZ2oBBT8.js → Index-C11O8wOi.js} +1 -1
  32. package/dist/assets/{Index-DGM5e4rY.js → Index-CBh6sUTH.js} +1 -1
  33. package/dist/assets/{Index-C4OVnYCq.js → Index-CElfbOG8.js} +1 -1
  34. package/dist/assets/{Index-Ds_JOOxL2.js → Index-CHFzFGIx2.js} +1 -1
  35. package/dist/assets/{Index-B1vWOtER.js → Index-CJypu9AE.js} +1 -1
  36. package/dist/assets/{Index-D5Cd1PAJ.js → Index-CMblO9so.js} +1 -1
  37. package/dist/assets/{Index-DkNslpYz.js → Index-CaAXVaTT.js} +1 -1
  38. package/dist/assets/{Index-D77J8iuo.js → Index-CgpQL5o3.js} +1 -1
  39. package/dist/assets/{Index-DKqcW8gN2.js → Index-CpEQvmfl2.js} +1 -1
  40. package/dist/assets/{Index-Ck-MtsAt.js → Index-CuDaFJOM.js} +1 -1
  41. package/dist/assets/{Index-HzUGw1Yb.js → Index-D4KTrLTx.js} +1 -1
  42. package/dist/assets/{Index-5F7g-4uB2.js → Index-D4gOmTWo2.js} +1 -1
  43. package/dist/assets/{Index-cso7ieUL.js → Index-DG2WpAXA.js} +1 -1
  44. package/dist/assets/{Index-Cf-UjF1D.js → Index-DI3lTpmu.js} +1 -1
  45. package/dist/assets/{Index-CYW7u2JH.js → Index-De7LngSy.js} +1 -1
  46. package/dist/assets/{Index-Cj93EwQM2.js → Index-DwdrNg6r2.js} +1 -1
  47. package/dist/assets/{Index-CcnW93mQ.js → Index-DyK6kaa-.js} +1 -1
  48. package/dist/assets/{Index-DfrL7HHX.js → Index-EnIfVybX.js} +1 -1
  49. package/dist/assets/{Index-DAfPb1VE.js → Index-HBaujZmF.js} +1 -1
  50. package/dist/assets/{Index-Cg_E2kJJ.js → Index-Inzn4kyk.js} +1 -1
  51. package/dist/assets/{Index-tV7YZP-O.js → Index-KHkWn1-R.js} +1 -1
  52. package/dist/assets/{Index-DXlKbIkM.js → Index-R50avzkV.js} +1 -1
  53. package/dist/assets/{Index-CJIzTKOg.js → Index-ZEMXlfX6.js} +1 -1
  54. package/dist/assets/{Index-D1OEri8a.js → Index-g9AE8JBy.js} +1 -1
  55. package/dist/assets/{Index-DQbZ4QOr.js → Index-plRG2dau.js} +1 -1
  56. package/dist/assets/{Invitees-DSarU8BX.js → Invitees-C2wHbY91.js} +1 -1
  57. package/dist/assets/{List-B9AVZp4s.js → List-BPRtd4EN.js} +1 -1
  58. package/dist/assets/{List-BjCtr92-.js → List-cPIfpm67.js} +1 -1
  59. package/dist/assets/{List-D673Pgy1.js → List-yMip9GfL.js} +1 -1
  60. package/dist/assets/{LocalTools-eA6Y2rJq.js → LocalTools-BpTSib-7.js} +1 -1
  61. package/dist/assets/{LocalTools-BC8jGBeL.js → LocalTools-dOIXTp9v.js} +1 -1
  62. package/dist/assets/{Logo-Br3BGwwf.js → Logo-Cbz4XZEz.js} +1 -1
  63. package/dist/assets/{Main-CieB2Bf0.js → Main-B9ZY0f5I.js} +1 -1
  64. package/dist/assets/{Message-DHGdWt27.js → Message-d0mPSP2V.js} +1 -1
  65. package/dist/assets/{Model-_ubRp5cm.js → Model-BjN5d7uy.js} +1 -1
  66. package/dist/assets/{Navigator-Bg-oSPVG.js → Navigator-BXNP9PNu.js} +3 -3
  67. package/dist/assets/{NotFound-Dvg08YK-.js → NotFound-CyqEE-k0.js} +1 -1
  68. package/dist/assets/{PageHeader-1oHtUwp7.js → PageHeader-BhoLRNhY.js} +1 -1
  69. package/dist/assets/{Pay-BWzR8VbM.js → Pay-DxWiCx7s.js} +1 -1
  70. package/dist/assets/{Player-DznlIUrT.js → Player-CuHLZouv.js} +1 -1
  71. package/dist/assets/{Poivelle-B-D1e0H1.js → Poivelle-DQn_mxRk.js} +1 -1
  72. package/dist/assets/{RealtimeCall-DW49UKFy.js → RealtimeCall-DsT9poEx.js} +1 -1
  73. package/dist/assets/{ReportButton-Donr-AWk.js → ReportButton-BjqTtgiG.js} +1 -1
  74. package/dist/assets/{ReportDialog-BiLDb7Xj.js → ReportDialog-DkUVum_4.js} +1 -1
  75. package/dist/assets/{ScheduledTasks-SoVhudjw.js → ScheduledTasks-CW44vB6v.js} +1 -1
  76. package/dist/assets/{Status-CsjAZI18.js → Status-gXeic9hK.js} +1 -1
  77. package/dist/assets/{Subscribe-BAWpX-9R.js → Subscribe-43d6ahjL.js} +1 -1
  78. package/dist/assets/{TabSwitcher-BpZ1QcOS.js → TabSwitcher-mWcWXfxp.js} +1 -1
  79. package/dist/assets/{Tts-CIeZdEMp.js → Tts-DSqof_ZC.js} +1 -1
  80. package/dist/assets/{VideoPlayer-BNRh6h0n.js → VideoPlayer-B59Uuhef.js} +1 -1
  81. package/dist/assets/{VideoPreview-3_dzkg8M.js → VideoPreview-CmEVwmzK.js} +1 -1
  82. package/dist/assets/arrow-down-ccyVeSHM.js +1 -0
  83. package/dist/assets/{arrow-down-wide-narrow-15zvSaHy.js → arrow-down-wide-narrow-ZcUp-_Qt.js} +1 -1
  84. package/dist/assets/arrow-left-7KP6vKg8.js +1 -0
  85. package/dist/assets/arrow-right-DYWBdj_L.js +1 -0
  86. package/dist/assets/arrow-up-T2S3erU7.js +1 -0
  87. package/dist/assets/{authorizeFlow-Cy446zIb.js → authorizeFlow-ZtQgLo6K.js} +1 -1
  88. package/dist/assets/{avatar-DRt2U5Pb.js → avatar-BbkcoTih.js} +1 -1
  89. package/dist/assets/{basic-DEJvhpaF.js → basic-lUxP-T65.js} +1 -1
  90. package/dist/assets/{book-open-Dv6qcZ2P.js → book-open-jDKIXQ2F.js} +1 -1
  91. package/dist/assets/{box-aM-pcoXN.js → box-DbM1AluU.js} +1 -1
  92. package/dist/assets/{boxes-YTdv0XY7.js → boxes-BDsKQpJW.js} +1 -1
  93. package/dist/assets/{brain-C9dUBwpu.js → brain-JbP5omgn.js} +1 -1
  94. package/dist/assets/{chart-no-axes-combined-D8kNMTYO.js → chart-no-axes-combined-CDeiBWkW.js} +1 -1
  95. package/dist/assets/{chat-C22xHrwi.js → chat-DrAcAQku.js} +1 -1
  96. package/dist/assets/check-DNCG9hBM.js +1 -0
  97. package/dist/assets/chevron-down-BolLcOSJ.js +1 -0
  98. package/dist/assets/chevron-right-BDq7tif-.js +1 -0
  99. package/dist/assets/circle-check-DW1hj0fx.js +1 -0
  100. package/dist/assets/{circle-question-mark-DuIxA4WE.js → circle-question-mark-B40DB-Jx.js} +1 -1
  101. package/dist/assets/{clipboard-list-mNBTHEo2.js → clipboard-list-CnwZKbzu.js} +1 -1
  102. package/dist/assets/clock-BH8LHBZX.js +1 -0
  103. package/dist/assets/code-JkJhGonk.js +1 -0
  104. package/dist/assets/{codingBridge-DkDWjaM1.js → codingBridge-qsbXMuGs.js} +1 -1
  105. package/dist/assets/{codingBridgeNotify-D_NpZVaT.js → codingBridgeNotify--Bzcnw64.js} +2 -2
  106. package/dist/assets/{coins-BaBjiwRM.js → coins-DWaKy0Zt.js} +1 -1
  107. package/dist/assets/{copy-DOHqs49h.js → copy-C1D5Q7eY.js} +1 -1
  108. package/dist/assets/{createTaskActions-BkRUXvhA.js → createTaskActions-DKw9Hbqu.js} +1 -1
  109. package/dist/assets/{digitalhuman-Ck3ZoJtC.js → digitalhuman-S7lvsjRM.js} +1 -1
  110. package/dist/assets/{dollar-sign-Dy-yQgch.js → dollar-sign-Bf17QMtL.js} +1 -1
  111. package/dist/assets/{download-xaSy0mRf.js → download-Dc3BfnDp.js} +1 -1
  112. package/dist/assets/{drawer-BYrWn-wi.js → drawer-j4iP3Egi.js} +1 -1
  113. package/dist/assets/{dropdown-dJyl79PP.js → dropdown-4Z3rPBQZ.js} +1 -1
  114. package/dist/assets/{dropdown-WLLKaXoi.js → dropdown-BK65Zqgh.js} +1 -1
  115. package/dist/assets/{ellipsis-Kgu9BKV-.js → ellipsis-mkMtbSt-.js} +1 -1
  116. package/dist/assets/{esm-BcXgbm5s.js → esm-B07SVAYs.js} +1 -1
  117. package/dist/assets/{esm-BmoJJzPK.js → esm-B4aB9evT.js} +2 -2
  118. package/dist/assets/{esm-ByzZb6WU.js → esm-BZ1_d4hl.js} +1 -1
  119. package/dist/assets/{esm-DXlvgaWH.js → esm-DKJpfcXW.js} +1 -1
  120. package/dist/assets/esm-DT_K6vNK.js +1 -0
  121. package/dist/assets/{esm-BWUBZWRX.js → esm-Dxlb5x7M.js} +2 -2
  122. package/dist/assets/{esm-DBzwbQLe.js → esm-tPzsmaCI.js} +3 -3
  123. package/dist/assets/{external-link-BkmV4CLH.js → external-link-D9uradQl.js} +1 -1
  124. package/dist/assets/{eye-DuSVGvFU.js → eye-FoDN8Q8h.js} +1 -1
  125. package/dist/assets/{file-BqOmxxbq.js → file-D0SgRGM7.js} +1 -1
  126. package/dist/assets/{file-output-BFLboA2n.js → file-output-C1viowvX.js} +1 -1
  127. package/dist/assets/{file-text-vQBok-1B.js → file-text-DGYMvEfq.js} +1 -1
  128. package/dist/assets/{fish-CVQ6zwCl.js → fish-DnOQ4At-.js} +1 -1
  129. package/dist/assets/{flux-uQlHDfLl.js → flux-DNyMO96a.js} +1 -1
  130. package/dist/assets/{folder-BPNNWMbi.js → folder-ZGtAORlZ.js} +1 -1
  131. package/dist/assets/gauge-BmFNkPSd.js +1 -0
  132. package/dist/assets/{globe-C6g3JZgL.js → globe-CrBJObfd.js} +1 -1
  133. package/dist/assets/{grokvideo-DS40Qjn-.js → grokvideo-Bo5zbT7m.js} +1 -1
  134. package/dist/assets/{hailuo-C4genAdr.js → hailuo-yGfIwLlf.js} +1 -1
  135. package/dist/assets/{headphones-Cv7zE6hM.js → headphones-JkPjoJ2L.js} +1 -1
  136. package/dist/assets/{history-CVkxFYWc.js → history-DMPm7iGC.js} +1 -1
  137. package/dist/assets/{house-D0BhonPH.js → house-Co1uybVo.js} +1 -1
  138. package/dist/assets/{image-CbgMrDy4.js → image-DtMNvGee.js} +1 -1
  139. package/dist/assets/{index-DSAgKNWm.js → index-DVfw2ekC.js} +12 -12
  140. package/dist/assets/{index.browser.esm-BiZ1PUoX.js → index.browser.esm-B02eQHD5.js} +1 -1
  141. package/dist/assets/{index.es-BGtTBs6E.js → index.es-01zg3uVq.js} +1 -1
  142. package/dist/assets/{info-B8n3U43j.js → info-B5G4piiJ.js} +1 -1
  143. package/dist/assets/{input-number-B6mCFWZN.js → input-number-C70jdh5l.js} +1 -1
  144. package/dist/assets/{key-round-CAl3B3wn.js → key-round-DbkNBrDl.js} +1 -1
  145. package/dist/assets/{kling-LYu_XAKT.js → kling-Tusqrt3Z.js} +1 -1
  146. package/dist/assets/{languages-sDxkzpgd.js → languages-C8Qz2w3l.js} +1 -1
  147. package/dist/assets/{laptop-B6VIa9KH.js → laptop-CJII_c6q.js} +1 -1
  148. package/dist/assets/{lightbulb-C8_0Sfzu.js → lightbulb-Dou9Q0io.js} +1 -1
  149. package/dist/assets/{link-Cqm9iai8.js → link-BG2NzAC6.js} +1 -1
  150. package/dist/assets/loader-circle-D24scFSi.js +1 -0
  151. package/dist/assets/{lock-DBne33UH.js → lock-6_gfho6p.js} +1 -1
  152. package/dist/assets/{luma-DEP_aFYd.js → luma-G-tMmFe-.js} +1 -1
  153. package/dist/assets/{maestro-D7aVuf7F.js → maestro-DKwBj6T9.js} +1 -1
  154. package/dist/assets/{mail-DoqXbBJ-.js → mail-C_apxQwT.js} +1 -1
  155. package/dist/assets/{message-circle-CJKVqRKG.js → message-circle-BknVC797.js} +1 -1
  156. package/dist/assets/{mic-CQqzgu2a.js → mic-CL52kfds.js} +1 -1
  157. package/dist/assets/{midjourney-Bnu6OgB6.js → midjourney-b1Qt4Eoc.js} +1 -1
  158. package/dist/assets/{mobileLocalExec-WiFkhFuu.js → mobileLocalExec-DHt4M4FH.js} +2 -2
  159. package/dist/assets/{monitor-DaGlrKZg.js → monitor-DW7YFR2s.js} +1 -1
  160. package/dist/assets/{mouse-pointer-2-BTYdPv6Y.js → mouse-pointer-2-Ds_587pR.js} +1 -1
  161. package/dist/assets/music-2-D9431H9z.js +1 -0
  162. package/dist/assets/{nanobanana-pFKlXGOc.js → nanobanana-1G3ctl7V.js} +1 -1
  163. package/dist/assets/{omni-vKP8RxU8.js → omni-Ic7fSYcV.js} +1 -1
  164. package/dist/assets/{openaiimage-C3Y5kC8l.js → openaiimage-CFW7zrNw.js} +1 -1
  165. package/dist/assets/{pagination-BbB25PxT.js → pagination-BBfceYoT.js} +1 -1
  166. package/dist/assets/{pagination-BTVOvpvg.js → pagination-BfuIB-Ie.js} +1 -1
  167. package/dist/assets/{pagination-CtkSWjVi.js → pagination-BsSidXXV.js} +1 -1
  168. package/dist/assets/{palette-8rydNAeE.js → palette-B-vrTJCl.js} +1 -1
  169. package/dist/assets/{paperclip-DHh7WRgg.js → paperclip-DEON-cwV.js} +1 -1
  170. package/dist/assets/{pause-VyvJQ-Z_.js → pause-0DHA47wE.js} +1 -1
  171. package/dist/assets/{pencil-CrMC0hWn.js → pencil-NVVhuUmt.js} +1 -1
  172. package/dist/assets/{pika-DtaRH2KI.js → pika-DbdiasrH.js} +1 -1
  173. package/dist/assets/{pixverse-C5WgxOjD.js → pixverse-D_lQI79Y.js} +1 -1
  174. package/dist/assets/play-E4WAJI5E.js +1 -0
  175. package/dist/assets/{plug-JAsKzEsm.js → plug-D6bBBwf1.js} +1 -1
  176. package/dist/assets/plus-NK33PnKk.js +1 -0
  177. package/dist/assets/{poivelle-DrkneRmn.js → poivelle-lfPmmSXi.js} +1 -1
  178. package/dist/assets/{popover-Oaiq8oiH.js → popover-CRXNSXL5.js} +1 -1
  179. package/dist/assets/{producer-CYrZMDUU.js → producer-C9acwfqa.js} +1 -1
  180. package/dist/assets/{qrart-Bv93TtPh.js → qrart-Czy6yZGA.js} +1 -1
  181. package/dist/assets/{realtime-sBs7dTpg.js → realtime-Bi9knXLi.js} +1 -1
  182. package/dist/assets/{refresh-cw-ToSOF7mi.js → refresh-cw-C1szZtw5.js} +1 -1
  183. package/dist/assets/rotate-ccw-BU4t8tFF.js +1 -0
  184. package/dist/assets/rotate-cw-DkIxVndD.js +1 -0
  185. package/dist/assets/search-DA8Y8CsJ.js +1 -0
  186. package/dist/assets/{seedance-BA82Hana.js → seedance-Cz1KmVBU.js} +1 -1
  187. package/dist/assets/{seedream-BblPBiNO.js → seedream-Dl6QoIdG.js} +1 -1
  188. package/dist/assets/{select-D1luRgRq.js → select-B_3B-Qv5.js} +1 -1
  189. package/dist/assets/{serp-CjpJqV9i.js → serp-DCLzURr3.js} +1 -1
  190. package/dist/assets/{shield-D81DAkjw.js → shield-Nf5Veth4.js} +1 -1
  191. package/dist/assets/{shuffle-bT3TpoOw.js → shuffle-B006ZdDS.js} +1 -1
  192. package/dist/assets/{slider-B2HxCy0H.js → slider-Cezo6txq.js} +1 -1
  193. package/dist/assets/{solana-wallets-Ca1v2kZV.js → solana-wallets-C_fc92Dk.js} +2 -2
  194. package/dist/assets/{solana-wallets-vue-CRE-3KhZ.js → solana-wallets-vue-DL3p6qJ5.js} +1 -1
  195. package/dist/assets/{sora-Dh2A94bD.js → sora-C7rSzOiL.js} +1 -1
  196. package/dist/assets/{sparkles-CGHT4a00.js → sparkles-BRLgbQuE.js} +1 -1
  197. package/dist/assets/square-t5GiQFCO.js +1 -0
  198. package/dist/assets/{store-CiS4Tvci.js → store-C7SsbGqi.js} +1 -1
  199. package/dist/assets/{suno-BUxGWjMV.js → suno-BRW1bfIK.js} +1 -1
  200. package/dist/assets/{switch-C4Vaponc.js → switch-Ci9Eyj4h.js} +1 -1
  201. package/dist/assets/{table-DRPwLfzY.js → table-DmvedtBR.js} +1 -1
  202. package/dist/assets/{tag-BCkvG45l.js → tag-LYfDIUy4.js} +1 -1
  203. package/dist/assets/terminal-Gx3yLIcP.js +1 -0
  204. package/dist/assets/{time-picker-kfSXrfW7.js → time-picker-DprYU_1Q.js} +1 -1
  205. package/dist/assets/{tooltip-DUcNmmP-.js → tooltip-B_iaC3Gn.js} +1 -1
  206. package/dist/assets/{trash-2-DLKDfmcv.js → trash-2-4nW6BMaD.js} +1 -1
  207. package/dist/assets/{triangle-alert-BWV9pT6w.js → triangle-alert-Crhi8w_z.js} +1 -1
  208. package/dist/assets/{upload-BZ-Gklsa.js → upload-BiHjB1QO.js} +1 -1
  209. package/dist/assets/user-D9nIebD2.js +1 -0
  210. package/dist/assets/{veo-Bm7aEC_8.js → veo-B48TUGwC.js} +1 -1
  211. package/dist/assets/{video-BUh3B3m1.js → video-CHpzJznm.js} +1 -1
  212. package/dist/assets/{volume-2-BhxYo14t.js → volume-2-hr31cWFU.js} +1 -1
  213. package/dist/assets/{wallet-VxcilCIK.js → wallet-B8k2h7pY.js} +1 -1
  214. package/dist/assets/{wan-CwcdkxuC.js → wan-CxzOr1Dg.js} +1 -1
  215. package/dist/assets/{wand-sparkles-zeg14-Rq.js → wand-sparkles-D4VBJVCS.js} +1 -1
  216. package/dist/assets/{web-UnkwI-Um.js → web-BHPCBtVa.js} +1 -1
  217. package/dist/assets/{web-BO4N3c4H.js → web-BTdRGc3I.js} +1 -1
  218. package/dist/assets/{web-C3UOdUqb.js → web-CWYcY6hB.js} +1 -1
  219. package/dist/assets/{web-1VZSOW5_.js → web-DVVBz5LO.js} +1 -1
  220. package/dist/assets/{web-CjeEalt1.js → web-DyWrol2_.js} +1 -1
  221. package/dist/assets/{webextrator-5jcmEsnJ.js → webextrator-gr8kZ0Je.js} +1 -1
  222. package/dist/assets/{zap-aiC_mBZz.js → zap-CNoad0ZT.js} +1 -1
  223. package/dist/index.html +1 -1
  224. package/package.json +1 -1
  225. package/dist/assets/arrow-down-BxiXgbhu.js +0 -1
  226. package/dist/assets/arrow-left-BK9Fxa_j.js +0 -1
  227. package/dist/assets/arrow-right-CoHZqGXA.js +0 -1
  228. package/dist/assets/arrow-up-BV9vk3tx.js +0 -1
  229. package/dist/assets/check-DpKzDz-5.js +0 -1
  230. package/dist/assets/chevron-down-BtvltmkO.js +0 -1
  231. package/dist/assets/chevron-right-D7HkzO9k.js +0 -1
  232. package/dist/assets/circle-check-B-06aax7.js +0 -1
  233. package/dist/assets/clock-CCljPowN.js +0 -1
  234. package/dist/assets/code-krPCdlwZ.js +0 -1
  235. package/dist/assets/esm-BTt8L_JR.js +0 -1
  236. package/dist/assets/gauge-BYfRBfSe.js +0 -1
  237. package/dist/assets/loader-circle-C3oRC_46.js +0 -1
  238. package/dist/assets/music-2-Bzom9ep9.js +0 -1
  239. package/dist/assets/play-xCfCGCia.js +0 -1
  240. package/dist/assets/plus-Bgf4b7_D.js +0 -1
  241. package/dist/assets/rotate-ccw-DaRid_jM.js +0 -1
  242. package/dist/assets/rotate-cw-Dg6YEi1E.js +0 -1
  243. package/dist/assets/search-CT76oSOi.js +0 -1
  244. package/dist/assets/square-z_a9bxBG.js +0 -1
  245. package/dist/assets/terminal-CE6gL9a8.js +0 -1
  246. package/dist/assets/user-DV1_LEkO.js +0 -1
@@ -1 +1 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,it as d,j as f,mt as p,rt as m,tt as h,x as g,z as _}from"./vendor-chart-Dw-P17PN.js";import{r as v,t as y}from"./select-D1luRgRq.js";import{t as b}from"./upload-Cjls2phY.js";import{t as x}from"./tooltip-DUcNmmP-.js";import{t as S}from"./alert-BprQRUmf.js";import{h as C,v as w}from"./models-yTQ4rqqP.js";import{t as T}from"./drawer-BYrWn-wi.js";import{t as E}from"./input-number-B6mCFWZN.js";import{t as D}from"./slider-B2HxCy0H.js";import{t as O}from"./clock-CCljPowN.js";import{a as k,c as A,n as j,o as M,r as N,t as P}from"./pagination-CtkSWjVi.js";import{t as F}from"./info-B8n3U43j.js";import{t as ee}from"./trash-2-DLKDfmcv.js";import{t as te}from"./triangle-alert-BWV9pT6w.js";import{t as I}from"./upload-BZ-Gklsa.js";import{t as L}from"./wand-sparkles-zeg14-Rq.js";import{dr as R,fr as z,ur as B}from"./constants-CzYWUlOY.js";import{$t as V,O as H,Pi as U,Qt as W,Xn as G,Zt as K,bi as q,en as J,fn as Y,jr as X,oi as Z,qt as Q,rn as ne,tn as re}from"./index-DSAgKNWm.js";import{t as ie}from"./CopyToClipboard-CP5bh5uq.js";import{t as ae}from"./ReportButton-Donr-AWk.js";import{t as oe}from"./ImagePreview-fQJvI010.js";import{n as se}from"./taskDrawerMixin-DyAUhFEq.js";import{t as ce}from"./Consumption-DGykzGxC.js";import{t as le}from"./ApiCodeButton-BoYfR8v5.js";import{t as ue}from"./BotPlaceholder-C42Ymqvl.js";import{t as de}from"./ImageWrapper-COWOs7PX.js";var fe=_({name:`LayoutFlux`,components:{MagicIcon:L,ElDrawer:T,ElButton:U},mixins:[se]}),pe={class:`main flex flex-row flex-1`},me={class:`config w-[320px] flex-none h-full min-h-0 overflow-hidden flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},he={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function ge(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),_=l(`el-drawer`);return h(),s(`div`,pe,[e(`div`,me,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,he,[d(t.$slots,`result`,{},void 0,!0)]),u(a(m,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[g,!t.tasksEmpty]]),a(_,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`drawer generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var _e=H(fe,[[`render`,ge],[`__scopeId`,`data-v-72e82d52`]]),ve=_({name:`ModelSelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`flux-dev`,label:`flux-dev`},{value:`flux-pro`,label:`flux-pro`},{value:`flux-kontext-pro`,label:`flux-kontext-pro`},{value:`flux-kontext-max`,label:`flux-kontext-max`},{value:`flux-2-flex`,label:`flux-2-flex`},{value:`flux-2-pro`,label:`flux-2-pro`},{value:`flux-2-max`,label:`flux-2-max`}]}},computed:{value:{get(){return this.$store.state.flux?.config?.model},set(e){this.$store.commit(`flux/setConfig`,{...this.$store.state.flux.config,model:e})}}},mounted(){this.value||=z}}),ye={class:`field`},be={class:`title font-bold`};function xe(t,n,r,o,u,d){let g=l(`el-option`),_=l(`el-select`);return h(),s(`div`,ye,[e(`h2`,be,i(t.$t(`flux.name.model`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`flux.placeholder.select`)},{default:p(()=>[(h(!0),s(c,null,m(t.options,e=>(h(),f(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Se=H(ve,[[`render`,xe],[`__scopeId`,`data-v-e9b17945`]]),Ce=_({name:`CountSelector`,components:{ElSlider:D,InfoIcon:M,ElInputNumber:E},computed:{value:{get(){return this.$store.state.flux?.config?.count},set(e){console.debug(`set count`,e),this.$store.commit(`flux/setConfig`,{...this.$store.state.flux?.config,count:e})}}},mounted(){this.value||=1}}),we={class:`flex justify-between`},Te={class:`flex justify-start items-center`},Ee={class:`text-sm font-bold`},De={class:`flex justify-end items-center`},Oe={class:`w-full`};function ke(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input-number`),p=l(`el-slider`);return h(),s(`div`,null,[e(`div`,we,[e(`div`,Te,[e(`span`,Ee,i(t.$t(`flux.name.numbers`)),1),a(d,{content:t.$t(`flux.description.numbers`)},null,8,[`content`])]),e(`div`,De,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),e(`div`,Oe,[a(p,{modelValue:t.value,"onUpdate:modelValue":n[1]||=e=>t.value=e,min:1,max:4,step:1},null,8,[`modelValue`])])])}var Ae=H(Ce,[[`render`,ke]]),je=_({name:`ActionSelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`generate`,label:this.$t(`flux.name.generate`)},{value:`edits`,label:this.$t(`flux.name.edits`)}]}},computed:{value:{get(){return this.$store.state.flux?.config?.action},set(e){this.$store.commit(`flux/setConfig`,{...this.$store.state.flux.config,action:e})}}},mounted(){this.value||=R}}),Me={class:`field`},Ne={class:`title font-bold`};function Pe(t,n,r,o,u,d){let g=l(`el-option`),_=l(`el-select`);return h(),s(`div`,Me,[e(`h2`,Ne,i(t.$t(`flux.name.task`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`flux.placeholder.select`)},{default:p(()=>[(h(!0),s(c,null,m(t.options,e=>(h(),f(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Fe=H(je,[[`render`,Pe],[`__scopeId`,`data-v-81fd05e5`]]),Ie=_({name:`ImageUrlInput`,components:{UploadIcon:I,ElUpload:b,ElButton:U,InfoIcon:M,ImagePreview:oe},mixins:[re,J,W,Q],emits:[`change`],data(){return{fileList:[],uploadUrl:Z()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},watch:{urls:{handler(e){console.debug(`URLs changed:`,e),this.$store.commit(`flux/setConfig`,{...this.$store.state.flux.config,image_url:e[0]})}}},methods:{onExceed(){w.warning(this.$t(`flux.message.uploadStartImageExceed`))},onError(){w.error(this.$t(`flux.message.uploadStartImageError`))}}}),Le={class:`relative`},Re={class:`flex justify-between`},ze={class:`flex justify-start items-center`},Be={class:`text-sm font-bold`};function Ve(t,n,o,c,u,d){let f=l(`info-icon`),m=l(`image-preview`),g=l(`upload-icon`),_=l(`el-button`),v=l(`el-upload`);return h(),s(`div`,Le,[e(`div`,Re,[e(`div`,ze,[e(`span`,Be,i(t.$t(`flux.name.imageUrl`)),1),a(f,{content:t.$t(`flux.description.imageUrl`)},null,8,[`content`])])]),a(v,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,limit:5,class:`upload-wrapper`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,multiple:!0,"list-type":`picture`,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"on-exceed":t.onExceed,"on-error":t.onError,headers:t.headers},{file:p(({file:e})=>[a(m,{url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])]),default:p(()=>[a(_,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(g,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`flux.button.uploadImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`headers`])])}var He=H(Ie,[[`render`,Ve],[`__scopeId`,`data-v-9830e0c3`]]),Ue=_({name:`PromptInput`,components:{PromptTextarea:k},computed:{prompt:{get(){return this.$store.state.flux?.config?.prompt},set(e){this.$store.commit(`flux/setConfig`,{...this.$store.state.flux?.config,prompt:e})}}},mounted(){this.prompt||=``}});function We(e,t,n,r,i,a){let o=l(`prompt-textarea`);return h(),f(o,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`flux.name.prompt`),info:e.$t(`flux.description.prompt`),placeholder:e.$t(`flux.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var Ge=H(Ue,[[`render`,We]]),Ke=_({name:`SizeSelector`,components:{ElSelect:v,ElOption:y},data(){return{options:B}},computed:{value:{get(){return this.$store.state.flux?.config?.size},set(e){this.$store.commit(`flux/setConfig`,{...this.$store.state.flux?.config,size:e})}}},mounted(){this.value||=`1:1`}}),qe={class:`field`},Je={class:`title font-bold`};function Ye(t,n,r,o,u,d){let g=l(`el-option`),_=l(`el-select`);return h(),s(`div`,qe,[e(`h2`,Je,i(t.$t(`flux.name.ratio`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`flux.placeholder.select`)},{default:p(()=>[(h(!0),s(c,null,m(t.options,e=>(h(),f(g,{key:e,label:e,value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Xe=_({name:`PresetPanel`,components:{MagicIcon:L,ElButton:U,PromptInput:Ge,ModelSelector:Se,CountSelector:Ae,Consumption:ce,ActionSelector:Fe,ImageUrlInput:He,SizeSelector:H(Ke,[[`render`,Ye],[`__scopeId`,`data-v-8c58dc91`]])},emits:[`generate`],computed:{config(){return this.$store.state.flux?.config},consumption(){return ne(this.config,this.service?.cost)},service(){return this.$store.state.flux?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),Ze={class:`flex flex-col h-full`},Qe={class:`flex-1 overflow-y-auto p-5`},$e={class:`flex flex-col items-center justify-center px-5 pb-5`};function et(t,n,c,u,d,m){let g=l(`action-selector`),_=l(`prompt-input`),v=l(`image-url-input`),y=l(`model-selector`),b=l(`size-selector`),x=l(`count-selector`),S=l(`consumption`),C=l(`magic-icon`),w=l(`el-button`);return h(),s(`div`,Ze,[e(`div`,Qe,[a(g,{class:`mb-4`}),a(_,{class:`mb-4`}),t.config?.action===`edits`?(h(),f(v,{key:0,class:`mb-4`})):o(``,!0),a(y,{class:`mb-4`}),a(b,{class:`mb-4`}),a(x,{class:`mb-4`})]),e(`div`,$e,[a(S,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),a(w,{type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(C,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`flux.button.generate`)),1)]),_:1},8,[`onClick`])])])}var tt=H(Xe,[[`render`,et]]),nt=_({name:`TaskPreview`,components:{DeleteIcon:ee,ElTooltip:x,ChannelIcon:A,InfoIcon:F,MagicIcon:L,TimeIcon:O,WarningIcon:te,CopyToClipboard:ie,ElAlert:S,ImageWrapper:de,ApiCodeButton:le,ReportButton:ae},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.flux?.application},config(){return this.$store.state.flux?.config},images(){let e=[],t=this.modelValue?.request?.action;return Array.isArray(this.modelValue?.response?.data)&&this.modelValue?.response?.data?.forEach(n=>{let r=n;t&&(r.action=t),e.push(r)}),e}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await q.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`flux/deleteTask`,{id:e}),w.success(this.$t(`common.message.deleteTaskSuccess`))}catch{w.error(this.$t(`common.message.deleteTaskFailed`))}}},onDownload(e,t){e?.stopPropagation(),console.log(`on download`),window.open(t,`_blank`)},onOpenImage(e){window.open(e,`_blank`)}}}),rt={class:`preview`},it={class:`left`},at={class:`main`},ot={class:`bot`},st={class:`datetime`},ct=[`aria-label`],lt={class:`info`},ut={key:0,class:`prompt mt-2`},dt={key:0},ft={key:0,class:n({content:!0,failed:!0})},pt={class:`flex justify-start items-center gap-4 w-full overflow-x-auto`},mt={class:n({operations:!0,"mt-2":!0,"mb-2":!0})},ht={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},gt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},_t={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},vt={key:1,class:n({content:!0})},yt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},bt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},xt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},St={key:2,class:n({content:!0})},Ct={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function wt(n,u,d,g,_,v){let y=l(`capability-presentation`),b=l(`delete-icon`),x=l(`el-tooltip`),S=l(`image-wrapper`),C=l(`api-code-button`),w=l(`report-button`),T=l(`channel-icon`),E=l(`magic-icon`),D=l(`copy-to-clipboard`),O=l(`time-icon`),k=l(`el-alert`),A=l(`warning-icon`),j=l(`info-icon`);return h(),s(`div`,rt,[e(`div`,it,[a(y,{capability:`flux`,part:`avatar`,class:`avatar`})]),e(`div`,at,[e(`div`,ot,[a(y,{capability:`flux`,part:`name`}),e(`span`,st,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(x,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:p(()=>[n.modelValue?.id?(h(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:u[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,ct)):o(``,!0)]),_:1},8,[`content`])]),e(`div`,lt,[n.modelValue?.request?.prompt?(h(),s(`p`,ut,[r(i(n.modelValue?.request?.prompt)+` `,1),n.modelValue?.response?o(``,!0):(h(),s(`span`,dt,` - (`+i(n.$t(`flux.status.pending`))+`) `,1))])):o(``,!0)]),n.modelValue?.response?.success===!0?(h(),s(`div`,ft,[e(`div`,pt,[(h(!0),s(c,null,m(n.images,(e,t)=>(h(),f(S,{key:t,src:e?.image_url,"raw-src":e?.image_url,"model-value":e},null,8,[`src`,`raw-src`,`model-value`]))),128))]),e(`div`,mt,[a(C,{path:`/flux/images`,body:n.modelValue?.request},null,8,[`body`]),a(w,{service:`flux`,"target-id":n.modelValue?.id,snapshot:{prompt:n.modelValue?.request?.prompt}},null,8,[`target-id`,`snapshot`])]),a(k,{closable:!1,class:`mt-2 success`},{default:p(()=>[e(`p`,ht,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.model`))+`: `+i(n.modelValue?.request?.model),1)]),e(`p`,gt,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(D,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),n.modelValue?.elapsed?(h(),s(`p`,_t,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0)]),_:1})])):o(``,!0),n.modelValue?.response?.success===!1?(h(),s(`div`,vt,[a(k,{closable:!1,class:`failure`},{template:p(()=>[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.failure`)),1)]),default:p(()=>[e(`p`,yt,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(D,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),e(`p`,$,[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(D,{content:n.modelValue?.response?.error?.message,class:`btn-copy`},null,8,[`content`])]),n.modelValue?.elapsed?(h(),s(`p`,bt,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e(`p`,xt,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(D,{content:n.modelValue?.response?.trace_id,class:`btn-copy`},null,8,[`content`])])]),_:1})])):o(``,!0),n.modelValue?.response?o(``,!0):(h(),s(`div`,St,[a(k,{closable:!1,class:`info`},{template:p(()=>[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.status.pending`)),1)]),default:p(()=>[e(`p`,Ct,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(D,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])])]),_:1})]))])])}var Tt=_({name:`RecentPanel`,components:{TaskPreview:H(nt,[[`render`,wt],[`__scopeId`,`data-v-7bae4285`]]),BotPlaceholder:ue,NoTasks:N,ScrollList:j},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.flux?.tasks,items:this.$store.state.flux?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Et={key:0},Dt={key:2,class:`w-full h-full flex items-center justify-center`};function Ot(e,t,n,r,i,u){let d=l(`bot-placeholder`),g=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return h(),s(c,null,[e.tasks?.items===void 0?(h(),s(`div`,Et,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(h(),f(_,{key:1,ref:`scrollList`,class:`tasks h-full w-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(h(!0),s(c,null,m(e.tasks?.items,e=>(h(),f(g,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(h(),s(`div`,Dt,[a(v)])):o(``,!0)],64)}var kt=_({name:`FluxIndex`,components:{ConfigPanel:tt,Layout:_e,RecentPanel:H(Tt,[[`render`,Ot]])},mixins:[V],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.flux?.status?.getApplications===C.Request},tasksLoading(){return this.$store.state.flux?.status?.getTasks===C.Request||this.fetchingTasks},credential(){return this.$store.state.flux?.credential},config(){return this.$store.state.flux?.config},application(){return this.$store.state.flux?.application},tasks(){return this.$store.state.flux?.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await P({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`flux/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`flux/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`flux/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!K(this.uploadTracker,e=>this.$t(e),e=>w.warning(e)))return;let e={...this.config,async:!0};if(!Y())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}w.info(this.$t(`flux.message.startingTask`)),X(`flux`,G.generate(e,{token:t})).then(()=>{w.success(this.$t(`flux.message.startTaskSuccess`))}).catch(e=>{let t=e?.response?.data;t?.error?.code===`used_up`?w.error(this.$t(`flux.message.usedUp`)):w.error(this.$t(`flux.message.startTaskFailed`)+t?.error?.message)}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function At(e,t,n,r,i,o){let s=l(`config-panel`),c=l(`recent-panel`),u=l(`layout`);return h(),f(u,null,{config:p(()=>[a(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:p(()=>[a(c,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var jt=H(kt,[[`render`,At]]);export{jt as default};
1
+ import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,it as d,j as f,mt as p,rt as m,tt as h,x as g,z as _}from"./vendor-chart-Dw-P17PN.js";import{r as v,t as y}from"./select-B_3B-Qv5.js";import{t as b}from"./upload-Cjls2phY.js";import{t as x}from"./tooltip-B_iaC3Gn.js";import{t as S}from"./alert-BprQRUmf.js";import{h as C,v as w}from"./models-yTQ4rqqP.js";import{t as T}from"./drawer-j4iP3Egi.js";import{t as E}from"./input-number-C70jdh5l.js";import{t as D}from"./slider-Cezo6txq.js";import{t as O}from"./clock-BH8LHBZX.js";import{a as k,c as A,n as j,o as M,r as N,t as P}from"./pagination-BsSidXXV.js";import{t as F}from"./info-B5G4piiJ.js";import{t as ee}from"./trash-2-4nW6BMaD.js";import{t as te}from"./triangle-alert-Crhi8w_z.js";import{t as I}from"./upload-BiHjB1QO.js";import{t as L}from"./wand-sparkles-D4VBJVCS.js";import{dr as R,fr as z,ur as B}from"./constants-CzYWUlOY.js";import{$t as V,O as H,Pi as U,Qt as W,Xn as G,Zt as K,bi as q,en as J,fn as Y,jr as X,oi as Z,qt as Q,rn as ne,tn as re}from"./index-DVfw2ekC.js";import{t as ie}from"./CopyToClipboard-HUYQps1a.js";import{t as ae}from"./ReportButton-BjqTtgiG.js";import{t as oe}from"./ImagePreview-B_7eKC5t.js";import{n as se}from"./taskDrawerMixin-DyAUhFEq.js";import{t as ce}from"./Consumption-BkShIJXX.js";import{t as le}from"./ApiCodeButton-Bt2k7qL8.js";import{t as ue}from"./BotPlaceholder-CLTY9lhO.js";import{t as de}from"./ImageWrapper-DkGrmpJ2.js";var fe=_({name:`LayoutFlux`,components:{MagicIcon:L,ElDrawer:T,ElButton:U},mixins:[se]}),pe={class:`main flex flex-row flex-1`},me={class:`config w-[320px] flex-none h-full min-h-0 overflow-hidden flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},he={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function ge(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),_=l(`el-drawer`);return h(),s(`div`,pe,[e(`div`,me,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,he,[d(t.$slots,`result`,{},void 0,!0)]),u(a(m,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[g,!t.tasksEmpty]]),a(_,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`drawer generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var _e=H(fe,[[`render`,ge],[`__scopeId`,`data-v-72e82d52`]]),ve=_({name:`ModelSelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`flux-dev`,label:`flux-dev`},{value:`flux-pro`,label:`flux-pro`},{value:`flux-kontext-pro`,label:`flux-kontext-pro`},{value:`flux-kontext-max`,label:`flux-kontext-max`},{value:`flux-2-flex`,label:`flux-2-flex`},{value:`flux-2-pro`,label:`flux-2-pro`},{value:`flux-2-max`,label:`flux-2-max`}]}},computed:{value:{get(){return this.$store.state.flux?.config?.model},set(e){this.$store.commit(`flux/setConfig`,{...this.$store.state.flux.config,model:e})}}},mounted(){this.value||=z}}),ye={class:`field`},be={class:`title font-bold`};function xe(t,n,r,o,u,d){let g=l(`el-option`),_=l(`el-select`);return h(),s(`div`,ye,[e(`h2`,be,i(t.$t(`flux.name.model`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`flux.placeholder.select`)},{default:p(()=>[(h(!0),s(c,null,m(t.options,e=>(h(),f(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Se=H(ve,[[`render`,xe],[`__scopeId`,`data-v-e9b17945`]]),Ce=_({name:`CountSelector`,components:{ElSlider:D,InfoIcon:M,ElInputNumber:E},computed:{value:{get(){return this.$store.state.flux?.config?.count},set(e){console.debug(`set count`,e),this.$store.commit(`flux/setConfig`,{...this.$store.state.flux?.config,count:e})}}},mounted(){this.value||=1}}),we={class:`flex justify-between`},Te={class:`flex justify-start items-center`},Ee={class:`text-sm font-bold`},De={class:`flex justify-end items-center`},Oe={class:`w-full`};function ke(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input-number`),p=l(`el-slider`);return h(),s(`div`,null,[e(`div`,we,[e(`div`,Te,[e(`span`,Ee,i(t.$t(`flux.name.numbers`)),1),a(d,{content:t.$t(`flux.description.numbers`)},null,8,[`content`])]),e(`div`,De,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),e(`div`,Oe,[a(p,{modelValue:t.value,"onUpdate:modelValue":n[1]||=e=>t.value=e,min:1,max:4,step:1},null,8,[`modelValue`])])])}var Ae=H(Ce,[[`render`,ke]]),je=_({name:`ActionSelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`generate`,label:this.$t(`flux.name.generate`)},{value:`edits`,label:this.$t(`flux.name.edits`)}]}},computed:{value:{get(){return this.$store.state.flux?.config?.action},set(e){this.$store.commit(`flux/setConfig`,{...this.$store.state.flux.config,action:e})}}},mounted(){this.value||=R}}),Me={class:`field`},Ne={class:`title font-bold`};function Pe(t,n,r,o,u,d){let g=l(`el-option`),_=l(`el-select`);return h(),s(`div`,Me,[e(`h2`,Ne,i(t.$t(`flux.name.task`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`flux.placeholder.select`)},{default:p(()=>[(h(!0),s(c,null,m(t.options,e=>(h(),f(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Fe=H(je,[[`render`,Pe],[`__scopeId`,`data-v-81fd05e5`]]),Ie=_({name:`ImageUrlInput`,components:{UploadIcon:I,ElUpload:b,ElButton:U,InfoIcon:M,ImagePreview:oe},mixins:[re,J,W,Q],emits:[`change`],data(){return{fileList:[],uploadUrl:Z()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},watch:{urls:{handler(e){console.debug(`URLs changed:`,e),this.$store.commit(`flux/setConfig`,{...this.$store.state.flux.config,image_url:e[0]})}}},methods:{onExceed(){w.warning(this.$t(`flux.message.uploadStartImageExceed`))},onError(){w.error(this.$t(`flux.message.uploadStartImageError`))}}}),Le={class:`relative`},Re={class:`flex justify-between`},ze={class:`flex justify-start items-center`},Be={class:`text-sm font-bold`};function Ve(t,n,o,c,u,d){let f=l(`info-icon`),m=l(`image-preview`),g=l(`upload-icon`),_=l(`el-button`),v=l(`el-upload`);return h(),s(`div`,Le,[e(`div`,Re,[e(`div`,ze,[e(`span`,Be,i(t.$t(`flux.name.imageUrl`)),1),a(f,{content:t.$t(`flux.description.imageUrl`)},null,8,[`content`])])]),a(v,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,limit:5,class:`upload-wrapper`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,multiple:!0,"list-type":`picture`,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"on-exceed":t.onExceed,"on-error":t.onError,headers:t.headers},{file:p(({file:e})=>[a(m,{url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])]),default:p(()=>[a(_,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(g,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`flux.button.uploadImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`headers`])])}var He=H(Ie,[[`render`,Ve],[`__scopeId`,`data-v-9830e0c3`]]),Ue=_({name:`PromptInput`,components:{PromptTextarea:k},computed:{prompt:{get(){return this.$store.state.flux?.config?.prompt},set(e){this.$store.commit(`flux/setConfig`,{...this.$store.state.flux?.config,prompt:e})}}},mounted(){this.prompt||=``}});function We(e,t,n,r,i,a){let o=l(`prompt-textarea`);return h(),f(o,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`flux.name.prompt`),info:e.$t(`flux.description.prompt`),placeholder:e.$t(`flux.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var Ge=H(Ue,[[`render`,We]]),Ke=_({name:`SizeSelector`,components:{ElSelect:v,ElOption:y},data(){return{options:B}},computed:{value:{get(){return this.$store.state.flux?.config?.size},set(e){this.$store.commit(`flux/setConfig`,{...this.$store.state.flux?.config,size:e})}}},mounted(){this.value||=`1:1`}}),qe={class:`field`},Je={class:`title font-bold`};function Ye(t,n,r,o,u,d){let g=l(`el-option`),_=l(`el-select`);return h(),s(`div`,qe,[e(`h2`,Je,i(t.$t(`flux.name.ratio`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`flux.placeholder.select`)},{default:p(()=>[(h(!0),s(c,null,m(t.options,e=>(h(),f(g,{key:e,label:e,value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Xe=_({name:`PresetPanel`,components:{MagicIcon:L,ElButton:U,PromptInput:Ge,ModelSelector:Se,CountSelector:Ae,Consumption:ce,ActionSelector:Fe,ImageUrlInput:He,SizeSelector:H(Ke,[[`render`,Ye],[`__scopeId`,`data-v-8c58dc91`]])},emits:[`generate`],computed:{config(){return this.$store.state.flux?.config},consumption(){return ne(this.config,this.service?.cost)},service(){return this.$store.state.flux?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),Ze={class:`flex flex-col h-full`},Qe={class:`flex-1 overflow-y-auto p-5`},$e={class:`flex flex-col items-center justify-center px-5 pb-5`};function et(t,n,c,u,d,m){let g=l(`action-selector`),_=l(`prompt-input`),v=l(`image-url-input`),y=l(`model-selector`),b=l(`size-selector`),x=l(`count-selector`),S=l(`consumption`),C=l(`magic-icon`),w=l(`el-button`);return h(),s(`div`,Ze,[e(`div`,Qe,[a(g,{class:`mb-4`}),a(_,{class:`mb-4`}),t.config?.action===`edits`?(h(),f(v,{key:0,class:`mb-4`})):o(``,!0),a(y,{class:`mb-4`}),a(b,{class:`mb-4`}),a(x,{class:`mb-4`})]),e(`div`,$e,[a(S,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),a(w,{type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(C,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`flux.button.generate`)),1)]),_:1},8,[`onClick`])])])}var tt=H(Xe,[[`render`,et]]),nt=_({name:`TaskPreview`,components:{DeleteIcon:ee,ElTooltip:x,ChannelIcon:A,InfoIcon:F,MagicIcon:L,TimeIcon:O,WarningIcon:te,CopyToClipboard:ie,ElAlert:S,ImageWrapper:de,ApiCodeButton:le,ReportButton:ae},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.flux?.application},config(){return this.$store.state.flux?.config},images(){let e=[],t=this.modelValue?.request?.action;return Array.isArray(this.modelValue?.response?.data)&&this.modelValue?.response?.data?.forEach(n=>{let r=n;t&&(r.action=t),e.push(r)}),e}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await q.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`flux/deleteTask`,{id:e}),w.success(this.$t(`common.message.deleteTaskSuccess`))}catch{w.error(this.$t(`common.message.deleteTaskFailed`))}}},onDownload(e,t){e?.stopPropagation(),console.log(`on download`),window.open(t,`_blank`)},onOpenImage(e){window.open(e,`_blank`)}}}),rt={class:`preview`},it={class:`left`},at={class:`main`},ot={class:`bot`},st={class:`datetime`},ct=[`aria-label`],lt={class:`info`},ut={key:0,class:`prompt mt-2`},dt={key:0},ft={key:0,class:n({content:!0,failed:!0})},pt={class:`flex justify-start items-center gap-4 w-full overflow-x-auto`},mt={class:n({operations:!0,"mt-2":!0,"mb-2":!0})},ht={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},gt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},_t={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},vt={key:1,class:n({content:!0})},yt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},bt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},xt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},St={key:2,class:n({content:!0})},Ct={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function wt(n,u,d,g,_,v){let y=l(`capability-presentation`),b=l(`delete-icon`),x=l(`el-tooltip`),S=l(`image-wrapper`),C=l(`api-code-button`),w=l(`report-button`),T=l(`channel-icon`),E=l(`magic-icon`),D=l(`copy-to-clipboard`),O=l(`time-icon`),k=l(`el-alert`),A=l(`warning-icon`),j=l(`info-icon`);return h(),s(`div`,rt,[e(`div`,it,[a(y,{capability:`flux`,part:`avatar`,class:`avatar`})]),e(`div`,at,[e(`div`,ot,[a(y,{capability:`flux`,part:`name`}),e(`span`,st,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(x,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:p(()=>[n.modelValue?.id?(h(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:u[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,ct)):o(``,!0)]),_:1},8,[`content`])]),e(`div`,lt,[n.modelValue?.request?.prompt?(h(),s(`p`,ut,[r(i(n.modelValue?.request?.prompt)+` `,1),n.modelValue?.response?o(``,!0):(h(),s(`span`,dt,` - (`+i(n.$t(`flux.status.pending`))+`) `,1))])):o(``,!0)]),n.modelValue?.response?.success===!0?(h(),s(`div`,ft,[e(`div`,pt,[(h(!0),s(c,null,m(n.images,(e,t)=>(h(),f(S,{key:t,src:e?.image_url,"raw-src":e?.image_url,"model-value":e},null,8,[`src`,`raw-src`,`model-value`]))),128))]),e(`div`,mt,[a(C,{path:`/flux/images`,body:n.modelValue?.request},null,8,[`body`]),a(w,{service:`flux`,"target-id":n.modelValue?.id,snapshot:{prompt:n.modelValue?.request?.prompt}},null,8,[`target-id`,`snapshot`])]),a(k,{closable:!1,class:`mt-2 success`},{default:p(()=>[e(`p`,ht,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.model`))+`: `+i(n.modelValue?.request?.model),1)]),e(`p`,gt,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(D,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),n.modelValue?.elapsed?(h(),s(`p`,_t,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0)]),_:1})])):o(``,!0),n.modelValue?.response?.success===!1?(h(),s(`div`,vt,[a(k,{closable:!1,class:`failure`},{template:p(()=>[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.failure`)),1)]),default:p(()=>[e(`p`,yt,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(D,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),e(`p`,$,[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(D,{content:n.modelValue?.response?.error?.message,class:`btn-copy`},null,8,[`content`])]),n.modelValue?.elapsed?(h(),s(`p`,bt,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e(`p`,xt,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(D,{content:n.modelValue?.response?.trace_id,class:`btn-copy`},null,8,[`content`])])]),_:1})])):o(``,!0),n.modelValue?.response?o(``,!0):(h(),s(`div`,St,[a(k,{closable:!1,class:`info`},{template:p(()=>[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.status.pending`)),1)]),default:p(()=>[e(`p`,Ct,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(D,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])])]),_:1})]))])])}var Tt=_({name:`RecentPanel`,components:{TaskPreview:H(nt,[[`render`,wt],[`__scopeId`,`data-v-7bae4285`]]),BotPlaceholder:ue,NoTasks:N,ScrollList:j},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.flux?.tasks,items:this.$store.state.flux?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Et={key:0},Dt={key:2,class:`w-full h-full flex items-center justify-center`};function Ot(e,t,n,r,i,u){let d=l(`bot-placeholder`),g=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return h(),s(c,null,[e.tasks?.items===void 0?(h(),s(`div`,Et,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(h(),f(_,{key:1,ref:`scrollList`,class:`tasks h-full w-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(h(!0),s(c,null,m(e.tasks?.items,e=>(h(),f(g,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(h(),s(`div`,Dt,[a(v)])):o(``,!0)],64)}var kt=_({name:`FluxIndex`,components:{ConfigPanel:tt,Layout:_e,RecentPanel:H(Tt,[[`render`,Ot]])},mixins:[V],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.flux?.status?.getApplications===C.Request},tasksLoading(){return this.$store.state.flux?.status?.getTasks===C.Request||this.fetchingTasks},credential(){return this.$store.state.flux?.credential},config(){return this.$store.state.flux?.config},application(){return this.$store.state.flux?.application},tasks(){return this.$store.state.flux?.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await P({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`flux/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`flux/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`flux/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!K(this.uploadTracker,e=>this.$t(e),e=>w.warning(e)))return;let e={...this.config,async:!0};if(!Y())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}w.info(this.$t(`flux.message.startingTask`)),X(`flux`,G.generate(e,{token:t})).then(()=>{w.success(this.$t(`flux.message.startTaskSuccess`))}).catch(e=>{let t=e?.response?.data;t?.error?.code===`used_up`?w.error(this.$t(`flux.message.usedUp`)):w.error(this.$t(`flux.message.startTaskFailed`)+t?.error?.message)}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function At(e,t,n,r,i,o){let s=l(`config-panel`),c=l(`recent-panel`),u=l(`layout`);return h(),f(u,null,{config:p(()=>[a(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:p(()=>[a(c,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var jt=H(kt,[[`render`,At]]);export{jt as default};
@@ -1 +1 @@
1
- import{N as e,tt as t,z as n}from"./vendor-chart-Dw-P17PN.js";import{O as r}from"./index-DSAgKNWm.js";var i=n({name:`SettingsIndex`,mounted(){let e=this.$route.query.tab||``;window.dispatchEvent(new CustomEvent(`open-user-settings`,{detail:{tab:e}}))}}),a={class:`settings-page`};function o(n,r,i,o,s,c){return t(),e(`div`,a)}var s=r(i,[[`render`,o]]);export{s as default};
1
+ import{N as e,tt as t,z as n}from"./vendor-chart-Dw-P17PN.js";import{O as r}from"./index-DVfw2ekC.js";var i=n({name:`SettingsIndex`,mounted(){let e=this.$route.query.tab||``;window.dispatchEvent(new CustomEvent(`open-user-settings`,{detail:{tab:e}}))}}),a={class:`settings-page`};function o(n,r,i,o,s,c){return t(),e(`div`,a)}var s=r(i,[[`render`,o]]);export{s as default};
@@ -1 +1 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,b as u,ht as d,j as f,mt as p,ot as m,qt as h,rt as g,st as _,tt as v,z as y}from"./vendor-chart-Dw-P17PN.js";import{r as b,t as x}from"./select-D1luRgRq.js";import{n as S,t as C}from"./tabs-CEdTUVdB.js";import{t as w}from"./tooltip-DUcNmmP-.js";import{v as T}from"./models-yTQ4rqqP.js";import{n as E,r as D,t as O}from"./dropdown-WLLKaXoi.js";import{t as k}from"./pagination-BbB25PxT.js";import{t as A}from"./switch-C4Vaponc.js";import{t as j}from"./arrow-down-BxiXgbhu.js";import{t as M}from"./arrow-left-BK9Fxa_j.js";import{t as N}from"./book-open-Dv6qcZ2P.js";import{t as P}from"./chevron-down-BtvltmkO.js";import{t as F}from"./chevron-right-D7HkzO9k.js";import{t as I}from"./circle-check-B-06aax7.js";import{t as L}from"./circle-question-mark-DuIxA4WE.js";import{t as ee}from"./clipboard-list-mNBTHEo2.js";import{t as te}from"./code-krPCdlwZ.js";import{t as R}from"./copy-DOHqs49h.js";import{t as ne}from"./ellipsis-Kgu9BKV-.js";import{t as re}from"./eye-DuSVGvFU.js";import{t as ie}from"./file-text-vQBok-1B.js";import{t as z}from"./file-BqOmxxbq.js";import{t as B}from"./folder-BPNNWMbi.js";import{t as ae}from"./image-CbgMrDy4.js";import{t as oe}from"./lock-DBne33UH.js";import{t as V}from"./plus-Bgf4b7_D.js";import{n as se,t as ce}from"./store-CiS4Tvci.js";import{t as le}from"./search-CT76oSOi.js";import{t as ue}from"./trash-2-DLKDfmcv.js";import{t as de}from"./triangle-alert-BWV9pT6w.js";import{t as fe}from"./upload-BZ-Gklsa.js";import{t as pe}from"./wand-sparkles-zeg14-Rq.js";import{Hi as H,Mi as me,O as U,Pi as W,Ti as G,Tr as K,ai as he,bi as ge,di as _e,fi as ve,gi as ye,si as be,ui as xe,xi as q,yi as J}from"./index-DSAgKNWm.js";import{a as Se,c as Ce,d as we,f as Te,i as Ee,l as De,m as Y,n as Oe,o as ke,p as Ae,r as je,s as Me,t as Ne,u as Pe}from"./vendor-highlight-BHrfT4-E.js";import{t as Fe}from"./index.es-BGtTBs6E.js";import{t as Ie}from"./VueMarkdown-CiiRjbWs.js";import{t as Le}from"./PageHeader-1oHtUwp7.js";var Re=J(`cloud-download`,[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]]),ze=J(`cloud-upload`,[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`m8 17 4-4 4 4`,key:`1quai1`}]]),Be=J(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),Ve=J(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),He=J(`square-plus`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),X=()=>({baseURL:`${he()}/api/v1`}),Z=new class{key=`skills/installed`;async list(){return K.get(`/${this.key}/`,X())}async get(e){return K.get(`/${this.key}/${e}/`,X())}async createMarkdown(e){return K.post(`/${this.key}/`,e,X())}async createTarball(e){let t=new FormData;return t.append(`tarball`,e),K.post(`/${this.key}/`,t,{...X(),headers:{"Content-Type":`multipart/form-data`}})}async update(e,t){return K.patch(`/${this.key}/${e}/`,t,X())}async remove(e){return K.delete(`/${this.key}/${e}/`,X())}async enable(e){return K.post(`/${this.key}/${e}/enable/`,void 0,X())}async disable(e){return K.post(`/${this.key}/${e}/disable/`,void 0,X())}async fetchFile(e,t){let n=await K.get(`/${this.key}/${e}/files/`,{...X(),params:{path:t},responseType:`arraybuffer`}),r=n.headers[`content-type`]||`application/octet-stream`;return{blob:new Blob([n.data],{type:r}),contentType:r}}},Q=new class{key=`skills`;async list(e={}){return K.get(`/${this.key}/`,{...X(),params:e})}async get(e){return K.get(`/${this.key}/${e}/`,X())}async categories(){return K.get(`/${this.key}/categories/`,X())}async install(e,t={}){return K.post(`/${this.key}/${e}/install/`,t,X())}};function Ue(){let e=new Set;_e()&&e.add(`desktop`),ve()&&e.add(`ios`),xe()&&e.add(`android`),ye()&&e.add(`web`);let t=be();if(t===`mac`)e.add(`mac`);else if(t===`windows`)e.add(`windows`);else if(typeof navigator<`u`){let t=navigator.userAgent||``,n=navigator.userAgentData?.platform,r=/macintosh/i.test(t)&&(navigator.maxTouchPoints||0)>1;!ve()&&!r&&(n===`macOS`||/mac os x|macintosh/i.test(t))&&e.add(`mac`),(n===`Windows`||/windows nt/i.test(t))&&e.add(`windows`)}return e}var We=new Set([`mac`,`windows`,`desktop`,`web`,`ios`,`android`]);function Ge(e){let t=e.filter(e=>We.has(e));if(!t.length)return!0;let n=Ue();return t.some(e=>n.has(e))}Y.registerLanguage(`bash`,Ae),Y.registerLanguage(`json`,Te),Y.registerLanguage(`markdown`,we),Y.registerLanguage(`python`,Pe),Y.registerLanguage(`shell`,De),Y.registerLanguage(`yaml`,Ce),Y.registerAliases([`yml`],{languageName:`yaml`}),Y.registerAliases([`py`],{languageName:`python`}),Y.registerAliases([`sh`,`zsh`],{languageName:`bash`});var Ke=12,qe=y({name:`BrowseSkillsDialog`,components:{VueMarkdown:Ie,ElDialog:G,ElInput:H,ElButton:W,ElPagination:k,ElSelect:b,ElOption:x,FontAwesomeIcon:Fe,AddIcon:V,BackIcon:M,DownIcon:j,InstallIcon:Re,LockIcon:oe,SearchIcon:le,SuccessIcon:I},directives:{loading:q},props:{modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`,`installed`],data(){return{loading:!1,installing:!1,items:[],total:0,currentPage:1,searchQuery:``,namespaceFilter:``,sortBy:`popular`,selectedItem:null,searchTimer:null,knownNamespaces:[],publisherByNamespace:{}}},computed:{pageSize(){return Ke},namespaceOptions(){let e=new Set(this.knownNamespaces);for(let t of this.items)e.add(t.namespace);return Array.from(e).sort().map(e=>({value:e,label:this.publisherForNamespace(e)}))},detailBody(){return this.selectedItem?this.selectedItem.content.replace(/^---\n[\s\S]*?\n---\n?/,``):``}},methods:{onOpen(){this.selectedItem=null,this.searchQuery=``,this.namespaceFilter=``,this.sortBy=`popular`,this.currentPage=1,this.knownNamespaces=[],this.publisherByNamespace={},this.loadFacets(),this.reload()},openDetail(e){this.selectedItem=e},async loadFacets(){try{let{data:e}=await Q.categories(),t=new Set;for(let n of e.namespaces)t.add(n.namespace);this.knownNamespaces=Array.from(t).sort()}catch(e){console.warn(`failed to load skill catalog facets`,e)}},reloadFromFirstPage(){this.currentPage=1,this.reload()},onPageChange(e){this.currentPage=e,this.reload(),this.$nextTick(()=>{let e=this.$el.querySelector(`.directory-grid-wrapper`);e&&(e.scrollTop=0)})},onSearchInput(){this.searchTimer!==null&&window.clearTimeout(this.searchTimer),this.searchTimer=window.setTimeout(()=>{this.searchTimer=null,this.reloadFromFirstPage()},250)},async reload(){this.loading=!0;try{let{data:e}=await Q.list({q:this.searchQuery.trim()||void 0,namespace:this.namespaceFilter||void 0,sort:this.sortBy,limit:this.pageSize,offset:(this.currentPage-1)*this.pageSize});this.items=e.items,this.total=e.total;for(let t of e.items)t.publisher&&(this.publisherByNamespace[t.namespace]=t.publisher)}catch(e){console.error(e),T.error(this.$t(`skill.directory.loadFailed`))}finally{this.loading=!1}},async onInstall(e){if(!this.installing&&!e.installed){if(!this.canInstallOnSurface(e)){T.warning(this.$t(`skill.directory.surfaceBlocked`,{platforms:this.surfaceLabels(e)}));return}this.installing=!0;try{let{data:t}=await Q.install(e.id);T.success(this.$t(`skill.directory.installSuccess`,{name:e.slug})),this.$emit(`installed`,t.id),e.installed=!0,e.install_count+=1}catch(t){let n=this.extractError(t);n.includes(`already exists`)?(e.installed=!0,T.warning(this.$t(`skill.directory.alreadyInstalled`,{name:e.slug}))):T.error(this.$t(`skill.directory.installFailed`,{detail:n}))}finally{this.installing=!1}}},extractError(e){return e?.response?.data?.detail||String(e)||`unknown error`},formatCount(e){return e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)},publisherForNamespace(e){if(this.publisherByNamespace[e])return this.publisherByNamespace[e];let t=this.items.find(t=>t.namespace===e);return t?t.publisher:e},restrictedSurfaces(e){let t=e.frontmatter?.surfaces;return Array.isArray(t)?t.filter(e=>typeof e==`string`&&e.trim().length>0).map(e=>e.trim().toLowerCase()):[]},surfaceLabel(e){let t=`skill.directory.surface.${e}`,n=this.$t(t);return n===t?e:n},surfaceLabels(e){return this.restrictedSurfaces(e).map(e=>this.surfaceLabel(e)).join(` / `)},canInstallOnSurface(e){return Ge(this.restrictedSurfaces(e))}}}),Je={class:`directory`},Ye={class:`directory-main`},Xe={class:`directory-header`},Ze={class:`directory-controls`},Qe={class:`directory-grid-wrapper`},$e={key:0,class:`directory-empty`},et={key:1,class:`directory-grid`},tt=[`onClick`],nt={class:`directory-card-head`},rt={class:`directory-card-title`},it=[`title`],at=[`title`],ot=[`aria-label`,`title`,`onClick`],st=[`title`],ct={class:`directory-card-meta`},lt={class:`directory-card-publisher`},ut={key:0,class:`directory-card-count`},dt=[`title`],ft={class:`directory-card-desc`},pt={key:0,class:`directory-footer`},mt={class:`directory-detail-head`},ht={class:`directory-detail-actions`},gt=[`href`],_t={class:`directory-detail-body`},vt={class:`directory-detail-title`},yt={class:`directory-detail-meta`},bt={key:0},xt={key:1},St=[`title`],Ct={class:`directory-detail-desc`};function wt(u,h,_,y,b,x){let S=l(`search-icon`),C=l(`el-input`),w=l(`el-option`),T=l(`el-select`),E=l(`success-icon`),D=l(`lock-icon`),O=l(`add-icon`),k=l(`down-icon`),A=l(`el-pagination`),j=l(`back-icon`),M=l(`font-awesome-icon`),N=l(`el-button`),P=l(`install-icon`),F=l(`vue-markdown`),I=l(`el-dialog`),L=m(`loading`);return v(),f(I,{"model-value":u.modelValue,title:u.$t(`skill.dialog.directoryTitle`),width:`min(960px, 94vw)`,"align-center":``,class:`directory-dialog`,"close-on-click-modal":!u.installing,"show-close":!u.installing,"onUpdate:modelValue":h[5]||=e=>u.$emit(`update:modelValue`,e),onOpen:u.onOpen},{default:p(()=>[e(`div`,Je,[e(`main`,Ye,[u.selectedItem?(v(),s(c,{key:1},[e(`header`,mt,[e(`button`,{class:`directory-back-btn`,onClick:h[3]||=e=>u.selectedItem=null},[a(j,{size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`skill.directory.back`)),1)]),e(`div`,ht,[u.selectedItem.source_url?(v(),s(`a`,{key:0,href:u.selectedItem.source_url,target:`_blank`,class:`directory-link`},[a(M,{icon:`fa-brands fa-github`}),r(` `+i(u.$t(`skill.directory.viewSource`)),1)],8,gt)):o(``,!0),u.selectedItem.installed?(v(),f(N,{key:1,disabled:``,type:`success`,plain:``},{default:p(()=>[a(E,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`skill.directory.installed`)),1)]),_:1})):u.selectedItem.installable&&!u.canInstallOnSurface(u.selectedItem)?(v(),f(N,{key:2,disabled:``,title:u.$t(`skill.directory.surfaceBlocked`,{platforms:u.surfaceLabels(u.selectedItem)})},{default:p(()=>[a(D,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`skill.directory.surfaceUnavailable`)),1)]),_:1},8,[`title`])):u.selectedItem.installable?(v(),f(N,{key:3,type:`primary`,loading:u.installing,onClick:h[4]||=e=>u.onInstall(u.selectedItem)},{default:p(()=>[a(P,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`skill.directory.install`)),1)]),_:1},8,[`loading`])):(v(),f(N,{key:4,disabled:``,title:u.selectedItem.license},{default:p(()=>[a(D,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.selectedItem.license||u.$t(`skill.directory.notInstallable`)),1)]),_:1},8,[`title`]))])]),e(`div`,_t,[e(`h2`,vt,`/`+i(u.selectedItem.slug),1),e(`div`,yt,[e(`span`,null,[e(`strong`,null,i(u.$t(`skill.meta.addedBy`))+`:`,1),r(` `+i(u.selectedItem.publisher),1)]),u.selectedItem.license?(v(),s(`span`,bt,[e(`strong`,null,i(u.$t(`skill.directory.license`))+`:`,1),r(` `+i(u.selectedItem.license),1)])):o(``,!0),u.selectedItem.version?(v(),s(`span`,xt,`v`+i(u.selectedItem.version),1)):o(``,!0),u.surfaceLabels(u.selectedItem)?(v(),s(`span`,{key:2,class:`directory-detail-surface`,title:u.$t(`skill.directory.surfaceHint`)},i(u.$t(`skill.directory.surfaceOnly`,{platforms:u.surfaceLabels(u.selectedItem)})),9,St)):o(``,!0)]),e(`p`,Ct,i(u.selectedItem.description),1),a(F,{class:`directory-detail-content`,source:u.detailBody,sanitize:``},null,8,[`source`])])],64)):(v(),s(c,{key:0},[e(`header`,Xe,[a(C,{modelValue:u.searchQuery,"onUpdate:modelValue":h[0]||=e=>u.searchQuery=e,class:`directory-search`,size:`default`,clearable:``,placeholder:u.$t(`skill.directory.searchPlaceholder`),onInput:u.onSearchInput},{prefix:p(()=>[a(S,{size:14,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`modelValue`,`placeholder`,`onInput`]),e(`div`,Ze,[a(T,{modelValue:u.namespaceFilter,"onUpdate:modelValue":h[1]||=e=>u.namespaceFilter=e,class:`directory-select`,placeholder:u.$t(`skill.directory.allPublishers`),clearable:``,size:`default`,onChange:u.reloadFromFirstPage},{default:p(()=>[(v(!0),s(c,null,g(u.namespaceOptions,e=>(v(),f(w,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`onChange`]),a(T,{modelValue:u.sortBy,"onUpdate:modelValue":h[2]||=e=>u.sortBy=e,class:`directory-select directory-select-sm`,size:`default`,onChange:u.reloadFromFirstPage},{default:p(()=>[a(w,{label:u.$t(`skill.directory.sort.popular`),value:`popular`},null,8,[`label`]),a(w,{label:u.$t(`skill.directory.sort.recent`),value:`recent`},null,8,[`label`]),a(w,{label:u.$t(`skill.directory.sort.name`),value:`name`},null,8,[`label`])]),_:1},8,[`modelValue`,`onChange`])])]),d((v(),s(`div`,Qe,[!u.loading&&u.total===0?(v(),s(`p`,$e,i(u.$t(`skill.directory.empty`)),1)):(v(),s(`div`,et,[(v(!0),s(c,null,g(u.items,c=>(v(),s(`article`,{key:c.id,class:n([`directory-card`,{"is-installed":c.installed}]),onClick:e=>u.openDetail(c)},[e(`div`,nt,[e(`span`,rt,`/`+i(c.slug),1),c.installed?(v(),s(`span`,{key:0,class:`directory-card-action is-installed`,title:u.$t(`skill.directory.installed`)},[a(E,{size:16,"aria-hidden":`true`,focusable:`false`})],8,it)):c.installable&&!u.canInstallOnSurface(c)?(v(),s(`span`,{key:1,class:`directory-card-locked`,title:u.$t(`skill.directory.surfaceBlocked`,{platforms:u.surfaceLabels(c)})},[a(D,{size:16,"aria-hidden":`true`,focusable:`false`})],8,at)):c.installable?(v(),s(`button`,{key:2,class:`directory-card-action`,"aria-label":u.$t(`skill.directory.install`),title:u.$t(`skill.directory.install`),onClick:t(e=>u.onInstall(c),[`stop`])},[a(O,{size:16,"aria-hidden":`true`,focusable:`false`})],8,ot)):(v(),s(`span`,{key:3,class:`directory-card-locked`,title:c.license},[a(D,{size:16,"aria-hidden":`true`,focusable:`false`})],8,st))]),e(`div`,ct,[e(`span`,lt,i(c.publisher),1),c.install_count>0?(v(),s(`span`,ut,[a(k,{size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.formatCount(c.install_count)),1)])):o(``,!0),u.surfaceLabels(c)?(v(),s(`span`,{key:1,class:`directory-card-surface`,title:u.$t(`skill.directory.surfaceHint`)},i(u.surfaceLabels(c)),9,dt)):o(``,!0)]),e(`p`,ft,i(c.description),1)],10,tt))),128))]))])),[[L,u.loading]]),u.total>u.pageSize?(v(),s(`footer`,pt,[a(A,{"current-page":u.currentPage,"page-size":u.pageSize,total:u.total,"pager-count":5,background:``,layout:`prev, pager, next, total`,onCurrentChange:u.onPageChange},null,8,[`current-page`,`page-size`,`total`,`onCurrentChange`])])):o(``,!0)],64))])])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`show-close`,`onOpen`])}var Tt=U(qe,[[`render`,wt],[`__scopeId`,`data-v-a9be2dc3`]]);Y.registerLanguage(`bash`,Ae),Y.registerLanguage(`css`,Me),Y.registerLanguage(`go`,ke),Y.registerLanguage(`javascript`,Se),Y.registerLanguage(`json`,Te),Y.registerLanguage(`markdown`,we),Y.registerLanguage(`python`,Pe),Y.registerLanguage(`rust`,Ee),Y.registerLanguage(`shell`,De),Y.registerLanguage(`sql`,je),Y.registerLanguage(`typescript`,Oe),Y.registerLanguage(`xml`,Ne),Y.registerLanguage(`html`,Ne),Y.registerLanguage(`yaml`,Ce),Y.registerAliases([`yml`],{languageName:`yaml`}),Y.registerAliases([`ts`,`tsx`],{languageName:`typescript`}),Y.registerAliases([`js`,`jsx`],{languageName:`javascript`}),Y.registerAliases([`py`],{languageName:`python`}),Y.registerAliases([`rs`],{languageName:`rust`}),Y.registerAliases([`sh`,`zsh`],{languageName:`bash`});var $=1e6;function Et(e,t){let n=(e.split(`.`).pop()||``).toLowerCase();return n===`md`||t.startsWith(`text/markdown`)?`markdown`:n===`html`||n===`htm`||t.startsWith(`text/html`)?`html`:t.startsWith(`image/`)||[`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`].includes(n)?`image`:t.startsWith(`text/`)||[`json`,`application/json`].includes(t.split(`;`)[0])?n?`code`:`text`:`binary`}function Dt(e){let t=(e.split(`.`).pop()||``).toLowerCase();return Y.getLanguage(t)?t:`plain`}var Ot=y({name:`SkillFilePreview`,components:{ElButton:W,ElTooltip:w,ElTabs:S,ElTabPane:C,CodeIcon:te,CopyIcon:R,FileIcon:z,SaveIcon:Ve,ViewIcon:re,WarningIcon:de,VueMarkdown:Ie},directives:{loading:q},props:{skillId:{type:String,required:!0},path:{type:String,required:!0},editable:{type:Boolean,default:!1}},emits:[`save`],data(){return{MAX_PREVIEW_BYTES:$,loading:!1,error:``,contentType:``,size:0,textContent:``,imageUrl:``,truncated:!1,viewMode:`rendered`,dirty:!1,saving:!1}},computed:{kind(){return this.path?Et(this.path,this.contentType):`text`},canRender(){return this.kind===`markdown`||this.kind===`html`},hljsLang(){return`language-${Dt(this.path)}`},truncatedText(){return this.textContent}},watch:{path:{handler(){this.fetch()},immediate:!0}},beforeUnmount(){this.imageUrl&&URL.revokeObjectURL(this.imageUrl)},methods:{humanSize(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(2)} MB`},async fetch(){if(this.path){this.loading=!0,this.error=``,this.textContent=``,this.truncated=!1,this.dirty=!1,this.imageUrl&&=(URL.revokeObjectURL(this.imageUrl),``);try{let{blob:e,contentType:t}=await Z.fetchFile(this.skillId,this.path);this.contentType=t,this.size=e.size;let n=Et(this.path,t);if(n===`image`)this.imageUrl=URL.createObjectURL(e);else if(n!==`binary`){let t=await e.text();t.length>$&&(t=t.slice(0,$),this.truncated=!0),this.textContent=t,this.viewMode=n===`markdown`||n===`html`?`rendered`:`source`}}catch(e){let t=e,n=t?.response?.status,r=t?.response?.data?.detail||String(e);this.error=n?`(${n}) ${r}`:r}finally{this.loading=!1,this.$nextTick(()=>this.applyHighlight())}}},applyHighlight(){let e=this.$refs.codeEl;e&&this.kind===`code`&&this.viewMode!==`rendered`&&(delete e.dataset.highlighted,Y.highlightElement(e))},async onCopy(){if(this.textContent)try{await navigator.clipboard.writeText(this.textContent),T.success(this.$t(`skill.preview.copied`))}catch{T.error(this.$t(`skill.preview.copyFailed`))}},async onSave(){this.saving=!0;try{await new Promise((e,t)=>{this.$emit(`save`,this.textContent,{resolve:e,reject:t})}),this.dirty=!1}catch{}finally{this.saving=!1}}}}),kt={class:`preview-root`},At={class:`toolbar`},jt={class:`path-display`},Mt={key:0,class:`size-display`},Nt={class:`body`},Pt={key:0,class:`error`},Ft=[`srcdoc`],It={key:3,class:`image-pane`},Lt=[`src`,`alt`],Rt={key:4,class:`binary`},zt=[`placeholder`],Bt={key:6,class:`source-pane`},Vt={key:7,class:`truncated-warning`};function Ht(t,c,h,g,_,y){let b=l(`save-icon`),x=l(`el-button`),S=l(`copy-icon`),C=l(`el-tooltip`),w=l(`view-icon`),T=l(`el-tab-pane`),E=l(`code-icon`),D=l(`el-tabs`),O=l(`warning-icon`),k=l(`vue-markdown`),A=l(`file-icon`),j=m(`loading`);return d((v(),s(`div`,kt,[e(`div`,At,[e(`span`,jt,i(t.path||`—`),1),t.size?(v(),s(`span`,Mt,i(t.humanSize(t.size)),1)):o(``,!0),c[3]||=e(`span`,{class:`toolbar-spacer`},null,-1),t.editable?(v(),f(x,{key:1,type:`primary`,size:`small`,disabled:!t.dirty||t.saving,loading:t.saving,onClick:t.onSave},{default:p(()=>[a(b,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.button.save`)),1)]),_:1},8,[`disabled`,`loading`,`onClick`])):o(``,!0),a(C,{content:t.$t(`skill.preview.copy`),placement:`bottom`},{default:p(()=>[a(x,{size:`small`,circle:``,disabled:!t.textContent,"aria-label":t.$t(`skill.preview.copy`),title:t.$t(`skill.preview.copy`),onClick:t.onCopy},{default:p(()=>[a(S,{size:16,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`disabled`,`aria-label`,`title`,`onClick`])]),_:1},8,[`content`])]),t.canRender?(v(),f(D,{key:0,modelValue:t.viewMode,"onUpdate:modelValue":c[0]||=e=>t.viewMode=e,class:`view-tabs`},{default:p(()=>[a(T,{name:`rendered`},{label:p(()=>[a(w,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.preview.viewRendered`)),1)]),_:1}),a(T,{name:`source`},{label:p(()=>[a(E,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.preview.viewSource`)),1)]),_:1})]),_:1},8,[`modelValue`])):o(``,!0),e(`div`,Nt,[t.error?(v(),s(`div`,Pt,[a(O,{class:`mr-2`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.error),1)])):t.kind===`markdown`&&t.viewMode===`rendered`?(v(),f(k,{key:1,class:`markdown-rendered`,source:t.textContent,sanitize:``},null,8,[`source`])):t.kind===`html`&&t.viewMode===`rendered`?(v(),s(`iframe`,{key:2,ref:`htmlFrame`,class:`html-frame`,sandbox:``,srcdoc:t.textContent},null,8,Ft)):t.kind===`image`?(v(),s(`div`,It,[e(`img`,{src:t.imageUrl,alt:t.path,class:`image-content`},null,8,Lt)])):t.kind===`binary`?(v(),s(`div`,Rt,[a(A,{class:`binary-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,null,i(t.$t(`skill.preview.binary`,{type:t.contentType})),1)])):t.editable?d((v(),s(`textarea`,{key:5,"onUpdate:modelValue":c[1]||=e=>t.textContent=e,class:`source-editor`,spellcheck:`false`,placeholder:t.$t(`skill.placeholder.content`),onInput:c[2]||=e=>t.dirty=!0},null,40,zt)),[[u,t.textContent]]):(v(),s(`pre`,Bt,[e(`code`,{ref:`codeEl`,class:n(t.hljsLang)},i(t.truncatedText),3)])),t.truncated?(v(),s(`p`,Vt,i(t.$t(`skill.preview.truncated`,{size:t.humanSize(t.MAX_PREVIEW_BYTES)})),1)):o(``,!0)])])),[[j,t.loading]])}var Ut=U(Ot,[[`render`,Ht],[`__scopeId`,`data-v-ec0a447e`]]),Wt=new Set([`py`,`ts`,`tsx`,`js`,`jsx`,`json`,`yaml`,`yml`,`sh`,`bash`,`zsh`,`css`,`html`,`sql`,`go`,`rs`,`rb`,`java`,`cpp`,`c`,`h`,`toml`]),Gt=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`]);function Kt(e){let t=e.split(`/`).pop()||e,n=(t.split(`.`).pop()||``).toLowerCase();return t===`SKILL.md`?N:n===`md`?ie:Gt.has(n)?ae:Wt.has(n)?Be:z}function qt(e){let t=new Map;t.set(``,new Map);let n=(e,n)=>{let r=t.get(e);r||(r=new Map,t.set(e,r));let i=e?`${e}/${n}`:n,a=r.get(n);return a||(a={label:n,path:i,isLeaf:!1,children:[]},r.set(n,a),t.set(i,new Map)),a};for(let r of e){let e=r.split(`/`).filter(Boolean);if(e.length===0)continue;let i=e[e.length-1],a=e.slice(0,-1),o=``;for(let e of a)o=n(o,e).path;let s={label:i,path:r,isLeaf:!0},c=t.get(o);c||(c=new Map,t.set(o,c)),c.set(i,s)}let r=e=>{let n=t.get(e);if(!n)return[];let i=Array.from(n.values());for(let e of i)e.isLeaf||(e.children=r(e.path));return i.sort((e,t)=>e.path===`SKILL.md`?-1:t.path===`SKILL.md`?1:e.isLeaf===t.isLeaf?e.label.localeCompare(t.label):e.isLeaf?1:-1)};return r(``)}var Jt=y({name:`FileNode`,components:{ExpandDownIcon:P,ExpandRightIcon:F,FontAwesomeIcon:Fe},props:{node:{type:Object,required:!0},selectedSkillId:{type:String,required:!0},selectedPath:{type:String,required:!0},skill:{type:Object,required:!0},depth:{type:Number,default:1}},emits:[`select-file`],data(){return{open:!0}},computed:{indent(){return 8+this.depth*16},isActive(){return this.node.isLeaf&&this.selectedSkillId===this.skill.id&&this.selectedPath===this.node.path}},methods:{isHtmlFile(e){return e.isLeaf&&e.path.toLowerCase().endsWith(`.html`)},iconFor(e){return e.isLeaf?Kt(e.path):B},onClick(){this.node.isLeaf?this.$emit(`select-file`,this.node.path):this.open=!this.open}}}),Yt=[`aria-label`,`title`],Xt={key:1,class:`node-chevron-spacer`},Zt={class:`node-label`},Qt={key:0,class:`children`};function $t(r,a,u,d,p,m){let y=l(`expand-down-icon`),b=l(`expand-right-icon`),x=l(`font-awesome-icon`),S=l(`file-node`,!0);return v(),s(`li`,null,[e(`div`,{class:n([`file-node`,{active:r.isActive}]),style:h({paddingLeft:r.indent+`px`}),onClick:a[1]||=(...e)=>r.onClick&&r.onClick(...e)},[r.node.isLeaf?(v(),s(`span`,Xt)):(v(),s(`button`,{key:0,class:`node-chevron`,"aria-label":r.$t(r.open?`common.button.collapse`:`common.button.expand`),title:r.$t(r.open?`common.button.collapse`:`common.button.expand`),onClick:a[0]||=t(e=>r.open=!r.open,[`stop`])},[r.open?(v(),f(y,{key:0,size:14,"aria-hidden":`true`,focusable:`false`})):(v(),f(b,{key:1,size:14,"aria-hidden":`true`,focusable:`false`}))],8,Yt)),r.isHtmlFile(r.node)?(v(),f(x,{key:2,icon:`fa-brands fa-html5`,class:`node-icon`})):(v(),f(_(r.iconFor(r.node)),{key:3,class:`node-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,Zt,i(r.node.label),1)],6),!r.node.isLeaf&&r.open?(v(),s(`ul`,Qt,[(v(!0),s(c,null,g(r.node.children||[],e=>(v(),f(S,{key:e.path,node:e,"selected-skill-id":r.selectedSkillId,"selected-path":r.selectedPath,skill:r.skill,depth:r.depth+1,onSelectFile:a[2]||=e=>r.$emit(`select-file`,e)},null,8,[`node`,`selected-skill-id`,`selected-path`,`skill`,`depth`]))),128))])):o(``,!0)])}var en=y({name:`SkillRow`,components:{ExpandDownIcon:P,ExpandRightIcon:F,SkillIcon:se,FileNode:U(Jt,[[`render`,$t],[`__scopeId`,`data-v-5240087b`]])},props:{skill:{type:Object,required:!0},selectedSkillId:{type:String,required:!0},selectedPath:{type:String,required:!0},expanded:{type:Boolean,default:!1}},emits:[`toggle-expand`,`select-skill`,`select-file`],computed:{tree(){return qt(this.skill.asset_bundle_files)},hasChildren(){return this.skill.asset_bundle_files.length>1},isSkillSelected(){return this.selectedSkillId===this.skill.id&&!this.selectedPath}},methods:{onSelectFile(e){this.$emit(`select-file`,this.skill,e)}}}),tn={class:`skill-row-wrapper`},nn=[`aria-label`,`title`],rn={key:1,class:`row-chevron-spacer`},an=[`title`],on={key:0,class:`file-list`};function sn(r,u,d,p,m,h){let _=l(`expand-down-icon`),y=l(`expand-right-icon`),b=l(`skill-icon`),x=l(`file-node`);return v(),s(`li`,tn,[e(`div`,{class:n([`skill-row`,{active:r.isSkillSelected}]),onClick:u[1]||=e=>r.$emit(`select-skill`,r.skill)},[r.hasChildren?(v(),s(`button`,{key:0,class:`row-chevron`,"aria-label":r.$t(r.expanded?`common.button.collapse`:`common.button.expand`),title:r.$t(r.expanded?`common.button.collapse`:`common.button.expand`),onClick:u[0]||=t(e=>r.$emit(`toggle-expand`,r.skill),[`stop`])},[r.expanded?(v(),f(_,{key:0,size:14,"aria-hidden":`true`,focusable:`false`})):(v(),f(y,{key:1,size:14,"aria-hidden":`true`,focusable:`false`}))],8,nn)):(v(),s(`span`,rn)),a(b,{class:`row-icon`,size:16,"aria-hidden":`true`,focusable:`false`}),e(`span`,{class:`row-label`,title:r.skill.name},i(r.skill.slug),9,an)],2),r.expanded&&r.hasChildren?(v(),s(`ul`,on,[(v(!0),s(c,null,g(r.tree,e=>(v(),f(x,{key:e.path,node:e,"selected-skill-id":r.selectedSkillId,"selected-path":r.selectedPath,skill:r.skill,depth:1,onSelectFile:r.onSelectFile},null,8,[`node`,`selected-skill-id`,`selected-path`,`skill`,`onSelectFile`]))),128))])):o(``,!0)])}var cn=U(en,[[`render`,sn],[`__scopeId`,`data-v-231c2ce1`]]),ln=10*1024*1024,un=/\.(tar\.gz|tgz|tar|zip|md)$/i,dn=y({name:`UploadSkillDialog`,components:{ElDialog:G,ElButton:W,AddFileIcon:He,CloudUploadIcon:ze},props:{modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`,`created`],data(){return{file:null,isDragging:!1,uploading:!1}},methods:{onVisibleChange(e){this.$emit(`update:modelValue`,e)},onClose(){this.uploading||this.$emit(`update:modelValue`,!1)},reset(){this.file=null,this.isDragging=!1;let e=this.$refs.fileInput;e&&(e.value=``)},humanSize(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(2)} MB`},onPickFile(){this.uploading||this.$refs.fileInput?.click()},onFilePicked(e){let t=e.target.files?.[0]||null;this.acceptFile(t)},onDrop(e){this.isDragging=!1;let t=e.dataTransfer?.files?.[0]||null;this.acceptFile(t)},acceptFile(e){if(!e){this.file=null;return}if(e.size>ln){T.error(this.$t(`skill.message.fileTooLarge`));return}if(!un.test(e.name)){T.error(this.$t(`skill.message.fileTypeWrong`));return}this.file=e},extractError(e){let t=e;return t?.response?.data?.detail||(t?.response?.data?.content||[]).join(`; `)||String(e)||`unknown error`},async onSubmit(){if(this.file){this.uploading=!0;try{if(/\.md$/i.test(this.file.name)){let e=await this.file.text(),{data:t}=await Z.createMarkdown({content:e});T.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,t.id)}else{let{data:e}=await Z.createTarball(this.file);T.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,e.id)}this.$emit(`update:modelValue`,!1)}catch(e){T.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)}))}finally{this.uploading=!1}}}}}),fn={key:0,class:`dropzone-hint`},pn={key:1,class:`dropzone-file`},mn={class:`dropzone-file-name`},hn={class:`dropzone-file-size`},gn={class:`requirements`},_n={class:`requirements-title`};function vn(o,c,u,d,m,h){let g=l(`add-file-icon`),_=l(`el-button`),y=l(`cloud-upload-icon`),b=l(`el-dialog`);return v(),f(b,{"model-value":o.modelValue,title:o.$t(`skill.dialog.uploadTitle`),width:`min(520px, 94vw)`,"align-center":``,"close-on-click-modal":!o.uploading,"close-on-press-escape":!o.uploading,"show-close":!o.uploading,"onUpdate:modelValue":o.onVisibleChange,onClosed:o.reset},{footer:p(()=>[a(_,{disabled:o.uploading,onClick:o.onClose},{default:p(()=>[r(i(o.$t(`skill.button.cancel`)),1)]),_:1},8,[`disabled`,`onClick`]),a(_,{type:`primary`,loading:o.uploading,disabled:!o.file,onClick:o.onSubmit},{default:p(()=>[a(y,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(o.$t(`skill.button.create`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])]),default:p(()=>[e(`input`,{ref:`fileInput`,type:`file`,accept:`.tar.gz,.tgz,.tar,.zip,.md,application/gzip,application/zip,application/x-tar,text/markdown`,hidden:``,onChange:c[0]||=(...e)=>o.onFilePicked&&o.onFilePicked(...e)},null,544),e(`div`,{class:n([`dropzone`,{"is-dragging":o.isDragging,"has-file":!!o.file}]),onClick:c[1]||=(...e)=>o.onPickFile&&o.onPickFile(...e),onDragover:c[2]||=t(e=>o.isDragging=!0,[`prevent`]),onDragleave:c[3]||=t(e=>o.isDragging=!1,[`prevent`]),onDrop:c[4]||=t((...e)=>o.onDrop&&o.onDrop(...e),[`prevent`])},[a(g,{class:`dropzone-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),o.file?(v(),s(`p`,pn,[e(`span`,mn,i(o.file.name),1),e(`span`,hn,i(o.humanSize(o.file.size)),1)])):(v(),s(`p`,fn,i(o.$t(`skill.dialog.uploadDrop`)),1))],34),e(`div`,gn,[e(`p`,_n,i(o.$t(`skill.dialog.fileRequirements`)),1),e(`ul`,null,[e(`li`,null,i(o.$t(`skill.dialog.requirementMd`)),1),e(`li`,null,i(o.$t(`skill.dialog.requirementArchive`)),1)])])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`close-on-press-escape`,`show-close`,`onUpdate:modelValue`,`onClosed`])}var yn=U(dn,[[`render`,vn],[`__scopeId`,`data-v-01ead824`]]),bn=y({name:`WriteSkillDialog`,components:{ElDialog:G,ElButton:W,ElInput:H,CloudUploadIcon:ze},props:{modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`,`created`],data(){return{content:``,saving:!1}},methods:{onVisibleChange(e){this.$emit(`update:modelValue`,e)},onClose(){this.saving||this.$emit(`update:modelValue`,!1)},reset(){this.content=``},extractError(e){let t=e;return t?.response?.data?.detail||(t?.response?.data?.content||[]).join(`; `)||String(e)||`unknown error`},async onSubmit(){if(this.content.trim()){this.saving=!0;try{let{data:e}=await Z.createMarkdown({content:this.content});T.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,e.id),this.$emit(`update:modelValue`,!1)}catch(e){T.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)}))}finally{this.saving=!1}}}}}),xn={class:`hint`};function Sn(t,n,o,s,c,u){let d=l(`el-input`),m=l(`el-button`),h=l(`cloud-upload-icon`),g=l(`el-dialog`);return v(),f(g,{"model-value":t.modelValue,title:t.$t(`skill.dialog.writeTitle`),width:`min(720px, 94vw)`,"align-center":``,"close-on-click-modal":!t.saving,"close-on-press-escape":!t.saving,"show-close":!t.saving,"onUpdate:modelValue":t.onVisibleChange,onClosed:t.reset},{footer:p(()=>[a(m,{disabled:t.saving,onClick:t.onClose},{default:p(()=>[r(i(t.$t(`skill.button.cancel`)),1)]),_:1},8,[`disabled`,`onClick`]),a(m,{type:`primary`,loading:t.saving,disabled:!t.content.trim(),onClick:t.onSubmit},{default:p(()=>[a(h,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.button.create`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])]),default:p(()=>[e(`p`,xn,i(t.$t(`skill.dialog.writeHint`)),1),a(d,{modelValue:t.content,"onUpdate:modelValue":n[0]||=e=>t.content=e,type:`textarea`,rows:18,placeholder:t.$t(`skill.placeholder.content`),spellcheck:`false`,class:`editor`},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`close-on-press-escape`,`show-close`,`onUpdate:modelValue`,`onClosed`])}var Cn=y({name:`UserSkills`,components:{ConsolePageHeader:Le,ElInput:H,ElSwitch:A,ElTag:me,ElTooltip:w,ElDropdown:O,ElDropdownMenu:D,ElDropdownItem:E,AddIcon:V,AiCreateIcon:pe,DeleteIcon:ue,ExpandDownIcon:P,ExpandRightIcon:F,HelpIcon:L,MarketplaceIcon:ce,MoreIcon:ne,SearchIcon:le,SkillIcon:se,UploadIcon:fe,WriteIcon:ee,BrowseSkillsDialog:Tt,SkillFilePreview:Ut,SkillRow:cn,UploadSkillDialog:yn,WriteSkillDialog:U(bn,[[`render`,Sn],[`__scopeId`,`data-v-f39aab5d`]])},directives:{loading:q},data(){return{loading:!1,skills:[],togglingId:null,selectedSkillId:``,selectedPath:``,expandedSkillIds:[],personalOpen:!0,globalsOpen:!0,searchQuery:``,uploadVisible:!1,writeVisible:!1,browseVisible:!1}},computed:{personalSkills(){return this.skills.filter(e=>e.source!==`global`)},globalSkills(){return this.skills.filter(e=>e.source===`global`)},filteredPersonal(){return this.applyFilter(this.personalSkills)},filteredGlobal(){return this.applyFilter(this.globalSkills)},selectedSkill(){return this.skills.find(e=>e.id===this.selectedSkillId)||null}},mounted(){this.fetchSkills()},methods:{applyFilter(e){let t=this.searchQuery.trim().toLowerCase();return t?e.filter(e=>e.slug.toLowerCase().includes(t)||e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)):e},async fetchSkills(){this.loading=!0;try{let{data:e}=await Z.list();if(this.skills=e||[],!this.selectedSkillId&&this.skills.length){let e=this.personalSkills[0]||this.skills[0];this.selectedSkillId=e.id}else this.selectedSkillId&&!this.skills.find(e=>e.id===this.selectedSkillId)&&(this.selectedSkillId=``,this.selectedPath=``)}catch(e){console.error(e),T.error(this.$t(`skill.message.loadFailed`))}finally{this.loading=!1}},extractError(e){let t=e;return t?.response?.data?.detail||(t?.response?.data?.content||[]).join(`; `)||String(e)||`unknown error`},selectSkill(e){this.selectedSkillId=e.id,this.selectedPath=``},selectFile(e,t){this.selectedSkillId=e.id,this.selectedPath=t},toggleExpand(e){let t=this.expandedSkillIds.indexOf(e.id);t>=0?this.expandedSkillIds.splice(t,1):this.expandedSkillIds.push(e.id)},openUpload(){this.uploadVisible=!0},openWrite(){this.writeVisible=!0},onBrowse(){this.browseVisible=!0},async onCreated(e){await this.fetchSkills();let t=this.skills.find(t=>t.id===e);t&&(this.selectedSkillId=t.id,this.selectedPath=``,this.personalOpen=!0)},async onSaveContent(e,t){if(!this.selectedSkill){t.reject();return}try{let{data:n}=await Z.update(this.selectedSkill.id,{content:e});T.success(this.$t(`skill.message.updateSuccess`));let r=this.skills.findIndex(e=>e.id===n.id);r>=0&&this.skills.splice(r,1,n),t.resolve()}catch(e){T.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)})),t.reject(e)}},async onDelete(e){try{await ge.confirm(this.$t(`skill.message.deleteConfirm`,{slug:e.slug}),this.$t(`skill.button.delete`),{type:`warning`})}catch{return}try{await Z.remove(e.id),T.success(this.$t(`skill.message.deleteSuccess`)),this.selectedSkillId===e.id&&(this.selectedSkillId=``,this.selectedPath=``),await this.fetchSkills()}catch(e){T.error(this.extractError(e))}},async onToggleSkill(e,t){this.togglingId=e.id;try{t?(await Z.enable(e.id),T.success(this.$t(`skill.message.enableSuccess`))):(await Z.disable(e.id),T.success(this.$t(`skill.message.disableSuccess`))),e.enabled=t}catch(e){T.error(this.extractError(e))}finally{this.togglingId=null}}}}),wn={class:`skills-page`},Tn={class:`skills-shell`},En={class:`left-pane`},Dn={class:`left-header`},On=[`aria-label`,`title`],kn={class:`submenu-trigger`},An={class:`badge-soon`},jn={class:`left-body`},Mn={class:`section`},Nn={key:0,class:`skill-list`},Pn={key:0,class:`empty-row`},Fn={key:0,class:`section`},In={key:0,class:`skill-list`},Ln={class:`right-pane`},Rn={class:`right-header`},zn={class:`right-title`},Bn={class:`right-actions`},Vn=[`aria-label`,`title`],Hn={class:`meta-card`},Un={class:`meta-grid`},Wn={class:`meta-cell`},Gn={class:`meta-label`},Kn={class:`meta-value`},qn={class:`meta-cell`},Jn={class:`meta-label`},Yn={class:`meta-value`},Xn={key:0,class:`meta-cell`},Zn={class:`meta-label`},Qn={class:`meta-tags`},$n={key:0,class:`meta-description`},er={class:`meta-description-label`},tr={class:`meta-label`},nr={class:`preview-card`},rr={key:2,class:`right-empty`};function ir(t,n,u,h,_,y){let b=l(`console-page-header`),x=l(`search-icon`),S=l(`el-input`),C=l(`add-icon`),w=l(`marketplace-icon`),T=l(`el-dropdown-item`),E=l(`expand-right-icon`),D=l(`ai-create-icon`),O=l(`write-icon`),k=l(`upload-icon`),A=l(`el-dropdown-menu`),j=l(`el-dropdown`),M=l(`expand-down-icon`),N=l(`skill-row`),P=l(`el-switch`),F=l(`more-icon`),I=l(`delete-icon`),L=l(`el-tag`),ee=l(`help-icon`),te=l(`el-tooltip`),R=l(`skill-file-preview`),ne=l(`skill-icon`),re=l(`upload-skill-dialog`),ie=l(`write-skill-dialog`),z=l(`browse-skills-dialog`),B=m(`loading`);return v(),s(`div`,wn,[a(b,{title:t.$t(`skill.title.skills`),subtitle:t.$t(`skill.message.pageDescription`)},null,8,[`title`,`subtitle`]),e(`div`,Tn,[e(`aside`,En,[e(`header`,Dn,[a(S,{modelValue:t.searchQuery,"onUpdate:modelValue":n[0]||=e=>t.searchQuery=e,class:`search-input`,size:`default`,clearable:``,placeholder:t.$t(`skill.placeholder.search`)},{prefix:p(()=>[a(x,{size:14,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`modelValue`,`placeholder`]),a(j,{trigger:`click`,placement:`bottom-end`,"hide-on-click":!1},{dropdown:p(()=>[a(A,{class:`add-menu`},{default:p(()=>[a(T,{onClick:t.onBrowse},{default:p(()=>[a(w,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.browse`)),1)]),_:1},8,[`onClick`]),a(T,{divided:``},{default:p(()=>[a(j,{trigger:`hover`,placement:`left-start`,"hide-on-click":!0},{dropdown:p(()=>[a(A,{class:`add-menu`},{default:p(()=>[a(T,{disabled:``},{default:p(()=>[a(D,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.createWithClaude`))+` `,1),e(`span`,An,i(t.$t(`skill.menu.soon`)),1)]),_:1}),a(T,{onClick:t.openWrite},{default:p(()=>[a(O,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.write`)),1)]),_:1},8,[`onClick`]),a(T,{onClick:t.openUpload},{default:p(()=>[a(k,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.upload`)),1)]),_:1},8,[`onClick`])]),_:1})]),default:p(()=>[e(`span`,kn,[a(C,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.create`))+` `,1),a(E,{class:`submenu-arrow`,size:14,"aria-hidden":`true`,focusable:`false`})])]),_:1})]),_:1})]),_:1})]),default:p(()=>[e(`button`,{type:`button`,class:`add-button`,"aria-label":t.$t(`skill.button.add`),title:t.$t(`skill.button.add`)},[a(C,{size:16,"aria-hidden":`true`,focusable:`false`})],8,On)]),_:1})]),d((v(),s(`div`,jn,[e(`section`,Mn,[e(`button`,{class:`section-header`,onClick:n[1]||=e=>t.personalOpen=!t.personalOpen},[t.personalOpen?(v(),f(M,{key:0,class:`section-chevron`,size:12,"aria-hidden":`true`,focusable:`false`})):(v(),f(E,{key:1,class:`section-chevron`,size:12,"aria-hidden":`true`,focusable:`false`})),e(`span`,null,i(t.$t(`skill.section.personal`)),1)]),t.personalOpen?(v(),s(`ul`,Nn,[!t.loading&&t.filteredPersonal.length===0?(v(),s(`li`,Pn,i(t.searchQuery?t.$t(`skill.empty.search`):t.$t(`skill.message.noSkills`)),1)):o(``,!0),(v(!0),s(c,null,g(t.filteredPersonal,e=>(v(),f(N,{key:e.id,skill:e,"selected-skill-id":t.selectedSkillId,"selected-path":t.selectedPath,expanded:t.expandedSkillIds.includes(e.id),onToggleExpand:t.toggleExpand,onSelectSkill:t.selectSkill,onSelectFile:t.selectFile},null,8,[`skill`,`selected-skill-id`,`selected-path`,`expanded`,`onToggleExpand`,`onSelectSkill`,`onSelectFile`]))),128))])):o(``,!0)]),t.globalSkills.length>0?(v(),s(`section`,Fn,[e(`button`,{class:`section-header`,onClick:n[2]||=e=>t.globalsOpen=!t.globalsOpen},[t.globalsOpen?(v(),f(M,{key:0,class:`section-chevron`,size:12,"aria-hidden":`true`,focusable:`false`})):(v(),f(E,{key:1,class:`section-chevron`,size:12,"aria-hidden":`true`,focusable:`false`})),e(`span`,null,i(t.$t(`skill.section.platform`)),1)]),t.globalsOpen?(v(),s(`ul`,In,[(v(!0),s(c,null,g(t.filteredGlobal,e=>(v(),f(N,{key:e.id,skill:e,"selected-skill-id":t.selectedSkillId,"selected-path":t.selectedPath,expanded:t.expandedSkillIds.includes(e.id),onToggleExpand:t.toggleExpand,onSelectSkill:t.selectSkill,onSelectFile:t.selectFile},null,8,[`skill`,`selected-skill-id`,`selected-path`,`expanded`,`onToggleExpand`,`onSelectSkill`,`onSelectFile`]))),128))])):o(``,!0)])):o(``,!0)])),[[B,t.loading]])]),e(`main`,Ln,[t.selectedSkill&&!t.selectedPath?(v(),s(c,{key:0},[e(`header`,Rn,[e(`h3`,zn,i(t.selectedSkill.slug),1),e(`div`,Bn,[a(P,{"model-value":t.selectedSkill.enabled,size:`default`,loading:t.togglingId===t.selectedSkill.id,onChange:n[3]||=e=>t.onToggleSkill(t.selectedSkill,!!e)},null,8,[`model-value`,`loading`]),t.selectedSkill.source===`global`?o(``,!0):(v(),f(j,{key:0,trigger:`click`,placement:`bottom-end`},{dropdown:p(()=>[a(A,null,{default:p(()=>[a(T,{onClick:n[4]||=e=>t.onDelete(t.selectedSkill)},{default:p(()=>[a(I,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.button.delete`)),1)]),_:1})]),_:1})]),default:p(()=>[e(`button`,{class:`icon-btn`,"aria-label":t.$t(`skill.button.more`),title:t.$t(`skill.button.more`)},[a(F,{size:16,"aria-hidden":`true`,focusable:`false`})],8,Vn)]),_:1}))])]),e(`div`,Hn,[e(`div`,Un,[e(`div`,Wn,[e(`span`,Gn,i(t.$t(`skill.meta.addedBy`)),1),e(`span`,Kn,i(t.selectedSkill.source===`global`?t.$t(`skill.meta.platform`):t.$t(`skill.meta.you`)),1)]),e(`div`,qn,[e(`span`,Jn,i(t.$t(`skill.meta.lastUpdated`)),1),e(`span`,Yn,i(t.$dayjs.format(t.selectedSkill.updated_at)),1)]),t.selectedSkill.required_connections.length?(v(),s(`div`,Xn,[e(`span`,Zn,i(t.$t(`skill.field.requiredConnections`)),1),e(`div`,Qn,[(v(!0),s(c,null,g(t.selectedSkill.required_connections,e=>(v(),f(L,{key:e,size:`small`,type:`info`},{default:p(()=>[r(i(e),1)]),_:2},1024))),128))])])):o(``,!0)]),t.selectedSkill.description?(v(),s(`div`,$n,[e(`div`,er,[e(`span`,tr,i(t.$t(`skill.field.description`)),1),t.selectedSkill.when_to_use?(v(),f(te,{key:0,content:t.selectedSkill.when_to_use,placement:`top`},{default:p(()=>[a(ee,{class:`meta-info-icon`,size:12,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`content`])):o(``,!0)]),e(`p`,null,i(t.selectedSkill.description),1)])):o(``,!0)]),e(`div`,nr,[(v(),f(R,{key:`${t.selectedSkill.id}:SKILL.md`,"skill-id":t.selectedSkill.id,path:`SKILL.md`,editable:t.selectedSkill.source===`upload`,onSave:t.onSaveContent},null,8,[`skill-id`,`editable`,`onSave`]))])],64)):t.selectedSkill&&t.selectedPath?(v(),f(R,{key:`${t.selectedSkill.id}:${t.selectedPath}`,"skill-id":t.selectedSkill.id,path:t.selectedPath,editable:!1},null,8,[`skill-id`,`path`])):(v(),s(`div`,rr,[a(ne,{class:`right-empty-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,null,i(t.$t(`skill.preview.selectSkill`)),1)]))])]),a(re,{modelValue:t.uploadVisible,"onUpdate:modelValue":n[5]||=e=>t.uploadVisible=e,onCreated:t.onCreated},null,8,[`modelValue`,`onCreated`]),a(ie,{modelValue:t.writeVisible,"onUpdate:modelValue":n[6]||=e=>t.writeVisible=e,onCreated:t.onCreated},null,8,[`modelValue`,`onCreated`]),a(z,{modelValue:t.browseVisible,"onUpdate:modelValue":n[7]||=e=>t.browseVisible=e,onInstalled:t.onCreated},null,8,[`modelValue`,`onInstalled`])])}var ar=U(Cn,[[`render`,ir],[`__scopeId`,`data-v-e3209347`]]);export{ar as default};
1
+ import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,b as u,ht as d,j as f,mt as p,ot as m,qt as h,rt as g,st as _,tt as v,z as y}from"./vendor-chart-Dw-P17PN.js";import{r as b,t as x}from"./select-B_3B-Qv5.js";import{n as S,t as C}from"./tabs-CEdTUVdB.js";import{t as w}from"./tooltip-B_iaC3Gn.js";import{v as T}from"./models-yTQ4rqqP.js";import{n as E,r as D,t as O}from"./dropdown-BK65Zqgh.js";import{t as k}from"./pagination-BBfceYoT.js";import{t as A}from"./switch-Ci9Eyj4h.js";import{t as j}from"./arrow-down-ccyVeSHM.js";import{t as M}from"./arrow-left-7KP6vKg8.js";import{t as N}from"./book-open-jDKIXQ2F.js";import{t as P}from"./chevron-down-BolLcOSJ.js";import{t as F}from"./chevron-right-BDq7tif-.js";import{t as I}from"./circle-check-DW1hj0fx.js";import{t as L}from"./circle-question-mark-B40DB-Jx.js";import{t as ee}from"./clipboard-list-CnwZKbzu.js";import{t as te}from"./code-JkJhGonk.js";import{t as R}from"./copy-C1D5Q7eY.js";import{t as ne}from"./ellipsis-mkMtbSt-.js";import{t as re}from"./eye-FoDN8Q8h.js";import{t as ie}from"./file-text-DGYMvEfq.js";import{t as z}from"./file-D0SgRGM7.js";import{t as B}from"./folder-ZGtAORlZ.js";import{t as ae}from"./image-DtMNvGee.js";import{t as oe}from"./lock-6_gfho6p.js";import{t as V}from"./plus-NK33PnKk.js";import{n as se,t as ce}from"./store-C7SsbGqi.js";import{t as le}from"./search-DA8Y8CsJ.js";import{t as ue}from"./trash-2-4nW6BMaD.js";import{t as de}from"./triangle-alert-Crhi8w_z.js";import{t as fe}from"./upload-BiHjB1QO.js";import{t as pe}from"./wand-sparkles-D4VBJVCS.js";import{Hi as H,Mi as me,O as U,Pi as W,Ti as G,Tr as K,ai as he,bi as ge,di as _e,fi as ve,gi as ye,si as be,ui as xe,xi as q,yi as J}from"./index-DVfw2ekC.js";import{a as Se,c as Ce,d as we,f as Te,i as Ee,l as De,m as Y,n as Oe,o as ke,p as Ae,r as je,s as Me,t as Ne,u as Pe}from"./vendor-highlight-BHrfT4-E.js";import{t as Fe}from"./index.es-01zg3uVq.js";import{t as Ie}from"./VueMarkdown-CiiRjbWs.js";import{t as Le}from"./PageHeader-BhoLRNhY.js";var Re=J(`cloud-download`,[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]]),ze=J(`cloud-upload`,[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`m8 17 4-4 4 4`,key:`1quai1`}]]),Be=J(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),Ve=J(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),He=J(`square-plus`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),X=()=>({baseURL:`${he()}/api/v1`}),Z=new class{key=`skills/installed`;async list(){return K.get(`/${this.key}/`,X())}async get(e){return K.get(`/${this.key}/${e}/`,X())}async createMarkdown(e){return K.post(`/${this.key}/`,e,X())}async createTarball(e){let t=new FormData;return t.append(`tarball`,e),K.post(`/${this.key}/`,t,{...X(),headers:{"Content-Type":`multipart/form-data`}})}async update(e,t){return K.patch(`/${this.key}/${e}/`,t,X())}async remove(e){return K.delete(`/${this.key}/${e}/`,X())}async enable(e){return K.post(`/${this.key}/${e}/enable/`,void 0,X())}async disable(e){return K.post(`/${this.key}/${e}/disable/`,void 0,X())}async fetchFile(e,t){let n=await K.get(`/${this.key}/${e}/files/`,{...X(),params:{path:t},responseType:`arraybuffer`}),r=n.headers[`content-type`]||`application/octet-stream`;return{blob:new Blob([n.data],{type:r}),contentType:r}}},Q=new class{key=`skills`;async list(e={}){return K.get(`/${this.key}/`,{...X(),params:e})}async get(e){return K.get(`/${this.key}/${e}/`,X())}async categories(){return K.get(`/${this.key}/categories/`,X())}async install(e,t={}){return K.post(`/${this.key}/${e}/install/`,t,X())}};function Ue(){let e=new Set;_e()&&e.add(`desktop`),ve()&&e.add(`ios`),xe()&&e.add(`android`),ye()&&e.add(`web`);let t=be();if(t===`mac`)e.add(`mac`);else if(t===`windows`)e.add(`windows`);else if(typeof navigator<`u`){let t=navigator.userAgent||``,n=navigator.userAgentData?.platform,r=/macintosh/i.test(t)&&(navigator.maxTouchPoints||0)>1;!ve()&&!r&&(n===`macOS`||/mac os x|macintosh/i.test(t))&&e.add(`mac`),(n===`Windows`||/windows nt/i.test(t))&&e.add(`windows`)}return e}var We=new Set([`mac`,`windows`,`desktop`,`web`,`ios`,`android`]);function Ge(e){let t=e.filter(e=>We.has(e));if(!t.length)return!0;let n=Ue();return t.some(e=>n.has(e))}Y.registerLanguage(`bash`,Ae),Y.registerLanguage(`json`,Te),Y.registerLanguage(`markdown`,we),Y.registerLanguage(`python`,Pe),Y.registerLanguage(`shell`,De),Y.registerLanguage(`yaml`,Ce),Y.registerAliases([`yml`],{languageName:`yaml`}),Y.registerAliases([`py`],{languageName:`python`}),Y.registerAliases([`sh`,`zsh`],{languageName:`bash`});var Ke=12,qe=y({name:`BrowseSkillsDialog`,components:{VueMarkdown:Ie,ElDialog:G,ElInput:H,ElButton:W,ElPagination:k,ElSelect:b,ElOption:x,FontAwesomeIcon:Fe,AddIcon:V,BackIcon:M,DownIcon:j,InstallIcon:Re,LockIcon:oe,SearchIcon:le,SuccessIcon:I},directives:{loading:q},props:{modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`,`installed`],data(){return{loading:!1,installing:!1,items:[],total:0,currentPage:1,searchQuery:``,namespaceFilter:``,sortBy:`popular`,selectedItem:null,searchTimer:null,knownNamespaces:[],publisherByNamespace:{}}},computed:{pageSize(){return Ke},namespaceOptions(){let e=new Set(this.knownNamespaces);for(let t of this.items)e.add(t.namespace);return Array.from(e).sort().map(e=>({value:e,label:this.publisherForNamespace(e)}))},detailBody(){return this.selectedItem?this.selectedItem.content.replace(/^---\n[\s\S]*?\n---\n?/,``):``}},methods:{onOpen(){this.selectedItem=null,this.searchQuery=``,this.namespaceFilter=``,this.sortBy=`popular`,this.currentPage=1,this.knownNamespaces=[],this.publisherByNamespace={},this.loadFacets(),this.reload()},openDetail(e){this.selectedItem=e},async loadFacets(){try{let{data:e}=await Q.categories(),t=new Set;for(let n of e.namespaces)t.add(n.namespace);this.knownNamespaces=Array.from(t).sort()}catch(e){console.warn(`failed to load skill catalog facets`,e)}},reloadFromFirstPage(){this.currentPage=1,this.reload()},onPageChange(e){this.currentPage=e,this.reload(),this.$nextTick(()=>{let e=this.$el.querySelector(`.directory-grid-wrapper`);e&&(e.scrollTop=0)})},onSearchInput(){this.searchTimer!==null&&window.clearTimeout(this.searchTimer),this.searchTimer=window.setTimeout(()=>{this.searchTimer=null,this.reloadFromFirstPage()},250)},async reload(){this.loading=!0;try{let{data:e}=await Q.list({q:this.searchQuery.trim()||void 0,namespace:this.namespaceFilter||void 0,sort:this.sortBy,limit:this.pageSize,offset:(this.currentPage-1)*this.pageSize});this.items=e.items,this.total=e.total;for(let t of e.items)t.publisher&&(this.publisherByNamespace[t.namespace]=t.publisher)}catch(e){console.error(e),T.error(this.$t(`skill.directory.loadFailed`))}finally{this.loading=!1}},async onInstall(e){if(!this.installing&&!e.installed){if(!this.canInstallOnSurface(e)){T.warning(this.$t(`skill.directory.surfaceBlocked`,{platforms:this.surfaceLabels(e)}));return}this.installing=!0;try{let{data:t}=await Q.install(e.id);T.success(this.$t(`skill.directory.installSuccess`,{name:e.slug})),this.$emit(`installed`,t.id),e.installed=!0,e.install_count+=1}catch(t){let n=this.extractError(t);n.includes(`already exists`)?(e.installed=!0,T.warning(this.$t(`skill.directory.alreadyInstalled`,{name:e.slug}))):T.error(this.$t(`skill.directory.installFailed`,{detail:n}))}finally{this.installing=!1}}},extractError(e){return e?.response?.data?.detail||String(e)||`unknown error`},formatCount(e){return e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)},publisherForNamespace(e){if(this.publisherByNamespace[e])return this.publisherByNamespace[e];let t=this.items.find(t=>t.namespace===e);return t?t.publisher:e},restrictedSurfaces(e){let t=e.frontmatter?.surfaces;return Array.isArray(t)?t.filter(e=>typeof e==`string`&&e.trim().length>0).map(e=>e.trim().toLowerCase()):[]},surfaceLabel(e){let t=`skill.directory.surface.${e}`,n=this.$t(t);return n===t?e:n},surfaceLabels(e){return this.restrictedSurfaces(e).map(e=>this.surfaceLabel(e)).join(` / `)},canInstallOnSurface(e){return Ge(this.restrictedSurfaces(e))}}}),Je={class:`directory`},Ye={class:`directory-main`},Xe={class:`directory-header`},Ze={class:`directory-controls`},Qe={class:`directory-grid-wrapper`},$e={key:0,class:`directory-empty`},et={key:1,class:`directory-grid`},tt=[`onClick`],nt={class:`directory-card-head`},rt={class:`directory-card-title`},it=[`title`],at=[`title`],ot=[`aria-label`,`title`,`onClick`],st=[`title`],ct={class:`directory-card-meta`},lt={class:`directory-card-publisher`},ut={key:0,class:`directory-card-count`},dt=[`title`],ft={class:`directory-card-desc`},pt={key:0,class:`directory-footer`},mt={class:`directory-detail-head`},ht={class:`directory-detail-actions`},gt=[`href`],_t={class:`directory-detail-body`},vt={class:`directory-detail-title`},yt={class:`directory-detail-meta`},bt={key:0},xt={key:1},St=[`title`],Ct={class:`directory-detail-desc`};function wt(u,h,_,y,b,x){let S=l(`search-icon`),C=l(`el-input`),w=l(`el-option`),T=l(`el-select`),E=l(`success-icon`),D=l(`lock-icon`),O=l(`add-icon`),k=l(`down-icon`),A=l(`el-pagination`),j=l(`back-icon`),M=l(`font-awesome-icon`),N=l(`el-button`),P=l(`install-icon`),F=l(`vue-markdown`),I=l(`el-dialog`),L=m(`loading`);return v(),f(I,{"model-value":u.modelValue,title:u.$t(`skill.dialog.directoryTitle`),width:`min(960px, 94vw)`,"align-center":``,class:`directory-dialog`,"close-on-click-modal":!u.installing,"show-close":!u.installing,"onUpdate:modelValue":h[5]||=e=>u.$emit(`update:modelValue`,e),onOpen:u.onOpen},{default:p(()=>[e(`div`,Je,[e(`main`,Ye,[u.selectedItem?(v(),s(c,{key:1},[e(`header`,mt,[e(`button`,{class:`directory-back-btn`,onClick:h[3]||=e=>u.selectedItem=null},[a(j,{size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`skill.directory.back`)),1)]),e(`div`,ht,[u.selectedItem.source_url?(v(),s(`a`,{key:0,href:u.selectedItem.source_url,target:`_blank`,class:`directory-link`},[a(M,{icon:`fa-brands fa-github`}),r(` `+i(u.$t(`skill.directory.viewSource`)),1)],8,gt)):o(``,!0),u.selectedItem.installed?(v(),f(N,{key:1,disabled:``,type:`success`,plain:``},{default:p(()=>[a(E,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`skill.directory.installed`)),1)]),_:1})):u.selectedItem.installable&&!u.canInstallOnSurface(u.selectedItem)?(v(),f(N,{key:2,disabled:``,title:u.$t(`skill.directory.surfaceBlocked`,{platforms:u.surfaceLabels(u.selectedItem)})},{default:p(()=>[a(D,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`skill.directory.surfaceUnavailable`)),1)]),_:1},8,[`title`])):u.selectedItem.installable?(v(),f(N,{key:3,type:`primary`,loading:u.installing,onClick:h[4]||=e=>u.onInstall(u.selectedItem)},{default:p(()=>[a(P,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`skill.directory.install`)),1)]),_:1},8,[`loading`])):(v(),f(N,{key:4,disabled:``,title:u.selectedItem.license},{default:p(()=>[a(D,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.selectedItem.license||u.$t(`skill.directory.notInstallable`)),1)]),_:1},8,[`title`]))])]),e(`div`,_t,[e(`h2`,vt,`/`+i(u.selectedItem.slug),1),e(`div`,yt,[e(`span`,null,[e(`strong`,null,i(u.$t(`skill.meta.addedBy`))+`:`,1),r(` `+i(u.selectedItem.publisher),1)]),u.selectedItem.license?(v(),s(`span`,bt,[e(`strong`,null,i(u.$t(`skill.directory.license`))+`:`,1),r(` `+i(u.selectedItem.license),1)])):o(``,!0),u.selectedItem.version?(v(),s(`span`,xt,`v`+i(u.selectedItem.version),1)):o(``,!0),u.surfaceLabels(u.selectedItem)?(v(),s(`span`,{key:2,class:`directory-detail-surface`,title:u.$t(`skill.directory.surfaceHint`)},i(u.$t(`skill.directory.surfaceOnly`,{platforms:u.surfaceLabels(u.selectedItem)})),9,St)):o(``,!0)]),e(`p`,Ct,i(u.selectedItem.description),1),a(F,{class:`directory-detail-content`,source:u.detailBody,sanitize:``},null,8,[`source`])])],64)):(v(),s(c,{key:0},[e(`header`,Xe,[a(C,{modelValue:u.searchQuery,"onUpdate:modelValue":h[0]||=e=>u.searchQuery=e,class:`directory-search`,size:`default`,clearable:``,placeholder:u.$t(`skill.directory.searchPlaceholder`),onInput:u.onSearchInput},{prefix:p(()=>[a(S,{size:14,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`modelValue`,`placeholder`,`onInput`]),e(`div`,Ze,[a(T,{modelValue:u.namespaceFilter,"onUpdate:modelValue":h[1]||=e=>u.namespaceFilter=e,class:`directory-select`,placeholder:u.$t(`skill.directory.allPublishers`),clearable:``,size:`default`,onChange:u.reloadFromFirstPage},{default:p(()=>[(v(!0),s(c,null,g(u.namespaceOptions,e=>(v(),f(w,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`onChange`]),a(T,{modelValue:u.sortBy,"onUpdate:modelValue":h[2]||=e=>u.sortBy=e,class:`directory-select directory-select-sm`,size:`default`,onChange:u.reloadFromFirstPage},{default:p(()=>[a(w,{label:u.$t(`skill.directory.sort.popular`),value:`popular`},null,8,[`label`]),a(w,{label:u.$t(`skill.directory.sort.recent`),value:`recent`},null,8,[`label`]),a(w,{label:u.$t(`skill.directory.sort.name`),value:`name`},null,8,[`label`])]),_:1},8,[`modelValue`,`onChange`])])]),d((v(),s(`div`,Qe,[!u.loading&&u.total===0?(v(),s(`p`,$e,i(u.$t(`skill.directory.empty`)),1)):(v(),s(`div`,et,[(v(!0),s(c,null,g(u.items,c=>(v(),s(`article`,{key:c.id,class:n([`directory-card`,{"is-installed":c.installed}]),onClick:e=>u.openDetail(c)},[e(`div`,nt,[e(`span`,rt,`/`+i(c.slug),1),c.installed?(v(),s(`span`,{key:0,class:`directory-card-action is-installed`,title:u.$t(`skill.directory.installed`)},[a(E,{size:16,"aria-hidden":`true`,focusable:`false`})],8,it)):c.installable&&!u.canInstallOnSurface(c)?(v(),s(`span`,{key:1,class:`directory-card-locked`,title:u.$t(`skill.directory.surfaceBlocked`,{platforms:u.surfaceLabels(c)})},[a(D,{size:16,"aria-hidden":`true`,focusable:`false`})],8,at)):c.installable?(v(),s(`button`,{key:2,class:`directory-card-action`,"aria-label":u.$t(`skill.directory.install`),title:u.$t(`skill.directory.install`),onClick:t(e=>u.onInstall(c),[`stop`])},[a(O,{size:16,"aria-hidden":`true`,focusable:`false`})],8,ot)):(v(),s(`span`,{key:3,class:`directory-card-locked`,title:c.license},[a(D,{size:16,"aria-hidden":`true`,focusable:`false`})],8,st))]),e(`div`,ct,[e(`span`,lt,i(c.publisher),1),c.install_count>0?(v(),s(`span`,ut,[a(k,{size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.formatCount(c.install_count)),1)])):o(``,!0),u.surfaceLabels(c)?(v(),s(`span`,{key:1,class:`directory-card-surface`,title:u.$t(`skill.directory.surfaceHint`)},i(u.surfaceLabels(c)),9,dt)):o(``,!0)]),e(`p`,ft,i(c.description),1)],10,tt))),128))]))])),[[L,u.loading]]),u.total>u.pageSize?(v(),s(`footer`,pt,[a(A,{"current-page":u.currentPage,"page-size":u.pageSize,total:u.total,"pager-count":5,background:``,layout:`prev, pager, next, total`,onCurrentChange:u.onPageChange},null,8,[`current-page`,`page-size`,`total`,`onCurrentChange`])])):o(``,!0)],64))])])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`show-close`,`onOpen`])}var Tt=U(qe,[[`render`,wt],[`__scopeId`,`data-v-a9be2dc3`]]);Y.registerLanguage(`bash`,Ae),Y.registerLanguage(`css`,Me),Y.registerLanguage(`go`,ke),Y.registerLanguage(`javascript`,Se),Y.registerLanguage(`json`,Te),Y.registerLanguage(`markdown`,we),Y.registerLanguage(`python`,Pe),Y.registerLanguage(`rust`,Ee),Y.registerLanguage(`shell`,De),Y.registerLanguage(`sql`,je),Y.registerLanguage(`typescript`,Oe),Y.registerLanguage(`xml`,Ne),Y.registerLanguage(`html`,Ne),Y.registerLanguage(`yaml`,Ce),Y.registerAliases([`yml`],{languageName:`yaml`}),Y.registerAliases([`ts`,`tsx`],{languageName:`typescript`}),Y.registerAliases([`js`,`jsx`],{languageName:`javascript`}),Y.registerAliases([`py`],{languageName:`python`}),Y.registerAliases([`rs`],{languageName:`rust`}),Y.registerAliases([`sh`,`zsh`],{languageName:`bash`});var $=1e6;function Et(e,t){let n=(e.split(`.`).pop()||``).toLowerCase();return n===`md`||t.startsWith(`text/markdown`)?`markdown`:n===`html`||n===`htm`||t.startsWith(`text/html`)?`html`:t.startsWith(`image/`)||[`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`].includes(n)?`image`:t.startsWith(`text/`)||[`json`,`application/json`].includes(t.split(`;`)[0])?n?`code`:`text`:`binary`}function Dt(e){let t=(e.split(`.`).pop()||``).toLowerCase();return Y.getLanguage(t)?t:`plain`}var Ot=y({name:`SkillFilePreview`,components:{ElButton:W,ElTooltip:w,ElTabs:S,ElTabPane:C,CodeIcon:te,CopyIcon:R,FileIcon:z,SaveIcon:Ve,ViewIcon:re,WarningIcon:de,VueMarkdown:Ie},directives:{loading:q},props:{skillId:{type:String,required:!0},path:{type:String,required:!0},editable:{type:Boolean,default:!1}},emits:[`save`],data(){return{MAX_PREVIEW_BYTES:$,loading:!1,error:``,contentType:``,size:0,textContent:``,imageUrl:``,truncated:!1,viewMode:`rendered`,dirty:!1,saving:!1}},computed:{kind(){return this.path?Et(this.path,this.contentType):`text`},canRender(){return this.kind===`markdown`||this.kind===`html`},hljsLang(){return`language-${Dt(this.path)}`},truncatedText(){return this.textContent}},watch:{path:{handler(){this.fetch()},immediate:!0}},beforeUnmount(){this.imageUrl&&URL.revokeObjectURL(this.imageUrl)},methods:{humanSize(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(2)} MB`},async fetch(){if(this.path){this.loading=!0,this.error=``,this.textContent=``,this.truncated=!1,this.dirty=!1,this.imageUrl&&=(URL.revokeObjectURL(this.imageUrl),``);try{let{blob:e,contentType:t}=await Z.fetchFile(this.skillId,this.path);this.contentType=t,this.size=e.size;let n=Et(this.path,t);if(n===`image`)this.imageUrl=URL.createObjectURL(e);else if(n!==`binary`){let t=await e.text();t.length>$&&(t=t.slice(0,$),this.truncated=!0),this.textContent=t,this.viewMode=n===`markdown`||n===`html`?`rendered`:`source`}}catch(e){let t=e,n=t?.response?.status,r=t?.response?.data?.detail||String(e);this.error=n?`(${n}) ${r}`:r}finally{this.loading=!1,this.$nextTick(()=>this.applyHighlight())}}},applyHighlight(){let e=this.$refs.codeEl;e&&this.kind===`code`&&this.viewMode!==`rendered`&&(delete e.dataset.highlighted,Y.highlightElement(e))},async onCopy(){if(this.textContent)try{await navigator.clipboard.writeText(this.textContent),T.success(this.$t(`skill.preview.copied`))}catch{T.error(this.$t(`skill.preview.copyFailed`))}},async onSave(){this.saving=!0;try{await new Promise((e,t)=>{this.$emit(`save`,this.textContent,{resolve:e,reject:t})}),this.dirty=!1}catch{}finally{this.saving=!1}}}}),kt={class:`preview-root`},At={class:`toolbar`},jt={class:`path-display`},Mt={key:0,class:`size-display`},Nt={class:`body`},Pt={key:0,class:`error`},Ft=[`srcdoc`],It={key:3,class:`image-pane`},Lt=[`src`,`alt`],Rt={key:4,class:`binary`},zt=[`placeholder`],Bt={key:6,class:`source-pane`},Vt={key:7,class:`truncated-warning`};function Ht(t,c,h,g,_,y){let b=l(`save-icon`),x=l(`el-button`),S=l(`copy-icon`),C=l(`el-tooltip`),w=l(`view-icon`),T=l(`el-tab-pane`),E=l(`code-icon`),D=l(`el-tabs`),O=l(`warning-icon`),k=l(`vue-markdown`),A=l(`file-icon`),j=m(`loading`);return d((v(),s(`div`,kt,[e(`div`,At,[e(`span`,jt,i(t.path||`—`),1),t.size?(v(),s(`span`,Mt,i(t.humanSize(t.size)),1)):o(``,!0),c[3]||=e(`span`,{class:`toolbar-spacer`},null,-1),t.editable?(v(),f(x,{key:1,type:`primary`,size:`small`,disabled:!t.dirty||t.saving,loading:t.saving,onClick:t.onSave},{default:p(()=>[a(b,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.button.save`)),1)]),_:1},8,[`disabled`,`loading`,`onClick`])):o(``,!0),a(C,{content:t.$t(`skill.preview.copy`),placement:`bottom`},{default:p(()=>[a(x,{size:`small`,circle:``,disabled:!t.textContent,"aria-label":t.$t(`skill.preview.copy`),title:t.$t(`skill.preview.copy`),onClick:t.onCopy},{default:p(()=>[a(S,{size:16,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`disabled`,`aria-label`,`title`,`onClick`])]),_:1},8,[`content`])]),t.canRender?(v(),f(D,{key:0,modelValue:t.viewMode,"onUpdate:modelValue":c[0]||=e=>t.viewMode=e,class:`view-tabs`},{default:p(()=>[a(T,{name:`rendered`},{label:p(()=>[a(w,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.preview.viewRendered`)),1)]),_:1}),a(T,{name:`source`},{label:p(()=>[a(E,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.preview.viewSource`)),1)]),_:1})]),_:1},8,[`modelValue`])):o(``,!0),e(`div`,Nt,[t.error?(v(),s(`div`,Pt,[a(O,{class:`mr-2`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.error),1)])):t.kind===`markdown`&&t.viewMode===`rendered`?(v(),f(k,{key:1,class:`markdown-rendered`,source:t.textContent,sanitize:``},null,8,[`source`])):t.kind===`html`&&t.viewMode===`rendered`?(v(),s(`iframe`,{key:2,ref:`htmlFrame`,class:`html-frame`,sandbox:``,srcdoc:t.textContent},null,8,Ft)):t.kind===`image`?(v(),s(`div`,It,[e(`img`,{src:t.imageUrl,alt:t.path,class:`image-content`},null,8,Lt)])):t.kind===`binary`?(v(),s(`div`,Rt,[a(A,{class:`binary-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,null,i(t.$t(`skill.preview.binary`,{type:t.contentType})),1)])):t.editable?d((v(),s(`textarea`,{key:5,"onUpdate:modelValue":c[1]||=e=>t.textContent=e,class:`source-editor`,spellcheck:`false`,placeholder:t.$t(`skill.placeholder.content`),onInput:c[2]||=e=>t.dirty=!0},null,40,zt)),[[u,t.textContent]]):(v(),s(`pre`,Bt,[e(`code`,{ref:`codeEl`,class:n(t.hljsLang)},i(t.truncatedText),3)])),t.truncated?(v(),s(`p`,Vt,i(t.$t(`skill.preview.truncated`,{size:t.humanSize(t.MAX_PREVIEW_BYTES)})),1)):o(``,!0)])])),[[j,t.loading]])}var Ut=U(Ot,[[`render`,Ht],[`__scopeId`,`data-v-ec0a447e`]]),Wt=new Set([`py`,`ts`,`tsx`,`js`,`jsx`,`json`,`yaml`,`yml`,`sh`,`bash`,`zsh`,`css`,`html`,`sql`,`go`,`rs`,`rb`,`java`,`cpp`,`c`,`h`,`toml`]),Gt=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`]);function Kt(e){let t=e.split(`/`).pop()||e,n=(t.split(`.`).pop()||``).toLowerCase();return t===`SKILL.md`?N:n===`md`?ie:Gt.has(n)?ae:Wt.has(n)?Be:z}function qt(e){let t=new Map;t.set(``,new Map);let n=(e,n)=>{let r=t.get(e);r||(r=new Map,t.set(e,r));let i=e?`${e}/${n}`:n,a=r.get(n);return a||(a={label:n,path:i,isLeaf:!1,children:[]},r.set(n,a),t.set(i,new Map)),a};for(let r of e){let e=r.split(`/`).filter(Boolean);if(e.length===0)continue;let i=e[e.length-1],a=e.slice(0,-1),o=``;for(let e of a)o=n(o,e).path;let s={label:i,path:r,isLeaf:!0},c=t.get(o);c||(c=new Map,t.set(o,c)),c.set(i,s)}let r=e=>{let n=t.get(e);if(!n)return[];let i=Array.from(n.values());for(let e of i)e.isLeaf||(e.children=r(e.path));return i.sort((e,t)=>e.path===`SKILL.md`?-1:t.path===`SKILL.md`?1:e.isLeaf===t.isLeaf?e.label.localeCompare(t.label):e.isLeaf?1:-1)};return r(``)}var Jt=y({name:`FileNode`,components:{ExpandDownIcon:P,ExpandRightIcon:F,FontAwesomeIcon:Fe},props:{node:{type:Object,required:!0},selectedSkillId:{type:String,required:!0},selectedPath:{type:String,required:!0},skill:{type:Object,required:!0},depth:{type:Number,default:1}},emits:[`select-file`],data(){return{open:!0}},computed:{indent(){return 8+this.depth*16},isActive(){return this.node.isLeaf&&this.selectedSkillId===this.skill.id&&this.selectedPath===this.node.path}},methods:{isHtmlFile(e){return e.isLeaf&&e.path.toLowerCase().endsWith(`.html`)},iconFor(e){return e.isLeaf?Kt(e.path):B},onClick(){this.node.isLeaf?this.$emit(`select-file`,this.node.path):this.open=!this.open}}}),Yt=[`aria-label`,`title`],Xt={key:1,class:`node-chevron-spacer`},Zt={class:`node-label`},Qt={key:0,class:`children`};function $t(r,a,u,d,p,m){let y=l(`expand-down-icon`),b=l(`expand-right-icon`),x=l(`font-awesome-icon`),S=l(`file-node`,!0);return v(),s(`li`,null,[e(`div`,{class:n([`file-node`,{active:r.isActive}]),style:h({paddingLeft:r.indent+`px`}),onClick:a[1]||=(...e)=>r.onClick&&r.onClick(...e)},[r.node.isLeaf?(v(),s(`span`,Xt)):(v(),s(`button`,{key:0,class:`node-chevron`,"aria-label":r.$t(r.open?`common.button.collapse`:`common.button.expand`),title:r.$t(r.open?`common.button.collapse`:`common.button.expand`),onClick:a[0]||=t(e=>r.open=!r.open,[`stop`])},[r.open?(v(),f(y,{key:0,size:14,"aria-hidden":`true`,focusable:`false`})):(v(),f(b,{key:1,size:14,"aria-hidden":`true`,focusable:`false`}))],8,Yt)),r.isHtmlFile(r.node)?(v(),f(x,{key:2,icon:`fa-brands fa-html5`,class:`node-icon`})):(v(),f(_(r.iconFor(r.node)),{key:3,class:`node-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,Zt,i(r.node.label),1)],6),!r.node.isLeaf&&r.open?(v(),s(`ul`,Qt,[(v(!0),s(c,null,g(r.node.children||[],e=>(v(),f(S,{key:e.path,node:e,"selected-skill-id":r.selectedSkillId,"selected-path":r.selectedPath,skill:r.skill,depth:r.depth+1,onSelectFile:a[2]||=e=>r.$emit(`select-file`,e)},null,8,[`node`,`selected-skill-id`,`selected-path`,`skill`,`depth`]))),128))])):o(``,!0)])}var en=y({name:`SkillRow`,components:{ExpandDownIcon:P,ExpandRightIcon:F,SkillIcon:se,FileNode:U(Jt,[[`render`,$t],[`__scopeId`,`data-v-5240087b`]])},props:{skill:{type:Object,required:!0},selectedSkillId:{type:String,required:!0},selectedPath:{type:String,required:!0},expanded:{type:Boolean,default:!1}},emits:[`toggle-expand`,`select-skill`,`select-file`],computed:{tree(){return qt(this.skill.asset_bundle_files)},hasChildren(){return this.skill.asset_bundle_files.length>1},isSkillSelected(){return this.selectedSkillId===this.skill.id&&!this.selectedPath}},methods:{onSelectFile(e){this.$emit(`select-file`,this.skill,e)}}}),tn={class:`skill-row-wrapper`},nn=[`aria-label`,`title`],rn={key:1,class:`row-chevron-spacer`},an=[`title`],on={key:0,class:`file-list`};function sn(r,u,d,p,m,h){let _=l(`expand-down-icon`),y=l(`expand-right-icon`),b=l(`skill-icon`),x=l(`file-node`);return v(),s(`li`,tn,[e(`div`,{class:n([`skill-row`,{active:r.isSkillSelected}]),onClick:u[1]||=e=>r.$emit(`select-skill`,r.skill)},[r.hasChildren?(v(),s(`button`,{key:0,class:`row-chevron`,"aria-label":r.$t(r.expanded?`common.button.collapse`:`common.button.expand`),title:r.$t(r.expanded?`common.button.collapse`:`common.button.expand`),onClick:u[0]||=t(e=>r.$emit(`toggle-expand`,r.skill),[`stop`])},[r.expanded?(v(),f(_,{key:0,size:14,"aria-hidden":`true`,focusable:`false`})):(v(),f(y,{key:1,size:14,"aria-hidden":`true`,focusable:`false`}))],8,nn)):(v(),s(`span`,rn)),a(b,{class:`row-icon`,size:16,"aria-hidden":`true`,focusable:`false`}),e(`span`,{class:`row-label`,title:r.skill.name},i(r.skill.slug),9,an)],2),r.expanded&&r.hasChildren?(v(),s(`ul`,on,[(v(!0),s(c,null,g(r.tree,e=>(v(),f(x,{key:e.path,node:e,"selected-skill-id":r.selectedSkillId,"selected-path":r.selectedPath,skill:r.skill,depth:1,onSelectFile:r.onSelectFile},null,8,[`node`,`selected-skill-id`,`selected-path`,`skill`,`onSelectFile`]))),128))])):o(``,!0)])}var cn=U(en,[[`render`,sn],[`__scopeId`,`data-v-231c2ce1`]]),ln=10*1024*1024,un=/\.(tar\.gz|tgz|tar|zip|md)$/i,dn=y({name:`UploadSkillDialog`,components:{ElDialog:G,ElButton:W,AddFileIcon:He,CloudUploadIcon:ze},props:{modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`,`created`],data(){return{file:null,isDragging:!1,uploading:!1}},methods:{onVisibleChange(e){this.$emit(`update:modelValue`,e)},onClose(){this.uploading||this.$emit(`update:modelValue`,!1)},reset(){this.file=null,this.isDragging=!1;let e=this.$refs.fileInput;e&&(e.value=``)},humanSize(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(2)} MB`},onPickFile(){this.uploading||this.$refs.fileInput?.click()},onFilePicked(e){let t=e.target.files?.[0]||null;this.acceptFile(t)},onDrop(e){this.isDragging=!1;let t=e.dataTransfer?.files?.[0]||null;this.acceptFile(t)},acceptFile(e){if(!e){this.file=null;return}if(e.size>ln){T.error(this.$t(`skill.message.fileTooLarge`));return}if(!un.test(e.name)){T.error(this.$t(`skill.message.fileTypeWrong`));return}this.file=e},extractError(e){let t=e;return t?.response?.data?.detail||(t?.response?.data?.content||[]).join(`; `)||String(e)||`unknown error`},async onSubmit(){if(this.file){this.uploading=!0;try{if(/\.md$/i.test(this.file.name)){let e=await this.file.text(),{data:t}=await Z.createMarkdown({content:e});T.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,t.id)}else{let{data:e}=await Z.createTarball(this.file);T.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,e.id)}this.$emit(`update:modelValue`,!1)}catch(e){T.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)}))}finally{this.uploading=!1}}}}}),fn={key:0,class:`dropzone-hint`},pn={key:1,class:`dropzone-file`},mn={class:`dropzone-file-name`},hn={class:`dropzone-file-size`},gn={class:`requirements`},_n={class:`requirements-title`};function vn(o,c,u,d,m,h){let g=l(`add-file-icon`),_=l(`el-button`),y=l(`cloud-upload-icon`),b=l(`el-dialog`);return v(),f(b,{"model-value":o.modelValue,title:o.$t(`skill.dialog.uploadTitle`),width:`min(520px, 94vw)`,"align-center":``,"close-on-click-modal":!o.uploading,"close-on-press-escape":!o.uploading,"show-close":!o.uploading,"onUpdate:modelValue":o.onVisibleChange,onClosed:o.reset},{footer:p(()=>[a(_,{disabled:o.uploading,onClick:o.onClose},{default:p(()=>[r(i(o.$t(`skill.button.cancel`)),1)]),_:1},8,[`disabled`,`onClick`]),a(_,{type:`primary`,loading:o.uploading,disabled:!o.file,onClick:o.onSubmit},{default:p(()=>[a(y,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(o.$t(`skill.button.create`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])]),default:p(()=>[e(`input`,{ref:`fileInput`,type:`file`,accept:`.tar.gz,.tgz,.tar,.zip,.md,application/gzip,application/zip,application/x-tar,text/markdown`,hidden:``,onChange:c[0]||=(...e)=>o.onFilePicked&&o.onFilePicked(...e)},null,544),e(`div`,{class:n([`dropzone`,{"is-dragging":o.isDragging,"has-file":!!o.file}]),onClick:c[1]||=(...e)=>o.onPickFile&&o.onPickFile(...e),onDragover:c[2]||=t(e=>o.isDragging=!0,[`prevent`]),onDragleave:c[3]||=t(e=>o.isDragging=!1,[`prevent`]),onDrop:c[4]||=t((...e)=>o.onDrop&&o.onDrop(...e),[`prevent`])},[a(g,{class:`dropzone-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),o.file?(v(),s(`p`,pn,[e(`span`,mn,i(o.file.name),1),e(`span`,hn,i(o.humanSize(o.file.size)),1)])):(v(),s(`p`,fn,i(o.$t(`skill.dialog.uploadDrop`)),1))],34),e(`div`,gn,[e(`p`,_n,i(o.$t(`skill.dialog.fileRequirements`)),1),e(`ul`,null,[e(`li`,null,i(o.$t(`skill.dialog.requirementMd`)),1),e(`li`,null,i(o.$t(`skill.dialog.requirementArchive`)),1)])])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`close-on-press-escape`,`show-close`,`onUpdate:modelValue`,`onClosed`])}var yn=U(dn,[[`render`,vn],[`__scopeId`,`data-v-01ead824`]]),bn=y({name:`WriteSkillDialog`,components:{ElDialog:G,ElButton:W,ElInput:H,CloudUploadIcon:ze},props:{modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`,`created`],data(){return{content:``,saving:!1}},methods:{onVisibleChange(e){this.$emit(`update:modelValue`,e)},onClose(){this.saving||this.$emit(`update:modelValue`,!1)},reset(){this.content=``},extractError(e){let t=e;return t?.response?.data?.detail||(t?.response?.data?.content||[]).join(`; `)||String(e)||`unknown error`},async onSubmit(){if(this.content.trim()){this.saving=!0;try{let{data:e}=await Z.createMarkdown({content:this.content});T.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,e.id),this.$emit(`update:modelValue`,!1)}catch(e){T.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)}))}finally{this.saving=!1}}}}}),xn={class:`hint`};function Sn(t,n,o,s,c,u){let d=l(`el-input`),m=l(`el-button`),h=l(`cloud-upload-icon`),g=l(`el-dialog`);return v(),f(g,{"model-value":t.modelValue,title:t.$t(`skill.dialog.writeTitle`),width:`min(720px, 94vw)`,"align-center":``,"close-on-click-modal":!t.saving,"close-on-press-escape":!t.saving,"show-close":!t.saving,"onUpdate:modelValue":t.onVisibleChange,onClosed:t.reset},{footer:p(()=>[a(m,{disabled:t.saving,onClick:t.onClose},{default:p(()=>[r(i(t.$t(`skill.button.cancel`)),1)]),_:1},8,[`disabled`,`onClick`]),a(m,{type:`primary`,loading:t.saving,disabled:!t.content.trim(),onClick:t.onSubmit},{default:p(()=>[a(h,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.button.create`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])]),default:p(()=>[e(`p`,xn,i(t.$t(`skill.dialog.writeHint`)),1),a(d,{modelValue:t.content,"onUpdate:modelValue":n[0]||=e=>t.content=e,type:`textarea`,rows:18,placeholder:t.$t(`skill.placeholder.content`),spellcheck:`false`,class:`editor`},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`close-on-press-escape`,`show-close`,`onUpdate:modelValue`,`onClosed`])}var Cn=y({name:`UserSkills`,components:{ConsolePageHeader:Le,ElInput:H,ElSwitch:A,ElTag:me,ElTooltip:w,ElDropdown:O,ElDropdownMenu:D,ElDropdownItem:E,AddIcon:V,AiCreateIcon:pe,DeleteIcon:ue,ExpandDownIcon:P,ExpandRightIcon:F,HelpIcon:L,MarketplaceIcon:ce,MoreIcon:ne,SearchIcon:le,SkillIcon:se,UploadIcon:fe,WriteIcon:ee,BrowseSkillsDialog:Tt,SkillFilePreview:Ut,SkillRow:cn,UploadSkillDialog:yn,WriteSkillDialog:U(bn,[[`render`,Sn],[`__scopeId`,`data-v-f39aab5d`]])},directives:{loading:q},data(){return{loading:!1,skills:[],togglingId:null,selectedSkillId:``,selectedPath:``,expandedSkillIds:[],personalOpen:!0,globalsOpen:!0,searchQuery:``,uploadVisible:!1,writeVisible:!1,browseVisible:!1}},computed:{personalSkills(){return this.skills.filter(e=>e.source!==`global`)},globalSkills(){return this.skills.filter(e=>e.source===`global`)},filteredPersonal(){return this.applyFilter(this.personalSkills)},filteredGlobal(){return this.applyFilter(this.globalSkills)},selectedSkill(){return this.skills.find(e=>e.id===this.selectedSkillId)||null}},mounted(){this.fetchSkills()},methods:{applyFilter(e){let t=this.searchQuery.trim().toLowerCase();return t?e.filter(e=>e.slug.toLowerCase().includes(t)||e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)):e},async fetchSkills(){this.loading=!0;try{let{data:e}=await Z.list();if(this.skills=e||[],!this.selectedSkillId&&this.skills.length){let e=this.personalSkills[0]||this.skills[0];this.selectedSkillId=e.id}else this.selectedSkillId&&!this.skills.find(e=>e.id===this.selectedSkillId)&&(this.selectedSkillId=``,this.selectedPath=``)}catch(e){console.error(e),T.error(this.$t(`skill.message.loadFailed`))}finally{this.loading=!1}},extractError(e){let t=e;return t?.response?.data?.detail||(t?.response?.data?.content||[]).join(`; `)||String(e)||`unknown error`},selectSkill(e){this.selectedSkillId=e.id,this.selectedPath=``},selectFile(e,t){this.selectedSkillId=e.id,this.selectedPath=t},toggleExpand(e){let t=this.expandedSkillIds.indexOf(e.id);t>=0?this.expandedSkillIds.splice(t,1):this.expandedSkillIds.push(e.id)},openUpload(){this.uploadVisible=!0},openWrite(){this.writeVisible=!0},onBrowse(){this.browseVisible=!0},async onCreated(e){await this.fetchSkills();let t=this.skills.find(t=>t.id===e);t&&(this.selectedSkillId=t.id,this.selectedPath=``,this.personalOpen=!0)},async onSaveContent(e,t){if(!this.selectedSkill){t.reject();return}try{let{data:n}=await Z.update(this.selectedSkill.id,{content:e});T.success(this.$t(`skill.message.updateSuccess`));let r=this.skills.findIndex(e=>e.id===n.id);r>=0&&this.skills.splice(r,1,n),t.resolve()}catch(e){T.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)})),t.reject(e)}},async onDelete(e){try{await ge.confirm(this.$t(`skill.message.deleteConfirm`,{slug:e.slug}),this.$t(`skill.button.delete`),{type:`warning`})}catch{return}try{await Z.remove(e.id),T.success(this.$t(`skill.message.deleteSuccess`)),this.selectedSkillId===e.id&&(this.selectedSkillId=``,this.selectedPath=``),await this.fetchSkills()}catch(e){T.error(this.extractError(e))}},async onToggleSkill(e,t){this.togglingId=e.id;try{t?(await Z.enable(e.id),T.success(this.$t(`skill.message.enableSuccess`))):(await Z.disable(e.id),T.success(this.$t(`skill.message.disableSuccess`))),e.enabled=t}catch(e){T.error(this.extractError(e))}finally{this.togglingId=null}}}}),wn={class:`skills-page`},Tn={class:`skills-shell`},En={class:`left-pane`},Dn={class:`left-header`},On=[`aria-label`,`title`],kn={class:`submenu-trigger`},An={class:`badge-soon`},jn={class:`left-body`},Mn={class:`section`},Nn={key:0,class:`skill-list`},Pn={key:0,class:`empty-row`},Fn={key:0,class:`section`},In={key:0,class:`skill-list`},Ln={class:`right-pane`},Rn={class:`right-header`},zn={class:`right-title`},Bn={class:`right-actions`},Vn=[`aria-label`,`title`],Hn={class:`meta-card`},Un={class:`meta-grid`},Wn={class:`meta-cell`},Gn={class:`meta-label`},Kn={class:`meta-value`},qn={class:`meta-cell`},Jn={class:`meta-label`},Yn={class:`meta-value`},Xn={key:0,class:`meta-cell`},Zn={class:`meta-label`},Qn={class:`meta-tags`},$n={key:0,class:`meta-description`},er={class:`meta-description-label`},tr={class:`meta-label`},nr={class:`preview-card`},rr={key:2,class:`right-empty`};function ir(t,n,u,h,_,y){let b=l(`console-page-header`),x=l(`search-icon`),S=l(`el-input`),C=l(`add-icon`),w=l(`marketplace-icon`),T=l(`el-dropdown-item`),E=l(`expand-right-icon`),D=l(`ai-create-icon`),O=l(`write-icon`),k=l(`upload-icon`),A=l(`el-dropdown-menu`),j=l(`el-dropdown`),M=l(`expand-down-icon`),N=l(`skill-row`),P=l(`el-switch`),F=l(`more-icon`),I=l(`delete-icon`),L=l(`el-tag`),ee=l(`help-icon`),te=l(`el-tooltip`),R=l(`skill-file-preview`),ne=l(`skill-icon`),re=l(`upload-skill-dialog`),ie=l(`write-skill-dialog`),z=l(`browse-skills-dialog`),B=m(`loading`);return v(),s(`div`,wn,[a(b,{title:t.$t(`skill.title.skills`),subtitle:t.$t(`skill.message.pageDescription`)},null,8,[`title`,`subtitle`]),e(`div`,Tn,[e(`aside`,En,[e(`header`,Dn,[a(S,{modelValue:t.searchQuery,"onUpdate:modelValue":n[0]||=e=>t.searchQuery=e,class:`search-input`,size:`default`,clearable:``,placeholder:t.$t(`skill.placeholder.search`)},{prefix:p(()=>[a(x,{size:14,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`modelValue`,`placeholder`]),a(j,{trigger:`click`,placement:`bottom-end`,"hide-on-click":!1},{dropdown:p(()=>[a(A,{class:`add-menu`},{default:p(()=>[a(T,{onClick:t.onBrowse},{default:p(()=>[a(w,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.browse`)),1)]),_:1},8,[`onClick`]),a(T,{divided:``},{default:p(()=>[a(j,{trigger:`hover`,placement:`left-start`,"hide-on-click":!0},{dropdown:p(()=>[a(A,{class:`add-menu`},{default:p(()=>[a(T,{disabled:``},{default:p(()=>[a(D,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.createWithClaude`))+` `,1),e(`span`,An,i(t.$t(`skill.menu.soon`)),1)]),_:1}),a(T,{onClick:t.openWrite},{default:p(()=>[a(O,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.write`)),1)]),_:1},8,[`onClick`]),a(T,{onClick:t.openUpload},{default:p(()=>[a(k,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.upload`)),1)]),_:1},8,[`onClick`])]),_:1})]),default:p(()=>[e(`span`,kn,[a(C,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.create`))+` `,1),a(E,{class:`submenu-arrow`,size:14,"aria-hidden":`true`,focusable:`false`})])]),_:1})]),_:1})]),_:1})]),default:p(()=>[e(`button`,{type:`button`,class:`add-button`,"aria-label":t.$t(`skill.button.add`),title:t.$t(`skill.button.add`)},[a(C,{size:16,"aria-hidden":`true`,focusable:`false`})],8,On)]),_:1})]),d((v(),s(`div`,jn,[e(`section`,Mn,[e(`button`,{class:`section-header`,onClick:n[1]||=e=>t.personalOpen=!t.personalOpen},[t.personalOpen?(v(),f(M,{key:0,class:`section-chevron`,size:12,"aria-hidden":`true`,focusable:`false`})):(v(),f(E,{key:1,class:`section-chevron`,size:12,"aria-hidden":`true`,focusable:`false`})),e(`span`,null,i(t.$t(`skill.section.personal`)),1)]),t.personalOpen?(v(),s(`ul`,Nn,[!t.loading&&t.filteredPersonal.length===0?(v(),s(`li`,Pn,i(t.searchQuery?t.$t(`skill.empty.search`):t.$t(`skill.message.noSkills`)),1)):o(``,!0),(v(!0),s(c,null,g(t.filteredPersonal,e=>(v(),f(N,{key:e.id,skill:e,"selected-skill-id":t.selectedSkillId,"selected-path":t.selectedPath,expanded:t.expandedSkillIds.includes(e.id),onToggleExpand:t.toggleExpand,onSelectSkill:t.selectSkill,onSelectFile:t.selectFile},null,8,[`skill`,`selected-skill-id`,`selected-path`,`expanded`,`onToggleExpand`,`onSelectSkill`,`onSelectFile`]))),128))])):o(``,!0)]),t.globalSkills.length>0?(v(),s(`section`,Fn,[e(`button`,{class:`section-header`,onClick:n[2]||=e=>t.globalsOpen=!t.globalsOpen},[t.globalsOpen?(v(),f(M,{key:0,class:`section-chevron`,size:12,"aria-hidden":`true`,focusable:`false`})):(v(),f(E,{key:1,class:`section-chevron`,size:12,"aria-hidden":`true`,focusable:`false`})),e(`span`,null,i(t.$t(`skill.section.platform`)),1)]),t.globalsOpen?(v(),s(`ul`,In,[(v(!0),s(c,null,g(t.filteredGlobal,e=>(v(),f(N,{key:e.id,skill:e,"selected-skill-id":t.selectedSkillId,"selected-path":t.selectedPath,expanded:t.expandedSkillIds.includes(e.id),onToggleExpand:t.toggleExpand,onSelectSkill:t.selectSkill,onSelectFile:t.selectFile},null,8,[`skill`,`selected-skill-id`,`selected-path`,`expanded`,`onToggleExpand`,`onSelectSkill`,`onSelectFile`]))),128))])):o(``,!0)])):o(``,!0)])),[[B,t.loading]])]),e(`main`,Ln,[t.selectedSkill&&!t.selectedPath?(v(),s(c,{key:0},[e(`header`,Rn,[e(`h3`,zn,i(t.selectedSkill.slug),1),e(`div`,Bn,[a(P,{"model-value":t.selectedSkill.enabled,size:`default`,loading:t.togglingId===t.selectedSkill.id,onChange:n[3]||=e=>t.onToggleSkill(t.selectedSkill,!!e)},null,8,[`model-value`,`loading`]),t.selectedSkill.source===`global`?o(``,!0):(v(),f(j,{key:0,trigger:`click`,placement:`bottom-end`},{dropdown:p(()=>[a(A,null,{default:p(()=>[a(T,{onClick:n[4]||=e=>t.onDelete(t.selectedSkill)},{default:p(()=>[a(I,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.button.delete`)),1)]),_:1})]),_:1})]),default:p(()=>[e(`button`,{class:`icon-btn`,"aria-label":t.$t(`skill.button.more`),title:t.$t(`skill.button.more`)},[a(F,{size:16,"aria-hidden":`true`,focusable:`false`})],8,Vn)]),_:1}))])]),e(`div`,Hn,[e(`div`,Un,[e(`div`,Wn,[e(`span`,Gn,i(t.$t(`skill.meta.addedBy`)),1),e(`span`,Kn,i(t.selectedSkill.source===`global`?t.$t(`skill.meta.platform`):t.$t(`skill.meta.you`)),1)]),e(`div`,qn,[e(`span`,Jn,i(t.$t(`skill.meta.lastUpdated`)),1),e(`span`,Yn,i(t.$dayjs.format(t.selectedSkill.updated_at)),1)]),t.selectedSkill.required_connections.length?(v(),s(`div`,Xn,[e(`span`,Zn,i(t.$t(`skill.field.requiredConnections`)),1),e(`div`,Qn,[(v(!0),s(c,null,g(t.selectedSkill.required_connections,e=>(v(),f(L,{key:e,size:`small`,type:`info`},{default:p(()=>[r(i(e),1)]),_:2},1024))),128))])])):o(``,!0)]),t.selectedSkill.description?(v(),s(`div`,$n,[e(`div`,er,[e(`span`,tr,i(t.$t(`skill.field.description`)),1),t.selectedSkill.when_to_use?(v(),f(te,{key:0,content:t.selectedSkill.when_to_use,placement:`top`},{default:p(()=>[a(ee,{class:`meta-info-icon`,size:12,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`content`])):o(``,!0)]),e(`p`,null,i(t.selectedSkill.description),1)])):o(``,!0)]),e(`div`,nr,[(v(),f(R,{key:`${t.selectedSkill.id}:SKILL.md`,"skill-id":t.selectedSkill.id,path:`SKILL.md`,editable:t.selectedSkill.source===`upload`,onSave:t.onSaveContent},null,8,[`skill-id`,`editable`,`onSave`]))])],64)):t.selectedSkill&&t.selectedPath?(v(),f(R,{key:`${t.selectedSkill.id}:${t.selectedPath}`,"skill-id":t.selectedSkill.id,path:t.selectedPath,editable:!1},null,8,[`skill-id`,`path`])):(v(),s(`div`,rr,[a(ne,{class:`right-empty-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,null,i(t.$t(`skill.preview.selectSkill`)),1)]))])]),a(re,{modelValue:t.uploadVisible,"onUpdate:modelValue":n[5]||=e=>t.uploadVisible=e,onCreated:t.onCreated},null,8,[`modelValue`,`onCreated`]),a(ie,{modelValue:t.writeVisible,"onUpdate:modelValue":n[6]||=e=>t.writeVisible=e,onCreated:t.onCreated},null,8,[`modelValue`,`onCreated`]),a(z,{modelValue:t.browseVisible,"onUpdate:modelValue":n[7]||=e=>t.browseVisible=e,onInstalled:t.onCreated},null,8,[`modelValue`,`onInstalled`])])}var ar=U(Cn,[[`render`,ir],[`__scopeId`,`data-v-e3209347`]]);export{ar as default};
@@ -1 +1 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{A as e,Gt as t,I as n,Jt as r,L as i,M as a,N as o,T as s,at as c,j as l,mt as u,tt as d,z as f}from"./vendor-chart-Dw-P17PN.js";import{t as p}from"./arrow-left-BK9Fxa_j.js";import{t as m}from"./download-xaSy0mRf.js";import{t as ee}from"./info-B8n3U43j.js";import{at as te,ct as h,it as g,lt as _,ot as v,st as y}from"./constants-CzYWUlOY.js";import{O as b,Pi as x,Ut as S,a as C,f as w,l as T,o as E,s as D,x as O}from"./index-DSAgKNWm.js";import{t as k}from"./index.es-BGtTBs6E.js";var A=f({name:`DownloadIndex`,components:{BackIcon:p,DownloadIcon:m,ElButton:x,InfoIcon:ee,QrCode:S,FontAwesomeIcon:k},data(){return{faAndroid:C,faApple:E,faChrome:D,faEdge:T,faGooglePlay:w,faWindows:O}},computed:{brandTitle(){return this.$store.state.site?.title||`AceData`},brandLogo(){return this.$store.state.site?.logo||`/assets/logo-CDy94G52.png`},androidDownloadUrl(){return y},hasAndroidDownload(){return!!y},playStoreUrl(){return h},hasPlayStore(){return!!h},appStoreUrl(){return _},hasAppStore(){return!!_},extensionDownloadUrl(){return g},extensionGuideUrl(){return te},iosDownloadUrl(){return``},iosFallbackUrl(){return``},hasIosDownload(){return!1},hasIos(){return this.hasAppStore||this.hasIosDownload},desktopReleasesUrl(){return v}},methods:{goBack(){window.history.length>1?this.$router.back():this.$router.push(`/`)},openSupport(){window.open(`https://platform.acedata.cloud/support`,`_blank`)}}}),j={class:`download-page`},M={class:`download-page__inner`},N={class:`hero`},P={class:`hero__brand`},F=[`src`,`alt`],I={class:`hero__eyebrow`},L={class:`hero__title`},R={class:`hero__subtitle`},z={class:`hero__badges`},B={class:`badge badge--live`},V={class:`badge`},H={class:`hero__actions`},U={class:`platforms`},W={class:`platform platform--extension`},G={class:`platform__head`},K={class:`platform__os`},q={class:`platform__os-icons`},J={class:`chip chip--live`},Y={class:`platform__title`},X={class:`platform__text`},Z={class:`platform__foot platform__foot--extension`},Q={class:`btn-icons`},ne={class:`platform platform--android`},re={class:`platform__head`},ie={class:`platform__os`},ae={class:`chip chip--live`},oe={class:`platform__title`},se={class:`platform__text`},ce={key:0,class:`qr`},le={class:`qr__hint`},ue={class:`platform__foot platform__foot--stack`},de={key:0,class:`platform__fallback`},fe={class:`platform__meta`},pe={class:`platform__meta`},me={class:`platform platform--ios`},he={class:`platform__head`},ge={class:`platform__os`},_e={class:`platform__title`},ve={class:`platform__text`},ye={key:0,class:`qr`},be={class:`qr__hint`},xe={key:1,class:`platform__foot platform__foot--stack`},Se={class:`btn-row`},Ce={class:`platform__meta`},we={class:`ios-soon`},Te={class:`ios-soon__text`},Ee={class:`platform__foot platform__foot--stack`},De={class:`platform platform--windows`},Oe={class:`platform__head`},ke={class:`platform__os`},Ae={class:`platform__title`},je={class:`platform__text`},Me={class:`platform__foot platform__foot--stack`},Ne={class:`platform platform--mac`},Pe={class:`platform__head`},Fe={class:`platform__os`},Ie={class:`platform__title`},Le={class:`platform__text`},Re={class:`platform__foot platform__foot--stack`},ze={class:`advantages`},Be={class:`advantage`},Ve={class:`advantage__title`},$={class:`advantage__text`},He={class:`advantage`},Ue={class:`advantage__title`},We={class:`advantage__text`},Ge={class:`advantage`},Ke={class:`advantage__title`},qe={class:`advantage__text`},Je={key:0,class:`note`},Ye={class:`note__text`},Xe={class:`note`},Ze={class:`note__text`};function Qe(f,p,m,ee,te,h){let g=c(`back-icon`),_=c(`font-awesome-icon`),v=c(`el-button`),y=c(`qr-code`),b=c(`download-icon`),x=c(`info-icon`);return d(),o(`div`,j,[p[17]||=e(`div`,{class:`download-page__glow`,"aria-hidden":`true`},null,-1),e(`div`,M,[e(`button`,{type:`button`,class:`download-back`,onClick:p[0]||=(...e)=>f.goBack&&f.goBack(...e)},[i(g,{class:`download-back__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(f.$t(`common.button.goBack`)),1)]),e(`header`,N,[e(`span`,P,[e(`img`,{src:f.brandLogo,alt:f.brandTitle,class:`hero__logo`},null,8,F)]),e(`p`,I,r(f.brandTitle)+` · `+r(f.$t(`common.nav.mobileApp`)),1),e(`h1`,L,r(f.$t(`common.title.mobileApp`)),1),e(`p`,R,r(f.$t(`common.message.mobileAppDescription`)),1),e(`div`,z,[e(`span`,B,[p[1]||=e(`span`,{class:`badge__dot`},null,-1),n(r(f.$t(`common.message.mobileAvailableNow`)),1)]),e(`span`,V,r(f.$t(`common.message.mobileSharedAccount`)),1)]),e(`div`,H,[f.hasPlayStore?(d(),l(v,{key:0,type:`primary`,round:``,size:`large`,tag:`a`,href:f.playStoreUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faGooglePlay,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.getOnGooglePlay`)),1)]),_:1},8,[`href`])):f.hasAndroidDownload?(d(),l(v,{key:1,type:`primary`,round:``,size:`large`,tag:`a`,href:f.androidDownloadUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faAndroid,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.downloadAndroid`)),1)]),_:1},8,[`href`])):a(``,!0),f.hasAppStore?(d(),l(v,{key:2,round:``,size:`large`,tag:`a`,href:f.appStoreUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faApple,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.getOnAppStore`)),1)]),_:1},8,[`href`])):a(``,!0),i(v,{round:``,size:`large`,class:`btn-ghost`,onClick:f.openSupport},{default:u(()=>[n(r(f.$t(`common.nav.support`)),1)]),_:1},8,[`onClick`])])]),e(`section`,U,[e(`article`,W,[e(`div`,G,[e(`span`,K,[e(`span`,q,[i(_,{icon:f.faChrome,class:`platform__os-icon`},null,8,[`icon`]),i(_,{icon:f.faEdge,class:`platform__os-icon`},null,8,[`icon`])]),p[2]||=n(` Chrome & Edge `,-1)]),e(`span`,J,[p[3]||=e(`span`,{class:`chip__dot`},null,-1),n(r(f.$t(`common.message.extensionAvailableNow`)),1)])]),e(`h2`,Y,r(f.$t(`common.button.downloadBrowserExtension`)),1),e(`p`,X,r(f.$t(`common.message.extensionHint`)),1),e(`div`,Z,[i(v,{type:`primary`,round:``,size:`large`,tag:`a`,href:f.extensionDownloadUrl,target:`_blank`},{default:u(()=>[e(`span`,Q,[i(_,{icon:f.faChrome},null,8,[`icon`]),i(_,{icon:f.faEdge},null,8,[`icon`])]),n(` `+r(f.$t(`common.button.downloadBrowserExtension`)),1)]),_:1},8,[`href`]),i(v,{round:``,tag:`a`,href:f.extensionGuideUrl,target:`_blank`,class:`btn-ghost`},{default:u(()=>[n(r(f.$t(`common.button.viewExtensionGuide`)),1)]),_:1},8,[`href`])])]),e(`article`,ne,[e(`div`,re,[e(`span`,ie,[i(_,{icon:f.faAndroid,class:`platform__os-icon`},null,8,[`icon`]),p[4]||=n(` Android `,-1)]),e(`span`,ae,[p[5]||=e(`span`,{class:`chip__dot`},null,-1),n(r(f.$t(`common.message.mobileAvailableNow`)),1)])]),e(`h2`,oe,r(f.$t(`common.button.downloadAndroid`)),1),e(`p`,se,r(f.$t(`common.message.mobileAndroidHint`)),1),f.hasPlayStore||f.hasAndroidDownload?(d(),o(`div`,ce,[i(y,{value:f.hasPlayStore?f.playStoreUrl:f.androidDownloadUrl,width:184,height:184,class:`qr__img`,type:`image/png`,color:{dark:`#0e2a33ff`,light:`#ffffffff`}},null,8,[`value`]),e(`p`,le,r(f.hasPlayStore?f.$t(`common.message.mobilePlayStoreHint`):f.$t(`common.message.mobileSecureDelivery`)),1)])):a(``,!0),e(`div`,ue,[f.hasPlayStore?(d(),l(v,{key:0,type:`primary`,round:``,size:`large`,tag:`a`,href:f.playStoreUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faGooglePlay,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.getOnGooglePlay`)),1)]),_:1},8,[`href`])):a(``,!0),f.hasAndroidDownload?(d(),o(s,{key:1},[f.hasPlayStore?(d(),o(`div`,de,[i(v,{round:``,tag:`a`,href:f.androidDownloadUrl,target:`_blank`,class:`btn-ghost`},{default:u(()=>[i(b,{class:`btn-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(f.$t(`common.button.downloadAndroid`)),1)]),_:1},8,[`href`]),e(`span`,fe,r(f.$t(`common.message.mobileApkFallback`)),1)])):(d(),o(s,{key:1},[i(v,{type:`primary`,round:``,size:`large`,tag:`a`,href:f.androidDownloadUrl,target:`_blank`},{default:u(()=>[i(b,{class:`btn-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(f.$t(`common.button.downloadAndroid`)),1)]),_:1},8,[`href`]),e(`span`,pe,r(f.$t(`common.message.mobileDirectInstall`)),1)],64))],64)):a(``,!0)])]),e(`article`,me,[e(`div`,he,[e(`span`,ge,[i(_,{icon:f.faApple,class:`platform__os-icon`},null,8,[`icon`]),p[6]||=n(` iOS `,-1)]),e(`span`,{class:t([`chip`,f.hasIos?`chip--live`:`chip--pending`])},[p[7]||=e(`span`,{class:`chip__dot`},null,-1),n(` `+r(f.hasIos?f.$t(`common.message.mobileNowOnAppStore`):f.$t(`common.message.mobileComingSoon`)),1)],2)]),e(`h2`,_e,r(f.$t(`common.button.downloadIos`)),1),e(`p`,ve,r(f.hasIos?f.$t(`common.message.mobileIosHint`):f.$t(`common.message.mobileIosPending`)),1),f.hasAppStore?(d(),o(`div`,ye,[i(y,{value:f.appStoreUrl,width:184,height:184,class:`qr__img`,type:`image/png`,color:{dark:`#0e2a33ff`,light:`#ffffffff`}},null,8,[`value`]),e(`p`,be,r(f.$t(`common.message.mobileAppStoreHint`)),1)])):a(``,!0),f.hasIos?(d(),o(`div`,xe,[f.hasAppStore?(d(),l(v,{key:0,type:`primary`,round:``,size:`large`,tag:`a`,href:f.appStoreUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faApple,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.getOnAppStore`)),1)]),_:1},8,[`href`])):a(``,!0),f.hasIosDownload?(d(),o(s,{key:1},[e(`div`,Se,[i(v,{type:f.hasAppStore?`default`:`primary`,round:``,size:f.hasAppStore?`default`:`large`,class:t({"btn-ghost":f.hasAppStore}),tag:`a`,href:f.iosDownloadUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faApple,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.installIos`)),1)]),_:1},8,[`type`,`size`,`class`,`href`]),i(v,{round:``,size:`large`,class:`btn-ghost`,tag:`a`,href:f.iosFallbackUrl,target:`_blank`},{default:u(()=>[n(r(f.$t(`common.button.downloadIos`)),1)]),_:1},8,[`href`])]),e(`span`,Ce,r(f.$t(`common.message.mobileInstallNote`)),1)],64)):a(``,!0)])):(d(),o(s,{key:2},[e(`div`,we,[i(_,{icon:f.faApple,class:`ios-soon__icon`},null,8,[`icon`]),e(`p`,Te,r(f.$t(`common.message.mobileComingSoon`)),1)]),e(`div`,Ee,[i(v,{round:``,size:`large`,class:`btn-ghost`,onClick:f.openSupport},{default:u(()=>[n(r(f.$t(`common.nav.support`)),1)]),_:1},8,[`onClick`])])],64))]),e(`article`,De,[e(`div`,Oe,[e(`span`,ke,[i(_,{icon:f.faWindows,class:`platform__os-icon`},null,8,[`icon`]),p[8]||=n(` Windows `,-1)]),p[9]||=e(`span`,{class:`chip chip--beta`},[e(`span`,{class:`chip__dot`}),n(`Beta `)],-1)]),e(`h2`,Ae,r(f.$t(`common.button.downloadWindows`)),1),e(`p`,je,r(f.$t(`common.message.desktopWindowsHint`)),1),e(`div`,Me,[i(v,{type:`primary`,round:``,size:`large`,tag:`a`,href:f.desktopReleasesUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faWindows,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.downloadWindows`)),1)]),_:1},8,[`href`]),p[10]||=e(`span`,{class:`platform__meta`},`Beta`,-1)])]),e(`article`,Ne,[e(`div`,Pe,[e(`span`,Fe,[i(_,{icon:f.faApple,class:`platform__os-icon`},null,8,[`icon`]),p[11]||=n(` macOS `,-1)]),p[12]||=e(`span`,{class:`chip chip--beta`},[e(`span`,{class:`chip__dot`}),n(`Beta `)],-1)]),e(`h2`,Ie,r(f.$t(`common.button.downloadMac`)),1),e(`p`,Le,r(f.$t(`common.message.desktopMacHint`)),1),e(`div`,Re,[i(v,{type:`primary`,round:``,size:`large`,tag:`a`,href:f.desktopReleasesUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faApple,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.downloadMac`)),1)]),_:1},8,[`href`]),p[13]||=e(`span`,{class:`platform__meta`},`Beta · Apple Silicon & Intel`,-1)])])]),e(`section`,ze,[e(`article`,Be,[p[14]||=e(`span`,{class:`advantage__num`},`01`,-1),e(`h3`,Ve,r(f.$t(`common.title.mobileFastAccess`)),1),e(`p`,$,r(f.$t(`common.message.mobileFastAccess`)),1)]),e(`article`,He,[p[15]||=e(`span`,{class:`advantage__num`},`02`,-1),e(`h3`,Ue,r(f.$t(`common.title.mobileTrustedRelease`)),1),e(`p`,We,r(f.$t(`common.message.mobileTrustedRelease`)),1)]),e(`article`,Ge,[p[16]||=e(`span`,{class:`advantage__num`},`03`,-1),e(`h3`,Ke,r(f.$t(`common.title.mobileUnifiedExperience`)),1),e(`p`,qe,r(f.$t(`common.message.mobileUnifiedExperience`)),1)])]),f.hasIosDownload?(d(),o(`aside`,Je,[i(x,{class:`note__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,Ye,r(f.$t(`common.message.mobileInstallNote`)),1)])):a(``,!0),e(`aside`,Xe,[i(x,{class:`note__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,Ze,r(f.$t(`common.message.desktopUnsignedNote`)),1)])])])}var $e=b(A,[[`render`,Qe],[`__scopeId`,`data-v-9f2043a8`]]);export{$e as default};
1
+ import"./rolldown-runtime--c01j_DQ.js";import{A as e,Gt as t,I as n,Jt as r,L as i,M as a,N as o,T as s,at as c,j as l,mt as u,tt as d,z as f}from"./vendor-chart-Dw-P17PN.js";import{t as p}from"./arrow-left-7KP6vKg8.js";import{t as m}from"./download-Dc3BfnDp.js";import{t as ee}from"./info-B5G4piiJ.js";import{at as te,ct as h,it as g,lt as _,ot as v,st as y}from"./constants-CzYWUlOY.js";import{O as b,Pi as x,Ut as S,a as C,f as w,l as T,o as E,s as D,x as O}from"./index-DVfw2ekC.js";import{t as k}from"./index.es-01zg3uVq.js";var A=f({name:`DownloadIndex`,components:{BackIcon:p,DownloadIcon:m,ElButton:x,InfoIcon:ee,QrCode:S,FontAwesomeIcon:k},data(){return{faAndroid:C,faApple:E,faChrome:D,faEdge:T,faGooglePlay:w,faWindows:O}},computed:{brandTitle(){return this.$store.state.site?.title||`AceData`},brandLogo(){return this.$store.state.site?.logo||`/assets/logo-CDy94G52.png`},androidDownloadUrl(){return y},hasAndroidDownload(){return!!y},playStoreUrl(){return h},hasPlayStore(){return!!h},appStoreUrl(){return _},hasAppStore(){return!!_},extensionDownloadUrl(){return g},extensionGuideUrl(){return te},iosDownloadUrl(){return``},iosFallbackUrl(){return``},hasIosDownload(){return!1},hasIos(){return this.hasAppStore||this.hasIosDownload},desktopReleasesUrl(){return v}},methods:{goBack(){window.history.length>1?this.$router.back():this.$router.push(`/`)},openSupport(){window.open(`https://platform.acedata.cloud/support`,`_blank`)}}}),j={class:`download-page`},M={class:`download-page__inner`},N={class:`hero`},P={class:`hero__brand`},F=[`src`,`alt`],I={class:`hero__eyebrow`},L={class:`hero__title`},R={class:`hero__subtitle`},z={class:`hero__badges`},B={class:`badge badge--live`},V={class:`badge`},H={class:`hero__actions`},U={class:`platforms`},W={class:`platform platform--extension`},G={class:`platform__head`},K={class:`platform__os`},q={class:`platform__os-icons`},J={class:`chip chip--live`},Y={class:`platform__title`},X={class:`platform__text`},Z={class:`platform__foot platform__foot--extension`},Q={class:`btn-icons`},ne={class:`platform platform--android`},re={class:`platform__head`},ie={class:`platform__os`},ae={class:`chip chip--live`},oe={class:`platform__title`},se={class:`platform__text`},ce={key:0,class:`qr`},le={class:`qr__hint`},ue={class:`platform__foot platform__foot--stack`},de={key:0,class:`platform__fallback`},fe={class:`platform__meta`},pe={class:`platform__meta`},me={class:`platform platform--ios`},he={class:`platform__head`},ge={class:`platform__os`},_e={class:`platform__title`},ve={class:`platform__text`},ye={key:0,class:`qr`},be={class:`qr__hint`},xe={key:1,class:`platform__foot platform__foot--stack`},Se={class:`btn-row`},Ce={class:`platform__meta`},we={class:`ios-soon`},Te={class:`ios-soon__text`},Ee={class:`platform__foot platform__foot--stack`},De={class:`platform platform--windows`},Oe={class:`platform__head`},ke={class:`platform__os`},Ae={class:`platform__title`},je={class:`platform__text`},Me={class:`platform__foot platform__foot--stack`},Ne={class:`platform platform--mac`},Pe={class:`platform__head`},Fe={class:`platform__os`},Ie={class:`platform__title`},Le={class:`platform__text`},Re={class:`platform__foot platform__foot--stack`},ze={class:`advantages`},Be={class:`advantage`},Ve={class:`advantage__title`},$={class:`advantage__text`},He={class:`advantage`},Ue={class:`advantage__title`},We={class:`advantage__text`},Ge={class:`advantage`},Ke={class:`advantage__title`},qe={class:`advantage__text`},Je={key:0,class:`note`},Ye={class:`note__text`},Xe={class:`note`},Ze={class:`note__text`};function Qe(f,p,m,ee,te,h){let g=c(`back-icon`),_=c(`font-awesome-icon`),v=c(`el-button`),y=c(`qr-code`),b=c(`download-icon`),x=c(`info-icon`);return d(),o(`div`,j,[p[17]||=e(`div`,{class:`download-page__glow`,"aria-hidden":`true`},null,-1),e(`div`,M,[e(`button`,{type:`button`,class:`download-back`,onClick:p[0]||=(...e)=>f.goBack&&f.goBack(...e)},[i(g,{class:`download-back__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(f.$t(`common.button.goBack`)),1)]),e(`header`,N,[e(`span`,P,[e(`img`,{src:f.brandLogo,alt:f.brandTitle,class:`hero__logo`},null,8,F)]),e(`p`,I,r(f.brandTitle)+` · `+r(f.$t(`common.nav.mobileApp`)),1),e(`h1`,L,r(f.$t(`common.title.mobileApp`)),1),e(`p`,R,r(f.$t(`common.message.mobileAppDescription`)),1),e(`div`,z,[e(`span`,B,[p[1]||=e(`span`,{class:`badge__dot`},null,-1),n(r(f.$t(`common.message.mobileAvailableNow`)),1)]),e(`span`,V,r(f.$t(`common.message.mobileSharedAccount`)),1)]),e(`div`,H,[f.hasPlayStore?(d(),l(v,{key:0,type:`primary`,round:``,size:`large`,tag:`a`,href:f.playStoreUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faGooglePlay,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.getOnGooglePlay`)),1)]),_:1},8,[`href`])):f.hasAndroidDownload?(d(),l(v,{key:1,type:`primary`,round:``,size:`large`,tag:`a`,href:f.androidDownloadUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faAndroid,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.downloadAndroid`)),1)]),_:1},8,[`href`])):a(``,!0),f.hasAppStore?(d(),l(v,{key:2,round:``,size:`large`,tag:`a`,href:f.appStoreUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faApple,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.getOnAppStore`)),1)]),_:1},8,[`href`])):a(``,!0),i(v,{round:``,size:`large`,class:`btn-ghost`,onClick:f.openSupport},{default:u(()=>[n(r(f.$t(`common.nav.support`)),1)]),_:1},8,[`onClick`])])]),e(`section`,U,[e(`article`,W,[e(`div`,G,[e(`span`,K,[e(`span`,q,[i(_,{icon:f.faChrome,class:`platform__os-icon`},null,8,[`icon`]),i(_,{icon:f.faEdge,class:`platform__os-icon`},null,8,[`icon`])]),p[2]||=n(` Chrome & Edge `,-1)]),e(`span`,J,[p[3]||=e(`span`,{class:`chip__dot`},null,-1),n(r(f.$t(`common.message.extensionAvailableNow`)),1)])]),e(`h2`,Y,r(f.$t(`common.button.downloadBrowserExtension`)),1),e(`p`,X,r(f.$t(`common.message.extensionHint`)),1),e(`div`,Z,[i(v,{type:`primary`,round:``,size:`large`,tag:`a`,href:f.extensionDownloadUrl,target:`_blank`},{default:u(()=>[e(`span`,Q,[i(_,{icon:f.faChrome},null,8,[`icon`]),i(_,{icon:f.faEdge},null,8,[`icon`])]),n(` `+r(f.$t(`common.button.downloadBrowserExtension`)),1)]),_:1},8,[`href`]),i(v,{round:``,tag:`a`,href:f.extensionGuideUrl,target:`_blank`,class:`btn-ghost`},{default:u(()=>[n(r(f.$t(`common.button.viewExtensionGuide`)),1)]),_:1},8,[`href`])])]),e(`article`,ne,[e(`div`,re,[e(`span`,ie,[i(_,{icon:f.faAndroid,class:`platform__os-icon`},null,8,[`icon`]),p[4]||=n(` Android `,-1)]),e(`span`,ae,[p[5]||=e(`span`,{class:`chip__dot`},null,-1),n(r(f.$t(`common.message.mobileAvailableNow`)),1)])]),e(`h2`,oe,r(f.$t(`common.button.downloadAndroid`)),1),e(`p`,se,r(f.$t(`common.message.mobileAndroidHint`)),1),f.hasPlayStore||f.hasAndroidDownload?(d(),o(`div`,ce,[i(y,{value:f.hasPlayStore?f.playStoreUrl:f.androidDownloadUrl,width:184,height:184,class:`qr__img`,type:`image/png`,color:{dark:`#0e2a33ff`,light:`#ffffffff`}},null,8,[`value`]),e(`p`,le,r(f.hasPlayStore?f.$t(`common.message.mobilePlayStoreHint`):f.$t(`common.message.mobileSecureDelivery`)),1)])):a(``,!0),e(`div`,ue,[f.hasPlayStore?(d(),l(v,{key:0,type:`primary`,round:``,size:`large`,tag:`a`,href:f.playStoreUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faGooglePlay,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.getOnGooglePlay`)),1)]),_:1},8,[`href`])):a(``,!0),f.hasAndroidDownload?(d(),o(s,{key:1},[f.hasPlayStore?(d(),o(`div`,de,[i(v,{round:``,tag:`a`,href:f.androidDownloadUrl,target:`_blank`,class:`btn-ghost`},{default:u(()=>[i(b,{class:`btn-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(f.$t(`common.button.downloadAndroid`)),1)]),_:1},8,[`href`]),e(`span`,fe,r(f.$t(`common.message.mobileApkFallback`)),1)])):(d(),o(s,{key:1},[i(v,{type:`primary`,round:``,size:`large`,tag:`a`,href:f.androidDownloadUrl,target:`_blank`},{default:u(()=>[i(b,{class:`btn-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(f.$t(`common.button.downloadAndroid`)),1)]),_:1},8,[`href`]),e(`span`,pe,r(f.$t(`common.message.mobileDirectInstall`)),1)],64))],64)):a(``,!0)])]),e(`article`,me,[e(`div`,he,[e(`span`,ge,[i(_,{icon:f.faApple,class:`platform__os-icon`},null,8,[`icon`]),p[6]||=n(` iOS `,-1)]),e(`span`,{class:t([`chip`,f.hasIos?`chip--live`:`chip--pending`])},[p[7]||=e(`span`,{class:`chip__dot`},null,-1),n(` `+r(f.hasIos?f.$t(`common.message.mobileNowOnAppStore`):f.$t(`common.message.mobileComingSoon`)),1)],2)]),e(`h2`,_e,r(f.$t(`common.button.downloadIos`)),1),e(`p`,ve,r(f.hasIos?f.$t(`common.message.mobileIosHint`):f.$t(`common.message.mobileIosPending`)),1),f.hasAppStore?(d(),o(`div`,ye,[i(y,{value:f.appStoreUrl,width:184,height:184,class:`qr__img`,type:`image/png`,color:{dark:`#0e2a33ff`,light:`#ffffffff`}},null,8,[`value`]),e(`p`,be,r(f.$t(`common.message.mobileAppStoreHint`)),1)])):a(``,!0),f.hasIos?(d(),o(`div`,xe,[f.hasAppStore?(d(),l(v,{key:0,type:`primary`,round:``,size:`large`,tag:`a`,href:f.appStoreUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faApple,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.getOnAppStore`)),1)]),_:1},8,[`href`])):a(``,!0),f.hasIosDownload?(d(),o(s,{key:1},[e(`div`,Se,[i(v,{type:f.hasAppStore?`default`:`primary`,round:``,size:f.hasAppStore?`default`:`large`,class:t({"btn-ghost":f.hasAppStore}),tag:`a`,href:f.iosDownloadUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faApple,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.installIos`)),1)]),_:1},8,[`type`,`size`,`class`,`href`]),i(v,{round:``,size:`large`,class:`btn-ghost`,tag:`a`,href:f.iosFallbackUrl,target:`_blank`},{default:u(()=>[n(r(f.$t(`common.button.downloadIos`)),1)]),_:1},8,[`href`])]),e(`span`,Ce,r(f.$t(`common.message.mobileInstallNote`)),1)],64)):a(``,!0)])):(d(),o(s,{key:2},[e(`div`,we,[i(_,{icon:f.faApple,class:`ios-soon__icon`},null,8,[`icon`]),e(`p`,Te,r(f.$t(`common.message.mobileComingSoon`)),1)]),e(`div`,Ee,[i(v,{round:``,size:`large`,class:`btn-ghost`,onClick:f.openSupport},{default:u(()=>[n(r(f.$t(`common.nav.support`)),1)]),_:1},8,[`onClick`])])],64))]),e(`article`,De,[e(`div`,Oe,[e(`span`,ke,[i(_,{icon:f.faWindows,class:`platform__os-icon`},null,8,[`icon`]),p[8]||=n(` Windows `,-1)]),p[9]||=e(`span`,{class:`chip chip--beta`},[e(`span`,{class:`chip__dot`}),n(`Beta `)],-1)]),e(`h2`,Ae,r(f.$t(`common.button.downloadWindows`)),1),e(`p`,je,r(f.$t(`common.message.desktopWindowsHint`)),1),e(`div`,Me,[i(v,{type:`primary`,round:``,size:`large`,tag:`a`,href:f.desktopReleasesUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faWindows,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.downloadWindows`)),1)]),_:1},8,[`href`]),p[10]||=e(`span`,{class:`platform__meta`},`Beta`,-1)])]),e(`article`,Ne,[e(`div`,Pe,[e(`span`,Fe,[i(_,{icon:f.faApple,class:`platform__os-icon`},null,8,[`icon`]),p[11]||=n(` macOS `,-1)]),p[12]||=e(`span`,{class:`chip chip--beta`},[e(`span`,{class:`chip__dot`}),n(`Beta `)],-1)]),e(`h2`,Ie,r(f.$t(`common.button.downloadMac`)),1),e(`p`,Le,r(f.$t(`common.message.desktopMacHint`)),1),e(`div`,Re,[i(v,{type:`primary`,round:``,size:`large`,tag:`a`,href:f.desktopReleasesUrl,target:`_blank`},{default:u(()=>[i(_,{icon:f.faApple,class:`btn-icon`},null,8,[`icon`]),n(` `+r(f.$t(`common.button.downloadMac`)),1)]),_:1},8,[`href`]),p[13]||=e(`span`,{class:`platform__meta`},`Beta · Apple Silicon & Intel`,-1)])])]),e(`section`,ze,[e(`article`,Be,[p[14]||=e(`span`,{class:`advantage__num`},`01`,-1),e(`h3`,Ve,r(f.$t(`common.title.mobileFastAccess`)),1),e(`p`,$,r(f.$t(`common.message.mobileFastAccess`)),1)]),e(`article`,He,[p[15]||=e(`span`,{class:`advantage__num`},`02`,-1),e(`h3`,Ue,r(f.$t(`common.title.mobileTrustedRelease`)),1),e(`p`,We,r(f.$t(`common.message.mobileTrustedRelease`)),1)]),e(`article`,Ge,[p[16]||=e(`span`,{class:`advantage__num`},`03`,-1),e(`h3`,Ke,r(f.$t(`common.title.mobileUnifiedExperience`)),1),e(`p`,qe,r(f.$t(`common.message.mobileUnifiedExperience`)),1)])]),f.hasIosDownload?(d(),o(`aside`,Je,[i(x,{class:`note__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,Ye,r(f.$t(`common.message.mobileInstallNote`)),1)])):a(``,!0),e(`aside`,Xe,[i(x,{class:`note__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,Ze,r(f.$t(`common.message.desktopUnsignedNote`)),1)])])])}var $e=b(A,[[`render`,Qe],[`__scopeId`,`data-v-9f2043a8`]]);export{$e as default};