@acedatacloud/nexior 3.348.0 → 3.349.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ApiCodeButton-Cr87aEOF.js → ApiCodeButton-D7cSIduv.js} +1 -1
- package/dist/assets/{Artifacts-BQQ9wajJ.js → Artifacts-LLgb-4jp.js} +1 -1
- package/dist/assets/{AskUserQuestionCard-TbWfOHyz.js → AskUserQuestionCard-BtVZFtH7.js} +1 -1
- package/dist/assets/{AudioPreview-CYL3ulyh.js → AudioPreview-BVfOfFtt.js} +1 -1
- package/dist/assets/{Auth-BEM37S88.js → Auth-CiuvBfsw.js} +1 -1
- package/dist/assets/{Bare-vwxx6_6i.js → Bare-gLjAuTtz.js} +1 -1
- package/dist/assets/{BotPlaceholder-3C03-_S9.js → BotPlaceholder-DJ5uzTBq.js} +1 -1
- package/dist/assets/{BottomFooter-pN_fInI2.js → BottomFooter-nAWZkycd.js} +1 -1
- package/dist/assets/{Callback-D7HixjW1.js → Callback-QheChzdE.js} +1 -1
- package/dist/assets/{CodeSnippet-DNzMgryO.js → CodeSnippet-StdWluwi.js} +1 -1
- package/dist/assets/{Console-Dlhvz6oY.js → Console-CsYcF8q8.js} +1 -1
- package/dist/assets/{Consumption-C7DZ1LFd.js → Consumption-DM30aHNi.js} +1 -1
- package/dist/assets/{Conversation-DcOKbtlG.js → Conversation-2rdhDZKe.js} +1 -1
- package/dist/assets/{Conversation-BsXTJmn0.js → Conversation-rMl16J_N.js} +1 -1
- package/dist/assets/{CopyToClipboard-75JDPPOU.js → CopyToClipboard-BdIqafoA.js} +1 -1
- package/dist/assets/{Detail-DAsP08W3.js → Detail-BaUKhxI7.js} +2 -2
- package/dist/assets/{Extra-MQuv9-Ds.js → Extra-1fKVzjXy.js} +1 -1
- package/dist/assets/{FilePreview-WETU8RvO.js → FilePreview-CgAHQdn-.js} +1 -1
- package/dist/assets/{Hailuo-CRUsHBZJ.js → Hailuo-BLjLyl6X.js} +1 -1
- package/dist/assets/{History-JmY05dpU.js → History-CdGSkQtV.js} +1 -1
- package/dist/assets/{ImagePreview-DZF-0OJs.js → ImagePreview-DAbb9mev.js} +1 -1
- package/dist/assets/{ImageWrapper-BTXSDgxE.js → ImageWrapper-2dD5O7C7.js} +1 -1
- package/dist/assets/{Index-BgKcj8x_.js → Index-2C9QK_vP.js} +1 -1
- package/dist/assets/{Index-CRadm5-A.js → Index-3xD_B0Sa.js} +1 -1
- package/dist/assets/{Index-m0DdSp5h.js → Index-B3PS21sX.js} +1 -1
- package/dist/assets/{Index-B0senUeP.js → Index-B3ZmTKYo.js} +1 -1
- package/dist/assets/{Index-C31gFaDB.js → Index-B9RN2yvE.js} +1 -1
- package/dist/assets/{Index-BtO7P4X5.js → Index-BBQaWm_F.js} +1 -1
- package/dist/assets/{Index-CrgY3unI.js → Index-BGRbgGOv.js} +1 -1
- package/dist/assets/{Index-BZDp-Tco.js → Index-BQNgFW6x.js} +1 -1
- package/dist/assets/{Index-CdP5Mq_Q.js → Index-BRSwyspB.js} +1 -1
- package/dist/assets/{Index-DvNp_IGb.js → Index-BXc8toCG.js} +1 -1
- package/dist/assets/{Index-BxeBMKJe.js → Index-B_rWWEIv.js} +1 -1
- package/dist/assets/{Index-Jmmutjkp2.js → Index-Bh-P75-F2.js} +1 -1
- package/dist/assets/{Index-C4ljlTDf.js → Index-Bl-PVNHn.js} +1 -1
- package/dist/assets/{Index-Ccti1Jf8.js → Index-BlRlEG5I.js} +1 -1
- package/dist/assets/{Index-yCfws8i1.js → Index-Bu4p-8Zs.js} +1 -1
- package/dist/assets/{Index-Bxv-pwek2.js → Index-C8aVsyz32.js} +1 -1
- package/dist/assets/{Index-CnlLB_aN.js → Index-CEWv2JdK.js} +1 -1
- package/dist/assets/{Index-B2aSOyJY.js → Index-CKCbcMxi.js} +1 -1
- package/dist/assets/{Index-BRKXFXGO2.js → Index-CQ6_v-QK2.js} +1 -1
- package/dist/assets/{Index-B2hifBFC.js → Index-CReQSbzc.js} +1 -1
- package/dist/assets/{Index-BnC7-QlP.js → Index-CmB97cC0.js} +1 -1
- package/dist/assets/{Index-B-0lZBrH.js → Index-D42oRBiQ.js} +1 -1
- package/dist/assets/{Index-CDfEFLxk.js → Index-DIu6FVss.js} +1 -1
- package/dist/assets/{Index-BfrGjss7.js → Index-Do6r2wWF.js} +1 -1
- package/dist/assets/{Index-Bu5-pU0w2.js → Index-I7GcUgaU2.js} +1 -1
- package/dist/assets/{Index-5q29UNq7.js → Index-SHOgDuar.js} +1 -1
- package/dist/assets/{Index-CZ28k1Tz.js → Index-fzavKE5S.js} +1 -1
- package/dist/assets/{Index-Da1LFXrC.js → Index-gFQGxrdj.js} +1 -1
- package/dist/assets/{Index-Bg7su-Yv.js → Index-hmu18xL0.js} +1 -1
- package/dist/assets/{Index-BtK07qT1.js → Index-o_mtHbPZ.js} +1 -1
- package/dist/assets/{Index-C087xH8d.js → Index-tltTNsVn.js} +1 -1
- package/dist/assets/{Index-B-78htzp.js → Index-v2sMAfxX.js} +1 -1
- package/dist/assets/{Invitees-mgrtTSB-.js → Invitees-cXhXPZwC.js} +1 -1
- package/dist/assets/{List-BGOP5YZn.js → List-BsG-vH89.js} +1 -1
- package/dist/assets/{List-DPrRHGKX.js → List-BvSS3fN0.js} +1 -1
- package/dist/assets/{List-Bzrkr8pi.js → List-CLM7SOL8.js} +1 -1
- package/dist/assets/{LocalTools-BxH1y7Pr.js → LocalTools-B-w7XILY.js} +1 -1
- package/dist/assets/{LocalTools-CoiiQnvM.js → LocalTools-BgCJEEiZ.js} +1 -1
- package/dist/assets/{Logo-dUF36ndq.js → Logo-CYusNusa.js} +1 -1
- package/dist/assets/{Main-DIKGpvDg.js → Main-CY9WJHLN.js} +1 -1
- package/dist/assets/{Message-kvVoRAHU.js → Message-DQE6CcJC.js} +1 -1
- package/dist/assets/{Model-BwR3pl6x.js → Model-DdqOgAja.js} +1 -1
- package/dist/assets/{Navigator-CZ0ekNN5.js → Navigator-jDX38cqN.js} +3 -3
- package/dist/assets/{NotFound-tqSXTRDz.js → NotFound-Dc9mwtK7.js} +1 -1
- package/dist/assets/{Pay-B0P59QEC.js → Pay-srZILjYY.js} +1 -1
- package/dist/assets/{Player-DMPkDgdk.js → Player-CccdQ4Zt.js} +1 -1
- package/dist/assets/{Poivelle-DTAkR9cd.js → Poivelle-Dwhl6iYv.js} +1 -1
- package/dist/assets/{PromptTextarea-CcLPAbYp.js → PromptTextarea-CzDSJsNX.js} +1 -1
- package/dist/assets/{RealtimeCall-CG8RjBDX.js → RealtimeCall-DlMiCxhH.js} +1 -1
- package/dist/assets/{ScheduledTasks-CeLNtOqA.js → ScheduledTasks-Bm1gk6vR.js} +1 -1
- package/dist/assets/{Status-CzOTavjA.js → Status-XyRTPXUL.js} +1 -1
- package/dist/assets/{Subscribe-BmdlTqoc.js → Subscribe-Cs0rUIqD.js} +1 -1
- package/dist/assets/{TabSwitcher-Dr8yoXLk.js → TabSwitcher-sd3WlBc4.js} +1 -1
- package/dist/assets/{Tts-C4OB2CWX.js → Tts-DgbcgGN6.js} +1 -1
- package/dist/assets/{VideoPlayer-B7YhHjOH.js → VideoPlayer-CUeenPs-.js} +1 -1
- package/dist/assets/{alert-TKsnUnaR.js → alert-CGlgRfki.js} +1 -1
- package/dist/assets/arrow-down-ByenpoOk.js +1 -0
- package/dist/assets/{arrow-down-wide-narrow-CX3mpXeZ.js → arrow-down-wide-narrow-CAS-febW.js} +1 -1
- package/dist/assets/arrow-left-6Gbfplsf.js +1 -0
- package/dist/assets/arrow-right-D3f3Jy5o.js +1 -0
- package/dist/assets/arrow-up-7XN91KC5.js +1 -0
- package/dist/assets/{avatar-VHwxLpNi.js → avatar-C9mt4Jre.js} +1 -1
- package/dist/assets/{basic-04PqS98_.js → basic-RtV5T_qJ.js} +1 -1
- package/dist/assets/{book-open-vJADQEch.js → book-open-BTQekRjx.js} +1 -1
- package/dist/assets/{box-C1Be7e8k.js → box-dnlofEYl.js} +1 -1
- package/dist/assets/{boxes-D4iPArwL.js → boxes-BG2lKmYB.js} +1 -1
- package/dist/assets/{brain-4Pf31VGa.js → brain-BDD2lXPY.js} +1 -1
- package/dist/assets/{chart-no-axes-combined-D4lQdlFB.js → chart-no-axes-combined-D9mrZCqr.js} +1 -1
- package/dist/assets/{chat-B7j19I7y.js → chat-DmPOToxr.js} +1 -1
- package/dist/assets/check-BcE4H_K5.js +1 -0
- package/dist/assets/chevron-down-B9RRCvEa.js +1 -0
- package/dist/assets/chevron-right-cCbt5Rkn.js +1 -0
- package/dist/assets/circle-check-CK7cuz8n.js +1 -0
- package/dist/assets/{circle-question-mark-Q9kU795z.js → circle-question-mark-DnuyJRms.js} +1 -1
- package/dist/assets/{clipboard-list-BmqRZbL0.js → clipboard-list-B_L2YTdy.js} +1 -1
- package/dist/assets/clock-zti2yB4i.js +1 -0
- package/dist/assets/code-t-uzKAiF.js +1 -0
- package/dist/assets/{codingBridge-DmLTYKdn.js → codingBridge-BNGj50sW.js} +1 -1
- package/dist/assets/{codingBridgeNotify-YmJK4VAh.js → codingBridgeNotify-CEwV5pr7.js} +2 -2
- package/dist/assets/{coins-C0zHw31V.js → coins-CxyIM3HM.js} +1 -1
- package/dist/assets/{collapse-n_2lXoCE.js → collapse-CtpUmGSf.js} +1 -1
- package/dist/assets/{copy-SbyCSdvy.js → copy-C3Aaq69s.js} +1 -1
- package/dist/assets/{createTaskActions-O7R6hzJi.js → createTaskActions-Cr-E-Fhv.js} +1 -1
- package/dist/assets/{digitalhuman-DknOG-hE.js → digitalhuman-DadN_Kd3.js} +1 -1
- package/dist/assets/{dollar-sign-BTcmCT9k.js → dollar-sign-B-W-88QZ.js} +1 -1
- package/dist/assets/{download-BEhDrH3N.js → download-B121e_X8.js} +1 -1
- package/dist/assets/{drawer-zhU2Zvl-.js → drawer-QBoU8nxO.js} +1 -1
- package/dist/assets/{dropdown-jgck06Ar.js → dropdown-BASe4ViA.js} +1 -1
- package/dist/assets/{dropdown-CAkBdv6H.js → dropdown-DH5i__AS.js} +1 -1
- package/dist/assets/{ellipsis-DIR1K4vk.js → ellipsis-DtUkvzD4.js} +1 -1
- package/dist/assets/{esm-B4s8WORt.js → esm-BVElhvIz.js} +1 -1
- package/dist/assets/{esm-B1FTOjYy.js → esm-C55lj-X5.js} +1 -1
- package/dist/assets/{esm-CAq9fAGe.js → esm-CMmUMDcD.js} +1 -1
- package/dist/assets/esm-CX_HIihf.js +1 -0
- package/dist/assets/{esm-BPAQPLLk.js → esm-CkPg8CCN.js} +2 -2
- package/dist/assets/{esm-DVGVtws5.js → esm-DNS0a07B.js} +2 -2
- package/dist/assets/{esm-Bbe4U2FZ.js → esm-bIxThHfM.js} +3 -3
- package/dist/assets/{external-link-DDFJs-Cv.js → external-link-cKxOFu-J.js} +1 -1
- package/dist/assets/{eye-BFIGK47l.js → eye-sWiwDp4s.js} +1 -1
- package/dist/assets/{file-DPf-buXL.js → file-DqjtGTjU.js} +1 -1
- package/dist/assets/{file-output-CVnztX3M.js → file-output-BCmOKyN-.js} +1 -1
- package/dist/assets/{file-text-DsEU6l0e.js → file-text-CX86lGdb.js} +1 -1
- package/dist/assets/{fish-Dj1VIJOf.js → fish-QYJfF4xU.js} +1 -1
- package/dist/assets/{flux-B1x7jdN0.js → flux-BpXilje2.js} +1 -1
- package/dist/assets/{folder-CLNXBu_L.js → folder-BzcEViUd.js} +1 -1
- package/dist/assets/gauge-gm7aS3fz.js +1 -0
- package/dist/assets/{globe-BiScxUrB.js → globe-Bm2uKXSh.js} +1 -1
- package/dist/assets/{grokvideo-BqW7PxMu.js → grokvideo-BUz3O9My.js} +1 -1
- package/dist/assets/{hailuo-MrINVwfu.js → hailuo-D2g2DK9z.js} +1 -1
- package/dist/assets/{headphones-Cs9Q3nc-.js → headphones-BM0gwZIh.js} +1 -1
- package/dist/assets/{history-D3ftnbVy.js → history-D2jGOY0R.js} +1 -1
- package/dist/assets/{house-DZTpyIZU.js → house-oT07n02R.js} +1 -1
- package/dist/assets/{image-DfwdJ0ig.js → image-C170-MUT.js} +1 -1
- package/dist/assets/{index-BZkM5S_f.js → index-Epdiy8xX.js} +3 -3
- package/dist/assets/{index.browser.esm-BX_SnMs4.js → index.browser.esm-BUXDiisq.js} +1 -1
- package/dist/assets/{index.es-wYu8oWUp.js → index.es-k2CvzvlS.js} +1 -1
- package/dist/assets/{info-4GNqeBog.js → info-3w5H61Q_.js} +1 -1
- package/dist/assets/{input-number-gu27ZjbL.js → input-number-ns6IS4Ga.js} +1 -1
- package/dist/assets/{key-round-C48o5Koe.js → key-round-CsxbGw5g.js} +1 -1
- package/dist/assets/{kling-C7rE_7tT.js → kling-koKRAYnk.js} +1 -1
- package/dist/assets/{languages-BDUZuJQZ.js → languages-BBe2cSZy.js} +1 -1
- package/dist/assets/{laptop-B9MI88wE.js → laptop-TX_MfKTX.js} +1 -1
- package/dist/assets/{lightbulb-sptbQHuF.js → lightbulb-BkT4gFKD.js} +1 -1
- package/dist/assets/{link-BjKYygAU.js → link-C8aXfvM9.js} +1 -1
- package/dist/assets/loader-circle-DueVXRcT.js +1 -0
- package/dist/assets/{lock-h9XWB2bw.js → lock-BaeClC1s.js} +1 -1
- package/dist/assets/{luma-Ddl_kTbk.js → luma-BZQZ1pik.js} +1 -1
- package/dist/assets/{maestro-B8HsdZQF.js → maestro-BcT4b5zS.js} +1 -1
- package/dist/assets/{mail-B9xmxBhN.js → mail-CMPS2qxh.js} +1 -1
- package/dist/assets/{message-circle-BOfnb9Zq.js → message-circle-BAaPUNyl.js} +1 -1
- package/dist/assets/{mic-CH1UMKRs.js → mic-CEccKCms.js} +1 -1
- package/dist/assets/{midjourney-DwTghSx1.js → midjourney-CGiHOdya.js} +1 -1
- package/dist/assets/{mobileLocalExec-DTqm3gHM.js → mobileLocalExec-DTQUDqcw.js} +2 -2
- package/dist/assets/{monitor-BSFu-8XA.js → monitor-CQRx2YJ7.js} +1 -1
- package/dist/assets/{mouse-pointer-2-C_XBAnqD.js → mouse-pointer-2-DfsDiDf1.js} +1 -1
- package/dist/assets/music-2-DWxcd6XM.js +1 -0
- package/dist/assets/{nanobanana-CEMm0vcQ.js → nanobanana-FJ91SxCg.js} +1 -1
- package/dist/assets/{omni-CHA3Nfku.js → omni-CKU336-s.js} +1 -1
- package/dist/assets/{openaiimage-DwYFivUI.js → openaiimage-BSdVtDRb.js} +1 -1
- package/dist/assets/{pagination-B104U14R.js → pagination-Bxcp3LXY.js} +1 -1
- package/dist/assets/{pagination-IUmnT5pg.js → pagination-CXScSdv0.js} +1 -1
- package/dist/assets/{pagination-J0T1NkTZ.js → pagination-D_RBhR5o.js} +1 -1
- package/dist/assets/{palette-CpWJzk5I.js → palette-D2_5XWqS.js} +1 -1
- package/dist/assets/{paperclip-Kvxz-XJk.js → paperclip-CrKZnJoX.js} +1 -1
- package/dist/assets/{pause-Xaj4RL33.js → pause-Chu4M0-C.js} +1 -1
- package/dist/assets/{pencil-LWtyPihn.js → pencil-By9tSV8o.js} +1 -1
- package/dist/assets/{pika-Bj3SY7fx.js → pika-Da9Aw2qh.js} +1 -1
- package/dist/assets/{pixverse-jo8GccOk.js → pixverse-HC3DrxAx.js} +1 -1
- package/dist/assets/play-DiYzds7H.js +1 -0
- package/dist/assets/{plug-BEIc5m1a.js → plug-CA-rIKSc.js} +1 -1
- package/dist/assets/plus-CYyW1TrL.js +1 -0
- package/dist/assets/{poivelle-BPpbHoy3.js → poivelle-DOgi05g7.js} +1 -1
- package/dist/assets/{popover-E_AAjEx-.js → popover-CKTPbIau.js} +1 -1
- package/dist/assets/{producer-C1VHQBG2.js → producer-DE6IavYp.js} +1 -1
- package/dist/assets/{qrart-DcgFiO6m.js → qrart-DzampYZF.js} +1 -1
- package/dist/assets/{realtime-BhPRw2WG.js → realtime-Dv-MYZWr.js} +1 -1
- package/dist/assets/{refresh-cw-Kl5tTg4K.js → refresh-cw-DGH-p1Pm.js} +1 -1
- package/dist/assets/rotate-ccw-DAEjV45s.js +1 -0
- package/dist/assets/rotate-cw-D-TeW2An.js +1 -0
- package/dist/assets/{row-D6JPYdwL.js → row-JKUy0uh6.js} +1 -1
- package/dist/assets/search-NlWryXFy.js +1 -0
- package/dist/assets/{seedance-CK5olpHP.js → seedance-BelYxnSU.js} +1 -1
- package/dist/assets/{seedream-BcfpTvRK.js → seedream-BeiXsro5.js} +1 -1
- package/dist/assets/{select-BwAZvBDa.js → select-B7IfMuZe.js} +1 -1
- package/dist/assets/{serp-C6JFqpva.js → serp-CrU3Cbk-.js} +1 -1
- package/dist/assets/{shield-eboQWAcT.js → shield-BMD0GRRi.js} +1 -1
- package/dist/assets/{shuffle-DU2UBCyt.js → shuffle-D4zep0uj.js} +1 -1
- package/dist/assets/{slider-Bd-x4S0G.js → slider-DxHhgefw.js} +1 -1
- package/dist/assets/{sliders-horizontal-CkY1Z2Yz.js → sliders-horizontal-D5H1YEZB.js} +1 -1
- package/dist/assets/{solana-wallets-Copo8IS1.js → solana-wallets-C_mJfZjx.js} +2 -2
- package/dist/assets/{solana-wallets-vue-ChHqaME8.js → solana-wallets-vue-CH4mTJND.js} +1 -1
- package/dist/assets/{sora-CXfwM6ju.js → sora-BXiYArWo.js} +1 -1
- package/dist/assets/{sparkles-hj7nQQTc.js → sparkles-nFMKe_ZZ.js} +1 -1
- package/dist/assets/square-V_A0WqCB.js +1 -0
- package/dist/assets/{store-B_EWvNi8.js → store-acoIu5QJ.js} +1 -1
- package/dist/assets/{suno-Cd1UZ8Q7.js → suno-Bf0hc3Ak.js} +1 -1
- package/dist/assets/{switch-CDV6nqtq.js → switch-m7gZYlt1.js} +1 -1
- package/dist/assets/{table-D1fieZaO.js → table-BjxFXM2f.js} +1 -1
- package/dist/assets/{tabs-0CLt0u3e.js → tabs-XtJ6HVTZ.js} +1 -1
- package/dist/assets/{tag-NTAx66Ga.js → tag-BbI62SXC.js} +1 -1
- package/dist/assets/terminal-BVta1G9V.js +1 -0
- package/dist/assets/{time-picker-CUXqnZZg.js → time-picker-ChzX2b3F.js} +1 -1
- package/dist/assets/{tooltip-CidX6dcZ.js → tooltip-BkfE-OPy.js} +1 -1
- package/dist/assets/{trash-2-Cwgy7z2N.js → trash-2-DkaBo9Es.js} +1 -1
- package/dist/assets/{triangle-alert-DH3d6WgW.js → triangle-alert-20nV5f9K.js} +1 -1
- package/dist/assets/{upload-BSWLsM1w.js → upload-C9j6ilon.js} +1 -1
- package/dist/assets/{upload-DLH6PEN4.js → upload-CpQZXXAs.js} +1 -1
- package/dist/assets/user-X75_LIWJ.js +1 -0
- package/dist/assets/{veo-wLWDYnI3.js → veo-CfD8YrTw.js} +1 -1
- package/dist/assets/{video-a67QoXjQ.js → video-CXhWCwuj.js} +1 -1
- package/dist/assets/{volume-2-BAD_a3rw.js → volume-2-BppVvBR2.js} +1 -1
- package/dist/assets/{wallet-D86DxhR5.js → wallet-C6jNOt8y.js} +1 -1
- package/dist/assets/{wan-wb_IiVvR.js → wan-DgwicRsb.js} +1 -1
- package/dist/assets/{wand-sparkles-Dy3mNzCY.js → wand-sparkles-DMJRJli7.js} +1 -1
- package/dist/assets/{web-BnptjN9r.js → web-7keba1Cv.js} +1 -1
- package/dist/assets/{web-HOxJY49s.js → web-B5T_xh2_.js} +1 -1
- package/dist/assets/{web-Dtd8Lcyc.js → web-CScpSztd.js} +1 -1
- package/dist/assets/{web-C-5Rw2HD.js → web-DJ7OLTFj.js} +1 -1
- package/dist/assets/{web-ChtnyBDi.js → web-Ddpa448S.js} +1 -1
- package/dist/assets/{webextrator-BcvGKyTq.js → webextrator-U9PrdsaF.js} +1 -1
- package/dist/assets/{zap-YhUSDnAy.js → zap-kUwOOOBV.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/arrow-down-C8IvGCcl.js +0 -1
- package/dist/assets/arrow-left-DW8jagd0.js +0 -1
- package/dist/assets/arrow-right-BRfalyTE.js +0 -1
- package/dist/assets/arrow-up-B1UA-IQ-.js +0 -1
- package/dist/assets/check-DLy43fvq.js +0 -1
- package/dist/assets/chevron-down-BEM2GQtd.js +0 -1
- package/dist/assets/chevron-right-C4cA9yXg.js +0 -1
- package/dist/assets/circle-check-Dna8r-mR.js +0 -1
- package/dist/assets/clock-CLv3cEPi.js +0 -1
- package/dist/assets/code-DXzJ2i6s.js +0 -1
- package/dist/assets/esm-CGWWViMM.js +0 -1
- package/dist/assets/gauge-DSLMB3WI.js +0 -1
- package/dist/assets/loader-circle-B0TUTal7.js +0 -1
- package/dist/assets/music-2-C9bSefgD.js +0 -1
- package/dist/assets/play-wjXozneK.js +0 -1
- package/dist/assets/plus-uSiloLZc.js +0 -1
- package/dist/assets/rotate-ccw-DzRqXBWT.js +0 -1
- package/dist/assets/rotate-cw-BJ8HM7Ca.js +0 -1
- package/dist/assets/search-AsSGtbih.js +0 -1
- package/dist/assets/square-CVodS654.js +0 -1
- package/dist/assets/terminal-B64Gk5-Z.js +0 -1
- package/dist/assets/user-udnQlDK6.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,K as a,L as o,M as s,N as c,S as l,T as u,at as d,b as f,ht as p,j as m,mt as h,ot as g,qt as _,rt as v,st as y,tt as b,z as x}from"./vendor-chart-Dw-P17PN.js";import{r as S,t as C}from"./select-BwAZvBDa.js";import{n as w,t as T}from"./tabs-0CLt0u3e.js";import{t as E}from"./tooltip-CidX6dcZ.js";import{n as D,r as O,t as k}from"./dropdown-jgck06Ar.js";import{t as A}from"./pagination-IUmnT5pg.js";import{t as j}from"./switch-CDV6nqtq.js";import{t as M}from"./arrow-down-C8IvGCcl.js";import{t as N}from"./arrow-left-DW8jagd0.js";import{t as P}from"./book-open-vJADQEch.js";import{t as F}from"./chevron-down-BEM2GQtd.js";import{t as I}from"./chevron-right-C4cA9yXg.js";import{t as L}from"./circle-check-Dna8r-mR.js";import{t as ee}from"./circle-question-mark-Q9kU795z.js";import{t as te}from"./clipboard-list-BmqRZbL0.js";import{t as ne}from"./code-DXzJ2i6s.js";import{t as R}from"./copy-SbyCSdvy.js";import{t as re}from"./ellipsis-DIR1K4vk.js";import{t as ie}from"./eye-BFIGK47l.js";import{t as ae}from"./file-text-DsEU6l0e.js";import{t as z}from"./file-DPf-buXL.js";import{t as B}from"./folder-CLNXBu_L.js";import{t as oe}from"./image-DfwdJ0ig.js";import{t as se}from"./lock-h9XWB2bw.js";import{t as V}from"./plus-uSiloLZc.js";import{n as ce,t as le}from"./store-B_EWvNi8.js";import{t as ue}from"./search-AsSGtbih.js";import{t as de}from"./trash-2-Cwgy7z2N.js";import{t as fe}from"./triangle-alert-DH3d6WgW.js";import{t as pe}from"./upload-BSWLsM1w.js";import{t as me}from"./wand-sparkles-Dy3mNzCY.js";import{Ai as H,Ci as U,E as W,Ei as G,Ji as he,Li as ge,Si as _e,Ti as K,bi as ve,fi as ye,gi as be,gr as q,hi as xe,mi as Se,ui as Ce,wi as we,zi as J}from"./index-BZkM5S_f.js";import{a as Te,c as Ee,d as De,f as Oe,i as ke,l as Ae,m as Y,n as je,o as Me,p as Ne,r as Pe,s as Fe,t as Ie,u as Le}from"./vendor-highlight-BHrfT4-E.js";import{t as Re}from"./index.es-wYu8oWUp.js";import{t as ze}from"./VueMarkdown-CiiRjbWs.js";var Be=U(`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`}]]),Ve=U(`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`}]]),He=U(`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`}]]),Ue=U(`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`}]]),We=U(`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:`${Ce()}/api/v1`}),Z=new class{key=`skills/installed`;async list(){return q.get(`/${this.key}/`,X())}async get(e){return q.get(`/${this.key}/${e}/`,X())}async createMarkdown(e){return q.post(`/${this.key}/`,e,X())}async createTarball(e){let t=new FormData;return t.append(`tarball`,e),q.post(`/${this.key}/`,t,{...X(),headers:{"Content-Type":`multipart/form-data`}})}async update(e,t){return q.patch(`/${this.key}/${e}/`,t,X())}async remove(e){return q.delete(`/${this.key}/${e}/`,X())}async enable(e){return q.post(`/${this.key}/${e}/enable/`,void 0,X())}async disable(e){return q.post(`/${this.key}/${e}/disable/`,void 0,X())}async fetchFile(e,t){let n=await q.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 q.get(`/${this.key}/`,{...X(),params:e})}async get(e){return q.get(`/${this.key}/${e}/`,X())}async categories(){return q.get(`/${this.key}/categories/`,X())}async install(e,t={}){return q.post(`/${this.key}/${e}/install/`,t,X())}};function Ge(){let e=new Set;xe()&&e.add(`desktop`),be()&&e.add(`ios`),Se()&&e.add(`android`),ve()&&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;!be()&&!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 Ke=new Set([`mac`,`windows`,`desktop`,`web`,`ios`,`android`]);function qe(e){let t=e.filter(e=>Ke.has(e));if(!t.length)return!0;let n=Ge();return t.some(e=>n.has(e))}Y.registerLanguage(`bash`,Ne),Y.registerLanguage(`json`,Oe),Y.registerLanguage(`markdown`,De),Y.registerLanguage(`python`,Le),Y.registerLanguage(`shell`,Ae),Y.registerLanguage(`yaml`,Ee),Y.registerAliases([`yml`],{languageName:`yaml`}),Y.registerAliases([`py`],{languageName:`python`}),Y.registerAliases([`sh`,`zsh`],{languageName:`bash`});var Je=12,Ye=x({name:`BrowseSkillsDialog`,components:{VueMarkdown:ze,ElDialog:H,ElButton:J,ElPagination:A,ElSelect:S,ElOption:C,FontAwesomeIcon:Re,AddIcon:V,BackIcon:N,DownIcon:M,InstallIcon:Be,LockIcon:se,SearchIcon:ue,SuccessIcon:L},directives:{loading:G},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 Je},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),K.error(this.$t(`skill.directory.loadFailed`))}finally{this.loading=!1}},async onInstall(e){if(!this.installing&&!e.installed){if(!this.canInstallOnSurface(e)){K.warning(this.$t(`skill.directory.surfaceBlocked`,{platforms:this.surfaceLabels(e)}));return}this.installing=!0;try{let{data:t}=await Q.install(e.id);K.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,K.warning(this.$t(`skill.directory.alreadyInstalled`,{name:e.slug}))):K.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 qe(this.restrictedSurfaces(e))}}}),Xe={class:`directory`},Ze={class:`directory-main`},Qe={class:`directory-header`},$e={class:`directory-search`},et=[`placeholder`],tt={class:`directory-controls`},nt={class:`directory-grid-wrapper`},rt={key:0,class:`directory-empty`},it={key:1,class:`directory-grid`},at=[`onClick`],ot={class:`directory-card-head`},st={class:`directory-card-title`},ct=[`title`],lt=[`title`],ut=[`aria-label`,`title`,`onClick`],dt=[`title`],ft={class:`directory-card-meta`},pt={class:`directory-card-publisher`},mt={key:0,class:`directory-card-count`},ht=[`title`],gt={class:`directory-card-desc`},_t={key:0,class:`directory-footer`},vt={class:`directory-detail-head`},yt={class:`directory-detail-actions`},bt=[`href`],xt={class:`directory-detail-body`},St={class:`directory-detail-title`},Ct={class:`directory-detail-meta`},wt={key:0},Tt={key:1},Et=[`title`],Dt={class:`directory-detail-desc`};function Ot(a,l,_,y,x,S){let C=d(`search-icon`),w=d(`el-option`),T=d(`el-select`),E=d(`success-icon`),D=d(`lock-icon`),O=d(`add-icon`),k=d(`down-icon`),A=d(`el-pagination`),j=d(`back-icon`),M=d(`font-awesome-icon`),N=d(`el-button`),P=d(`install-icon`),F=d(`vue-markdown`),I=d(`el-dialog`),L=g(`loading`);return b(),m(I,{"model-value":a.modelValue,title:a.$t(`skill.dialog.directoryTitle`),width:`960px`,"align-center":``,class:`directory-dialog`,"close-on-click-modal":!a.installing,"show-close":!a.installing,"onUpdate:modelValue":l[6]||=e=>a.$emit(`update:modelValue`,e),onOpen:a.onOpen},{default:h(()=>[e(`div`,Xe,[e(`main`,Ze,[a.selectedItem?(b(),c(u,{key:1},[e(`header`,vt,[e(`button`,{class:`directory-back-btn`,onClick:l[4]||=e=>a.selectedItem=null},[o(j,{size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(a.$t(`skill.directory.back`)),1)]),e(`div`,yt,[a.selectedItem.source_url?(b(),c(`a`,{key:0,href:a.selectedItem.source_url,target:`_blank`,class:`directory-link`},[o(M,{icon:`fa-brands fa-github`}),r(` `+i(a.$t(`skill.directory.viewSource`)),1)],8,bt)):s(``,!0),a.selectedItem.installed?(b(),m(N,{key:1,disabled:``,type:`success`,plain:``},{default:h(()=>[o(E,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(a.$t(`skill.directory.installed`)),1)]),_:1})):a.selectedItem.installable&&!a.canInstallOnSurface(a.selectedItem)?(b(),m(N,{key:2,disabled:``,title:a.$t(`skill.directory.surfaceBlocked`,{platforms:a.surfaceLabels(a.selectedItem)})},{default:h(()=>[o(D,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(a.$t(`skill.directory.surfaceUnavailable`)),1)]),_:1},8,[`title`])):a.selectedItem.installable?(b(),m(N,{key:3,type:`primary`,loading:a.installing,onClick:l[5]||=e=>a.onInstall(a.selectedItem)},{default:h(()=>[o(P,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(a.$t(`skill.directory.install`)),1)]),_:1},8,[`loading`])):(b(),m(N,{key:4,disabled:``,title:a.selectedItem.license},{default:h(()=>[o(D,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(a.selectedItem.license||a.$t(`skill.directory.notInstallable`)),1)]),_:1},8,[`title`]))])]),e(`div`,xt,[e(`h2`,St,`/`+i(a.selectedItem.slug),1),e(`div`,Ct,[e(`span`,null,[e(`strong`,null,i(a.$t(`skill.meta.addedBy`))+`:`,1),r(` `+i(a.selectedItem.publisher),1)]),a.selectedItem.license?(b(),c(`span`,wt,[e(`strong`,null,i(a.$t(`skill.directory.license`))+`:`,1),r(` `+i(a.selectedItem.license),1)])):s(``,!0),a.selectedItem.version?(b(),c(`span`,Tt,`v`+i(a.selectedItem.version),1)):s(``,!0),a.surfaceLabels(a.selectedItem)?(b(),c(`span`,{key:2,class:`directory-detail-surface`,title:a.$t(`skill.directory.surfaceHint`)},i(a.$t(`skill.directory.surfaceOnly`,{platforms:a.surfaceLabels(a.selectedItem)})),9,Et)):s(``,!0)]),e(`p`,Dt,i(a.selectedItem.description),1),o(F,{class:`directory-detail-content`,source:a.detailBody,sanitize:``},null,8,[`source`])])],64)):(b(),c(u,{key:0},[e(`header`,Qe,[e(`div`,$e,[o(C,{class:`directory-search-icon`,size:16,"aria-hidden":`true`,focusable:`false`}),p(e(`input`,{"onUpdate:modelValue":l[0]||=e=>a.searchQuery=e,class:`directory-search-input`,placeholder:a.$t(`skill.directory.searchPlaceholder`),onInput:l[1]||=(...e)=>a.onSearchInput&&a.onSearchInput(...e)},null,40,et),[[f,a.searchQuery]])]),e(`div`,tt,[o(T,{modelValue:a.namespaceFilter,"onUpdate:modelValue":l[2]||=e=>a.namespaceFilter=e,class:`directory-select`,placeholder:a.$t(`skill.directory.allPublishers`),clearable:``,size:`default`,onChange:a.reloadFromFirstPage},{default:h(()=>[(b(!0),c(u,null,v(a.namespaceOptions,e=>(b(),m(w,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`onChange`]),o(T,{modelValue:a.sortBy,"onUpdate:modelValue":l[3]||=e=>a.sortBy=e,class:`directory-select directory-select-sm`,size:`default`,onChange:a.reloadFromFirstPage},{default:h(()=>[o(w,{label:a.$t(`skill.directory.sort.popular`),value:`popular`},null,8,[`label`]),o(w,{label:a.$t(`skill.directory.sort.recent`),value:`recent`},null,8,[`label`]),o(w,{label:a.$t(`skill.directory.sort.name`),value:`name`},null,8,[`label`])]),_:1},8,[`modelValue`,`onChange`])])]),p((b(),c(`div`,nt,[!a.loading&&a.total===0?(b(),c(`p`,rt,i(a.$t(`skill.directory.empty`)),1)):(b(),c(`div`,it,[(b(!0),c(u,null,v(a.items,l=>(b(),c(`article`,{key:l.id,class:n([`directory-card`,{"is-installed":l.installed}]),onClick:e=>a.openDetail(l)},[e(`div`,ot,[e(`span`,st,`/`+i(l.slug),1),l.installed?(b(),c(`span`,{key:0,class:`directory-card-action is-installed`,title:a.$t(`skill.directory.installed`)},[o(E,{size:16,"aria-hidden":`true`,focusable:`false`})],8,ct)):l.installable&&!a.canInstallOnSurface(l)?(b(),c(`span`,{key:1,class:`directory-card-locked`,title:a.$t(`skill.directory.surfaceBlocked`,{platforms:a.surfaceLabels(l)})},[o(D,{size:16,"aria-hidden":`true`,focusable:`false`})],8,lt)):l.installable?(b(),c(`button`,{key:2,class:`directory-card-action`,"aria-label":a.$t(`skill.directory.install`),title:a.$t(`skill.directory.install`),onClick:t(e=>a.onInstall(l),[`stop`])},[o(O,{size:16,"aria-hidden":`true`,focusable:`false`})],8,ut)):(b(),c(`span`,{key:3,class:`directory-card-locked`,title:l.license},[o(D,{size:16,"aria-hidden":`true`,focusable:`false`})],8,dt))]),e(`div`,ft,[e(`span`,pt,i(l.publisher),1),l.install_count>0?(b(),c(`span`,mt,[o(k,{size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(a.formatCount(l.install_count)),1)])):s(``,!0),a.surfaceLabels(l)?(b(),c(`span`,{key:1,class:`directory-card-surface`,title:a.$t(`skill.directory.surfaceHint`)},i(a.surfaceLabels(l)),9,ht)):s(``,!0)]),e(`p`,gt,i(l.description),1)],10,at))),128))]))])),[[L,a.loading]]),a.total>a.pageSize?(b(),c(`footer`,_t,[o(A,{"current-page":a.currentPage,"page-size":a.pageSize,total:a.total,"pager-count":5,background:``,layout:`prev, pager, next, total`,onCurrentChange:a.onPageChange},null,8,[`current-page`,`page-size`,`total`,`onCurrentChange`])])):s(``,!0)],64))])])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`show-close`,`onOpen`])}var kt=W(Ye,[[`render`,Ot],[`__scopeId`,`data-v-f92774c8`]]);Y.registerLanguage(`bash`,Ne),Y.registerLanguage(`css`,Fe),Y.registerLanguage(`go`,Me),Y.registerLanguage(`javascript`,Te),Y.registerLanguage(`json`,Oe),Y.registerLanguage(`markdown`,De),Y.registerLanguage(`python`,Le),Y.registerLanguage(`rust`,ke),Y.registerLanguage(`shell`,Ae),Y.registerLanguage(`sql`,Pe),Y.registerLanguage(`typescript`,je),Y.registerLanguage(`xml`,Ie),Y.registerLanguage(`html`,Ie),Y.registerLanguage(`yaml`,Ee),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 At(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 jt(e){let t=(e.split(`.`).pop()||``).toLowerCase();return Y.getLanguage(t)?t:`plain`}var Mt=x({name:`SkillFilePreview`,components:{ElButton:J,ElTooltip:E,ElTabs:w,ElTabPane:T,CodeIcon:ne,CopyIcon:R,FileIcon:z,SaveIcon:Ue,ViewIcon:ie,WarningIcon:fe,VueMarkdown:ze},directives:{loading:G},props:{skillId:{type:String,required:!0},path:{type:String,required:!0},editable:{type:Boolean,default:!1}},emits:[`save`],data(){return{MAX_PREVIEW_BYTES:$,loading:!1,error:``,contentType:``,size:0,textContent:``,imageUrl:``,truncated:!1,viewMode:`rendered`,dirty:!1,saving:!1}},computed:{kind(){return this.path?At(this.path,this.contentType):`text`},canRender(){return this.kind===`markdown`||this.kind===`html`},hljsLang(){return`language-${jt(this.path)}`},truncatedText(){return this.textContent}},watch:{path:{handler(){this.fetch()},immediate:!0}},beforeUnmount(){this.imageUrl&&URL.revokeObjectURL(this.imageUrl)},methods:{humanSize(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(2)} MB`},async fetch(){if(this.path){this.loading=!0,this.error=``,this.textContent=``,this.truncated=!1,this.dirty=!1,this.imageUrl&&=(URL.revokeObjectURL(this.imageUrl),``);try{let{blob:e,contentType:t}=await Z.fetchFile(this.skillId,this.path);this.contentType=t,this.size=e.size;let n=At(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),K.success(this.$t(`skill.preview.copied`))}catch{K.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}}}}),Nt={class:`preview-root`},Pt={class:`toolbar`},Ft={class:`path-display`},It={key:0,class:`size-display`},Lt={class:`body`},Rt={key:0,class:`error`},zt=[`srcdoc`],Bt={key:3,class:`image-pane`},Vt=[`src`,`alt`],Ht={key:4,class:`binary`},Ut=[`placeholder`],Wt={key:6,class:`source-pane`},Gt={key:7,class:`truncated-warning`};function Kt(t,a,l,u,_,v){let y=d(`save-icon`),x=d(`el-button`),S=d(`copy-icon`),C=d(`el-tooltip`),w=d(`view-icon`),T=d(`el-tab-pane`),E=d(`code-icon`),D=d(`el-tabs`),O=d(`warning-icon`),k=d(`vue-markdown`),A=d(`file-icon`),j=g(`loading`);return p((b(),c(`div`,Nt,[e(`div`,Pt,[e(`span`,Ft,i(t.path||`—`),1),t.size?(b(),c(`span`,It,i(t.humanSize(t.size)),1)):s(``,!0),a[3]||=e(`span`,{class:`toolbar-spacer`},null,-1),t.editable?(b(),m(x,{key:1,type:`primary`,size:`small`,disabled:!t.dirty||t.saving,loading:t.saving,onClick:t.onSave},{default:h(()=>[o(y,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.button.save`)),1)]),_:1},8,[`disabled`,`loading`,`onClick`])):s(``,!0),o(C,{content:t.$t(`skill.preview.copy`),placement:`bottom`},{default:h(()=>[o(x,{size:`small`,circle:``,disabled:!t.textContent,"aria-label":t.$t(`skill.preview.copy`),title:t.$t(`skill.preview.copy`),onClick:t.onCopy},{default:h(()=>[o(S,{size:16,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`disabled`,`aria-label`,`title`,`onClick`])]),_:1},8,[`content`])]),t.canRender?(b(),m(D,{key:0,modelValue:t.viewMode,"onUpdate:modelValue":a[0]||=e=>t.viewMode=e,class:`view-tabs`},{default:h(()=>[o(T,{name:`rendered`},{label:h(()=>[o(w,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.preview.viewRendered`)),1)]),_:1}),o(T,{name:`source`},{label:h(()=>[o(E,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.preview.viewSource`)),1)]),_:1})]),_:1},8,[`modelValue`])):s(``,!0),e(`div`,Lt,[t.error?(b(),c(`div`,Rt,[o(O,{class:`mr-2`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.error),1)])):t.kind===`markdown`&&t.viewMode===`rendered`?(b(),m(k,{key:1,class:`markdown-rendered`,source:t.textContent,sanitize:``},null,8,[`source`])):t.kind===`html`&&t.viewMode===`rendered`?(b(),c(`iframe`,{key:2,ref:`htmlFrame`,class:`html-frame`,sandbox:``,srcdoc:t.textContent},null,8,zt)):t.kind===`image`?(b(),c(`div`,Bt,[e(`img`,{src:t.imageUrl,alt:t.path,class:`image-content`},null,8,Vt)])):t.kind===`binary`?(b(),c(`div`,Ht,[o(A,{class:`binary-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,null,i(t.$t(`skill.preview.binary`,{type:t.contentType})),1)])):t.editable?p((b(),c(`textarea`,{key:5,"onUpdate:modelValue":a[1]||=e=>t.textContent=e,class:`source-editor`,spellcheck:`false`,placeholder:t.$t(`skill.placeholder.content`),onInput:a[2]||=e=>t.dirty=!0},null,40,Ut)),[[f,t.textContent]]):(b(),c(`pre`,Wt,[e(`code`,{ref:`codeEl`,class:n(t.hljsLang)},i(t.truncatedText),3)])),t.truncated?(b(),c(`p`,Gt,i(t.$t(`skill.preview.truncated`,{size:t.humanSize(t.MAX_PREVIEW_BYTES)})),1)):s(``,!0)])])),[[j,t.loading]])}var qt=W(Mt,[[`render`,Kt],[`__scopeId`,`data-v-ec0a447e`]]),Jt=new Set([`py`,`ts`,`tsx`,`js`,`jsx`,`json`,`yaml`,`yml`,`sh`,`bash`,`zsh`,`css`,`html`,`sql`,`go`,`rs`,`rb`,`java`,`cpp`,`c`,`h`,`toml`]),Yt=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`]);function Xt(e){let t=e.split(`/`).pop()||e,n=(t.split(`.`).pop()||``).toLowerCase();return t===`SKILL.md`?P:n===`md`?ae:Yt.has(n)?oe:Jt.has(n)?He:z}function Zt(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 Qt=x({name:`FileNode`,components:{ExpandDownIcon:F,ExpandRightIcon:I,FontAwesomeIcon:Re},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?Xt(e.path):B},onClick(){this.node.isLeaf?this.$emit(`select-file`,this.node.path):this.open=!this.open}}}),$t=[`aria-label`,`title`],en={key:1,class:`node-chevron-spacer`},tn={class:`node-label`},nn={key:0,class:`children`};function rn(r,a,o,l,f,p){let h=d(`expand-down-icon`),g=d(`expand-right-icon`),x=d(`font-awesome-icon`),S=d(`file-node`,!0);return b(),c(`li`,null,[e(`div`,{class:n([`file-node`,{active:r.isActive}]),style:_({paddingLeft:r.indent+`px`}),onClick:a[1]||=(...e)=>r.onClick&&r.onClick(...e)},[r.node.isLeaf?(b(),c(`span`,en)):(b(),c(`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?(b(),m(h,{key:0,size:14,"aria-hidden":`true`,focusable:`false`})):(b(),m(g,{key:1,size:14,"aria-hidden":`true`,focusable:`false`}))],8,$t)),r.isHtmlFile(r.node)?(b(),m(x,{key:2,icon:`fa-brands fa-html5`,class:`node-icon`})):(b(),m(y(r.iconFor(r.node)),{key:3,class:`node-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,tn,i(r.node.label),1)],6),!r.node.isLeaf&&r.open?(b(),c(`ul`,nn,[(b(!0),c(u,null,v(r.node.children||[],e=>(b(),m(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))])):s(``,!0)])}var an=x({name:`SkillRow`,components:{ExpandDownIcon:F,ExpandRightIcon:I,SkillIcon:ce,FileNode:W(Qt,[[`render`,rn],[`__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 Zt(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)}}}),on={class:`skill-row-wrapper`},sn=[`aria-label`,`title`],cn={key:1,class:`row-chevron-spacer`},ln=[`title`],un={key:0,class:`file-list`};function dn(r,a,l,f,p,h){let g=d(`expand-down-icon`),_=d(`expand-right-icon`),y=d(`skill-icon`),x=d(`file-node`);return b(),c(`li`,on,[e(`div`,{class:n([`skill-row`,{active:r.isSkillSelected}]),onClick:a[1]||=e=>r.$emit(`select-skill`,r.skill)},[r.hasChildren?(b(),c(`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:a[0]||=t(e=>r.$emit(`toggle-expand`,r.skill),[`stop`])},[r.expanded?(b(),m(g,{key:0,size:14,"aria-hidden":`true`,focusable:`false`})):(b(),m(_,{key:1,size:14,"aria-hidden":`true`,focusable:`false`}))],8,sn)):(b(),c(`span`,cn)),o(y,{class:`row-icon`,size:16,"aria-hidden":`true`,focusable:`false`}),e(`span`,{class:`row-label`,title:r.skill.name},i(r.skill.slug),9,ln)],2),r.expanded&&r.hasChildren?(b(),c(`ul`,un,[(b(!0),c(u,null,v(r.tree,e=>(b(),m(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))])):s(``,!0)])}var fn=W(an,[[`render`,dn],[`__scopeId`,`data-v-231c2ce1`]]),pn=10*1024*1024,mn=/\.(tar\.gz|tgz|tar|zip|md)$/i,hn=x({name:`UploadSkillDialog`,components:{ElDialog:H,ElButton:J,AddFileIcon:We,CloudUploadIcon:Ve},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>pn){K.error(this.$t(`skill.message.fileTooLarge`));return}if(!mn.test(e.name)){K.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});K.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,t.id)}else{let{data:e}=await Z.createTarball(this.file);K.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,e.id)}this.$emit(`update:modelValue`,!1)}catch(e){K.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)}))}finally{this.uploading=!1}}}}}),gn={key:0,class:`dropzone-hint`},_n={key:1,class:`dropzone-file`},vn={class:`dropzone-file-name`},yn={class:`dropzone-file-size`},bn={class:`requirements`},xn={class:`requirements-title`};function Sn(a,s,l,u,f,p){let g=d(`add-file-icon`),_=d(`el-button`),v=d(`cloud-upload-icon`),y=d(`el-dialog`);return b(),m(y,{"model-value":a.modelValue,title:a.$t(`skill.dialog.uploadTitle`),width:`520px`,"align-center":``,"close-on-click-modal":!a.uploading,"close-on-press-escape":!a.uploading,"show-close":!a.uploading,"onUpdate:modelValue":a.onVisibleChange,onClosed:a.reset},{footer:h(()=>[o(_,{disabled:a.uploading,onClick:a.onClose},{default:h(()=>[r(i(a.$t(`skill.button.cancel`)),1)]),_:1},8,[`disabled`,`onClick`]),o(_,{type:`primary`,loading:a.uploading,disabled:!a.file,onClick:a.onSubmit},{default:h(()=>[o(v,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(a.$t(`skill.button.create`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])]),default:h(()=>[e(`input`,{ref:`fileInput`,type:`file`,accept:`.tar.gz,.tgz,.tar,.zip,.md,application/gzip,application/zip,application/x-tar,text/markdown`,hidden:``,onChange:s[0]||=(...e)=>a.onFilePicked&&a.onFilePicked(...e)},null,544),e(`div`,{class:n([`dropzone`,{"is-dragging":a.isDragging,"has-file":!!a.file}]),onClick:s[1]||=(...e)=>a.onPickFile&&a.onPickFile(...e),onDragover:s[2]||=t(e=>a.isDragging=!0,[`prevent`]),onDragleave:s[3]||=t(e=>a.isDragging=!1,[`prevent`]),onDrop:s[4]||=t((...e)=>a.onDrop&&a.onDrop(...e),[`prevent`])},[o(g,{class:`dropzone-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),a.file?(b(),c(`p`,_n,[e(`span`,vn,i(a.file.name),1),e(`span`,yn,i(a.humanSize(a.file.size)),1)])):(b(),c(`p`,gn,i(a.$t(`skill.dialog.uploadDrop`)),1))],34),e(`div`,bn,[e(`p`,xn,i(a.$t(`skill.dialog.fileRequirements`)),1),e(`ul`,null,[e(`li`,null,i(a.$t(`skill.dialog.requirementMd`)),1),e(`li`,null,i(a.$t(`skill.dialog.requirementArchive`)),1)])])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`close-on-press-escape`,`show-close`,`onUpdate:modelValue`,`onClosed`])}var Cn=W(hn,[[`render`,Sn],[`__scopeId`,`data-v-3791b97e`]]),wn=x({name:`WriteSkillDialog`,components:{ElDialog:H,ElButton:J,ElInput:he,CloudUploadIcon:Ve},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});K.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,e.id),this.$emit(`update:modelValue`,!1)}catch(e){K.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)}))}finally{this.saving=!1}}}}}),Tn={class:`hint`};function En(t,n,a,s,c,l){let u=d(`el-input`),f=d(`el-button`),p=d(`cloud-upload-icon`),g=d(`el-dialog`);return b(),m(g,{"model-value":t.modelValue,title:t.$t(`skill.dialog.writeTitle`),width:`720px`,"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:h(()=>[o(f,{disabled:t.saving,onClick:t.onClose},{default:h(()=>[r(i(t.$t(`skill.button.cancel`)),1)]),_:1},8,[`disabled`,`onClick`]),o(f,{type:`primary`,loading:t.saving,disabled:!t.content.trim(),onClick:t.onSubmit},{default:h(()=>[o(p,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.button.create`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])]),default:h(()=>[e(`p`,Tn,i(t.$t(`skill.dialog.writeHint`)),1),o(u,{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 Dn=x({name:`UserSkills`,components:{ElSwitch:j,ElTag:ge,ElTooltip:E,ElDropdown:k,ElDropdownMenu:O,ElDropdownItem:D,AddIcon:V,AiCreateIcon:me,CloseIcon:_e,DeleteIcon:de,ExpandDownIcon:F,ExpandRightIcon:I,HelpIcon:ee,MarketplaceIcon:le,MoreIcon:re,SearchIcon:ue,SkillIcon:ce,UploadIcon:pe,WriteIcon:te,BrowseSkillsDialog:kt,SkillFilePreview:qt,SkillRow:fn,UploadSkillDialog:Cn,WriteSkillDialog:W(wn,[[`render`,En],[`__scopeId`,`data-v-019a154c`]])},directives:{loading:G},data(){return{loading:!1,skills:[],togglingId:null,selectedSkillId:``,selectedPath:``,expandedSkillIds:[],personalOpen:!0,globalsOpen:!0,searchOpen:!1,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),K.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)},openSearch(){this.searchOpen=!0,a(()=>{this.$refs.searchInput?.focus()})},closeSearch(){this.searchOpen=!1,this.searchQuery=``},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});K.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){K.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)})),t.reject(e)}},async onDelete(e){try{await we.confirm(this.$t(`skill.message.deleteConfirm`,{slug:e.slug}),this.$t(`skill.button.delete`),{type:`warning`})}catch{return}try{await Z.remove(e.id),K.success(this.$t(`skill.message.deleteSuccess`)),this.selectedSkillId===e.id&&(this.selectedSkillId=``,this.selectedPath=``),await this.fetchSkills()}catch(e){K.error(this.extractError(e))}},async onToggleSkill(e,t){this.togglingId=e.id;try{t?(await Z.enable(e.id),K.success(this.$t(`skill.message.enableSuccess`))):(await Z.disable(e.id),K.success(this.$t(`skill.message.disableSuccess`))),e.enabled=t}catch(e){K.error(this.extractError(e))}finally{this.togglingId=null}}}}),On={class:`page-shell`},kn={class:`page-heading`},An={class:`page-title`},jn={class:`page-subtitle`},Mn={class:`skills-shell`},Nn={class:`left-pane`},Pn={class:`left-header`},Fn={class:`left-actions`},In=[`aria-label`,`title`],Ln=[`aria-label`,`title`],Rn={class:`submenu-trigger`},zn={class:`badge-soon`},Bn={key:0,class:`search-row`},Vn=[`placeholder`],Hn=[`aria-label`,`title`],Un={class:`left-body`},Wn={class:`section`},Gn={key:0,class:`skill-list`},Kn={key:0,class:`empty-row`},qn={key:0,class:`section`},Jn={key:0,class:`skill-list`},Yn={class:`right-pane`},Xn={class:`right-header`},Zn={class:`right-title`},Qn={class:`right-actions`},$n=[`aria-label`,`title`],er={class:`meta-card`},tr={class:`meta-grid`},nr={class:`meta-cell`},rr={class:`meta-label`},ir={class:`meta-value`},ar={class:`meta-cell`},or={class:`meta-label`},sr={class:`meta-value`},cr={key:0,class:`meta-cell`},lr={class:`meta-label`},ur={class:`meta-tags`},dr={key:0,class:`meta-description`},fr={class:`meta-description-label`},pr={class:`meta-label`},mr={class:`preview-card`},hr={key:2,class:`right-empty`};function gr(t,n,a,_,y,x){let S=d(`search-icon`),C=d(`add-icon`),w=d(`marketplace-icon`),T=d(`el-dropdown-item`),E=d(`expand-right-icon`),D=d(`ai-create-icon`),O=d(`write-icon`),k=d(`upload-icon`),A=d(`el-dropdown-menu`),j=d(`el-dropdown`),M=d(`close-icon`),N=d(`expand-down-icon`),P=d(`skill-row`),F=d(`el-switch`),I=d(`more-icon`),L=d(`delete-icon`),ee=d(`el-tag`),te=d(`help-icon`),ne=d(`el-tooltip`),R=d(`skill-file-preview`),re=d(`skill-icon`),ie=d(`upload-skill-dialog`),ae=d(`write-skill-dialog`),z=d(`browse-skills-dialog`),B=g(`loading`);return b(),c(`div`,On,[e(`div`,kn,[e(`h2`,An,i(t.$t(`skill.title.skills`)),1),e(`p`,jn,i(t.$t(`skill.message.pageDescription`)),1)]),e(`div`,Mn,[e(`aside`,Nn,[e(`header`,Pn,[e(`div`,Fn,[t.searchOpen?s(``,!0):(b(),c(`button`,{key:0,class:`icon-btn`,"aria-label":t.$t(`skill.button.search`),title:t.$t(`skill.button.search`),onClick:n[0]||=(...e)=>t.openSearch&&t.openSearch(...e)},[o(S,{size:16,"aria-hidden":`true`,focusable:`false`})],8,In)),o(j,{trigger:`click`,placement:`bottom-end`,"hide-on-click":!1},{dropdown:h(()=>[o(A,{class:`add-menu`},{default:h(()=>[o(T,{onClick:t.onBrowse},{default:h(()=>[o(w,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.browse`)),1)]),_:1},8,[`onClick`]),o(T,{divided:``},{default:h(()=>[o(j,{trigger:`hover`,placement:`left-start`,"hide-on-click":!0},{dropdown:h(()=>[o(A,{class:`add-menu`},{default:h(()=>[o(T,{disabled:``},{default:h(()=>[o(D,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.createWithClaude`))+` `,1),e(`span`,zn,i(t.$t(`skill.menu.soon`)),1)]),_:1}),o(T,{onClick:t.openWrite},{default:h(()=>[o(O,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.write`)),1)]),_:1},8,[`onClick`]),o(T,{onClick:t.openUpload},{default:h(()=>[o(k,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.upload`)),1)]),_:1},8,[`onClick`])]),_:1})]),default:h(()=>[e(`span`,Rn,[o(C,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.create`))+` `,1),o(E,{class:`submenu-arrow`,size:14,"aria-hidden":`true`,focusable:`false`})])]),_:1})]),_:1})]),_:1})]),default:h(()=>[e(`button`,{class:`icon-btn`,"aria-label":t.$t(`skill.button.add`),title:t.$t(`skill.button.add`)},[o(C,{size:16,"aria-hidden":`true`,focusable:`false`})],8,Ln)]),_:1})])]),t.searchOpen?(b(),c(`div`,Bn,[o(S,{class:`search-icon`,size:13,"aria-hidden":`true`,focusable:`false`}),p(e(`input`,{ref:`searchInput`,"onUpdate:modelValue":n[1]||=e=>t.searchQuery=e,class:`search-input`,placeholder:t.$t(`skill.placeholder.search`),onKeydown:n[2]||=l((...e)=>t.closeSearch&&t.closeSearch(...e),[`escape`])},null,40,Vn),[[f,t.searchQuery]]),e(`button`,{class:`icon-btn icon-btn-sm`,"aria-label":t.$t(`common.button.close`),title:t.$t(`common.button.close`),onClick:n[3]||=(...e)=>t.closeSearch&&t.closeSearch(...e)},[o(M,{size:14,"aria-hidden":`true`,focusable:`false`})],8,Hn)])):s(``,!0),p((b(),c(`div`,Un,[e(`section`,Wn,[e(`button`,{class:`section-header`,onClick:n[4]||=e=>t.personalOpen=!t.personalOpen},[t.personalOpen?(b(),m(N,{key:0,class:`section-chevron`,size:12,"aria-hidden":`true`,focusable:`false`})):(b(),m(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?(b(),c(`ul`,Gn,[!t.loading&&t.filteredPersonal.length===0?(b(),c(`li`,Kn,i(t.searchQuery?t.$t(`skill.empty.search`):t.$t(`skill.message.noSkills`)),1)):s(``,!0),(b(!0),c(u,null,v(t.filteredPersonal,e=>(b(),m(P,{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))])):s(``,!0)]),t.globalSkills.length>0?(b(),c(`section`,qn,[e(`button`,{class:`section-header`,onClick:n[5]||=e=>t.globalsOpen=!t.globalsOpen},[t.globalsOpen?(b(),m(N,{key:0,class:`section-chevron`,size:12,"aria-hidden":`true`,focusable:`false`})):(b(),m(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?(b(),c(`ul`,Jn,[(b(!0),c(u,null,v(t.filteredGlobal,e=>(b(),m(P,{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))])):s(``,!0)])):s(``,!0)])),[[B,t.loading]])]),e(`main`,Yn,[t.selectedSkill&&!t.selectedPath?(b(),c(u,{key:0},[e(`header`,Xn,[e(`h3`,Zn,i(t.selectedSkill.slug),1),e(`div`,Qn,[o(F,{"model-value":t.selectedSkill.enabled,size:`default`,loading:t.togglingId===t.selectedSkill.id,onChange:n[6]||=e=>t.onToggleSkill(t.selectedSkill,!!e)},null,8,[`model-value`,`loading`]),t.selectedSkill.source===`global`?s(``,!0):(b(),m(j,{key:0,trigger:`click`,placement:`bottom-end`},{dropdown:h(()=>[o(A,null,{default:h(()=>[o(T,{onClick:n[7]||=e=>t.onDelete(t.selectedSkill)},{default:h(()=>[o(L,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.button.delete`)),1)]),_:1})]),_:1})]),default:h(()=>[e(`button`,{class:`icon-btn`,"aria-label":t.$t(`skill.button.more`),title:t.$t(`skill.button.more`)},[o(I,{size:16,"aria-hidden":`true`,focusable:`false`})],8,$n)]),_:1}))])]),e(`div`,er,[e(`div`,tr,[e(`div`,nr,[e(`span`,rr,i(t.$t(`skill.meta.addedBy`)),1),e(`span`,ir,i(t.selectedSkill.source===`global`?t.$t(`skill.meta.platform`):t.$t(`skill.meta.you`)),1)]),e(`div`,ar,[e(`span`,or,i(t.$t(`skill.meta.lastUpdated`)),1),e(`span`,sr,i(t.$dayjs.format(t.selectedSkill.updated_at)),1)]),t.selectedSkill.required_connections.length?(b(),c(`div`,cr,[e(`span`,lr,i(t.$t(`skill.field.requiredConnections`)),1),e(`div`,ur,[(b(!0),c(u,null,v(t.selectedSkill.required_connections,e=>(b(),m(ee,{key:e,size:`small`,type:`info`},{default:h(()=>[r(i(e),1)]),_:2},1024))),128))])])):s(``,!0)]),t.selectedSkill.description?(b(),c(`div`,dr,[e(`div`,fr,[e(`span`,pr,i(t.$t(`skill.field.description`)),1),t.selectedSkill.when_to_use?(b(),m(ne,{key:0,content:t.selectedSkill.when_to_use,placement:`top`},{default:h(()=>[o(te,{class:`meta-info-icon`,size:12,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`content`])):s(``,!0)]),e(`p`,null,i(t.selectedSkill.description),1)])):s(``,!0)]),e(`div`,mr,[(b(),m(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?(b(),m(R,{key:`${t.selectedSkill.id}:${t.selectedPath}`,"skill-id":t.selectedSkill.id,path:t.selectedPath,editable:!1},null,8,[`skill-id`,`path`])):(b(),c(`div`,hr,[o(re,{class:`right-empty-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,null,i(t.$t(`skill.preview.selectSkill`)),1)]))])]),o(ie,{modelValue:t.uploadVisible,"onUpdate:modelValue":n[8]||=e=>t.uploadVisible=e,onCreated:t.onCreated},null,8,[`modelValue`,`onCreated`]),o(ae,{modelValue:t.writeVisible,"onUpdate:modelValue":n[9]||=e=>t.writeVisible=e,onCreated:t.onCreated},null,8,[`modelValue`,`onCreated`]),o(z,{modelValue:t.browseVisible,"onUpdate:modelValue":n[10]||=e=>t.browseVisible=e,onInstalled:t.onCreated},null,8,[`modelValue`,`onInstalled`])])}var _r=W(Dn,[[`render`,gr],[`__scopeId`,`data-v-c7fa7f3d`]]);export{_r 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,K as a,L as o,M as s,N as c,S as l,T as u,at as d,b as f,ht as p,j as m,mt as h,ot as g,qt as _,rt as v,st as y,tt as b,z as x}from"./vendor-chart-Dw-P17PN.js";import{r as S,t as C}from"./select-B7IfMuZe.js";import{n as w,t as T}from"./tabs-XtJ6HVTZ.js";import{t as E}from"./tooltip-BkfE-OPy.js";import{n as D,r as O,t as k}from"./dropdown-BASe4ViA.js";import{t as A}from"./pagination-CXScSdv0.js";import{t as j}from"./switch-m7gZYlt1.js";import{t as M}from"./arrow-down-ByenpoOk.js";import{t as N}from"./arrow-left-6Gbfplsf.js";import{t as P}from"./book-open-BTQekRjx.js";import{t as F}from"./chevron-down-B9RRCvEa.js";import{t as I}from"./chevron-right-cCbt5Rkn.js";import{t as L}from"./circle-check-CK7cuz8n.js";import{t as ee}from"./circle-question-mark-DnuyJRms.js";import{t as te}from"./clipboard-list-B_L2YTdy.js";import{t as ne}from"./code-t-uzKAiF.js";import{t as R}from"./copy-C3Aaq69s.js";import{t as re}from"./ellipsis-DtUkvzD4.js";import{t as ie}from"./eye-sWiwDp4s.js";import{t as ae}from"./file-text-CX86lGdb.js";import{t as z}from"./file-DqjtGTjU.js";import{t as B}from"./folder-BzcEViUd.js";import{t as oe}from"./image-C170-MUT.js";import{t as se}from"./lock-BaeClC1s.js";import{t as V}from"./plus-CYyW1TrL.js";import{n as ce,t as le}from"./store-acoIu5QJ.js";import{t as ue}from"./search-NlWryXFy.js";import{t as de}from"./trash-2-DkaBo9Es.js";import{t as fe}from"./triangle-alert-20nV5f9K.js";import{t as pe}from"./upload-C9j6ilon.js";import{t as me}from"./wand-sparkles-DMJRJli7.js";import{Ai as H,Ci as U,E as W,Ei as G,Ji as he,Li as ge,Si as _e,Ti as K,bi as ve,fi as ye,gi as be,gr as q,hi as xe,mi as Se,ui as Ce,wi as we,zi as J}from"./index-Epdiy8xX.js";import{a as Te,c as Ee,d as De,f as Oe,i as ke,l as Ae,m as Y,n as je,o as Me,p as Ne,r as Pe,s as Fe,t as Ie,u as Le}from"./vendor-highlight-BHrfT4-E.js";import{t as Re}from"./index.es-k2CvzvlS.js";import{t as ze}from"./VueMarkdown-CiiRjbWs.js";var Be=U(`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`}]]),Ve=U(`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`}]]),He=U(`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`}]]),Ue=U(`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`}]]),We=U(`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:`${Ce()}/api/v1`}),Z=new class{key=`skills/installed`;async list(){return q.get(`/${this.key}/`,X())}async get(e){return q.get(`/${this.key}/${e}/`,X())}async createMarkdown(e){return q.post(`/${this.key}/`,e,X())}async createTarball(e){let t=new FormData;return t.append(`tarball`,e),q.post(`/${this.key}/`,t,{...X(),headers:{"Content-Type":`multipart/form-data`}})}async update(e,t){return q.patch(`/${this.key}/${e}/`,t,X())}async remove(e){return q.delete(`/${this.key}/${e}/`,X())}async enable(e){return q.post(`/${this.key}/${e}/enable/`,void 0,X())}async disable(e){return q.post(`/${this.key}/${e}/disable/`,void 0,X())}async fetchFile(e,t){let n=await q.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 q.get(`/${this.key}/`,{...X(),params:e})}async get(e){return q.get(`/${this.key}/${e}/`,X())}async categories(){return q.get(`/${this.key}/categories/`,X())}async install(e,t={}){return q.post(`/${this.key}/${e}/install/`,t,X())}};function Ge(){let e=new Set;xe()&&e.add(`desktop`),be()&&e.add(`ios`),Se()&&e.add(`android`),ve()&&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;!be()&&!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 Ke=new Set([`mac`,`windows`,`desktop`,`web`,`ios`,`android`]);function qe(e){let t=e.filter(e=>Ke.has(e));if(!t.length)return!0;let n=Ge();return t.some(e=>n.has(e))}Y.registerLanguage(`bash`,Ne),Y.registerLanguage(`json`,Oe),Y.registerLanguage(`markdown`,De),Y.registerLanguage(`python`,Le),Y.registerLanguage(`shell`,Ae),Y.registerLanguage(`yaml`,Ee),Y.registerAliases([`yml`],{languageName:`yaml`}),Y.registerAliases([`py`],{languageName:`python`}),Y.registerAliases([`sh`,`zsh`],{languageName:`bash`});var Je=12,Ye=x({name:`BrowseSkillsDialog`,components:{VueMarkdown:ze,ElDialog:H,ElButton:J,ElPagination:A,ElSelect:S,ElOption:C,FontAwesomeIcon:Re,AddIcon:V,BackIcon:N,DownIcon:M,InstallIcon:Be,LockIcon:se,SearchIcon:ue,SuccessIcon:L},directives:{loading:G},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 Je},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),K.error(this.$t(`skill.directory.loadFailed`))}finally{this.loading=!1}},async onInstall(e){if(!this.installing&&!e.installed){if(!this.canInstallOnSurface(e)){K.warning(this.$t(`skill.directory.surfaceBlocked`,{platforms:this.surfaceLabels(e)}));return}this.installing=!0;try{let{data:t}=await Q.install(e.id);K.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,K.warning(this.$t(`skill.directory.alreadyInstalled`,{name:e.slug}))):K.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 qe(this.restrictedSurfaces(e))}}}),Xe={class:`directory`},Ze={class:`directory-main`},Qe={class:`directory-header`},$e={class:`directory-search`},et=[`placeholder`],tt={class:`directory-controls`},nt={class:`directory-grid-wrapper`},rt={key:0,class:`directory-empty`},it={key:1,class:`directory-grid`},at=[`onClick`],ot={class:`directory-card-head`},st={class:`directory-card-title`},ct=[`title`],lt=[`title`],ut=[`aria-label`,`title`,`onClick`],dt=[`title`],ft={class:`directory-card-meta`},pt={class:`directory-card-publisher`},mt={key:0,class:`directory-card-count`},ht=[`title`],gt={class:`directory-card-desc`},_t={key:0,class:`directory-footer`},vt={class:`directory-detail-head`},yt={class:`directory-detail-actions`},bt=[`href`],xt={class:`directory-detail-body`},St={class:`directory-detail-title`},Ct={class:`directory-detail-meta`},wt={key:0},Tt={key:1},Et=[`title`],Dt={class:`directory-detail-desc`};function Ot(a,l,_,y,x,S){let C=d(`search-icon`),w=d(`el-option`),T=d(`el-select`),E=d(`success-icon`),D=d(`lock-icon`),O=d(`add-icon`),k=d(`down-icon`),A=d(`el-pagination`),j=d(`back-icon`),M=d(`font-awesome-icon`),N=d(`el-button`),P=d(`install-icon`),F=d(`vue-markdown`),I=d(`el-dialog`),L=g(`loading`);return b(),m(I,{"model-value":a.modelValue,title:a.$t(`skill.dialog.directoryTitle`),width:`960px`,"align-center":``,class:`directory-dialog`,"close-on-click-modal":!a.installing,"show-close":!a.installing,"onUpdate:modelValue":l[6]||=e=>a.$emit(`update:modelValue`,e),onOpen:a.onOpen},{default:h(()=>[e(`div`,Xe,[e(`main`,Ze,[a.selectedItem?(b(),c(u,{key:1},[e(`header`,vt,[e(`button`,{class:`directory-back-btn`,onClick:l[4]||=e=>a.selectedItem=null},[o(j,{size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(a.$t(`skill.directory.back`)),1)]),e(`div`,yt,[a.selectedItem.source_url?(b(),c(`a`,{key:0,href:a.selectedItem.source_url,target:`_blank`,class:`directory-link`},[o(M,{icon:`fa-brands fa-github`}),r(` `+i(a.$t(`skill.directory.viewSource`)),1)],8,bt)):s(``,!0),a.selectedItem.installed?(b(),m(N,{key:1,disabled:``,type:`success`,plain:``},{default:h(()=>[o(E,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(a.$t(`skill.directory.installed`)),1)]),_:1})):a.selectedItem.installable&&!a.canInstallOnSurface(a.selectedItem)?(b(),m(N,{key:2,disabled:``,title:a.$t(`skill.directory.surfaceBlocked`,{platforms:a.surfaceLabels(a.selectedItem)})},{default:h(()=>[o(D,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(a.$t(`skill.directory.surfaceUnavailable`)),1)]),_:1},8,[`title`])):a.selectedItem.installable?(b(),m(N,{key:3,type:`primary`,loading:a.installing,onClick:l[5]||=e=>a.onInstall(a.selectedItem)},{default:h(()=>[o(P,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(a.$t(`skill.directory.install`)),1)]),_:1},8,[`loading`])):(b(),m(N,{key:4,disabled:``,title:a.selectedItem.license},{default:h(()=>[o(D,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(a.selectedItem.license||a.$t(`skill.directory.notInstallable`)),1)]),_:1},8,[`title`]))])]),e(`div`,xt,[e(`h2`,St,`/`+i(a.selectedItem.slug),1),e(`div`,Ct,[e(`span`,null,[e(`strong`,null,i(a.$t(`skill.meta.addedBy`))+`:`,1),r(` `+i(a.selectedItem.publisher),1)]),a.selectedItem.license?(b(),c(`span`,wt,[e(`strong`,null,i(a.$t(`skill.directory.license`))+`:`,1),r(` `+i(a.selectedItem.license),1)])):s(``,!0),a.selectedItem.version?(b(),c(`span`,Tt,`v`+i(a.selectedItem.version),1)):s(``,!0),a.surfaceLabels(a.selectedItem)?(b(),c(`span`,{key:2,class:`directory-detail-surface`,title:a.$t(`skill.directory.surfaceHint`)},i(a.$t(`skill.directory.surfaceOnly`,{platforms:a.surfaceLabels(a.selectedItem)})),9,Et)):s(``,!0)]),e(`p`,Dt,i(a.selectedItem.description),1),o(F,{class:`directory-detail-content`,source:a.detailBody,sanitize:``},null,8,[`source`])])],64)):(b(),c(u,{key:0},[e(`header`,Qe,[e(`div`,$e,[o(C,{class:`directory-search-icon`,size:16,"aria-hidden":`true`,focusable:`false`}),p(e(`input`,{"onUpdate:modelValue":l[0]||=e=>a.searchQuery=e,class:`directory-search-input`,placeholder:a.$t(`skill.directory.searchPlaceholder`),onInput:l[1]||=(...e)=>a.onSearchInput&&a.onSearchInput(...e)},null,40,et),[[f,a.searchQuery]])]),e(`div`,tt,[o(T,{modelValue:a.namespaceFilter,"onUpdate:modelValue":l[2]||=e=>a.namespaceFilter=e,class:`directory-select`,placeholder:a.$t(`skill.directory.allPublishers`),clearable:``,size:`default`,onChange:a.reloadFromFirstPage},{default:h(()=>[(b(!0),c(u,null,v(a.namespaceOptions,e=>(b(),m(w,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`onChange`]),o(T,{modelValue:a.sortBy,"onUpdate:modelValue":l[3]||=e=>a.sortBy=e,class:`directory-select directory-select-sm`,size:`default`,onChange:a.reloadFromFirstPage},{default:h(()=>[o(w,{label:a.$t(`skill.directory.sort.popular`),value:`popular`},null,8,[`label`]),o(w,{label:a.$t(`skill.directory.sort.recent`),value:`recent`},null,8,[`label`]),o(w,{label:a.$t(`skill.directory.sort.name`),value:`name`},null,8,[`label`])]),_:1},8,[`modelValue`,`onChange`])])]),p((b(),c(`div`,nt,[!a.loading&&a.total===0?(b(),c(`p`,rt,i(a.$t(`skill.directory.empty`)),1)):(b(),c(`div`,it,[(b(!0),c(u,null,v(a.items,l=>(b(),c(`article`,{key:l.id,class:n([`directory-card`,{"is-installed":l.installed}]),onClick:e=>a.openDetail(l)},[e(`div`,ot,[e(`span`,st,`/`+i(l.slug),1),l.installed?(b(),c(`span`,{key:0,class:`directory-card-action is-installed`,title:a.$t(`skill.directory.installed`)},[o(E,{size:16,"aria-hidden":`true`,focusable:`false`})],8,ct)):l.installable&&!a.canInstallOnSurface(l)?(b(),c(`span`,{key:1,class:`directory-card-locked`,title:a.$t(`skill.directory.surfaceBlocked`,{platforms:a.surfaceLabels(l)})},[o(D,{size:16,"aria-hidden":`true`,focusable:`false`})],8,lt)):l.installable?(b(),c(`button`,{key:2,class:`directory-card-action`,"aria-label":a.$t(`skill.directory.install`),title:a.$t(`skill.directory.install`),onClick:t(e=>a.onInstall(l),[`stop`])},[o(O,{size:16,"aria-hidden":`true`,focusable:`false`})],8,ut)):(b(),c(`span`,{key:3,class:`directory-card-locked`,title:l.license},[o(D,{size:16,"aria-hidden":`true`,focusable:`false`})],8,dt))]),e(`div`,ft,[e(`span`,pt,i(l.publisher),1),l.install_count>0?(b(),c(`span`,mt,[o(k,{size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(a.formatCount(l.install_count)),1)])):s(``,!0),a.surfaceLabels(l)?(b(),c(`span`,{key:1,class:`directory-card-surface`,title:a.$t(`skill.directory.surfaceHint`)},i(a.surfaceLabels(l)),9,ht)):s(``,!0)]),e(`p`,gt,i(l.description),1)],10,at))),128))]))])),[[L,a.loading]]),a.total>a.pageSize?(b(),c(`footer`,_t,[o(A,{"current-page":a.currentPage,"page-size":a.pageSize,total:a.total,"pager-count":5,background:``,layout:`prev, pager, next, total`,onCurrentChange:a.onPageChange},null,8,[`current-page`,`page-size`,`total`,`onCurrentChange`])])):s(``,!0)],64))])])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`show-close`,`onOpen`])}var kt=W(Ye,[[`render`,Ot],[`__scopeId`,`data-v-f92774c8`]]);Y.registerLanguage(`bash`,Ne),Y.registerLanguage(`css`,Fe),Y.registerLanguage(`go`,Me),Y.registerLanguage(`javascript`,Te),Y.registerLanguage(`json`,Oe),Y.registerLanguage(`markdown`,De),Y.registerLanguage(`python`,Le),Y.registerLanguage(`rust`,ke),Y.registerLanguage(`shell`,Ae),Y.registerLanguage(`sql`,Pe),Y.registerLanguage(`typescript`,je),Y.registerLanguage(`xml`,Ie),Y.registerLanguage(`html`,Ie),Y.registerLanguage(`yaml`,Ee),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 At(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 jt(e){let t=(e.split(`.`).pop()||``).toLowerCase();return Y.getLanguage(t)?t:`plain`}var Mt=x({name:`SkillFilePreview`,components:{ElButton:J,ElTooltip:E,ElTabs:w,ElTabPane:T,CodeIcon:ne,CopyIcon:R,FileIcon:z,SaveIcon:Ue,ViewIcon:ie,WarningIcon:fe,VueMarkdown:ze},directives:{loading:G},props:{skillId:{type:String,required:!0},path:{type:String,required:!0},editable:{type:Boolean,default:!1}},emits:[`save`],data(){return{MAX_PREVIEW_BYTES:$,loading:!1,error:``,contentType:``,size:0,textContent:``,imageUrl:``,truncated:!1,viewMode:`rendered`,dirty:!1,saving:!1}},computed:{kind(){return this.path?At(this.path,this.contentType):`text`},canRender(){return this.kind===`markdown`||this.kind===`html`},hljsLang(){return`language-${jt(this.path)}`},truncatedText(){return this.textContent}},watch:{path:{handler(){this.fetch()},immediate:!0}},beforeUnmount(){this.imageUrl&&URL.revokeObjectURL(this.imageUrl)},methods:{humanSize(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(2)} MB`},async fetch(){if(this.path){this.loading=!0,this.error=``,this.textContent=``,this.truncated=!1,this.dirty=!1,this.imageUrl&&=(URL.revokeObjectURL(this.imageUrl),``);try{let{blob:e,contentType:t}=await Z.fetchFile(this.skillId,this.path);this.contentType=t,this.size=e.size;let n=At(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),K.success(this.$t(`skill.preview.copied`))}catch{K.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}}}}),Nt={class:`preview-root`},Pt={class:`toolbar`},Ft={class:`path-display`},It={key:0,class:`size-display`},Lt={class:`body`},Rt={key:0,class:`error`},zt=[`srcdoc`],Bt={key:3,class:`image-pane`},Vt=[`src`,`alt`],Ht={key:4,class:`binary`},Ut=[`placeholder`],Wt={key:6,class:`source-pane`},Gt={key:7,class:`truncated-warning`};function Kt(t,a,l,u,_,v){let y=d(`save-icon`),x=d(`el-button`),S=d(`copy-icon`),C=d(`el-tooltip`),w=d(`view-icon`),T=d(`el-tab-pane`),E=d(`code-icon`),D=d(`el-tabs`),O=d(`warning-icon`),k=d(`vue-markdown`),A=d(`file-icon`),j=g(`loading`);return p((b(),c(`div`,Nt,[e(`div`,Pt,[e(`span`,Ft,i(t.path||`—`),1),t.size?(b(),c(`span`,It,i(t.humanSize(t.size)),1)):s(``,!0),a[3]||=e(`span`,{class:`toolbar-spacer`},null,-1),t.editable?(b(),m(x,{key:1,type:`primary`,size:`small`,disabled:!t.dirty||t.saving,loading:t.saving,onClick:t.onSave},{default:h(()=>[o(y,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.button.save`)),1)]),_:1},8,[`disabled`,`loading`,`onClick`])):s(``,!0),o(C,{content:t.$t(`skill.preview.copy`),placement:`bottom`},{default:h(()=>[o(x,{size:`small`,circle:``,disabled:!t.textContent,"aria-label":t.$t(`skill.preview.copy`),title:t.$t(`skill.preview.copy`),onClick:t.onCopy},{default:h(()=>[o(S,{size:16,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`disabled`,`aria-label`,`title`,`onClick`])]),_:1},8,[`content`])]),t.canRender?(b(),m(D,{key:0,modelValue:t.viewMode,"onUpdate:modelValue":a[0]||=e=>t.viewMode=e,class:`view-tabs`},{default:h(()=>[o(T,{name:`rendered`},{label:h(()=>[o(w,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.preview.viewRendered`)),1)]),_:1}),o(T,{name:`source`},{label:h(()=>[o(E,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.preview.viewSource`)),1)]),_:1})]),_:1},8,[`modelValue`])):s(``,!0),e(`div`,Lt,[t.error?(b(),c(`div`,Rt,[o(O,{class:`mr-2`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.error),1)])):t.kind===`markdown`&&t.viewMode===`rendered`?(b(),m(k,{key:1,class:`markdown-rendered`,source:t.textContent,sanitize:``},null,8,[`source`])):t.kind===`html`&&t.viewMode===`rendered`?(b(),c(`iframe`,{key:2,ref:`htmlFrame`,class:`html-frame`,sandbox:``,srcdoc:t.textContent},null,8,zt)):t.kind===`image`?(b(),c(`div`,Bt,[e(`img`,{src:t.imageUrl,alt:t.path,class:`image-content`},null,8,Vt)])):t.kind===`binary`?(b(),c(`div`,Ht,[o(A,{class:`binary-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,null,i(t.$t(`skill.preview.binary`,{type:t.contentType})),1)])):t.editable?p((b(),c(`textarea`,{key:5,"onUpdate:modelValue":a[1]||=e=>t.textContent=e,class:`source-editor`,spellcheck:`false`,placeholder:t.$t(`skill.placeholder.content`),onInput:a[2]||=e=>t.dirty=!0},null,40,Ut)),[[f,t.textContent]]):(b(),c(`pre`,Wt,[e(`code`,{ref:`codeEl`,class:n(t.hljsLang)},i(t.truncatedText),3)])),t.truncated?(b(),c(`p`,Gt,i(t.$t(`skill.preview.truncated`,{size:t.humanSize(t.MAX_PREVIEW_BYTES)})),1)):s(``,!0)])])),[[j,t.loading]])}var qt=W(Mt,[[`render`,Kt],[`__scopeId`,`data-v-ec0a447e`]]),Jt=new Set([`py`,`ts`,`tsx`,`js`,`jsx`,`json`,`yaml`,`yml`,`sh`,`bash`,`zsh`,`css`,`html`,`sql`,`go`,`rs`,`rb`,`java`,`cpp`,`c`,`h`,`toml`]),Yt=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`]);function Xt(e){let t=e.split(`/`).pop()||e,n=(t.split(`.`).pop()||``).toLowerCase();return t===`SKILL.md`?P:n===`md`?ae:Yt.has(n)?oe:Jt.has(n)?He:z}function Zt(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 Qt=x({name:`FileNode`,components:{ExpandDownIcon:F,ExpandRightIcon:I,FontAwesomeIcon:Re},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?Xt(e.path):B},onClick(){this.node.isLeaf?this.$emit(`select-file`,this.node.path):this.open=!this.open}}}),$t=[`aria-label`,`title`],en={key:1,class:`node-chevron-spacer`},tn={class:`node-label`},nn={key:0,class:`children`};function rn(r,a,o,l,f,p){let h=d(`expand-down-icon`),g=d(`expand-right-icon`),x=d(`font-awesome-icon`),S=d(`file-node`,!0);return b(),c(`li`,null,[e(`div`,{class:n([`file-node`,{active:r.isActive}]),style:_({paddingLeft:r.indent+`px`}),onClick:a[1]||=(...e)=>r.onClick&&r.onClick(...e)},[r.node.isLeaf?(b(),c(`span`,en)):(b(),c(`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?(b(),m(h,{key:0,size:14,"aria-hidden":`true`,focusable:`false`})):(b(),m(g,{key:1,size:14,"aria-hidden":`true`,focusable:`false`}))],8,$t)),r.isHtmlFile(r.node)?(b(),m(x,{key:2,icon:`fa-brands fa-html5`,class:`node-icon`})):(b(),m(y(r.iconFor(r.node)),{key:3,class:`node-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,tn,i(r.node.label),1)],6),!r.node.isLeaf&&r.open?(b(),c(`ul`,nn,[(b(!0),c(u,null,v(r.node.children||[],e=>(b(),m(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))])):s(``,!0)])}var an=x({name:`SkillRow`,components:{ExpandDownIcon:F,ExpandRightIcon:I,SkillIcon:ce,FileNode:W(Qt,[[`render`,rn],[`__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 Zt(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)}}}),on={class:`skill-row-wrapper`},sn=[`aria-label`,`title`],cn={key:1,class:`row-chevron-spacer`},ln=[`title`],un={key:0,class:`file-list`};function dn(r,a,l,f,p,h){let g=d(`expand-down-icon`),_=d(`expand-right-icon`),y=d(`skill-icon`),x=d(`file-node`);return b(),c(`li`,on,[e(`div`,{class:n([`skill-row`,{active:r.isSkillSelected}]),onClick:a[1]||=e=>r.$emit(`select-skill`,r.skill)},[r.hasChildren?(b(),c(`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:a[0]||=t(e=>r.$emit(`toggle-expand`,r.skill),[`stop`])},[r.expanded?(b(),m(g,{key:0,size:14,"aria-hidden":`true`,focusable:`false`})):(b(),m(_,{key:1,size:14,"aria-hidden":`true`,focusable:`false`}))],8,sn)):(b(),c(`span`,cn)),o(y,{class:`row-icon`,size:16,"aria-hidden":`true`,focusable:`false`}),e(`span`,{class:`row-label`,title:r.skill.name},i(r.skill.slug),9,ln)],2),r.expanded&&r.hasChildren?(b(),c(`ul`,un,[(b(!0),c(u,null,v(r.tree,e=>(b(),m(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))])):s(``,!0)])}var fn=W(an,[[`render`,dn],[`__scopeId`,`data-v-231c2ce1`]]),pn=10*1024*1024,mn=/\.(tar\.gz|tgz|tar|zip|md)$/i,hn=x({name:`UploadSkillDialog`,components:{ElDialog:H,ElButton:J,AddFileIcon:We,CloudUploadIcon:Ve},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>pn){K.error(this.$t(`skill.message.fileTooLarge`));return}if(!mn.test(e.name)){K.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});K.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,t.id)}else{let{data:e}=await Z.createTarball(this.file);K.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,e.id)}this.$emit(`update:modelValue`,!1)}catch(e){K.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)}))}finally{this.uploading=!1}}}}}),gn={key:0,class:`dropzone-hint`},_n={key:1,class:`dropzone-file`},vn={class:`dropzone-file-name`},yn={class:`dropzone-file-size`},bn={class:`requirements`},xn={class:`requirements-title`};function Sn(a,s,l,u,f,p){let g=d(`add-file-icon`),_=d(`el-button`),v=d(`cloud-upload-icon`),y=d(`el-dialog`);return b(),m(y,{"model-value":a.modelValue,title:a.$t(`skill.dialog.uploadTitle`),width:`520px`,"align-center":``,"close-on-click-modal":!a.uploading,"close-on-press-escape":!a.uploading,"show-close":!a.uploading,"onUpdate:modelValue":a.onVisibleChange,onClosed:a.reset},{footer:h(()=>[o(_,{disabled:a.uploading,onClick:a.onClose},{default:h(()=>[r(i(a.$t(`skill.button.cancel`)),1)]),_:1},8,[`disabled`,`onClick`]),o(_,{type:`primary`,loading:a.uploading,disabled:!a.file,onClick:a.onSubmit},{default:h(()=>[o(v,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(a.$t(`skill.button.create`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])]),default:h(()=>[e(`input`,{ref:`fileInput`,type:`file`,accept:`.tar.gz,.tgz,.tar,.zip,.md,application/gzip,application/zip,application/x-tar,text/markdown`,hidden:``,onChange:s[0]||=(...e)=>a.onFilePicked&&a.onFilePicked(...e)},null,544),e(`div`,{class:n([`dropzone`,{"is-dragging":a.isDragging,"has-file":!!a.file}]),onClick:s[1]||=(...e)=>a.onPickFile&&a.onPickFile(...e),onDragover:s[2]||=t(e=>a.isDragging=!0,[`prevent`]),onDragleave:s[3]||=t(e=>a.isDragging=!1,[`prevent`]),onDrop:s[4]||=t((...e)=>a.onDrop&&a.onDrop(...e),[`prevent`])},[o(g,{class:`dropzone-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),a.file?(b(),c(`p`,_n,[e(`span`,vn,i(a.file.name),1),e(`span`,yn,i(a.humanSize(a.file.size)),1)])):(b(),c(`p`,gn,i(a.$t(`skill.dialog.uploadDrop`)),1))],34),e(`div`,bn,[e(`p`,xn,i(a.$t(`skill.dialog.fileRequirements`)),1),e(`ul`,null,[e(`li`,null,i(a.$t(`skill.dialog.requirementMd`)),1),e(`li`,null,i(a.$t(`skill.dialog.requirementArchive`)),1)])])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`close-on-press-escape`,`show-close`,`onUpdate:modelValue`,`onClosed`])}var Cn=W(hn,[[`render`,Sn],[`__scopeId`,`data-v-3791b97e`]]),wn=x({name:`WriteSkillDialog`,components:{ElDialog:H,ElButton:J,ElInput:he,CloudUploadIcon:Ve},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});K.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,e.id),this.$emit(`update:modelValue`,!1)}catch(e){K.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)}))}finally{this.saving=!1}}}}}),Tn={class:`hint`};function En(t,n,a,s,c,l){let u=d(`el-input`),f=d(`el-button`),p=d(`cloud-upload-icon`),g=d(`el-dialog`);return b(),m(g,{"model-value":t.modelValue,title:t.$t(`skill.dialog.writeTitle`),width:`720px`,"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:h(()=>[o(f,{disabled:t.saving,onClick:t.onClose},{default:h(()=>[r(i(t.$t(`skill.button.cancel`)),1)]),_:1},8,[`disabled`,`onClick`]),o(f,{type:`primary`,loading:t.saving,disabled:!t.content.trim(),onClick:t.onSubmit},{default:h(()=>[o(p,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.button.create`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])]),default:h(()=>[e(`p`,Tn,i(t.$t(`skill.dialog.writeHint`)),1),o(u,{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 Dn=x({name:`UserSkills`,components:{ElSwitch:j,ElTag:ge,ElTooltip:E,ElDropdown:k,ElDropdownMenu:O,ElDropdownItem:D,AddIcon:V,AiCreateIcon:me,CloseIcon:_e,DeleteIcon:de,ExpandDownIcon:F,ExpandRightIcon:I,HelpIcon:ee,MarketplaceIcon:le,MoreIcon:re,SearchIcon:ue,SkillIcon:ce,UploadIcon:pe,WriteIcon:te,BrowseSkillsDialog:kt,SkillFilePreview:qt,SkillRow:fn,UploadSkillDialog:Cn,WriteSkillDialog:W(wn,[[`render`,En],[`__scopeId`,`data-v-019a154c`]])},directives:{loading:G},data(){return{loading:!1,skills:[],togglingId:null,selectedSkillId:``,selectedPath:``,expandedSkillIds:[],personalOpen:!0,globalsOpen:!0,searchOpen:!1,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),K.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)},openSearch(){this.searchOpen=!0,a(()=>{this.$refs.searchInput?.focus()})},closeSearch(){this.searchOpen=!1,this.searchQuery=``},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});K.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){K.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)})),t.reject(e)}},async onDelete(e){try{await we.confirm(this.$t(`skill.message.deleteConfirm`,{slug:e.slug}),this.$t(`skill.button.delete`),{type:`warning`})}catch{return}try{await Z.remove(e.id),K.success(this.$t(`skill.message.deleteSuccess`)),this.selectedSkillId===e.id&&(this.selectedSkillId=``,this.selectedPath=``),await this.fetchSkills()}catch(e){K.error(this.extractError(e))}},async onToggleSkill(e,t){this.togglingId=e.id;try{t?(await Z.enable(e.id),K.success(this.$t(`skill.message.enableSuccess`))):(await Z.disable(e.id),K.success(this.$t(`skill.message.disableSuccess`))),e.enabled=t}catch(e){K.error(this.extractError(e))}finally{this.togglingId=null}}}}),On={class:`page-shell`},kn={class:`page-heading`},An={class:`page-title`},jn={class:`page-subtitle`},Mn={class:`skills-shell`},Nn={class:`left-pane`},Pn={class:`left-header`},Fn={class:`left-actions`},In=[`aria-label`,`title`],Ln=[`aria-label`,`title`],Rn={class:`submenu-trigger`},zn={class:`badge-soon`},Bn={key:0,class:`search-row`},Vn=[`placeholder`],Hn=[`aria-label`,`title`],Un={class:`left-body`},Wn={class:`section`},Gn={key:0,class:`skill-list`},Kn={key:0,class:`empty-row`},qn={key:0,class:`section`},Jn={key:0,class:`skill-list`},Yn={class:`right-pane`},Xn={class:`right-header`},Zn={class:`right-title`},Qn={class:`right-actions`},$n=[`aria-label`,`title`],er={class:`meta-card`},tr={class:`meta-grid`},nr={class:`meta-cell`},rr={class:`meta-label`},ir={class:`meta-value`},ar={class:`meta-cell`},or={class:`meta-label`},sr={class:`meta-value`},cr={key:0,class:`meta-cell`},lr={class:`meta-label`},ur={class:`meta-tags`},dr={key:0,class:`meta-description`},fr={class:`meta-description-label`},pr={class:`meta-label`},mr={class:`preview-card`},hr={key:2,class:`right-empty`};function gr(t,n,a,_,y,x){let S=d(`search-icon`),C=d(`add-icon`),w=d(`marketplace-icon`),T=d(`el-dropdown-item`),E=d(`expand-right-icon`),D=d(`ai-create-icon`),O=d(`write-icon`),k=d(`upload-icon`),A=d(`el-dropdown-menu`),j=d(`el-dropdown`),M=d(`close-icon`),N=d(`expand-down-icon`),P=d(`skill-row`),F=d(`el-switch`),I=d(`more-icon`),L=d(`delete-icon`),ee=d(`el-tag`),te=d(`help-icon`),ne=d(`el-tooltip`),R=d(`skill-file-preview`),re=d(`skill-icon`),ie=d(`upload-skill-dialog`),ae=d(`write-skill-dialog`),z=d(`browse-skills-dialog`),B=g(`loading`);return b(),c(`div`,On,[e(`div`,kn,[e(`h2`,An,i(t.$t(`skill.title.skills`)),1),e(`p`,jn,i(t.$t(`skill.message.pageDescription`)),1)]),e(`div`,Mn,[e(`aside`,Nn,[e(`header`,Pn,[e(`div`,Fn,[t.searchOpen?s(``,!0):(b(),c(`button`,{key:0,class:`icon-btn`,"aria-label":t.$t(`skill.button.search`),title:t.$t(`skill.button.search`),onClick:n[0]||=(...e)=>t.openSearch&&t.openSearch(...e)},[o(S,{size:16,"aria-hidden":`true`,focusable:`false`})],8,In)),o(j,{trigger:`click`,placement:`bottom-end`,"hide-on-click":!1},{dropdown:h(()=>[o(A,{class:`add-menu`},{default:h(()=>[o(T,{onClick:t.onBrowse},{default:h(()=>[o(w,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.browse`)),1)]),_:1},8,[`onClick`]),o(T,{divided:``},{default:h(()=>[o(j,{trigger:`hover`,placement:`left-start`,"hide-on-click":!0},{dropdown:h(()=>[o(A,{class:`add-menu`},{default:h(()=>[o(T,{disabled:``},{default:h(()=>[o(D,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.createWithClaude`))+` `,1),e(`span`,zn,i(t.$t(`skill.menu.soon`)),1)]),_:1}),o(T,{onClick:t.openWrite},{default:h(()=>[o(O,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.write`)),1)]),_:1},8,[`onClick`]),o(T,{onClick:t.openUpload},{default:h(()=>[o(k,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.upload`)),1)]),_:1},8,[`onClick`])]),_:1})]),default:h(()=>[e(`span`,Rn,[o(C,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.menu.create`))+` `,1),o(E,{class:`submenu-arrow`,size:14,"aria-hidden":`true`,focusable:`false`})])]),_:1})]),_:1})]),_:1})]),default:h(()=>[e(`button`,{class:`icon-btn`,"aria-label":t.$t(`skill.button.add`),title:t.$t(`skill.button.add`)},[o(C,{size:16,"aria-hidden":`true`,focusable:`false`})],8,Ln)]),_:1})])]),t.searchOpen?(b(),c(`div`,Bn,[o(S,{class:`search-icon`,size:13,"aria-hidden":`true`,focusable:`false`}),p(e(`input`,{ref:`searchInput`,"onUpdate:modelValue":n[1]||=e=>t.searchQuery=e,class:`search-input`,placeholder:t.$t(`skill.placeholder.search`),onKeydown:n[2]||=l((...e)=>t.closeSearch&&t.closeSearch(...e),[`escape`])},null,40,Vn),[[f,t.searchQuery]]),e(`button`,{class:`icon-btn icon-btn-sm`,"aria-label":t.$t(`common.button.close`),title:t.$t(`common.button.close`),onClick:n[3]||=(...e)=>t.closeSearch&&t.closeSearch(...e)},[o(M,{size:14,"aria-hidden":`true`,focusable:`false`})],8,Hn)])):s(``,!0),p((b(),c(`div`,Un,[e(`section`,Wn,[e(`button`,{class:`section-header`,onClick:n[4]||=e=>t.personalOpen=!t.personalOpen},[t.personalOpen?(b(),m(N,{key:0,class:`section-chevron`,size:12,"aria-hidden":`true`,focusable:`false`})):(b(),m(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?(b(),c(`ul`,Gn,[!t.loading&&t.filteredPersonal.length===0?(b(),c(`li`,Kn,i(t.searchQuery?t.$t(`skill.empty.search`):t.$t(`skill.message.noSkills`)),1)):s(``,!0),(b(!0),c(u,null,v(t.filteredPersonal,e=>(b(),m(P,{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))])):s(``,!0)]),t.globalSkills.length>0?(b(),c(`section`,qn,[e(`button`,{class:`section-header`,onClick:n[5]||=e=>t.globalsOpen=!t.globalsOpen},[t.globalsOpen?(b(),m(N,{key:0,class:`section-chevron`,size:12,"aria-hidden":`true`,focusable:`false`})):(b(),m(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?(b(),c(`ul`,Jn,[(b(!0),c(u,null,v(t.filteredGlobal,e=>(b(),m(P,{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))])):s(``,!0)])):s(``,!0)])),[[B,t.loading]])]),e(`main`,Yn,[t.selectedSkill&&!t.selectedPath?(b(),c(u,{key:0},[e(`header`,Xn,[e(`h3`,Zn,i(t.selectedSkill.slug),1),e(`div`,Qn,[o(F,{"model-value":t.selectedSkill.enabled,size:`default`,loading:t.togglingId===t.selectedSkill.id,onChange:n[6]||=e=>t.onToggleSkill(t.selectedSkill,!!e)},null,8,[`model-value`,`loading`]),t.selectedSkill.source===`global`?s(``,!0):(b(),m(j,{key:0,trigger:`click`,placement:`bottom-end`},{dropdown:h(()=>[o(A,null,{default:h(()=>[o(T,{onClick:n[7]||=e=>t.onDelete(t.selectedSkill)},{default:h(()=>[o(L,{class:`menu-icon`,size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.button.delete`)),1)]),_:1})]),_:1})]),default:h(()=>[e(`button`,{class:`icon-btn`,"aria-label":t.$t(`skill.button.more`),title:t.$t(`skill.button.more`)},[o(I,{size:16,"aria-hidden":`true`,focusable:`false`})],8,$n)]),_:1}))])]),e(`div`,er,[e(`div`,tr,[e(`div`,nr,[e(`span`,rr,i(t.$t(`skill.meta.addedBy`)),1),e(`span`,ir,i(t.selectedSkill.source===`global`?t.$t(`skill.meta.platform`):t.$t(`skill.meta.you`)),1)]),e(`div`,ar,[e(`span`,or,i(t.$t(`skill.meta.lastUpdated`)),1),e(`span`,sr,i(t.$dayjs.format(t.selectedSkill.updated_at)),1)]),t.selectedSkill.required_connections.length?(b(),c(`div`,cr,[e(`span`,lr,i(t.$t(`skill.field.requiredConnections`)),1),e(`div`,ur,[(b(!0),c(u,null,v(t.selectedSkill.required_connections,e=>(b(),m(ee,{key:e,size:`small`,type:`info`},{default:h(()=>[r(i(e),1)]),_:2},1024))),128))])])):s(``,!0)]),t.selectedSkill.description?(b(),c(`div`,dr,[e(`div`,fr,[e(`span`,pr,i(t.$t(`skill.field.description`)),1),t.selectedSkill.when_to_use?(b(),m(ne,{key:0,content:t.selectedSkill.when_to_use,placement:`top`},{default:h(()=>[o(te,{class:`meta-info-icon`,size:12,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`content`])):s(``,!0)]),e(`p`,null,i(t.selectedSkill.description),1)])):s(``,!0)]),e(`div`,mr,[(b(),m(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?(b(),m(R,{key:`${t.selectedSkill.id}:${t.selectedPath}`,"skill-id":t.selectedSkill.id,path:t.selectedPath,editable:!1},null,8,[`skill-id`,`path`])):(b(),c(`div`,hr,[o(re,{class:`right-empty-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,null,i(t.$t(`skill.preview.selectSkill`)),1)]))])]),o(ie,{modelValue:t.uploadVisible,"onUpdate:modelValue":n[8]||=e=>t.uploadVisible=e,onCreated:t.onCreated},null,8,[`modelValue`,`onCreated`]),o(ae,{modelValue:t.writeVisible,"onUpdate:modelValue":n[9]||=e=>t.writeVisible=e,onCreated:t.onCreated},null,8,[`modelValue`,`onCreated`]),o(z,{modelValue:t.browseVisible,"onUpdate:modelValue":n[10]||=e=>t.browseVisible=e,onInstalled:t.onCreated},null,8,[`modelValue`,`onInstalled`])])}var _r=W(Dn,[[`render`,gr],[`__scopeId`,`data-v-c7fa7f3d`]]);export{_r as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,F as n,I as r,Jt as i,L as a,M as o,N as s,S as c,T as l,at as u,it as d,j as f,mt as p,rt as m,tt as h,z as g}from"./vendor-chart-Dw-P17PN.js";import{r as _,t as v}from"./select-BwAZvBDa.js";import{n as y,t as b}from"./tabs-0CLt0u3e.js";import{t as x}from"./tooltip-CidX6dcZ.js";import{t as S}from"./alert-TKsnUnaR.js";import{n as C,r as w}from"./radio-DgDgyT2l.js";import{n as T,t as E}from"./collapse-n_2lXoCE.js";import{t as D}from"./drawer-zhU2Zvl-.js";import{t as O}from"./input-number-gu27ZjbL.js";import{t as k}from"./switch-CDV6nqtq.js";import{t as A}from"./clock-CLv3cEPi.js";import{t as j}from"./external-link-DDFJs-Cv.js";import{t as M}from"./globe-BiScxUrB.js";import{t as N}from"./info-4GNqeBog.js";import{t as P}from"./loader-circle-B0TUTal7.js";import{t as F}from"./sliders-horizontal-CkY1Z2Yz.js";import{t as ee}from"./tag-NTAx66Ga.js";import{t as te}from"./wand-sparkles-Dy3mNzCY.js";import{t as I}from"./zap-YhUSDnAy.js";import"./constants-7uZLiijT.js";import{Ci as L,E as R,Ji as z,Oi as B,Ti as V,Yt as H,ci as U,in as W,zi as G}from"./index-BZkM5S_f.js";import{t as K}from"./CopyToClipboard-75JDPPOU.js";import{t as q}from"./Consumption-C7DZ1LFd.js";var J=L(`signal`,[[`path`,{d:`M2 20h.01`,key:`4haj6o`}],[`path`,{d:`M7 20v-4`,key:`j294jx`}],[`path`,{d:`M12 20v-8`,key:`i3yub9`}],[`path`,{d:`M17 20V8`,key:`1tkaf5`}],[`path`,{d:`M22 4v16`,key:`sih9yq`}]]),Y=g({name:`LayoutWebextrator`,components:{ControlsIcon:F,ElDrawer:D,ElButton:G},data(){return{drawer:!1}}}),X={class:`main flex flex-row flex-1`},Z={class:`config w-[340px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},Q={class:`result h-full flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function ne(t,n,r,i,o,c){let l=u(`controls-icon`),f=u(`el-button`),m=u(`el-drawer`);return h(),s(`div`,X,[e(`div`,Z,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,Q,[d(t.$slots,`result`,{},void 0,!0)]),a(f,{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(l,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),a(m,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var re=R(Y,[[`render`,ne],[`__scopeId`,`data-v-0ca47a5f`]]),ie=g({name:`ModeSelector`,components:{GlobeIcon:M,MagicIcon:te,ElRadioGroup:w,ElRadioButton:C},computed:{value:{get(){return this.$store.state.webextrator?.config?.mode},set(e){this.$store.commit(`webextrator/setConfig`,{...this.$store.state.webextrator?.config,mode:e})}}}}),ae={class:`field`},oe={class:`title font-bold`};function se(t,n,o,c,l,d){let f=u(`magic-icon`),m=u(`el-radio-button`),g=u(`globe-icon`),_=u(`el-radio-group`);return h(),s(`div`,ae,[e(`h2`,oe,i(t.$t(`webextrator.name.mode`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value w-full`},{default:p(()=>[a(m,{label:`extract`,value:`extract`},{default:p(()=>[a(f,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`webextrator.mode.extract`)),1)]),_:1}),a(m,{label:`render`,value:`render`},{default:p(()=>[a(g,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`webextrator.mode.render`)),1)]),_:1})]),_:1},8,[`modelValue`])])}var ce=R(ie,[[`render`,se],[`__scopeId`,`data-v-76c5bea5`]]),le=g({name:`UrlInput`,components:{ElInput:z},emits:[`submit`],computed:{url:{get(){return this.$store.state.webextrator?.config?.url||``},set(e){this.$store.commit(`webextrator/setConfig`,{...this.$store.state.webextrator?.config,url:e})}}},methods:{onEnter(){this.$emit(`submit`)}}}),ue={class:`field`},de={class:`title font-bold`};function fe(n,r,o,l,d,f){let p=u(`el-input`);return h(),s(`div`,ue,[e(`h2`,de,i(n.$t(`webextrator.name.url`)),1),a(p,{modelValue:n.url,"onUpdate:modelValue":r[0]||=e=>n.url=e,type:`textarea`,rows:2,class:`prompt`,placeholder:n.$t(`webextrator.placeholder.url`),onKeydown:c(t(n.onEnter,[`exact`,`prevent`]),[`enter`])},null,8,[`modelValue`,`placeholder`,`onKeydown`])])}var pe=R(le,[[`render`,fe],[`__scopeId`,`data-v-18488009`]]),me=g({name:`ExpectedTypeSelector`,components:{ElSelect:_,ElOption:v},computed:{value:{get(){return this.$store.state.webextrator?.config?.expected_type},set(e){this.$store.commit(`webextrator/setConfig`,{...this.$store.state.webextrator?.config,expected_type:e})}}},mounted(){this.value||=`general`}}),he={class:`field`},ge={class:`title font-bold`};function _e(t,n,r,o,c,l){let d=u(`el-option`),f=u(`el-select`);return h(),s(`div`,he,[e(`h2`,ge,i(t.$t(`webextrator.name.expectedType`)),1),a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},{default:p(()=>[a(d,{value:`general`,label:t.$t(`webextrator.expectedType.general`)},null,8,[`label`]),a(d,{value:`article`,label:t.$t(`webextrator.expectedType.article`)},null,8,[`label`]),a(d,{value:`product`,label:t.$t(`webextrator.expectedType.product`)},null,8,[`label`])]),_:1},8,[`modelValue`])])}var ve=R(me,[[`render`,_e],[`__scopeId`,`data-v-3b572c49`]]),ye=g({name:`LlmToggle`,components:{InfoIcon:N,ElSwitch:k,ElTooltip:x},computed:{value:{get(){return!!this.$store.state.webextrator?.config?.enable_llm},set(e){this.$store.commit(`webextrator/setConfig`,{...this.$store.state.webextrator?.config,enable_llm:e})}}}}),be={class:`field`},xe={class:`title font-bold`};function Se(t,n,o,c,l,d){let f=u(`info-icon`),m=u(`el-tooltip`),g=u(`el-switch`);return h(),s(`div`,be,[e(`h2`,xe,[r(i(t.$t(`webextrator.name.enableLlm`))+` `,1),a(m,{effect:`dark`,content:t.$t(`webextrator.description.enableLlm`),placement:`top`},{default:p(()=>[a(f,{class:`ml-1 text-[var(--el-text-color-secondary)] text-xs`,size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`content`])]),a(g,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])}var Ce=R(ye,[[`render`,Se],[`__scopeId`,`data-v-a0c2f78c`]]),we=[`image`,`font`,`media`,`stylesheet`,`xhr`,`fetch`],Te=g({name:`AdvancedOptions`,components:{ElCollapse:E,ElCollapseItem:T,ElInput:z,ElInputNumber:O,ElSelect:_,ElOption:v},data(){return{active:[]}},computed:{resourceKinds(){return we},waitUntil:{get(){return this.$store.state.webextrator?.config?.wait_until||`networkidle`},set(e){this.commit({wait_until:e})}},waitForSelector:{get(){return this.$store.state.webextrator?.config?.wait_for_selector||``},set(e){this.commit({wait_for_selector:e})}},timeout:{get(){return this.$store.state.webextrator?.config?.timeout??30},set(e){this.commit({timeout:e})}},delay:{get(){return this.$store.state.webextrator?.config?.delay??0},set(e){this.commit({delay:e})}},blockResources:{get(){return this.$store.state.webextrator?.config?.block_resources||[]},set(e){this.commit({block_resources:e})}}},methods:{commit(e){this.$store.commit(`webextrator/setConfig`,{...this.$store.state.webextrator?.config,...e})}}}),Ee={class:`field`},De={class:`sub-title`},Oe={class:`field`},ke={class:`sub-title`},Ae={class:`field`},je={class:`sub-title`},Me={class:`field`},Ne={class:`sub-title`},Pe={class:`field`},Fe={class:`sub-title`};function Ie(t,n,r,o,c,d){let g=u(`el-option`),_=u(`el-select`),v=u(`el-input`),y=u(`el-input-number`),b=u(`el-collapse-item`),x=u(`el-collapse`);return h(),f(x,{modelValue:t.active,"onUpdate:modelValue":n[5]||=e=>t.active=e,class:`advanced`},{default:p(()=>[a(b,{title:t.$t(`webextrator.name.advanced`),name:`advanced`},{default:p(()=>[e(`div`,Ee,[e(`h2`,De,i(t.$t(`webextrator.name.waitUntil`)),1),a(_,{modelValue:t.waitUntil,"onUpdate:modelValue":n[0]||=e=>t.waitUntil=e,class:`value`},{default:p(()=>[a(g,{value:`networkidle`,label:t.$t(`webextrator.waitUntil.networkidle`)},null,8,[`label`]),a(g,{value:`load`,label:t.$t(`webextrator.waitUntil.load`)},null,8,[`label`]),a(g,{value:`domcontentloaded`,label:t.$t(`webextrator.waitUntil.domcontentloaded`)},null,8,[`label`]),a(g,{value:`commit`,label:t.$t(`webextrator.waitUntil.commit`)},null,8,[`label`])]),_:1},8,[`modelValue`])]),e(`div`,Oe,[e(`h2`,ke,i(t.$t(`webextrator.name.waitForSelector`)),1),a(v,{modelValue:t.waitForSelector,"onUpdate:modelValue":n[1]||=e=>t.waitForSelector=e,placeholder:t.$t(`webextrator.placeholder.waitForSelector`)},null,8,[`modelValue`,`placeholder`])]),e(`div`,Ae,[e(`h2`,je,i(t.$t(`webextrator.name.timeout`)),1),a(y,{modelValue:t.timeout,"onUpdate:modelValue":n[2]||=e=>t.timeout=e,min:1,max:120,step:5,"controls-position":`right`,class:`w-full`},null,8,[`modelValue`])]),e(`div`,Me,[e(`h2`,Ne,i(t.$t(`webextrator.name.delay`)),1),a(y,{modelValue:t.delay,"onUpdate:modelValue":n[3]||=e=>t.delay=e,min:0,max:30,step:1,"controls-position":`right`,class:`w-full`},null,8,[`modelValue`])]),e(`div`,Pe,[e(`h2`,Fe,i(t.$t(`webextrator.name.blockResources`)),1),a(_,{modelValue:t.blockResources,"onUpdate:modelValue":n[4]||=e=>t.blockResources=e,multiple:``,"collapse-tags":``,placeholder:t.$t(`webextrator.placeholder.blockResources`),class:`w-full`},{default:p(()=>[(h(!0),s(l,null,m(t.resourceKinds,e=>(h(),f(g,{key:e,label:t.$t(`webextrator.blockResource.${e}`),value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])]),_:1},8,[`title`])]),_:1},8,[`modelValue`])}var Le=g({name:`WebextratorConfigPanel`,components:{LightningIcon:I,ElButton:G,ModeSelector:ce,UrlInput:pe,ExpectedTypeSelector:ve,LlmToggle:Ce,AdvancedOptions:R(Te,[[`render`,Ie],[`__scopeId`,`data-v-8f36d2df`]]),Consumption:q},emits:[`run`],computed:{config(){return this.$store.state.webextrator?.config},service(){return this.$store.state.webextrator?.service},consumption(){return H(this.config||{},this.service?.cost)},running(){return this.$store.state.webextrator?.status?.run===U.Request},isExtract(){return(this.config?.mode||`extract`)===`extract`},canRun(){let e=(this.config?.url||``).trim();return/^https?:\/\//i.test(e)}},methods:{onRun(){this.canRun&&this.$emit(`run`)}}}),Re={class:`flex flex-col h-full`},ze={class:`flex-1 overflow-y-auto p-5`},Be={class:`flex flex-col items-center justify-center px-5 pb-5`};function Ve(t,n,c,d,f,m){let g=u(`mode-selector`),_=u(`url-input`),v=u(`expected-type-selector`),y=u(`llm-toggle`),b=u(`advanced-options`),x=u(`consumption`),S=u(`lightning-icon`),C=u(`el-button`);return h(),s(`div`,Re,[e(`div`,ze,[a(g,{class:`mb-4`}),a(_,{class:`mb-4`,onSubmit:t.onRun},null,8,[`onSubmit`]),t.isExtract?(h(),s(l,{key:0},[a(v,{class:`mb-4`}),a(y,{class:`mb-4`})],64)):o(``,!0),a(b,{class:`mb-4`})]),e(`div`,Be,[a(x,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),a(C,{type:`primary`,class:`w-full`,round:``,loading:t.running,disabled:!t.canRun,onClick:t.onRun},{default:p(()=>[a(S,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(t.isExtract?`webextrator.button.extract`:`webextrator.button.render`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])])])}var He=R(Le,[[`render`,Ve]]),Ue=e=>!!e&&e.kind!==`render`,We=g({name:`WebextratorResultPanel`,components:{ExternalLinkIcon:j,GlobeIcon:M,LabelIcon:ee,LoadingIcon:P,SignalIcon:J,TimeIcon:A,ElAlert:S,ElImage:B,ElTabs:y,ElTabPane:b,CopyToClipboard:K},data(){return{activeTab:`markdown`}},computed:{response(){return this.$store.state.webextrator?.response},running(){return this.$store.state.webextrator?.status?.run===U.Request},data(){return this.response?.data},renderData(){return this.data&&this.data.kind===`render`?this.data:void 0},extractData(){return Ue(this.data)?this.data:void 0},finalUrl(){let e=this.data;return e?.finalUrl||e?.final_url||e?.url},contentTypeLabel(){let e=this.data;return e?.contentType||e?.content_type||e?.expected_type},screenshotSrc(){let e=this.data?.screenshot;if(e)return e.startsWith(`data:`)||e.startsWith(`http`)?e:`data:image/png;base64,${e}`},markdown(){let e=this.data;return e?.markdown||e?.content||``},plainText(){return this.data?.text||``},html(){return this.data?.html||``},links(){return Array.isArray(this.data?.links)?this.data.links:[]},linksPlain(){return this.links.join(`
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,F as n,I as r,Jt as i,L as a,M as o,N as s,S as c,T as l,at as u,it as d,j as f,mt as p,rt as m,tt as h,z as g}from"./vendor-chart-Dw-P17PN.js";import{r as _,t as v}from"./select-B7IfMuZe.js";import{n as y,t as b}from"./tabs-XtJ6HVTZ.js";import{t as x}from"./tooltip-BkfE-OPy.js";import{t as S}from"./alert-CGlgRfki.js";import{n as C,r as w}from"./radio-DgDgyT2l.js";import{n as T,t as E}from"./collapse-CtpUmGSf.js";import{t as D}from"./drawer-QBoU8nxO.js";import{t as O}from"./input-number-ns6IS4Ga.js";import{t as k}from"./switch-m7gZYlt1.js";import{t as A}from"./clock-zti2yB4i.js";import{t as j}from"./external-link-cKxOFu-J.js";import{t as M}from"./globe-Bm2uKXSh.js";import{t as N}from"./info-3w5H61Q_.js";import{t as P}from"./loader-circle-DueVXRcT.js";import{t as F}from"./sliders-horizontal-D5H1YEZB.js";import{t as ee}from"./tag-BbI62SXC.js";import{t as te}from"./wand-sparkles-DMJRJli7.js";import{t as I}from"./zap-kUwOOOBV.js";import"./constants-7uZLiijT.js";import{Ci as L,E as R,Ji as z,Oi as B,Ti as V,Yt as H,ci as U,in as W,zi as G}from"./index-Epdiy8xX.js";import{t as K}from"./CopyToClipboard-BdIqafoA.js";import{t as q}from"./Consumption-DM30aHNi.js";var J=L(`signal`,[[`path`,{d:`M2 20h.01`,key:`4haj6o`}],[`path`,{d:`M7 20v-4`,key:`j294jx`}],[`path`,{d:`M12 20v-8`,key:`i3yub9`}],[`path`,{d:`M17 20V8`,key:`1tkaf5`}],[`path`,{d:`M22 4v16`,key:`sih9yq`}]]),Y=g({name:`LayoutWebextrator`,components:{ControlsIcon:F,ElDrawer:D,ElButton:G},data(){return{drawer:!1}}}),X={class:`main flex flex-row flex-1`},Z={class:`config w-[340px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},Q={class:`result h-full flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function ne(t,n,r,i,o,c){let l=u(`controls-icon`),f=u(`el-button`),m=u(`el-drawer`);return h(),s(`div`,X,[e(`div`,Z,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,Q,[d(t.$slots,`result`,{},void 0,!0)]),a(f,{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(l,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),a(m,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var re=R(Y,[[`render`,ne],[`__scopeId`,`data-v-0ca47a5f`]]),ie=g({name:`ModeSelector`,components:{GlobeIcon:M,MagicIcon:te,ElRadioGroup:w,ElRadioButton:C},computed:{value:{get(){return this.$store.state.webextrator?.config?.mode},set(e){this.$store.commit(`webextrator/setConfig`,{...this.$store.state.webextrator?.config,mode:e})}}}}),ae={class:`field`},oe={class:`title font-bold`};function se(t,n,o,c,l,d){let f=u(`magic-icon`),m=u(`el-radio-button`),g=u(`globe-icon`),_=u(`el-radio-group`);return h(),s(`div`,ae,[e(`h2`,oe,i(t.$t(`webextrator.name.mode`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value w-full`},{default:p(()=>[a(m,{label:`extract`,value:`extract`},{default:p(()=>[a(f,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`webextrator.mode.extract`)),1)]),_:1}),a(m,{label:`render`,value:`render`},{default:p(()=>[a(g,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`webextrator.mode.render`)),1)]),_:1})]),_:1},8,[`modelValue`])])}var ce=R(ie,[[`render`,se],[`__scopeId`,`data-v-76c5bea5`]]),le=g({name:`UrlInput`,components:{ElInput:z},emits:[`submit`],computed:{url:{get(){return this.$store.state.webextrator?.config?.url||``},set(e){this.$store.commit(`webextrator/setConfig`,{...this.$store.state.webextrator?.config,url:e})}}},methods:{onEnter(){this.$emit(`submit`)}}}),ue={class:`field`},de={class:`title font-bold`};function fe(n,r,o,l,d,f){let p=u(`el-input`);return h(),s(`div`,ue,[e(`h2`,de,i(n.$t(`webextrator.name.url`)),1),a(p,{modelValue:n.url,"onUpdate:modelValue":r[0]||=e=>n.url=e,type:`textarea`,rows:2,class:`prompt`,placeholder:n.$t(`webextrator.placeholder.url`),onKeydown:c(t(n.onEnter,[`exact`,`prevent`]),[`enter`])},null,8,[`modelValue`,`placeholder`,`onKeydown`])])}var pe=R(le,[[`render`,fe],[`__scopeId`,`data-v-18488009`]]),me=g({name:`ExpectedTypeSelector`,components:{ElSelect:_,ElOption:v},computed:{value:{get(){return this.$store.state.webextrator?.config?.expected_type},set(e){this.$store.commit(`webextrator/setConfig`,{...this.$store.state.webextrator?.config,expected_type:e})}}},mounted(){this.value||=`general`}}),he={class:`field`},ge={class:`title font-bold`};function _e(t,n,r,o,c,l){let d=u(`el-option`),f=u(`el-select`);return h(),s(`div`,he,[e(`h2`,ge,i(t.$t(`webextrator.name.expectedType`)),1),a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},{default:p(()=>[a(d,{value:`general`,label:t.$t(`webextrator.expectedType.general`)},null,8,[`label`]),a(d,{value:`article`,label:t.$t(`webextrator.expectedType.article`)},null,8,[`label`]),a(d,{value:`product`,label:t.$t(`webextrator.expectedType.product`)},null,8,[`label`])]),_:1},8,[`modelValue`])])}var ve=R(me,[[`render`,_e],[`__scopeId`,`data-v-3b572c49`]]),ye=g({name:`LlmToggle`,components:{InfoIcon:N,ElSwitch:k,ElTooltip:x},computed:{value:{get(){return!!this.$store.state.webextrator?.config?.enable_llm},set(e){this.$store.commit(`webextrator/setConfig`,{...this.$store.state.webextrator?.config,enable_llm:e})}}}}),be={class:`field`},xe={class:`title font-bold`};function Se(t,n,o,c,l,d){let f=u(`info-icon`),m=u(`el-tooltip`),g=u(`el-switch`);return h(),s(`div`,be,[e(`h2`,xe,[r(i(t.$t(`webextrator.name.enableLlm`))+` `,1),a(m,{effect:`dark`,content:t.$t(`webextrator.description.enableLlm`),placement:`top`},{default:p(()=>[a(f,{class:`ml-1 text-[var(--el-text-color-secondary)] text-xs`,size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`content`])]),a(g,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])}var Ce=R(ye,[[`render`,Se],[`__scopeId`,`data-v-a0c2f78c`]]),we=[`image`,`font`,`media`,`stylesheet`,`xhr`,`fetch`],Te=g({name:`AdvancedOptions`,components:{ElCollapse:E,ElCollapseItem:T,ElInput:z,ElInputNumber:O,ElSelect:_,ElOption:v},data(){return{active:[]}},computed:{resourceKinds(){return we},waitUntil:{get(){return this.$store.state.webextrator?.config?.wait_until||`networkidle`},set(e){this.commit({wait_until:e})}},waitForSelector:{get(){return this.$store.state.webextrator?.config?.wait_for_selector||``},set(e){this.commit({wait_for_selector:e})}},timeout:{get(){return this.$store.state.webextrator?.config?.timeout??30},set(e){this.commit({timeout:e})}},delay:{get(){return this.$store.state.webextrator?.config?.delay??0},set(e){this.commit({delay:e})}},blockResources:{get(){return this.$store.state.webextrator?.config?.block_resources||[]},set(e){this.commit({block_resources:e})}}},methods:{commit(e){this.$store.commit(`webextrator/setConfig`,{...this.$store.state.webextrator?.config,...e})}}}),Ee={class:`field`},De={class:`sub-title`},Oe={class:`field`},ke={class:`sub-title`},Ae={class:`field`},je={class:`sub-title`},Me={class:`field`},Ne={class:`sub-title`},Pe={class:`field`},Fe={class:`sub-title`};function Ie(t,n,r,o,c,d){let g=u(`el-option`),_=u(`el-select`),v=u(`el-input`),y=u(`el-input-number`),b=u(`el-collapse-item`),x=u(`el-collapse`);return h(),f(x,{modelValue:t.active,"onUpdate:modelValue":n[5]||=e=>t.active=e,class:`advanced`},{default:p(()=>[a(b,{title:t.$t(`webextrator.name.advanced`),name:`advanced`},{default:p(()=>[e(`div`,Ee,[e(`h2`,De,i(t.$t(`webextrator.name.waitUntil`)),1),a(_,{modelValue:t.waitUntil,"onUpdate:modelValue":n[0]||=e=>t.waitUntil=e,class:`value`},{default:p(()=>[a(g,{value:`networkidle`,label:t.$t(`webextrator.waitUntil.networkidle`)},null,8,[`label`]),a(g,{value:`load`,label:t.$t(`webextrator.waitUntil.load`)},null,8,[`label`]),a(g,{value:`domcontentloaded`,label:t.$t(`webextrator.waitUntil.domcontentloaded`)},null,8,[`label`]),a(g,{value:`commit`,label:t.$t(`webextrator.waitUntil.commit`)},null,8,[`label`])]),_:1},8,[`modelValue`])]),e(`div`,Oe,[e(`h2`,ke,i(t.$t(`webextrator.name.waitForSelector`)),1),a(v,{modelValue:t.waitForSelector,"onUpdate:modelValue":n[1]||=e=>t.waitForSelector=e,placeholder:t.$t(`webextrator.placeholder.waitForSelector`)},null,8,[`modelValue`,`placeholder`])]),e(`div`,Ae,[e(`h2`,je,i(t.$t(`webextrator.name.timeout`)),1),a(y,{modelValue:t.timeout,"onUpdate:modelValue":n[2]||=e=>t.timeout=e,min:1,max:120,step:5,"controls-position":`right`,class:`w-full`},null,8,[`modelValue`])]),e(`div`,Me,[e(`h2`,Ne,i(t.$t(`webextrator.name.delay`)),1),a(y,{modelValue:t.delay,"onUpdate:modelValue":n[3]||=e=>t.delay=e,min:0,max:30,step:1,"controls-position":`right`,class:`w-full`},null,8,[`modelValue`])]),e(`div`,Pe,[e(`h2`,Fe,i(t.$t(`webextrator.name.blockResources`)),1),a(_,{modelValue:t.blockResources,"onUpdate:modelValue":n[4]||=e=>t.blockResources=e,multiple:``,"collapse-tags":``,placeholder:t.$t(`webextrator.placeholder.blockResources`),class:`w-full`},{default:p(()=>[(h(!0),s(l,null,m(t.resourceKinds,e=>(h(),f(g,{key:e,label:t.$t(`webextrator.blockResource.${e}`),value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])]),_:1},8,[`title`])]),_:1},8,[`modelValue`])}var Le=g({name:`WebextratorConfigPanel`,components:{LightningIcon:I,ElButton:G,ModeSelector:ce,UrlInput:pe,ExpectedTypeSelector:ve,LlmToggle:Ce,AdvancedOptions:R(Te,[[`render`,Ie],[`__scopeId`,`data-v-8f36d2df`]]),Consumption:q},emits:[`run`],computed:{config(){return this.$store.state.webextrator?.config},service(){return this.$store.state.webextrator?.service},consumption(){return H(this.config||{},this.service?.cost)},running(){return this.$store.state.webextrator?.status?.run===U.Request},isExtract(){return(this.config?.mode||`extract`)===`extract`},canRun(){let e=(this.config?.url||``).trim();return/^https?:\/\//i.test(e)}},methods:{onRun(){this.canRun&&this.$emit(`run`)}}}),Re={class:`flex flex-col h-full`},ze={class:`flex-1 overflow-y-auto p-5`},Be={class:`flex flex-col items-center justify-center px-5 pb-5`};function Ve(t,n,c,d,f,m){let g=u(`mode-selector`),_=u(`url-input`),v=u(`expected-type-selector`),y=u(`llm-toggle`),b=u(`advanced-options`),x=u(`consumption`),S=u(`lightning-icon`),C=u(`el-button`);return h(),s(`div`,Re,[e(`div`,ze,[a(g,{class:`mb-4`}),a(_,{class:`mb-4`,onSubmit:t.onRun},null,8,[`onSubmit`]),t.isExtract?(h(),s(l,{key:0},[a(v,{class:`mb-4`}),a(y,{class:`mb-4`})],64)):o(``,!0),a(b,{class:`mb-4`})]),e(`div`,Be,[a(x,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),a(C,{type:`primary`,class:`w-full`,round:``,loading:t.running,disabled:!t.canRun,onClick:t.onRun},{default:p(()=>[a(S,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(t.isExtract?`webextrator.button.extract`:`webextrator.button.render`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])])])}var He=R(Le,[[`render`,Ve]]),Ue=e=>!!e&&e.kind!==`render`,We=g({name:`WebextratorResultPanel`,components:{ExternalLinkIcon:j,GlobeIcon:M,LabelIcon:ee,LoadingIcon:P,SignalIcon:J,TimeIcon:A,ElAlert:S,ElImage:B,ElTabs:y,ElTabPane:b,CopyToClipboard:K},data(){return{activeTab:`markdown`}},computed:{response(){return this.$store.state.webextrator?.response},running(){return this.$store.state.webextrator?.status?.run===U.Request},data(){return this.response?.data},renderData(){return this.data&&this.data.kind===`render`?this.data:void 0},extractData(){return Ue(this.data)?this.data:void 0},finalUrl(){let e=this.data;return e?.finalUrl||e?.final_url||e?.url},contentTypeLabel(){let e=this.data;return e?.contentType||e?.content_type||e?.expected_type},screenshotSrc(){let e=this.data?.screenshot;if(e)return e.startsWith(`data:`)||e.startsWith(`http`)?e:`data:image/png;base64,${e}`},markdown(){let e=this.data;return e?.markdown||e?.content||``},plainText(){return this.data?.text||``},html(){return this.data?.html||``},links(){return Array.isArray(this.data?.links)?this.data.links:[]},linksPlain(){return this.links.join(`
|
|
2
2
|
`)},images(){return Array.isArray(this.data?.images)?this.data.images:[]},structuredPretty(){return this.extractData?.structured?JSON.stringify(this.extractData.structured,null,2):``},rawPretty(){return this.response?JSON.stringify(this.response,null,2):``},errorMessage(){if(this.response?.success===!1){let e=this.response?.error;return e?.message||e?.code||this.$t(`webextrator.message.failed`)}}},watch:{response:{handler(){this.resetTab()},immediate:!0}},methods:{resetTab(){this.markdown?this.activeTab=`markdown`:this.extractData?.structured?this.activeTab=`structured`:this.plainText?this.activeTab=`text`:this.html?this.activeTab=`html`:this.activeTab=`raw`}}}),Ge={class:`h-full overflow-y-auto p-6`},Ke={key:0,class:`max-w-4xl mx-auto py-4`},qe={class:`flex items-center gap-2 mb-3 text-[var(--el-color-primary)] text-sm`},Je={key:1,class:`flex flex-col items-center justify-center py-24 text-[var(--el-text-color-disabled)]`},Ye={class:`text-base mb-1`},Xe={class:`text-xs opacity-70`},Ze={key:2,class:`max-w-4xl mx-auto py-4`},Qe={class:`text-xs whitespace-pre-wrap break-words`},$e={key:3,class:`max-w-4xl mx-auto`},et={class:`mb-4`},tt={class:`text-xl font-semibold leading-snug mb-1 break-words text-[var(--el-text-color-primary)]`},nt={class:`flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-[var(--el-text-color-secondary)]`},rt=[`href`],it={key:1},at={key:2},ot={key:3},st={key:0,class:`mt-2 text-sm text-[var(--el-text-color-regular)] leading-relaxed line-clamp-3`},ct={key:0,class:`mb-5`},lt={class:`tab-toolbar`},ut={class:`content-block`},dt={class:`tab-toolbar`},ft={class:`content-block`},$={class:`tab-toolbar`},pt={class:`content-block code`},mt={class:`tab-toolbar`},ht={class:`links-list`},gt=[`href`],_t={class:`grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-2`},vt={class:`tab-toolbar`},yt={class:`content-block code`},bt={class:`tab-toolbar`},xt={class:`content-block code`};function St(t,c,d,g,_,v){let y=u(`loading-icon`),b=u(`globe-icon`),x=u(`el-alert`),S=u(`external-link-icon`),C=u(`signal-icon`),w=u(`time-icon`),T=u(`label-icon`),E=u(`el-image`),D=u(`copy-to-clipboard`),O=u(`el-tab-pane`),k=u(`el-tabs`);return h(),s(`div`,Ge,[t.running?(h(),s(`div`,Ke,[e(`div`,qe,[a(y,{class:`adc-icon-spin`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,i(t.$t(`webextrator.message.running`)),1)]),c[1]||=n(`<div class="mb-6 animate-pulse" data-v-4ec341a6><div class="h-5 w-3/5 rounded bg-[var(--el-fill-color-dark)] mb-2" data-v-4ec341a6></div><div class="h-3 w-2/5 rounded bg-[var(--el-fill-color)] mb-4" data-v-4ec341a6></div><div class="h-64 w-full rounded bg-[var(--el-fill-color)] mb-3" data-v-4ec341a6></div><div class="h-3 w-full rounded bg-[var(--el-fill-color)] mb-1" data-v-4ec341a6></div><div class="h-3 w-5/6 rounded bg-[var(--el-fill-color)] mb-1" data-v-4ec341a6></div><div class="h-3 w-4/6 rounded bg-[var(--el-fill-color)]" data-v-4ec341a6></div></div>`,1)])):!t.response&&!t.errorMessage?(h(),s(`div`,Je,[a(b,{class:`text-6xl mb-4 opacity-30`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,Ye,i(t.$t(`webextrator.description.intro`)),1),e(`p`,Xe,i(t.$t(`webextrator.description.introHint`)),1)])):t.errorMessage?(h(),s(`div`,Ze,[a(x,{type:`error`,closable:!1,"show-icon":``,title:t.$t(`webextrator.message.failed`)},{default:p(()=>[e(`pre`,Qe,i(t.errorMessage),1)]),_:1},8,[`title`])])):t.data?(h(),s(`div`,$e,[e(`header`,et,[e(`h1`,tt,i(t.data.title||t.$t(`webextrator.message.untitled`)),1),e(`div`,nt,[t.finalUrl?(h(),s(`a`,{key:0,href:t.finalUrl,target:`_blank`,rel:`noopener`,class:`hover:underline truncate max-w-[60%]`},[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(i(t.finalUrl),1)],8,rt)):o(``,!0),t.renderData?.status?(h(),s(`span`,it,[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(i(t.renderData.status),1)])):o(``,!0),t.response?.elapsed?(h(),s(`span`,at,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(i(t.response.elapsed.toFixed(2))+`s `,1)])):o(``,!0),t.contentTypeLabel?(h(),s(`span`,ot,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(i(t.contentTypeLabel),1)])):o(``,!0)]),t.extractData?.description?(h(),s(`p`,st,i(t.extractData.description),1)):o(``,!0)]),t.screenshotSrc?(h(),s(`figure`,ct,[a(E,{src:t.screenshotSrc,fit:`contain`,"preview-src-list":[t.screenshotSrc],"preview-teleported":``,"hide-on-click-modal":``,class:`w-full max-h-[480px] rounded border border-[var(--app-border-subtle)] bg-[var(--el-fill-color-light)]`},null,8,[`src`,`preview-src-list`])])):o(``,!0),a(k,{modelValue:t.activeTab,"onUpdate:modelValue":c[0]||=e=>t.activeTab=e,class:`result-tabs`},{default:p(()=>[t.markdown?(h(),f(O,{key:0,label:t.$t(`webextrator.tab.markdown`),name:`markdown`},{default:p(()=>[e(`div`,lt,[a(D,{content:t.markdown},null,8,[`content`])]),e(`pre`,ut,i(t.markdown),1)]),_:1},8,[`label`])):o(``,!0),t.plainText?(h(),f(O,{key:1,label:t.$t(`webextrator.tab.text`),name:`text`},{default:p(()=>[e(`div`,dt,[a(D,{content:t.plainText},null,8,[`content`])]),e(`pre`,ft,i(t.plainText),1)]),_:1},8,[`label`])):o(``,!0),t.extractData?.structured?(h(),f(O,{key:2,label:t.$t(`webextrator.tab.structured`),name:`structured`},{default:p(()=>[e(`div`,$,[a(D,{content:t.structuredPretty},null,8,[`content`])]),e(`pre`,pt,i(t.structuredPretty),1)]),_:1},8,[`label`])):o(``,!0),t.links.length?(h(),f(O,{key:3,label:`${t.$t(`webextrator.tab.links`)} (${t.links.length})`,name:`links`},{default:p(()=>[e(`div`,mt,[a(D,{content:t.linksPlain},null,8,[`content`])]),e(`ul`,ht,[(h(!0),s(l,null,m(t.links,(t,n)=>(h(),s(`li`,{key:n,class:`truncate`},[e(`a`,{href:t,target:`_blank`,rel:`noopener`},i(t),9,gt)]))),128))])]),_:1},8,[`label`])):o(``,!0),t.images.length?(h(),f(O,{key:4,label:`${t.$t(`webextrator.tab.images`)} (${t.images.length})`,name:`images`},{default:p(()=>[e(`div`,_t,[(h(!0),s(l,null,m(t.images,(e,n)=>(h(),f(E,{key:n,src:e,fit:`cover`,loading:`lazy`,"preview-src-list":t.images,"initial-index":n,"preview-teleported":``,"hide-on-click-modal":``,class:`aspect-square w-full rounded bg-[var(--el-fill-color-light)]`},null,8,[`src`,`preview-src-list`,`initial-index`]))),128))])]),_:1},8,[`label`])):o(``,!0),t.html?(h(),f(O,{key:5,label:t.$t(`webextrator.tab.html`),name:`html`},{default:p(()=>[e(`div`,vt,[a(D,{content:t.html},null,8,[`content`])]),e(`pre`,yt,i(t.html),1)]),_:1},8,[`label`])):o(``,!0),a(O,{label:t.$t(`webextrator.tab.raw`),name:`raw`},{default:p(()=>[e(`div`,bt,[a(D,{content:t.rawPretty},null,8,[`content`])]),e(`pre`,xt,i(t.rawPretty),1)]),_:1},8,[`label`])]),_:1},8,[`modelValue`])])):o(``,!0)])}var Ct=g({name:`WebextratorIndex`,components:{Layout:re,ConfigPanel:He,ResultPanel:R(We,[[`render`,St],[`__scopeId`,`data-v-4ec341a6`]])},inject:[`initialized`],async mounted(){await this.$store.dispatch(`webextrator/getService`)},methods:{async onRun(){if(!W())return;let e=this.$store.state.webextrator?.config;if(!e?.url)return;let t=(e.mode||`extract`)===`extract`;V.info(this.$t(t?`webextrator.message.extracting`:`webextrator.message.rendering`));try{await this.$store.dispatch(`webextrator/run`),V.success(this.$t(`webextrator.message.success`))}catch(e){let t=e?.response?.data?.error?.code||e?.response?.data?.code;t===`used_up`?V.error(this.$t(`webextrator.message.usedUp`)):t===`too_many_requests`?V.error(this.$t(`webextrator.message.busy`)):t===`timeout`?V.error(this.$t(`webextrator.message.timeout`)):t===`antibot_blocked`?V.error(this.$t(`webextrator.message.antibotBlocked`)):V.error(this.$t(`webextrator.message.failed`))}}}});function wt(e,t,n,r,i,o){let s=u(`config-panel`),c=u(`result-panel`),l=u(`layout`);return h(),f(l,null,{config:p(()=>[a(s,{onRun:e.onRun},null,8,[`onRun`])]),result:p(()=>[a(c)]),_:1})}var Tt=R(Ct,[[`render`,wt]]);export{Tt 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,ht as u,it as d,j as f,mt as p,rt as m,tt as h,x as g,z as _}from"./vendor-chart-Dw-P17PN.js";import{t as v}from"./upload-DLH6PEN4.js";import{t as y}from"./tooltip-CidX6dcZ.js";import{t as b}from"./alert-TKsnUnaR.js";import{t as x}from"./drawer-zhU2Zvl-.js";import{t as S}from"./switch-CDV6nqtq.js";import{t as C}from"./clock-CLv3cEPi.js";import{r as w,t as T}from"./PromptTextarea-CcLPAbYp.js";import{t as E}from"./info-4GNqeBog.js";import{t as D}from"./trash-2-Cwgy7z2N.js";import{t as O}from"./triangle-alert-DH3d6WgW.js";import{t as k}from"./upload-BSWLsM1w.js";import{t as A}from"./wand-sparkles-Dy3mNzCY.js";import"./constants-7uZLiijT.js";import{E as j,Gt as M,Kt as N,Sr as ee,Ti as P,Ut as te,Wt as F,Xn as I,Yt as L,ci as R,di as z,in as ne,qt as B,wi as V,zi as H}from"./index-BZkM5S_f.js";import{t as U}from"./CopyToClipboard-75JDPPOU.js";import{t as W}from"./FilePreview-WETU8RvO.js";import{t as G}from"./ImagePreview-DZF-0OJs.js";import{n as K}from"./taskDrawerMixin-DyAUhFEq.js";import{t as q}from"./Consumption-C7DZ1LFd.js";import{a as J,n as Y,r as X,t as Z}from"./pagination-J0T1NkTZ.js";import{t as Q}from"./VideoPlayer-B7YhHjOH.js";import{t as re}from"./ApiCodeButton-Cr87aEOF.js";import{t as ie}from"./BotPlaceholder-3C03-_S9.js";var ae=_({name:`LayoutLuma`,components:{MagicIcon:A,ElDrawer:x,ElButton:H},mixins:[K]}),oe={class:`main flex flex-row flex-1`},se={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)]`},ce={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function le(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),_=l(`el-drawer`);return h(),s(`div`,oe,[e(`div`,se,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,ce,[d(t.$slots,`result`,{},void 0,!0)]),u(a(m,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[g,!t.tasksEmpty]]),a(_,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`drawer generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var ue=j(ae,[[`render`,le],[`__scopeId`,`data-v-d13d43a9`]]),de=_({name:`EnhancementSelector`,components:{ElSwitch:S,InfoIcon:J},computed:{value:{get(){return this.$store.state.luma?.config?.enhancement},set(e){console.debug(`set enhancement`,e),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,enhancement:e})}}},mounted(){this.value===void 0&&(this.value=!0)}}),fe={class:`relative`},pe={class:`flex justify-between`},me={class:`flex justify-start items-center`},he={class:`text-sm font-bold`},ge={class:`flex justify-end items-center`};function _e(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return h(),s(`div`,fe,[e(`div`,pe,[e(`div`,me,[e(`span`,he,i(t.$t(`luma.name.enhancement`)),1),a(d,{content:t.$t(`luma.description.enhancement`)},null,8,[`content`])]),e(`div`,ge,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])])])}var ve=j(de,[[`render`,_e]]),ye=_({name:`CustomSelector`,components:{ElSwitch:S,InfoIcon:J},computed:{value:{get(){return this.$store.state.luma?.config?.custom},set(e){console.debug(`set custom`,e),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,custom:e})}}},mounted(){this.value===void 0&&(this.value=!1)}}),be={class:`relative`},xe={class:`flex justify-between`},Se={class:`flex justify-start items-center`},Ce={class:`text-sm font-bold`},we={class:`flex justify-end items-center`};function Te(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return h(),s(`div`,be,[e(`div`,xe,[e(`div`,Se,[e(`span`,Ce,i(t.$t(`luma.name.custom`)),1),a(d,{content:t.$t(`luma.description.custom`)},null,8,[`content`])]),e(`div`,we,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])])])}var Ee=j(ye,[[`render`,Te]]),De=_({name:`LoopSelector`,components:{ElSwitch:S,InfoIcon:J},computed:{value:{get(){return this.$store.state.luma?.config?.loop},set(e){console.debug(`set loop`,e),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,loop:e})}}},mounted(){this.value===void 0&&(this.value=!1)}}),Oe={class:`relative`},ke={class:`flex justify-between`},Ae={class:`flex justify-start items-center`},je={class:`text-sm font-bold`},Me={class:`flex justify-end items-center`};function Ne(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return h(),s(`div`,Oe,[e(`div`,ke,[e(`div`,Ae,[e(`span`,je,i(t.$t(`luma.name.loop`)),1),a(d,{content:t.$t(`luma.description.loop`)},null,8,[`content`])]),e(`div`,Me,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])])])}var Pe=j(De,[[`render`,Ne]]),Fe=_({name:`EndImage`,components:{UploadIcon:k,ElUpload:v,ElButton:H,ImagePreview:G,InfoIcon:J},mixins:[B,N,F],data(){return{fileList:[],uploadUrl:z()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state?.luma?.config?.start_image_url},set(){}}},mounted(){this.value||=void 0,this.onSetEndImageUrl()},methods:{onExceed(){P.warning(this.$t(`luma.message.uploadReferencesExceed`))},onError(){P.error(this.$t(`luma.message.uploadReferencesError`))},onSetEndImageUrl(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),Ie={class:`relative`},Le={class:`flex justify-between`},Re={class:`flex justify-start items-center`},ze={class:`text-sm font-bold`};function Be(t,n,c,u,d,m){let g=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return h(),s(`div`,Ie,[e(`div`,Le,[e(`div`,Re,[e(`span`,ze,i(t.$t(`luma.name.endImageUrl`)),1),a(g,{content:t.$t(`luma.description.endImageUrl`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:5,class:`upload-wrapper`,multiple:!1,action:t.uploadUrl,"list-type":`picture`,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(h(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`luma.button.uploadEndImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Ve=j(Fe,[[`render`,Be],[`__scopeId`,`data-v-b8b121be`]]),He=_({name:`StartImage`,components:{UploadIcon:k,ElUpload:v,ElButton:H,ImagePreview:G,InfoIcon:J},mixins:[B,N,F],data(){return{fileList:[],uploadUrl:z()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state?.luma?.config?.start_image_url},set(){}}},mounted(){this.value||=void 0,this.onSetStartImageUrl()},methods:{onExceed(){P.warning(this.$t(`luma.message.uploadReferencesExceed`))},onError(){P.error(this.$t(`luma.message.uploadReferencesError`))},onSetStartImageUrl(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),Ue={class:`relative`},We={class:`flex justify-between`},Ge={class:`flex justify-start items-center`},Ke={class:`text-sm font-bold`};function qe(t,n,c,u,d,m){let g=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return h(),s(`div`,Ue,[e(`div`,We,[e(`div`,Ge,[e(`span`,Ke,i(t.$t(`luma.name.startImageUrl`)),1),a(g,{content:t.$t(`luma.description.startImageUrl`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:5,class:`upload-wrapper`,multiple:!1,action:t.uploadUrl,"list-type":`picture`,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.percentage==null?o(``,!0):(h(),f(_,{key:0,url:e.url||e.response.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`luma.button.uploadStartImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Je=j(He,[[`render`,qe],[`__scopeId`,`data-v-5bb7722a`]]),Ye=_({name:`UploadVideo`,components:{UploadIcon:k,ElUpload:v,ElButton:H,InfoIcon:J,FilePreview:W},mixins:[N,F],data(){return{fileList:[],uploadUrl:z()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state.luma?.config?.video_url},set(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,video_url:e})}}},mounted(){this.value||=void 0},methods:{onExceed(){P.warning(this.$t(`luma.message.uploadVideoExceed`))},onError(){P.error(this.$t(`luma.message.uploadVideoError`))},beforeUpload(e){let t=e.type===`video/mp4`,n=e.size/1024/1024<10;return t?n?!0:(P.error(this.$t(`luma.message.uploadVideoSizeExceed`)),!1):(P.error(this.$t(`luma.message.uploadVideoTypeFailed`)),!1)},onSetVideoUrl(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,video_url:e,action:`extend`})},async onSuccess(){this.onSetVideoUrl()}}}),Xe={class:`relative`},Ze={class:`flex justify-between`},Qe={class:`flex justify-start items-center`},$e={class:`text-sm font-bold`};function et(t,n,c,u,d,m){let g=l(`info-icon`),_=l(`file-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return h(),s(`div`,Xe,[e(`div`,Ze,[e(`div`,Qe,[e(`span`,$e,i(t.$t(`luma.name.videoUrl`)),1),a(g,{content:t.$t(`luma.description.videoUrl`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.mp4`,name:`file`,class:`value`,"show-file-list":!0,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},{file:p(({file:e})=>[e.percentage==null?o(``,!0):(h(),f(_,{key:0,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`luma.button.uploadVideoUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var tt=j(Ye,[[`render`,et],[`__scopeId`,`data-v-2189fc52`]]),nt=_({name:`PromptInput`,components:{PromptTextarea:T},computed:{prompt:{get(){return this.$store.state.luma?.config?.prompt},set(e){this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,prompt:e})}}},mounted(){this.prompt||=``}});function rt(e,t,n,r,i,a){let o=l(`prompt-textarea`);return h(),f(o,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`luma.name.prompt`),info:e.$t(`luma.description.prompt`),placeholder:e.$t(`luma.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var it=j(nt,[[`render`,rt]]),at=_({name:`ExtendFromInput`,components:{VideoPlayer:Q},props:{modelValue:{type:Object,required:!1,default:void 0}},data(){return{options:{quality:{default:`1080p`}}}},computed:{config(){return this.$store.state.luma?.config}}}),ot={class:`relative`},st={class:`flex mb-2`},ct={class:`text-sm font-bold`};function lt(t,n,r,a,c,u){let d=l(`video-player`);return h(),s(`div`,ot,[e(`div`,st,[e(`span`,ct,i(t.$t(`luma.name.extend`)),1)]),e(`div`,null,[t.config?.video_url?(h(),f(d,{key:0,src:t.config?.video_url},null,8,[`src`])):o(``,!0)])])}var ut=_({name:`ConfigPanel`,components:{MagicIcon:A,LoopSelector:Pe,StartImageInput:Je,EndImageInput:Ve,EnhancementSelector:ve,ElButton:H,PromptInput:it,ExtendFromInput:j(at,[[`render`,lt]]),CustomSelector:Ee,UploadVideo:tt,Consumption:q},emits:[`generate`],computed:{config(){return this.$store.state.luma?.config},consumption(){return L(this.config,this.service?.cost)},service(){return this.$store.state.luma?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),dt={class:`flex flex-col h-full`},ft={class:`flex-1 overflow-y-auto p-5`},pt={class:`flex flex-col items-center justify-center px-5 pb-5`};function mt(t,n,c,u,d,m){let g=l(`extend-from-input`),_=l(`prompt-input`),v=l(`custom-selector`),y=l(`upload-video`),b=l(`start-image-input`),x=l(`end-image-input`),S=l(`enhancement-selector`),C=l(`loop-selector`),w=l(`consumption`),T=l(`magic-icon`),E=l(`el-button`);return h(),s(`div`,dt,[e(`div`,ft,[t.config?.video_id||t.config?.video_url?(h(),f(g,{key:0,class:`mb-4`})):o(``,!0),a(_,{class:`mb-4`}),t.config?.video_id?o(``,!0):(h(),f(v,{key:1,class:`mb-4`})),t.config?.custom?(h(),f(y,{key:2,class:`mb-4`})):o(``,!0),!(t.config?.video_id||t.config?.video_url)&&!t.config?.custom?(h(),f(b,{key:3,class:`mb-4`})):o(``,!0),a(x,{class:`mb-4`}),a(S,{class:`mb-4`}),a(C,{class:`mb-4`})]),e(`div`,pt,[a(w,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),t.config?.video_url!==void 0||t.config?.custom?(h(),f(E,{key:0,type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(T,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`luma.button.extend`)),1)]),_:1},8,[`onClick`])):(h(),f(E,{key:1,type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(T,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`luma.button.generate`)),1)]),_:1},8,[`onClick`]))])])}var ht=j(ut,[[`render`,mt]]),gt=_({name:`TaskPreview`,components:{DeleteIcon:D,ChannelIcon:w,InfoIcon:E,MagicIcon:A,TimeIcon:C,WarningIcon:O,CopyToClipboard:U,ElAlert:b,VideoPlayer:Q,ElTooltip:y,ElButton:H,ApiCodeButton:re},props:{modelValue:{type:Object,required:!0}},emits:[`extend`],data(){return{}},computed:{application(){return this.$store.state.luma?.application},config(){return this.$store.state.luma?.config}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await V.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(`luma/deleteTask`,{id:e}),P.success(this.$t(`common.message.deleteTaskSuccess`))}catch{P.error(this.$t(`common.message.deleteTaskFailed`))}}},onExtend(e,t){console.debug(`set config`,t),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,video_id:t.video_id,prompt:t.prompt,action:`extend`,thumbnail_url:t.thumbnail_url,video_url:t.video_url}),this.$emit(`extend`)},onDownload(e){window.open(e,`_blank`)}}}),_t={class:`preview`},vt={class:`left`},yt={class:`main`},bt={class:`bot`},xt={class:`datetime`},St=[`aria-label`],Ct={class:`info`},wt={key:0,class:`prompt mt-2`},Tt={key:0},Et={key:1},Dt={key:0,class:n({content:!0,failed:!0})},Ot={key:0,class:`mb-4`},kt={key:1,class:n({operations:!0,"mt-2":!0,"mb-4":!0})},At={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},jt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Mt={key:1,class:n({content:!0})},Nt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Pt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ft={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},It={key:2,class:n({content:!0})},Lt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function Rt(n,c,u,d,f,m){let g=l(`capability-presentation`),_=l(`delete-icon`),v=l(`el-tooltip`),y=l(`video-player`),b=l(`el-button`),x=l(`api-code-button`),S=l(`magic-icon`),C=l(`copy-to-clipboard`),w=l(`time-icon`),T=l(`el-alert`),E=l(`warning-icon`),D=l(`info-icon`),O=l(`channel-icon`);return h(),s(`div`,_t,[e(`div`,vt,[a(g,{capability:`luma`,part:`avatar`,class:`avatar`})]),e(`div`,yt,[e(`div`,bt,[a(g,{capability:`luma`,part:`name`}),e(`span`,xt,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?(h(),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,St)):o(``,!0)]),_:1},8,[`content`])]),e(`div`,Ct,[n.modelValue?.request?.prompt?(h(),s(`p`,wt,[r(i(n.modelValue?.request?.prompt)+` `,1),n.modelValue?.response?o(``,!0):(h(),s(`span`,Tt,` - (`+i(n.$t(`luma.status.pending`))+`) `,1)),n.modelValue?.response?.state===`processing`||n.modelValue?.response?.state===`pending`?(h(),s(`span`,Et,` - (`+i(n.$t(`luma.status.processing`))+`) `,1)):o(``,!0)])):o(``,!0)]),n.modelValue?.response?.success===!0?(h(),s(`div`,Dt,[n.modelValue.response.video_url?(h(),s(`div`,Ot,[a(y,{src:n.modelValue.response.video_url},null,8,[`src`])])):o(``,!0),n.modelValue?.response&&!n.config?.custom?(h(),s(`div`,kt,[a(v,{class:`box-item`,effect:`dark`,content:n.$t(`luma.message.extendVideo`),placement:`top-start`},{default:p(()=>[a(b,{type:`info`,size:`small`,class:`btn-action`,onClick:c[1]||=t(e=>n.onExtend(e,n.modelValue?.response),[`stop`])},{default:p(()=>[r(i(n.$t(`luma.button.extend`)),1)]),_:1})]),_:1},8,[`content`]),a(v,{class:`box-item`,effect:`dark`,content:n.$t(`luma.message.downloadVideo`),placement:`top-start`},{default:p(()=>[a(b,{type:`info`,size:`small`,class:`btn-action`,onClick:c[2]||=t(e=>n.onDownload(n.modelValue?.response?.video_url),[`stop`])},{default:p(()=>[r(i(n.$t(`luma.button.download`)),1)]),_:1})]),_:1},8,[`content`]),a(x,{path:`/luma/videos`,body:n.modelValue?.request},null,8,[`body`])])):o(``,!0),a(T,{closable:!1,class:`mt-2 success`},{default:p(()=>[e(`p`,At,[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(C,{content:n.modelValue?.id},null,8,[`content`])]),n.modelValue?.elapsed?(h(),s(`p`,jt,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0)]),_:1})])):o(``,!0),n.modelValue?.response?.state===`failed`||n.modelValue?.response?.success===!1?(h(),s(`div`,Mt,[a(T,{closable:!1,class:`failure`},{template:p(()=>[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.failure`)),1)]),default:p(()=>[e(`p`,Nt,[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(C,{content:n.modelValue?.id},null,8,[`content`])]),e(`p`,$,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(C,{content:n.modelValue?.response?.error?.message},null,8,[`content`])]),n.modelValue?.elapsed?(h(),s(`p`,Pt,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e(`p`,Ft,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.traceId`))+`: `+i(n.modelValue?.trace_id)+` `,1),a(C,{content:n.modelValue?.response?.trace_id},null,8,[`content`])])]),_:1})])):o(``,!0),!n.modelValue?.response||n.modelValue?.response?.state===`processing`||n.modelValue?.response?.state===`pending`?(h(),s(`div`,It,[a(T,{closable:!1,class:`info`},{template:p(()=>[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(n.modelValue?.response?`luma.status.processing`:`luma.status.pending`)),1)]),default:p(()=>[e(`p`,Lt,[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(C,{content:n.modelValue?.id},null,8,[`content`])])]),_:1})])):o(``,!0)])])}var zt=_({name:`RecentPanel`,components:{BotPlaceholder:ie,TaskPreview:j(gt,[[`render`,Rt],[`__scopeId`,`data-v-6411e1a8`]]),NoTasks:X,ScrollList:Y},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`,`extend`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.luma?.tasks,items:this.$store.state.luma?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Bt={key:0},Vt={key:2,class:`w-full h-full flex items-center justify-center`};function Ht(e,t,n,r,i,u){let d=l(`bot-placeholder`),g=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return h(),s(c,null,[e.tasks?.items===void 0?(h(),s(`div`,Bt,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(h(),f(_,{key:1,ref:`scrollList`,class:`tasks w-full h-full overflow-y-auto`,loading:e.loading,onReachTop:t[1]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(h(!0),s(c,null,m(e.tasks?.items,n=>(h(),f(g,{key:n.id,"model-value":n,onExtend:t[0]||=t=>e.$emit(`extend`)},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(h(),s(`div`,Vt,[a(v)])):o(``,!0)],64)}var Ut=_({name:`LumaIndex`,components:{ConfigPanel:ht,Layout:ue,RecentPanel:j(zt,[[`render`,Ht]])},mixins:[M],inject:[`initialized`],emits:[`extend`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.luma?.status?.getApplications===R.Request},tasksLoading(){return this.$store.state.luma?.status?.getTasks===R.Request||this.fetchingTasks},credential(){return this.$store.state.luma.credential},config(){return this.$store.state.luma.config},application(){return this.$store.state.luma.application},tasks(){return this.$store.state.luma.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await Z({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`luma/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`luma/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){console.debug(`scrolling down`),await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`luma/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!te(this.uploadTracker,e=>this.$t(e),e=>P.warning(e)))return;let e={...this.config,async:!0};if(!this.hasText(e.prompt)){P.error(this.$t(`luma.message.promptRequired`));return}if(e.prompt=e.prompt?.trim(),!ne())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}P.info(this.$t(`luma.message.startingTask`)),ee(`luma`,I.generate(e,{token:t})).then(()=>{P.success(this.$t(`luma.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?P.error(this.$t(`luma.message.usedUp`)):P.error(this.$t(`luma.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()},hasText(e){return typeof e==`string`&&e.trim().length>0}}});function Wt(e,t,n,r,i,o){let s=l(`config-panel`),c=l(`recent-panel`),u=l(`layout`);return h(),f(u,null,{config:p(()=>[a(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:p(()=>[a(c,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop,onExtend:t[0]||=t=>e.$emit(`extend`)},null,8,[`loading`,`onReachTop`])]),_:1})}var Gt=j(Ut,[[`render`,Wt]]);export{Gt as default};
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,it as d,j as f,mt as p,rt as m,tt as h,x as g,z as _}from"./vendor-chart-Dw-P17PN.js";import{t as v}from"./upload-CpQZXXAs.js";import{t as y}from"./tooltip-BkfE-OPy.js";import{t as b}from"./alert-CGlgRfki.js";import{t as x}from"./drawer-QBoU8nxO.js";import{t as S}from"./switch-m7gZYlt1.js";import{t as C}from"./clock-zti2yB4i.js";import{r as w,t as T}from"./PromptTextarea-CzDSJsNX.js";import{t as E}from"./info-3w5H61Q_.js";import{t as D}from"./trash-2-DkaBo9Es.js";import{t as O}from"./triangle-alert-20nV5f9K.js";import{t as k}from"./upload-C9j6ilon.js";import{t as A}from"./wand-sparkles-DMJRJli7.js";import"./constants-7uZLiijT.js";import{E as j,Gt as M,Kt as N,Sr as ee,Ti as P,Ut as te,Wt as F,Xn as I,Yt as L,ci as R,di as z,in as ne,qt as B,wi as V,zi as H}from"./index-Epdiy8xX.js";import{t as U}from"./CopyToClipboard-BdIqafoA.js";import{t as W}from"./FilePreview-CgAHQdn-.js";import{t as G}from"./ImagePreview-DAbb9mev.js";import{n as K}from"./taskDrawerMixin-DyAUhFEq.js";import{t as q}from"./Consumption-DM30aHNi.js";import{a as J,n as Y,r as X,t as Z}from"./pagination-D_RBhR5o.js";import{t as Q}from"./VideoPlayer-CUeenPs-.js";import{t as re}from"./ApiCodeButton-D7cSIduv.js";import{t as ie}from"./BotPlaceholder-DJ5uzTBq.js";var ae=_({name:`LayoutLuma`,components:{MagicIcon:A,ElDrawer:x,ElButton:H},mixins:[K]}),oe={class:`main flex flex-row flex-1`},se={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)]`},ce={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function le(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),_=l(`el-drawer`);return h(),s(`div`,oe,[e(`div`,se,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,ce,[d(t.$slots,`result`,{},void 0,!0)]),u(a(m,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[g,!t.tasksEmpty]]),a(_,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`drawer generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var ue=j(ae,[[`render`,le],[`__scopeId`,`data-v-d13d43a9`]]),de=_({name:`EnhancementSelector`,components:{ElSwitch:S,InfoIcon:J},computed:{value:{get(){return this.$store.state.luma?.config?.enhancement},set(e){console.debug(`set enhancement`,e),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,enhancement:e})}}},mounted(){this.value===void 0&&(this.value=!0)}}),fe={class:`relative`},pe={class:`flex justify-between`},me={class:`flex justify-start items-center`},he={class:`text-sm font-bold`},ge={class:`flex justify-end items-center`};function _e(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return h(),s(`div`,fe,[e(`div`,pe,[e(`div`,me,[e(`span`,he,i(t.$t(`luma.name.enhancement`)),1),a(d,{content:t.$t(`luma.description.enhancement`)},null,8,[`content`])]),e(`div`,ge,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])])])}var ve=j(de,[[`render`,_e]]),ye=_({name:`CustomSelector`,components:{ElSwitch:S,InfoIcon:J},computed:{value:{get(){return this.$store.state.luma?.config?.custom},set(e){console.debug(`set custom`,e),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,custom:e})}}},mounted(){this.value===void 0&&(this.value=!1)}}),be={class:`relative`},xe={class:`flex justify-between`},Se={class:`flex justify-start items-center`},Ce={class:`text-sm font-bold`},we={class:`flex justify-end items-center`};function Te(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return h(),s(`div`,be,[e(`div`,xe,[e(`div`,Se,[e(`span`,Ce,i(t.$t(`luma.name.custom`)),1),a(d,{content:t.$t(`luma.description.custom`)},null,8,[`content`])]),e(`div`,we,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])])])}var Ee=j(ye,[[`render`,Te]]),De=_({name:`LoopSelector`,components:{ElSwitch:S,InfoIcon:J},computed:{value:{get(){return this.$store.state.luma?.config?.loop},set(e){console.debug(`set loop`,e),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,loop:e})}}},mounted(){this.value===void 0&&(this.value=!1)}}),Oe={class:`relative`},ke={class:`flex justify-between`},Ae={class:`flex justify-start items-center`},je={class:`text-sm font-bold`},Me={class:`flex justify-end items-center`};function Ne(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return h(),s(`div`,Oe,[e(`div`,ke,[e(`div`,Ae,[e(`span`,je,i(t.$t(`luma.name.loop`)),1),a(d,{content:t.$t(`luma.description.loop`)},null,8,[`content`])]),e(`div`,Me,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])])])}var Pe=j(De,[[`render`,Ne]]),Fe=_({name:`EndImage`,components:{UploadIcon:k,ElUpload:v,ElButton:H,ImagePreview:G,InfoIcon:J},mixins:[B,N,F],data(){return{fileList:[],uploadUrl:z()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state?.luma?.config?.start_image_url},set(){}}},mounted(){this.value||=void 0,this.onSetEndImageUrl()},methods:{onExceed(){P.warning(this.$t(`luma.message.uploadReferencesExceed`))},onError(){P.error(this.$t(`luma.message.uploadReferencesError`))},onSetEndImageUrl(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),Ie={class:`relative`},Le={class:`flex justify-between`},Re={class:`flex justify-start items-center`},ze={class:`text-sm font-bold`};function Be(t,n,c,u,d,m){let g=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return h(),s(`div`,Ie,[e(`div`,Le,[e(`div`,Re,[e(`span`,ze,i(t.$t(`luma.name.endImageUrl`)),1),a(g,{content:t.$t(`luma.description.endImageUrl`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:5,class:`upload-wrapper`,multiple:!1,action:t.uploadUrl,"list-type":`picture`,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(h(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`luma.button.uploadEndImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Ve=j(Fe,[[`render`,Be],[`__scopeId`,`data-v-b8b121be`]]),He=_({name:`StartImage`,components:{UploadIcon:k,ElUpload:v,ElButton:H,ImagePreview:G,InfoIcon:J},mixins:[B,N,F],data(){return{fileList:[],uploadUrl:z()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state?.luma?.config?.start_image_url},set(){}}},mounted(){this.value||=void 0,this.onSetStartImageUrl()},methods:{onExceed(){P.warning(this.$t(`luma.message.uploadReferencesExceed`))},onError(){P.error(this.$t(`luma.message.uploadReferencesError`))},onSetStartImageUrl(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),Ue={class:`relative`},We={class:`flex justify-between`},Ge={class:`flex justify-start items-center`},Ke={class:`text-sm font-bold`};function qe(t,n,c,u,d,m){let g=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return h(),s(`div`,Ue,[e(`div`,We,[e(`div`,Ge,[e(`span`,Ke,i(t.$t(`luma.name.startImageUrl`)),1),a(g,{content:t.$t(`luma.description.startImageUrl`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:5,class:`upload-wrapper`,multiple:!1,action:t.uploadUrl,"list-type":`picture`,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.percentage==null?o(``,!0):(h(),f(_,{key:0,url:e.url||e.response.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`luma.button.uploadStartImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Je=j(He,[[`render`,qe],[`__scopeId`,`data-v-5bb7722a`]]),Ye=_({name:`UploadVideo`,components:{UploadIcon:k,ElUpload:v,ElButton:H,InfoIcon:J,FilePreview:W},mixins:[N,F],data(){return{fileList:[],uploadUrl:z()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state.luma?.config?.video_url},set(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,video_url:e})}}},mounted(){this.value||=void 0},methods:{onExceed(){P.warning(this.$t(`luma.message.uploadVideoExceed`))},onError(){P.error(this.$t(`luma.message.uploadVideoError`))},beforeUpload(e){let t=e.type===`video/mp4`,n=e.size/1024/1024<10;return t?n?!0:(P.error(this.$t(`luma.message.uploadVideoSizeExceed`)),!1):(P.error(this.$t(`luma.message.uploadVideoTypeFailed`)),!1)},onSetVideoUrl(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,video_url:e,action:`extend`})},async onSuccess(){this.onSetVideoUrl()}}}),Xe={class:`relative`},Ze={class:`flex justify-between`},Qe={class:`flex justify-start items-center`},$e={class:`text-sm font-bold`};function et(t,n,c,u,d,m){let g=l(`info-icon`),_=l(`file-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return h(),s(`div`,Xe,[e(`div`,Ze,[e(`div`,Qe,[e(`span`,$e,i(t.$t(`luma.name.videoUrl`)),1),a(g,{content:t.$t(`luma.description.videoUrl`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.mp4`,name:`file`,class:`value`,"show-file-list":!0,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},{file:p(({file:e})=>[e.percentage==null?o(``,!0):(h(),f(_,{key:0,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`luma.button.uploadVideoUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var tt=j(Ye,[[`render`,et],[`__scopeId`,`data-v-2189fc52`]]),nt=_({name:`PromptInput`,components:{PromptTextarea:T},computed:{prompt:{get(){return this.$store.state.luma?.config?.prompt},set(e){this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,prompt:e})}}},mounted(){this.prompt||=``}});function rt(e,t,n,r,i,a){let o=l(`prompt-textarea`);return h(),f(o,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`luma.name.prompt`),info:e.$t(`luma.description.prompt`),placeholder:e.$t(`luma.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var it=j(nt,[[`render`,rt]]),at=_({name:`ExtendFromInput`,components:{VideoPlayer:Q},props:{modelValue:{type:Object,required:!1,default:void 0}},data(){return{options:{quality:{default:`1080p`}}}},computed:{config(){return this.$store.state.luma?.config}}}),ot={class:`relative`},st={class:`flex mb-2`},ct={class:`text-sm font-bold`};function lt(t,n,r,a,c,u){let d=l(`video-player`);return h(),s(`div`,ot,[e(`div`,st,[e(`span`,ct,i(t.$t(`luma.name.extend`)),1)]),e(`div`,null,[t.config?.video_url?(h(),f(d,{key:0,src:t.config?.video_url},null,8,[`src`])):o(``,!0)])])}var ut=_({name:`ConfigPanel`,components:{MagicIcon:A,LoopSelector:Pe,StartImageInput:Je,EndImageInput:Ve,EnhancementSelector:ve,ElButton:H,PromptInput:it,ExtendFromInput:j(at,[[`render`,lt]]),CustomSelector:Ee,UploadVideo:tt,Consumption:q},emits:[`generate`],computed:{config(){return this.$store.state.luma?.config},consumption(){return L(this.config,this.service?.cost)},service(){return this.$store.state.luma?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),dt={class:`flex flex-col h-full`},ft={class:`flex-1 overflow-y-auto p-5`},pt={class:`flex flex-col items-center justify-center px-5 pb-5`};function mt(t,n,c,u,d,m){let g=l(`extend-from-input`),_=l(`prompt-input`),v=l(`custom-selector`),y=l(`upload-video`),b=l(`start-image-input`),x=l(`end-image-input`),S=l(`enhancement-selector`),C=l(`loop-selector`),w=l(`consumption`),T=l(`magic-icon`),E=l(`el-button`);return h(),s(`div`,dt,[e(`div`,ft,[t.config?.video_id||t.config?.video_url?(h(),f(g,{key:0,class:`mb-4`})):o(``,!0),a(_,{class:`mb-4`}),t.config?.video_id?o(``,!0):(h(),f(v,{key:1,class:`mb-4`})),t.config?.custom?(h(),f(y,{key:2,class:`mb-4`})):o(``,!0),!(t.config?.video_id||t.config?.video_url)&&!t.config?.custom?(h(),f(b,{key:3,class:`mb-4`})):o(``,!0),a(x,{class:`mb-4`}),a(S,{class:`mb-4`}),a(C,{class:`mb-4`})]),e(`div`,pt,[a(w,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),t.config?.video_url!==void 0||t.config?.custom?(h(),f(E,{key:0,type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(T,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`luma.button.extend`)),1)]),_:1},8,[`onClick`])):(h(),f(E,{key:1,type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(T,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`luma.button.generate`)),1)]),_:1},8,[`onClick`]))])])}var ht=j(ut,[[`render`,mt]]),gt=_({name:`TaskPreview`,components:{DeleteIcon:D,ChannelIcon:w,InfoIcon:E,MagicIcon:A,TimeIcon:C,WarningIcon:O,CopyToClipboard:U,ElAlert:b,VideoPlayer:Q,ElTooltip:y,ElButton:H,ApiCodeButton:re},props:{modelValue:{type:Object,required:!0}},emits:[`extend`],data(){return{}},computed:{application(){return this.$store.state.luma?.application},config(){return this.$store.state.luma?.config}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await V.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(`luma/deleteTask`,{id:e}),P.success(this.$t(`common.message.deleteTaskSuccess`))}catch{P.error(this.$t(`common.message.deleteTaskFailed`))}}},onExtend(e,t){console.debug(`set config`,t),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,video_id:t.video_id,prompt:t.prompt,action:`extend`,thumbnail_url:t.thumbnail_url,video_url:t.video_url}),this.$emit(`extend`)},onDownload(e){window.open(e,`_blank`)}}}),_t={class:`preview`},vt={class:`left`},yt={class:`main`},bt={class:`bot`},xt={class:`datetime`},St=[`aria-label`],Ct={class:`info`},wt={key:0,class:`prompt mt-2`},Tt={key:0},Et={key:1},Dt={key:0,class:n({content:!0,failed:!0})},Ot={key:0,class:`mb-4`},kt={key:1,class:n({operations:!0,"mt-2":!0,"mb-4":!0})},At={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},jt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Mt={key:1,class:n({content:!0})},Nt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Pt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ft={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},It={key:2,class:n({content:!0})},Lt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function Rt(n,c,u,d,f,m){let g=l(`capability-presentation`),_=l(`delete-icon`),v=l(`el-tooltip`),y=l(`video-player`),b=l(`el-button`),x=l(`api-code-button`),S=l(`magic-icon`),C=l(`copy-to-clipboard`),w=l(`time-icon`),T=l(`el-alert`),E=l(`warning-icon`),D=l(`info-icon`),O=l(`channel-icon`);return h(),s(`div`,_t,[e(`div`,vt,[a(g,{capability:`luma`,part:`avatar`,class:`avatar`})]),e(`div`,yt,[e(`div`,bt,[a(g,{capability:`luma`,part:`name`}),e(`span`,xt,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?(h(),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,St)):o(``,!0)]),_:1},8,[`content`])]),e(`div`,Ct,[n.modelValue?.request?.prompt?(h(),s(`p`,wt,[r(i(n.modelValue?.request?.prompt)+` `,1),n.modelValue?.response?o(``,!0):(h(),s(`span`,Tt,` - (`+i(n.$t(`luma.status.pending`))+`) `,1)),n.modelValue?.response?.state===`processing`||n.modelValue?.response?.state===`pending`?(h(),s(`span`,Et,` - (`+i(n.$t(`luma.status.processing`))+`) `,1)):o(``,!0)])):o(``,!0)]),n.modelValue?.response?.success===!0?(h(),s(`div`,Dt,[n.modelValue.response.video_url?(h(),s(`div`,Ot,[a(y,{src:n.modelValue.response.video_url},null,8,[`src`])])):o(``,!0),n.modelValue?.response&&!n.config?.custom?(h(),s(`div`,kt,[a(v,{class:`box-item`,effect:`dark`,content:n.$t(`luma.message.extendVideo`),placement:`top-start`},{default:p(()=>[a(b,{type:`info`,size:`small`,class:`btn-action`,onClick:c[1]||=t(e=>n.onExtend(e,n.modelValue?.response),[`stop`])},{default:p(()=>[r(i(n.$t(`luma.button.extend`)),1)]),_:1})]),_:1},8,[`content`]),a(v,{class:`box-item`,effect:`dark`,content:n.$t(`luma.message.downloadVideo`),placement:`top-start`},{default:p(()=>[a(b,{type:`info`,size:`small`,class:`btn-action`,onClick:c[2]||=t(e=>n.onDownload(n.modelValue?.response?.video_url),[`stop`])},{default:p(()=>[r(i(n.$t(`luma.button.download`)),1)]),_:1})]),_:1},8,[`content`]),a(x,{path:`/luma/videos`,body:n.modelValue?.request},null,8,[`body`])])):o(``,!0),a(T,{closable:!1,class:`mt-2 success`},{default:p(()=>[e(`p`,At,[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(C,{content:n.modelValue?.id},null,8,[`content`])]),n.modelValue?.elapsed?(h(),s(`p`,jt,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0)]),_:1})])):o(``,!0),n.modelValue?.response?.state===`failed`||n.modelValue?.response?.success===!1?(h(),s(`div`,Mt,[a(T,{closable:!1,class:`failure`},{template:p(()=>[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.failure`)),1)]),default:p(()=>[e(`p`,Nt,[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(C,{content:n.modelValue?.id},null,8,[`content`])]),e(`p`,$,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(C,{content:n.modelValue?.response?.error?.message},null,8,[`content`])]),n.modelValue?.elapsed?(h(),s(`p`,Pt,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e(`p`,Ft,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.traceId`))+`: `+i(n.modelValue?.trace_id)+` `,1),a(C,{content:n.modelValue?.response?.trace_id},null,8,[`content`])])]),_:1})])):o(``,!0),!n.modelValue?.response||n.modelValue?.response?.state===`processing`||n.modelValue?.response?.state===`pending`?(h(),s(`div`,It,[a(T,{closable:!1,class:`info`},{template:p(()=>[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(n.modelValue?.response?`luma.status.processing`:`luma.status.pending`)),1)]),default:p(()=>[e(`p`,Lt,[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(C,{content:n.modelValue?.id},null,8,[`content`])])]),_:1})])):o(``,!0)])])}var zt=_({name:`RecentPanel`,components:{BotPlaceholder:ie,TaskPreview:j(gt,[[`render`,Rt],[`__scopeId`,`data-v-6411e1a8`]]),NoTasks:X,ScrollList:Y},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`,`extend`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.luma?.tasks,items:this.$store.state.luma?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Bt={key:0},Vt={key:2,class:`w-full h-full flex items-center justify-center`};function Ht(e,t,n,r,i,u){let d=l(`bot-placeholder`),g=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return h(),s(c,null,[e.tasks?.items===void 0?(h(),s(`div`,Bt,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(h(),f(_,{key:1,ref:`scrollList`,class:`tasks w-full h-full overflow-y-auto`,loading:e.loading,onReachTop:t[1]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(h(!0),s(c,null,m(e.tasks?.items,n=>(h(),f(g,{key:n.id,"model-value":n,onExtend:t[0]||=t=>e.$emit(`extend`)},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(h(),s(`div`,Vt,[a(v)])):o(``,!0)],64)}var Ut=_({name:`LumaIndex`,components:{ConfigPanel:ht,Layout:ue,RecentPanel:j(zt,[[`render`,Ht]])},mixins:[M],inject:[`initialized`],emits:[`extend`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.luma?.status?.getApplications===R.Request},tasksLoading(){return this.$store.state.luma?.status?.getTasks===R.Request||this.fetchingTasks},credential(){return this.$store.state.luma.credential},config(){return this.$store.state.luma.config},application(){return this.$store.state.luma.application},tasks(){return this.$store.state.luma.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await Z({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`luma/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`luma/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){console.debug(`scrolling down`),await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`luma/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!te(this.uploadTracker,e=>this.$t(e),e=>P.warning(e)))return;let e={...this.config,async:!0};if(!this.hasText(e.prompt)){P.error(this.$t(`luma.message.promptRequired`));return}if(e.prompt=e.prompt?.trim(),!ne())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}P.info(this.$t(`luma.message.startingTask`)),ee(`luma`,I.generate(e,{token:t})).then(()=>{P.success(this.$t(`luma.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?P.error(this.$t(`luma.message.usedUp`)):P.error(this.$t(`luma.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()},hasText(e){return typeof e==`string`&&e.trim().length>0}}});function Wt(e,t,n,r,i,o){let s=l(`config-panel`),c=l(`recent-panel`),u=l(`layout`);return h(),f(u,null,{config:p(()=>[a(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:p(()=>[a(c,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop,onExtend:t[0]||=t=>e.$emit(`extend`)},null,8,[`loading`,`onReachTop`])]),_:1})}var Gt=j(Ut,[[`render`,Wt]]);export{Gt 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-BRfalyTE.js";import{t as h}from"./check-DLy43fvq.js";import{t as g}from"./external-link-DDFJs-Cv.js";import{t as ee}from"./globe-BiScxUrB.js";import{t as te}from"./wand-sparkles-Dy3mNzCY.js";import{A as _,E as v,cn as y,i as b,r as x,zi as S}from"./index-BZkM5S_f.js";var C=(e,t)=>({zh:e,en:t}),w=`https://platform.acedata.cloud/documents/studio-overview`,T=new Set([`qrart`,`pika`]),E={auth:C(`https://cdn.acedata.cloud/ae2dceaacc.png`,`https://cdn.acedata.cloud/61f717db6c.png`),branding:C(`https://cdn.acedata.cloud/d54f145c5c.png`,`https://cdn.acedata.cloud/6d59646c4d.png`),capabilities:C(`https://cdn.acedata.cloud/2369fa145f.png`,`https://cdn.acedata.cloud/082a69ca54.png`),digitalHumanDesktop:C(`https://cdn.acedata.cloud/b9ee357c33.png`,`https://cdn.acedata.cloud/a0228b206a.png`),distributionDesktop:C(`https://cdn.acedata.cloud/6c25c74a49.png`,`https://cdn.acedata.cloud/a1e62e4425.png`),klingDesktop:C(`https://cdn.acedata.cloud/e45bc3e2e2.png`,`https://cdn.acedata.cloud/03d73b16ce.png`),klingMobile:C(`https://cdn.acedata.cloud/10dc431467.png`,`https://cdn.acedata.cloud/ea10c8e395.png`),maestroDesktop:C(`https://cdn.acedata.cloud/1791398216.png`,`https://cdn.acedata.cloud/7854458ee3.png`),nanoDesktop:C(`https://cdn.acedata.cloud/82252ec647.png`,`https://cdn.acedata.cloud/e047aea679.png`),nanoMobile:C(`https://cdn.acedata.cloud/c7da634c96.png`,`https://cdn.acedata.cloud/dc5b2cca1d.png`),subsites:C(`https://cdn.acedata.cloud/bf4356fffc.png`,`https://cdn.acedata.cloud/b1948ec2a2.png`),sunoDesktop:C(`https://cdn.acedata.cloud/8ce288065b.png`,`https://cdn.acedata.cloud/1eebf72e3a.png`)},D=[{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:w,desktop:E.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:w,desktop:E.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:w,desktop:E.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:w,desktop:E.distributionDesktop,bulletKeys:[`index.benefit.distribution.noBarrier`,`index.benefit.distribution.levels`,`index.benefit.distribution.withdrawal`]}],O=[{key:`image`,featureKeys:[`nanobanana`],eyebrowKey:`index.eyebrow.image`,titleKey:`index.title.image`,subtitleKey:`index.subtitle.image`,buttonKey:`index.button.try`,path:`/nanobanana`,desktop:E.nanoDesktop,mobile:E.nanoMobile},{key:`music`,featureKeys:[`suno`],eyebrowKey:`index.eyebrow.music`,titleKey:`index.title.music`,subtitleKey:`index.subtitle.music`,buttonKey:`index.button.try`,path:`/suno`,desktop:E.sunoDesktop},{key:`workflow`,featureKeys:[`maestro`],eyebrowKey:`index.eyebrow.workflow`,titleKey:`index.title.workflow`,subtitleKey:`index.subtitle.workflow`,buttonKey:`index.button.try`,path:`/maestro`,desktop:E.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:E.digitalHumanDesktop}],k=p({name:`Index`,components:{ElButton:S,ConfirmIcon:h,ExternalLinkIcon:g,GlobeIcon:ee,MagicIcon:te,NextIcon:m},data(){return{}},computed:{site(){return this.$store.state.site},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`||y()||t},capabilityCount(){return this.site?.id?this.capabilityCards.length:b.length},isChineseLocale(){return String(this.$i18n.locale).toLowerCase()===`zh-cn`},heroDesktop(){return this.localizedImage(E.klingDesktop)},heroMobile(){return this.localizedImage(E.klingMobile)},businessShowcases(){return D.filter(e=>e.key!==`subsites`||this.isMainSite).map(e=>this.resolveShowcase(e))},creationShowcases(){return(this.isMainSite?O:O.filter(e=>e.featureKeys?.some(e=>this.enabledFeatures[e]?.enabled))).map(e=>this.resolveShowcase(e))},capabilityCards(){return(this.isMainSite?b:b.filter(e=>this.enabledFeatures[e]?.enabled)).filter(e=>!T.has(e)).map(e=>({key:e,label:this.$t(`site.field.features${e.charAt(0).toUpperCase()}${e.slice(1)}`),icon:x[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(_())},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}}}),A={class:`landing`},j={class:`hero`},M={class:`container hero__content`},N={class:`hero__copy`},P={class:`eyebrow`},F={class:`hero__headline`},I={class:`hero__summary`},L={class:`hero__actions`},R={class:`hero__stats`},z={class:`hero__screens`},B={class:`macbook-frame hero__desktop`,"aria-hidden":`true`},V={class:`macbook-frame__lid`},H={class:`macbook-frame__viewport`},U=[`src`],W={class:`phone-device hero__mobile`,"aria-hidden":`true`},G={class:`phone-device__screen`},K=[`src`],q={id:`platform`,class:`section platform-section`},J={class:`container`},Y={class:`section-heading section-heading--wide`},X={class:`eyebrow eyebrow--light`},Z=[`id`],Q={class:`platform-story__copy`},ne={class:`story-number`},re={class:`story-kicker`},ie={class:`feature-points`},ae={class:`screen-pair screen-pair--large`},oe={class:`macbook-frame screen-pair__desktop`},se={class:`macbook-frame__lid`},ce={class:`macbook-frame__viewport`},le=[`src`,`alt`],ue={id:`creation`,class:`section creation-section`},de={class:`container`},fe={class:`section-heading`},pe={class:`eyebrow eyebrow--light`},me={class:`creation-grid`},he={class:`macbook-frame screen-pair__desktop`},ge={class:`macbook-frame__lid`},_e={class:`macbook-frame__viewport`},ve=[`src`,`alt`],ye={key:0,class:`phone-device screen-pair__mobile`},be={class:`phone-device__screen`},xe=[`src`],Se={class:`creation-item__copy`},Ce={class:`story-kicker`},we=[`onClick`],Te={class:`section capability-section`},Ee={class:`container`},De={class:`section-heading section-heading--wide`},$={class:`eyebrow eyebrow--light`},Oe={class:`capability-directory`},ke=[`src`],Ae={class:`final-cta`},je={class:`container final-cta__content`},Me={class:`story-kicker`},Ne={class:`final-cta__actions`};function Pe(p,m,h,g,ee,te){let _=c(`el-button`),v=c(`magic-icon`),y=c(`globe-icon`),b=c(`confirm-icon`),x=c(`next-icon`),S=c(`external-link-icon`);return f(),o(`div`,A,[e(`section`,j,[m[9]||=e(`div`,{class:`hero__grid`},null,-1),e(`div`,M,[e(`div`,N,[e(`span`,P,r(p.$t(`index.badge.hero`)),1),e(`h1`,null,r(p.site?.title),1),e(`p`,F,r(p.$t(`index.subtitle.banner`)),1),e(`p`,I,r(p.$t(`index.subtitle.hero`)),1),e(`div`,L,[i(_,{type:`primary`,size:`large`,onClick:p.onStart},{default:u(()=>[n(r(p.$t(`common.button.startForFree`)),1)]),_:1},8,[`onClick`]),i(_,{size:`large`,onClick:p.scrollToPlatform},{default:u(()=>[n(r(p.$t(`index.button.explore`)),1)]),_:1},8,[`onClick`])]),e(`dl`,R,[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)]),e(`div`,null,[m[3]||=e(`dt`,null,`24%`,-1),e(`dd`,null,r(p.$t(`index.stat.commission`)),1)])])]),e(`div`,z,[e(`div`,B,[e(`div`,V,[m[4]||=e(`span`,{class:`macbook-frame__camera`},null,-1),e(`div`,H,[e(`img`,{src:p.heroDesktop,alt:``},null,8,U)]),m[5]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[6]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)]),e(`div`,W,[m[8]||=e(`span`,{class:`phone-device__speaker`},null,-1),e(`div`,G,[m[7]||=e(`span`,{class:`phone-device__island`},null,-1),e(`img`,{src:p.heroMobile,alt:``},null,8,K)])]),e(`button`,{type:`button`,class:`hero__note hero__note--top`,onClick:m[0]||=(...e)=>p.scrollToCreation&&p.scrollToCreation(...e)},[i(v,{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(y,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(`index.note.customDomain`)),1)])):a(``,!0)])])]),e(`section`,q,[e(`div`,J,[e(`div`,Y,[e(`span`,X,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`,Q,[e(`span`,ne,`0`+r(c+1),1),e(`p`,re,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`,ie,[(f(!0),o(s,null,d(a.bulletKeys,t=>(f(),o(`li`,{key:t},[i(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(t)),1)]))),128))]),a.href?(f(),l(_,{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(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:2},1032,[`href`])):(f(),l(_,{key:1,type:`primary`,plain:``,onClick:e=>p.openShowcase(a)},{default:u(()=>[n(r(p.$t(a.buttonKey))+` `,1),i(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:2},1032,[`onClick`]))]),e(`div`,ae,[e(`div`,oe,[e(`div`,se,[m[10]||=e(`span`,{class:`macbook-frame__camera`,"aria-hidden":`true`},null,-1),e(`div`,ce,[e(`img`,{src:a.desktop,alt:p.$t(a.titleKey),loading:`lazy`},null,8,le)]),m[11]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[12]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)])])],10,Z))),128))])]),e(`section`,ue,[e(`div`,de,[e(`div`,fe,[e(`span`,pe,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`,me,[(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`,he,[e(`div`,ge,[m[13]||=e(`span`,{class:`macbook-frame__camera`,"aria-hidden":`true`},null,-1),e(`div`,_e,[e(`img`,{src:n.desktop,alt:p.$t(n.titleKey),loading:`lazy`},null,8,ve)]),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`,ye,[m[17]||=e(`span`,{class:`phone-device__speaker`,"aria-hidden":`true`},null,-1),e(`div`,be,[m[16]||=e(`span`,{class:`phone-device__island`,"aria-hidden":`true`},null,-1),e(`img`,{src:n.mobile,alt:``,loading:`lazy`},null,8,xe)])])):a(``,!0)],2),e(`div`,Se,[e(`div`,null,[e(`p`,Ce,r(p.$t(n.eyebrowKey)),1),e(`h3`,null,r(p.$t(n.titleKey)),1)]),i(S,{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,we)])]))),128))])])]),e(`section`,Te,[e(`div`,Ee,[e(`div`,De,[e(`span`,$,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`,Oe,[(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,ke),e(`span`,null,r(t.label),1)]))),128))])])]),e(`section`,Ae,[e(`div`,je,[e(`div`,null,[e(`p`,Me,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`,Ne,[i(_,{type:`primary`,size:`large`,onClick:p.onStart},{default:u(()=>[n(r(p.$t(`common.button.startForFree`)),1)]),_:1},8,[`onClick`]),p.isMainSite?(f(),l(_,{key:0,size:`large`,onClick:p.openSubsites},{default:u(()=>[n(r(p.$t(`index.button.createSubsite`)),1)]),_:1},8,[`onClick`])):a(``,!0)])])])])}var Fe=v(k,[[`render`,Pe],[`__scopeId`,`data-v-82c57205`]]);export{Fe 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-D3f3Jy5o.js";import{t as h}from"./check-BcE4H_K5.js";import{t as g}from"./external-link-cKxOFu-J.js";import{t as ee}from"./globe-Bm2uKXSh.js";import{t as te}from"./wand-sparkles-DMJRJli7.js";import{A as _,E as v,cn as y,i as b,r as x,zi as S}from"./index-Epdiy8xX.js";var C=(e,t)=>({zh:e,en:t}),w=`https://platform.acedata.cloud/documents/studio-overview`,T=new Set([`qrart`,`pika`]),E={auth:C(`https://cdn.acedata.cloud/ae2dceaacc.png`,`https://cdn.acedata.cloud/61f717db6c.png`),branding:C(`https://cdn.acedata.cloud/d54f145c5c.png`,`https://cdn.acedata.cloud/6d59646c4d.png`),capabilities:C(`https://cdn.acedata.cloud/2369fa145f.png`,`https://cdn.acedata.cloud/082a69ca54.png`),digitalHumanDesktop:C(`https://cdn.acedata.cloud/b9ee357c33.png`,`https://cdn.acedata.cloud/a0228b206a.png`),distributionDesktop:C(`https://cdn.acedata.cloud/6c25c74a49.png`,`https://cdn.acedata.cloud/a1e62e4425.png`),klingDesktop:C(`https://cdn.acedata.cloud/e45bc3e2e2.png`,`https://cdn.acedata.cloud/03d73b16ce.png`),klingMobile:C(`https://cdn.acedata.cloud/10dc431467.png`,`https://cdn.acedata.cloud/ea10c8e395.png`),maestroDesktop:C(`https://cdn.acedata.cloud/1791398216.png`,`https://cdn.acedata.cloud/7854458ee3.png`),nanoDesktop:C(`https://cdn.acedata.cloud/82252ec647.png`,`https://cdn.acedata.cloud/e047aea679.png`),nanoMobile:C(`https://cdn.acedata.cloud/c7da634c96.png`,`https://cdn.acedata.cloud/dc5b2cca1d.png`),subsites:C(`https://cdn.acedata.cloud/bf4356fffc.png`,`https://cdn.acedata.cloud/b1948ec2a2.png`),sunoDesktop:C(`https://cdn.acedata.cloud/8ce288065b.png`,`https://cdn.acedata.cloud/1eebf72e3a.png`)},D=[{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:w,desktop:E.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:w,desktop:E.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:w,desktop:E.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:w,desktop:E.distributionDesktop,bulletKeys:[`index.benefit.distribution.noBarrier`,`index.benefit.distribution.levels`,`index.benefit.distribution.withdrawal`]}],O=[{key:`image`,featureKeys:[`nanobanana`],eyebrowKey:`index.eyebrow.image`,titleKey:`index.title.image`,subtitleKey:`index.subtitle.image`,buttonKey:`index.button.try`,path:`/nanobanana`,desktop:E.nanoDesktop,mobile:E.nanoMobile},{key:`music`,featureKeys:[`suno`],eyebrowKey:`index.eyebrow.music`,titleKey:`index.title.music`,subtitleKey:`index.subtitle.music`,buttonKey:`index.button.try`,path:`/suno`,desktop:E.sunoDesktop},{key:`workflow`,featureKeys:[`maestro`],eyebrowKey:`index.eyebrow.workflow`,titleKey:`index.title.workflow`,subtitleKey:`index.subtitle.workflow`,buttonKey:`index.button.try`,path:`/maestro`,desktop:E.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:E.digitalHumanDesktop}],k=p({name:`Index`,components:{ElButton:S,ConfirmIcon:h,ExternalLinkIcon:g,GlobeIcon:ee,MagicIcon:te,NextIcon:m},data(){return{}},computed:{site(){return this.$store.state.site},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`||y()||t},capabilityCount(){return this.site?.id?this.capabilityCards.length:b.length},isChineseLocale(){return String(this.$i18n.locale).toLowerCase()===`zh-cn`},heroDesktop(){return this.localizedImage(E.klingDesktop)},heroMobile(){return this.localizedImage(E.klingMobile)},businessShowcases(){return D.filter(e=>e.key!==`subsites`||this.isMainSite).map(e=>this.resolveShowcase(e))},creationShowcases(){return(this.isMainSite?O:O.filter(e=>e.featureKeys?.some(e=>this.enabledFeatures[e]?.enabled))).map(e=>this.resolveShowcase(e))},capabilityCards(){return(this.isMainSite?b:b.filter(e=>this.enabledFeatures[e]?.enabled)).filter(e=>!T.has(e)).map(e=>({key:e,label:this.$t(`site.field.features${e.charAt(0).toUpperCase()}${e.slice(1)}`),icon:x[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(_())},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}}}),A={class:`landing`},j={class:`hero`},M={class:`container hero__content`},N={class:`hero__copy`},P={class:`eyebrow`},F={class:`hero__headline`},I={class:`hero__summary`},L={class:`hero__actions`},R={class:`hero__stats`},z={class:`hero__screens`},B={class:`macbook-frame hero__desktop`,"aria-hidden":`true`},V={class:`macbook-frame__lid`},H={class:`macbook-frame__viewport`},U=[`src`],W={class:`phone-device hero__mobile`,"aria-hidden":`true`},G={class:`phone-device__screen`},K=[`src`],q={id:`platform`,class:`section platform-section`},J={class:`container`},Y={class:`section-heading section-heading--wide`},X={class:`eyebrow eyebrow--light`},Z=[`id`],Q={class:`platform-story__copy`},ne={class:`story-number`},re={class:`story-kicker`},ie={class:`feature-points`},ae={class:`screen-pair screen-pair--large`},oe={class:`macbook-frame screen-pair__desktop`},se={class:`macbook-frame__lid`},ce={class:`macbook-frame__viewport`},le=[`src`,`alt`],ue={id:`creation`,class:`section creation-section`},de={class:`container`},fe={class:`section-heading`},pe={class:`eyebrow eyebrow--light`},me={class:`creation-grid`},he={class:`macbook-frame screen-pair__desktop`},ge={class:`macbook-frame__lid`},_e={class:`macbook-frame__viewport`},ve=[`src`,`alt`],ye={key:0,class:`phone-device screen-pair__mobile`},be={class:`phone-device__screen`},xe=[`src`],Se={class:`creation-item__copy`},Ce={class:`story-kicker`},we=[`onClick`],Te={class:`section capability-section`},Ee={class:`container`},De={class:`section-heading section-heading--wide`},$={class:`eyebrow eyebrow--light`},Oe={class:`capability-directory`},ke=[`src`],Ae={class:`final-cta`},je={class:`container final-cta__content`},Me={class:`story-kicker`},Ne={class:`final-cta__actions`};function Pe(p,m,h,g,ee,te){let _=c(`el-button`),v=c(`magic-icon`),y=c(`globe-icon`),b=c(`confirm-icon`),x=c(`next-icon`),S=c(`external-link-icon`);return f(),o(`div`,A,[e(`section`,j,[m[9]||=e(`div`,{class:`hero__grid`},null,-1),e(`div`,M,[e(`div`,N,[e(`span`,P,r(p.$t(`index.badge.hero`)),1),e(`h1`,null,r(p.site?.title),1),e(`p`,F,r(p.$t(`index.subtitle.banner`)),1),e(`p`,I,r(p.$t(`index.subtitle.hero`)),1),e(`div`,L,[i(_,{type:`primary`,size:`large`,onClick:p.onStart},{default:u(()=>[n(r(p.$t(`common.button.startForFree`)),1)]),_:1},8,[`onClick`]),i(_,{size:`large`,onClick:p.scrollToPlatform},{default:u(()=>[n(r(p.$t(`index.button.explore`)),1)]),_:1},8,[`onClick`])]),e(`dl`,R,[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)]),e(`div`,null,[m[3]||=e(`dt`,null,`24%`,-1),e(`dd`,null,r(p.$t(`index.stat.commission`)),1)])])]),e(`div`,z,[e(`div`,B,[e(`div`,V,[m[4]||=e(`span`,{class:`macbook-frame__camera`},null,-1),e(`div`,H,[e(`img`,{src:p.heroDesktop,alt:``},null,8,U)]),m[5]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[6]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)]),e(`div`,W,[m[8]||=e(`span`,{class:`phone-device__speaker`},null,-1),e(`div`,G,[m[7]||=e(`span`,{class:`phone-device__island`},null,-1),e(`img`,{src:p.heroMobile,alt:``},null,8,K)])]),e(`button`,{type:`button`,class:`hero__note hero__note--top`,onClick:m[0]||=(...e)=>p.scrollToCreation&&p.scrollToCreation(...e)},[i(v,{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(y,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(`index.note.customDomain`)),1)])):a(``,!0)])])]),e(`section`,q,[e(`div`,J,[e(`div`,Y,[e(`span`,X,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`,Q,[e(`span`,ne,`0`+r(c+1),1),e(`p`,re,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`,ie,[(f(!0),o(s,null,d(a.bulletKeys,t=>(f(),o(`li`,{key:t},[i(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(t)),1)]))),128))]),a.href?(f(),l(_,{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(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:2},1032,[`href`])):(f(),l(_,{key:1,type:`primary`,plain:``,onClick:e=>p.openShowcase(a)},{default:u(()=>[n(r(p.$t(a.buttonKey))+` `,1),i(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:2},1032,[`onClick`]))]),e(`div`,ae,[e(`div`,oe,[e(`div`,se,[m[10]||=e(`span`,{class:`macbook-frame__camera`,"aria-hidden":`true`},null,-1),e(`div`,ce,[e(`img`,{src:a.desktop,alt:p.$t(a.titleKey),loading:`lazy`},null,8,le)]),m[11]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[12]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)])])],10,Z))),128))])]),e(`section`,ue,[e(`div`,de,[e(`div`,fe,[e(`span`,pe,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`,me,[(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`,he,[e(`div`,ge,[m[13]||=e(`span`,{class:`macbook-frame__camera`,"aria-hidden":`true`},null,-1),e(`div`,_e,[e(`img`,{src:n.desktop,alt:p.$t(n.titleKey),loading:`lazy`},null,8,ve)]),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`,ye,[m[17]||=e(`span`,{class:`phone-device__speaker`,"aria-hidden":`true`},null,-1),e(`div`,be,[m[16]||=e(`span`,{class:`phone-device__island`,"aria-hidden":`true`},null,-1),e(`img`,{src:n.mobile,alt:``,loading:`lazy`},null,8,xe)])])):a(``,!0)],2),e(`div`,Se,[e(`div`,null,[e(`p`,Ce,r(p.$t(n.eyebrowKey)),1),e(`h3`,null,r(p.$t(n.titleKey)),1)]),i(S,{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,we)])]))),128))])])]),e(`section`,Te,[e(`div`,Ee,[e(`div`,De,[e(`span`,$,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`,Oe,[(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,ke),e(`span`,null,r(t.label),1)]))),128))])])]),e(`section`,Ae,[e(`div`,je,[e(`div`,null,[e(`p`,Me,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`,Ne,[i(_,{type:`primary`,size:`large`,onClick:p.onStart},{default:u(()=>[n(r(p.$t(`common.button.startForFree`)),1)]),_:1},8,[`onClick`]),p.isMainSite?(f(),l(_,{key:0,size:`large`,onClick:p.openSubsites},{default:u(()=>[n(r(p.$t(`index.button.createSubsite`)),1)]),_:1},8,[`onClick`])):a(``,!0)])])])])}var Fe=v(k,[[`render`,Pe],[`__scopeId`,`data-v-82c57205`]]);export{Fe as default};
|