@acedatacloud/nexior 3.371.5 → 3.371.6

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 (273) hide show
  1. package/dist/assets/{ApiCodeButton-DyCQcWPT.js → ApiCodeButton-C6FWrCva.js} +1 -1
  2. package/dist/assets/{ApiCodeDialog-DfF1paQe.js → ApiCodeDialog-BSOAGpIl.js} +1 -1
  3. package/dist/assets/{Artifacts-DeeXmcXM.js → Artifacts-v6aQr948.js} +1 -1
  4. package/dist/assets/{AskUserQuestionCard-BphOGSFL.js → AskUserQuestionCard-B9r5PAWt.js} +1 -1
  5. package/dist/assets/{AudioPreview-Db4Jiu9s.js → AudioPreview-B8qr2QlT.js} +1 -1
  6. package/dist/assets/{Auth-Ba1GFqiJ.js → Auth-Qz3S7RBz.js} +1 -1
  7. package/dist/assets/{Bare-DG90GwH5.js → Bare-CyyL0_4R.js} +1 -1
  8. package/dist/assets/{BotPlaceholder-BrT2BqT3.js → BotPlaceholder-CG-3N26i.js} +1 -1
  9. package/dist/assets/{BottomFooter-WFR6_QhV.js → BottomFooter-pZhbWjGC.js} +1 -1
  10. package/dist/assets/{BrowseConnectors-CG2nxaOa.js → BrowseConnectors-B6itmWFg.js} +1 -1
  11. package/dist/assets/{BrowserPairingDialog-EHBoKgmq.js → BrowserPairingDialog-DSRNWzJg.js} +1 -1
  12. package/dist/assets/{Callback-Fg8ea2Bk.js → Callback-CZTWooWq.js} +1 -1
  13. package/dist/assets/{CodeSnippet-Dcdiu1in.js → CodeSnippet-DgcSbbsU.js} +1 -1
  14. package/dist/assets/{Console-D1_KVXR2.js → Console-BBxTJLSJ.js} +1 -1
  15. package/dist/assets/{Conversation-1XBRBUIF.js → Conversation-CHN3U1zy.js} +1 -1
  16. package/dist/assets/Conversation-Djf4TKT3.js +1 -0
  17. package/dist/assets/{Conversation-AdT9y2ml.css → Conversation-PiS-3hIh.css} +1 -1
  18. package/dist/assets/{CopyToClipboard-BGKJYLUb.js → CopyToClipboard-CnfP3j6K.js} +1 -1
  19. package/dist/assets/{Detail--OCveBDe.css → Detail-CTKzBwgm.css} +1 -1
  20. package/dist/assets/Detail-H6T_ACAo.js +2 -0
  21. package/dist/assets/{Extra-DDNae5p8.js → Extra-N4bz_ynA.js} +1 -1
  22. package/dist/assets/{FilePreview-Cm-nsN19.js → FilePreview-3oibArLi.js} +1 -1
  23. package/dist/assets/{Hailuo-gN1Qi8PV.js → Hailuo-CzSCljMp.js} +1 -1
  24. package/dist/assets/{History-CnG8fKJ5.js → History-DFUC7MI1.js} +1 -1
  25. package/dist/assets/{ImagePreview-BI2WtJD9.js → ImagePreview-CZs9JDgj.js} +1 -1
  26. package/dist/assets/{ImageWrapper-UDtY3eN8.js → ImageWrapper-BUBjCc4Y.js} +1 -1
  27. package/dist/assets/{Index-Br5oujDd.js → Index-7yAAcCnc.js} +1 -1
  28. package/dist/assets/{Index-DeXq3ZUD.js → Index-B83nU58S.js} +1 -1
  29. package/dist/assets/{Index-Dhmz_Euw.js → Index-BGgODwvs.js} +1 -1
  30. package/dist/assets/{Index-By_NWSaz.js → Index-BI7IvD_5.js} +1 -1
  31. package/dist/assets/{Index-xKUkuyyT.js → Index-Bl8zKfvm.js} +1 -1
  32. package/dist/assets/{Index-D-1CB5F8.js → Index-BwOPPFrx.js} +1 -1
  33. package/dist/assets/{Index-B2hMcr6a.js → Index-C8dz08xT.js} +1 -1
  34. package/dist/assets/{Index-7idA_Bxd.js → Index-C8ztBhDJ.js} +1 -1
  35. package/dist/assets/{Index-DrFo-lR5.js → Index-CLzix8gw.js} +1 -1
  36. package/dist/assets/{Index-NKnqyIui.js → Index-CYb1uz3n.js} +1 -1
  37. package/dist/assets/{Index-qoQulRnv.js → Index-CedzRUkc.js} +1 -1
  38. package/dist/assets/{Index-0hyZ0H3o2.js → Index-Ch0Xco0B2.js} +1 -1
  39. package/dist/assets/{Index-8gZOW0sJ.js → Index-Chf5wpzE.js} +1 -1
  40. package/dist/assets/{Index-vDjYpKVM.js → Index-ChnzAzDM.js} +1 -1
  41. package/dist/assets/{Index-CSptC6Yn.js → Index-CoUozD_X.js} +1 -1
  42. package/dist/assets/{Index-GcFGwYr7.js → Index-CuX8wB-J.js} +1 -1
  43. package/dist/assets/{Index-C2hvXGDm.js → Index-CvbQ8pbZ.js} +1 -1
  44. package/dist/assets/{Index-L-4H0bjK.js → Index-D-9JExIN.js} +1 -1
  45. package/dist/assets/{Index-DNOr1iW3.js → Index-DBJQPnv-.js} +1 -1
  46. package/dist/assets/{Index-CYezLMCm.js → Index-DKLECQzD.js} +1 -1
  47. package/dist/assets/{Index-CZYaNvqE.js → Index-D_72nyK6.js} +1 -1
  48. package/dist/assets/{Index-ClY6C9CW.js → Index-DcSYotGI.js} +1 -1
  49. package/dist/assets/{Index-Dboqekd6.js → Index-DjOhuydQ.js} +1 -1
  50. package/dist/assets/{Index-ChPo_nS6.js → Index-Ds72pk48.js} +1 -1
  51. package/dist/assets/{Index-BaQal-3S.js → Index-DzuFr4ZN.js} +1 -1
  52. package/dist/assets/{Index-DWPoYB-J.js → Index-Dzw9vy2Q.js} +1 -1
  53. package/dist/assets/{Index-DXyn9qUk.js → Index-EbrrxMJp.js} +1 -1
  54. package/dist/assets/{Index-BfEz17xd.js → Index-QVhHmPeT.js} +1 -1
  55. package/dist/assets/{Index-UlxbSfsT.js → Index-RLfIr6Wd.js} +1 -1
  56. package/dist/assets/{Index-DSU8KxZF.js → Index-bdI4gOf7.js} +1 -1
  57. package/dist/assets/{Index-DReQQDJT.js → Index-cA9Q2kHT.js} +1 -1
  58. package/dist/assets/{Index-R-nHNTqY.js → Index-i4QVlQSj.js} +1 -1
  59. package/dist/assets/{Index-DUre6b6Q.js → Index-kV9B534Y.js} +1 -1
  60. package/dist/assets/{Index-616Xzkz6.js → Index-nreUcrR7.js} +1 -1
  61. package/dist/assets/{Index-CwlCChgd.js → Index-pSZ8x4oA.js} +1 -1
  62. package/dist/assets/{Index-CSAAyyr-.js → Index-yD08zqTo.js} +1 -1
  63. package/dist/assets/{Invitees-Dhs-Vbz1.js → Invitees-tJhxy9gP.js} +1 -1
  64. package/dist/assets/{List-AN5SRm3y.js → List-JRCW-2v3.js} +1 -1
  65. package/dist/assets/{List-BOHzpOWY.js → List-QYECvNlK.js} +1 -1
  66. package/dist/assets/{List-EFijGIpJ.js → List-k6GfD4W_.js} +1 -1
  67. package/dist/assets/{LocalTools-d9bq1DKk.js → LocalTools-7PXxcEkm.js} +1 -1
  68. package/dist/assets/{LocalTools-DsOEoy5E.js → LocalTools-DdGKYdbA.js} +1 -1
  69. package/dist/assets/{Logo-Bk-FMbTK.js → Logo-BenBX9Da.js} +1 -1
  70. package/dist/assets/{Main-o0Oe-Xzd.js → Main-p2YgZplk.js} +1 -1
  71. package/dist/assets/Message-DqA6hbOr.js +3 -0
  72. package/dist/assets/{Message-Ciwuue9Q.css → Message-MNJe97I0.css} +1 -1
  73. package/dist/assets/{Model-CzcN45mJ.js → Model-BSBuC_kq.js} +1 -1
  74. package/dist/assets/{Navigator-C8Zu1I7k.js → Navigator-BOH7oW8Y.js} +4 -4
  75. package/dist/assets/{NotFound-B_RZjNiy.js → NotFound-RbxyL3Bn.js} +1 -1
  76. package/dist/assets/{PageHeader-Ce-bDWDK.js → PageHeader-BGawVup6.js} +1 -1
  77. package/dist/assets/Pay-CVDZ8AV7.css +1 -0
  78. package/dist/assets/Pay-HLlmauma.js +1 -0
  79. package/dist/assets/{Player-BroqHdEp.js → Player-zfV2wET8.js} +1 -1
  80. package/dist/assets/{Poivelle-B3i4BIJi.js → Poivelle-BQSiSpTp.js} +1 -1
  81. package/dist/assets/{RealtimeCall-DVrrlQgb.js → RealtimeCall-9erGXsm6.js} +1 -1
  82. package/dist/assets/{ReportButton-CNzy8ytz.js → ReportButton-B0ZDQxLy.js} +1 -1
  83. package/dist/assets/{ReportDialog-iVvYSkR2.js → ReportDialog-C9Ed7KVo.js} +1 -1
  84. package/dist/assets/{ScenarioPaymentMode-DjfcTokL.js → ScenarioPaymentMode-BMC9eBkY.js} +1 -1
  85. package/dist/assets/{ScheduledTasks-ihSalV__.js → ScheduledTasks-BGSPlhqV.js} +1 -1
  86. package/dist/assets/{ServicePricingSummary-DDotAm8d.js → ServicePricingSummary-CMOjp4_z.js} +1 -1
  87. package/dist/assets/{ShowcaseGrid-B9WuVAMp.js → ShowcaseGrid-Bi3bNMFN.js} +1 -1
  88. package/dist/assets/{ShowcaseResultTabs-D6syzWr0.js → ShowcaseResultTabs-Be1u7B7Y.js} +1 -1
  89. package/dist/assets/{SolanaWalletPickerDialog-DA5z7JvO.js → SolanaWalletPickerDialog-ZfFE4moG.js} +1 -1
  90. package/dist/assets/{Status-BtpwPL21.js → Status-CjqISdkv.js} +1 -1
  91. package/dist/assets/{Subscribe-D_nukBwe.js → Subscribe-BNKvzM85.js} +1 -1
  92. package/dist/assets/{TabSwitcher-DFTCRy9R.js → TabSwitcher-C378mpaQ.js} +1 -1
  93. package/dist/assets/{Tts-CmfUhbHO.js → Tts-tiYmIS9F.js} +1 -1
  94. package/dist/assets/{VideoPlayer-spbjDbBj.js → VideoPlayer-DaI2iEuf.js} +1 -1
  95. package/dist/assets/{VideoPreview-_hD289E2.js → VideoPreview-iLfPvLl6.js} +1 -1
  96. package/dist/assets/airwallexCheckout-CX2POYmT.js +1 -0
  97. package/dist/assets/arrow-down-ChqsQZig.js +1 -0
  98. package/dist/assets/{arrow-down-wide-narrow-OghJzty4.js → arrow-down-wide-narrow-CONJ6MMS.js} +1 -1
  99. package/dist/assets/arrow-left-Dtuf3L2j.js +1 -0
  100. package/dist/assets/arrow-right-Bqfb6t60.js +1 -0
  101. package/dist/assets/arrow-up-CSpz0srB.js +1 -0
  102. package/dist/assets/{authorizeFlow-CKMe8_Mi.js → authorizeFlow-DA7_paQn.js} +1 -1
  103. package/dist/assets/{avatar-BvqKVB1C.js → avatar-B4_zPbI4.js} +1 -1
  104. package/dist/assets/{basic-BLiOd5uO.js → basic-DD2NrEBB.js} +1 -1
  105. package/dist/assets/{book-open-CciDm_Vd.js → book-open-Cofs7E9U.js} +1 -1
  106. package/dist/assets/{box-BCNuHUlh.js → box-B17UUMMH.js} +1 -1
  107. package/dist/assets/{boxes-i3mXsEpj.js → boxes-ZhcRrPKY.js} +1 -1
  108. package/dist/assets/{brain-BxOScqtA.js → brain-hlKyCeK7.js} +1 -1
  109. package/dist/assets/{chart-no-axes-combined-BgdzySL2.js → chart-no-axes-combined-CIn_DbGn.js} +1 -1
  110. package/dist/assets/{chat-Dkcmvp3V.js → chat-D-bnMuYT.js} +1 -1
  111. package/dist/assets/check-CTUDvagB.js +1 -0
  112. package/dist/assets/chevron-down-Ce5WWTJ4.js +1 -0
  113. package/dist/assets/chevron-right-CIFdBNP8.js +1 -0
  114. package/dist/assets/{circle-alert-B_P37SXR.js → circle-alert-DMhbkY9i.js} +1 -1
  115. package/dist/assets/circle-check-C7raGFyE.js +1 -0
  116. package/dist/assets/{circle-question-mark-BZwtMJy4.js → circle-question-mark-C4awnefe.js} +1 -1
  117. package/dist/assets/{clipboard-list-D5h3FLI6.js → clipboard-list-BtP8g_uG.js} +1 -1
  118. package/dist/assets/clock-CxvQJYC5.js +1 -0
  119. package/dist/assets/code-DnoJmxOh.js +1 -0
  120. package/dist/assets/{codingBridge-9fRKkXYx.js → codingBridge-Cvwiwqe7.js} +1 -1
  121. package/dist/assets/{codingBridgeNotify-DrZu58pn.js → codingBridgeNotify-Bs3sOsDi.js} +1 -1
  122. package/dist/assets/{coins-CCFGM5M3.js → coins-CGkvr3bq.js} +1 -1
  123. package/dist/assets/{collapse-DsSFtXhr.js → collapse-D4pqPjny.js} +1 -1
  124. package/dist/assets/{constants-CmC-0Hwp.js → constants-CuuFtMEu.js} +1 -1
  125. package/dist/assets/{copy-fKMS0PiE.js → copy-Bgq_Lt5F.js} +1 -1
  126. package/dist/assets/{createTaskActions-DQtYTRiq.js → createTaskActions-CgTN396G.js} +1 -1
  127. package/dist/assets/{date-picker-tuto8KOx.js → date-picker-CIVhQSq0.js} +1 -1
  128. package/dist/assets/{digitalhuman-BA-kq4Bb.js → digitalhuman-1RfVeR5X.js} +1 -1
  129. package/dist/assets/{dollar-sign-Df-0dDx9.js → dollar-sign--zIyRxW2.js} +1 -1
  130. package/dist/assets/{download-x4LIyCFT.js → download-BpXfjPLY.js} +1 -1
  131. package/dist/assets/{drawer-D-nvOajb.js → drawer-DttMD3IQ.js} +1 -1
  132. package/dist/assets/{dropdown-ZW2KkxX8.js → dropdown-uDZzlyvc.js} +1 -1
  133. package/dist/assets/{dropdown-C-txjYRt.js → dropdown-xvOpGXaf.js} +1 -1
  134. package/dist/assets/{ellipsis-BHYVvatw.js → ellipsis-D-4XqsA_.js} +1 -1
  135. package/dist/assets/{esm-DZEpexXY.js → esm-BxnuLIIk.js} +2 -2
  136. package/dist/assets/{external-link-BlEDNV7V.js → external-link-CfkUyibd.js} +1 -1
  137. package/dist/assets/{eye-C0mUD2kS.js → eye-Dhb3D_OP.js} +1 -1
  138. package/dist/assets/{file-B_edwII7.js → file-BY8wxxW3.js} +1 -1
  139. package/dist/assets/{file-output-DUwHsaTR.js → file-output-CSH2H9Po.js} +1 -1
  140. package/dist/assets/{file-text-DSjOXw5_.js → file-text-iEDL634w.js} +1 -1
  141. package/dist/assets/{fish-xeeiP7E9.js → fish-7f57Y8Hh.js} +1 -1
  142. package/dist/assets/{flux-CZWDSsaT.js → flux-Ca7x13EY.js} +1 -1
  143. package/dist/assets/{folder-BX4TmtAd.js → folder-BQwFHQqf.js} +1 -1
  144. package/dist/assets/gauge-Cn1dy4QG.js +1 -0
  145. package/dist/assets/{generationInput-CuX9cjvY.js → generationInput-Tp6tVYL4.js} +1 -1
  146. package/dist/assets/{globe-HRE9WPel.js → globe-CeROj4EC.js} +1 -1
  147. package/dist/assets/{grokvideo-SCXVcV3o.js → grokvideo-DBBElwKl.js} +1 -1
  148. package/dist/assets/{hailuo-CjcT1syR.js → hailuo-DndOJa7m.js} +1 -1
  149. package/dist/assets/{headphones-Bbkug9k5.js → headphones-CFqTn-wN.js} +1 -1
  150. package/dist/assets/{history-CH3z3rd0.js → history-BRP3o6Xd.js} +1 -1
  151. package/dist/assets/{house-CxlhGUbg.js → house-BUpAjJMo.js} +1 -1
  152. package/dist/assets/{i18n-BQrNxKw9.js → i18n-lmeSFJDq.js} +1 -1
  153. package/dist/assets/{image-B-M2bJ6h.js → image-CfYTaFPL.js} +1 -1
  154. package/dist/assets/{imageRequests-rKUC83Nh.js → imageRequests-DkHCCRlh.js} +1 -1
  155. package/dist/assets/{index-DqV-SJ5V.js → index-DVmeVwK7.js} +5 -5
  156. package/dist/assets/{index.es-xLHNFjv4.js → index.es-Chh6NaN3.js} +1 -1
  157. package/dist/assets/{info-BQSzmvEK.js → info-DbD2xHpS.js} +1 -1
  158. package/dist/assets/{input-number-BirnWaVC.js → input-number-CMFoxP_g.js} +1 -1
  159. package/dist/assets/{key-round-ChCuz1jv.js → key-round-CIFO1AJb.js} +1 -1
  160. package/dist/assets/{kling-DTdHs3_5.js → kling-BOhcy_Wh.js} +1 -1
  161. package/dist/assets/{languages-Bl73JZYq.js → languages-U21LtzrS.js} +1 -1
  162. package/dist/assets/{laptop-BOh762DU.js → laptop-By9AaYDw.js} +1 -1
  163. package/dist/assets/lib-CsvHzvqw.js +3 -0
  164. package/dist/assets/{lightbulb-D5pLYn1Y.js → lightbulb-Dmr-hP5L.js} +1 -1
  165. package/dist/assets/{link-COtKkd88.js → link-m8jORFL0.js} +1 -1
  166. package/dist/assets/loader-circle-b6njcpdq.js +1 -0
  167. package/dist/assets/{lock-ChRu85GF.js → lock-ClNzLpGj.js} +1 -1
  168. package/dist/assets/{luma-BW0j0Pb8.js → luma-Bbjxsp1K.js} +1 -1
  169. package/dist/assets/{maestro-BjzFgF7e.js → maestro-3lYA-9TB.js} +1 -1
  170. package/dist/assets/{maestroLanguages-DTI_fmcg.js → maestroLanguages-nCvoB59e.js} +1 -1
  171. package/dist/assets/{mail-CQdi9ZzD.js → mail-t2bgiRlI.js} +1 -1
  172. package/dist/assets/{message-circle-DxV12Lc6.js → message-circle-BhkVaGxg.js} +1 -1
  173. package/dist/assets/{mic-BpSNYK33.js → mic-C_oCRbvR.js} +1 -1
  174. package/dist/assets/{midjourney-CPZijRWY.js → midjourney-Du1OMPdL.js} +1 -1
  175. package/dist/assets/{minimax-BkYTmKXk.js → minimax-Dt0kZ3Vo.js} +1 -1
  176. package/dist/assets/{mobileLocalExec-BTp8FnEX.js → mobileLocalExec-Ce7U3Nmb.js} +1 -1
  177. package/dist/assets/{models-qt9s4QBH.js → models-Cru5uJc2.js} +1 -1
  178. package/dist/assets/{monitor-CE9GQaE1.js → monitor-CNUuuIgl.js} +1 -1
  179. package/dist/assets/{mouse-pointer-2-DUGOXw5q.js → mouse-pointer-2-HsST9qMs.js} +1 -1
  180. package/dist/assets/music-2-JRU0Dy3p.js +1 -0
  181. package/dist/assets/{nanobanana-hHXFtUYP.js → nanobanana-DiX5DuZY.js} +1 -1
  182. package/dist/assets/{omni-DpQnaEWk.js → omni-DJ2wmtaL.js} +1 -1
  183. package/dist/assets/{openaiimage-CVZfwpa8.js → openaiimage-BqvK74sh.js} +1 -1
  184. package/dist/assets/{pagination-CdEqT6nu.js → pagination-B62agDTK.js} +1 -1
  185. package/dist/assets/{pagination-BNM_M1GC.js → pagination-B_nilV_t.js} +1 -1
  186. package/dist/assets/{pagination-SAEpTY0E.js → pagination-DEYlwTlL.js} +1 -1
  187. package/dist/assets/{palette-VPPhzXTH.js → palette-zKJYv6Zy.js} +1 -1
  188. package/dist/assets/{paperclip-DtJRgA-W.js → paperclip-D0oNKYmJ.js} +1 -1
  189. package/dist/assets/{pause-COMcncHS.js → pause-U4QQSdVl.js} +1 -1
  190. package/dist/assets/{pencil-BTHCbcBX.js → pencil-DHzOKEgq.js} +1 -1
  191. package/dist/assets/{pika-C7XCLds7.js → pika-BbThRPIH.js} +1 -1
  192. package/dist/assets/{pixverse-CGaGZF00.js → pixverse-C-ZGeFKf.js} +1 -1
  193. package/dist/assets/play-CE4vLIhC.js +1 -0
  194. package/dist/assets/{plug-C0_t43IR.js → plug-D5dZg2UY.js} +1 -1
  195. package/dist/assets/plus-CKVbpoNT.js +1 -0
  196. package/dist/assets/{poivelle-Cz93rInj.js → poivelle-Ckaod8ZT.js} +1 -1
  197. package/dist/assets/{popover-BCDyyoJf.js → popover-D2p4u8-Q.js} +1 -1
  198. package/dist/assets/{producer-Dce1_I-e.js → producer-BbFTej8S.js} +1 -1
  199. package/dist/assets/{qrart-Czda0FqW.js → qrart-VBAjMw1M.js} +1 -1
  200. package/dist/assets/{qwenimage-CspF--PW.js → qwenimage-CuCAms4O.js} +1 -1
  201. package/dist/assets/{realtime-BSiECcor.js → realtime-B8R0_LhC.js} +1 -1
  202. package/dist/assets/{refresh-cw-D7ZZA5dZ.js → refresh-cw-Br21vEXT.js} +1 -1
  203. package/dist/assets/rotate-ccw-qPIu5GI_.js +1 -0
  204. package/dist/assets/rotate-cw-B7QEaCme.js +1 -0
  205. package/dist/assets/{row-IQ605R-m.js → row-DP0oDZAs.js} +1 -1
  206. package/dist/assets/search-Ba7fFpK4.js +1 -0
  207. package/dist/assets/{seedance-Bdy5PN34.js → seedance-hj8hoS13.js} +1 -1
  208. package/dist/assets/{seedream-DY3kkM79.js → seedream-CaMAYFeC.js} +1 -1
  209. package/dist/assets/{select-vXURdu1n.js → select-C_X0J3Ch.js} +1 -1
  210. package/dist/assets/{serp-D0jI8jgI.js → serp-BCRB0Wv_.js} +1 -1
  211. package/dist/assets/{shield-BP9Syrng.js → shield-BJ2lOk1S.js} +1 -1
  212. package/dist/assets/{showcase-D2MQ88YU.js → showcase-BzFqOq7u.js} +1 -1
  213. package/dist/assets/{showcaseRecreateMixin-BTTx6P4V.js → showcaseRecreateMixin-DyKdifmx.js} +1 -1
  214. package/dist/assets/{shuffle-7eMQRCTi.js → shuffle-DuAaOCLP.js} +1 -1
  215. package/dist/assets/{siteHome-C_LuwTQb.js → siteHome-CubcvlzE.js} +1 -1
  216. package/dist/assets/{slider-ILog1xgF.js → slider-CdeLiUQL.js} +1 -1
  217. package/dist/assets/{solana-wallets-DFhbGuWs.js → solana-wallets-Ctt177Lt.js} +2 -2
  218. package/dist/assets/{sora-3A2qd3Rj.js → sora-CRRO9qcp.js} +1 -1
  219. package/dist/assets/{sparkles-DvrnpaZU.js → sparkles-CKXe2q1X.js} +1 -1
  220. package/dist/assets/square-_WGgwmKd.js +1 -0
  221. package/dist/assets/{store-Cg1vR3oj.js → store-DztoOndf.js} +1 -1
  222. package/dist/assets/{suno-pr3WzvOs.js → suno-BPfVaq-I.js} +1 -1
  223. package/dist/assets/{switch-DsvSpAPL.js → switch-DyfMMvH-.js} +1 -1
  224. package/dist/assets/{table-C_Fimrfp.js → table-BEiwdkro.js} +1 -1
  225. package/dist/assets/{tabs-D_ymCjuP.js → tabs-6hfO7ztL.js} +1 -1
  226. package/dist/assets/{tag-yyEb6fTF.js → tag-mqM1JPuG.js} +1 -1
  227. package/dist/assets/{taskPolling-CNkyfqFX.js → taskPolling-U8DOPUQy.js} +1 -1
  228. package/dist/assets/terminal-Brg8gOCC.js +1 -0
  229. package/dist/assets/{time-picker-BY_8GGxp.js → time-picker-DgkXiE-7.js} +1 -1
  230. package/dist/assets/{tooltip-DhzXpaev.js → tooltip-OUJEXz3N.js} +1 -1
  231. package/dist/assets/{trash-2-CuwbroP3.js → trash-2-Cy68rO6n.js} +1 -1
  232. package/dist/assets/{triangle-alert-CXwoT9L1.js → triangle-alert-CjbgCRoN.js} +1 -1
  233. package/dist/assets/{upload-DPM3VJNR.js → upload-XPx0yx5g.js} +1 -1
  234. package/dist/assets/{upload-_ak4mf2P.js → upload-vSq7Ihy4.js} +1 -1
  235. package/dist/assets/user-CbpGf9ep.js +1 -0
  236. package/dist/assets/{veo-Z326mp90.js → veo-BEgEF3Oz.js} +1 -1
  237. package/dist/assets/{video-DeT9cCCj.js → video-a0RDUv9h.js} +1 -1
  238. package/dist/assets/{volume-2-Cd3hiwwO.js → volume-2-DGSpj-NH.js} +1 -1
  239. package/dist/assets/{wallet-BIHkm5lY.js → wallet-Ca1vgVzZ.js} +1 -1
  240. package/dist/assets/{wan-DMD3wwVk.js → wan-iM8yvoVy.js} +1 -1
  241. package/dist/assets/{wand-sparkles-DKunfvfr.js → wand-sparkles-BLj6TbQF.js} +1 -1
  242. package/dist/assets/{web-CkSTYnBp.js → web-D4sEVuy1.js} +1 -1
  243. package/dist/assets/{webextrator-BRrqmOXi.js → webextrator-CppLRjXW.js} +1 -1
  244. package/dist/assets/{zap-Bs0LoGjL.js → zap-D95myyfC.js} +1 -1
  245. package/dist/index.html +4 -4
  246. package/package.json +2 -1
  247. package/dist/assets/Conversation-D6eSyt3H.js +0 -1
  248. package/dist/assets/Detail-DppGnkTU.js +0 -2
  249. package/dist/assets/Message-BkQFvQNA.js +0 -3
  250. package/dist/assets/Pay-B9KTqsCM.css +0 -1
  251. package/dist/assets/Pay-z0qsNo1_.js +0 -1
  252. package/dist/assets/airwallexCheckout-BtejPoL2.js +0 -1
  253. package/dist/assets/arrow-down-D057mODD.js +0 -1
  254. package/dist/assets/arrow-left-YoHcMhBE.js +0 -1
  255. package/dist/assets/arrow-right-B9ho0-hr.js +0 -1
  256. package/dist/assets/arrow-up-803cjwMX.js +0 -1
  257. package/dist/assets/check-BQ2kURhQ.js +0 -1
  258. package/dist/assets/chevron-down-B3REnXgR.js +0 -1
  259. package/dist/assets/chevron-right-w2PXBeor.js +0 -1
  260. package/dist/assets/circle-check-BQthOLHp.js +0 -1
  261. package/dist/assets/clock-B-p2Z5fl.js +0 -1
  262. package/dist/assets/code-D6hLj3tB.js +0 -1
  263. package/dist/assets/gauge-BSdnz2_X.js +0 -1
  264. package/dist/assets/loader-circle-DKKtAnTB.js +0 -1
  265. package/dist/assets/music-2-B89JBAVE.js +0 -1
  266. package/dist/assets/play-Cj4Rc7zR.js +0 -1
  267. package/dist/assets/plus-D5KrvAv-.js +0 -1
  268. package/dist/assets/rotate-ccw-CdzApwyj.js +0 -1
  269. package/dist/assets/rotate-cw-5loEUj__.js +0 -1
  270. package/dist/assets/search-Dm-cjK6g.js +0 -1
  271. package/dist/assets/square-CJdx7-_g.js +0 -1
  272. package/dist/assets/terminal-Cee_oZYd.js +0 -1
  273. package/dist/assets/user-Q-EjoZno.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,qt as m,rt as h,tt as g,x as _,z as v}from"./vendor-chart-Dw-P17PN.js";import{t as y}from"./upload-DPM3VJNR.js";import{t as b}from"./tooltip-DhzXpaev.js";import{t as x}from"./alert-BprQRUmf.js";import{h as S,v as C}from"./models-qt9s4QBH.js";import{t as w}from"./drawer-D-nvOajb.js";import{t as T}from"./box-BCNuHUlh.js";import{t as E}from"./clock-B-p2Z5fl.js";import{a as D,i as O,n as k,o as A,r as j,s as M,t as N}from"./pagination-CdEqT6nu.js";import{t as P}from"./info-BQSzmvEK.js";import{t as ee}from"./trash-2-CuwbroP3.js";import{t as te}from"./triangle-alert-CXwoT9L1.js";import{t as F}from"./upload-_ak4mf2P.js";import{t as I}from"./wand-sparkles-DKunfvfr.js";import{At as L,Dt as R,Mt as ne,Nt as re,Ot as ie,jt as ae}from"./constants-CmC-0Hwp.js";import{A as z,Cn as oe,La as B,Li as V,O as H,Qi as U,Va as W,Xn as G,Zn as K,aa as q,at as J,ct as se,di as ce,et as le,it as ue,li as de,nt as fe,ot as pe,rt as me,st as Y,to as X,tt as he,zi as Z}from"./index-DqV-SJ5V.js";import{t as ge}from"./CopyToClipboard-BGKJYLUb.js";import{t as _e}from"./ReportButton-CNzy8ytz.js";import{t as ve}from"./FilePreview-Cm-nsN19.js";import{t as Q}from"./ImagePreview-BI2WtJD9.js";import{n as ye}from"./taskDrawerMixin-DyAUhFEq.js";import{t as be}from"./ServicePricingSummary-DDotAm8d.js";import{t as xe}from"./VideoPlayer-spbjDbBj.js";import{t as Se}from"./ScenarioPaymentMode-DjfcTokL.js";import{t as Ce}from"./ApiCodeButton-DyCQcWPT.js";import{t as we}from"./BotPlaceholder-BrT2BqT3.js";import{t as Te}from"./taskPollingMixin-CcLxtz8z.js";var Ee=v({name:`LayoutOmni`,components:{MagicIcon:I,ElDrawer:w,ElButton:X},mixins:[ye]}),De={class:`main flex flex-row flex-1`},Oe={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)]`},ke={class:`result h-full p-4 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Ae(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),h=l(`el-drawer`);return g(),s(`div`,De,[e(`div`,Oe,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,ke,[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`]),[[_,!t.tasksEmpty]]),a(h,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var je=z(Ee,[[`render`,Ae],[`__scopeId`,`data-v-847afabf`]]),Me=v({name:`OmniPromptInput`,components:{PromptTextarea:O},computed:{prompt:{get(){return this.$store.state.omni?.config?.prompt},set(e){this.$store.commit(`omni/setConfig`,{...this.$store.state.omni?.config,prompt:e})}}},mounted(){this.prompt||=``}});function Ne(e,t,n,r,i,a){let o=l(`prompt-textarea`);return g(),f(o,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`omni.name.prompt`),info:e.$t(`omni.description.prompt`),placeholder:e.$t(`omni.placeholder.prompt`),"min-rows":5},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var Pe=z(Me,[[`render`,Ne]]),Fe=v({name:`OmniResolutionSelector`,components:{InfoIcon:D},data(){return{options:[{value:re,label:`720p`},{value:ne,label:`1080p`}]}},computed:{value:{get(){return this.$store.state.omni?.config?.resolution},set(e){this.$store.commit(`omni/setConfig`,{...this.$store.state.omni?.config,resolution:e})}}},mounted(){this.value||=ie}}),Ie={class:`resolution`},Le={class:`header`},Re={class:`title font-bold`},ze={class:`items`},Be=[`onClick`];function Ve(t,r,o,u,d,f){let p=l(`info-icon`);return g(),s(`div`,Ie,[e(`div`,Le,[e(`h2`,Re,i(t.$t(`omni.name.resolution`)),1),a(p,{content:t.$t(`omni.description.resolution`),class:`info`},null,8,[`content`])]),e(`div`,ze,[(g(!0),s(c,null,h(t.options,e=>(g(),s(`div`,{key:e.value,class:n([`item`,{active:t.value===e.value}]),onClick:n=>t.value=e.value},i(e.label),11,Be))),128))])])}var He=z(Fe,[[`render`,Ve],[`__scopeId`,`data-v-1f9abe29`]]),Ue=v({name:`OmniRatioSelector`,components:{InfoIcon:D},computed:{options(){return[{value:L,label:`16:9`,w:32,h:18},{value:ae,label:`9:16`,w:18,h:32}]},value:{get(){return this.$store.state.omni?.config?.aspect_ratio},set(e){this.$store.commit(`omni/setConfig`,{...this.$store.state.omni?.config,aspect_ratio:e})}}},mounted(){this.value||=R}}),We={class:`ratio`},Ge={class:`header`},Ke={class:`title font-bold`},qe={class:`items`},Je=[`onClick`],Ye={class:`preview`},Xe={class:`name`};function Ze(t,r,o,u,d,f){let p=l(`info-icon`);return g(),s(`div`,We,[e(`div`,Ge,[e(`h2`,Ke,i(t.$t(`omni.name.ratio`)),1),a(p,{content:t.$t(`omni.description.ratio`),class:`info`},null,8,[`content`])]),e(`div`,qe,[(g(!0),s(c,null,h(t.options,r=>(g(),s(`div`,{key:r.value,class:n([`item`,{active:t.value===r.value}]),onClick:e=>t.value=r.value},[e(`div`,Ye,[e(`div`,{class:`rect`,style:m({width:r.w+`px`,height:r.h+`px`})},null,4)]),e(`div`,Xe,i(r.label),1)],10,Je))),128))])])}var Qe=z(Ue,[[`render`,Ze],[`__scopeId`,`data-v-1c0c1511`]]),$e=4,et=v({name:`OmniReferenceImagesInput`,components:{ElUpload:y,ElButton:X,InfoIcon:D,ImagePreview:Q,UploadIcon:F},mixins:[se,Y,J,le],data(){return{fileList:[],uploadUrl:B()+`/api/v1/files/`,limit:$e,suppressWatch:!1}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url).filter(e=>!!e)||[]},value(){return this.$store.state.omni?.config?.image_urls}},watch:{value:{immediate:!0,handler(e){if(this.suppressWatch)return;if(!e||e.length===0){let e=(this.fileList||[]).filter(e=>!e?.response?.file_url);this.fileList=e.length?e:[];return}let t=[];e.forEach(e=>{let n=this.fileList.find(t=>t?.response?.file_url===e||t?.url===e);n?t.push(n):t.push({name:e.split(`/`).pop()||e,url:e,status:`success`,percentage:100,response:{file_url:e}})}),(this.fileList||[]).filter(e=>!e?.response?.file_url).forEach(e=>{t.some(t=>t===e||t?.url===e?.url||t?.response?.file_url===e?.response?.file_url)||t.push(e)}),this.fileList=t}}},methods:{onChange(e){if(!e?.url&&e?.raw)try{e.url=URL.createObjectURL(e.raw)}catch{}},onRemove(e){if(e?.url&&typeof e.url==`string`&&e.url.startsWith(`blob:`))try{URL.revokeObjectURL(e.url)}catch{}this.onSetReferenceImages()},onExceed(){C.warning(this.$t(`omni.message.uploadReferenceExceed`))},onError(){C.error(this.$t(`omni.message.uploadError`))},onSetReferenceImages(){let e=this.urls;this.suppressWatch=!0,this.$store.commit(`omni/setConfig`,{...this.$store.state.omni?.config,image_urls:e.length?e:void 0}),this.$nextTick(()=>{this.suppressWatch=!1})},async onSuccess(e,t){e?.file_url&&(t.url=e.file_url,t.response=e),this.onSetReferenceImages()},onRemovePreview(e,t){if(this.fileList.splice(e,1),t?.url&&typeof t.url==`string`&&t.url.startsWith(`blob:`))try{URL.revokeObjectURL(t.url)}catch{}this.onSetReferenceImages()}}}),tt={class:`field mb-[10px] flex min-h-8 w-full items-center justify-between gap-3`},nt={class:`flex min-w-0 items-center`},rt={class:`title m-0 text-[14px] font-bold`},it={class:`file-list flex flex-wrap gap-[10px]`};function at(t,n,o,u,d,m){let _=l(`info-icon`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`),x=l(`image-preview`);return g(),s(`div`,null,[e(`div`,tt,[e(`div`,nt,[e(`h2`,rt,i(t.$t(`omni.name.referenceImages`)),1),a(_,{content:t.$t(`omni.description.referenceImages`)},null,8,[`content`])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,name:`file`,class:`value shrink-0`,limit:t.limit,multiple:!0,"show-file-list":!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,"on-change":t.onChange,"on-remove":t.onRemove,headers:t.headers},{default:p(()=>[a(y,{size:`small`,type:`primary`,round:``},{default:p(()=>[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`omni.button.upload`)),1)]),_:1})]),_:1},8,[`file-list`,`limit`,`before-upload`,`action`,`on-exceed`,`on-error`,`on-success`,`on-change`,`on-remove`,`headers`])]),e(`div`,it,[(g(!0),s(c,null,h(t.fileList,(e,n)=>(g(),f(x,{key:e.uid||e?.response?.file_url||e.url||n,url:e.url||e?.response?.file_url,name:e.name,percentage:e.percentage,onRemove:r=>t.onRemovePreview(n,e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))),128))])])}var ot=z(et,[[`render`,at]]),st=v({name:`OmniVideoInput`,components:{ElUpload:y,ElButton:X,InfoIcon:D,FilePreview:ve,UploadIcon:F},mixins:[Y,J],data(){return{fileList:[],uploadUrl:B()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},videoUrl(){return this.$store.state.omni?.config?.video_urls?.[0]},videoName(){let e=this.videoUrl||``;return e.split(`/`).pop()||e}},methods:{onExceed(){C.warning(this.$t(`omni.message.uploadVideoExceed`))},onError(){C.error(this.$t(`omni.message.uploadVideoError`))},beforeUpload(e){let t=e.type===`video/mp4`||e.type===`video/quicktime`,n=me(e.size);return t?n?!0:(C.error(this.$t(`omni.message.uploadVideoSizeExceed`,{max:fe(he)})),!1):(C.error(this.$t(`omni.message.uploadVideoTypeFailed`)),!1)},setVideoUrls(e){this.$store.commit(`omni/setConfig`,{...this.$store.state.omni?.config,video_urls:e?[e]:void 0})},onRemove(){this.fileList=[],this.setVideoUrls(void 0)},async onSuccess(e,t){let n=e?.file_url||t?.response?.file_url;this.setVideoUrls(n||void 0)}}}),ct={class:`field flex min-h-8 w-full items-center justify-between gap-3`},lt={class:`flex min-w-0 items-center`},ut={class:`title m-0 text-[14px] font-bold`},dt={key:0,class:`file-list flex flex-wrap gap-[10px]`};function ft(t,n,c,u,d,f){let m=l(`info-icon`),h=l(`upload-icon`),_=l(`el-button`),v=l(`el-upload`),y=l(`file-preview`);return g(),s(`div`,null,[e(`div`,ct,[e(`div`,lt,[e(`h2`,ut,i(t.$t(`omni.name.referenceVideo`)),1),a(m,{content:t.$t(`omni.description.referenceVideo`)},null,8,[`content`])]),a(v,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.mp4,.mov`,name:`file`,class:`value shrink-0`,"show-file-list":!1,limit:1,multiple:!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{default:p(()=>[a(_,{size:`small`,type:`primary`,round:``},{default:p(()=>[a(h,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`omni.button.uploadVideo`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])]),t.videoUrl?(g(),s(`div`,dt,[a(y,{url:t.videoUrl,name:t.videoName,percentage:100,onRemove:t.onRemove},null,8,[`url`,`name`,`onRemove`])])):o(``,!0)])}var pt=v({name:`OmniConfigPanel`,components:{ElButton:X,MagicIcon:I,PromptInput:Pe,ResolutionSelector:He,RatioSelector:Qe,ReferenceImagesInput:ot,VideoInput:z(st,[[`render`,ft],[`__scopeId`,`data-v-b87d1e4e`]]),ServicePricingSummary:be,ScenarioPaymentMode:Se},emits:[`generate`],data(){return{quoteTimer:0,quoteRunId:0}},computed:{config(){return this.$store.state.omni?.config},consumption(){return oe(this.config,this.service?.cost)},service(){return this.$store.state.omni?.service},walletMode(){return V()&&Z(`omni`).mode===`wallet`}},watch:{walletMode:{handler(e){e&&this.scheduleQuote()},immediate:!0},config:{handler(){this.walletMode&&this.scheduleQuote()},deep:!0}},beforeUnmount(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1},methods:{scheduleQuote(){window.clearTimeout(this.quoteTimer),this.quoteTimer=window.setTimeout(this.refreshQuote,350)},async refreshQuote(){let e=Z(`omni`),t=++this.quoteRunId;e.quoteLoading=!0,e.quoteUsdc=void 0;try{let n=await K.quote(G(this.config));t===this.quoteRunId&&e.mode===`wallet`&&(e.quoteUsdc=n.amountUsdc)}catch(e){console.warn(`x402 quote failed`,e)}finally{t===this.quoteRunId&&(e.quoteLoading=!1)}},onGenerate(){this.$emit(`generate`)}}}),mt={class:`flex flex-col h-full`},ht={class:`flex-1 overflow-y-auto p-5`},gt={class:`flex flex-col items-center justify-center px-5 pb-5`};function _t(t,n,c,u,d,m){let h=l(`prompt-input`),_=l(`ratio-selector`),v=l(`resolution-selector`),y=l(`reference-images-input`),b=l(`video-input`),x=l(`scenario-payment-mode`),S=l(`service-pricing-summary`),C=l(`magic-icon`),w=l(`el-button`);return g(),s(`div`,mt,[e(`div`,ht,[a(h,{class:`mb-4`}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),a(y,{class:`mb-4`}),a(b,{class:`mb-4`})]),e(`div`,gt,[a(x,{scenario:`omni`}),t.walletMode?o(``,!0):(g(),f(S,{key:0,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(`omni.button.generate`)),1)]),_:1},8,[`onClick`])])])}var vt=z(pt,[[`render`,_t]]),yt=v({name:`OmniTaskPreview`,components:{DeleteIcon:ee,ApplicationIcon:T,ChannelIcon:M,CopyToClipboard:ge,ExpandIcon:A,InfoIcon:P,MagicIcon:I,TimeIcon:E,WarningIcon:te,ElAlert:x,VideoPlayer:xe,ElTooltip:b,ElButton:X,ImagePreview:Q,ApiCodeButton:Ce,ReportButton:_e},props:{modelValue:{type:Object,required:!0}},data(){return{nowTs:Date.now(),timer:0}},computed:{video(){return this.modelValue?.response?.data?.[0]},inputImage(){return this.modelValue?.request?.image_urls?.[0]},pendingElapsed(){let e=parseFloat((this.modelValue?.created_at||``).toString());if(e)return Math.max(0,Math.floor(this.nowTs/1e3-e))}},watch:{"modelValue.response":{handler(e){e&&this.stopTimer()}}},mounted(){this.modelValue?.response||(this.timer=window.setInterval(()=>{this.nowTs=Date.now()},1e3))},beforeUnmount(){this.stopTimer()},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await W.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(`omni/deleteTask`,{id:e}),C.success(this.$t(`common.message.deleteTaskSuccess`))}catch{C.error(this.$t(`common.message.deleteTaskFailed`))}}},stopTimer(){this.timer&&=(window.clearInterval(this.timer),0)},onDownload(e){window.open(e,`_blank`)}}}),bt={class:`preview`},xt={class:`left`},St={class:`main`},Ct={class:`bot`},wt={class:`datetime`},Tt=[`aria-label`],Et={class:`info`},Dt={key:0,class:`flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto`},Ot={key:1,class:`prompt mt-2`},kt={key:0},At={key:1},jt={key:0,class:n({content:!0})},Mt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Nt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Pt={key:1,class:n({content:!0})},Ft={key:0,class:`mb-4`},It={key:1,class:n({operations:!0,"mt-2":!0,"mb-2":!0})},Lt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Rt={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},zt={key:0},Bt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Vt={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Ht={key:2,class:n({content:!0})},Ut={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Wt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Gt={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Kt={key:3,class:n({content:!0})},qt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function Jt(n,c,u,d,f,m){let h=l(`capability-presentation`),_=l(`delete-icon`),v=l(`el-tooltip`),y=l(`image-preview`),b=l(`time-icon`),x=l(`magic-icon`),S=l(`copy-to-clipboard`),C=l(`el-alert`),w=l(`video-player`),T=l(`el-button`),E=l(`api-code-button`),D=l(`report-button`),O=l(`application-icon`),k=l(`expand-icon`),A=l(`channel-icon`),j=l(`warning-icon`),M=l(`info-icon`);return g(),s(`div`,bt,[e(`div`,xt,[a(h,{capability:`omni`,part:`avatar`,class:`avatar`})]),e(`div`,St,[e(`div`,Ct,[a(h,{capability:`omni`,part:`name`}),e(`span`,wt,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(v,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:p(()=>[n.modelValue?.id?(g(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:c[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(_,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Tt)):o(``,!0)]),_:1},8,[`content`])]),e(`div`,Et,[n.inputImage?(g(),s(`div`,Dt,[a(y,{url:n.inputImage,name:`image`,closable:!1},null,8,[`url`])])):o(``,!0),n.modelValue?.request?.prompt?(g(),s(`p`,Ot,[r(i(n.modelValue?.request?.prompt)+` `,1),n.modelValue?.response?n.video?.state===`processing`||n.video?.state===`pending`?(g(),s(`span`,At,` - (`+i(n.$t(`omni.status.processing`))+`) `,1)):o(``,!0):(g(),s(`span`,kt,` - (`+i(n.$t(`omni.status.pending`))+`) `,1))])):o(``,!0)]),n.modelValue?.response?n.modelValue?.response?.success===!0?(g(),s(`div`,Pt,[n.video?.video_url?(g(),s(`div`,Ft,[a(w,{src:n.video?.video_url},null,8,[`src`])])):o(``,!0),n.video?.video_url?(g(),s(`div`,It,[a(v,{class:`box-item`,effect:`dark`,content:n.$t(`omni.message.downloadVideo`),placement:`top-start`},{default:p(()=>[a(T,{type:`info`,size:`small`,class:`btn-action`,onClick:c[1]||=t(e=>n.onDownload(n.video?.video_url),[`stop`])},{default:p(()=>[r(i(n.$t(`common.button.download`)),1)]),_:1})]),_:1},8,[`content`]),a(E,{path:`/gemini/videos`,body:n.modelValue?.request},null,8,[`body`]),a(D,{service:`omni`,"target-id":n.modelValue?.id,snapshot:{prompt:n.modelValue?.request?.prompt}},null,8,[`target-id`,`snapshot`])])):o(``,!0),a(C,{closable:!1,class:`mt-2 success`},{default:p(()=>[n.modelValue?.request?.model?(g(),s(`p`,Lt,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.model`))+`: `+i(n.modelValue?.request?.model),1)])):o(``,!0),n.modelValue?.request?.resolution?(g(),s(`p`,Rt,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.resolution`))+`: `+i(n.modelValue?.request?.resolution)+` `,1),n.modelValue?.request?.aspect_ratio?(g(),s(`span`,zt,` · `+i(n.modelValue?.request?.aspect_ratio),1)):o(``,!0)])):o(``,!0),e(`p`,Bt,[a(x,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(S,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),n.modelValue?.elapsed?(g(),s(`p`,$,[a(b,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),n.modelValue?.response?.trace_id?(g(),s(`p`,Vt,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(S,{content:n.modelValue?.response?.trace_id,class:`btn-copy inline-block`},null,8,[`content`])])):o(``,!0)]),_:1})])):n.modelValue?.response?.success===!1?(g(),s(`div`,Ht,[a(C,{closable:!1,class:`failure`},{template:p(()=>[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.failure`)),1)]),default:p(()=>[e(`p`,Ut,[a(x,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(S,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),n.modelValue?.response?.error?.message?(g(),s(`p`,Wt,[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(S,{content:n.modelValue?.response?.error?.message,class:`btn-copy inline-block`},null,8,[`content`])])):o(``,!0),n.modelValue?.response?.trace_id?(g(),s(`p`,Gt,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(S,{content:n.modelValue?.response?.trace_id,class:`btn-copy inline-block`},null,8,[`content`])])):o(``,!0)]),_:1})])):(g(),s(`div`,Kt,[a(C,{closable:!1,class:`info`},{template:p(()=>[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.status`)),1)]),default:p(()=>[e(`p`,qt,[a(x,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(S,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])])]),_:1})])):(g(),s(`div`,jt,[a(C,{closable:!1,class:`info`},{template:p(()=>[a(b,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.status.pending`)),1)]),default:p(()=>[e(`p`,Mt,[a(x,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(S,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),n.pendingElapsed===void 0?o(``,!0):(g(),s(`p`,Nt,[a(b,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.elapsed`))+`: `+i(n.pendingElapsed)+`s `,1)]))]),_:1})]))])])}var Yt=v({name:`OmniRecentPanel`,components:{TaskPreview:z(yt,[[`render`,Jt],[`__scopeId`,`data-v-83851ad5`]]),BotPlaceholder:we,NoTasks:j,ScrollList:k},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],computed:{tasks(){return{...this.$store.state.omni?.tasks,items:this.$store.state.omni?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Xt={key:0},Zt={key:2,class:`w-full h-full flex items-center justify-center`};function Qt(e,t,n,r,i,u){let d=l(`bot-placeholder`),m=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return g(),s(c,null,[e.tasks?.items===void 0?(g(),s(`div`,Xt,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(g(),f(_,{key:1,ref:`scrollList`,class:`tasks w-full h-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(g(!0),s(c,null,h(e.tasks?.items,e=>(g(),f(m,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(g(),s(`div`,Zt,[a(v)])):o(``,!0)],64)}var $t=v({name:`OmniIndex`,components:{ConfigPanel:vt,Layout:je,RecentPanel:z(Yt,[[`render`,Qt]])},mixins:[pe,Te(`omni`)],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1,walletTaskIds:[]}},computed:{applicationsLoading(){return this.$store.state.omni?.status?.getApplications===S.Request},tasksLoading(){return this.$store.state.omni?.status?.getTasks===S.Request||this.fetchingTasks},credential(){return this.$store.state.omni?.credential},config(){return this.$store.state.omni?.config},tasks(){return this.$store.state.omni?.tasks},walletMode(){return V()&&Z(`omni`).mode===`wallet`}},watch:{walletMode:{async handler(e,t){if(!(t===void 0||e===t)){if(this.$store.commit(`omni/setTasks`,void 0),e&&!this.job&&(this.job=window.setInterval(this.onPollTasks,5e3)),!e&&!this.credential?.token){window.clearInterval(this.job),this.job=0,await this.onScrollDown();return}await this.onGetTasks(),await this.onScrollDown()}}},initialized:{async handler(e){e&&(await this.onGetTasks(),await this.onScrollDown(),this.job||=window.setInterval(this.onPollTasks,5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await N({tasks: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(){await this.$store.dispatch(`omni/getService`)},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks)return;let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};this.fetchingTasks=!0;try{await this.$store.dispatch(`omni/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r,...this.walletMode&&!this.credential?.token?{mode:`x402`,ids:this.walletTaskIds}:{}})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!ue(this.uploadTracker,e=>this.$t(e),e=>C.warning(e)))return;let e=G(this.config);if(!e.prompt){C.warning(this.$t(`omni.message.promptRequired`));return}if(e.video_urls&&!e.image_urls){C.warning(this.$t(`omni.message.videoRequiresImage`));return}let t;if(this.walletMode){let n=this.getWalletContext();if(!n){C.warning(this.$t(`common.x402Scenario.connectWalletFirst`));return}t=K.generate(e,{mode:`x402`,x402:{wallet:n,confirm:e=>this.confirmWalletPayment(e),identityToken:this.credential?.token}})}else{if(!q())return;let n=this.credential?.token;if(!n)return;t=K.generate(e,{token:n})}C.info(this.$t(`omni.message.startingTask`)),U(`omni`,t).then(e=>{let t=e?.data?.task_id;this.walletMode&&!this.credential?.token&&t&&!this.walletTaskIds.includes(t)&&this.walletTaskIds.unshift(t),C.success(this.$t(`omni.message.startTaskSuccess`))}).catch(e=>{let t=e?.response?.data;e instanceof de||H(e,`omni`)||(this.walletMode?C.error(this.$t(`common.x402Scenario.paymentFailed`)):C.error(this.$t(`omni.message.startTaskFailed`)+(t?.error?.message||``)))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getWalletContext(){return ce(this.$wallet)},async confirmWalletPayment(e){return W.confirm(this.$t(`common.x402Scenario.confirmPayment`,{amount:e.amountUsdc}),this.$t(`order.message.x402ConfirmTitle`),{confirmButtonText:this.$t(`order.message.x402WalletPayCta`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`}).then(()=>!0).catch(()=>!1)},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function en(e,t,n,r,i,o){let s=l(`config-panel`),c=l(`recent-panel`),u=l(`layout`);return g(),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 tn=z($t,[[`render`,en]]);export{tn 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,qt as m,rt as h,tt as g,x as _,z as v}from"./vendor-chart-Dw-P17PN.js";import{t as y}from"./upload-XPx0yx5g.js";import{t as b}from"./tooltip-OUJEXz3N.js";import{t as x}from"./alert-BprQRUmf.js";import{h as S,v as C}from"./models-Cru5uJc2.js";import{t as w}from"./drawer-DttMD3IQ.js";import{t as T}from"./box-B17UUMMH.js";import{t as E}from"./clock-CxvQJYC5.js";import{a as D,i as O,n as k,o as A,r as j,s as M,t as N}from"./pagination-B62agDTK.js";import{t as P}from"./info-DbD2xHpS.js";import{t as ee}from"./trash-2-Cy68rO6n.js";import{t as te}from"./triangle-alert-CjbgCRoN.js";import{t as F}from"./upload-vSq7Ihy4.js";import{t as I}from"./wand-sparkles-BLj6TbQF.js";import{At as L,Dt as R,Mt as ne,Nt as re,Ot as ie,jt as ae}from"./constants-CuuFtMEu.js";import{A as z,Cn as oe,La as B,Li as V,O as H,Qi as U,Va as W,Xn as G,Zn as K,aa as q,at as J,ct as se,di as ce,et as le,it as ue,li as de,nt as fe,ot as pe,rt as me,st as Y,to as X,tt as he,zi as Z}from"./index-DVmeVwK7.js";import{t as ge}from"./CopyToClipboard-CnfP3j6K.js";import{t as _e}from"./ReportButton-B0ZDQxLy.js";import{t as ve}from"./FilePreview-3oibArLi.js";import{t as Q}from"./ImagePreview-CZs9JDgj.js";import{n as ye}from"./taskDrawerMixin-DyAUhFEq.js";import{t as be}from"./ServicePricingSummary-CMOjp4_z.js";import{t as xe}from"./VideoPlayer-DaI2iEuf.js";import{t as Se}from"./ScenarioPaymentMode-BMC9eBkY.js";import{t as Ce}from"./ApiCodeButton-C6FWrCva.js";import{t as we}from"./BotPlaceholder-CG-3N26i.js";import{t as Te}from"./taskPollingMixin-CcLxtz8z.js";var Ee=v({name:`LayoutOmni`,components:{MagicIcon:I,ElDrawer:w,ElButton:X},mixins:[ye]}),De={class:`main flex flex-row flex-1`},Oe={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)]`},ke={class:`result h-full p-4 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Ae(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),h=l(`el-drawer`);return g(),s(`div`,De,[e(`div`,Oe,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,ke,[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`]),[[_,!t.tasksEmpty]]),a(h,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var je=z(Ee,[[`render`,Ae],[`__scopeId`,`data-v-847afabf`]]),Me=v({name:`OmniPromptInput`,components:{PromptTextarea:O},computed:{prompt:{get(){return this.$store.state.omni?.config?.prompt},set(e){this.$store.commit(`omni/setConfig`,{...this.$store.state.omni?.config,prompt:e})}}},mounted(){this.prompt||=``}});function Ne(e,t,n,r,i,a){let o=l(`prompt-textarea`);return g(),f(o,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`omni.name.prompt`),info:e.$t(`omni.description.prompt`),placeholder:e.$t(`omni.placeholder.prompt`),"min-rows":5},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var Pe=z(Me,[[`render`,Ne]]),Fe=v({name:`OmniResolutionSelector`,components:{InfoIcon:D},data(){return{options:[{value:re,label:`720p`},{value:ne,label:`1080p`}]}},computed:{value:{get(){return this.$store.state.omni?.config?.resolution},set(e){this.$store.commit(`omni/setConfig`,{...this.$store.state.omni?.config,resolution:e})}}},mounted(){this.value||=ie}}),Ie={class:`resolution`},Le={class:`header`},Re={class:`title font-bold`},ze={class:`items`},Be=[`onClick`];function Ve(t,r,o,u,d,f){let p=l(`info-icon`);return g(),s(`div`,Ie,[e(`div`,Le,[e(`h2`,Re,i(t.$t(`omni.name.resolution`)),1),a(p,{content:t.$t(`omni.description.resolution`),class:`info`},null,8,[`content`])]),e(`div`,ze,[(g(!0),s(c,null,h(t.options,e=>(g(),s(`div`,{key:e.value,class:n([`item`,{active:t.value===e.value}]),onClick:n=>t.value=e.value},i(e.label),11,Be))),128))])])}var He=z(Fe,[[`render`,Ve],[`__scopeId`,`data-v-1f9abe29`]]),Ue=v({name:`OmniRatioSelector`,components:{InfoIcon:D},computed:{options(){return[{value:L,label:`16:9`,w:32,h:18},{value:ae,label:`9:16`,w:18,h:32}]},value:{get(){return this.$store.state.omni?.config?.aspect_ratio},set(e){this.$store.commit(`omni/setConfig`,{...this.$store.state.omni?.config,aspect_ratio:e})}}},mounted(){this.value||=R}}),We={class:`ratio`},Ge={class:`header`},Ke={class:`title font-bold`},qe={class:`items`},Je=[`onClick`],Ye={class:`preview`},Xe={class:`name`};function Ze(t,r,o,u,d,f){let p=l(`info-icon`);return g(),s(`div`,We,[e(`div`,Ge,[e(`h2`,Ke,i(t.$t(`omni.name.ratio`)),1),a(p,{content:t.$t(`omni.description.ratio`),class:`info`},null,8,[`content`])]),e(`div`,qe,[(g(!0),s(c,null,h(t.options,r=>(g(),s(`div`,{key:r.value,class:n([`item`,{active:t.value===r.value}]),onClick:e=>t.value=r.value},[e(`div`,Ye,[e(`div`,{class:`rect`,style:m({width:r.w+`px`,height:r.h+`px`})},null,4)]),e(`div`,Xe,i(r.label),1)],10,Je))),128))])])}var Qe=z(Ue,[[`render`,Ze],[`__scopeId`,`data-v-1c0c1511`]]),$e=4,et=v({name:`OmniReferenceImagesInput`,components:{ElUpload:y,ElButton:X,InfoIcon:D,ImagePreview:Q,UploadIcon:F},mixins:[se,Y,J,le],data(){return{fileList:[],uploadUrl:B()+`/api/v1/files/`,limit:$e,suppressWatch:!1}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url).filter(e=>!!e)||[]},value(){return this.$store.state.omni?.config?.image_urls}},watch:{value:{immediate:!0,handler(e){if(this.suppressWatch)return;if(!e||e.length===0){let e=(this.fileList||[]).filter(e=>!e?.response?.file_url);this.fileList=e.length?e:[];return}let t=[];e.forEach(e=>{let n=this.fileList.find(t=>t?.response?.file_url===e||t?.url===e);n?t.push(n):t.push({name:e.split(`/`).pop()||e,url:e,status:`success`,percentage:100,response:{file_url:e}})}),(this.fileList||[]).filter(e=>!e?.response?.file_url).forEach(e=>{t.some(t=>t===e||t?.url===e?.url||t?.response?.file_url===e?.response?.file_url)||t.push(e)}),this.fileList=t}}},methods:{onChange(e){if(!e?.url&&e?.raw)try{e.url=URL.createObjectURL(e.raw)}catch{}},onRemove(e){if(e?.url&&typeof e.url==`string`&&e.url.startsWith(`blob:`))try{URL.revokeObjectURL(e.url)}catch{}this.onSetReferenceImages()},onExceed(){C.warning(this.$t(`omni.message.uploadReferenceExceed`))},onError(){C.error(this.$t(`omni.message.uploadError`))},onSetReferenceImages(){let e=this.urls;this.suppressWatch=!0,this.$store.commit(`omni/setConfig`,{...this.$store.state.omni?.config,image_urls:e.length?e:void 0}),this.$nextTick(()=>{this.suppressWatch=!1})},async onSuccess(e,t){e?.file_url&&(t.url=e.file_url,t.response=e),this.onSetReferenceImages()},onRemovePreview(e,t){if(this.fileList.splice(e,1),t?.url&&typeof t.url==`string`&&t.url.startsWith(`blob:`))try{URL.revokeObjectURL(t.url)}catch{}this.onSetReferenceImages()}}}),tt={class:`field mb-[10px] flex min-h-8 w-full items-center justify-between gap-3`},nt={class:`flex min-w-0 items-center`},rt={class:`title m-0 text-[14px] font-bold`},it={class:`file-list flex flex-wrap gap-[10px]`};function at(t,n,o,u,d,m){let _=l(`info-icon`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`),x=l(`image-preview`);return g(),s(`div`,null,[e(`div`,tt,[e(`div`,nt,[e(`h2`,rt,i(t.$t(`omni.name.referenceImages`)),1),a(_,{content:t.$t(`omni.description.referenceImages`)},null,8,[`content`])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,name:`file`,class:`value shrink-0`,limit:t.limit,multiple:!0,"show-file-list":!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,"on-change":t.onChange,"on-remove":t.onRemove,headers:t.headers},{default:p(()=>[a(y,{size:`small`,type:`primary`,round:``},{default:p(()=>[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`omni.button.upload`)),1)]),_:1})]),_:1},8,[`file-list`,`limit`,`before-upload`,`action`,`on-exceed`,`on-error`,`on-success`,`on-change`,`on-remove`,`headers`])]),e(`div`,it,[(g(!0),s(c,null,h(t.fileList,(e,n)=>(g(),f(x,{key:e.uid||e?.response?.file_url||e.url||n,url:e.url||e?.response?.file_url,name:e.name,percentage:e.percentage,onRemove:r=>t.onRemovePreview(n,e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))),128))])])}var ot=z(et,[[`render`,at]]),st=v({name:`OmniVideoInput`,components:{ElUpload:y,ElButton:X,InfoIcon:D,FilePreview:ve,UploadIcon:F},mixins:[Y,J],data(){return{fileList:[],uploadUrl:B()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},videoUrl(){return this.$store.state.omni?.config?.video_urls?.[0]},videoName(){let e=this.videoUrl||``;return e.split(`/`).pop()||e}},methods:{onExceed(){C.warning(this.$t(`omni.message.uploadVideoExceed`))},onError(){C.error(this.$t(`omni.message.uploadVideoError`))},beforeUpload(e){let t=e.type===`video/mp4`||e.type===`video/quicktime`,n=me(e.size);return t?n?!0:(C.error(this.$t(`omni.message.uploadVideoSizeExceed`,{max:fe(he)})),!1):(C.error(this.$t(`omni.message.uploadVideoTypeFailed`)),!1)},setVideoUrls(e){this.$store.commit(`omni/setConfig`,{...this.$store.state.omni?.config,video_urls:e?[e]:void 0})},onRemove(){this.fileList=[],this.setVideoUrls(void 0)},async onSuccess(e,t){let n=e?.file_url||t?.response?.file_url;this.setVideoUrls(n||void 0)}}}),ct={class:`field flex min-h-8 w-full items-center justify-between gap-3`},lt={class:`flex min-w-0 items-center`},ut={class:`title m-0 text-[14px] font-bold`},dt={key:0,class:`file-list flex flex-wrap gap-[10px]`};function ft(t,n,c,u,d,f){let m=l(`info-icon`),h=l(`upload-icon`),_=l(`el-button`),v=l(`el-upload`),y=l(`file-preview`);return g(),s(`div`,null,[e(`div`,ct,[e(`div`,lt,[e(`h2`,ut,i(t.$t(`omni.name.referenceVideo`)),1),a(m,{content:t.$t(`omni.description.referenceVideo`)},null,8,[`content`])]),a(v,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.mp4,.mov`,name:`file`,class:`value shrink-0`,"show-file-list":!1,limit:1,multiple:!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{default:p(()=>[a(_,{size:`small`,type:`primary`,round:``},{default:p(()=>[a(h,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`omni.button.uploadVideo`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])]),t.videoUrl?(g(),s(`div`,dt,[a(y,{url:t.videoUrl,name:t.videoName,percentage:100,onRemove:t.onRemove},null,8,[`url`,`name`,`onRemove`])])):o(``,!0)])}var pt=v({name:`OmniConfigPanel`,components:{ElButton:X,MagicIcon:I,PromptInput:Pe,ResolutionSelector:He,RatioSelector:Qe,ReferenceImagesInput:ot,VideoInput:z(st,[[`render`,ft],[`__scopeId`,`data-v-b87d1e4e`]]),ServicePricingSummary:be,ScenarioPaymentMode:Se},emits:[`generate`],data(){return{quoteTimer:0,quoteRunId:0}},computed:{config(){return this.$store.state.omni?.config},consumption(){return oe(this.config,this.service?.cost)},service(){return this.$store.state.omni?.service},walletMode(){return V()&&Z(`omni`).mode===`wallet`}},watch:{walletMode:{handler(e){e&&this.scheduleQuote()},immediate:!0},config:{handler(){this.walletMode&&this.scheduleQuote()},deep:!0}},beforeUnmount(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1},methods:{scheduleQuote(){window.clearTimeout(this.quoteTimer),this.quoteTimer=window.setTimeout(this.refreshQuote,350)},async refreshQuote(){let e=Z(`omni`),t=++this.quoteRunId;e.quoteLoading=!0,e.quoteUsdc=void 0;try{let n=await K.quote(G(this.config));t===this.quoteRunId&&e.mode===`wallet`&&(e.quoteUsdc=n.amountUsdc)}catch(e){console.warn(`x402 quote failed`,e)}finally{t===this.quoteRunId&&(e.quoteLoading=!1)}},onGenerate(){this.$emit(`generate`)}}}),mt={class:`flex flex-col h-full`},ht={class:`flex-1 overflow-y-auto p-5`},gt={class:`flex flex-col items-center justify-center px-5 pb-5`};function _t(t,n,c,u,d,m){let h=l(`prompt-input`),_=l(`ratio-selector`),v=l(`resolution-selector`),y=l(`reference-images-input`),b=l(`video-input`),x=l(`scenario-payment-mode`),S=l(`service-pricing-summary`),C=l(`magic-icon`),w=l(`el-button`);return g(),s(`div`,mt,[e(`div`,ht,[a(h,{class:`mb-4`}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),a(y,{class:`mb-4`}),a(b,{class:`mb-4`})]),e(`div`,gt,[a(x,{scenario:`omni`}),t.walletMode?o(``,!0):(g(),f(S,{key:0,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(`omni.button.generate`)),1)]),_:1},8,[`onClick`])])])}var vt=z(pt,[[`render`,_t]]),yt=v({name:`OmniTaskPreview`,components:{DeleteIcon:ee,ApplicationIcon:T,ChannelIcon:M,CopyToClipboard:ge,ExpandIcon:A,InfoIcon:P,MagicIcon:I,TimeIcon:E,WarningIcon:te,ElAlert:x,VideoPlayer:xe,ElTooltip:b,ElButton:X,ImagePreview:Q,ApiCodeButton:Ce,ReportButton:_e},props:{modelValue:{type:Object,required:!0}},data(){return{nowTs:Date.now(),timer:0}},computed:{video(){return this.modelValue?.response?.data?.[0]},inputImage(){return this.modelValue?.request?.image_urls?.[0]},pendingElapsed(){let e=parseFloat((this.modelValue?.created_at||``).toString());if(e)return Math.max(0,Math.floor(this.nowTs/1e3-e))}},watch:{"modelValue.response":{handler(e){e&&this.stopTimer()}}},mounted(){this.modelValue?.response||(this.timer=window.setInterval(()=>{this.nowTs=Date.now()},1e3))},beforeUnmount(){this.stopTimer()},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await W.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(`omni/deleteTask`,{id:e}),C.success(this.$t(`common.message.deleteTaskSuccess`))}catch{C.error(this.$t(`common.message.deleteTaskFailed`))}}},stopTimer(){this.timer&&=(window.clearInterval(this.timer),0)},onDownload(e){window.open(e,`_blank`)}}}),bt={class:`preview`},xt={class:`left`},St={class:`main`},Ct={class:`bot`},wt={class:`datetime`},Tt=[`aria-label`],Et={class:`info`},Dt={key:0,class:`flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto`},Ot={key:1,class:`prompt mt-2`},kt={key:0},At={key:1},jt={key:0,class:n({content:!0})},Mt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Nt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Pt={key:1,class:n({content:!0})},Ft={key:0,class:`mb-4`},It={key:1,class:n({operations:!0,"mt-2":!0,"mb-2":!0})},Lt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Rt={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},zt={key:0},Bt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Vt={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Ht={key:2,class:n({content:!0})},Ut={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Wt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Gt={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Kt={key:3,class:n({content:!0})},qt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function Jt(n,c,u,d,f,m){let h=l(`capability-presentation`),_=l(`delete-icon`),v=l(`el-tooltip`),y=l(`image-preview`),b=l(`time-icon`),x=l(`magic-icon`),S=l(`copy-to-clipboard`),C=l(`el-alert`),w=l(`video-player`),T=l(`el-button`),E=l(`api-code-button`),D=l(`report-button`),O=l(`application-icon`),k=l(`expand-icon`),A=l(`channel-icon`),j=l(`warning-icon`),M=l(`info-icon`);return g(),s(`div`,bt,[e(`div`,xt,[a(h,{capability:`omni`,part:`avatar`,class:`avatar`})]),e(`div`,St,[e(`div`,Ct,[a(h,{capability:`omni`,part:`name`}),e(`span`,wt,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(v,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:p(()=>[n.modelValue?.id?(g(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:c[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(_,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Tt)):o(``,!0)]),_:1},8,[`content`])]),e(`div`,Et,[n.inputImage?(g(),s(`div`,Dt,[a(y,{url:n.inputImage,name:`image`,closable:!1},null,8,[`url`])])):o(``,!0),n.modelValue?.request?.prompt?(g(),s(`p`,Ot,[r(i(n.modelValue?.request?.prompt)+` `,1),n.modelValue?.response?n.video?.state===`processing`||n.video?.state===`pending`?(g(),s(`span`,At,` - (`+i(n.$t(`omni.status.processing`))+`) `,1)):o(``,!0):(g(),s(`span`,kt,` - (`+i(n.$t(`omni.status.pending`))+`) `,1))])):o(``,!0)]),n.modelValue?.response?n.modelValue?.response?.success===!0?(g(),s(`div`,Pt,[n.video?.video_url?(g(),s(`div`,Ft,[a(w,{src:n.video?.video_url},null,8,[`src`])])):o(``,!0),n.video?.video_url?(g(),s(`div`,It,[a(v,{class:`box-item`,effect:`dark`,content:n.$t(`omni.message.downloadVideo`),placement:`top-start`},{default:p(()=>[a(T,{type:`info`,size:`small`,class:`btn-action`,onClick:c[1]||=t(e=>n.onDownload(n.video?.video_url),[`stop`])},{default:p(()=>[r(i(n.$t(`common.button.download`)),1)]),_:1})]),_:1},8,[`content`]),a(E,{path:`/gemini/videos`,body:n.modelValue?.request},null,8,[`body`]),a(D,{service:`omni`,"target-id":n.modelValue?.id,snapshot:{prompt:n.modelValue?.request?.prompt}},null,8,[`target-id`,`snapshot`])])):o(``,!0),a(C,{closable:!1,class:`mt-2 success`},{default:p(()=>[n.modelValue?.request?.model?(g(),s(`p`,Lt,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.model`))+`: `+i(n.modelValue?.request?.model),1)])):o(``,!0),n.modelValue?.request?.resolution?(g(),s(`p`,Rt,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.resolution`))+`: `+i(n.modelValue?.request?.resolution)+` `,1),n.modelValue?.request?.aspect_ratio?(g(),s(`span`,zt,` · `+i(n.modelValue?.request?.aspect_ratio),1)):o(``,!0)])):o(``,!0),e(`p`,Bt,[a(x,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(S,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),n.modelValue?.elapsed?(g(),s(`p`,$,[a(b,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),n.modelValue?.response?.trace_id?(g(),s(`p`,Vt,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(S,{content:n.modelValue?.response?.trace_id,class:`btn-copy inline-block`},null,8,[`content`])])):o(``,!0)]),_:1})])):n.modelValue?.response?.success===!1?(g(),s(`div`,Ht,[a(C,{closable:!1,class:`failure`},{template:p(()=>[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.failure`)),1)]),default:p(()=>[e(`p`,Ut,[a(x,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(S,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),n.modelValue?.response?.error?.message?(g(),s(`p`,Wt,[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(S,{content:n.modelValue?.response?.error?.message,class:`btn-copy inline-block`},null,8,[`content`])])):o(``,!0),n.modelValue?.response?.trace_id?(g(),s(`p`,Gt,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(S,{content:n.modelValue?.response?.trace_id,class:`btn-copy inline-block`},null,8,[`content`])])):o(``,!0)]),_:1})])):(g(),s(`div`,Kt,[a(C,{closable:!1,class:`info`},{template:p(()=>[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.status`)),1)]),default:p(()=>[e(`p`,qt,[a(x,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(S,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])])]),_:1})])):(g(),s(`div`,jt,[a(C,{closable:!1,class:`info`},{template:p(()=>[a(b,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.status.pending`)),1)]),default:p(()=>[e(`p`,Mt,[a(x,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(S,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),n.pendingElapsed===void 0?o(``,!0):(g(),s(`p`,Nt,[a(b,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.elapsed`))+`: `+i(n.pendingElapsed)+`s `,1)]))]),_:1})]))])])}var Yt=v({name:`OmniRecentPanel`,components:{TaskPreview:z(yt,[[`render`,Jt],[`__scopeId`,`data-v-83851ad5`]]),BotPlaceholder:we,NoTasks:j,ScrollList:k},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],computed:{tasks(){return{...this.$store.state.omni?.tasks,items:this.$store.state.omni?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Xt={key:0},Zt={key:2,class:`w-full h-full flex items-center justify-center`};function Qt(e,t,n,r,i,u){let d=l(`bot-placeholder`),m=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return g(),s(c,null,[e.tasks?.items===void 0?(g(),s(`div`,Xt,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(g(),f(_,{key:1,ref:`scrollList`,class:`tasks w-full h-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(g(!0),s(c,null,h(e.tasks?.items,e=>(g(),f(m,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(g(),s(`div`,Zt,[a(v)])):o(``,!0)],64)}var $t=v({name:`OmniIndex`,components:{ConfigPanel:vt,Layout:je,RecentPanel:z(Yt,[[`render`,Qt]])},mixins:[pe,Te(`omni`)],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1,walletTaskIds:[]}},computed:{applicationsLoading(){return this.$store.state.omni?.status?.getApplications===S.Request},tasksLoading(){return this.$store.state.omni?.status?.getTasks===S.Request||this.fetchingTasks},credential(){return this.$store.state.omni?.credential},config(){return this.$store.state.omni?.config},tasks(){return this.$store.state.omni?.tasks},walletMode(){return V()&&Z(`omni`).mode===`wallet`}},watch:{walletMode:{async handler(e,t){if(!(t===void 0||e===t)){if(this.$store.commit(`omni/setTasks`,void 0),e&&!this.job&&(this.job=window.setInterval(this.onPollTasks,5e3)),!e&&!this.credential?.token){window.clearInterval(this.job),this.job=0,await this.onScrollDown();return}await this.onGetTasks(),await this.onScrollDown()}}},initialized:{async handler(e){e&&(await this.onGetTasks(),await this.onScrollDown(),this.job||=window.setInterval(this.onPollTasks,5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await N({tasks: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(){await this.$store.dispatch(`omni/getService`)},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks)return;let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};this.fetchingTasks=!0;try{await this.$store.dispatch(`omni/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r,...this.walletMode&&!this.credential?.token?{mode:`x402`,ids:this.walletTaskIds}:{}})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!ue(this.uploadTracker,e=>this.$t(e),e=>C.warning(e)))return;let e=G(this.config);if(!e.prompt){C.warning(this.$t(`omni.message.promptRequired`));return}if(e.video_urls&&!e.image_urls){C.warning(this.$t(`omni.message.videoRequiresImage`));return}let t;if(this.walletMode){let n=this.getWalletContext();if(!n){C.warning(this.$t(`common.x402Scenario.connectWalletFirst`));return}t=K.generate(e,{mode:`x402`,x402:{wallet:n,confirm:e=>this.confirmWalletPayment(e),identityToken:this.credential?.token}})}else{if(!q())return;let n=this.credential?.token;if(!n)return;t=K.generate(e,{token:n})}C.info(this.$t(`omni.message.startingTask`)),U(`omni`,t).then(e=>{let t=e?.data?.task_id;this.walletMode&&!this.credential?.token&&t&&!this.walletTaskIds.includes(t)&&this.walletTaskIds.unshift(t),C.success(this.$t(`omni.message.startTaskSuccess`))}).catch(e=>{let t=e?.response?.data;e instanceof de||H(e,`omni`)||(this.walletMode?C.error(this.$t(`common.x402Scenario.paymentFailed`)):C.error(this.$t(`omni.message.startTaskFailed`)+(t?.error?.message||``)))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getWalletContext(){return ce(this.$wallet)},async confirmWalletPayment(e){return W.confirm(this.$t(`common.x402Scenario.confirmPayment`,{amount:e.amountUsdc}),this.$t(`order.message.x402ConfirmTitle`),{confirmButtonText:this.$t(`order.message.x402WalletPayCta`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`}).then(()=>!0).catch(()=>!1)},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function en(e,t,n,r,i,o){let s=l(`config-panel`),c=l(`recent-panel`),u=l(`layout`);return g(),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 tn=z($t,[[`render`,en]]);export{tn 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,rt as d,tt as f,z as p}from"./vendor-chart-Dw-P17PN.js";import{t as m}from"./arrow-right-B9ho0-hr.js";import{t as h}from"./check-BQ2kURhQ.js";import{t as g}from"./external-link-BlEDNV7V.js";import{t as ee}from"./globe-HRE9WPel.js";import{t as _}from"./wand-sparkles-DKunfvfr.js";import{g as v}from"./i18n-BQrNxKw9.js";import{A as y,Fn as b,N as x,i as S,r as C,to as te}from"./index-DqV-SJ5V.js";var w=(e,t)=>({zh:e,en:t}),T=`https://platform.acedata.cloud/documents/studio-overview`,E=new Set([`qrart`,`pika`]),D={auth:w(`https://cdn.acedata.cloud/ae2dceaacc.png`,`https://cdn.acedata.cloud/61f717db6c.png`),branding:w(`https://cdn.acedata.cloud/d54f145c5c.png`,`https://cdn.acedata.cloud/6d59646c4d.png`),capabilities:w(`https://cdn.acedata.cloud/2369fa145f.png`,`https://cdn.acedata.cloud/082a69ca54.png`),digitalHumanDesktop:w(`https://cdn.acedata.cloud/b9ee357c33.png`,`https://cdn.acedata.cloud/a0228b206a.png`),distributionDesktop:w(`https://cdn.acedata.cloud/6c25c74a49.png`,`https://cdn.acedata.cloud/a1e62e4425.png`),klingDesktop:w(`https://cdn.acedata.cloud/e45bc3e2e2.png`,`https://cdn.acedata.cloud/03d73b16ce.png`),klingMobile:w(`https://cdn.acedata.cloud/10dc431467.png`,`https://cdn.acedata.cloud/ea10c8e395.png`),maestroDesktop:w(`https://cdn.acedata.cloud/1791398216.png`,`https://cdn.acedata.cloud/7854458ee3.png`),nanoDesktop:w(`https://cdn.acedata.cloud/82252ec647.png`,`https://cdn.acedata.cloud/e047aea679.png`),nanoMobile:w(`https://cdn.acedata.cloud/c7da634c96.png`,`https://cdn.acedata.cloud/dc5b2cca1d.png`),subsites:w(`https://cdn.acedata.cloud/bf4356fffc.png`,`https://cdn.acedata.cloud/b1948ec2a2.png`),sunoDesktop:w(`https://cdn.acedata.cloud/8ce288065b.png`,`https://cdn.acedata.cloud/1eebf72e3a.png`)},O=[{key:`subsites`,eyebrowKey:`index.eyebrow.subsites`,titleKey:`index.title.subsites`,subtitleKey:`index.subtitle.subsites`,buttonKey:`index.button.learnBusiness`,path:`/chatgpt?dialog=settings&tab=subsites`,href:T,desktop:D.subsites,bulletKeys:[`index.benefit.subsites.noServer`,`index.benefit.subsites.customDomain`,`index.benefit.subsites.branding`]},{key:`capabilities`,eyebrowKey:`index.eyebrow.capabilities`,titleKey:`index.title.capabilities`,subtitleKey:`index.subtitle.capabilities`,buttonKey:`index.button.learnBusiness`,path:`/chatgpt?dialog=settings&tab=function`,href:T,desktop:D.capabilities,bulletKeys:[`index.benefit.capabilities.catalog`,`index.benefit.capabilities.display`,`index.benefit.capabilities.pricing`]},{key:`operations`,eyebrowKey:`index.eyebrow.operations`,titleKey:`index.title.operations`,subtitleKey:`index.subtitle.operations`,buttonKey:`index.button.learnBusiness`,path:`/chatgpt?dialog=settings&tab=seo`,href:T,desktop:D.auth,bulletKeys:[`index.benefit.operations.seo`,`index.benefit.operations.auth`,`index.benefit.operations.localization`]},{key:`distribution`,eyebrowKey:`index.eyebrow.distribution`,titleKey:`index.title.distribution`,subtitleKey:`index.subtitle.distribution`,buttonKey:`index.button.learnBusiness`,path:`/distribution`,href:T,desktop:D.distributionDesktop,bulletKeys:[`index.benefit.distribution.noBarrier`,`index.benefit.distribution.levels`,`index.benefit.distribution.withdrawal`]}],k=[{key:`image`,featureKeys:[`nanobanana`],eyebrowKey:`index.eyebrow.image`,titleKey:`index.title.image`,subtitleKey:`index.subtitle.image`,buttonKey:`index.button.try`,path:`/nanobanana`,desktop:D.nanoDesktop,mobile:D.nanoMobile},{key:`music`,featureKeys:[`suno`],eyebrowKey:`index.eyebrow.music`,titleKey:`index.title.music`,subtitleKey:`index.subtitle.music`,buttonKey:`index.button.try`,path:`/suno`,desktop:D.sunoDesktop},{key:`workflow`,featureKeys:[`maestro`],eyebrowKey:`index.eyebrow.workflow`,titleKey:`index.title.workflow`,subtitleKey:`index.subtitle.workflow`,buttonKey:`index.button.try`,path:`/maestro`,desktop:D.maestroDesktop},{key:`digitalHuman`,featureKeys:[`digitalhuman`],eyebrowKey:`index.eyebrow.digitalHuman`,titleKey:`index.title.digitalHuman`,subtitleKey:`index.subtitle.digitalHuman`,buttonKey:`index.button.try`,path:`/digital-human`,desktop:D.digitalHumanDesktop}],A=p({name:`Business`,components:{ElButton:te,ConfirmIcon:h,ExternalLinkIcon:g,GlobeIcon:ee,MagicIcon:_,NextIcon:m},data(){return{}},computed:{site(){return this.$store.state.site},heroHeadline(){return this.site?.description?.trim()||this.$t(`index.subtitle.banner`)},referralEntryVisible(){return v(this.site,this.$store.getters?.user)},enabledFeatures(){return this.site?.features??{}},isMainSite(){let e=typeof window>`u`?``:window.location.hostname,t=e.endsWith(`.plain-river-2dfc.workers.dev`)&&this.site?.origin===e&&this.site?.title===`Ace Data Cloud`&&this.site?.branding===null;return this.site?.origin===`studio.acedata.cloud`||b()||t},capabilityCount(){return this.site?.id?this.capabilityCards.length:S.length},isChineseLocale(){return String(this.$i18n.locale).toLowerCase()===`zh-cn`},heroDesktop(){return this.localizedImage(D.klingDesktop)},heroMobile(){return this.localizedImage(D.klingMobile)},businessShowcases(){return O.filter(e=>(e.key!==`subsites`||this.isMainSite)&&(e.key!==`distribution`||this.referralEntryVisible)).map(e=>this.resolveShowcase(e))},creationShowcases(){return(this.isMainSite?k:k.filter(e=>e.featureKeys?.some(e=>this.enabledFeatures[e]?.enabled))).map(e=>this.resolveShowcase(e))},capabilityCards(){return(this.isMainSite?S:S.filter(e=>this.enabledFeatures[e]?.enabled)).filter(e=>!E.has(e)).map(e=>({key:e,label:this.$t(`site.field.features${e.charAt(0).toUpperCase()}${e.slice(1)}`),icon:C[e]}))}},methods:{localizedImage(e){return this.isChineseLocale?e.zh:e.en},resolveShowcase(e){return{...e,desktop:this.localizedImage(e.desktop),mobile:e.mobile?this.localizedImage(e.mobile):void 0}},onStart(){this.$router.push(x())},openShowcase(e){this.$router.push(e.path)},openSubsites(){this.$router.push(`/chatgpt?dialog=settings&tab=subsites`)},scrollToPlatform(){this.scrollToSection(`platform`)},scrollToCreation(){this.scrollToSection(`creation`)},scrollToSubsites(){this.scrollToSection(`subsites`)},scrollToSection(e){let t=document.getElementById(`app`),n=document.getElementById(e);if(!t||!n)return;let r=document.querySelector(`.header`)?.offsetHeight??0;t.scrollTop=n.offsetTop-r}}}),j={class:`landing`},M={class:`hero`},N={class:`container hero__content`},P={class:`hero__copy`},F={class:`eyebrow`},I={class:`hero__headline`},L={class:`hero__summary`},R={class:`hero__actions`},z={class:`hero__stats`},B={key:0},V={class:`hero__screens`},H={class:`macbook-frame hero__desktop`,"aria-hidden":`true`},U={class:`macbook-frame__lid`},W={class:`macbook-frame__viewport`},G=[`src`],K={class:`phone-device hero__mobile`,"aria-hidden":`true`},q={class:`phone-device__screen`},J=[`src`],Y={id:`platform`,class:`section platform-section`},X={class:`container`},Z={class:`section-heading section-heading--wide`},Q={class:`eyebrow eyebrow--light`},ne=[`id`],re={class:`platform-story__copy`},ie={class:`story-number`},ae={class:`story-kicker`},oe={class:`feature-points`},se={class:`screen-pair screen-pair--large`},ce={class:`macbook-frame screen-pair__desktop`},le={class:`macbook-frame__lid`},ue={class:`macbook-frame__viewport`},de=[`src`,`alt`],fe={id:`creation`,class:`section creation-section`},pe={class:`container`},me={class:`section-heading`},he={class:`eyebrow eyebrow--light`},ge={class:`creation-grid`},_e={class:`macbook-frame screen-pair__desktop`},ve={class:`macbook-frame__lid`},ye={class:`macbook-frame__viewport`},be=[`src`,`alt`],xe={key:0,class:`phone-device screen-pair__mobile`},Se={class:`phone-device__screen`},Ce=[`src`],we={class:`creation-item__copy`},Te={class:`story-kicker`},Ee=[`onClick`],De={class:`section capability-section`},$={class:`container`},Oe={class:`section-heading section-heading--wide`},ke={class:`eyebrow eyebrow--light`},Ae={class:`capability-directory`},je=[`src`],Me={class:`final-cta`},Ne={class:`container final-cta__content`},Pe={class:`story-kicker`},Fe={class:`final-cta__actions`};function Ie(p,m,h,g,ee,_){let v=c(`el-button`),y=c(`magic-icon`),b=c(`globe-icon`),x=c(`confirm-icon`),S=c(`next-icon`),C=c(`external-link-icon`);return f(),o(`div`,j,[e(`section`,M,[m[9]||=e(`div`,{class:`hero__grid`},null,-1),e(`div`,N,[e(`div`,P,[e(`span`,F,r(p.$t(`index.badge.hero`)),1),e(`h1`,null,r(p.site?.title),1),e(`p`,I,r(p.heroHeadline),1),e(`p`,L,r(p.$t(`index.subtitle.hero`)),1),e(`div`,R,[i(v,{type:`primary`,size:`large`,onClick:p.onStart},{default:u(()=>[n(r(p.$t(`common.button.startForFree`)),1)]),_:1},8,[`onClick`]),i(v,{size:`large`,onClick:p.scrollToPlatform},{default:u(()=>[n(r(p.$t(`index.button.explore`)),1)]),_:1},8,[`onClick`])]),e(`dl`,z,[e(`div`,null,[e(`dt`,null,r(p.capabilityCount)+`+`,1),e(`dd`,null,r(p.$t(`index.stat.capabilities`)),1)]),e(`div`,null,[m[2]||=e(`dt`,null,`5 min`,-1),e(`dd`,null,r(p.$t(`index.stat.subsite`)),1)]),p.referralEntryVisible?(f(),o(`div`,B,[m[3]||=e(`dt`,null,`24%`,-1),e(`dd`,null,r(p.$t(`index.stat.commission`)),1)])):a(``,!0)])]),e(`div`,V,[e(`div`,H,[e(`div`,U,[m[4]||=e(`span`,{class:`macbook-frame__camera`},null,-1),e(`div`,W,[e(`img`,{src:p.heroDesktop,alt:``},null,8,G)]),m[5]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[6]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)]),e(`div`,K,[m[8]||=e(`span`,{class:`phone-device__speaker`},null,-1),e(`div`,q,[m[7]||=e(`span`,{class:`phone-device__island`},null,-1),e(`img`,{src:p.heroMobile,alt:``},null,8,J)])]),e(`button`,{type:`button`,class:`hero__note hero__note--top`,onClick:m[0]||=(...e)=>p.scrollToCreation&&p.scrollToCreation(...e)},[i(y,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(`index.note.allInOne`)),1)]),p.isMainSite?(f(),o(`button`,{key:0,type:`button`,class:`hero__note hero__note--bottom`,onClick:m[1]||=(...e)=>p.scrollToSubsites&&p.scrollToSubsites(...e)},[i(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(`index.note.customDomain`)),1)])):a(``,!0)])])]),e(`section`,Y,[e(`div`,X,[e(`div`,Z,[e(`span`,Q,r(p.$t(`index.eyebrow.business`)),1),e(`h2`,null,r(p.$t(`index.title.business`)),1),e(`p`,null,r(p.$t(`index.subtitle.business`)),1)]),(f(!0),o(s,null,d(p.businessShowcases,(a,c)=>(f(),o(`article`,{id:a.key,key:a.key,class:t([`platform-story`,{"platform-story--reverse":c%2==1}])},[e(`div`,re,[e(`span`,ie,`0`+r(c+1),1),e(`p`,ae,r(p.$t(a.eyebrowKey)),1),e(`h3`,null,r(p.$t(a.titleKey)),1),e(`p`,null,r(p.$t(a.subtitleKey)),1),e(`ul`,oe,[(f(!0),o(s,null,d(a.bulletKeys,t=>(f(),o(`li`,{key:t},[i(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(t)),1)]))),128))]),a.href?(f(),l(v,{key:0,tag:`a`,type:`primary`,plain:``,href:a.href,target:`_blank`,rel:`noopener noreferrer`},{default:u(()=>[n(r(p.$t(a.buttonKey))+` `,1),i(S,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:2},1032,[`href`])):(f(),l(v,{key:1,type:`primary`,plain:``,onClick:e=>p.openShowcase(a)},{default:u(()=>[n(r(p.$t(a.buttonKey))+` `,1),i(S,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:2},1032,[`onClick`]))]),e(`div`,se,[e(`div`,ce,[e(`div`,le,[m[10]||=e(`span`,{class:`macbook-frame__camera`,"aria-hidden":`true`},null,-1),e(`div`,ue,[e(`img`,{src:a.desktop,alt:p.$t(a.titleKey),loading:`lazy`},null,8,de)]),m[11]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[12]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)])])],10,ne))),128))])]),e(`section`,fe,[e(`div`,pe,[e(`div`,me,[e(`span`,he,r(p.$t(`index.eyebrow.creation`)),1),e(`h2`,null,r(p.$t(`index.title.creation`)),1),e(`p`,null,r(p.$t(`index.subtitle.creation`)),1)]),e(`div`,ge,[(f(!0),o(s,null,d(p.creationShowcases,n=>(f(),o(`article`,{key:n.key,class:`creation-item`},[e(`div`,{class:t([`screen-pair`,{"screen-pair--with-phone":n.mobile}])},[e(`div`,_e,[e(`div`,ve,[m[13]||=e(`span`,{class:`macbook-frame__camera`,"aria-hidden":`true`},null,-1),e(`div`,ye,[e(`img`,{src:n.desktop,alt:p.$t(n.titleKey),loading:`lazy`},null,8,be)]),m[14]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[15]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)]),n.mobile?(f(),o(`div`,xe,[m[17]||=e(`span`,{class:`phone-device__speaker`,"aria-hidden":`true`},null,-1),e(`div`,Se,[m[16]||=e(`span`,{class:`phone-device__island`,"aria-hidden":`true`},null,-1),e(`img`,{src:n.mobile,alt:``,loading:`lazy`},null,8,Ce)])])):a(``,!0)],2),e(`div`,we,[e(`div`,null,[e(`p`,Te,r(p.$t(n.eyebrowKey)),1),e(`h3`,null,r(p.$t(n.titleKey)),1)]),i(C,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,null,r(p.$t(n.subtitleKey)),1),e(`button`,{type:`button`,class:`creation-item__link`,onClick:e=>p.openShowcase(n)},r(p.$t(`index.button.try`)),9,Ee)])]))),128))])])]),e(`section`,De,[e(`div`,$,[e(`div`,Oe,[e(`span`,ke,r(p.$t(`index.eyebrow.directory`)),1),e(`h2`,null,r(p.$t(`index.title.directory`)),1),e(`p`,null,r(p.$t(`index.subtitle.directory`)),1)]),e(`div`,Ae,[(f(!0),o(s,null,d(p.capabilityCards,t=>(f(),o(`div`,{key:t.key,class:`capability-row`},[e(`img`,{src:t.icon,alt:``},null,8,je),e(`span`,null,r(t.label),1)]))),128))])])]),e(`section`,Me,[e(`div`,Ne,[e(`div`,null,[e(`p`,Pe,r(p.$t(`index.eyebrow.cta`)),1),e(`h2`,null,r(p.$t(`index.title.cta`)),1),e(`p`,null,r(p.$t(`index.subtitle.cta`)),1)]),e(`div`,Fe,[i(v,{type:`primary`,size:`large`,onClick:p.onStart},{default:u(()=>[n(r(p.$t(`common.button.startForFree`)),1)]),_:1},8,[`onClick`]),p.isMainSite?(f(),l(v,{key:0,size:`large`,onClick:p.openSubsites},{default:u(()=>[n(r(p.$t(`index.button.createSubsite`)),1)]),_:1},8,[`onClick`])):a(``,!0)])])])])}var Le=y(A,[[`render`,Ie],[`__scopeId`,`data-v-6028c277`]]);export{Le 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,rt as d,tt as f,z as p}from"./vendor-chart-Dw-P17PN.js";import{t as m}from"./arrow-right-Bqfb6t60.js";import{t as h}from"./check-CTUDvagB.js";import{t as g}from"./external-link-CfkUyibd.js";import{t as ee}from"./globe-CeROj4EC.js";import{t as _}from"./wand-sparkles-BLj6TbQF.js";import{g as v}from"./i18n-lmeSFJDq.js";import{A as y,Fn as b,N as x,i as S,r as C,to as te}from"./index-DVmeVwK7.js";var w=(e,t)=>({zh:e,en:t}),T=`https://platform.acedata.cloud/documents/studio-overview`,E=new Set([`qrart`,`pika`]),D={auth:w(`https://cdn.acedata.cloud/ae2dceaacc.png`,`https://cdn.acedata.cloud/61f717db6c.png`),branding:w(`https://cdn.acedata.cloud/d54f145c5c.png`,`https://cdn.acedata.cloud/6d59646c4d.png`),capabilities:w(`https://cdn.acedata.cloud/2369fa145f.png`,`https://cdn.acedata.cloud/082a69ca54.png`),digitalHumanDesktop:w(`https://cdn.acedata.cloud/b9ee357c33.png`,`https://cdn.acedata.cloud/a0228b206a.png`),distributionDesktop:w(`https://cdn.acedata.cloud/6c25c74a49.png`,`https://cdn.acedata.cloud/a1e62e4425.png`),klingDesktop:w(`https://cdn.acedata.cloud/e45bc3e2e2.png`,`https://cdn.acedata.cloud/03d73b16ce.png`),klingMobile:w(`https://cdn.acedata.cloud/10dc431467.png`,`https://cdn.acedata.cloud/ea10c8e395.png`),maestroDesktop:w(`https://cdn.acedata.cloud/1791398216.png`,`https://cdn.acedata.cloud/7854458ee3.png`),nanoDesktop:w(`https://cdn.acedata.cloud/82252ec647.png`,`https://cdn.acedata.cloud/e047aea679.png`),nanoMobile:w(`https://cdn.acedata.cloud/c7da634c96.png`,`https://cdn.acedata.cloud/dc5b2cca1d.png`),subsites:w(`https://cdn.acedata.cloud/bf4356fffc.png`,`https://cdn.acedata.cloud/b1948ec2a2.png`),sunoDesktop:w(`https://cdn.acedata.cloud/8ce288065b.png`,`https://cdn.acedata.cloud/1eebf72e3a.png`)},O=[{key:`subsites`,eyebrowKey:`index.eyebrow.subsites`,titleKey:`index.title.subsites`,subtitleKey:`index.subtitle.subsites`,buttonKey:`index.button.learnBusiness`,path:`/chatgpt?dialog=settings&tab=subsites`,href:T,desktop:D.subsites,bulletKeys:[`index.benefit.subsites.noServer`,`index.benefit.subsites.customDomain`,`index.benefit.subsites.branding`]},{key:`capabilities`,eyebrowKey:`index.eyebrow.capabilities`,titleKey:`index.title.capabilities`,subtitleKey:`index.subtitle.capabilities`,buttonKey:`index.button.learnBusiness`,path:`/chatgpt?dialog=settings&tab=function`,href:T,desktop:D.capabilities,bulletKeys:[`index.benefit.capabilities.catalog`,`index.benefit.capabilities.display`,`index.benefit.capabilities.pricing`]},{key:`operations`,eyebrowKey:`index.eyebrow.operations`,titleKey:`index.title.operations`,subtitleKey:`index.subtitle.operations`,buttonKey:`index.button.learnBusiness`,path:`/chatgpt?dialog=settings&tab=seo`,href:T,desktop:D.auth,bulletKeys:[`index.benefit.operations.seo`,`index.benefit.operations.auth`,`index.benefit.operations.localization`]},{key:`distribution`,eyebrowKey:`index.eyebrow.distribution`,titleKey:`index.title.distribution`,subtitleKey:`index.subtitle.distribution`,buttonKey:`index.button.learnBusiness`,path:`/distribution`,href:T,desktop:D.distributionDesktop,bulletKeys:[`index.benefit.distribution.noBarrier`,`index.benefit.distribution.levels`,`index.benefit.distribution.withdrawal`]}],k=[{key:`image`,featureKeys:[`nanobanana`],eyebrowKey:`index.eyebrow.image`,titleKey:`index.title.image`,subtitleKey:`index.subtitle.image`,buttonKey:`index.button.try`,path:`/nanobanana`,desktop:D.nanoDesktop,mobile:D.nanoMobile},{key:`music`,featureKeys:[`suno`],eyebrowKey:`index.eyebrow.music`,titleKey:`index.title.music`,subtitleKey:`index.subtitle.music`,buttonKey:`index.button.try`,path:`/suno`,desktop:D.sunoDesktop},{key:`workflow`,featureKeys:[`maestro`],eyebrowKey:`index.eyebrow.workflow`,titleKey:`index.title.workflow`,subtitleKey:`index.subtitle.workflow`,buttonKey:`index.button.try`,path:`/maestro`,desktop:D.maestroDesktop},{key:`digitalHuman`,featureKeys:[`digitalhuman`],eyebrowKey:`index.eyebrow.digitalHuman`,titleKey:`index.title.digitalHuman`,subtitleKey:`index.subtitle.digitalHuman`,buttonKey:`index.button.try`,path:`/digital-human`,desktop:D.digitalHumanDesktop}],A=p({name:`Business`,components:{ElButton:te,ConfirmIcon:h,ExternalLinkIcon:g,GlobeIcon:ee,MagicIcon:_,NextIcon:m},data(){return{}},computed:{site(){return this.$store.state.site},heroHeadline(){return this.site?.description?.trim()||this.$t(`index.subtitle.banner`)},referralEntryVisible(){return v(this.site,this.$store.getters?.user)},enabledFeatures(){return this.site?.features??{}},isMainSite(){let e=typeof window>`u`?``:window.location.hostname,t=e.endsWith(`.plain-river-2dfc.workers.dev`)&&this.site?.origin===e&&this.site?.title===`Ace Data Cloud`&&this.site?.branding===null;return this.site?.origin===`studio.acedata.cloud`||b()||t},capabilityCount(){return this.site?.id?this.capabilityCards.length:S.length},isChineseLocale(){return String(this.$i18n.locale).toLowerCase()===`zh-cn`},heroDesktop(){return this.localizedImage(D.klingDesktop)},heroMobile(){return this.localizedImage(D.klingMobile)},businessShowcases(){return O.filter(e=>(e.key!==`subsites`||this.isMainSite)&&(e.key!==`distribution`||this.referralEntryVisible)).map(e=>this.resolveShowcase(e))},creationShowcases(){return(this.isMainSite?k:k.filter(e=>e.featureKeys?.some(e=>this.enabledFeatures[e]?.enabled))).map(e=>this.resolveShowcase(e))},capabilityCards(){return(this.isMainSite?S:S.filter(e=>this.enabledFeatures[e]?.enabled)).filter(e=>!E.has(e)).map(e=>({key:e,label:this.$t(`site.field.features${e.charAt(0).toUpperCase()}${e.slice(1)}`),icon:C[e]}))}},methods:{localizedImage(e){return this.isChineseLocale?e.zh:e.en},resolveShowcase(e){return{...e,desktop:this.localizedImage(e.desktop),mobile:e.mobile?this.localizedImage(e.mobile):void 0}},onStart(){this.$router.push(x())},openShowcase(e){this.$router.push(e.path)},openSubsites(){this.$router.push(`/chatgpt?dialog=settings&tab=subsites`)},scrollToPlatform(){this.scrollToSection(`platform`)},scrollToCreation(){this.scrollToSection(`creation`)},scrollToSubsites(){this.scrollToSection(`subsites`)},scrollToSection(e){let t=document.getElementById(`app`),n=document.getElementById(e);if(!t||!n)return;let r=document.querySelector(`.header`)?.offsetHeight??0;t.scrollTop=n.offsetTop-r}}}),j={class:`landing`},M={class:`hero`},N={class:`container hero__content`},P={class:`hero__copy`},F={class:`eyebrow`},I={class:`hero__headline`},L={class:`hero__summary`},R={class:`hero__actions`},z={class:`hero__stats`},B={key:0},V={class:`hero__screens`},H={class:`macbook-frame hero__desktop`,"aria-hidden":`true`},U={class:`macbook-frame__lid`},W={class:`macbook-frame__viewport`},G=[`src`],K={class:`phone-device hero__mobile`,"aria-hidden":`true`},q={class:`phone-device__screen`},J=[`src`],Y={id:`platform`,class:`section platform-section`},X={class:`container`},Z={class:`section-heading section-heading--wide`},Q={class:`eyebrow eyebrow--light`},ne=[`id`],re={class:`platform-story__copy`},ie={class:`story-number`},ae={class:`story-kicker`},oe={class:`feature-points`},se={class:`screen-pair screen-pair--large`},ce={class:`macbook-frame screen-pair__desktop`},le={class:`macbook-frame__lid`},ue={class:`macbook-frame__viewport`},de=[`src`,`alt`],fe={id:`creation`,class:`section creation-section`},pe={class:`container`},me={class:`section-heading`},he={class:`eyebrow eyebrow--light`},ge={class:`creation-grid`},_e={class:`macbook-frame screen-pair__desktop`},ve={class:`macbook-frame__lid`},ye={class:`macbook-frame__viewport`},be=[`src`,`alt`],xe={key:0,class:`phone-device screen-pair__mobile`},Se={class:`phone-device__screen`},Ce=[`src`],we={class:`creation-item__copy`},Te={class:`story-kicker`},Ee=[`onClick`],De={class:`section capability-section`},$={class:`container`},Oe={class:`section-heading section-heading--wide`},ke={class:`eyebrow eyebrow--light`},Ae={class:`capability-directory`},je=[`src`],Me={class:`final-cta`},Ne={class:`container final-cta__content`},Pe={class:`story-kicker`},Fe={class:`final-cta__actions`};function Ie(p,m,h,g,ee,_){let v=c(`el-button`),y=c(`magic-icon`),b=c(`globe-icon`),x=c(`confirm-icon`),S=c(`next-icon`),C=c(`external-link-icon`);return f(),o(`div`,j,[e(`section`,M,[m[9]||=e(`div`,{class:`hero__grid`},null,-1),e(`div`,N,[e(`div`,P,[e(`span`,F,r(p.$t(`index.badge.hero`)),1),e(`h1`,null,r(p.site?.title),1),e(`p`,I,r(p.heroHeadline),1),e(`p`,L,r(p.$t(`index.subtitle.hero`)),1),e(`div`,R,[i(v,{type:`primary`,size:`large`,onClick:p.onStart},{default:u(()=>[n(r(p.$t(`common.button.startForFree`)),1)]),_:1},8,[`onClick`]),i(v,{size:`large`,onClick:p.scrollToPlatform},{default:u(()=>[n(r(p.$t(`index.button.explore`)),1)]),_:1},8,[`onClick`])]),e(`dl`,z,[e(`div`,null,[e(`dt`,null,r(p.capabilityCount)+`+`,1),e(`dd`,null,r(p.$t(`index.stat.capabilities`)),1)]),e(`div`,null,[m[2]||=e(`dt`,null,`5 min`,-1),e(`dd`,null,r(p.$t(`index.stat.subsite`)),1)]),p.referralEntryVisible?(f(),o(`div`,B,[m[3]||=e(`dt`,null,`24%`,-1),e(`dd`,null,r(p.$t(`index.stat.commission`)),1)])):a(``,!0)])]),e(`div`,V,[e(`div`,H,[e(`div`,U,[m[4]||=e(`span`,{class:`macbook-frame__camera`},null,-1),e(`div`,W,[e(`img`,{src:p.heroDesktop,alt:``},null,8,G)]),m[5]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[6]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)]),e(`div`,K,[m[8]||=e(`span`,{class:`phone-device__speaker`},null,-1),e(`div`,q,[m[7]||=e(`span`,{class:`phone-device__island`},null,-1),e(`img`,{src:p.heroMobile,alt:``},null,8,J)])]),e(`button`,{type:`button`,class:`hero__note hero__note--top`,onClick:m[0]||=(...e)=>p.scrollToCreation&&p.scrollToCreation(...e)},[i(y,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(`index.note.allInOne`)),1)]),p.isMainSite?(f(),o(`button`,{key:0,type:`button`,class:`hero__note hero__note--bottom`,onClick:m[1]||=(...e)=>p.scrollToSubsites&&p.scrollToSubsites(...e)},[i(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(`index.note.customDomain`)),1)])):a(``,!0)])])]),e(`section`,Y,[e(`div`,X,[e(`div`,Z,[e(`span`,Q,r(p.$t(`index.eyebrow.business`)),1),e(`h2`,null,r(p.$t(`index.title.business`)),1),e(`p`,null,r(p.$t(`index.subtitle.business`)),1)]),(f(!0),o(s,null,d(p.businessShowcases,(a,c)=>(f(),o(`article`,{id:a.key,key:a.key,class:t([`platform-story`,{"platform-story--reverse":c%2==1}])},[e(`div`,re,[e(`span`,ie,`0`+r(c+1),1),e(`p`,ae,r(p.$t(a.eyebrowKey)),1),e(`h3`,null,r(p.$t(a.titleKey)),1),e(`p`,null,r(p.$t(a.subtitleKey)),1),e(`ul`,oe,[(f(!0),o(s,null,d(a.bulletKeys,t=>(f(),o(`li`,{key:t},[i(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(t)),1)]))),128))]),a.href?(f(),l(v,{key:0,tag:`a`,type:`primary`,plain:``,href:a.href,target:`_blank`,rel:`noopener noreferrer`},{default:u(()=>[n(r(p.$t(a.buttonKey))+` `,1),i(S,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:2},1032,[`href`])):(f(),l(v,{key:1,type:`primary`,plain:``,onClick:e=>p.openShowcase(a)},{default:u(()=>[n(r(p.$t(a.buttonKey))+` `,1),i(S,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:2},1032,[`onClick`]))]),e(`div`,se,[e(`div`,ce,[e(`div`,le,[m[10]||=e(`span`,{class:`macbook-frame__camera`,"aria-hidden":`true`},null,-1),e(`div`,ue,[e(`img`,{src:a.desktop,alt:p.$t(a.titleKey),loading:`lazy`},null,8,de)]),m[11]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[12]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)])])],10,ne))),128))])]),e(`section`,fe,[e(`div`,pe,[e(`div`,me,[e(`span`,he,r(p.$t(`index.eyebrow.creation`)),1),e(`h2`,null,r(p.$t(`index.title.creation`)),1),e(`p`,null,r(p.$t(`index.subtitle.creation`)),1)]),e(`div`,ge,[(f(!0),o(s,null,d(p.creationShowcases,n=>(f(),o(`article`,{key:n.key,class:`creation-item`},[e(`div`,{class:t([`screen-pair`,{"screen-pair--with-phone":n.mobile}])},[e(`div`,_e,[e(`div`,ve,[m[13]||=e(`span`,{class:`macbook-frame__camera`,"aria-hidden":`true`},null,-1),e(`div`,ye,[e(`img`,{src:n.desktop,alt:p.$t(n.titleKey),loading:`lazy`},null,8,be)]),m[14]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[15]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)]),n.mobile?(f(),o(`div`,xe,[m[17]||=e(`span`,{class:`phone-device__speaker`,"aria-hidden":`true`},null,-1),e(`div`,Se,[m[16]||=e(`span`,{class:`phone-device__island`,"aria-hidden":`true`},null,-1),e(`img`,{src:n.mobile,alt:``,loading:`lazy`},null,8,Ce)])])):a(``,!0)],2),e(`div`,we,[e(`div`,null,[e(`p`,Te,r(p.$t(n.eyebrowKey)),1),e(`h3`,null,r(p.$t(n.titleKey)),1)]),i(C,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,null,r(p.$t(n.subtitleKey)),1),e(`button`,{type:`button`,class:`creation-item__link`,onClick:e=>p.openShowcase(n)},r(p.$t(`index.button.try`)),9,Ee)])]))),128))])])]),e(`section`,De,[e(`div`,$,[e(`div`,Oe,[e(`span`,ke,r(p.$t(`index.eyebrow.directory`)),1),e(`h2`,null,r(p.$t(`index.title.directory`)),1),e(`p`,null,r(p.$t(`index.subtitle.directory`)),1)]),e(`div`,Ae,[(f(!0),o(s,null,d(p.capabilityCards,t=>(f(),o(`div`,{key:t.key,class:`capability-row`},[e(`img`,{src:t.icon,alt:``},null,8,je),e(`span`,null,r(t.label),1)]))),128))])])]),e(`section`,Me,[e(`div`,Ne,[e(`div`,null,[e(`p`,Pe,r(p.$t(`index.eyebrow.cta`)),1),e(`h2`,null,r(p.$t(`index.title.cta`)),1),e(`p`,null,r(p.$t(`index.subtitle.cta`)),1)]),e(`div`,Fe,[i(v,{type:`primary`,size:`large`,onClick:p.onStart},{default:u(()=>[n(r(p.$t(`common.button.startForFree`)),1)]),_:1},8,[`onClick`]),p.isMainSite?(f(),l(v,{key:0,size:`large`,onClick:p.openSubsites},{default:u(()=>[n(r(p.$t(`index.button.createSubsite`)),1)]),_:1},8,[`onClick`])):a(``,!0)])])])])}var Le=y(A,[[`render`,Ie],[`__scopeId`,`data-v-6028c277`]]);export{Le 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-vXURdu1n.js";import{n as S,t as C}from"./tabs-D_ymCjuP.js";import{t as w}from"./tooltip-DhzXpaev.js";import{v as T}from"./models-qt9s4QBH.js";import{n as E,r as D,t as O}from"./dropdown-C-txjYRt.js";import{t as k}from"./pagination-BNM_M1GC.js";import{t as A}from"./switch-DsvSpAPL.js";import{t as j}from"./arrow-down-D057mODD.js";import{t as M}from"./arrow-left-YoHcMhBE.js";import{t as N}from"./book-open-CciDm_Vd.js";import{t as P}from"./chevron-down-B3REnXgR.js";import{t as F}from"./chevron-right-w2PXBeor.js";import{t as I}from"./circle-check-BQthOLHp.js";import{t as L}from"./circle-question-mark-BZwtMJy4.js";import{t as ee}from"./clipboard-list-D5h3FLI6.js";import{t as te}from"./code-D6hLj3tB.js";import{t as R}from"./copy-fKMS0PiE.js";import{t as ne}from"./ellipsis-BHYVvatw.js";import{t as re}from"./eye-C0mUD2kS.js";import{t as ie}from"./file-text-DSjOXw5_.js";import{t as z}from"./file-B_edwII7.js";import{t as ae}from"./folder-BX4TmtAd.js";import{t as oe}from"./image-B-M2bJ6h.js";import{t as se}from"./lock-ChRu85GF.js";import{t as B}from"./plus-D5KrvAv-.js";import{n as ce,t as le}from"./store-Cg1vR3oj.js";import{t as ue}from"./search-Dm-cjK6g.js";import{t as de}from"./trash-2-CuwbroP3.js";import{t as fe}from"./triangle-alert-CXwoT9L1.js";import{t as pe}from"./upload-_ak4mf2P.js";import{t as me}from"./wand-sparkles-DKunfvfr.js";import{S as he,T as ge,k as _e,w as ve,y as ye}from"./i18n-BQrNxKw9.js";import{$a as be,A as V,Ba as H,Ha as U,Ia as xe,Ka as W,Va as Se,Xi as G,Yi as K,lo as q,to as J}from"./index-DqV-SJ5V.js";import{a as Ce,c as we,d as Te,f as Ee,i as De,l as Oe,m as Y,n as ke,o as Ae,p as je,r as Me,s as Ne,t as Pe,u as Fe}from"./vendor-highlight-BHrfT4-E.js";import{t as Ie}from"./index.es-xLHNFjv4.js";import{t as Le}from"./VueMarkdown-CiiRjbWs.js";import{t as Re}from"./PageHeader-Ce-bDWDK.js";var ze=H(`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`}]]),Be=H(`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`}]]),Ve=H(`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`}]]),He=H(`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`}]]),Ue=H(`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:`${xe()}/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 G.get(`/${this.key}/`,{...X(),params:e})}async get(e){return G.get(`/${this.key}/${e}/`,X())}async categories(){return G.get(`/${this.key}/categories/`,X())}async install(e,t={}){return K.post(`/${this.key}/${e}/install/`,t,X())}};function We(){let e=new Set;ve()&&e.add(`desktop`),ge()&&e.add(`ios`),he()&&e.add(`android`),_e()&&e.add(`web`);let t=ye();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;!ge()&&!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 Ge=new Set([`mac`,`windows`,`desktop`,`web`,`ios`,`android`]);function Ke(e){let t=e.filter(e=>Ge.has(e));if(!t.length)return!0;let n=We();return t.some(e=>n.has(e))}Y.registerLanguage(`bash`,je),Y.registerLanguage(`json`,Ee),Y.registerLanguage(`markdown`,Te),Y.registerLanguage(`python`,Fe),Y.registerLanguage(`shell`,Oe),Y.registerLanguage(`yaml`,we),Y.registerAliases([`yml`],{languageName:`yaml`}),Y.registerAliases([`py`],{languageName:`python`}),Y.registerAliases([`sh`,`zsh`],{languageName:`bash`});var qe=12,Je=y({name:`BrowseSkillsDialog`,components:{VueMarkdown:Le,ElDialog:W,ElInput:q,ElButton:J,ElPagination:k,ElSelect:b,ElOption:x,FontAwesomeIcon:Ie,AddIcon:B,BackIcon:M,DownIcon:j,InstallIcon:ze,LockIcon:se,SearchIcon:ue,SuccessIcon:I},directives:{loading:U},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 qe},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 Ke(this.restrictedSurfaces(e))}}}),Ye={class:`directory`},Xe={class:`directory-main`},Ze={class:`directory-header`},Qe={class:`directory-controls`},$e={class:`directory-grid-wrapper`},et={key:0,class:`directory-empty`},tt={key:1,class:`directory-grid`},nt=[`onClick`],rt={class:`directory-card-head`},it={class:`directory-card-title`},at=[`title`],ot=[`title`],st=[`aria-label`,`title`,`onClick`],ct=[`title`],lt={class:`directory-card-meta`},ut={class:`directory-card-publisher`},dt={key:0,class:`directory-card-count`},ft=[`title`],pt={class:`directory-card-desc`},mt={key:0,class:`directory-footer`},ht={class:`directory-detail-head`},gt={class:`directory-detail-actions`},_t=[`href`],vt={class:`directory-detail-body`},yt={class:`directory-detail-title`},bt={class:`directory-detail-meta`},xt={key:0},St={key:1},Ct=[`title`],wt={class:`directory-detail-desc`};function Tt(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`,Ye,[e(`main`,Xe,[u.selectedItem?(v(),s(c,{key:1},[e(`header`,ht,[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`,gt,[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,_t)):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`,vt,[e(`h2`,yt,`/`+i(u.selectedItem.slug),1),e(`div`,bt,[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`,xt,[e(`strong`,null,i(u.$t(`skill.directory.license`))+`:`,1),r(` `+i(u.selectedItem.license),1)])):o(``,!0),u.selectedItem.version?(v(),s(`span`,St,`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,Ct)):o(``,!0)]),e(`p`,wt,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`,Ze,[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`,Qe,[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`,$e,[!u.loading&&u.total===0?(v(),s(`p`,et,i(u.$t(`skill.directory.empty`)),1)):(v(),s(`div`,tt,[(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`,rt,[e(`span`,it,`/`+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,at)):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,ot)):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,st)):(v(),s(`span`,{key:3,class:`directory-card-locked`,title:c.license},[a(D,{size:16,"aria-hidden":`true`,focusable:`false`})],8,ct))]),e(`div`,lt,[e(`span`,ut,i(c.publisher),1),c.install_count>0?(v(),s(`span`,dt,[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,ft)):o(``,!0)]),e(`p`,pt,i(c.description),1)],10,nt))),128))]))])),[[L,u.loading]]),u.total>u.pageSize?(v(),s(`footer`,mt,[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 Et=V(Je,[[`render`,Tt],[`__scopeId`,`data-v-a9be2dc3`]]);Y.registerLanguage(`bash`,je),Y.registerLanguage(`css`,Ne),Y.registerLanguage(`go`,Ae),Y.registerLanguage(`javascript`,Ce),Y.registerLanguage(`json`,Ee),Y.registerLanguage(`markdown`,Te),Y.registerLanguage(`python`,Fe),Y.registerLanguage(`rust`,De),Y.registerLanguage(`shell`,Oe),Y.registerLanguage(`sql`,Me),Y.registerLanguage(`typescript`,ke),Y.registerLanguage(`xml`,Pe),Y.registerLanguage(`html`,Pe),Y.registerLanguage(`yaml`,we),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 Dt(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 Ot(e){let t=(e.split(`.`).pop()||``).toLowerCase();return Y.getLanguage(t)?t:`plain`}var kt=y({name:`SkillFilePreview`,components:{ElButton:J,ElTooltip:w,ElTabs:S,ElTabPane:C,CodeIcon:te,CopyIcon:R,FileIcon:z,SaveIcon:He,SuccessIcon:I,ViewIcon:re,WarningIcon:fe,VueMarkdown:Le},directives:{loading:U},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,copied:!1,copiedTimer:void 0}},computed:{kind(){return this.path?Dt(this.path,this.contentType):`text`},canRender(){return this.kind===`markdown`||this.kind===`html`},hljsLang(){return`language-${Ot(this.path)}`},truncatedText(){return this.textContent}},watch:{path:{handler(){this.fetch()},immediate:!0}},beforeUnmount(){this.imageUrl&&URL.revokeObjectURL(this.imageUrl),this.copiedTimer!==void 0&&window.clearTimeout(this.copiedTimer)},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.copied=!1,this.copiedTimer!==void 0&&(window.clearTimeout(this.copiedTimer),this.copiedTimer=void 0),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=Dt(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),this.copied=!0,this.copiedTimer!==void 0&&window.clearTimeout(this.copiedTimer),this.copiedTimer=window.setTimeout(()=>{this.copied=!1,this.copiedTimer=void 0},3e3),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}}}}),At={class:`preview-root`},jt={class:`toolbar`},Mt={class:`path-display`},Nt={key:0,class:`size-display`},Pt={class:`body`},Ft={key:0,class:`error`},It=[`srcdoc`],Lt={key:3,class:`image-pane`},Rt=[`src`,`alt`],zt={key:4,class:`binary`},Bt=[`placeholder`],Vt={key:6,class:`source-pane`},Ht={key:7,class:`truncated-warning`};function Ut(t,c,h,g,_,y){let b=l(`save-icon`),x=l(`el-button`),S=l(`success-icon`),C=l(`copy-icon`),w=l(`el-tooltip`),T=l(`view-icon`),E=l(`el-tab-pane`),D=l(`code-icon`),O=l(`el-tabs`),k=l(`warning-icon`),A=l(`vue-markdown`),j=l(`file-icon`),M=m(`loading`);return d((v(),s(`div`,At,[e(`div`,jt,[e(`span`,Mt,i(t.path||`—`),1),t.size?(v(),s(`span`,Nt,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(`common.button.save`)),1)]),_:1},8,[`disabled`,`loading`,`onClick`])):o(``,!0),a(w,{visible:t.copied,content:t.copied?t.$t(`skill.preview.copied`):t.$t(`skill.preview.copy`),placement:`top-start`},{default:p(()=>[a(x,{size:`small`,circle:``,disabled:!t.textContent,"aria-label":t.copied?t.$t(`skill.preview.copied`):t.$t(`skill.preview.copy`),title:t.copied?t.$t(`skill.preview.copied`):t.$t(`skill.preview.copy`),onClick:t.onCopy},{default:p(()=>[t.copied?(v(),f(S,{key:0,size:16,"aria-hidden":`true`,focusable:`false`})):(v(),f(C,{key:1,size:16,"aria-hidden":`true`,focusable:`false`}))]),_:1},8,[`disabled`,`aria-label`,`title`,`onClick`])]),_:1},8,[`visible`,`content`])]),t.canRender?(v(),f(O,{key:0,modelValue:t.viewMode,"onUpdate:modelValue":c[0]||=e=>t.viewMode=e,class:`view-tabs`},{default:p(()=>[a(E,{name:`rendered`},{label:p(()=>[a(T,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.preview.viewRendered`)),1)]),_:1}),a(E,{name:`source`},{label:p(()=>[a(D,{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`,Pt,[t.error?(v(),s(`div`,Ft,[a(k,{class:`mr-2`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.error),1)])):t.kind===`markdown`&&t.viewMode===`rendered`?(v(),f(A,{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,It)):t.kind===`image`?(v(),s(`div`,Lt,[e(`img`,{src:t.imageUrl,alt:t.path,class:`image-content`},null,8,Rt)])):t.kind===`binary`?(v(),s(`div`,zt,[a(j,{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,Bt)),[[u,t.textContent]]):(v(),s(`pre`,Vt,[e(`code`,{ref:`codeEl`,class:n(t.hljsLang)},i(t.truncatedText),3)])),t.truncated?(v(),s(`p`,Ht,i(t.$t(`skill.preview.truncated`,{size:t.humanSize(t.MAX_PREVIEW_BYTES)})),1)):o(``,!0)])])),[[M,t.loading]])}var Wt=V(kt,[[`render`,Ut],[`__scopeId`,`data-v-872078d9`]]),Gt=new Set([`py`,`ts`,`tsx`,`js`,`jsx`,`json`,`yaml`,`yml`,`sh`,`bash`,`zsh`,`css`,`html`,`sql`,`go`,`rs`,`rb`,`java`,`cpp`,`c`,`h`,`toml`]),Kt=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`]);function qt(e){let t=e.split(`/`).pop()||e,n=(t.split(`.`).pop()||``).toLowerCase();return t===`SKILL.md`?N:n===`md`?ie:Kt.has(n)?oe:Gt.has(n)?Ve:z}function Jt(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 Yt=y({name:`FileNode`,components:{ExpandDownIcon:P,ExpandRightIcon:F,FontAwesomeIcon:Ie},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?qt(e.path):ae},onClick(){this.node.isLeaf?this.$emit(`select-file`,this.node.path):this.open=!this.open}}}),Xt=[`aria-label`,`title`],Zt={key:1,class:`node-chevron-spacer`},Qt={class:`node-label`},$t={key:0,class:`children`};function en(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`,Zt)):(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,Xt)),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`,Qt,i(r.node.label),1)],6),!r.node.isLeaf&&r.open?(v(),s(`ul`,$t,[(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 tn=y({name:`SkillRow`,components:{ExpandDownIcon:P,ExpandRightIcon:F,SkillIcon:ce,FileNode:V(Yt,[[`render`,en],[`__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 Jt(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)}}}),nn={class:`skill-row-wrapper`},rn=[`aria-label`,`title`],an={key:1,class:`row-chevron-spacer`},on=[`title`],sn={key:0,class:`file-list`};function cn(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`,nn,[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,rn)):(v(),s(`span`,an)),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,on)],2),r.expanded&&r.hasChildren?(v(),s(`ul`,sn,[(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 ln=V(tn,[[`render`,cn],[`__scopeId`,`data-v-231c2ce1`]]),un=10*1024*1024,dn=/\.(tar\.gz|tgz|tar|zip|md)$/i,fn=y({name:`UploadSkillDialog`,components:{ElDialog:W,ElButton:J,AddFileIcon:Ue,CloudUploadIcon:Be},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>un){T.error(this.$t(`skill.message.fileTooLarge`));return}if(!dn.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}}}}}),pn={key:0,class:`dropzone-hint`},mn={key:1,class:`dropzone-file`},hn={class:`dropzone-file-name`},gn={class:`dropzone-file-size`},_n={class:`requirements`},vn={class:`requirements-title`};function yn(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(`common.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`,mn,[e(`span`,hn,i(o.file.name),1),e(`span`,gn,i(o.humanSize(o.file.size)),1)])):(v(),s(`p`,pn,i(o.$t(`skill.dialog.uploadDrop`)),1))],34),e(`div`,_n,[e(`p`,vn,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 bn=V(fn,[[`render`,yn],[`__scopeId`,`data-v-a38152b9`]]),xn=y({name:`WriteSkillDialog`,components:{ElDialog:W,ElButton:J,ElInput:q,CloudUploadIcon:Be},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}}}}}),Sn={class:`hint`};function Cn(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(`common.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`,Sn,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 wn=y({name:`UserSkills`,components:{ConsolePageHeader:Re,ElInput:q,ElSwitch:A,ElTag:be,ElTooltip:w,ElDropdown:O,ElDropdownMenu:D,ElDropdownItem:E,AddIcon:B,AiCreateIcon:me,DeleteIcon:de,ExpandDownIcon:P,ExpandRightIcon:F,HelpIcon:L,MarketplaceIcon:le,MoreIcon:ne,SearchIcon:ue,SkillIcon:ce,UploadIcon:pe,WriteIcon:ee,BrowseSkillsDialog:Et,SkillFilePreview:Wt,SkillRow:ln,UploadSkillDialog:bn,WriteSkillDialog:V(xn,[[`render`,Cn],[`__scopeId`,`data-v-1946d5b3`]])},directives:{loading:U},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 Se.confirm(this.$t(`skill.message.deleteConfirm`,{slug:e.slug}),this.$t(`common.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}}}}),Tn={class:`skills-page`},En={class:`skills-shell`},Dn={class:`left-pane`},On={class:`left-header`},kn=[`aria-label`,`title`],An={class:`submenu-trigger`},jn={class:`badge-soon`},Mn={class:`left-body`},Nn={class:`section`},Pn={key:0,class:`skill-list`},Fn={key:0,class:`empty-row`},In={key:0,class:`section`},Ln={key:0,class:`skill-list`},Rn={class:`right-pane`},zn={class:`right-header`},Bn={class:`right-title`},Vn={class:`right-actions`},Hn=[`aria-label`,`title`],Un={class:`meta-card`},Wn={class:`meta-grid`},Gn={class:`meta-cell`},Kn={class:`meta-label`},qn={class:`meta-value`},Jn={class:`meta-cell`},Yn={class:`meta-label`},Xn={class:`meta-value`},Zn={key:0,class:`meta-cell`},Qn={class:`meta-label`},$n={class:`meta-tags`},er={key:0,class:`meta-description`},tr={class:`meta-description-label`},nr={class:`meta-label`},rr={class:`preview-card`},ir={key:2,class:`right-empty`};function ar(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`),ae=m(`loading`);return v(),s(`div`,Tn,[a(b,{title:t.$t(`skill.title.skills`),subtitle:t.$t(`skill.message.pageDescription`)},null,8,[`title`,`subtitle`]),e(`div`,En,[e(`aside`,Dn,[e(`header`,On,[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`,jn,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`,An,[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,kn)]),_:1})]),d((v(),s(`div`,Mn,[e(`section`,Nn,[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`,Pn,[!t.loading&&t.filteredPersonal.length===0?(v(),s(`li`,Fn,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`,In,[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`,Ln,[(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)])),[[ae,t.loading]])]),e(`main`,Rn,[t.selectedSkill&&!t.selectedPath?(v(),s(c,{key:0},[e(`header`,zn,[e(`h3`,Bn,i(t.selectedSkill.slug),1),e(`div`,Vn,[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(`common.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,Hn)]),_:1}))])]),e(`div`,Un,[e(`div`,Wn,[e(`div`,Gn,[e(`span`,Kn,i(t.$t(`skill.meta.addedBy`)),1),e(`span`,qn,i(t.selectedSkill.source===`global`?t.$t(`skill.meta.platform`):t.$t(`skill.meta.you`)),1)]),e(`div`,Jn,[e(`span`,Yn,i(t.$t(`skill.meta.lastUpdated`)),1),e(`span`,Xn,i(t.$dayjs.format(t.selectedSkill.updated_at)),1)]),t.selectedSkill.required_connections.length?(v(),s(`div`,Zn,[e(`span`,Qn,i(t.$t(`skill.field.requiredConnections`)),1),e(`div`,$n,[(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`,er,[e(`div`,tr,[e(`span`,nr,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`,rr,[(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`,ir,[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 or=V(wn,[[`render`,ar],[`__scopeId`,`data-v-6d629e8e`]]);export{or 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-C_X0J3Ch.js";import{n as S,t as C}from"./tabs-6hfO7ztL.js";import{t as w}from"./tooltip-OUJEXz3N.js";import{v as T}from"./models-Cru5uJc2.js";import{n as E,r as D,t as O}from"./dropdown-xvOpGXaf.js";import{t as k}from"./pagination-B_nilV_t.js";import{t as A}from"./switch-DyfMMvH-.js";import{t as j}from"./arrow-down-ChqsQZig.js";import{t as M}from"./arrow-left-Dtuf3L2j.js";import{t as N}from"./book-open-Cofs7E9U.js";import{t as P}from"./chevron-down-Ce5WWTJ4.js";import{t as F}from"./chevron-right-CIFdBNP8.js";import{t as I}from"./circle-check-C7raGFyE.js";import{t as L}from"./circle-question-mark-C4awnefe.js";import{t as ee}from"./clipboard-list-BtP8g_uG.js";import{t as te}from"./code-DnoJmxOh.js";import{t as R}from"./copy-Bgq_Lt5F.js";import{t as ne}from"./ellipsis-D-4XqsA_.js";import{t as re}from"./eye-Dhb3D_OP.js";import{t as ie}from"./file-text-iEDL634w.js";import{t as z}from"./file-BY8wxxW3.js";import{t as ae}from"./folder-BQwFHQqf.js";import{t as oe}from"./image-CfYTaFPL.js";import{t as se}from"./lock-ClNzLpGj.js";import{t as B}from"./plus-CKVbpoNT.js";import{n as ce,t as le}from"./store-DztoOndf.js";import{t as ue}from"./search-Ba7fFpK4.js";import{t as de}from"./trash-2-Cy68rO6n.js";import{t as fe}from"./triangle-alert-CjbgCRoN.js";import{t as pe}from"./upload-vSq7Ihy4.js";import{t as me}from"./wand-sparkles-BLj6TbQF.js";import{S as he,T as ge,k as _e,w as ve,y as ye}from"./i18n-lmeSFJDq.js";import{$a as be,A as V,Ba as H,Ha as U,Ia as xe,Ka as W,Va as Se,Xi as G,Yi as K,lo as q,to as J}from"./index-DVmeVwK7.js";import{a as Ce,c as we,d as Te,f as Ee,i as De,l as Oe,m as Y,n as ke,o as Ae,p as je,r as Me,s as Ne,t as Pe,u as Fe}from"./vendor-highlight-BHrfT4-E.js";import{t as Ie}from"./index.es-Chh6NaN3.js";import{t as Le}from"./VueMarkdown-CiiRjbWs.js";import{t as Re}from"./PageHeader-BGawVup6.js";var ze=H(`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`}]]),Be=H(`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`}]]),Ve=H(`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`}]]),He=H(`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`}]]),Ue=H(`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:`${xe()}/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 G.get(`/${this.key}/`,{...X(),params:e})}async get(e){return G.get(`/${this.key}/${e}/`,X())}async categories(){return G.get(`/${this.key}/categories/`,X())}async install(e,t={}){return K.post(`/${this.key}/${e}/install/`,t,X())}};function We(){let e=new Set;ve()&&e.add(`desktop`),ge()&&e.add(`ios`),he()&&e.add(`android`),_e()&&e.add(`web`);let t=ye();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;!ge()&&!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 Ge=new Set([`mac`,`windows`,`desktop`,`web`,`ios`,`android`]);function Ke(e){let t=e.filter(e=>Ge.has(e));if(!t.length)return!0;let n=We();return t.some(e=>n.has(e))}Y.registerLanguage(`bash`,je),Y.registerLanguage(`json`,Ee),Y.registerLanguage(`markdown`,Te),Y.registerLanguage(`python`,Fe),Y.registerLanguage(`shell`,Oe),Y.registerLanguage(`yaml`,we),Y.registerAliases([`yml`],{languageName:`yaml`}),Y.registerAliases([`py`],{languageName:`python`}),Y.registerAliases([`sh`,`zsh`],{languageName:`bash`});var qe=12,Je=y({name:`BrowseSkillsDialog`,components:{VueMarkdown:Le,ElDialog:W,ElInput:q,ElButton:J,ElPagination:k,ElSelect:b,ElOption:x,FontAwesomeIcon:Ie,AddIcon:B,BackIcon:M,DownIcon:j,InstallIcon:ze,LockIcon:se,SearchIcon:ue,SuccessIcon:I},directives:{loading:U},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 qe},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 Ke(this.restrictedSurfaces(e))}}}),Ye={class:`directory`},Xe={class:`directory-main`},Ze={class:`directory-header`},Qe={class:`directory-controls`},$e={class:`directory-grid-wrapper`},et={key:0,class:`directory-empty`},tt={key:1,class:`directory-grid`},nt=[`onClick`],rt={class:`directory-card-head`},it={class:`directory-card-title`},at=[`title`],ot=[`title`],st=[`aria-label`,`title`,`onClick`],ct=[`title`],lt={class:`directory-card-meta`},ut={class:`directory-card-publisher`},dt={key:0,class:`directory-card-count`},ft=[`title`],pt={class:`directory-card-desc`},mt={key:0,class:`directory-footer`},ht={class:`directory-detail-head`},gt={class:`directory-detail-actions`},_t=[`href`],vt={class:`directory-detail-body`},yt={class:`directory-detail-title`},bt={class:`directory-detail-meta`},xt={key:0},St={key:1},Ct=[`title`],wt={class:`directory-detail-desc`};function Tt(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`,Ye,[e(`main`,Xe,[u.selectedItem?(v(),s(c,{key:1},[e(`header`,ht,[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`,gt,[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,_t)):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`,vt,[e(`h2`,yt,`/`+i(u.selectedItem.slug),1),e(`div`,bt,[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`,xt,[e(`strong`,null,i(u.$t(`skill.directory.license`))+`:`,1),r(` `+i(u.selectedItem.license),1)])):o(``,!0),u.selectedItem.version?(v(),s(`span`,St,`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,Ct)):o(``,!0)]),e(`p`,wt,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`,Ze,[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`,Qe,[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`,$e,[!u.loading&&u.total===0?(v(),s(`p`,et,i(u.$t(`skill.directory.empty`)),1)):(v(),s(`div`,tt,[(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`,rt,[e(`span`,it,`/`+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,at)):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,ot)):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,st)):(v(),s(`span`,{key:3,class:`directory-card-locked`,title:c.license},[a(D,{size:16,"aria-hidden":`true`,focusable:`false`})],8,ct))]),e(`div`,lt,[e(`span`,ut,i(c.publisher),1),c.install_count>0?(v(),s(`span`,dt,[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,ft)):o(``,!0)]),e(`p`,pt,i(c.description),1)],10,nt))),128))]))])),[[L,u.loading]]),u.total>u.pageSize?(v(),s(`footer`,mt,[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 Et=V(Je,[[`render`,Tt],[`__scopeId`,`data-v-a9be2dc3`]]);Y.registerLanguage(`bash`,je),Y.registerLanguage(`css`,Ne),Y.registerLanguage(`go`,Ae),Y.registerLanguage(`javascript`,Ce),Y.registerLanguage(`json`,Ee),Y.registerLanguage(`markdown`,Te),Y.registerLanguage(`python`,Fe),Y.registerLanguage(`rust`,De),Y.registerLanguage(`shell`,Oe),Y.registerLanguage(`sql`,Me),Y.registerLanguage(`typescript`,ke),Y.registerLanguage(`xml`,Pe),Y.registerLanguage(`html`,Pe),Y.registerLanguage(`yaml`,we),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 Dt(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 Ot(e){let t=(e.split(`.`).pop()||``).toLowerCase();return Y.getLanguage(t)?t:`plain`}var kt=y({name:`SkillFilePreview`,components:{ElButton:J,ElTooltip:w,ElTabs:S,ElTabPane:C,CodeIcon:te,CopyIcon:R,FileIcon:z,SaveIcon:He,SuccessIcon:I,ViewIcon:re,WarningIcon:fe,VueMarkdown:Le},directives:{loading:U},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,copied:!1,copiedTimer:void 0}},computed:{kind(){return this.path?Dt(this.path,this.contentType):`text`},canRender(){return this.kind===`markdown`||this.kind===`html`},hljsLang(){return`language-${Ot(this.path)}`},truncatedText(){return this.textContent}},watch:{path:{handler(){this.fetch()},immediate:!0}},beforeUnmount(){this.imageUrl&&URL.revokeObjectURL(this.imageUrl),this.copiedTimer!==void 0&&window.clearTimeout(this.copiedTimer)},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.copied=!1,this.copiedTimer!==void 0&&(window.clearTimeout(this.copiedTimer),this.copiedTimer=void 0),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=Dt(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),this.copied=!0,this.copiedTimer!==void 0&&window.clearTimeout(this.copiedTimer),this.copiedTimer=window.setTimeout(()=>{this.copied=!1,this.copiedTimer=void 0},3e3),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}}}}),At={class:`preview-root`},jt={class:`toolbar`},Mt={class:`path-display`},Nt={key:0,class:`size-display`},Pt={class:`body`},Ft={key:0,class:`error`},It=[`srcdoc`],Lt={key:3,class:`image-pane`},Rt=[`src`,`alt`],zt={key:4,class:`binary`},Bt=[`placeholder`],Vt={key:6,class:`source-pane`},Ht={key:7,class:`truncated-warning`};function Ut(t,c,h,g,_,y){let b=l(`save-icon`),x=l(`el-button`),S=l(`success-icon`),C=l(`copy-icon`),w=l(`el-tooltip`),T=l(`view-icon`),E=l(`el-tab-pane`),D=l(`code-icon`),O=l(`el-tabs`),k=l(`warning-icon`),A=l(`vue-markdown`),j=l(`file-icon`),M=m(`loading`);return d((v(),s(`div`,At,[e(`div`,jt,[e(`span`,Mt,i(t.path||`—`),1),t.size?(v(),s(`span`,Nt,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(`common.button.save`)),1)]),_:1},8,[`disabled`,`loading`,`onClick`])):o(``,!0),a(w,{visible:t.copied,content:t.copied?t.$t(`skill.preview.copied`):t.$t(`skill.preview.copy`),placement:`top-start`},{default:p(()=>[a(x,{size:`small`,circle:``,disabled:!t.textContent,"aria-label":t.copied?t.$t(`skill.preview.copied`):t.$t(`skill.preview.copy`),title:t.copied?t.$t(`skill.preview.copied`):t.$t(`skill.preview.copy`),onClick:t.onCopy},{default:p(()=>[t.copied?(v(),f(S,{key:0,size:16,"aria-hidden":`true`,focusable:`false`})):(v(),f(C,{key:1,size:16,"aria-hidden":`true`,focusable:`false`}))]),_:1},8,[`disabled`,`aria-label`,`title`,`onClick`])]),_:1},8,[`visible`,`content`])]),t.canRender?(v(),f(O,{key:0,modelValue:t.viewMode,"onUpdate:modelValue":c[0]||=e=>t.viewMode=e,class:`view-tabs`},{default:p(()=>[a(E,{name:`rendered`},{label:p(()=>[a(T,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.preview.viewRendered`)),1)]),_:1}),a(E,{name:`source`},{label:p(()=>[a(D,{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`,Pt,[t.error?(v(),s(`div`,Ft,[a(k,{class:`mr-2`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.error),1)])):t.kind===`markdown`&&t.viewMode===`rendered`?(v(),f(A,{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,It)):t.kind===`image`?(v(),s(`div`,Lt,[e(`img`,{src:t.imageUrl,alt:t.path,class:`image-content`},null,8,Rt)])):t.kind===`binary`?(v(),s(`div`,zt,[a(j,{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,Bt)),[[u,t.textContent]]):(v(),s(`pre`,Vt,[e(`code`,{ref:`codeEl`,class:n(t.hljsLang)},i(t.truncatedText),3)])),t.truncated?(v(),s(`p`,Ht,i(t.$t(`skill.preview.truncated`,{size:t.humanSize(t.MAX_PREVIEW_BYTES)})),1)):o(``,!0)])])),[[M,t.loading]])}var Wt=V(kt,[[`render`,Ut],[`__scopeId`,`data-v-872078d9`]]),Gt=new Set([`py`,`ts`,`tsx`,`js`,`jsx`,`json`,`yaml`,`yml`,`sh`,`bash`,`zsh`,`css`,`html`,`sql`,`go`,`rs`,`rb`,`java`,`cpp`,`c`,`h`,`toml`]),Kt=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`]);function qt(e){let t=e.split(`/`).pop()||e,n=(t.split(`.`).pop()||``).toLowerCase();return t===`SKILL.md`?N:n===`md`?ie:Kt.has(n)?oe:Gt.has(n)?Ve:z}function Jt(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 Yt=y({name:`FileNode`,components:{ExpandDownIcon:P,ExpandRightIcon:F,FontAwesomeIcon:Ie},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?qt(e.path):ae},onClick(){this.node.isLeaf?this.$emit(`select-file`,this.node.path):this.open=!this.open}}}),Xt=[`aria-label`,`title`],Zt={key:1,class:`node-chevron-spacer`},Qt={class:`node-label`},$t={key:0,class:`children`};function en(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`,Zt)):(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,Xt)),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`,Qt,i(r.node.label),1)],6),!r.node.isLeaf&&r.open?(v(),s(`ul`,$t,[(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 tn=y({name:`SkillRow`,components:{ExpandDownIcon:P,ExpandRightIcon:F,SkillIcon:ce,FileNode:V(Yt,[[`render`,en],[`__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 Jt(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)}}}),nn={class:`skill-row-wrapper`},rn=[`aria-label`,`title`],an={key:1,class:`row-chevron-spacer`},on=[`title`],sn={key:0,class:`file-list`};function cn(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`,nn,[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,rn)):(v(),s(`span`,an)),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,on)],2),r.expanded&&r.hasChildren?(v(),s(`ul`,sn,[(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 ln=V(tn,[[`render`,cn],[`__scopeId`,`data-v-231c2ce1`]]),un=10*1024*1024,dn=/\.(tar\.gz|tgz|tar|zip|md)$/i,fn=y({name:`UploadSkillDialog`,components:{ElDialog:W,ElButton:J,AddFileIcon:Ue,CloudUploadIcon:Be},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>un){T.error(this.$t(`skill.message.fileTooLarge`));return}if(!dn.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}}}}}),pn={key:0,class:`dropzone-hint`},mn={key:1,class:`dropzone-file`},hn={class:`dropzone-file-name`},gn={class:`dropzone-file-size`},_n={class:`requirements`},vn={class:`requirements-title`};function yn(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(`common.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`,mn,[e(`span`,hn,i(o.file.name),1),e(`span`,gn,i(o.humanSize(o.file.size)),1)])):(v(),s(`p`,pn,i(o.$t(`skill.dialog.uploadDrop`)),1))],34),e(`div`,_n,[e(`p`,vn,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 bn=V(fn,[[`render`,yn],[`__scopeId`,`data-v-a38152b9`]]),xn=y({name:`WriteSkillDialog`,components:{ElDialog:W,ElButton:J,ElInput:q,CloudUploadIcon:Be},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}}}}}),Sn={class:`hint`};function Cn(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(`common.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`,Sn,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 wn=y({name:`UserSkills`,components:{ConsolePageHeader:Re,ElInput:q,ElSwitch:A,ElTag:be,ElTooltip:w,ElDropdown:O,ElDropdownMenu:D,ElDropdownItem:E,AddIcon:B,AiCreateIcon:me,DeleteIcon:de,ExpandDownIcon:P,ExpandRightIcon:F,HelpIcon:L,MarketplaceIcon:le,MoreIcon:ne,SearchIcon:ue,SkillIcon:ce,UploadIcon:pe,WriteIcon:ee,BrowseSkillsDialog:Et,SkillFilePreview:Wt,SkillRow:ln,UploadSkillDialog:bn,WriteSkillDialog:V(xn,[[`render`,Cn],[`__scopeId`,`data-v-1946d5b3`]])},directives:{loading:U},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 Se.confirm(this.$t(`skill.message.deleteConfirm`,{slug:e.slug}),this.$t(`common.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}}}}),Tn={class:`skills-page`},En={class:`skills-shell`},Dn={class:`left-pane`},On={class:`left-header`},kn=[`aria-label`,`title`],An={class:`submenu-trigger`},jn={class:`badge-soon`},Mn={class:`left-body`},Nn={class:`section`},Pn={key:0,class:`skill-list`},Fn={key:0,class:`empty-row`},In={key:0,class:`section`},Ln={key:0,class:`skill-list`},Rn={class:`right-pane`},zn={class:`right-header`},Bn={class:`right-title`},Vn={class:`right-actions`},Hn=[`aria-label`,`title`],Un={class:`meta-card`},Wn={class:`meta-grid`},Gn={class:`meta-cell`},Kn={class:`meta-label`},qn={class:`meta-value`},Jn={class:`meta-cell`},Yn={class:`meta-label`},Xn={class:`meta-value`},Zn={key:0,class:`meta-cell`},Qn={class:`meta-label`},$n={class:`meta-tags`},er={key:0,class:`meta-description`},tr={class:`meta-description-label`},nr={class:`meta-label`},rr={class:`preview-card`},ir={key:2,class:`right-empty`};function ar(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`),ae=m(`loading`);return v(),s(`div`,Tn,[a(b,{title:t.$t(`skill.title.skills`),subtitle:t.$t(`skill.message.pageDescription`)},null,8,[`title`,`subtitle`]),e(`div`,En,[e(`aside`,Dn,[e(`header`,On,[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`,jn,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`,An,[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,kn)]),_:1})]),d((v(),s(`div`,Mn,[e(`section`,Nn,[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`,Pn,[!t.loading&&t.filteredPersonal.length===0?(v(),s(`li`,Fn,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`,In,[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`,Ln,[(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)])),[[ae,t.loading]])]),e(`main`,Rn,[t.selectedSkill&&!t.selectedPath?(v(),s(c,{key:0},[e(`header`,zn,[e(`h3`,Bn,i(t.selectedSkill.slug),1),e(`div`,Vn,[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(`common.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,Hn)]),_:1}))])]),e(`div`,Un,[e(`div`,Wn,[e(`div`,Gn,[e(`span`,Kn,i(t.$t(`skill.meta.addedBy`)),1),e(`span`,qn,i(t.selectedSkill.source===`global`?t.$t(`skill.meta.platform`):t.$t(`skill.meta.you`)),1)]),e(`div`,Jn,[e(`span`,Yn,i(t.$t(`skill.meta.lastUpdated`)),1),e(`span`,Xn,i(t.$dayjs.format(t.selectedSkill.updated_at)),1)]),t.selectedSkill.required_connections.length?(v(),s(`div`,Zn,[e(`span`,Qn,i(t.$t(`skill.field.requiredConnections`)),1),e(`div`,$n,[(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`,er,[e(`div`,tr,[e(`span`,nr,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`,rr,[(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`,ir,[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 or=V(wn,[[`render`,ar],[`__scopeId`,`data-v-6d629e8e`]]);export{or as default};