@acedatacloud/nexior 3.330.6 → 3.330.8
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-CW2-0UoK.js → ApiCodeButton-6yNv6GzT.js} +1 -1
- package/dist/assets/{Artifacts-DIok-4aX.js → Artifacts-Daj2aW6R.js} +1 -1
- package/dist/assets/{AskUserQuestionCard-D4u_aT4P.js → AskUserQuestionCard-D6NWrkca.js} +1 -1
- package/dist/assets/{AudioPreview-DKGu8cHV.js → AudioPreview-BwaUx8CQ.js} +1 -1
- package/dist/assets/{Auth-C9UvhSFt.js → Auth-t24ECk8p.js} +1 -1
- package/dist/assets/{Bare-mAy4AVZj.js → Bare-B0r772aH.js} +1 -1
- package/dist/assets/{BotPlaceholder-Ch31vf63.js → BotPlaceholder-CsV6S3zO.js} +1 -1
- package/dist/assets/{BottomFooter-dQODHJVv.js → BottomFooter-0XO3UTHH.js} +1 -1
- package/dist/assets/{Callback-B5FwAJYy.js → Callback-DWFJ3FIS.js} +1 -1
- package/dist/assets/{CodeSnippet-xVfCzfy3.js → CodeSnippet-DReHcwSF.js} +1 -1
- package/dist/assets/{Console-Wz6eo15K.js → Console-ICgTlpIn.js} +1 -1
- package/dist/assets/{Consumption-C8TyvoKa.js → Consumption-NaAGG5D5.js} +1 -1
- package/dist/assets/{Conversation-ytr81mJX.js → Conversation-CvkouZ3M.js} +1 -1
- package/dist/assets/{Conversation-o5huj0BX.js → Conversation-Domb3egF.js} +1 -1
- package/dist/assets/CopyToClipboard-DFuxR3Az.js +1 -0
- package/dist/assets/Detail-DV-JSHYE.js +2 -0
- package/dist/assets/{Extra-CfZ3WePg.js → Extra-BvK6x-Q3.js} +1 -1
- package/dist/assets/{FilePreview-C6Mxgtrr.js → FilePreview-lDiIA4f3.js} +1 -1
- package/dist/assets/{Hailuo-F_W8-4A0.js → Hailuo-ByNlGaAB.js} +1 -1
- package/dist/assets/{History-YbTdpeQ8.js → History-CZNMTW2o.js} +1 -1
- package/dist/assets/{ImagePreview-dDtels8M.js → ImagePreview-BbEGVj7c.js} +1 -1
- package/dist/assets/{ImageWrapper-DQcRXGvr.js → ImageWrapper-CZJchffe.js} +1 -1
- package/dist/assets/Index-2kWFtnq2.js +1 -0
- package/dist/assets/{Index-0V4UWlZd2.js → Index-B41YMrlv2.js} +1 -1
- package/dist/assets/{Index-B5GPc6HS.js → Index-BIi2sZ9J.js} +1 -1
- package/dist/assets/{Index-Bh3HUS912.js → Index-BSM8qmE12.js} +1 -1
- package/dist/assets/Index-BZ0J95Zi.js +1 -0
- package/dist/assets/{Index-BhGve9aa2.js → Index-Bg6RXp-22.js} +1 -1
- package/dist/assets/{Index-BwMoqNAP.js → Index-BinizDEw.js} +1 -1
- package/dist/assets/Index-BpoOIp5T2.js +1 -0
- package/dist/assets/Index-BwNpMoFU.js +1 -0
- package/dist/assets/{Index-C2SMK70U.js → Index-CCExcEGK.js} +1 -1
- package/dist/assets/{Index-sqEhGUD8.js → Index-CKdU3-kl.js} +1 -1
- package/dist/assets/Index-COH2u_8f.css +1 -0
- package/dist/assets/Index-CORewMsb.js +1 -0
- package/dist/assets/Index-C_PsMoRe2.js +1 -0
- package/dist/assets/Index-CdNwVjUJ.js +1 -0
- package/dist/assets/{Index-DZENqQzQ.js → Index-CiKtvMba.js} +1 -1
- package/dist/assets/Index-CmTCSoOY.js +1 -0
- package/dist/assets/{Index-DuKYcnOu.js → Index-D1HZkrcj.js} +1 -1
- package/dist/assets/{Index-CdVkw95E.js → Index-D92ZwitE.js} +1 -1
- package/dist/assets/{Index-Clzd80zH.js → Index-D9LzrEzG.js} +1 -1
- package/dist/assets/{Index-C3-uIXTH.js → Index-DMezegh3.js} +1 -1
- package/dist/assets/{Index-sJy6pthK.js → Index-DQm-e4Db.js} +1 -1
- package/dist/assets/{Index-Cq0DJmNK.js → Index-D_tsMe7s.js} +1 -1
- package/dist/assets/Index-DbXHxGAA.js +1 -0
- package/dist/assets/{Index-7mfMdFRM2.js → Index-DeREZXl82.js} +1 -1
- package/dist/assets/{Index-DhLGO3Az2.js → Index-Dq7ZZB8Q2.js} +2 -2
- package/dist/assets/{Index-CxCilrE-.css → Index-DyifjW6C.css} +1 -1
- package/dist/assets/Index-KJoVmqHA.js +1 -0
- package/dist/assets/{Index-D9jCrvOt.js → Index-bxOcRAXb.js} +1 -1
- package/dist/assets/{Index-CtM_m8P6.js → Index-p850NYjM.js} +1 -1
- package/dist/assets/{Index-gBlIUkvq.js → Index-rHufd-Kr.js} +1 -1
- package/dist/assets/Index-wDZvW7UP.js +1 -0
- package/dist/assets/{Invitees-DOn_QRuc.js → Invitees-BeYhOGAr.js} +1 -1
- package/dist/assets/{List-vkXcAz6X.js → List-Br-c5Y7K.js} +1 -1
- package/dist/assets/{List-CsJyrc1K.js → List-dILUs9ri.js} +1 -1
- package/dist/assets/List-sZ4o16vO.js +1 -0
- package/dist/assets/{LocalTools-CDUvnZcU.js → LocalTools-CGlok3bS.js} +1 -1
- package/dist/assets/{LocalTools-DdtDHOi6.js → LocalTools-Du10Q-KG.js} +1 -1
- package/dist/assets/{Main-wdg9OkyN.js → Main-CVHgo6nd.js} +1 -1
- package/dist/assets/{Message-Dt4Q0C6g.js → Message-CEGebS3A.js} +2 -2
- package/dist/assets/Model-CQsHyzsI.js +1 -0
- package/dist/assets/{Navigator-DygKXwFz.js → Navigator-Dys8G60u.js} +3 -3
- package/dist/assets/{NotFound-CiND4Cuk.js → NotFound-B8xC3Xkg.js} +1 -1
- package/dist/assets/Pay-B9D4VVUj.js +1 -0
- package/dist/assets/{Player-DhUgOyJj.js → Player-B1-y36IF.js} +1 -1
- package/dist/assets/{Poivelle-B9gcg5mi2.js → Poivelle-Ch9SG0cc.js} +1 -1
- package/dist/assets/{PromptTextarea--DkWRZzo.js → PromptTextarea-BN5xMkDn.js} +1 -1
- package/dist/assets/{RealtimeCall-BAE2V52w.js → RealtimeCall-HmxNqTRI.js} +1 -1
- package/dist/assets/{ScheduledTasks-BZC9RkA6.js → ScheduledTasks-CXkBXL7j.js} +1 -1
- package/dist/assets/{Status-Duqp9_fJ.js → Status-BkQ5kopN.js} +1 -1
- package/dist/assets/{Subscribe-BA29crNH.js → Subscribe-CQAktB9Y.js} +1 -1
- package/dist/assets/{TabSwitcher-6vL1xrtm.js → TabSwitcher-DDvB84Ic.js} +1 -1
- package/dist/assets/{Tts-C2VJBl27.js → Tts-BXzjQr0k.js} +1 -1
- package/dist/assets/{VideoPlayer-BkHLKJ3n.js → VideoPlayer-D0YQE8B0.js} +1 -1
- package/dist/assets/{alert-iulQiAw7.js → alert-BDplJjFH.js} +1 -1
- package/dist/assets/arrow-down-Hgc90ZTc.js +1 -0
- package/dist/assets/{arrow-down-wide-narrow-C7wGSWFj.js → arrow-down-wide-narrow-DXNmiMs8.js} +1 -1
- package/dist/assets/arrow-left-DB6qWRxA.js +1 -0
- package/dist/assets/arrow-right-RL8gvSEN.js +1 -0
- package/dist/assets/arrow-up-D3niKZHG.js +1 -0
- package/dist/assets/{avatar-DCHgi4MD.js → avatar-BSLfJakz.js} +1 -1
- package/dist/assets/{basic-LNMTJyO2.js → basic-BDepb3x3.js} +1 -1
- package/dist/assets/{box-B1vOmn7x.js → box-DZV2E00R.js} +1 -1
- package/dist/assets/{boxes-CnII0ejY.js → boxes-Ci-ujGBZ.js} +1 -1
- package/dist/assets/{brain-BuTSJ4Bx.js → brain-CSEkXyaK.js} +1 -1
- package/dist/assets/{chart-no-axes-combined-C_QIcEGe.js → chart-no-axes-combined-n7ymo6Xg.js} +1 -1
- package/dist/assets/{chat-C3zRCF75.js → chat-B80d2mNI.js} +1 -1
- package/dist/assets/check-sBDe6s27.js +1 -0
- package/dist/assets/chevron-down-DiCB7_cE.js +1 -0
- package/dist/assets/chevron-right-Qv5p8ju5.js +1 -0
- package/dist/assets/circle-check-GlUp7XCt.js +1 -0
- package/dist/assets/clock-Wfu3yNCH.js +1 -0
- package/dist/assets/{codingBridge-Ve3iRYMm.js → codingBridge-C6l3ZwHz.js} +1 -1
- package/dist/assets/{codingBridgeNotify-DArawvgB.js → codingBridgeNotify-DD5wHtJU.js} +2 -2
- package/dist/assets/{coins-DM3ssMcS.js → coins-Bt77jBiZ.js} +1 -1
- package/dist/assets/{collapse-CrK_LIKB.js → collapse-Cdk31esV.js} +1 -1
- package/dist/assets/{constants-OjwdsvEy.js → constants-P5wTiWzI.js} +1 -1
- package/dist/assets/copy-CU5KsMub.js +1 -0
- package/dist/assets/{createTaskActions-lT-kOTZC.js → createTaskActions-CQkmjGbZ.js} +1 -1
- package/dist/assets/{digitalhuman-CHUDym41.js → digitalhuman-BXlkAcCh.js} +1 -1
- package/dist/assets/{dollar-sign-BEr8lbGJ.js → dollar-sign-BkNO69TI.js} +1 -1
- package/dist/assets/{download-DG3dlfgP.js → download-CZBrzAe9.js} +1 -1
- package/dist/assets/{drawer-D-bnXRf3.js → drawer-oMnCzPYd.js} +1 -1
- package/dist/assets/{dropdown-Prt-0uIf.js → dropdown-CRdbOUFC.js} +1 -1
- package/dist/assets/{dropdown-BpPRQPdx.js → dropdown-Cx68tM9d.js} +1 -1
- package/dist/assets/{ellipsis-BuHDf2u5.js → ellipsis-VteHkYV-.js} +1 -1
- package/dist/assets/{esm--iKSyBW5.js → esm-BduzBH2m.js} +3 -3
- package/dist/assets/{esm-BWZNnIg9.js → esm-BhkrvIUo.js} +1 -1
- package/dist/assets/esm-BkoueZY1.js +1 -0
- package/dist/assets/{esm-C9Tp5YtE.js → esm-CH0bYXCY.js} +1 -1
- package/dist/assets/{esm-Dsq97XAT.js → esm-CQ2fMwjC.js} +2 -2
- package/dist/assets/{esm-EiPER_la.js → esm-CvujFTUm.js} +2 -2
- package/dist/assets/{esm-AyMfnebx.js → esm-Dk72GVDQ.js} +1 -1
- package/dist/assets/{external-link-DEDWb4rM.js → external-link-DA8scqfR.js} +1 -1
- package/dist/assets/{eye-CieSMJw9.js → eye-BfWxK8aV.js} +1 -1
- package/dist/assets/{file-output-_j_J5CvK.js → file-output-PWZ63KaJ.js} +1 -1
- package/dist/assets/{file-text-C0CkdNI2.js → file-text-BiCIu3qW.js} +1 -1
- package/dist/assets/{fish-CMidaVN2.js → fish-CyjGhFG8.js} +1 -1
- package/dist/assets/{flux-CE8hjC1t.js → flux-ChDNRKsU.js} +1 -1
- package/dist/assets/{folder-BGNyTalq.js → folder-BSdP--wE.js} +1 -1
- package/dist/assets/gauge-CbjIJ_jY.js +1 -0
- package/dist/assets/{globe-0NXl2lqX.js → globe-vAb4i-UX.js} +1 -1
- package/dist/assets/{grokvideo-7gA0cJYm.js → grokvideo-D9_K18Z6.js} +1 -1
- package/dist/assets/{hailuo-bE6Irbwk.js → hailuo-DoG0Xfy6.js} +1 -1
- package/dist/assets/{headphones-Ba8y_5Gn.js → headphones-DDtvT1Yz.js} +1 -1
- package/dist/assets/{history-Ysh3ebc0.js → history-BJworAx_.js} +1 -1
- package/dist/assets/{i18n-DRZmeOLk.js → i18n-m-rMtkos.js} +1 -1
- package/dist/assets/{image-IiYu-iU5.js → image-igPYo_Pj.js} +1 -1
- package/dist/assets/{index-CGledtPk.js → index-DjH2rtqz.js} +5 -5
- package/dist/assets/{index.browser.esm-Cd_Bn30d.js → index.browser.esm-CPzH_DYo.js} +1 -1
- package/dist/assets/{index.es-DOxV_rPs.js → index.es-x8_I2SBU.js} +1 -1
- package/dist/assets/{info-DcBJeNVH.js → info-BvANsMZ5.js} +1 -1
- package/dist/assets/{input-number-B74M2ZBB.js → input-number-i5U8XdBq.js} +1 -1
- package/dist/assets/{key-round-HI80RJnh.js → key-round-BhtGMhGK.js} +1 -1
- package/dist/assets/{kling-C03t138p.js → kling-110lI2T2.js} +1 -1
- package/dist/assets/{languages-u0rV9-aQ.js → languages-ChstT9C4.js} +1 -1
- package/dist/assets/{laptop-C5GK59Hf.js → laptop-BmLkCJWZ.js} +1 -1
- package/dist/assets/{lightbulb-BNGHe5du.js → lightbulb-DhMN6I26.js} +1 -1
- package/dist/assets/{link-CJFVQKQ9.js → link-D5hSNwle.js} +1 -1
- package/dist/assets/loader-circle-By_qWfck.js +1 -0
- package/dist/assets/{luma-BaICh4j_.js → luma-4spWj8kt.js} +1 -1
- package/dist/assets/{maestro-BPd2T6Di.js → maestro-C4KUqcGJ.js} +1 -1
- package/dist/assets/{maestro-C_kSn0Cp.js → maestro-D3hecJHK.js} +1 -1
- package/dist/assets/{mail-CC_cd85T.js → mail-CJWp-hxo.js} +1 -1
- package/dist/assets/{message-circle-TrgfUMeK.js → message-circle-yF7cDPPh.js} +1 -1
- package/dist/assets/{mic-Bu87pV6v.js → mic-DjAHk5K1.js} +1 -1
- package/dist/assets/{midjourney-C7pfoiQY.js → midjourney-BzentxgM.js} +1 -1
- package/dist/assets/{mobileLocalExec-Bye8UeMO.js → mobileLocalExec-DfzBb8QQ.js} +2 -2
- package/dist/assets/{mouse-pointer-2-CMHftDPZ.js → mouse-pointer-2-D5k09eQB.js} +1 -1
- package/dist/assets/music-2-DwDkh_mX.js +1 -0
- package/dist/assets/{nanobanana-DtnlkvAm.js → nanobanana-oEZ9jCdu.js} +1 -1
- package/dist/assets/{omni-CYwA_4xD.js → omni-BRXZsrc1.js} +1 -1
- package/dist/assets/{openaiimage-rk_VrJWT.js → openaiimage-DIi-WbEx.js} +1 -1
- package/dist/assets/{pagination-BYyJdFUY.js → pagination-B3irjpSu.js} +1 -1
- package/dist/assets/{pagination-C9els9qY.js → pagination-CRTJLrs9.js} +1 -1
- package/dist/assets/{palette-CLvlhtUA.js → palette-DXQDwyp1.js} +1 -1
- package/dist/assets/{paperclip-BEoczOIA.js → paperclip-Ds_pgdCl.js} +1 -1
- package/dist/assets/{pause-CUtNXm3w.js → pause-GVi14-ft.js} +1 -1
- package/dist/assets/{pencil-DTkf2Otw.js → pencil-DBlQBmAn.js} +1 -1
- package/dist/assets/{pika-D9Jpy-mY.js → pika-BvVnxn1P.js} +1 -1
- package/dist/assets/{pixverse-BxqouYKj.js → pixverse-r5huU6Ul.js} +1 -1
- package/dist/assets/play-loqVd6xQ.js +1 -0
- package/dist/assets/plus-5mgK_nZC.js +1 -0
- package/dist/assets/{poivelle-CE9TcLtQ.js → poivelle-B-4nGG9X.js} +1 -1
- package/dist/assets/{poivelle-BmpvMSNE.js → poivelle-B2wv8kv8.js} +1 -1
- package/dist/assets/poivelle-BK46KraW.js +1 -0
- package/dist/assets/{poivelle-BKMcFowD.js → poivelle-BU9sXd3Z.js} +1 -1
- package/dist/assets/{poivelle-AoUrSPl3.js → poivelle-B_QSOwfv.js} +1 -1
- package/dist/assets/poivelle-CVJFwmq5.js +1 -0
- package/dist/assets/poivelle-CiKxLOuT.js +1 -0
- package/dist/assets/poivelle-Cr6f1XNM.js +1 -0
- package/dist/assets/poivelle-Cu8yRgEl.js +1 -0
- package/dist/assets/poivelle-CyNOYDy-.js +1 -0
- package/dist/assets/poivelle-DDxnUoCb.js +1 -0
- package/dist/assets/poivelle-DFAUqjxK.js +1 -0
- package/dist/assets/poivelle-DHNobTmI.js +1 -0
- package/dist/assets/poivelle-DRT_oBTG.js +1 -0
- package/dist/assets/poivelle-DWpiT4AP.js +1 -0
- package/dist/assets/poivelle-JFwjJcOn.js +1 -0
- package/dist/assets/poivelle-PPNh0mDW.js +1 -0
- package/dist/assets/poivelle-pe1Nl83L.js +1 -0
- package/dist/assets/poivelle-u9RX9UkY.js +1 -0
- package/dist/assets/{popover-COwIhM8v.js → popover-Ca6MAZq8.js} +1 -1
- package/dist/assets/{producer-DvPql6Vw.js → producer-E_eCaX8O.js} +1 -1
- package/dist/assets/{qrart-uOHGamJr.js → qrart-D1rJnCCH.js} +1 -1
- package/dist/assets/{realtime-DfaNE7R9.js → realtime-Dd3584bn.js} +1 -1
- package/dist/assets/{refresh-cw-Bklzn7KR.js → refresh-cw-ByRXxRtZ.js} +1 -1
- package/dist/assets/rotate-ccw-B1jJmco8.js +1 -0
- package/dist/assets/rotate-cw-DtZmpRHd.js +1 -0
- package/dist/assets/{row-CXRVXY4y.js → row-B4KJ5qAM.js} +1 -1
- package/dist/assets/search-DilmuF2H.js +1 -0
- package/dist/assets/{seedance-8Ef_h3nD.js → seedance-B1OWhrfp.js} +1 -1
- package/dist/assets/{seedream-CAGQDsWI.js → seedream-lJ9lgZpf.js} +1 -1
- package/dist/assets/{select-Dl4jV9ad.js → select-BStvECg1.js} +1 -1
- package/dist/assets/{serp-NgJMrDBz.js → serp-DThQatO3.js} +1 -1
- package/dist/assets/{shield-Cc61xt_v.js → shield-WWFXGsj1.js} +1 -1
- package/dist/assets/{shuffle-G-3mSe7P.js → shuffle-BqYVx2-u.js} +1 -1
- package/dist/assets/{slider-CYCYCmYp.js → slider-CuTlFPPR.js} +1 -1
- package/dist/assets/{sliders-horizontal-CHyaEJcC.js → sliders-horizontal-BtXQ68tz.js} +1 -1
- package/dist/assets/{solana-wallets-D4arkhSO.js → solana-wallets-Bw6E39Pm.js} +2 -2
- package/dist/assets/{solana-wallets-vue-DHO5886o.js → solana-wallets-vue-RNIy_HkB.js} +1 -1
- package/dist/assets/{sora-CS8etLR4.js → sora-BZIm7ao3.js} +1 -1
- package/dist/assets/{sparkles-D1Ti6o0o.js → sparkles-iNFqRK4U.js} +1 -1
- package/dist/assets/square-CMRoVOCf.js +1 -0
- package/dist/assets/{suno-CxGQlVf4.js → suno-D2u_4X97.js} +1 -1
- package/dist/assets/{switch-bcerPOeA.js → switch-D5lFTJY5.js} +1 -1
- package/dist/assets/{table-DV8VfB7Q.js → table-CaTq0fbd.js} +1 -1
- package/dist/assets/{tabs-Bx9RfmQL.js → tabs-LWySwjmg.js} +1 -1
- package/dist/assets/{tag-CEDIESFr.js → tag-pQCbKxcO.js} +1 -1
- package/dist/assets/{taskDrawerMixin-SSME0Od-.js → taskDrawerMixin-Cl7YxaFY.js} +1 -1
- package/dist/assets/terminal-D3j2ijKT.js +1 -0
- package/dist/assets/{time-picker-C8frMx_M.js → time-picker-CyN6mYku.js} +1 -1
- package/dist/assets/{tooltip-C8hGSYS3.js → tooltip-D4EgKm6G.js} +1 -1
- package/dist/assets/{trash-2-D65x_ZcP.js → trash-2-CiaDFmZj.js} +1 -1
- package/dist/assets/{triangle-alert-B_KxyzDu.js → triangle-alert-C3z70mZA.js} +1 -1
- package/dist/assets/{upload-C2rOvzuC.js → upload-ByNQwXJh.js} +1 -1
- package/dist/assets/{upload-DgVbXugz.js → upload-DGfOhnPA.js} +1 -1
- package/dist/assets/user-Bkb9jny8.js +1 -0
- package/dist/assets/{veo-BrNNErmO.js → veo-WhmdJ9EC.js} +1 -1
- package/dist/assets/{video-DPwjcx9Z.js → video-Dm20ncFf.js} +1 -1
- package/dist/assets/{volume-2-DJv4raso.js → volume-2-xm5Y_nf-.js} +1 -1
- package/dist/assets/{wallet-B-Tq2uE5.js → wallet-B_F55Sui.js} +1 -1
- package/dist/assets/{wan-CTUkCXdF.js → wan-BoOyw4pn.js} +1 -1
- package/dist/assets/{wand-sparkles-_fUPopRY.js → wand-sparkles-PLgBR18n.js} +1 -1
- package/dist/assets/{web-Dj-m8oPB.js → web-C2aaNWU_.js} +1 -1
- package/dist/assets/{web-Chr_7TIr.js → web-C3PH0T6Z.js} +1 -1
- package/dist/assets/{web-7R4qpWgN.js → web-C8GGdKUI.js} +1 -1
- package/dist/assets/{web-BU9u-h8H.js → web-CJf39ZmQ.js} +1 -1
- package/dist/assets/{web-qZdCyiLy.js → web-D2IogFzY.js} +1 -1
- package/dist/assets/{webextrator-BqyNAX-W.js → webextrator-Bxv6PWrj.js} +1 -1
- package/dist/assets/{zap-CJhjifOL.js → zap-BEYIN2Rm.js} +1 -1
- package/dist/index.html +3 -3
- package/package.json +1 -1
- package/dist/assets/CopyToClipboard-C6NFeJB8.js +0 -1
- package/dist/assets/Detail-C5YorZ61.js +0 -2
- package/dist/assets/Index-1EQU3Z7I2.js +0 -1
- package/dist/assets/Index-BYAby_sr.js +0 -1
- package/dist/assets/Index-BwTlZX_12.js +0 -1
- package/dist/assets/Index-CakNN4kN.js +0 -1
- package/dist/assets/Index-ChctERcA.js +0 -1
- package/dist/assets/Index-CqGu-h9j.css +0 -1
- package/dist/assets/Index-D29uDOEu.js +0 -1
- package/dist/assets/Index-DSvOGylM.js +0 -1
- package/dist/assets/Index-L0bbxd3k.js +0 -1
- package/dist/assets/Index-NU5fefSi.js +0 -1
- package/dist/assets/Index-XVdY0km2.js +0 -1
- package/dist/assets/Index-eUloCU_O.js +0 -1
- package/dist/assets/List-Cr3bYL1d.js +0 -1
- package/dist/assets/Model-CbBJhtEq.js +0 -1
- package/dist/assets/Pay-DYK8BuMP.js +0 -1
- package/dist/assets/arrow-down-DGVWPOJ0.js +0 -1
- package/dist/assets/arrow-left-DhYuQwz3.js +0 -1
- package/dist/assets/arrow-right-DxzHv1H9.js +0 -1
- package/dist/assets/arrow-up-BmnKuaCH.js +0 -1
- package/dist/assets/check-BvhBit-R.js +0 -1
- package/dist/assets/chevron-down-BcwF9pRo.js +0 -1
- package/dist/assets/chevron-right-DRsjcjQt.js +0 -1
- package/dist/assets/circle-check-CQVWNo4y.js +0 -1
- package/dist/assets/clock-BBfE8suJ.js +0 -1
- package/dist/assets/esm-BhvhKRnq.js +0 -1
- package/dist/assets/gauge-Bsz3IHkl.js +0 -1
- package/dist/assets/loader-circle-4c3wOPmh.js +0 -1
- package/dist/assets/music-2-CR4ObJ8n.js +0 -1
- package/dist/assets/play-fakQC8eP.js +0 -1
- package/dist/assets/plus-DJLwjizL.js +0 -1
- package/dist/assets/poivelle-CUJ9z2Rk.js +0 -1
- package/dist/assets/poivelle-Cj4WFLcu.js +0 -1
- package/dist/assets/poivelle-CvBDibtG.js +0 -1
- package/dist/assets/poivelle-CvubMnux.js +0 -1
- package/dist/assets/poivelle-DQUkCylV.js +0 -1
- package/dist/assets/poivelle-DREcEIlN.js +0 -1
- package/dist/assets/poivelle-DSrOWn2t.js +0 -1
- package/dist/assets/poivelle-DXcPkB53.js +0 -1
- package/dist/assets/poivelle-DdUH4_0X.js +0 -1
- package/dist/assets/poivelle-DprcinPU.js +0 -1
- package/dist/assets/poivelle-DpsH0NNJ.js +0 -1
- package/dist/assets/poivelle-JICDF0TK.js +0 -1
- package/dist/assets/poivelle-TeRada3R.js +0 -1
- package/dist/assets/poivelle-Zey-Jm76.js +0 -1
- package/dist/assets/poivelle-p-5gNwah.js +0 -1
- package/dist/assets/rotate-ccw-qNDTwmyU.js +0 -1
- package/dist/assets/rotate-cw-4Xa1K2_e.js +0 -1
- package/dist/assets/search-guj3GQsJ.js +0 -1
- package/dist/assets/square-Df5AHNlG.js +0 -1
- package/dist/assets/terminal-DvHtvSWu.js +0 -1
- package/dist/assets/user-BDnMo48N.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
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,Mt as s,N as c,Q as l,S as u,St as d,T as f,Vt as p,Wt as m,b as h,ft as g,ht as _,it as v,j as y,k as b,mt as x,qt as S,rt as C,st as w,tt as T,wt as E,z as D}from"./vendor-chart-Dw-P17PN.js";import{a as O,c as ee,t as k}from"./install-Cn-SLM3u.js";import{i as te,n as ne,r as A,s as re}from"./runtime-BTM7t9of.js";import{a as ie,c as ae,dt as oe,ht as se,i as ce,it as j,n as M,r as le,yt as ue}from"./use-deprecated-r4dlLNqm.js";import{r as N,t as P}from"./select-Dl4jV9ad.js";import{t as F}from"./use-aria-9DurtVZO.js";import{n as I,t as L}from"./form-BNJ9LdPs.js";import{r as R,t as z}from"./event-BGnHezxC.js";import{t as de}from"./input-number-B74M2ZBB.js";import{t as B}from"./box-B1vOmn7x.js";import{t as V}from"./chevron-down-BcwF9pRo.js";import{t as H}from"./download-DG3dlfgP.js";import{t as U}from"./file-text-C0CkdNI2.js";import{t as W}from"./history-Ysh3ebc0.js";import{t as fe}from"./image-IiYu-iU5.js";import{t as pe}from"./loader-circle-4c3wOPmh.js";import{t as G}from"./mouse-pointer-2-CMHftDPZ.js";import{t as K}from"./play-fakQC8eP.js";import{t as me}from"./plus-DJLwjizL.js";import{t as he}from"./sparkles-D1Ti6o0o.js";import{t as ge}from"./trash-2-D65x_ZcP.js";import{t as _e}from"./triangle-alert-B_KxyzDu.js";import{t as ve}from"./upload-DgVbXugz.js";import{t as ye}from"./video-DPwjcx9Z.js";import{i as q}from"./i18n-DRZmeOLk.js";import{Ci as be,E as J,Mi as Y,Vi as X,_i as xe,gi as Z,ni as Se,ri as Ce,vi as we}from"./index-CGledtPk.js";var Te={label:`label`,value:`value`,disabled:`disabled`},Ee=ne({direction:{type:A(String),default:`horizontal`},options:{type:A(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},props:{type:A(Object),default:()=>Te},block:Boolean,size:j,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...F([`ariaLabel`])}),De={[R]:e=>m(e)||re(e)||te(e),[z]:e=>m(e)||re(e)||te(e)},Oe=k(O(D({...D({name:`ElSegmented`}),props:Ee,emits:De,setup(t,{emit:a}){let l=t,u=ee(`segmented`),m=ae(),h=le(),_=M(),{formItem:y}=ce(),{inputId:x,isLabeledByFormItem:w}=ie(l,{formItemContext:y}),D=E(null),O=se(),k=d({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),te=e=>{let t=A(e);a(R,t),a(z,t)},ne=b(()=>({...Te,...l.props})),A=e=>p(e)?e[ne.value.value]:e,re=e=>p(e)?e[ne.value.label]:e,j=e=>!!(_.value||p(e)&&e[ne.value.disabled]),N=e=>l.modelValue===A(e),P=e=>l.options.find(t=>A(t)===e),F=e=>[u.e(`item`),u.is(`selected`,N(e)),u.is(`disabled`,j(e))],I=()=>{if(!D.value)return;let e=D.value.querySelector(`.is-selected`),t=D.value.querySelector(`.is-selected input`);if(!e||!t){k.width=0,k.height=0,k.translateX=0,k.translateY=0,k.focusVisible=!1;return}let n=e.getBoundingClientRect();k.isInit=!0,l.direction===`vertical`?(k.height=n.height,k.translateY=e.offsetTop):(k.width=n.width,k.translateX=e.offsetLeft);try{k.focusVisible=t.matches(`:focus-visible`)}catch{}},L=b(()=>[u.b(),u.m(h.value),u.is(`block`,l.block)]),de=b(()=>({width:l.direction===`vertical`?`100%`:`${k.width}px`,height:l.direction===`vertical`?`${k.height}px`:`100%`,transform:l.direction===`vertical`?`translateY(${k.translateY}px)`:`translateX(${k.translateX}px)`,display:k.isInit?`block`:`none`})),B=b(()=>[u.e(`item-selected`),u.is(`disabled`,j(P(l.modelValue))),u.is(`focus-visible`,k.focusVisible)]),V=b(()=>l.name||m.value);return ue(D,I),g(O,I),g(()=>l.modelValue,()=>{var e;I(),l.validateEvent&&((e=y?.validate)==null||e.call(y,`change`).catch(e=>oe(e)))},{flush:`post`}),(t,a)=>t.options.length?(T(),c(`div`,{key:0,id:s(x),ref_key:`segmentedRef`,ref:D,class:n(s(L)),role:`radiogroup`,"aria-label":s(w)?void 0:t.ariaLabel||`segmented`,"aria-labelledby":s(w)?s(y).labelId:void 0},[e(`div`,{class:n([s(u).e(`group`),s(u).m(l.direction)])},[e(`div`,{style:S(s(de)),class:n(s(B))},null,6),(T(!0),c(f,null,C(t.options,(a,o)=>(T(),c(`label`,{key:o,class:n(F(a))},[e(`input`,{class:n(s(u).e(`item-input`)),type:`radio`,name:s(V),disabled:j(a),checked:N(a),onChange:e=>te(a)},null,42,[`name`,`disabled`,`checked`,`onChange`]),e(`div`,{class:n(s(u).e(`item-label`))},[v(t.$slots,`default`,{item:a},()=>[r(i(re(a)),1)])],2)],2))),128))],2)],10,[`id`,`aria-label`,`aria-labelledby`])):o(`v-if`,!0)}}),[[`__file`,`segmented.vue`]])),ke=Z(`audio-lines`,[[`path`,{d:`M2 10v3`,key:`1fnikh`}],[`path`,{d:`M6 6v11`,key:`11sgs0`}],[`path`,{d:`M10 3v18`,key:`yhl04a`}],[`path`,{d:`M14 8v7`,key:`3a1oy3`}],[`path`,{d:`M18 5v13`,key:`123xd1`}],[`path`,{d:`M22 10v3`,key:`154ddg`}]]),Ae=Z(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),Q=Z(`clapperboard`,[[`path`,{d:`m12.296 3.464 3.02 3.956`,key:`qash78`}],[`path`,{d:`M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z`,key:`1h7j8b`}],[`path`,{d:`M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`4lm6w1`}],[`path`,{d:`m6.18 5.276 3.1 3.899`,key:`zjj9t3`}]]),je=Z(`film`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]]),Me=Z(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),Ne=Z(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),Pe=Z(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),Fe=Z(`lock-keyhole`,[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]),Ie=Z(`rows-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),Le={class:`studio-header`},Re={class:`identity`},ze={class:`wordmark`},Be={key:0,class:`version`},Ve={class:`actions`},He={class:`sync-state`},Ue=[`title`],We=[`disabled`],Ge=J(D({__name:`StudioHeader`,props:{projectTitle:{},graphVersion:{},canRun:{type:Boolean},canEdit:{type:Boolean}},emits:[`open-projects`,`commit`,`run`],setup(t){return(n,l)=>(T(),c(`header`,Le,[e(`div`,Re,[e(`span`,ze,[a(s(Q),{size:15,"aria-hidden":`true`}),l[3]||=r(` POIVELLE`,-1)]),e(`button`,{class:`project-button`,type:`button`,onClick:l[0]||=e=>n.$emit(`open-projects`)},[e(`span`,null,i(t.projectTitle||n.$t(`poivelle.project.noProject`)),1),a(s(V),{size:14,"aria-hidden":`true`})]),t.graphVersion===void 0?o(``,!0):(T(),c(`span`,Be,`Graph v`+i(t.graphVersion),1))]),e(`div`,Ve,[e(`span`,He,[l[4]||=e(`span`,{class:`sync-dot`},null,-1),r(` `+i(n.$t(`poivelle.status.synced`)),1)]),t.canEdit?(T(),c(`button`,{key:0,class:`icon-button`,type:`button`,title:n.$t(`poivelle.action.commit`),onClick:l[1]||=e=>n.$emit(`commit`)},[a(s(Me),{size:17,"aria-hidden":`true`})],8,Ue)):o(``,!0),e(`button`,{class:`primary-button`,type:`button`,disabled:!t.canRun,onClick:l[2]||=e=>n.$emit(`run`)},[a(s(K),{size:15,fill:`currentColor`,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.action.runSkill`)),1)],8,We)])]))}}),[[`__scopeId`,`data-v-33bf10a2`]]),$={class:`production-rail`},Ke={class:`rail-section`},qe={class:`section-heading`},Je=[`title`],Ye={class:`project-list`},Xe=[`onClick`],Ze={key:0,class:`empty-copy`},Qe={class:`rail-section assets-section`},$e={class:`section-heading`},et=[`title`],tt={class:`asset-filters`},nt=[`onClick`],rt={class:`asset-list`},it={key:0,class:`empty-copy`},at={class:`rail-section compact-section`},ot={class:`section-heading static`},st={class:`revision-list`},ct={key:0,class:`empty-copy`},lt=J(D({__name:`ProductionRail`,props:{projects:{},currentProjectId:{},assets:{},revisions:{},canEdit:{type:Boolean}},emits:[`select-project`,`create-project`,`import-asset`],setup(t){let r=t,l=[`all`,`character`,`location`,`image`,`video`,`voice`],u=E(`all`),d=b(()=>u.value===`all`?r.assets:r.assets.filter(e=>e.kind===u.value)),p=e=>e===`video`?ye:e===`voice`||e===`music`||e===`sfx`?ke:e===`script`||e===`brand`?U:fe;return(r,m)=>(T(),c(`aside`,$,[e(`div`,Ke,[e(`div`,qe,[e(`span`,null,i(r.$t(`poivelle.section.projects`)),1),t.canEdit?(T(),c(`button`,{key:0,type:`button`,title:r.$t(`poivelle.project.create`),onClick:m[0]||=e=>r.$emit(`create-project`)},[a(s(me),{size:15,"aria-hidden":`true`})],8,Je)):o(``,!0)]),e(`div`,Ye,[(T(!0),c(f,null,C(t.projects,o=>(T(),c(`button`,{key:o.id,type:`button`,class:n([`project-row`,{active:o.id===t.currentProjectId}]),onClick:e=>r.$emit(`select-project`,o.id)},[a(s(Q),{size:15,"aria-hidden":`true`}),e(`span`,null,i(o.title),1),e(`small`,null,`v`+i(o.graph_version),1)],10,Xe))),128)),t.projects.length?o(``,!0):(T(),c(`p`,Ze,i(r.$t(`poivelle.project.empty`)),1))])]),e(`div`,Qe,[e(`div`,$e,[e(`span`,null,i(r.$t(`poivelle.section.assets`)),1),t.canEdit?(T(),c(`button`,{key:0,type:`button`,title:r.$t(`poivelle.asset.import`),onClick:m[1]||=e=>r.$emit(`import-asset`)},[a(s(ve),{size:15,"aria-hidden":`true`})],8,et)):o(``,!0)]),e(`div`,tt,[(T(),c(f,null,C(l,t=>e(`button`,{key:t,type:`button`,class:n({active:u.value===t}),onClick:e=>u.value=t},i(t===`all`?r.$t(`poivelle.asset.all`):t),11,nt)),64))]),e(`div`,rt,[(T(!0),c(f,null,C(d.value,t=>(T(),c(`button`,{key:t.id,type:`button`,class:`asset-row`},[(T(),y(w(p(t.kind)),{size:15,"aria-hidden":`true`})),e(`span`,null,[e(`strong`,null,i(t.title),1),e(`small`,null,i(t.kind)+` · `+i(t.scope),1)])]))),128)),d.value.length?o(``,!0):(T(),c(`p`,it,i(r.$t(`poivelle.asset.empty`)),1))])]),e(`div`,at,[e(`div`,ot,[e(`span`,null,i(r.$t(`poivelle.section.revisions`)),1),a(s(W),{size:14,"aria-hidden":`true`})]),e(`div`,st,[(T(!0),c(f,null,C(t.revisions.slice(0,4),t=>(T(),c(`div`,{key:t.id,class:`revision-row`},[e(`span`,null,`R`+i(t.revision_number),1),e(`small`,null,`Graph v`+i(t.graph_version),1)]))),128)),t.revisions.length?o(``,!0):(T(),c(`p`,ct,i(r.$t(`poivelle.revision.empty`)),1))])])]))}}),[[`__scopeId`,`data-v-24e37657`]]),ut=[`aria-label`],dt=[`onClick`],ft=J(D({__name:`ProjectionTabs`,props:{modelValue:{},canEdit:{type:Boolean}},emits:[`update:modelValue`,`create-node`],setup(t){let l=[{value:`canvas`,label:`poivelle.projection.canvas`,icon:Ne},{value:`storyboard`,label:`poivelle.projection.storyboard`,icon:Q},{value:`timeline`,label:`poivelle.projection.timeline`,icon:Ie},{value:`review`,label:`poivelle.projection.review`,icon:Pe}];return(u,d)=>(T(),c(`nav`,{class:`projection-tabs`,"aria-label":u.$t(`poivelle.projection.label`)},[(T(),c(f,null,C(l,a=>e(`button`,{key:a.value,type:`button`,class:n({active:t.modelValue===a.value}),onClick:e=>u.$emit(`update:modelValue`,a.value)},[(T(),y(w(a.icon),{size:14,"aria-hidden":`true`})),r(` `+i(u.$t(a.label)),1)],10,dt)),64)),d[1]||=e(`span`,{class:`spacer`},null,-1),t.canEdit?(T(),c(`button`,{key:0,class:`add-node`,type:`button`,onClick:d[0]||=e=>u.$emit(`create-node`)},[a(s(me),{size:14,"aria-hidden":`true`}),r(` `+i(u.$t(`poivelle.node.create`)),1)])):o(``,!0)],8,ut))}}),[[`__scopeId`,`data-v-bea5d208`]]),pt={class:`connections`,"aria-hidden":`true`},mt=[`x1`,`y1`,`x2`,`y2`],ht=[`onClick`],gt={class:`node-type`},_t={class:`node-summary`},vt={key:0,class:`lock-mark`},yt={key:0,class:`empty-canvas`},bt=J(D({__name:`GraphCanvas`,props:{graph:{},selectedNodeId:{},canEdit:{type:Boolean}},emits:[`select-node`,`create-node`],setup(l){let u=l,d=b(()=>new Map(u.graph.layouts.map(e=>[e.node_id,e]))),p=e=>{let t=u.graph.nodes.findIndex(t=>t.id===e);return{x:52+t%3*250,y:54+Math.floor(t/3)*170,width:208,height:116}},m=e=>d.value.get(e)??p(e),h=e=>{let t=m(e);return{x:t.x+t.width/2,y:t.y+t.height/2}},g=e=>{let t=m(e);return{left:`${t.x}px`,top:`${t.y}px`,width:`${t.width}px`,minHeight:`${t.height}px`}},_=b(()=>u.graph.edges.filter(e=>u.graph.nodes.some(t=>t.id===e.source.node_id)&&u.graph.nodes.some(t=>t.id===e.target.node_id))),v=e=>{let t=e.payload.text??e.payload.prompt??e.payload.description;return typeof t==`string`&&t?t:`Version ${e.version}`};return(u,d)=>(T(),c(`div`,{class:`graph-canvas`,onClick:d[1]||=t(e=>u.$emit(`select-node`,void 0),[`self`])},[(T(),c(`svg`,pt,[(T(!0),c(f,null,C(_.value,e=>(T(),c(`line`,{key:e.id,x1:h(e.source.node_id).x,y1:h(e.source.node_id).y,x2:h(e.target.node_id).x,y2:h(e.target.node_id).y},null,8,mt))),128))])),(T(!0),c(f,null,C(l.graph.nodes,f=>(T(),c(`button`,{key:f.id,type:`button`,class:n([`graph-node`,`type-${f.node_type}`,{selected:f.id===l.selectedNodeId}]),style:S(g(f.id)),onClick:t(e=>u.$emit(`select-node`,f.id),[`stop`])},[e(`span`,gt,i(f.node_type),1),e(`strong`,null,i(f.title),1),e(`span`,_t,i(v(f)),1),f.locked_paths.length?(T(),c(`span`,vt,[a(s(Fe),{size:11}),d[2]||=r(` locked`,-1)])):o(``,!0)],14,ht))),128)),l.graph.nodes.length?o(``,!0):(T(),c(`div`,yt,[a(s(Ne),{size:28,"stroke-width":`1.5`,"aria-hidden":`true`}),e(`h2`,null,i(u.$t(`poivelle.graph.emptyTitle`)),1),e(`p`,null,i(u.$t(`poivelle.graph.emptyBody`)),1),l.canEdit?(T(),c(`button`,{key:0,type:`button`,onClick:d[0]||=e=>u.$emit(`create-node`)},[a(s(me),{size:15,"aria-hidden":`true`}),r(` `+i(u.$t(`poivelle.node.create`)),1)])):o(``,!0)]))]))}}),[[`__scopeId`,`data-v-cd67c1fc`]]),xt={class:`media-lane`},St={key:0,class:`candidate-strip`},Ct=[`src`],wt=[`src`],Tt=[`onClick`],Et={key:1},Dt=[`onClick`],Ot={key:1,class:`unavailable-takes`},kt={key:2,class:`empty-candidates`},At=J(D({__name:`StoryboardMediaLane`,props:{title:{},kind:{},nodeIds:{},artifacts:{},takes:{},selections:{},canEdit:{type:Boolean},canSelect:{type:Boolean}},emits:[`select-node`,`select-take`],setup(t){let r=t,a=b(()=>{let e=new Set(r.nodeIds),t=new Map(r.artifacts.map(e=>[e.id,e])),n=r.takes.filter(t=>e.has(t.target_node_id)&&t.state===`ready`).flatMap(e=>[...new Set(e.artifact_ids)].map(e=>t.get(e)).filter(e=>!!e).map(t=>({key:`${e.id}:${t.id}`,take:e,artifact:t,selected:r.selections.some(t=>t.target_node_id===e.target_node_id&&t.take_id===e.id)}))),i=new Set(n.map(e=>e.artifact.id)),a=r.artifacts.filter(t=>e.has(t.node_id??``)&&t.kind===r.kind&&!i.has(t.id)).map(e=>({key:e.id,take:void 0,artifact:e,selected:!1}));return[...n,...a]}),s=b(()=>r.takes.filter(e=>r.nodeIds.includes(e.target_node_id)&&e.state!==`ready`)),l=E([]),u=e=>{l.value=l.value.includes(e)?l.value.filter(t=>t!==e):[...l.value.slice(-1),e]};return(r,d)=>(T(),c(`section`,xt,[e(`header`,null,[e(`span`,null,i(t.title),1),t.nodeIds[0]?(T(),c(`button`,{key:0,type:`button`,onClick:d[0]||=e=>r.$emit(`select-node`,t.nodeIds[0])},i(r.$t(`poivelle.storyboard.openNode`)),1)):o(``,!0)]),a.value.length?(T(),c(`div`,St,[(T(!0),c(f,null,C(a.value,a=>(T(),c(`article`,{key:a.key,class:n([`candidate`,{selected:a.selected,comparing:l.value.includes(a.key)}])},[t.kind===`image`?(T(),c(`img`,{key:0,src:a.artifact.storage_url,alt:``},null,8,Ct)):(T(),c(`video`,{key:1,src:a.artifact.storage_url,controls:``,preload:`metadata`},null,8,wt)),e(`div`,null,[e(`span`,null,i(a.take?`TAKE`:`ARTIFACT`),1),e(`strong`,null,i(a.artifact.id.slice(-8)),1),t.canEdit&&t.canSelect&&a.take&&!a.selected?(T(),c(`button`,{key:0,type:`button`,onClick:e=>r.$emit(`select-take`,{target_node_id:a.take.target_node_id,take_id:a.take.id})},i(r.$t(`poivelle.storyboard.selectTake`)),9,Tt)):a.selected?(T(),c(`em`,Et,i(r.$t(`poivelle.storyboard.selected`)),1)):o(``,!0),e(`button`,{type:`button`,class:`compare-toggle`,onClick:e=>u(a.key)},i(l.value.includes(a.key)?r.$t(`poivelle.storyboard.comparing`):r.$t(`poivelle.storyboard.compare`)),9,Dt)])],2))),128))])):o(``,!0),s.value.length?(T(),c(`div`,Ot,[(T(!0),c(f,null,C(s.value,e=>(T(),c(`span`,{key:e.id},i(e.state===`failed`?r.$t(`poivelle.storyboard.failedTake`):r.$t(`poivelle.storyboard.restrictedTake`)),1))),128))])):o(``,!0),!a.value.length&&!s.value.length?(T(),c(`div`,kt,i(r.$t(`poivelle.storyboard.noCandidates`)),1)):o(``,!0)]))}}),[[`__scopeId`,`data-v-4e385f6a`]]),jt={class:`storyboard-view`},Mt={key:0,class:`storyboard-heading`},Nt={class:`section-label`},Pt=[`onClick`],Ft={class:`shot-number`},It={class:`shot-production`},Lt={class:`shot-metadata`},Rt={class:`prompt-columns`},zt={class:`candidate-columns`},Bt=[`onClick`],Vt={key:0,class:`empty-view`},Ht=J(D({__name:`StoryboardView`,props:{graph:{},storyboard:{},artifacts:{},takes:{},selections:{},selectedNodeId:{},canEdit:{type:Boolean},canSelect:{type:Boolean}},emits:[`select-node`,`select-take`],setup(t){let r=t,l=b(()=>r.storyboard?.sections.reduce((e,t)=>e+t.shots.length,0)??0),u=b(()=>r.graph.nodes.filter(e=>[`storyboard`,`scene`,`shot`,`image`,`video`].includes(e.node_type)));return(r,d)=>(T(),c(`div`,jt,[t.storyboard?(T(),c(`header`,Mt,[e(`div`,null,[e(`span`,null,i(t.storyboard.schema_ref),1),e(`h2`,null,i(t.storyboard.title),1)]),e(`dl`,null,[e(`div`,null,[e(`dt`,null,i(r.$t(`poivelle.storyboard.product`)),1),e(`dd`,null,i(t.storyboard.product_name),1)]),e(`div`,null,[e(`dt`,null,i(r.$t(`poivelle.storyboard.duration`)),1),e(`dd`,null,i(t.storyboard.target_duration_seconds)+`s`,1)]),e(`div`,null,[e(`dt`,null,i(r.$t(`poivelle.storyboard.shots`)),1),e(`dd`,null,i(l.value),1)])])])):o(``,!0),t.storyboard?(T(!0),c(f,{key:1},C(t.storyboard.sections,o=>(T(),c(`section`,{key:o.id,class:`story-section`},[e(`div`,Nt,[e(`span`,null,i(String(o.order).padStart(2,`0`)),1),e(`h3`,null,i(o.title),1)]),(T(!0),c(f,null,C(o.shots,o=>(T(),c(`article`,{key:o.row.id,class:n([`shot-row`,{selected:o.shot_node_id===t.selectedNodeId}])},[e(`button`,{class:`shot-brief`,type:`button`,onClick:e=>r.$emit(`select-node`,o.shot_node_id)},[e(`span`,Ft,`SHOT `+i(String(o.row.shot_number).padStart(2,`0`)),1),e(`strong`,null,i(o.row.plot_description),1),e(`span`,null,i(o.row.duration_seconds)+`s · `+i(o.row.shot_size),1)],8,Pt),e(`div`,It,[e(`dl`,Lt,[e(`div`,null,[e(`dt`,null,i(r.$t(`poivelle.storyboard.action`)),1),e(`dd`,null,i(o.row.character_action||`—`),1)]),e(`div`,null,[e(`dt`,null,i(r.$t(`poivelle.storyboard.emotion`)),1),e(`dd`,null,i(o.row.emotion||`—`),1)]),e(`div`,null,[e(`dt`,null,i(r.$t(`poivelle.storyboard.lighting`)),1),e(`dd`,null,i(o.row.lighting_and_atmosphere),1)]),e(`div`,null,[e(`dt`,null,i(r.$t(`poivelle.storyboard.audio`)),1),e(`dd`,null,i(o.row.audio_effects),1)])]),e(`div`,Rt,[e(`div`,null,[e(`span`,null,i(r.$t(`poivelle.storyboard.imagePrompt`)),1),e(`p`,null,i(o.row.image_generation_prompt),1)]),e(`div`,null,[e(`span`,null,i(r.$t(`poivelle.storyboard.motionPrompt`)),1),e(`p`,null,i(o.row.video_motion_prompt),1)])])]),e(`div`,zt,[a(At,{title:r.$t(`poivelle.storyboard.frames`),kind:`image`,"node-ids":o.image_node_ids,artifacts:t.artifacts,takes:t.takes,selections:t.selections,"can-edit":t.canEdit,"can-select":t.canSelect,onSelectNode:d[0]||=e=>r.$emit(`select-node`,e),onSelectTake:d[1]||=e=>r.$emit(`select-take`,e)},null,8,[`title`,`node-ids`,`artifacts`,`takes`,`selections`,`can-edit`,`can-select`]),a(At,{title:r.$t(`poivelle.storyboard.motion`),kind:`video`,"node-ids":o.video_node_ids,artifacts:t.artifacts,takes:t.takes,selections:t.selections,"can-edit":t.canEdit,"can-select":t.canSelect,onSelectNode:d[2]||=e=>r.$emit(`select-node`,e),onSelectTake:d[3]||=e=>r.$emit(`select-take`,e)},null,8,[`title`,`node-ids`,`artifacts`,`takes`,`selections`,`can-edit`,`can-select`])])],2))),128))]))),128)):(T(),c(f,{key:2},[(T(!0),c(f,null,C(u.value,(o,l)=>(T(),c(`button`,{key:o.id,type:`button`,class:n([`legacy-card`,{selected:o.id===t.selectedNodeId}]),onClick:e=>r.$emit(`select-node`,o.id)},[e(`span`,null,i(String(l+1).padStart(2,`0`)),1),a(s(Q),{size:26,"stroke-width":`1.25`,"aria-hidden":`true`}),e(`strong`,null,i(o.title),1)],10,Bt))),128)),u.value.length?o(``,!0):(T(),c(`div`,Vt,[a(s(Q),{size:30,"stroke-width":`1.4`}),e(`h2`,null,i(r.$t(`poivelle.storyboard.emptyTitle`)),1),e(`p`,null,i(r.$t(`poivelle.storyboard.emptyBody`)),1)]))],64))]))}}),[[`__scopeId`,`data-v-ce90da94`]]),Ut={class:`timeline-view`},Wt={key:0,class:`master-output`,"aria-labelledby":`poivelle-master-title`},Gt={class:`master-heading`},Kt={class:`master-kicker`},qt={id:`poivelle-master-title`},Jt=[`href`],Yt=[`src`,`aria-label`],Xt={key:0,class:`master-status`,role:`status`},Zt={key:1,class:`master-status is-error`,role:`alert`},Qt={class:`master-metadata`},$t={class:`timeline-ruler`},en={key:1,class:`tracks`},tn={class:`track-label`},nn={class:`track-lane`},rn=[`title`],an=[`aria-label`],on={key:0,class:`clip-actions`},sn=[`disabled`,`onClick`],cn=[`disabled`,`onClick`],ln={key:2,class:`empty-timeline`},un=120/5e3,dn=J(D({__name:`TimelineView`,props:{timeline:{},graph:{},artifacts:{},canEdit:{type:Boolean}},emits:[`move-clip`],setup(t){let n=t,l=b(()=>{let e=new Set(n.graph.nodes.filter(e=>e.node_type===`composition`).map(e=>e.id));return[...n.artifacts??[]].filter(t=>t.kind===`video`&&t.state===`committed`&&t.restriction_watermark===0&&!!t.node_id&&e.has(t.node_id)&&t.metadata?.operation===`compose.timeline@1`).sort((e,t)=>t.created_at.localeCompare(e.created_at))[0]}),u=E(!0),d=E(!1);g(()=>l.value?.id,()=>{u.value=!0,d.value=!1});let p=()=>{u.value=!0,d.value=!1},m=()=>{u.value=!1,d.value=!0},h=e=>{let t=l.value?.metadata?.[e];return typeof t==`number`&&Number.isFinite(t)?t:void 0},_=b(()=>{let e=h(`duration_ms`);return e===void 0?`—`:`${(e/1e3).toFixed(1)}s`}),v=b(()=>{let e=h(`width`),t=h(`height`);return e&&t?`${e} × ${t}`:`—`}),y=b(()=>{let e=h(`width`),t=h(`height`);return e&&t?{aspectRatio:`${e} / ${t}`}:void 0}),x=e=>n.timeline?.clips.filter(t=>t.track_id===e)??[],w=e=>e.artifact_id.slice(-6),D=e=>({left:`${e.timeline_start_ms*un}px`,width:`${Math.max(48,(e.source_out_ms-e.source_in_ms)/(e.speed??1)*un)}px`});return(n,g)=>(T(),c(`div`,Ut,[l.value?(T(),c(`section`,Wt,[e(`div`,Gt,[e(`div`,null,[e(`span`,Kt,i(n.$t(`poivelle.timeline.deliverable`)),1),e(`h2`,qt,i(n.$t(`poivelle.timeline.masterTitle`)),1)]),e(`a`,{class:`master-download`,href:l.value.storage_url,target:`_blank`,rel:`noopener noreferrer`,download:``},[a(s(H),{size:15,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.timeline.download`)),1)],8,Jt)]),e(`div`,{class:`master-media`,style:S(y.value)},[e(`video`,{class:`master-player`,src:l.value.storage_url,"aria-label":n.$t(`poivelle.timeline.playerLabel`),controls:``,playsinline:``,preload:`metadata`,onLoadstart:p,onLoadedmetadata:g[0]||=e=>u.value=!1,onCanplay:g[1]||=e=>u.value=!1,onError:m},null,40,Yt),u.value&&!d.value?(T(),c(`div`,Xt,[a(s(pe),{size:24,class:`is-spinning`,"aria-hidden":`true`}),e(`span`,null,i(n.$t(`poivelle.timeline.loading`)),1)])):o(``,!0),d.value?(T(),c(`div`,Zt,[a(s(_e),{size:24,"aria-hidden":`true`}),e(`span`,null,i(n.$t(`poivelle.timeline.loadError`)),1)])):o(``,!0)],4),e(`dl`,Qt,[e(`div`,null,[e(`dt`,null,i(n.$t(`poivelle.timeline.duration`)),1),e(`dd`,null,i(_.value),1)]),e(`div`,null,[e(`dt`,null,i(n.$t(`poivelle.timeline.frame`)),1),e(`dd`,null,i(v.value),1)]),e(`div`,null,[e(`dt`,null,i(n.$t(`poivelle.timeline.videoClips`)),1),e(`dd`,null,i(h(`video_clips`)??`—`),1)]),e(`div`,null,[e(`dt`,null,i(n.$t(`poivelle.timeline.audioClips`)),1),e(`dd`,null,i(h(`audio_clips`)??`—`),1)])])])):o(``,!0),e(`div`,$t,[(T(),c(f,null,C(10,t=>e(`span`,{key:t},i((t-1)*5)+`s`,1)),64))]),t.timeline?.tracks.length?(T(),c(`div`,en,[(T(!0),c(f,null,C(t.timeline.tracks,r=>(T(),c(`div`,{key:r.id,class:`track-row`},[e(`div`,tn,i(r.title||r.kind||r.id),1),e(`div`,nn,[(T(!0),c(f,null,C(x(r.id),(a,s)=>(T(),c(`div`,{key:a.id,class:`timeline-clip`,style:S(D(a)),title:a.artifact_id},[e(`button`,{type:`button`,"aria-label":a.artifact_id},i(w(a)),9,an),t.canEdit&&r.kind===`video`?(T(),c(`span`,on,[e(`button`,{type:`button`,disabled:s===0,onClick:e=>n.$emit(`move-clip`,{trackId:r.id,clipId:a.id,direction:-1})},` ‹ `,8,sn),e(`button`,{type:`button`,disabled:s===x(r.id).length-1,onClick:e=>n.$emit(`move-clip`,{trackId:r.id,clipId:a.id,direction:1})},` › `,8,cn)])):o(``,!0)],12,rn))),128))])]))),128))])):(T(),c(`div`,ln,[a(s(je),{size:30,"stroke-width":`1.4`}),e(`h2`,null,i(n.$t(`poivelle.timeline.emptyTitle`)),1),e(`p`,null,i(n.$t(`poivelle.timeline.emptyBody`)),1)]))]))}}),[[`__scopeId`,`data-v-37eb37c8`]]),fn={class:`review-view`},pn={class:`review-summary`},mn={class:`eyebrow`},hn={class:`summary-metrics`},gn={class:`review-columns`},_n={key:0,class:`item-actions`},vn=[`onClick`],yn={key:0,class:`empty-copy`},bn=[`onClick`],xn=[`onClick`],Sn={key:0,class:`empty-copy`},Cn={key:1,class:`run-detail`},wn={key:0},Tn=[`onClick`],En={key:2,class:`forensic-failures`,role:`alert`},Dn=J(D({__name:`ReviewView`,props:{graph:{},proposals:{},revisions:{},runs:{},activeRun:{},evaluations:{},forensicValidations:{},costs:{},canEdit:{type:Boolean}},emits:[`reject-proposal`,`cancel-run`,`open-run`,`retry-step`],setup(a){let s=a,l=b(()=>s.proposals.filter(e=>e.state===`awaiting_approval`)),u=e=>![`release_pending`,`succeeded`,`failed`,`cancelled`].includes(e.state),d=b(()=>s.evaluations.filter(e=>e.verdict===`pass`).length),p=b(()=>s.forensicValidations[0]),m=b(()=>p.value?.result.checks.filter(e=>e.verdict===`fail`)??[]),h=e=>[...s.activeRun?.attempts??[]].filter(t=>t.step_run_id===e).sort((e,t)=>t.created_at.localeCompare(e.created_at))[0],g=e=>(e/1e6).toFixed(2);return(s,_)=>(T(),c(`div`,fn,[e(`section`,pn,[e(`div`,null,[e(`span`,mn,i(s.$t(`poivelle.review.heading`)),1),e(`h2`,null,i(a.revisions.length?`Revision ${a.revisions[0].revision_number}`:s.$t(`poivelle.review.noRevision`)),1)]),e(`div`,hn,[e(`span`,null,[e(`strong`,null,i(a.graph.nodes.length),1),r(i(s.$t(`poivelle.review.nodes`)),1)]),e(`span`,null,[e(`strong`,null,i(a.proposals.length),1),r(i(s.$t(`poivelle.review.proposals`)),1)]),e(`span`,null,[e(`strong`,null,i(a.runs.length),1),r(i(s.$t(`poivelle.review.runs`)),1)]),e(`span`,null,[e(`strong`,null,i(g(a.costs?.totals_microcredits.final??0)),1),r(i(s.$t(`poivelle.review.finalCost`)),1)]),e(`span`,null,[e(`strong`,null,i(d.value)+`/`+i(a.evaluations.length),1),r(i(s.$t(`poivelle.review.qualityChecks`)),1)]),e(`span`,null,[e(`strong`,{class:n(p.value?.result.verdict===`fail`?`metric-fail`:``)},i(p.value?.result.verdict??`—`),3),r(i(s.$t(`poivelle.review.forensics`)),1)])])]),e(`section`,gn,[e(`div`,null,[e(`h3`,null,i(s.$t(`poivelle.review.pendingProposals`)),1),(T(!0),c(f,null,C(l.value,t=>(T(),c(`article`,{key:t.id,class:`review-item`},[e(`span`,{class:n([`risk`,`risk-${t.risk_class}`])},i(t.risk_class),3),e(`strong`,null,i(t.intent),1),e(`p`,null,i(t.rationale),1),a.canEdit?(T(),c(`div`,_n,[e(`span`,null,i(s.$t(`poivelle.review.approvalTokenRequired`)),1),e(`button`,{type:`button`,onClick:e=>s.$emit(`reject-proposal`,t.id)},i(s.$t(`poivelle.review.reject`)),9,vn)])):o(``,!0)]))),128)),l.value.length?o(``,!0):(T(),c(`p`,yn,i(s.$t(`poivelle.review.noProposals`)),1))]),e(`div`,null,[e(`h3`,null,i(s.$t(`poivelle.review.execution`)),1),(T(!0),c(f,null,C(a.runs,r=>(T(),c(`article`,{key:r.id,class:n([`run-item`,{active:a.activeRun?.run.id===r.id}]),onClick:e=>s.$emit(`open-run`,r.id)},[e(`span`,{class:n([`run-state`,`state-${r.state}`])},null,2),e(`div`,null,[e(`strong`,null,i(r.state),1),e(`small`,null,i(r.id),1)]),a.canEdit&&u(r)?(T(),c(`button`,{key:0,type:`button`,class:`cancel-run`,onClick:t(e=>s.$emit(`cancel-run`,r.id),[`stop`])},i(s.$t(`poivelle.run.cancel`)),9,xn)):o(``,!0)],10,bn))),128)),a.runs.length?o(``,!0):(T(),c(`p`,Sn,i(s.$t(`poivelle.review.noRuns`)),1)),a.activeRun?(T(),c(`section`,Cn,[e(`header`,null,[e(`strong`,null,i(s.$t(`poivelle.review.runDetail`)),1),e(`span`,null,i(a.activeRun.attempts.length)+` `+i(s.$t(`poivelle.review.attempts`)),1)]),(T(!0),c(f,null,C(a.activeRun.steps,r=>(T(),c(`article`,{key:r.id,class:`step-item`},[e(`span`,{class:n([`run-state`,`state-${r.state}`])},null,2),e(`div`,null,[e(`strong`,null,i(r.operation),1),e(`small`,null,i(r.state)+` · `+i(r.node_id),1),h(r.id)?.error?(T(),c(`p`,wn,i(h(r.id)?.error?.code??`provider_error`)+`: `+i(h(r.id)?.error?.message??s.$t(`poivelle.error.generic`)),1)):o(``,!0)]),a.canEdit&&[`failed`,`manual_recovery`].includes(r.state)?(T(),c(`button`,{key:0,type:`button`,class:`retry-step`,onClick:t(e=>s.$emit(`retry-step`,r),[`stop`])},i(s.$t(`poivelle.review.retryStep`)),9,Tn)):o(``,!0)]))),128))])):o(``,!0),m.value.length?(T(),c(`section`,En,[e(`strong`,null,i(s.$t(`poivelle.review.forensics`)),1),(T(!0),c(f,null,C(m.value,e=>(T(),c(`p`,{key:e.code},i(e.code)+` · `+i(String(e.actual??`—`))+` / `+i(String(e.expected??`—`)),1))),128))])):o(``,!0)])])]))}}),[[`__scopeId`,`data-v-e66361d5`]]),On={class:`inspector-panel`},kn={class:`inspector-heading`},An={class:`field`},jn={class:`field`},Mn=[`value`],Nn={class:`field grow`},Pn={class:`node-meta`},Fn={key:1,class:`empty-inspector`},In=J(D({__name:`InspectorPanel`,props:{node:{}},emits:[`update`,`delete`],setup(t,{emit:n}){let o=t,l=n,d=E(``),p=E(``);g(()=>o.node,e=>{d.value=e?.title??``;let t=e?.payload.prompt??e?.payload.text??``;p.value=typeof t==`string`?t:``},{immediate:!0});let m=b(()=>o.node?o.node.node_type===`video`?ye:o.node.node_type===`audio`?ke:[`shot`,`scene`,`storyboard`].includes(o.node.node_type)?Q:[`image`,`character`,`location`].includes(o.node.node_type)?fe:o.node.node_type===`script`||o.node.node_type===`text`?U:B:G),v=()=>{let e=d.value.trim();o.node&&e&&e!==o.node.title&&l(`update`,{path:`/title`,value:e})},x=()=>{if(!o.node)return;let e=o.node.payload.prompt===void 0?`text`:`prompt`;p.value!==o.node.payload[e]&&l(`update`,{path:`/payload/${e}`,value:p.value})};return(n,o)=>(T(),c(`aside`,On,[e(`div`,kn,[e(`div`,null,[e(`span`,null,i(n.$t(`poivelle.section.inspector`)),1),e(`strong`,null,i(t.node?.title||n.$t(`poivelle.inspector.noSelection`)),1)]),(T(),y(w(m.value),{size:18,"aria-hidden":`true`}))]),t.node?(T(),c(f,{key:0},[e(`label`,An,[e(`span`,null,i(n.$t(`poivelle.field.title`)),1),_(e(`input`,{"onUpdate:modelValue":o[0]||=e=>d.value=e,type:`text`,onBlur:v,onKeydown:u(v,[`enter`])},null,544),[[h,d.value]])]),e(`label`,jn,[e(`span`,null,i(n.$t(`poivelle.field.type`)),1),e(`input`,{value:t.node.node_type,type:`text`,disabled:``},null,8,Mn)]),e(`label`,Nn,[e(`span`,null,i(n.$t(`poivelle.field.prompt`)),1),_(e(`textarea`,{"onUpdate:modelValue":o[1]||=e=>p.value=e,rows:`8`,onBlur:x},null,544),[[h,p.value]])]),e(`div`,Pn,[o[3]||=e(`span`,null,`NODE`,-1),e(`code`,null,i(t.node.id),1),o[4]||=e(`span`,null,`VERSION`,-1),e(`code`,null,i(t.node.version),1)]),e(`button`,{class:`danger-button`,type:`button`,onClick:o[2]||=e=>n.$emit(`delete`)},[a(s(ge),{size:14,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.node.delete`)),1)])],64)):(T(),c(`div`,Fn,[a(s(G),{size:24,"stroke-width":`1.4`}),e(`p`,null,i(n.$t(`poivelle.inspector.empty`)),1)]))]))}}),[[`__scopeId`,`data-v-7a6ae318`]]),Ln={class:`agent-dock`},Rn={class:`agent-identity`},zn={class:`proposal-strip`},Bn=[`onClick`],Vn={key:0},Hn=[`disabled`],Un=J(D({__name:`AgentDock`,props:{proposals:{},selectedNodeId:{},skill:{},canEdit:{type:Boolean}},emits:[`run`,`open-proposal`],setup(t){let l=t,u=b(()=>l.proposals.filter(e=>e.state===`awaiting_approval`));return(l,d)=>(T(),c(`section`,Ln,[e(`div`,Rn,[a(s(Ae),{size:16,"aria-hidden":`true`}),e(`div`,null,[e(`strong`,null,i(l.$t(`poivelle.agent.title`)),1),e(`span`,null,i(t.skill),1)])]),e(`div`,zn,[(T(!0),c(f,null,C(u.value,t=>(T(),c(`button`,{key:t.id,type:`button`,onClick:e=>l.$emit(`open-proposal`,t.id)},[e(`span`,{class:n([`risk-dot`,`risk-${t.risk_class}`])},null,2),e(`strong`,null,i(t.intent),1),e(`small`,null,i(t.state),1)],8,Bn))),128)),u.value.length?o(``,!0):(T(),c(`p`,Vn,i(l.$t(`poivelle.agent.noProposals`)),1))]),t.canEdit?(T(),c(`button`,{key:0,class:`agent-button`,type:`button`,disabled:!t.selectedNodeId,onClick:d[0]||=e=>l.$emit(`run`)},[a(s(he),{size:15,"aria-hidden":`true`}),r(` `+i(l.$t(`poivelle.agent.plan`)),1)],8,Hn)):o(``,!0)]))}}),[[`__scopeId`,`data-v-81fac9f8`]]),Wn={class:`poivelle-studio`},Gn={key:0,class:`error-banner`},Kn={key:1,class:`loading-state`},qn={key:2,class:`studio-body`},Jn={class:`projection-workspace`},Yn={class:`projection-content`},Xn={key:3,class:`onboarding`},Zn={key:0,class:`dry-run-summary`},Qn={class:`dry-run-note`},$n=J(D({__name:`StudioWorkspace`,setup(n){let u=Ce(),p=b(()=>u.state.poivelle),m=b(()=>p.value?.workspaces??[]),h=b(()=>p.value?.projects??[]),g=b(()=>p.value?.graph),_=b(()=>p.value?.assets??[]),v=b(()=>p.value?.artifacts??[]),S=b(()=>p.value?.takes??[]),w=b(()=>p.value?.selections??[]),D=b(()=>p.value?.storyboard),O=b(()=>p.value?.revisions??[]),ee=b(()=>p.value?.proposals??[]),k=b(()=>p.value?.runs??[]),te=b(()=>p.value?.activeRun),ne=b(()=>p.value?.evaluations??[]),A=b(()=>p.value?.forensicValidations??[]),re=b(()=>p.value?.costs),ie=b(()=>p.value?.timeline),ae=b(()=>p.value?.projection??`canvas`),oe=b(()=>p.value?.selectedNodeId),se=b(()=>g.value?.nodes.find(e=>e.id===oe.value)),ce=b(()=>h.value.find(e=>e.id===p.value?.currentProjectId)),j=b(()=>[`owner`,`producer`,`director`,`editor`].includes(p.value?.currentMembership?.role??``)),M=b(()=>p.value?.dryRun),le=b(()=>p.value?.error),ue=b(()=>[p.value?.status?.bootstrap,p.value?.status?.graph].includes(Se.Request)),F=E(!1),R=E(!1),z=E(!1),B=E(!1),V=E(!1),H=E(!1),U=d({name:``,monthly_limit_microcredits:void 0}),W=d({workspace_id:``,title:``,workflow:`blank`,skill:`film.drama.short@1.0.0`,product_name:``,product_category:`professional action imaging device`,brand_tone:`precise, fearless, cinematic, premium`,aspect_ratio:`16:9`}),fe=[{label:q(`poivelle.project.blankWorkflow`),value:`blank`},{label:q(`poivelle.project.commercialTVC`),value:`commercial_tvc`}],G=d({node_type:`scene`,title:``,prompt:``}),K=d({title:``,kind:`image`,source_url:``,content_hash:``}),he=[`script`,`character`,`location`,`prop`,`storyboard`,`scene`,`shot`,`image`,`video`,`audio`,`subtitle`,`composition`,`output`,`note`],ge=[`character`,`location`,`prop`,`image`,`video`,`voice`,`music`,`sfx`,`brand`],ve=()=>u.dispatch(`poivelle/bootstrap`),ye=e=>u.dispatch(`poivelle/loadProject`,e),J=e=>u.dispatch(`poivelle/selectNode`,e),Z=e=>u.dispatch(`poivelle/setProjection`,e),Te=()=>{W.workspace_id=p.value?.currentWorkspaceId??m.value[0]?.id??``,z.value=!0},Ee=async()=>{U.name.trim()&&await $(async()=>{await u.dispatch(`poivelle/createWorkspace`,{...U,name:U.name.trim()}),R.value=!1,Te()})},De=async()=>{!W.workspace_id||!W.title.trim()||await $(async()=>{W.workflow===`commercial_tvc`?(await u.dispatch(`poivelle/createCommercialTVCProject`,{workspace_id:W.workspace_id,title:W.title.trim(),product_name:W.product_name.trim()||W.title.trim(),product_category:W.product_category.trim(),brand_tone:W.brand_tone.trim(),aspect_ratio:W.aspect_ratio,managed_execution:!1}),Z(`storyboard`)):await u.dispatch(`poivelle/createProject`,{workspace_id:W.workspace_id,title:W.title.trim(),skill:W.skill,domain:`film.drama.short`}),z.value=!1,W.title=``})},ke=async()=>{G.title.trim()&&await $(async()=>{await u.dispatch(`poivelle/createNode`,{node_type:G.node_type,title:G.title.trim(),payload:{prompt:G.prompt}}),B.value=!1,G.title=``,G.prompt=``})},Ae=async()=>{!p.value?.currentWorkspaceId||!K.title||!K.source_url||!K.content_hash||await $(async()=>{await u.dispatch(`poivelle/importAsset`,{...K,project_id:p.value.currentProjectId}),V.value=!1})},Me=e=>u.dispatch(`poivelle/updateSelectedNode`,e),Ne=async()=>{await xe.confirm(q(`poivelle.node.deleteConfirm`),``,{type:`warning`}),await u.dispatch(`poivelle/deleteSelectedNode`)},Pe=async()=>{await u.dispatch(`poivelle/commitRevision`,`Studio checkpoint`),we.success(q(`poivelle.revision.committed`))},Fe=async()=>{se.value&&await $(async()=>{await u.dispatch(`poivelle/dryRun`,se.value?.node_type===`composition`?`compose`:`generate`),H.value=!0})},Ie=async()=>{await $(async()=>{let e=await u.dispatch(`poivelle/confirmDryRun`);H.value=!1,e&&we.success(q(`poivelle.run.queued`))})},Le=e=>{Z(`review`),we.info(`${q(`poivelle.agent.proposal`)} ${e.slice(-8)}`)},Re=async e=>{await xe.confirm(q(`poivelle.review.rejectConfirm`),``,{type:`warning`}),await $(()=>u.dispatch(`poivelle/rejectProposal`,e))},ze=async e=>{await xe.confirm(q(`poivelle.run.cancelConfirm`),``,{type:`warning`}),await $(()=>u.dispatch(`poivelle/cancelRun`,e))},Be=e=>$(()=>u.dispatch(`poivelle/loadRun`,e)),Ve=async e=>{await $(async()=>{await u.dispatch(`poivelle/retryStep`,e),H.value=!0})},He=async e=>{if(!ie.value)return;let t=ie.value.clips.map(e=>({...e})),n=t.filter(t=>t.track_id===e.trackId).sort((e,t)=>e.timeline_start_ms-t.timeline_start_ms),r=n.findIndex(t=>t.id===e.clipId),i=r+e.direction;if(r<0||i<0||i>=n.length)return;[n[r],n[i]]=[n[i],n[r]];let a=0;n.forEach(e=>{let t=typeof e.speed==`number`&&Number.isFinite(e.speed)&&e.speed>0?e.speed:1;e.timeline_start_ms=a,a+=(e.source_out_ms-e.source_in_ms)/t}),await $(()=>u.dispatch(`poivelle/saveTimeline`,{...ie.value,clips:t}))},Ue=async e=>{await $(async()=>{await u.dispatch(`poivelle/selectTake`,e),we.success(q(`poivelle.storyboard.selectionSaved`))})},We=e=>`${(e/1e6).toFixed(2)} credits`,$=async e=>{F.value=!0;try{await e()}catch(e){we.error(e?.response?.data?.detail?.message??e?.response?.data?.detail??e?.message??q(`poivelle.error.generic`))}finally{F.value=!1}};return l(ve),(n,l)=>(T(),c(`main`,Wn,[a(Ge,{"project-title":ce.value?.title,"graph-version":g.value?.graph_version,"can-run":j.value&&!!se.value,"can-edit":j.value,onOpenProjects:l[0]||=e=>z.value=!0,onCommit:Pe,onRun:Fe},null,8,[`project-title`,`graph-version`,`can-run`,`can-edit`]),le.value?(T(),c(`div`,Gn,[a(s(_e),{size:15,"aria-hidden":`true`}),e(`span`,null,i(le.value),1),e(`button`,{type:`button`,onClick:ve},i(n.$t(`poivelle.action.retry`)),1)])):o(``,!0),ue.value&&!g.value?(T(),c(`div`,Kn,[a(s(pe),{size:25,class:`is-spinning`,"aria-hidden":`true`}),e(`span`,null,i(n.$t(`poivelle.status.loading`)),1)])):ce.value&&g.value?(T(),c(`div`,qn,[a(lt,{projects:h.value,"current-project-id":ce.value.id,assets:_.value,revisions:O.value,"can-edit":j.value,onSelectProject:ye,onCreateProject:Te,onImportAsset:l[1]||=e=>V.value=!0},null,8,[`projects`,`current-project-id`,`assets`,`revisions`,`can-edit`]),e(`section`,Jn,[a(ft,{"model-value":ae.value,"can-edit":j.value,"onUpdate:modelValue":Z,onCreateNode:l[2]||=e=>B.value=!0},null,8,[`model-value`,`can-edit`]),e(`div`,Yn,[ae.value===`canvas`?(T(),y(bt,{key:0,graph:g.value,"selected-node-id":oe.value,"can-edit":j.value,onSelectNode:J,onCreateNode:l[3]||=e=>B.value=!0},null,8,[`graph`,`selected-node-id`,`can-edit`])):ae.value===`storyboard`?(T(),y(Ht,{key:1,graph:g.value,storyboard:D.value,artifacts:v.value,takes:S.value,selections:w.value,"selected-node-id":oe.value,"can-edit":j.value,"can-select":j.value&&O.value.length>0,onSelectNode:J,onSelectTake:Ue},null,8,[`graph`,`storyboard`,`artifacts`,`takes`,`selections`,`selected-node-id`,`can-edit`,`can-select`])):ae.value===`timeline`?(T(),y(dn,{key:2,timeline:ie.value,graph:g.value,artifacts:v.value,"can-edit":j.value,onMoveClip:He},null,8,[`timeline`,`graph`,`artifacts`,`can-edit`])):(T(),y(Dn,{key:3,graph:g.value,proposals:ee.value,revisions:O.value,runs:k.value,"active-run":te.value,evaluations:ne.value,"forensic-validations":A.value,costs:re.value,"can-edit":j.value,onRejectProposal:Re,onCancelRun:ze,onOpenRun:Be,onRetryStep:Ve},null,8,[`graph`,`proposals`,`revisions`,`runs`,`active-run`,`evaluations`,`forensic-validations`,`costs`,`can-edit`]))]),a(Un,{proposals:ee.value,"selected-node-id":oe.value,skill:ce.value.active_skill,"can-edit":j.value,onRun:Fe,onOpenProposal:Le},null,8,[`proposals`,`selected-node-id`,`skill`,`can-edit`])]),j.value?(T(),y(In,{key:0,node:se.value,onUpdate:Me,onDelete:Ne},null,8,[`node`])):o(``,!0)])):(T(),c(`section`,Xn,[l[36]||=e(`div`,{class:`onboarding-number`},`01 / STUDIO`,-1),a(s(je),{size:34,"stroke-width":`1.25`,"aria-hidden":`true`}),e(`h1`,null,i(n.$t(`poivelle.onboarding.title`)),1),e(`p`,null,i(n.$t(`poivelle.onboarding.body`)),1),m.value.length?j.value?(T(),c(`button`,{key:1,type:`button`,onClick:Te},[a(s(Q),{size:15,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.project.create`)),1)])):o(``,!0):(T(),c(`button`,{key:0,type:`button`,onClick:l[4]||=e=>R.value=!0},[a(s(me),{size:15,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.workspace.create`)),1)]))])),a(s(be),{modelValue:R.value,"onUpdate:modelValue":l[9]||=e=>R.value=e,title:n.$t(`poivelle.workspace.create`),width:`420px`},{footer:x(()=>[a(s(Y),{onClick:l[8]||=e=>R.value=!1},{default:x(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),a(s(Y),{type:`primary`,loading:F.value,onClick:Ee},{default:x(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:x(()=>[a(s(L),{"label-position":`top`,onSubmit:l[7]||=t(()=>{},[`prevent`])},{default:x(()=>[a(s(I),{label:n.$t(`poivelle.workspace.name`)},{default:x(()=>[a(s(X),{modelValue:U.name,"onUpdate:modelValue":l[5]||=e=>U.name=e,maxlength:`120`,autofocus:``},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(I),{label:n.$t(`poivelle.workspace.budget`)},{default:x(()=>[a(s(de),{modelValue:U.monthly_limit_microcredits,"onUpdate:modelValue":l[6]||=e=>U.monthly_limit_microcredits=e,min:0,step:1e6},null,8,[`modelValue`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`modelValue`,`title`]),a(s(be),{modelValue:z.value,"onUpdate:modelValue":l[20]||=e=>z.value=e,title:n.$t(`poivelle.project.create`),width:`460px`},{footer:x(()=>[a(s(Y),{onClick:l[19]||=e=>z.value=!1},{default:x(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),a(s(Y),{type:`primary`,loading:F.value,onClick:De},{default:x(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:x(()=>[a(s(L),{"label-position":`top`,onSubmit:l[18]||=t(()=>{},[`prevent`])},{default:x(()=>[a(s(I),{label:n.$t(`poivelle.project.workspace`)},{default:x(()=>[a(s(N),{modelValue:W.workspace_id,"onUpdate:modelValue":l[10]||=e=>W.workspace_id=e,style:{width:`100%`}},{default:x(()=>[(T(!0),c(f,null,C(m.value,e=>(T(),y(s(P),{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1},8,[`label`]),a(s(I),{label:n.$t(`poivelle.project.title`)},{default:x(()=>[a(s(X),{modelValue:W.title,"onUpdate:modelValue":l[11]||=e=>W.title=e,maxlength:`200`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(I),{label:n.$t(`poivelle.project.workflow`)},{default:x(()=>[a(s(Oe),{modelValue:W.workflow,"onUpdate:modelValue":l[12]||=e=>W.workflow=e,options:fe,block:``},null,8,[`modelValue`])]),_:1},8,[`label`]),W.workflow===`commercial_tvc`?(T(),c(f,{key:0},[a(s(I),{label:n.$t(`poivelle.project.productName`)},{default:x(()=>[a(s(X),{modelValue:W.product_name,"onUpdate:modelValue":l[13]||=e=>W.product_name=e,maxlength:`120`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(I),{label:n.$t(`poivelle.project.productCategory`)},{default:x(()=>[a(s(X),{modelValue:W.product_category,"onUpdate:modelValue":l[14]||=e=>W.product_category=e,maxlength:`180`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(I),{label:n.$t(`poivelle.project.brandTone`)},{default:x(()=>[a(s(X),{modelValue:W.brand_tone,"onUpdate:modelValue":l[15]||=e=>W.brand_tone=e,type:`textarea`,rows:2,maxlength:`240`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(I),{label:n.$t(`poivelle.project.aspectRatio`)},{default:x(()=>[a(s(Oe),{modelValue:W.aspect_ratio,"onUpdate:modelValue":l[16]||=e=>W.aspect_ratio=e,options:[`16:9`,`9:16`,`1:1`]},null,8,[`modelValue`])]),_:1},8,[`label`])],64)):o(``,!0),a(s(I),{label:n.$t(`poivelle.project.skill`)},{default:x(()=>[W.workflow===`blank`?(T(),y(s(N),{key:0,modelValue:W.skill,"onUpdate:modelValue":l[17]||=e=>W.skill=e,style:{width:`100%`}},{default:x(()=>[a(s(P),{label:`Short drama · professional`,value:`film.drama.short@1.0.0`}),a(s(P),{label:`Commercial film · professional`,value:`film.commercial@1.0.0`}),a(s(P),{label:`Music video · professional`,value:`film.music-video@1.0.0`})]),_:1},8,[`modelValue`])):o(``,!0)]),_:1},8,[`label`])]),_:1})]),_:1},8,[`modelValue`,`title`]),a(s(be),{modelValue:B.value,"onUpdate:modelValue":l[26]||=e=>B.value=e,title:n.$t(`poivelle.node.create`),width:`460px`},{footer:x(()=>[a(s(Y),{onClick:l[25]||=e=>B.value=!1},{default:x(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),a(s(Y),{type:`primary`,loading:F.value,onClick:ke},{default:x(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:x(()=>[a(s(L),{"label-position":`top`,onSubmit:l[24]||=t(()=>{},[`prevent`])},{default:x(()=>[a(s(I),{label:n.$t(`poivelle.field.type`)},{default:x(()=>[a(s(N),{modelValue:G.node_type,"onUpdate:modelValue":l[21]||=e=>G.node_type=e,style:{width:`100%`}},{default:x(()=>[(T(),c(f,null,C(he,e=>a(s(P),{key:e,label:e,value:e},null,8,[`label`,`value`])),64))]),_:1},8,[`modelValue`])]),_:1},8,[`label`]),a(s(I),{label:n.$t(`poivelle.field.title`)},{default:x(()=>[a(s(X),{modelValue:G.title,"onUpdate:modelValue":l[22]||=e=>G.title=e,maxlength:`240`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(I),{label:n.$t(`poivelle.field.prompt`)},{default:x(()=>[a(s(X),{modelValue:G.prompt,"onUpdate:modelValue":l[23]||=e=>G.prompt=e,type:`textarea`,rows:5},null,8,[`modelValue`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`modelValue`,`title`]),a(s(be),{modelValue:V.value,"onUpdate:modelValue":l[33]||=e=>V.value=e,title:n.$t(`poivelle.asset.import`),width:`500px`},{footer:x(()=>[a(s(Y),{onClick:l[32]||=e=>V.value=!1},{default:x(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),a(s(Y),{type:`primary`,loading:F.value,onClick:Ae},{default:x(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:x(()=>[a(s(L),{"label-position":`top`,onSubmit:l[31]||=t(()=>{},[`prevent`])},{default:x(()=>[a(s(I),{label:n.$t(`poivelle.asset.title`)},{default:x(()=>[a(s(X),{modelValue:K.title,"onUpdate:modelValue":l[27]||=e=>K.title=e,maxlength:`240`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(I),{label:n.$t(`poivelle.field.type`)},{default:x(()=>[a(s(N),{modelValue:K.kind,"onUpdate:modelValue":l[28]||=e=>K.kind=e,style:{width:`100%`}},{default:x(()=>[(T(),c(f,null,C(ge,e=>a(s(P),{key:e,label:e,value:e},null,8,[`label`,`value`])),64))]),_:1},8,[`modelValue`])]),_:1},8,[`label`]),a(s(I),{label:n.$t(`poivelle.asset.url`)},{default:x(()=>[a(s(X),{modelValue:K.source_url,"onUpdate:modelValue":l[29]||=e=>K.source_url=e},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(I),{label:n.$t(`poivelle.asset.hash`)},{default:x(()=>[a(s(X),{modelValue:K.content_hash,"onUpdate:modelValue":l[30]||=e=>K.content_hash=e,placeholder:`sha256:...`},null,8,[`modelValue`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`modelValue`,`title`]),a(s(be),{modelValue:H.value,"onUpdate:modelValue":l[35]||=e=>H.value=e,title:n.$t(`poivelle.run.confirmTitle`),width:`520px`},{footer:x(()=>[a(s(Y),{onClick:l[34]||=e=>H.value=!1},{default:x(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),a(s(Y),{type:`primary`,loading:F.value,onClick:Ie},{default:x(()=>[r(i(n.$t(`poivelle.run.confirm`)),1)]),_:1},8,[`loading`])]),default:x(()=>[M.value?(T(),c(`div`,Zn,[e(`div`,null,[e(`span`,null,i(n.$t(`poivelle.run.targets`)),1),e(`strong`,null,i(M.value.dependency_closure.length),1)]),e(`div`,null,[e(`span`,null,i(n.$t(`poivelle.run.maximum`)),1),e(`strong`,null,i(We(M.value.max_cost_microcredits)),1)]),e(`div`,null,[e(`span`,null,i(n.$t(`poivelle.run.approval`)),1),e(`strong`,null,i(M.value.required_approval),1)])])):o(``,!0),e(`p`,Qn,i(n.$t(`poivelle.run.confirmBody`)),1)]),_:1},8,[`modelValue`,`title`])]))}}),[[`__scopeId`,`data-v-bf89f054`]]),er=D({__name:`Index`,setup(e){return(e,t)=>(T(),y($n))}});export{er as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,it as d,j as f,mt as p,qt as m,rt as h,tt as g,x as _,z as v}from"./vendor-chart-Dw-P17PN.js";import{t as y}from"./upload-C2rOvzuC.js";import{t as b}from"./tooltip-C8hGSYS3.js";import{t as x}from"./alert-iulQiAw7.js";import{t as S}from"./drawer-D-bnXRf3.js";import{n as C}from"./taskDrawerMixin-SSME0Od-.js";import{t as w}from"./box-B1vOmn7x.js";import{t as T}from"./clock-BBfE8suJ.js";import{t as E}from"./CopyToClipboard-C6NFeJB8.js";import{n as D,r as O,t as k}from"./PromptTextarea--DkWRZzo.js";import{t as A}from"./info-DcBJeNVH.js";import{t as ee}from"./triangle-alert-B_KxyzDu.js";import{t as j}from"./upload-DgVbXugz.js";import{t as M}from"./wand-sparkles-_fUPopRY.js";import{Dt as N,Et as P,St as F,Tt as I,wt as L,xt as R}from"./constants-OjwdsvEy.js";import{Bt as te,E as z,Gt as ne,Ht as B,Mi as V,Ut as H,Vt as U,ai as W,en as G,gr as K,ni as q,vi as J,xn as Y}from"./index-CGledtPk.js";import{t as X}from"./FilePreview-C6Mxgtrr.js";import{t as Z}from"./ImagePreview-dDtels8M.js";import{t as re}from"./Consumption-C8TyvoKa.js";import{a as Q,n as ie,r as ae,t as oe}from"./pagination-C9els9qY.js";import{t as se}from"./VideoPlayer-BkHLKJ3n.js";import{t as ce}from"./ApiCodeButton-CW2-0UoK.js";import{t as le}from"./BotPlaceholder-Ch31vf63.js";var ue=v({name:`LayoutOmni`,components:{MagicIcon:M,ElDrawer:S,ElButton:V},mixins:[C]}),de={class:`main flex flex-row flex-1`},fe={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)]`},pe={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function me(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),h=l(`el-drawer`);return g(),s(`div`,de,[e(`div`,fe,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,pe,[d(t.$slots,`result`,{},void 0,!0)]),u(a(m,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[_,!t.tasksEmpty]]),a(h,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var he=z(ue,[[`render`,me],[`__scopeId`,`data-v-b76ffabf`]]),ge=v({name:`OmniPromptInput`,components:{PromptTextarea:k},computed:{prompt:{get(){return this.$store.state.omni?.config?.prompt},set(e){this.$store.commit(`omni/setConfig`,{...this.$store.state.omni?.config,prompt:e})}}},mounted(){this.prompt||=``}});function _e(e,t,n,r,i,a){let o=l(`prompt-textarea`);return g(),f(o,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`omni.name.prompt`),info:e.$t(`omni.description.prompt`),placeholder:e.$t(`omni.placeholder.prompt`),"min-rows":5},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var ve=z(ge,[[`render`,_e]]),ye=v({name:`OmniResolutionSelector`,components:{InfoIcon:Q},data(){return{options:[{value:N,label:`720p`},{value:P,label:`1080p`}]}},computed:{value:{get(){return this.$store.state.omni?.config?.resolution},set(e){this.$store.commit(`omni/setConfig`,{...this.$store.state.omni?.config,resolution:e})}}},mounted(){this.value||=F}}),be={class:`resolution`},xe={class:`header`},Se={class:`title font-bold`},Ce={class:`items`},we=[`onClick`];function Te(t,r,o,u,d,f){let p=l(`info-icon`);return g(),s(`div`,be,[e(`div`,xe,[e(`h2`,Se,i(t.$t(`omni.name.resolution`)),1),a(p,{content:t.$t(`omni.description.resolution`),class:`info`},null,8,[`content`])]),e(`div`,Ce,[(g(!0),s(c,null,h(t.options,e=>(g(),s(`div`,{key:e.value,class:n([`item`,{active:t.value===e.value}]),onClick:n=>t.value=e.value},i(e.label),11,we))),128))])])}var Ee=z(ye,[[`render`,Te],[`__scopeId`,`data-v-1f9abe29`]]),De=v({name:`OmniRatioSelector`,components:{InfoIcon:Q},computed:{options(){return[{value:L,label:`16:9`,w:32,h:18},{value:I,label:`9:16`,w:18,h:32}]},value:{get(){return this.$store.state.omni?.config?.aspect_ratio},set(e){this.$store.commit(`omni/setConfig`,{...this.$store.state.omni?.config,aspect_ratio:e})}}},mounted(){this.value||=R}}),Oe={class:`ratio`},ke={class:`header`},Ae={class:`title font-bold`},je={class:`items`},Me=[`onClick`],Ne={class:`preview`},Pe={class:`name`};function Fe(t,r,o,u,d,f){let p=l(`info-icon`);return g(),s(`div`,Oe,[e(`div`,ke,[e(`h2`,Ae,i(t.$t(`omni.name.ratio`)),1),a(p,{content:t.$t(`omni.description.ratio`),class:`info`},null,8,[`content`])]),e(`div`,je,[(g(!0),s(c,null,h(t.options,r=>(g(),s(`div`,{key:r.value,class:n([`item`,{active:t.value===r.value}]),onClick:e=>t.value=r.value},[e(`div`,Ne,[e(`div`,{class:`rect`,style:m({width:r.w+`px`,height:r.h+`px`})},null,4)]),e(`div`,Pe,i(r.label),1)],10,Me))),128))])])}var Ie=z(De,[[`render`,Fe],[`__scopeId`,`data-v-1c0c1511`]]),Le=4,Re=v({name:`OmniReferenceImagesInput`,components:{ElUpload:y,ElButton:V,InfoIcon:Q,ImagePreview:Z,UploadIcon:j},mixins:[H,U],data(){return{fileList:[],uploadUrl:W()+`/api/v1/files/`,limit:Le,suppressWatch:!1}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url).filter(e=>!!e)||[]},value(){return this.$store.state.omni?.config?.image_urls}},watch:{value:{immediate:!0,handler(e){if(this.suppressWatch)return;if(!e||e.length===0){let e=(this.fileList||[]).filter(e=>!e?.response?.file_url);this.fileList=e.length?e:[];return}let t=[];e.forEach(e=>{let n=this.fileList.find(t=>t?.response?.file_url===e||t?.url===e);n?t.push(n):t.push({name:e.split(`/`).pop()||e,url:e,status:`success`,percentage:100,response:{file_url:e}})}),(this.fileList||[]).filter(e=>!e?.response?.file_url).forEach(e=>{t.some(t=>t===e||t?.url===e?.url||t?.response?.file_url===e?.response?.file_url)||t.push(e)}),this.fileList=t}}},methods:{onChange(e){if(!e?.url&&e?.raw)try{e.url=URL.createObjectURL(e.raw)}catch{}},onRemove(e){if(e?.url&&typeof e.url==`string`&&e.url.startsWith(`blob:`))try{URL.revokeObjectURL(e.url)}catch{}this.onSetReferenceImages()},onExceed(){J.warning(this.$t(`omni.message.uploadReferenceExceed`))},onError(){J.error(this.$t(`omni.message.uploadError`))},onSetReferenceImages(){let e=this.urls;this.suppressWatch=!0,this.$store.commit(`omni/setConfig`,{...this.$store.state.omni?.config,image_urls:e.length?e:void 0}),this.$nextTick(()=>{this.suppressWatch=!1})},async onSuccess(e,t){e?.file_url&&(t.url=e.file_url,t.response=e),this.onSetReferenceImages()},onRemovePreview(e,t){if(this.fileList.splice(e,1),t?.url&&typeof t.url==`string`&&t.url.startsWith(`blob:`))try{URL.revokeObjectURL(t.url)}catch{}this.onSetReferenceImages()}}}),ze={class:`field mb-[10px] flex items-center justify-between`},Be={class:`title m-0 text-[14px] font-bold`},Ve={class:`upload-wrapper flex flex-col items-start gap-[8px]`},He={class:`controls flex items-center`},Ue={class:`file-list flex flex-wrap gap-[10px]`};function We(t,n,o,u,d,m){let _=l(`upload-icon`),v=l(`el-button`),y=l(`el-upload`),b=l(`info-icon`),x=l(`image-preview`);return g(),s(c,null,[e(`div`,ze,[e(`h2`,Be,i(t.$t(`omni.name.referenceImages`)),1),e(`div`,Ve,[e(`div`,He,[a(y,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,name:`file`,class:`value`,limit:t.limit,multiple:!0,"show-file-list":!1,action:t.uploadUrl,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,"on-change":t.onChange,"on-remove":t.onRemove,headers:t.headers},{default:p(()=>[a(v,{size:`small`,type:`primary`,round:``},{default:p(()=>[a(_,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`omni.button.upload`)),1)]),_:1})]),_:1},8,[`file-list`,`limit`,`action`,`on-exceed`,`on-error`,`on-success`,`on-change`,`on-remove`,`headers`]),a(b,{content:t.$t(`omni.description.referenceImages`)},null,8,[`content`])])])]),e(`div`,Ue,[(g(!0),s(c,null,h(t.fileList,(e,n)=>(g(),f(x,{key:e.uid||e?.response?.file_url||e.url||n,url:e.url||e?.response?.file_url,name:e.name,percentage:e.percentage,onRemove:r=>t.onRemovePreview(n,e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))),128))])],64)}var Ge=z(Re,[[`render`,We]]),Ke=v({name:`OmniVideoInput`,components:{ElUpload:y,ElButton:V,InfoIcon:Q,FilePreview:X,UploadIcon:j},mixins:[U],data(){return{fileList:[],uploadUrl:W()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},videoUrl(){return this.$store.state.omni?.config?.video_urls?.[0]},videoName(){let e=this.videoUrl||``;return e.split(`/`).pop()||e}},methods:{onExceed(){J.warning(this.$t(`omni.message.uploadVideoExceed`))},onError(){J.error(this.$t(`omni.message.uploadVideoError`))},beforeUpload(e){let t=e.type===`video/mp4`||e.type===`video/quicktime`,n=e.size/1024/1024<200;return t?n?!0:(J.error(this.$t(`omni.message.uploadVideoSizeExceed`)),!1):(J.error(this.$t(`omni.message.uploadVideoTypeFailed`)),!1)},setVideoUrls(e){this.$store.commit(`omni/setConfig`,{...this.$store.state.omni?.config,video_urls:e?[e]:void 0})},onRemove(){this.fileList=[],this.setVideoUrls(void 0)},async onSuccess(e,t){let n=e?.file_url||t?.response?.file_url;this.setVideoUrls(n||void 0)}}}),qe={class:`field flex items-center justify-between`},Je={class:`title font-bold text-[14px] mb-[10px]`},Ye={class:`upload-wrapper flex flex-col items-start gap-[8px]`},Xe={class:`controls flex items-center`},Ze={key:0,class:`file-list flex flex-wrap gap-[10px]`};function Qe(t,n,u,d,f,m){let h=l(`upload-icon`),_=l(`el-button`),v=l(`el-upload`),y=l(`info-icon`),b=l(`file-preview`);return g(),s(c,null,[e(`div`,qe,[e(`h2`,Je,i(t.$t(`omni.name.referenceVideo`)),1),e(`div`,Ye,[e(`div`,Xe,[a(v,{"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.mp4,.mov`,name:`file`,class:`value`,"show-file-list":!1,limit:1,multiple:!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{default:p(()=>[a(_,{size:`small`,type:`primary`,round:``},{default:p(()=>[a(h,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`omni.button.uploadVideo`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`]),a(y,{content:t.$t(`omni.description.referenceVideo`),class:`ml-2`},null,8,[`content`])])])]),t.videoUrl?(g(),s(`div`,Ze,[a(b,{url:t.videoUrl,name:t.videoName,percentage:100,onRemove:t.onRemove},null,8,[`url`,`name`,`onRemove`])])):o(``,!0)],64)}var $e=v({name:`OmniConfigPanel`,components:{ElButton:V,MagicIcon:M,PromptInput:ve,ResolutionSelector:Ee,RatioSelector:Ie,ReferenceImagesInput:Ge,VideoInput:z(Ke,[[`render`,Qe],[`__scopeId`,`data-v-74e85e4f`]]),Consumption:re},emits:[`generate`],computed:{config(){return this.$store.state.omni?.config},consumption(){return ne(this.config,this.service?.cost)},service(){return this.$store.state.omni?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),et={class:`flex flex-col h-full`},tt={class:`flex-1 overflow-y-auto p-5`},nt={class:`flex flex-col items-center justify-center px-5 pb-5`};function rt(t,n,o,c,u,d){let f=l(`prompt-input`),m=l(`ratio-selector`),h=l(`resolution-selector`),_=l(`reference-images-input`),v=l(`video-input`),y=l(`consumption`),b=l(`magic-icon`),x=l(`el-button`);return g(),s(`div`,et,[e(`div`,tt,[a(f,{class:`mb-4`}),a(m,{class:`mb-4`}),a(h,{class:`mb-4`}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`})]),e(`div`,nt,[a(y,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),a(x,{type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(b,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`omni.button.generate`)),1)]),_:1},8,[`onClick`])])])}var it=z($e,[[`render`,rt]]),at=v({name:`OmniTaskPreview`,components:{ApplicationIcon:w,ChannelIcon:O,CopyToClipboard:E,ExpandIcon:D,InfoIcon:A,MagicIcon:M,TimeIcon:T,WarningIcon:ee,ElAlert:x,VideoPlayer:se,ElTooltip:b,ElButton:V,ImagePreview:Z,ApiCodeButton:ce},props:{modelValue:{type:Object,required:!0}},data(){return{nowTs:Date.now(),timer:0}},computed:{video(){return this.modelValue?.response?.data?.[0]},inputImage(){return this.modelValue?.request?.image_urls?.[0]},pendingElapsed(){let e=parseFloat((this.modelValue?.created_at||``).toString());if(e)return Math.max(0,Math.floor(this.nowTs/1e3-e))}},watch:{"modelValue.response":{handler(e){e&&this.stopTimer()}}},mounted(){this.modelValue?.response||(this.timer=window.setInterval(()=>{this.nowTs=Date.now()},1e3))},beforeUnmount(){this.stopTimer()},methods:{stopTimer(){this.timer&&=(window.clearInterval(this.timer),0)},onDownload(e){window.open(e,`_blank`)}}}),ot={class:`preview`},st={class:`left`},ct={class:`main`},lt={class:`bot`},ut={class:`datetime`},dt={class:`info`},ft={key:0,class:`flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto`},pt={key:1,class:`prompt mt-2`},mt={key:0},ht={key:1},gt={key:0,class:n({content:!0})},_t={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},vt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},yt={key:1,class:n({content:!0})},bt={key:0,class:`mb-4`},xt={key:1,class:n({operations:!0,"mt-2":!0,"mb-2":!0})},St={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ct={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},wt={key:0},Tt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Et={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Dt={key:2,class:n({content:!0})},Ot={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},kt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},At={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},jt={key:3,class:n({content:!0})},Mt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function Nt(n,c,u,d,f,m){let h=l(`capability-presentation`),_=l(`image-preview`),v=l(`time-icon`),y=l(`magic-icon`),b=l(`copy-to-clipboard`),x=l(`el-alert`),S=l(`video-player`),C=l(`el-button`),w=l(`el-tooltip`),T=l(`api-code-button`),E=l(`application-icon`),D=l(`expand-icon`),O=l(`channel-icon`),k=l(`warning-icon`),A=l(`info-icon`);return g(),s(`div`,ot,[e(`div`,st,[a(h,{capability:`omni`,part:`avatar`,class:`avatar`})]),e(`div`,ct,[e(`div`,lt,[a(h,{capability:`omni`,part:`name`}),e(`span`,ut,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1)]),e(`div`,dt,[n.inputImage?(g(),s(`div`,ft,[a(_,{url:n.inputImage,name:`image`,closable:!1},null,8,[`url`])])):o(``,!0),n.modelValue?.request?.prompt?(g(),s(`p`,pt,[r(i(n.modelValue?.request?.prompt)+` `,1),n.modelValue?.response?n.video?.state===`processing`||n.video?.state===`pending`?(g(),s(`span`,ht,` - (`+i(n.$t(`omni.status.processing`))+`) `,1)):o(``,!0):(g(),s(`span`,mt,` - (`+i(n.$t(`omni.status.pending`))+`) `,1))])):o(``,!0)]),n.modelValue?.response?n.modelValue?.response?.success===!0?(g(),s(`div`,yt,[n.video?.video_url?(g(),s(`div`,bt,[a(S,{src:n.video?.video_url},null,8,[`src`])])):o(``,!0),n.video?.video_url?(g(),s(`div`,xt,[a(w,{class:`box-item`,effect:`dark`,content:n.$t(`omni.message.downloadVideo`),placement:`top-start`},{default:p(()=>[a(C,{type:`info`,size:`small`,class:`btn-action`,onClick:c[0]||=t(e=>n.onDownload(n.video?.video_url),[`stop`])},{default:p(()=>[r(i(n.$t(`omni.button.download`)),1)]),_:1})]),_:1},8,[`content`]),a(T,{path:`/gemini/videos`,body:n.modelValue?.request},null,8,[`body`])])):o(``,!0),a(x,{closable:!1,class:`mt-2 success`},{default:p(()=>[n.modelValue?.request?.model?(g(),s(`p`,St,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.model`))+`: `+i(n.modelValue?.request?.model),1)])):o(``,!0),n.modelValue?.request?.resolution?(g(),s(`p`,Ct,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.resolution`))+`: `+i(n.modelValue?.request?.resolution)+` `,1),n.modelValue?.request?.aspect_ratio?(g(),s(`span`,wt,` · `+i(n.modelValue?.request?.aspect_ratio),1)):o(``,!0)])):o(``,!0),e(`p`,Tt,[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(b,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),n.modelValue?.elapsed?(g(),s(`p`,Et,[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),n.modelValue?.response?.trace_id?(g(),s(`p`,$,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(b,{content:n.modelValue?.response?.trace_id,class:`btn-copy inline-block`},null,8,[`content`])])):o(``,!0)]),_:1})])):n.modelValue?.response?.success===!1?(g(),s(`div`,Dt,[a(x,{closable:!1,class:`failure`},{template:p(()=>[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.failure`)),1)]),default:p(()=>[e(`p`,Ot,[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(b,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),n.modelValue?.response?.error?.message?(g(),s(`p`,kt,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(b,{content:n.modelValue?.response?.error?.message,class:`btn-copy inline-block`},null,8,[`content`])])):o(``,!0),n.modelValue?.response?.trace_id?(g(),s(`p`,At,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(b,{content:n.modelValue?.response?.trace_id,class:`btn-copy inline-block`},null,8,[`content`])])):o(``,!0)]),_:1})])):(g(),s(`div`,jt,[a(x,{closable:!1,class:`info`},{template:p(()=>[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.status`)),1)]),default:p(()=>[e(`p`,Mt,[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(b,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])])]),_:1})])):(g(),s(`div`,gt,[a(x,{closable:!1,class:`info`},{template:p(()=>[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.status.pending`)),1)]),default:p(()=>[e(`p`,_t,[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(b,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),n.pendingElapsed===void 0?o(``,!0):(g(),s(`p`,vt,[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`omni.name.elapsed`))+`: `+i(n.pendingElapsed)+`s `,1)]))]),_:1})]))])])}var Pt=v({name:`OmniRecentPanel`,components:{TaskPreview:z(at,[[`render`,Nt],[`__scopeId`,`data-v-4cd17d67`]]),BotPlaceholder:le,NoTasks:ae,ScrollList:ie},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],computed:{tasks(){return{...this.$store.state.omni?.tasks,items:this.$store.state.omni?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Ft={key:0},It={key:2,class:`w-full h-full flex items-center justify-center`};function Lt(e,t,n,r,i,u){let d=l(`bot-placeholder`),m=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return g(),s(c,null,[e.tasks?.items===void 0?(g(),s(`div`,Ft,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(g(),f(_,{key:1,ref:`scrollList`,class:`tasks w-full h-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(g(!0),s(c,null,h(e.tasks?.items,e=>(g(),f(m,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(g(),s(`div`,It,[a(v)])):o(``,!0)],64)}var Rt=v({name:`OmniIndex`,components:{ConfigPanel:it,Layout:he,RecentPanel:z(Pt,[[`render`,Lt]])},mixins:[B],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.omni?.status?.getApplications===q.Request},tasksLoading(){return this.$store.state.omni?.status?.getTasks===q.Request||this.fetchingTasks},credential(){return this.$store.state.omni?.credential},config(){return this.$store.state.omni?.config},tasks(){return this.$store.state.omni?.tasks}},watch:{initialized:{async handler(e){e&&(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 oe({tasks:this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){await this.$store.dispatch(`omni/getService`)},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks)return;let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};this.fetchingTasks=!0;try{await this.$store.dispatch(`omni/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!te(this.uploadTracker,e=>this.$t(e),e=>J.warning(e)))return;let e={...this.config||{}};if(typeof e?.prompt==`string`&&(e.prompt=e.prompt.trim(),e.prompt||delete e.prompt),Array.isArray(e?.image_urls)&&(e.image_urls=e.image_urls.filter(e=>typeof e==`string`&&e.trim()),e.image_urls.length||delete e.image_urls),Array.isArray(e?.video_urls)&&(e.video_urls=e.video_urls.filter(e=>typeof e==`string`&&e.trim()),e.video_urls.length||delete e.video_urls),!e?.prompt){J.warning(this.$t(`omni.message.promptRequired`));return}if(e?.video_urls&&!e?.image_urls){J.warning(this.$t(`omni.message.videoRequiresImage`));return}let t={...e,async:!0};if(!G())return;let n=this.credential?.token;if(!n){console.error(`no token specified`);return}J.info(this.$t(`omni.message.startingTask`)),K(`omni`,Y.generate(t,{token:n})).then(()=>{J.success(this.$t(`omni.message.startTaskSuccess`))}).catch(e=>{let t=e?.response?.data;t?.error?.code===`used_up`?J.error(this.$t(`omni.message.usedUp`)):J.error(this.$t(`omni.message.startTaskFailed`)+(t?.error?.message||``))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function zt(e,t,n,r,i,o){let s=l(`config-panel`),c=l(`recent-panel`),u=l(`layout`);return g(),f(u,null,{config:p(()=>[a(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:p(()=>[a(c,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var Bt=z(Rt,[[`render`,zt]]);export{Bt as default};
|
|
@@ -1 +0,0 @@
|
|
|
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,S as c,T as l,at as u,ht as d,j as f,mt as p,ot as m,rt as h,st as ee,tt as g,z as _}from"./vendor-chart-Dw-P17PN.js";import{t as v}from"./upload-C2rOvzuC.js";import{t as y}from"./checkbox-CeoqKfX8.js";import{t as b}from"./drawer-D-bnXRf3.js";import{n as x,r as S,t as C}from"./dropdown-BpPRQPdx.js";import{t as w}from"./popover-COwIhM8v.js";import{n as T,t as E}from"./skeleton-B3LIGUiE.js";import{t as te}from"./arrow-right-DxzHv1H9.js";import{t as D}from"./arrow-up-BmnKuaCH.js";import{t as ne}from"./brain-BuTSJ4Bx.js";import{t as O}from"./check-BvhBit-R.js";import{t as re}from"./chevron-down-BcwF9pRo.js";import{n as k,t as ie}from"./CodeSnippet-xVfCzfy3.js";import{t as A}from"./CopyToClipboard-C6NFeJB8.js";import{t as ae}from"./eye-CieSMJw9.js";import{t as oe}from"./file-text-C0CkdNI2.js";import{n as j,t as se}from"./shield-Cc61xt_v.js";import{t as ce}from"./folder-BGNyTalq.js";import{t as M}from"./gauge-Bsz3IHkl.js";import{t as N}from"./history-Ysh3ebc0.js";import{t as P}from"./info-DcBJeNVH.js";import{t as F}from"./laptop-C5GK59Hf.js";import{t as I}from"./link-CJFVQKQ9.js";import{t as L}from"./loader-circle-4c3wOPmh.js";import{i as le,n as R,t as ue}from"./AskUserQuestionCard-D4u_aT4P.js";import{t as de}from"./paperclip-BEoczOIA.js";import{t as z}from"./pencil-DTkf2Otw.js";import{t as B}from"./plus-DJLwjizL.js";import{t as V}from"./rotate-cw-4Xa1K2_e.js";import{t as fe}from"./search-guj3GQsJ.js";import{t as pe}from"./square-Df5AHNlG.js";import{t as me}from"./terminal-DvHtvSWu.js";import{t as he}from"./trash-2-D65x_ZcP.js";import{Ci as H,E as U,Mi as W,Ut as ge,Vi as G,_i as _e,ai as ve,fi as ye,gi as K,hi as q,ni as J,qt as be,vi as Y}from"./index-CGledtPk.js";import"./vendor-highlight-BtIeKitL.js";import{s as xe,t as Se}from"./codingBridgeNotify-DArawvgB.js";var Ce=K(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),we=K(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),Te=K(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),Ee=_({name:`CodingBridgeNotificationToggle`,components:{LoadingIcon:L,NotificationIcon:we,NotificationOffIcon:Ce,ElButton:W},data(){return{enabled:!1,busy:!1}},computed:{supported(){return ye()||xe()}},mounted(){this.enabled=!ye()&&Se()===`granted`},methods:{async onToggle(){this.busy=!0;try{if(this.enabled){await this.$store.dispatch(`codingBridge/disableNotifications`),this.enabled=!1,Y.success(this.$t(`codingBridge.notify.disabled`));return}let e=await this.$store.dispatch(`codingBridge/enableNotifications`);e===`enabled`?(this.enabled=!0,Y.success(this.$t(`codingBridge.notify.enabled`))):e===`denied`?Y.warning(this.$t(`codingBridge.notify.denied`)):Y.warning(this.$t(`codingBridge.notify.unsupported`))}catch{Y.error(this.$t(`codingBridge.notify.failed`))}finally{this.busy=!1}}}});function De(e,t,n,r,i,a){let s=u(`loading-icon`),c=u(`notification-icon`),l=u(`notification-off-icon`),d=u(`el-button`);return e.supported?(g(),f(d,{key:0,circle:``,size:`small`,type:e.enabled?`primary`:`default`,title:e.enabled?e.$t(`codingBridge.notify.disable`):e.$t(`codingBridge.notify.enable`),disabled:e.busy,"aria-label":e.enabled?e.$t(`codingBridge.notify.disable`):e.$t(`codingBridge.notify.enable`),onClick:e.onToggle},{default:p(()=>[e.busy?(g(),f(s,{key:0,class:`adc-icon-spin`,size:`1em`,"aria-hidden":`true`,focusable:`false`})):e.enabled?(g(),f(c,{key:1,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(g(),f(l,{key:2,size:`1em`,"aria-hidden":`true`,focusable:`false`}))]),_:1},8,[`type`,`title`,`disabled`,`aria-label`,`onClick`])):o(``,!0)}var Oe=_({name:`CodingBridgeNodeList`,components:{AddIcon:B,DeleteIcon:he,DesktopIcon:le,DeveloperIcon:F,RedoIcon:V,ElButton:W,NotificationToggle:U(Ee,[[`render`,De]])},emits:[`pair`],computed:{nodes(){return this.$store.state.codingBridge?.nodes??[]},currentNodeId(){return this.$store.state.codingBridge?.currentNodeId},connection(){return this.$store.state.codingBridge?.connection??`disconnected`},connectionLabel(){return this.$t(`codingBridge.connection.${this.connection}`)},connectionDotClass(){switch(this.connection){case`connected`:return`bg-[var(--el-color-success)]`;case`connecting`:return`bg-[var(--el-color-warning)]`;case`error`:return`bg-[var(--el-color-danger)]`;default:return`bg-[var(--app-text-subtle)]`}}},methods:{onSelect(e){this.$store.dispatch(`codingBridge/selectNode`,e)},onRefresh(){this.$store.dispatch(`codingBridge/getNodes`)},async onDelete(e){try{await _e.confirm(this.$t(`codingBridge.nodeList.removeConfirm`,{name:e.name}),this.$t(`codingBridge.nodeList.remove`),{confirmButtonText:this.$t(`codingBridge.nodeList.remove`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`})}catch{return}try{await this.$store.dispatch(`codingBridge/deleteNode`,e.node_id),Y.success(this.$t(`codingBridge.nodeList.removeSuccess`))}catch{Y.error(this.$t(`codingBridge.nodeList.removeFailed`))}}}}),ke={class:`node-list flex flex-col h-full bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},Ae={class:`flex items-center justify-between px-4 py-3 border-b border-[var(--app-border-subtle)]`},je={class:`flex items-center gap-2 font-medium`},Me={class:`flex items-center gap-1`},Ne={class:`flex items-center gap-2 px-4 py-2 text-xs border-b border-[var(--app-border-subtle)]`},Pe={class:`text-[var(--app-text-subtle)]`},Fe={class:`flex-1 overflow-y-auto`},Ie={key:0,class:`p-6 text-center text-sm text-[var(--app-text-subtle)]`},Le={class:`mb-3`},Re={key:1,class:`list-none m-0 p-0`},ze=[`onClick`],Be={class:`flex-1 min-w-0`},Ve={class:`flex items-center gap-2`},He={class:`truncate font-medium`},Ue=[`title`],We={class:`text-xs text-[var(--app-text-subtle)] truncate`};function Ge(o,c,d,f,m,ee){let _=u(`developer-icon`),v=u(`notification-toggle`),y=u(`redo-icon`),b=u(`el-button`),x=u(`add-icon`),S=u(`desktop-icon`),C=u(`delete-icon`);return g(),s(`div`,ke,[e(`div`,Ae,[e(`div`,je,[a(_,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,i(o.$t(`codingBridge.nodeList.title`)),1)]),e(`div`,Me,[a(v),a(b,{circle:``,size:`small`,"aria-label":o.$t(`codingBridge.nodeList.refresh`),title:o.$t(`codingBridge.nodeList.refresh`),onClick:o.onRefresh},{default:p(()=>[a(y,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`]),a(b,{type:`primary`,circle:``,size:`small`,"aria-label":o.$t(`codingBridge.nodeList.pair`),title:o.$t(`codingBridge.nodeList.pair`),onClick:c[0]||=e=>o.$emit(`pair`)},{default:p(()=>[a(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`])])]),e(`div`,Ne,[e(`span`,{class:n([`inline-block w-2 h-2 rounded-full`,o.connectionDotClass])},null,2),e(`span`,Pe,i(o.connectionLabel),1)]),e(`div`,Fe,[o.nodes.length?(g(),s(`ul`,Re,[(g(!0),s(l,null,h(o.nodes,r=>(g(),s(`li`,{key:r.node_id,class:n([`group flex items-center gap-3 px-4 py-3 cursor-pointer border-b border-[var(--app-border-subtle)] hover:bg-[var(--app-content-bg)]`,{"bg-[var(--app-content-bg)]":r.node_id===o.currentNodeId}]),onClick:e=>o.onSelect(r.node_id)},[a(S,{class:`text-[var(--app-text-subtle)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`div`,Be,[e(`div`,Ve,[e(`span`,He,i(r.name),1),e(`span`,{class:n([`inline-block w-2 h-2 rounded-full flex-none`,r.status===`online`?`bg-[var(--el-color-success)]`:`bg-[var(--app-text-subtle)]`]),title:r.status===`online`?o.$t(`codingBridge.status.online`):o.$t(`codingBridge.status.offline`)},null,10,Ue)]),e(`div`,We,i(r.status===`online`?o.$t(`codingBridge.status.online`):o.$t(`codingBridge.status.offline`)),1)]),a(b,{class:`opacity-0 group-hover:opacity-100`,text:``,circle:``,size:`small`,"aria-label":o.$t(`codingBridge.nodeList.remove`),title:o.$t(`codingBridge.nodeList.remove`),onClick:t(e=>o.onDelete(r),[`stop`])},{default:p(()=>[a(C,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`])],10,ze))),128))])):(g(),s(`div`,Ie,[e(`p`,Le,i(o.$t(`codingBridge.nodeList.empty`)),1),a(b,{type:`primary`,round:``,size:`small`,onClick:c[1]||=e=>o.$emit(`pair`)},{default:p(()=>[a(x,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(o.$t(`codingBridge.nodeList.pairFirst`)),1)]),_:1})]))])])}var Ke=U(Oe,[[`render`,Ge]]),qe=e=>{let t=e?.questions;return Array.isArray(t)&&t.length>0&&t.every(e=>e&&typeof e.question==`string`&&Array.isArray(e.options))},Je=e=>e?(e.tool||``).toLowerCase()===`askuserquestion`?!0:qe(e.input):!1,Ye=e=>({questions:e.input?.questions??[]}),Xe=100,X=4e4,Ze=12e3,Z=6e3,Q=(e,t)=>{if(e.length<=t)return e;let n=((e.length-t)/1024).toFixed(1);return`${e.slice(0,t)}\n\n··· +${n} KB ···`},Qe=_({name:`CodingBridgeTranscriptItem`,directives:{highlight:be},components:{CloseIcon:q,ConfirmIcon:O,EditIcon:z,FileIcon:j,InfoIcon:P,VueMarkdown:R,CodeSnippet:ie,CopyToClipboard:A},props:{event:{type:Object,required:!0},editable:{type:Boolean,default:!1}},emits:[`edit`],data(){return{renderedText:Q(this.event.text||``,X),streamTimer:0}},computed:{commandText(){let e=this.event.input;if(!e)return``;for(let t of[`command`,`cmd`,`script`]){let n=e[t];if(typeof n==`string`&&n.trim())return Q(n,Z)}return``},filePath(){let e=this.event.input;if(!e)return``;for(let t of[`file_path`,`filePath`,`path`,`notebook_path`,`filename`]){let n=e[t];if(typeof n==`string`&&n.trim())return n}return``},toolDescription(){let e=this.event.input?.description;return typeof e==`string`?e:``},toolIcon(){if(this.commandText)return me;let e=(this.event.tool??``).toLowerCase();return/read|cat|view/.test(e)?oe:/write|edit|create|update|insert/.test(e)?z:/grep|glob|search|find|list/.test(e)?fe:k},questionLines(){let e=(this.event.tool??``).toLowerCase(),t=this.event.input?.questions;return!(e===`askuserquestion`||Array.isArray(t))||!Array.isArray(t)?[]:t.filter(e=>e&&typeof e.question==`string`).map(e=>({header:typeof e.header==`string`?e.header:``,question:e.question}))},inputText(){let e=this.event.input;if(!e)return``;let t={};for(let[n,r]of Object.entries(e))n===`timeout`||n===`description`||(t[n]=r);if(Object.keys(t).length===0)return``;try{return Q(JSON.stringify(t,null,2),Z)}catch{return Q(String(e),Z)}},thinkingText(){return Q(this.event.text||``,X)},resultText(){let e=this.event.content;return typeof e==`string`&&e.length>0?e:`—`},resultDisplay(){return Q(this.resultText,Ze)},resultLabel(){let e=[];return this.event.is_error?e.push(this.$t(`codingBridge.transcript.turnFailed`)):e.push(this.$t(`codingBridge.transcript.turnDone`)),typeof this.event.cost_usd==`number`&&this.event.cost_usd>0&&e.push(`$${this.event.cost_usd.toFixed(4)}`),e.join(` · `)},hasAttachments(){return!!this.event.attachments?.length},noticeText(){let e=this.event.subtype,t=this.event.command;if(t){if(e===`slash_unavailable`)return this.$t(`codingBridge.notice.slashUnavailable`,{command:t});if(e===`slash_codex_unsupported`)return this.$t(`codingBridge.notice.slashCodexUnsupported`,{command:t})}return this.event.text||``}},watch:{"event.text"(){this.scheduleRender()},"event.streaming"(e){e||this.flushRender()}},beforeUnmount(){this.streamTimer&&window.clearTimeout(this.streamTimer)},methods:{scheduleRender(){if(!this.event.streaming){this.flushRender();return}this.streamTimer||=window.setTimeout(()=>{this.streamTimer=0,this.renderedText=Q(this.event.text||``,X)},Xe)},flushRender(){this.streamTimer&&=(window.clearTimeout(this.streamTimer),0),this.renderedText=Q(this.event.text||``,X)}}}),$e={key:0,class:`group flex items-end justify-end gap-1.5`},et=[`title`,`aria-label`],tt={class:`max-w-[85%] rounded-lg px-3 py-2 bg-[var(--el-color-primary)] text-white whitespace-pre-wrap break-words`},nt=[`src`],rt=[`href`],it=[`src`],at={key:1,class:`flex h-9 w-9 items-center justify-center rounded bg-white/15`},ot={class:`min-w-0 truncate`},st={key:2},ct={key:2,class:`whitespace-pre-wrap break-words italic text-[var(--app-text-subtle)] border-l-2 border-[var(--app-border-subtle)] pl-3`},lt={key:3,class:`overflow-hidden rounded-md bg-[var(--app-sidebar-bg)] border border-[var(--app-border-subtle)]`},ut={class:`flex items-center gap-2 px-2.5 py-1.5 font-medium text-[var(--app-text-subtle)]`},dt={key:0,class:`min-w-0 truncate text-xs font-normal opacity-70`},ft={key:0,class:`flex flex-col gap-1.5 px-2.5 pb-2`},pt={key:0,class:`font-medium text-[var(--app-text)]`},mt={class:`whitespace-pre-wrap break-words text-[var(--app-text-subtle)]`},ht={key:1,class:`px-2.5 pb-2`},gt={key:2,class:`px-2.5 pb-2 font-mono text-xs break-all text-[var(--app-text-subtle)]`},_t={key:3,class:`px-2.5 pb-2`},vt={key:0,class:`absolute right-1.5 top-1.5 z-10 rounded bg-[var(--app-content-bg)] px-1 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100`},yt={key:5,class:`flex items-center gap-2 text-xs text-[var(--app-text-subtle)]`},bt={key:6,class:`flex items-start gap-2 rounded-md bg-[var(--app-sidebar-bg)] border border-[var(--app-border-subtle)] text-[var(--app-text-subtle)] px-3 py-2 text-xs`},xt={class:`whitespace-pre-wrap break-words`},St={key:7,class:`rounded-md bg-[var(--el-color-danger-light-9)] text-[var(--el-color-danger)] px-3 py-2 whitespace-pre-wrap break-words`};function Ct(t,r,c,p,_,v){let y=u(`edit-icon`),b=u(`file-icon`),x=u(`vue-markdown`),S=u(`code-snippet`),C=u(`copy-to-clipboard`),w=u(`close-icon`),T=u(`confirm-icon`),E=u(`info-icon`),te=m(`highlight`);return g(),s(`div`,{class:n([`transcript-item text-sm leading-relaxed`,`kind-${t.event.kind}`])},[t.event.kind===`prompt`?(g(),s(`div`,$e,[t.editable?(g(),s(`button`,{key:0,type:`button`,class:`cb-edit-btn opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100`,title:t.$t(`codingBridge.session.editPrompt`),"aria-label":t.$t(`codingBridge.session.editPrompt`),onClick:r[0]||=e=>t.$emit(`edit`,t.event)},[a(y,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,et)):o(``,!0),e(`div`,tt,[t.event.images&&t.event.images.length?(g(),s(`div`,{key:0,class:n([`flex flex-wrap gap-1.5`,{"mb-1.5":t.event.text||t.hasAttachments}])},[(g(!0),s(l,null,h(t.event.images,(e,t)=>(g(),s(`img`,{key:t,src:e,class:`w-16 h-16 rounded object-cover`,alt:``},null,8,nt))),128))],2)):o(``,!0),t.hasAttachments?(g(),s(`div`,{key:1,class:n([`flex flex-wrap gap-1.5`,{"mb-1.5":t.event.text}])},[(g(!0),s(l,null,h(t.event.attachments,(t,n)=>(g(),s(`a`,{key:`${t.url}-${n}`,href:t.url,target:`_blank`,rel:`noopener noreferrer`,class:`flex max-w-[220px] items-center gap-2 rounded-md bg-white/15 px-2 py-1.5 text-xs text-white hover:bg-white/20`},[t.type===`image`?(g(),s(`img`,{key:0,src:t.url,class:`h-9 w-9 rounded object-cover`,alt:``},null,8,it)):(g(),s(`span`,at,[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})])),e(`span`,ot,i(t.name||t.url),1)],8,rt))),128))],2)):o(``,!0),t.event.text?(g(),s(`span`,st,i(t.event.text),1)):o(``,!0)])])):t.event.kind===`text`?(g(),s(`div`,{key:1,class:n([`cb-stream-text`,{"is-streaming":t.event.streaming}])},[d(a(x,{source:t.renderedText,class:`markdown-body bg-transparent text-[var(--app-text)]`},null,8,[`source`]),[[te]])],2)):t.event.kind===`thinking`?(g(),s(`div`,ct,i(t.thinkingText),1)):t.event.kind===`tool_use`?(g(),s(`div`,lt,[e(`div`,ut,[(g(),f(ee(t.toolIcon),{class:`text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,null,i(t.event.tool),1),t.toolDescription?(g(),s(`span`,dt,i(t.toolDescription),1)):o(``,!0)]),t.questionLines.length?(g(),s(`div`,ft,[(g(!0),s(l,null,h(t.questionLines,(t,n)=>(g(),s(`div`,{key:n,class:`rounded border border-[var(--app-border-subtle)] bg-[var(--app-content-bg)] px-2.5 py-1.5 text-xs`},[t.header?(g(),s(`div`,pt,i(t.header),1)):o(``,!0),e(`div`,mt,i(t.question),1)]))),128))])):t.commandText?(g(),s(`div`,ht,[a(S,{code:t.commandText,lang:`bash`,copyable:``},null,8,[`code`])])):t.filePath?(g(),s(`div`,gt,i(t.filePath),1)):t.inputText?(g(),s(`div`,_t,[a(S,{code:t.inputText,lang:`json`,copyable:``},null,8,[`code`])])):o(``,!0)])):t.event.kind===`tool_result`?(g(),s(`div`,{key:4,class:n([`group relative overflow-hidden rounded-md`,t.event.is_error?`bg-[var(--el-color-danger-light-9)]`:`bg-[var(--app-sidebar-bg)]`])},[t.event.content?(g(),s(`div`,vt,[a(C,{content:t.resultText},null,8,[`content`])])):o(``,!0),e(`pre`,{class:n([`m-0 max-h-72 overflow-auto whitespace-pre-wrap break-words px-2.5 py-2 font-mono text-xs`,t.event.is_error?`text-[var(--el-color-danger)]`:`text-[var(--app-text-subtle)]`])},i(t.resultDisplay),3)],2)):t.event.kind===`result`?(g(),s(`div`,yt,[t.event.is_error?(g(),f(w,{key:0,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(g(),f(T,{key:1,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,null,i(t.resultLabel),1)])):t.event.kind===`notice`?(g(),s(`div`,bt,[a(E,{class:`mt-0.5 flex-none text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,xt,i(t.noticeText),1)])):t.event.kind===`error`?(g(),s(`div`,St,i(t.event.text),1)):o(``,!0)],2)}var wt=U(Qe,[[`render`,Ct],[`__scopeId`,`data-v-2028b19a`]]),Tt=`Pondering.Noodling.Conjuring.Brewing.Cooking.Crafting.Churning.Simmering.Percolating.Ruminating.Musing.Marinating.Synthesizing.Computing.Hatching.Forging.Vibing.Working.Thinking.Cogitating.Mulling.Stewing.Tinkering.Wrangling.Spinning.Reticulating.Manifesting.Deliberating`.split(`.`),Et=[`思考中`,`酝酿中`,`沉思中`,`推敲中`,`构思中`,`计算中`,`琢磨中`,`捣鼓中`,`炼制中`,`召唤中`,`编织中`,`烹饪中`,`咀嚼中`,`盘算中`,`发酵中`,`运转中`,`冥想中`,`鼓捣中`,`熬制中`,`神游中`,`演算中`,`雕琢中`,`头脑风暴中`,`反复斟酌中`],Dt=60,Ot=1500,kt=28,At=_({name:`CodingBridgeThinkingIndicator`,components:{LoadingIcon:L},data(){return{display:``,elapsed:0,charIndex:0,phase:`typing`,currentWord:``,elapsedTimer:0,typeTimer:0}},computed:{words(){return this.$i18n.locale.startsWith(`zh`)?Et:Tt}},mounted(){this.currentWord=this.pickWord(),this.elapsedTimer=window.setInterval(()=>{this.elapsed+=1},1e3),this.scheduleType(Dt)},beforeUnmount(){window.clearInterval(this.elapsedTimer),window.clearTimeout(this.typeTimer)},methods:{pickWord(){let e=this.words;if(e.length<=1)return e[0]??``;let t=this.currentWord;for(;t===this.currentWord;)t=e[Math.floor(Math.random()*e.length)];return t},scheduleType(e){this.typeTimer=window.setTimeout(this.advance,e)},advance(){let e=this.currentWord;this.phase===`typing`?(this.charIndex+=1,this.display=e.slice(0,this.charIndex),this.charIndex>=e.length?(this.phase=`holding`,this.scheduleType(Ot)):this.scheduleType(Dt)):this.phase===`holding`?(this.phase=`deleting`,this.scheduleType(kt)):(--this.charIndex,this.display=e.slice(0,Math.max(0,this.charIndex)),this.charIndex<=0?(this.currentWord=this.pickWord(),this.phase=`typing`,this.scheduleType(Dt)):this.scheduleType(kt))}}}),jt={class:`cb-thinking flex items-center gap-2 text-sm text-[var(--app-text-subtle)] py-1`},Mt={class:`cb-thinking__word`},Nt={class:`cb-thinking__elapsed tabular-nums opacity-60`};function Pt(t,n,o,c,l,d){let f=u(`loading-icon`);return g(),s(`div`,jt,[a(f,{class:`cb-thinking__spinner adc-icon-spin text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Mt,[r(i(t.display),1),n[0]||=e(`span`,{class:`cb-thinking__caret`},`▋`,-1)]),e(`span`,Nt,`(`+i(t.elapsed)+`s)`,1)])}var Ft=U(At,[[`render`,Pt],[`__scopeId`,`data-v-ae116215`]]),It=_({name:`CodingBridgeDirectoryDialog`,components:{ContinueIcon:te,FileIcon:j,FolderIcon:ce,RedoIcon:V,UpIcon:D,ElDialog:H,ElButton:W,ElInput:G},props:{visible:{type:Boolean,default:!1},initialPath:{type:String,default:``}},emits:[`update:visible`,`select`],data(){return{pathInput:``}},computed:{listing(){return this.$store.state.codingBridge?.directory},loading(){return this.$store.state.codingBridge?.directoryLoading===!0},directories(){return(this.listing?.entries??[]).filter(e=>e.type===`dir`)},files(){return(this.listing?.entries??[]).filter(e=>e.type===`file`)},isEmpty(){return!!this.listing&&!this.listing.error&&(this.listing.entries??[]).length===0}},watch:{"listing.path"(e){this.pathInput=e??``}},methods:{onOpen(){this.pathInput=this.initialPath||``,this.$store.dispatch(`codingBridge/browseDir`,this.initialPath||void 0)},goPath(){let e=this.pathInput.trim();e&&this.$store.dispatch(`codingBridge/browseDir`,e)},syncPathInput(){this.pathInput=this.listing?.path??``},onVisibleChange(e){this.$emit(`update:visible`,e),e||this.$store.dispatch(`codingBridge/clearDirectory`)},openDir(e){this.$store.dispatch(`codingBridge/browseDir`,e)},goParent(){this.listing?.parent&&this.$store.dispatch(`codingBridge/browseDir`,this.listing.parent)},refresh(){this.$store.dispatch(`codingBridge/browseDir`,this.listing?.path||this.initialPath||void 0)},chooseCurrent(){this.listing&&!this.listing.error&&(this.$emit(`select`,this.listing.path),this.onVisibleChange(!1))}}}),Lt={class:`flex flex-col gap-2`},Rt={class:`flex items-center gap-2 min-w-0`},zt={class:`h-72 overflow-y-auto border border-[var(--app-border-subtle)] rounded-md divide-y divide-[var(--app-border-subtle)]`},Bt={key:0,class:`h-full flex items-center justify-center text-sm text-[var(--app-text-subtle)]`},Vt={key:1,class:`h-full flex items-center justify-center text-sm text-[var(--el-color-danger)]`},Ht=[`onClick`],Ut={class:`truncate`,dir:`ltr`},Wt={class:`truncate`,dir:`ltr`},Gt={key:0,class:`h-full flex items-center justify-center text-sm text-[var(--app-text-subtle)] py-8`},Kt={key:0,class:`text-[11px] text-[var(--app-text-subtle)] px-1`},qt={class:`flex items-center justify-end gap-2`};function Jt(t,d,m,ee,_,v){let y=u(`up-icon`),b=u(`el-button`),x=u(`continue-icon`),S=u(`el-input`),C=u(`redo-icon`),w=u(`folder-icon`),T=u(`file-icon`),E=u(`el-dialog`);return g(),f(E,{"model-value":t.visible,title:t.$t(`codingBridge.directory.title`),width:`520px`,"append-to-body":``,"onUpdate:modelValue":t.onVisibleChange,onOpen:t.onOpen},{footer:p(()=>[e(`div`,qt,[a(b,{round:``,onClick:d[1]||=e=>t.onVisibleChange(!1)},{default:p(()=>[r(i(t.$t(`common.button.cancel`)),1)]),_:1}),a(b,{type:`primary`,round:``,disabled:!t.listing||!!t.listing.error,onClick:t.chooseCurrent},{default:p(()=>[r(i(t.$t(`codingBridge.directory.choose`)),1)]),_:1},8,[`disabled`,`onClick`])])]),default:p(()=>[e(`div`,Lt,[e(`div`,Rt,[a(b,{size:`small`,circle:``,disabled:!t.listing||!t.listing.parent||t.loading,title:t.$t(`codingBridge.directory.up`),"aria-label":t.$t(`codingBridge.directory.up`),onClick:t.goParent},{default:p(()=>[a(y,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`disabled`,`title`,`aria-label`,`onClick`]),a(S,{modelValue:t.pathInput,"onUpdate:modelValue":d[0]||=e=>t.pathInput=e,size:`small`,class:`flex-1 min-w-0`,dir:`ltr`,placeholder:t.$t(`codingBridge.directory.pathPlaceholder`),disabled:t.loading,onKeyup:c(t.goPath,[`enter`]),onBlur:t.syncPathInput},{append:p(()=>[a(b,{title:t.$t(`codingBridge.directory.go`),disabled:t.loading||!t.pathInput.trim(),"aria-label":t.$t(`codingBridge.directory.go`),onClick:t.goPath},{default:p(()=>[a(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`title`,`disabled`,`aria-label`,`onClick`])]),_:1},8,[`modelValue`,`placeholder`,`disabled`,`onKeyup`,`onBlur`]),a(b,{size:`small`,circle:``,disabled:t.loading,title:t.$t(`codingBridge.directory.refresh`),"aria-label":t.$t(`codingBridge.directory.refresh`),onClick:t.refresh},{default:p(()=>[a(C,{class:n({"adc-icon-spin":t.loading}),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`])]),_:1},8,[`disabled`,`title`,`aria-label`,`onClick`])]),e(`div`,zt,[t.loading&&!t.listing?(g(),s(`div`,Bt,i(t.$t(`codingBridge.directory.loading`)),1)):t.listing&&t.listing.error?(g(),s(`div`,Vt,i(t.listing.error),1)):(g(),s(l,{key:2},[(g(!0),s(l,null,h(t.directories,n=>(g(),s(`button`,{key:n.path,type:`button`,class:`w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[var(--app-content-hover-bg)]`,onClick:e=>t.openDir(n.path)},[a(w,{class:`text-[var(--el-color-warning)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Ut,i(n.name),1)],8,Ht))),128)),(g(!0),s(l,null,h(t.files,t=>(g(),s(`div`,{key:t.path,class:`w-full flex items-center gap-2 px-3 py-2 text-sm text-[var(--app-text-subtle)]`},[a(T,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Wt,i(t.name),1)]))),128)),t.isEmpty?(g(),s(`div`,Gt,i(t.$t(`codingBridge.directory.empty`)),1)):o(``,!0)],64))]),t.listing&&t.listing.truncated?(g(),s(`p`,Kt,i(t.$t(`codingBridge.directory.truncated`)),1)):o(``,!0)])]),_:1},8,[`model-value`,`title`,`onUpdate:modelValue`,`onOpen`])}var Yt=U(It,[[`render`,Jt]]),Xt=`data:image/svg+xml,%3csvg%20fill='%23D97757'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eClaude%3c/title%3e%3cpath%20d='m4.7144%2015.9555%204.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608%201.5179.1032%202.2767.1578%201.6514.0972%202.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973%209.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686%201.9064%201.4754%202.4893%201.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335%206.6997%200l.9957.1336.419.3642.6192%201.4147%201.0018%202.2282%201.5543%203.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853%201.8517-.5586%202.9021-.3643%201.9429h.2125l.2429-.2429.9835-1.3053%201.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759%201.1293-.34%201.1657-1.0625%201.3478-.8804%201.1414-1.2628%201.7-.7893%201.36.0729.1093.1882-.0183%202.8535-.607%201.5421-.2794%201.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607%201.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929%201.0686%202.0035%201.8092%202.5075%202.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496%202.3436%203.5214.1214%201.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38%2017.959l-1.1414-1.9428-.1397.079-.674%207.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328%201.9672-2.1796%202.9446-1.7243%201.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889%202.386-3.0357%201.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385%204.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429%201.9064-1.3114Z'/%3e%3c/svg%3e`,Zt=`data:image/svg+xml,%3csvg%20fill='%23000000'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M22.282%209.821a5.985%205.985%200%200%200-.516-4.91%206.046%206.046%200%200%200-6.51-2.9A6.065%206.065%200%200%200%204.981%204.18a5.985%205.985%200%200%200-3.998%202.9%206.046%206.046%200%200%200%20.743%207.097%205.98%205.98%200%200%200%20.51%204.911%206.051%206.051%200%200%200%206.515%202.9A5.985%205.985%200%200%200%2013.26%2024a6.056%206.056%200%200%200%205.772-4.206%205.99%205.99%200%200%200%203.997-2.9%206.056%206.056%200%200%200-.747-7.073zM13.26%2022.43a4.476%204.476%200%200%201-2.876-1.04l.141-.081%204.779-2.758a.795.795%200%200%200%20.392-.681v-6.737l2.02%201.168a.071.071%200%200%201%20.038.052v5.583a4.504%204.504%200%200%201-4.494%204.494zM3.6%2018.304a4.47%204.47%200%200%201-.535-3.014l.142.085%204.783%202.759a.771.771%200%200%200%20.78%200l5.843-3.369v2.332a.08.08%200%200%201-.033.062L9.74%2019.95a4.5%204.5%200%200%201-6.14-1.646zM2.34%207.896a4.485%204.485%200%200%201%202.366-1.973V11.6a.766.766%200%200%200%20.388.676l5.815%203.355-2.02%201.168a.076.076%200%200%201-.071%200l-4.83-2.786A4.504%204.504%200%200%201%202.34%207.872zm16.597%203.855l-5.833-3.387L15.119%207.2a.076.076%200%200%201%20.071%200l4.83%202.791a4.494%204.494%200%200%201-.676%208.105v-5.678a.79.79%200%200%200-.407-.667zm2.01-3.023l-.141-.085-4.774-2.782a.776.776%200%200%200-.785%200L9.409%209.23V6.897a.066.066%200%200%201%20.028-.061l4.83-2.787a4.5%204.5%200%200%201%206.68%204.66zm-12.64%204.135l-2.02-1.164a.08.08%200%200%201-.038-.057V6.075a4.5%204.5%200%200%201%207.375-3.453l-.142.08L8.704%205.46a.795.795%200%200%200-.393.681zm1.097-2.365l2.602-1.5%202.607%201.5v2.999l-2.597%201.5-2.607-1.5z'/%3e%3c/svg%3e`,Qt=`data:image/svg+xml,%3csvg%20fill='%23000'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGitHub%20Copilot%3c/title%3e%3cpath%20d='M23.922%2016.997C23.061%2018.492%2018.063%2022.02%2012%2022.02%205.937%2022.02.939%2018.492.078%2016.997A.641.641%200%200%201%200%2016.741v-2.869a.883.883%200%200%201%20.053-.22c.372-.935%201.347-2.292%202.605-2.656.167-.429.414-1.055.644-1.517a10.098%2010.098%200%200%201-.052-1.086c0-1.331.282-2.499%201.132-3.368.397-.406.89-.717%201.474-.952C7.255%202.937%209.248%201.98%2011.978%201.98c2.731%200%204.767.957%206.166%202.093.584.235%201.077.546%201.474.952.85.869%201.132%202.037%201.132%203.368%200%20.368-.014.733-.052%201.086.23.462.477%201.088.644%201.517%201.258.364%202.233%201.721%202.605%202.656a.841.841%200%200%201%20.053.22v2.869a.641.641%200%200%201-.078.256Zm-11.75-5.992h-.344a4.359%204.359%200%200%201-.355.508c-.77.947-1.918%201.492-3.508%201.492-1.725%200-2.989-.359-3.782-1.259a2.137%202.137%200%200%201-.085-.104L4%2011.746v6.585c1.435.779%204.514%202.179%208%202.179%203.486%200%206.565-1.4%208-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057%201.259-3.782%201.259-1.59%200-2.738-.545-3.508-1.492a4.359%204.359%200%200%201-.355-.508Zm2.328%203.25c.549%200%201%20.451%201%201v2c0%20.549-.451%201-1%201-.549%200-1-.451-1-1v-2c0-.549.451-1%201-1Zm-5%200c.549%200%201%20.451%201%201v2c0%20.549-.451%201-1%201-.549%200-1-.451-1-1v-2c0-.549.451-1%201-1Zm3.313-6.185c.136%201.057.403%201.913.878%202.497.442.544%201.134.938%202.344.938%201.573%200%202.292-.337%202.657-.751.384-.435.558-1.15.558-2.361%200-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438%201.578v.021c0%20.265.021.562.063.893Zm-1.626%200c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824%201.025-.462.472-.705%201.179-.705%202.319%200%201.211.175%201.926.558%202.361.365.414%201.084.751%202.657.751%201.21%200%201.902-.394%202.344-.938.475-.584.742-1.44.878-2.497Z'/%3e%3c/svg%3e`,$t=50*1024*1024,$=10,en=60,tn=60,nn={claude:{src:Xt,invertOnDark:!1},codex:{src:Zt,invertOnDark:!0},copilot:{src:Qt,invertOnDark:!0}},rn=_({name:`CodingBridgeSessionView`,components:{AddIcon:B,AiIcon:ne,AttachmentIcon:de,CloseIcon:q,CodeIcon:k,ConfirmIcon:O,DeveloperIcon:F,EditIcon:z,ExpandDownIcon:re,FileIcon:j,FolderOpenIcon:Te,HistoryIcon:N,PerformanceIcon:M,RedoIcon:V,SecurityIcon:se,StopIcon:pe,UpIcon:D,ViewIcon:ae,ElInput:G,ElButton:W,ElPopover:w,ElDropdown:C,ElDropdownMenu:S,ElDropdownItem:x,ElUpload:v,ElCheckbox:y,ElSkeleton:E,ElSkeletonItem:T,TranscriptItem:wt,ThinkingIndicator:Ft,DirectoryDialog:Yt,AskUserQuestionCard:ue,CopyToClipboard:A},mixins:[ge],emits:[`history`,`devices`],data(){return{prompt:``,cwd:``,model:``,customModelDraft:``,permissionMode:`bypassPermissions`,provider:`claude`,effort:``,directoryVisible:!1,slashMenuOpen:!1,slashActiveIndex:0,editingEventId:``,restoreCode:!1,attachmentFileList:[],uploadUrl:ve()+`/api/v1/files/`,maxAttachments:$,visibleCount:en}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},currentNodeId(){return this.$store.state.codingBridge?.currentNodeId},lastComposer(){let e=this.currentNodeId;return(e?this.$store.state.codingBridge?.lastComposer?.[e]:void 0)??{}},currentNode(){return this.$store.state.codingBridge?.nodes?.find(e=>e.node_id===this.currentNodeId)},nodeOnline(){return this.currentNode?.status===`online`},currentSessionId(){return this.$store.state.codingBridge?.currentSessionId},currentSession(){let e=this.currentSessionId;return e?this.$store.state.codingBridge?.sessions?.[e]:void 0},events(){let e=this.currentSessionId;return e?this.$store.state.codingBridge?.events?.[e]??[]:[]},visibleEvents(){let e=this.events;return e.length>this.visibleCount?e.slice(-this.visibleCount):e},hiddenEventCount(){return Math.max(0,this.events.length-this.visibleCount)},historyLoading(){return this.$store.state.codingBridge?.status?.getHistoryDetail===J.Request},pendingQuestion(){let e=this.currentSessionId;if(!e)return;let t=(this.$store.state.codingBridge?.permissions??[]).find(t=>t.session_id===e&&Je(t));return t?{request_id:t.request_id,payload:Ye(t)}:void 0},isNewSession(){return!this.currentSessionId},canPickCwd(){return this.isNewSession||!this.currentSession?.started},readonly(){return this.currentSession?.readonly===!0},resumeHint(){return!!this.currentSession?.provider&&!this.currentSession?.started&&!this.readonly},replayLabel(){return!this.currentSession?.provider||this.currentSession?.started?``:this.currentSession.provider===`codex`?this.$t(`codingBridge.history.codexLabel`):this.currentSession.provider===`claude`?this.$t(`codingBridge.history.claudeLabel`):this.providerName(this.currentSession.provider)},running(){let e=this.currentSession?.status;return e===`running`||e===`starting`},thinking(){return this.running&&!this.pendingQuestion},connected(){return this.$store.state.codingBridge?.connection===`connected`},canRetry(){return this.currentSession?.status===`error`&&!this.readonly&&this.connected&&this.nodeOnline&&this.events.some(e=>e.kind===`prompt`)},attachments(){return(this.attachmentFileList||[]).map(e=>{let t=e.response?.file_url||(typeof e.url==`string`&&!e.url.startsWith(`blob:`)?e.url:``);if(!t)return;let n=e.raw,r=n?.type||e.mime_type||``;return{type:this.isImageAttachment(e)?`image`:`file`,url:t,name:e.name,mime_type:r,size:n?.size}}).filter(e=>!!e)},uploadingAttachments(){return(this.attachmentFileList||[]).some(e=>this.isAttachmentUploading(e))},canSend(){return(!!this.prompt.trim()||this.attachments.length>0)&&!this.uploadingAttachments&&this.connected&&this.nodeOnline},composerHint(){return this.uploadingAttachments?this.$t(`codingBridge.session.uploadingAttachment`):this.providerCaps.length&&!this.currentProviderAvailable?this.$t(`codingBridge.session.providerUnavailableHint`,{name:this.providerName(this.provider)}):this.resumeHint?this.$t(`codingBridge.history.resumeHint`):this.$t(`codingBridge.session.enterHint`)},nodeCapabilities(){let e=this.currentNodeId;return e?this.$store.state.codingBridge?.capabilities?.[e]:void 0},providerCaps(){return this.nodeCapabilities?.providers??[]},currentProviderCap(){return this.providerCaps.find(e=>e.name===this.provider)},canEdit(){return this.readonly?!1:!!this.providerCaps.find(e=>e.name===this.activeProviderName)?.supports_edit},canRestoreCode(){return!!this.providerCaps.find(e=>e.name===this.activeProviderName)?.supports_code_restore},editingActive(){return!!this.editingEventId},currentProviderAvailable(){return this.providerCaps.length?this.currentProviderCap?.available!==!1:!0},providerOptions(){return this.providerCaps.length?this.providerCaps.map(e=>({value:e.name,label:e.label,available:e.available!==!1})):[{label:this.$t(`codingBridge.session.providerClaude`),value:`claude`,available:!0},{label:this.$t(`codingBridge.session.providerCodex`),value:`codex`,available:!0},{label:`GitHub Copilot`,value:`copilot`,available:!0}]},modelOptions(){return this.currentProviderCap?.models??[]},allowCustomModel(){return this.currentProviderCap?.allow_custom_model??!0},effortOptions(){let e=this.currentProviderCap?.efforts;return(e&&e.length?e:[``]).map(e=>({value:e,label:this.effortLabel(e)}))},permissionModeOptions(){let e=this.currentProviderCap?.permission_modes;return(e&&e.length?e:[`default`,`acceptEdits`,`plan`,`bypassPermissions`]).map(e=>({value:e,label:this.permissionModeLabel(e)}))},sessionMeta(){let e=this.currentSession;if(!e)return``;let t=[];return e.provider&&t.push(this.providerName(e.provider)),e.cwd&&t.push(e.cwd),e.model&&t.push(e.model),t.join(` · `)},activeProviderName(){return this.currentSession?.provider||this.provider},slashCommands(){let e=this.activeProviderName;return this.providerCaps.find(t=>t.name===e)?.commands??[]},slashMatches(){let e=this.prompt.match(/^\/(\S*)$/);if(!e)return[];let t=e[1].toLowerCase();return this.slashCommands.filter(e=>[e.name,...e.aliases??[]].some(e=>e.toLowerCase().startsWith(t)))},slashMenuVisible(){return this.slashMenuOpen&&this.slashMatches.length>0},diagnostics(){let e=[];return this.currentNodeId&&e.push({label:this.$t(`codingBridge.session.nodeId`),value:this.currentNodeId}),this.currentSessionId&&e.push({label:this.$t(`codingBridge.session.sessionId`),value:this.currentSessionId}),this.currentSession?.trace_id&&e.push({label:this.$t(`codingBridge.session.traceId`),value:this.currentSession.trace_id}),e}},watch:{events(){this.scrollToBottom()},pendingQuestion(){this.scrollToBottom()},thinking(){this.scrollToBottom()},currentSessionId(){this.scrollToBottom(),this.visibleCount=en,this.editingEventId=``,this.restoreCode=!1,this.syncSessionSettings()},currentNodeId(){this.requestCapabilities(),this.isNewSession&&this.restoreComposerPrefs()},providerCaps(){if(!this.isNewSession||!this.providerCaps.length)return;let e=this.providerCaps.find(e=>e.name===this.provider);if(!e||e.available===!1){let e=this.providerCaps.find(e=>e.available!==!1);e&&(this.provider=e.name)}},provider(){this.isNewSession&&(this.model=``,this.effort=``)},prompt(e){this.slashMenuOpen=/^\/\S*$/.test(e),this.slashActiveIndex>=this.slashMatches.length&&(this.slashActiveIndex=0)}},mounted(){this.requestCapabilities(),this.syncSessionSettings()},methods:{requestCapabilities(){this.currentNodeId&&this.$store.dispatch(`codingBridge/getCapabilities`,this.currentNodeId)},effortLabel(e){let t={"":`codingBridge.session.effortDefault`,low:`codingBridge.session.effortLow`,medium:`codingBridge.session.effortMedium`,high:`codingBridge.session.effortHigh`,max:`codingBridge.session.effortMax`}[e];return t?this.$t(t):e},permissionModeLabel(e){let t={default:`codingBridge.session.permissionModeDefault`,acceptEdits:`codingBridge.session.permissionModeAcceptEdits`,plan:`codingBridge.session.permissionModePlan`,bypassPermissions:`codingBridge.session.permissionModeBypass`}[e];return t?this.$t(t):e},providerName(e){let t=this.providerCaps.find(t=>t.name===e);return t?t.label:{claude:this.$t(`codingBridge.session.providerClaude`),codex:this.$t(`codingBridge.session.providerCodex`),copilot:`GitHub Copilot`}[e]??e},providerIcon(e){return nn[e]??null},syncSessionSettings(){let e=this.currentSession;if(!e){this.restoreComposerPrefs();return}let t=this.lastComposer;e.provider&&(this.provider=e.provider),this.model=e.model??``,this.customModelDraft=``,this.cwd=e.cwd??t.cwd??``,this.effort=e.effort??t.effort??``,this.permissionMode=e.permission_mode??t.permissionMode??`bypassPermissions`},selectModel(e){this.model=e,this.customModelDraft=``,this.closeModelPopover()},applyCustomModel(){let e=this.customModelDraft.trim();e&&(this.model=e,this.customModelDraft=``,this.closeModelPopover())},closeModelPopover(){this.$refs.modelPopover?.hide?.()},onComposerEnter(e){let t=e;t.isComposing||t.keyCode===229||t.shiftKey||t.ctrlKey||t.metaKey||t.altKey||(t.preventDefault(),this.onSend())},onComposerKeydown(e){let t=e;if(this.slashMenuVisible&&!t.isComposing&&t.keyCode!==229){if(t.key===`ArrowDown`){t.preventDefault(),this.moveSlash(1);return}if(t.key===`ArrowUp`){t.preventDefault(),this.moveSlash(-1);return}if(t.key===`Escape`){t.preventDefault(),this.slashMenuOpen=!1;return}if(t.key===`Tab`||t.key===`Enter`&&!t.shiftKey){t.preventDefault(),this.applySlash(this.slashMatches[this.slashActiveIndex]);return}}t.key===`Enter`&&this.onComposerEnter(t)},moveSlash(e){let t=this.slashMatches.length;t&&(this.slashActiveIndex=(this.slashActiveIndex+e+t)%t,this.$nextTick(()=>{(this.$el?.querySelector?.(`.cb-slash-menu__item--active`))?.scrollIntoView({block:`nearest`})}))},applySlash(e){e&&(this.prompt=`/${e.name} `,this.slashMenuOpen=!1,this.slashActiveIndex=0)},onSend(){if(!this.canSend)return;let e=this.attachments;if(this.editingEventId){this.$store.dispatch(`codingBridge/editPrompt`,{eventId:this.editingEventId,prompt:this.prompt,model:this.model,permissionMode:this.permissionMode,effort:this.effort,attachments:e.length?e:void 0,restoreCode:this.restoreCode}),this.resetComposer();return}this.currentNodeId&&this.$store.commit(`codingBridge/setLastComposer`,{node_id:this.currentNodeId,prefs:{cwd:this.cwd,provider:this.provider,model:this.model,permissionMode:this.permissionMode,effort:this.effort}}),this.$store.dispatch(`codingBridge/sendPrompt`,{prompt:this.prompt,cwd:this.cwd,model:this.model,permissionMode:this.permissionMode,provider:this.provider,effort:this.effort,attachments:e.length?e:void 0}),this.resetComposer()},resetComposer(){this.prompt=``,this.slashMenuOpen=!1,this.slashActiveIndex=0,this.editingEventId=``,this.restoreCode=!1,this.clearAttachments()},cancelEdit(){this.resetComposer()},onAnswerQuestion(e){this.$store.dispatch(`codingBridge/answerQuestion`,{request_id:e.tool_use_id,output:e.output})},onSkipQuestion(e){this.$store.dispatch(`codingBridge/resolvePermission`,{request_id:e.tool_use_id,decision:`deny`})},beforeAttachmentUpload(e){return this.attachmentFileList.length>=$?(Y.warning(this.$t(`codingBridge.session.attachmentLimit`,{count:$})),!1):e.size>$t?(Y.warning(this.$t(`codingBridge.session.attachmentTooLarge`)),!1):!0},onAttachmentChange(e){if(!e.url&&e.raw&&this.isImageAttachment(e))try{e.url=URL.createObjectURL(e.raw)}catch{}},onAttachmentSuccess(e,t){e?.file_url&&(this.revokeBlobUrl(t),t.url=e.file_url,t.response=e)},onAttachmentError(){Y.error(this.$t(`codingBridge.session.attachmentUploadError`))},onAttachmentExceed(){Y.warning(this.$t(`codingBridge.session.attachmentLimit`,{count:$}))},onTriggerAttachmentUpload(){this.$nextTick(()=>{let e=this.$refs.uploader?.$el;(e?.querySelector(`input.el-upload__input`)||e?.querySelector(`input[type="file"]`))?.click()})},isAttachmentUploading(e){return e.status===`ready`||e.status===`uploading`},isImageAttachment(e){return(e.raw?.type||``).startsWith(`image/`)?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(e.name||e.url||``)},attachmentPreviewUrl(e){return this.isImageAttachment(e)&&(e.url||e.response?.file_url)||``},removeAttachment(e,t){this.revokeBlobUrl(t),this.attachmentFileList.splice(e,1)},clearAttachments(){for(let e of this.attachmentFileList)this.revokeBlobUrl(e);this.attachmentFileList=[]},revokeBlobUrl(e){if(e.url?.startsWith(`blob:`))try{URL.revokeObjectURL(e.url)}catch{}},onInterrupt(){this.$store.dispatch(`codingBridge/interruptSession`)},onRetry(){this.$store.dispatch(`codingBridge/retryLastPrompt`)},onEditPrompt(e){this.canEdit&&(this.editingEventId=e.id,this.restoreCode=!1,this.prompt=e.text??``,this.slashMenuOpen=!1,this.slashActiveIndex=0,this.clearAttachments(),this.attachmentFileList=(e.attachments??[]).map((e,t)=>({name:e.name||e.url,url:e.url,status:`success`,percentage:100,uid:Date.now()+t,response:{file_url:e.url},mime_type:e.mime_type})),this.$nextTick(()=>{(this.$el?.querySelector?.(`.cb-composer__input textarea`))?.focus()}))},openDirectory(){this.directoryVisible=!0},onDirectorySelect(e){this.cwd=e},onNewSession(){this.$store.dispatch(`codingBridge/newSession`),this.restoreComposerPrefs(),this.resetComposer()},restoreComposerPrefs(){let e=this.lastComposer;this.cwd=e.cwd??``,this.provider=e.provider??`claude`,this.permissionMode=e.permissionMode??`bypassPermissions`,this.customModelDraft=``,this.$nextTick(()=>{this.model=e.model??``,this.effort=e.effort??``})},scrollToBottom(){this.$nextTick(()=>{let e=this.$refs.transcript;e&&(e.scrollTop=e.scrollHeight)})},loadEarlier(){let e=this.$refs.transcript,t=e?.scrollHeight??0;this.visibleCount+=tn,this.$nextTick(()=>{e&&(e.scrollTop=e.scrollHeight-t+e.scrollTop)})}}}),an={class:`session-view flex flex-col h-full bg-[var(--app-content-bg)]`},on={key:0,class:`flex-1 flex flex-col items-center justify-center text-center p-8 text-[var(--app-text-subtle)]`},sn={class:`text-sm`},cn={class:`flex items-center justify-between gap-3 px-5 py-3 border-b border-[var(--app-border-subtle)]`},ln={class:`flex items-center gap-2 min-w-0`},un=[`title`,`aria-label`],dn={class:`min-w-0`},fn={class:`flex items-center gap-2 font-medium`},pn={class:`truncate`},mn={key:0,class:`text-xs text-[var(--app-text-subtle)] truncate`},hn={key:0,class:`text-[var(--el-color-primary)]`},gn={class:`flex items-center gap-2 flex-none`},_n={key:0,class:`px-5 py-2 text-xs bg-[var(--el-color-warning-light-9)] text-[var(--el-color-warning)] border-b border-[var(--app-border-subtle)]`},vn={key:1,class:`flex flex-wrap items-center gap-x-4 gap-y-1 px-5 py-1.5 text-[11px] text-[var(--app-text-subtle)] border-b border-[var(--app-border-subtle)]`},yn={class:`opacity-70 flex-none`},bn=[`title`],xn={ref:`transcript`,class:`flex-1 min-h-0 overflow-y-auto px-5 py-4 flex flex-col gap-3`},Sn={key:0,class:`cb-skeleton`},Cn={class:`flex flex-col gap-4`},wn={class:`flex justify-end`},Tn={class:`flex flex-col gap-1.5`},En={class:`flex justify-end`},Dn={class:`flex flex-col gap-1.5`},On={key:1,class:`m-auto text-center text-sm text-[var(--app-text-subtle)]`},kn=[`title`],An={key:4,class:`flex justify-center pt-1`},jn={key:2,class:`cb-question-dock flex-none px-5`},Mn={class:`border-t border-[var(--app-border-subtle)] p-3`},Nn={key:0,class:`flex items-center gap-2 text-xs text-[var(--app-text-subtle)] px-1 py-2`},Pn={key:0,class:`mb-2 flex flex-wrap items-center gap-x-3 gap-y-1.5 rounded-lg bg-[var(--el-color-primary-light-9)] px-3 py-2 text-xs text-[var(--app-text)]`},Fn={class:`inline-flex items-center gap-1.5`},In={class:`cb-composer rounded-2xl border border-[var(--app-border-subtle)] bg-[var(--app-content-bg)] px-3 py-2.5 transition-colors focus-within:border-[var(--el-color-primary-light-5)]`},Ln={key:0,class:`flex flex-wrap gap-2 pb-2`},Rn=[`src`,`alt`],zn={key:1,class:`flex h-8 w-8 items-center justify-center rounded bg-[var(--app-content-bg)]`},Bn=[`title`],Vn={key:2,class:`text-[10px] text-[var(--app-text-subtle)]`},Hn=[`title`,`aria-label`,`onClick`],Un={key:1,class:`cb-slash-menu`},Wn=[`onMousedown`,`onMouseenter`],Gn={class:`cb-slash-menu__name`},Kn={key:0,class:`cb-slash-menu__hint`},qn={key:1,class:`cb-slash-menu__desc`},Jn={ref:`attachmentUploadTrigger`,class:`block h-0 w-0`,"aria-hidden":`true`},Yn={class:`mt-1.5 flex items-center gap-1.5`},Xn=[`title`,`aria-label`],Zn={class:`flex min-w-0 flex-1 flex-wrap items-center gap-1.5`},Qn={type:`button`,class:`cb-pill`},$n=[`src`],er={class:`truncate`},tr=[`src`],nr={key:1,class:`ml-1 text-xs opacity-60`},rr={key:1,class:`cb-pill cb-pill--static`},ir=[`src`],ar={class:`truncate`},or={type:`button`,class:`cb-pill`},sr={class:`truncate`},cr={class:`cb-model-menu`},lr={class:`truncate`},ur=[`onClick`],dr={class:`truncate`},fr={key:0,class:`cb-model-custom`},pr={type:`button`,class:`cb-pill`},mr={class:`truncate`},hr={type:`button`,class:`cb-pill`},gr={class:`truncate`},_r={type:`button`,class:`cb-pill`},vr={class:`truncate`},yr=[`title`,`aria-label`],br={key:4,class:`cb-pill cb-pill--static`},xr={class:`truncate`},Sr={class:`text-[11px] text-[var(--app-text-subtle)] mt-1 px-1`};function Cr(d,m,ee,_,v,y){let b=u(`developer-icon`),x=u(`el-button`),S=u(`history-icon`),C=u(`add-icon`),w=u(`copy-to-clipboard`),T=u(`el-skeleton-item`),E=u(`el-skeleton`),te=u(`up-icon`),D=u(`transcript-item`),ne=u(`thinking-indicator`),O=u(`redo-icon`),re=u(`ask-user-question-card`),k=u(`view-icon`),ie=u(`edit-icon`),A=u(`el-checkbox`),ae=u(`file-icon`),oe=u(`close-icon`),j=u(`el-input`),se=u(`el-upload`),ce=u(`attachment-icon`),M=u(`code-icon`),N=u(`expand-down-icon`),P=u(`confirm-icon`),F=u(`el-dropdown-item`),I=u(`el-dropdown-menu`),L=u(`el-dropdown`),le=u(`ai-icon`),R=u(`el-popover`),ue=u(`performance-icon`),de=u(`security-icon`),z=u(`folder-open-icon`),B=u(`stop-icon`),V=u(`directory-dialog`);return g(),s(`div`,an,[d.currentNode?(g(),s(l,{key:1},[e(`div`,cn,[e(`div`,ln,[e(`button`,{type:`button`,class:`cb-devices-btn md:hidden`,title:d.$t(`codingBridge.nodeList.title`),"aria-label":d.$t(`codingBridge.nodeList.title`),onClick:m[1]||=e=>d.$emit(`devices`)},[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,un),e(`div`,dn,[e(`div`,fn,[e(`span`,pn,i(d.currentNode.name),1),e(`span`,{class:n([`inline-block w-2 h-2 rounded-full flex-none`,d.nodeOnline?`bg-[var(--el-color-success)]`:`bg-[var(--app-text-subtle)]`])},null,2)]),d.currentSession?(g(),s(`div`,mn,[e(`span`,null,i(d.sessionMeta),1),d.replayLabel?(g(),s(`span`,hn,` · `+i(d.replayLabel),1)):o(``,!0)])):o(``,!0)])]),e(`div`,gn,[a(x,{size:`small`,round:``,onClick:m[2]||=e=>d.$emit(`history`)},{default:p(()=>[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.history.button`)),1)]),_:1}),d.currentSessionId?(g(),f(x,{key:0,size:`small`,round:``,onClick:d.onNewSession},{default:p(()=>[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.session.newSession`)),1)]),_:1},8,[`onClick`])):o(``,!0)])]),d.nodeOnline?o(``,!0):(g(),s(`div`,_n,i(d.$t(`codingBridge.session.deviceOffline`)),1)),d.diagnostics.length?(g(),s(`div`,vn,[(g(!0),s(l,null,h(d.diagnostics,t=>(g(),s(`span`,{key:t.label,class:`inline-flex items-center gap-1 min-w-0`},[e(`span`,yn,i(t.label)+`:`,1),e(`span`,{class:`font-mono break-all`,title:t.value},i(t.value),9,bn),a(w,{content:t.value,class:`inline-block flex-none`},null,8,[`content`])]))),128))])):o(``,!0),e(`div`,xn,[d.historyLoading&&!d.events.length?(g(),s(`div`,Sn,[a(E,{animated:``},{template:p(()=>[e(`div`,Cn,[e(`div`,wn,[a(T,{variant:`rect`,class:`cb-sk cb-sk--user`})]),e(`div`,Tn,[a(T,{variant:`text`,style:{width:`55%`}}),a(T,{variant:`text`,style:{width:`88%`}}),a(T,{variant:`text`,style:{width:`70%`}})]),a(T,{variant:`rect`,class:`cb-sk cb-sk--tool`}),e(`div`,En,[a(T,{variant:`rect`,class:`cb-sk cb-sk--user-sm`})]),e(`div`,Dn,[a(T,{variant:`text`,style:{width:`80%`}}),a(T,{variant:`text`,style:{width:`45%`}})])])]),_:1})])):d.events.length?o(``,!0):(g(),s(`div`,On,i(d.$t(`codingBridge.session.startHint`)),1)),d.hiddenEventCount>0?(g(),s(`button`,{key:2,type:`button`,class:`cb-load-earlier mx-auto mb-1 flex items-center gap-1.5 rounded-full border border-[var(--app-border-subtle)] bg-[var(--app-content-bg)] px-3 py-1 text-xs text-[var(--app-text-subtle)] hover:text-[var(--el-color-primary)]`,title:`+${d.hiddenEventCount}`,onClick:m[3]||=(...e)=>d.loadEarlier&&d.loadEarlier(...e)},[a(te,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.hiddenEventCount),1)],8,kn)):o(``,!0),(g(!0),s(l,null,h(d.visibleEvents,e=>(g(),f(D,{key:e.id,event:e,editable:d.canEdit,onEdit:d.onEditPrompt},null,8,[`event`,`editable`,`onEdit`]))),128)),d.thinking?(g(),f(ne,{key:3})):o(``,!0),d.canRetry?(g(),s(`div`,An,[a(x,{size:`small`,round:``,onClick:d.onRetry},{default:p(()=>[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.session.retry`)),1)]),_:1},8,[`onClick`])])):o(``,!0)],512),d.pendingQuestion?(g(),s(`div`,jn,[(g(),f(re,{key:d.pendingQuestion.request_id,"tool-use-id":d.pendingQuestion.request_id,payload:d.pendingQuestion.payload,onSubmit:d.onAnswerQuestion,onSkip:d.onSkipQuestion},null,8,[`tool-use-id`,`payload`,`onSubmit`,`onSkip`]))])):o(``,!0),e(`div`,Mn,[d.readonly?(g(),s(`div`,Nn,[a(k,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,i(d.$t(`codingBridge.history.readonly`)),1),a(x,{class:`ml-auto`,size:`small`,round:``,onClick:d.onNewSession},{default:p(()=>[r(i(d.$t(`codingBridge.session.newSession`)),1)]),_:1},8,[`onClick`])])):(g(),s(l,{key:1},[d.editingActive?(g(),s(`div`,Pn,[e(`span`,Fn,[a(ie,{class:`text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.session.editingBanner`)),1)]),d.canRestoreCode?(g(),f(A,{key:0,modelValue:d.restoreCode,"onUpdate:modelValue":m[4]||=e=>d.restoreCode=e,size:`small`,class:`cb-restore-code`},{default:p(()=>[r(i(d.$t(`codingBridge.session.editRestoreCode`)),1)]),_:1},8,[`modelValue`])):o(``,!0),e(`button`,{type:`button`,class:`ml-auto cb-edit-cancel`,onClick:m[5]||=(...e)=>d.cancelEdit&&d.cancelEdit(...e)},i(d.$t(`codingBridge.session.editCancel`)),1)])):o(``,!0),e(`div`,In,[d.attachmentFileList.length?(g(),s(`div`,Ln,[(g(!0),s(l,null,h(d.attachmentFileList,(t,n)=>(g(),s(`div`,{key:t.uid||t.name||n,class:`group relative flex max-w-[220px] items-center gap-2 rounded-md border border-[var(--app-border-subtle)] bg-[var(--app-sidebar-bg)] px-2 py-1.5 text-xs`},[d.attachmentPreviewUrl(t)?(g(),s(`img`,{key:0,src:d.attachmentPreviewUrl(t),class:`h-8 w-8 rounded object-cover`,alt:d.$t(`codingBridge.session.attachmentImageAlt`)},null,8,Rn)):(g(),s(`span`,zn,[a(ae,{size:`1em`,"aria-hidden":`true`,focusable:`false`})])),e(`span`,{class:`min-w-0 flex-1 truncate`,title:t.name},i(t.name),9,Bn),d.isAttachmentUploading(t)?(g(),s(`span`,Vn,i(Math.round(t.percentage||0))+`% `,1)):o(``,!0),e(`button`,{type:`button`,class:`flex h-5 w-5 items-center justify-center rounded-full text-[var(--app-text-subtle)] hover:bg-[var(--app-content-hover-bg)] hover:text-[var(--el-color-danger)]`,title:d.$t(`codingBridge.session.removeAttachment`),"aria-label":d.$t(`codingBridge.session.removeAttachment`),onClick:e=>d.removeAttachment(n,t)},[a(oe,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Hn)]))),128))])):o(``,!0),d.slashMenuVisible?(g(),s(`ul`,Un,[(g(!0),s(l,null,h(d.slashMatches,(r,a)=>(g(),s(`li`,{key:r.name,class:n([`cb-slash-menu__item`,{"cb-slash-menu__item--active":a===d.slashActiveIndex}]),onMousedown:t(e=>d.applySlash(r),[`prevent`]),onMouseenter:e=>d.slashActiveIndex=a},[e(`span`,Gn,`/`+i(r.name),1),r.argument_hint?(g(),s(`span`,Kn,i(r.argument_hint),1)):o(``,!0),r.description?(g(),s(`span`,qn,i(r.description),1)):o(``,!0)],42,Wn))),128))])):o(``,!0),a(j,{modelValue:d.prompt,"onUpdate:modelValue":m[6]||=e=>d.prompt=e,type:`textarea`,autosize:{minRows:2,maxRows:12},resize:`none`,class:`cb-composer__input`,placeholder:d.$t(`codingBridge.session.promptPlaceholder`),onKeydown:d.onComposerKeydown},null,8,[`modelValue`,`placeholder`,`onKeydown`]),a(se,{ref:`uploader`,"file-list":d.attachmentFileList,"onUpdate:fileList":m[7]||=e=>d.attachmentFileList=e,class:`h-0 w-0 overflow-hidden opacity-0`,name:`file`,action:d.uploadUrl,headers:d.headers,multiple:!0,limit:d.maxAttachments,"show-file-list":!1,"before-upload":d.beforeAttachmentUpload,"on-change":d.onAttachmentChange,"on-success":d.onAttachmentSuccess,"on-error":d.onAttachmentError,"on-exceed":d.onAttachmentExceed},{default:p(()=>[e(`span`,Jn,null,512)]),_:1},8,[`file-list`,`action`,`headers`,`limit`,`before-upload`,`on-change`,`on-success`,`on-error`,`on-exceed`]),e(`div`,Yn,[e(`button`,{type:`button`,class:`cb-icon-btn`,title:d.$t(`codingBridge.session.attachFile`),"aria-label":d.$t(`codingBridge.session.attachFile`),onClick:m[8]||=(...e)=>d.onTriggerAttachmentUpload&&d.onTriggerAttachmentUpload(...e)},[a(ce,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Xn),e(`div`,Zn,[d.isNewSession?(g(),f(L,{key:0,trigger:`click`,onCommand:m[9]||=e=>d.provider=e},{dropdown:p(()=>[a(I,null,{default:p(()=>[(g(!0),s(l,null,h(d.providerOptions,e=>(g(),f(F,{key:e.value,command:e.value,disabled:!e.available},{default:p(()=>[a(P,{class:n([`mr-2`,e.value===d.provider?`opacity-100`:`opacity-0`]),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`]),d.providerIcon(e.value)?(g(),s(`img`,{key:0,src:d.providerIcon(e.value).src,class:n([`cb-pill__brand mr-1.5`,{"cb-pill__brand--invert":d.providerIcon(e.value).invertOnDark}]),alt:``},null,10,tr)):o(``,!0),r(` `+i(e.label)+` `,1),e.available?o(``,!0):(g(),s(`span`,nr,i(d.$t(`codingBridge.session.providerUnavailable`)),1))]),_:2},1032,[`command`,`disabled`]))),128))]),_:1})]),default:p(()=>[e(`button`,Qn,[d.providerIcon(d.provider)?(g(),s(`img`,{key:0,src:d.providerIcon(d.provider).src,class:n([`cb-pill__brand`,{"cb-pill__brand--invert":d.providerIcon(d.provider).invertOnDark}]),alt:``},null,10,$n)):(g(),f(M,{key:1,class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,er,i(d.providerName(d.provider)),1),a(N,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),_:1})):(g(),s(`span`,rr,[d.providerIcon(d.currentSession?.provider||`claude`)?(g(),s(`img`,{key:0,src:d.providerIcon(d.currentSession?.provider||`claude`).src,class:n([`cb-pill__brand`,{"cb-pill__brand--invert":d.providerIcon(d.currentSession?.provider||`claude`).invertOnDark}]),alt:``},null,10,ir)):(g(),f(M,{key:1,class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,ar,i(d.providerName(d.currentSession?.provider||`claude`)),1)])),a(R,{ref:`modelPopover`,trigger:`click`,placement:`top-start`,width:260},{reference:p(()=>[e(`button`,or,[a(le,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,sr,i(d.model||d.$t(`codingBridge.session.modelDefault`)),1),a(N,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),default:p(()=>[e(`div`,cr,[e(`button`,{type:`button`,class:`cb-model-option`,onClick:m[10]||=e=>d.selectModel(``)},[a(P,{class:n([`cb-model-option__check`,d.model?`opacity-0`:`opacity-100`]),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`]),e(`span`,lr,i(d.$t(`codingBridge.session.modelDefault`)),1)]),(g(!0),s(l,null,h(d.modelOptions,t=>(g(),s(`button`,{key:t.value,type:`button`,class:`cb-model-option`,onClick:e=>d.selectModel(t.value)},[a(P,{class:n([`cb-model-option__check`,t.value===d.model?`opacity-100`:`opacity-0`]),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`]),e(`span`,dr,i(t.label),1)],8,ur))),128)),d.allowCustomModel?(g(),s(`div`,fr,[a(j,{modelValue:d.customModelDraft,"onUpdate:modelValue":m[11]||=e=>d.customModelDraft=e,size:`small`,placeholder:d.$t(`codingBridge.session.modelPlaceholder`),onKeyup:c(d.applyCustomModel,[`enter`])},{append:p(()=>[a(x,{disabled:!d.customModelDraft.trim(),"aria-label":d.$t(`common.button.confirm`),title:d.$t(`common.button.confirm`),onClick:d.applyCustomModel},{default:p(()=>[a(P,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`disabled`,`aria-label`,`title`,`onClick`])]),_:1},8,[`modelValue`,`placeholder`,`onKeyup`])])):o(``,!0)])]),_:1},512),d.effortOptions.length>1?(g(),f(L,{key:2,trigger:`click`,onCommand:m[12]||=e=>d.effort=e},{dropdown:p(()=>[a(I,null,{default:p(()=>[(g(!0),s(l,null,h(d.effortOptions,e=>(g(),f(F,{key:e.value,command:e.value},{default:p(()=>[a(P,{class:n([`mr-2`,e.value===d.effort?`opacity-100`:`opacity-0`]),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`]),r(` `+i(e.label),1)]),_:2},1032,[`command`]))),128))]),_:1})]),default:p(()=>[e(`button`,pr,[a(ue,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,mr,i(d.effortLabel(d.effort)),1),a(N,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),_:1})):o(``,!0),a(L,{trigger:`click`,onCommand:m[13]||=e=>d.permissionMode=e},{dropdown:p(()=>[a(I,null,{default:p(()=>[(g(!0),s(l,null,h(d.permissionModeOptions,e=>(g(),f(F,{key:e.value,command:e.value},{default:p(()=>[a(P,{class:n([`mr-2`,e.value===d.permissionMode?`opacity-100`:`opacity-0`]),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`]),r(` `+i(e.label),1)]),_:2},1032,[`command`]))),128))]),_:1})]),default:p(()=>[e(`button`,hr,[a(de,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,gr,i(d.permissionModeLabel(d.permissionMode)),1),a(N,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),_:1}),d.canPickCwd?(g(),f(R,{key:3,trigger:`click`,placement:`top-start`,width:320},{reference:p(()=>[e(`button`,_r,[a(z,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,vr,i(d.cwd||d.$t(`codingBridge.session.cwdDefault`)),1),a(N,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),default:p(()=>[a(j,{modelValue:d.cwd,"onUpdate:modelValue":m[17]||=e=>d.cwd=e,size:`small`,clearable:``,class:`cb-cwd-input`,placeholder:d.$t(`codingBridge.session.cwdPlaceholder`)},{suffix:p(()=>[e(`span`,{class:`cb-cwd-browse`,role:`button`,tabindex:`0`,title:d.$t(`codingBridge.directory.title`),"aria-label":d.$t(`codingBridge.directory.title`),onClick:m[14]||=(...e)=>d.openDirectory&&d.openDirectory(...e),onKeydown:[m[15]||=c(t((...e)=>d.openDirectory&&d.openDirectory(...e),[`prevent`]),[`enter`]),m[16]||=c(t((...e)=>d.openDirectory&&d.openDirectory(...e),[`prevent`]),[`space`])]},[a(z,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],40,yr)]),_:1},8,[`modelValue`,`placeholder`])]),_:1})):d.currentSession?.cwd?(g(),s(`span`,br,[a(z,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,xr,i(d.currentSession?.cwd),1)])):o(``,!0)]),d.running?(g(),f(x,{key:0,circle:``,"aria-label":d.$t(`common.button.stop`),title:d.$t(`common.button.stop`),onClick:d.onInterrupt},{default:p(()=>[a(B,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`])):o(``,!0),a(x,{type:`primary`,round:``,disabled:!d.canSend,onClick:d.onSend},{default:p(()=>[r(i(d.editingActive?d.$t(`codingBridge.session.editSubmit`):d.$t(`codingBridge.session.send`)),1)]),_:1},8,[`disabled`,`onClick`])])]),e(`p`,Sr,i(d.composerHint),1)],64))])],64)):(g(),s(`div`,on,[a(b,{class:`text-4xl mb-3`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,sn,i(d.$t(`codingBridge.session.noDevice`)),1),a(x,{class:`md:hidden mt-4`,round:``,onClick:m[0]||=e=>d.$emit(`devices`)},{default:p(()=>[a(b,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.nodeList.title`)),1)]),_:1})])),a(V,{visible:d.directoryVisible,"onUpdate:visible":m[18]||=e=>d.directoryVisible=e,"initial-path":d.cwd,onSelect:d.onDirectorySelect},null,8,[`visible`,`initial-path`,`onSelect`])])}var wr=U(rn,[[`render`,Cr],[`__scopeId`,`data-v-05e55dc1`]]),Tr=_({name:`CodingBridgePairDialog`,components:{LinkIcon:I,ElDialog:H,ElInput:G,ElButton:W},props:{visible:{type:Boolean,default:!1},initialCode:{type:String,default:``}},emits:[`update:visible`],data(){return{code:``}},computed:{claiming(){return this.$store.state.codingBridge?.status?.claimPair===J.Request}},watch:{visible(e){e&&this.initialCode&&(this.code=this.initialCode)},initialCode(e){e&&(this.code=e)}},methods:{async onClaim(){let e=this.code.trim();if(e)try{let t=await this.$store.dispatch(`codingBridge/claimPair`,e);Y.success(this.$t(`codingBridge.pair.success`,{name:t})),this.code=``,this.$emit(`update:visible`,!1)}catch(e){let t=e?.response?.status;t===404?Y.error(this.$t(`codingBridge.pair.invalidCode`)):t===409?Y.error(this.$t(`codingBridge.pair.usedCode`)):Y.error(this.$t(`codingBridge.pair.failed`))}}}}),Er={class:`content`},Dr={class:`text-sm text-[var(--app-text-subtle)] mb-4`},Or={class:`steps list-none m-0 p-0 mb-4`},kr={class:`flex gap-3 mb-3`},Ar={class:`flex-1 min-w-0`},jr={class:`text-sm mb-1`},Mr={class:`flex gap-3 mb-3`},Nr={class:`flex-1 min-w-0`},Pr={class:`text-sm mb-1`},Fr={class:`flex gap-3`},Ir={class:`flex-1 min-w-0`},Lr={class:`text-sm`};function Rr(t,n,o,s,l,d){let m=u(`el-input`),h=u(`link-icon`),ee=u(`el-button`),_=u(`el-dialog`);return g(),f(_,{"model-value":t.visible,width:`520px`,title:t.$t(`codingBridge.pair.title`),center:``,"onUpdate:modelValue":n[1]||=e=>t.$emit(`update:visible`,e)},{default:p(()=>[e(`div`,Er,[e(`p`,Dr,i(t.$t(`codingBridge.pair.intro`)),1),e(`ol`,Or,[e(`li`,kr,[n[3]||=e(`span`,{class:`step-index`},`1`,-1),e(`div`,Ar,[e(`p`,jr,i(t.$t(`codingBridge.pair.step1`)),1),n[2]||=e(`code`,{class:`cmd`},`pip install coding-bridge`,-1)])]),e(`li`,Mr,[n[5]||=e(`span`,{class:`step-index`},`2`,-1),e(`div`,Nr,[e(`p`,Pr,i(t.$t(`codingBridge.pair.step2`)),1),n[4]||=e(`code`,{class:`cmd`},`coding-bridge up`,-1)])]),e(`li`,Fr,[n[6]||=e(`span`,{class:`step-index`},`3`,-1),e(`div`,Ir,[e(`p`,Lr,i(t.$t(`codingBridge.pair.step3`)),1)])])]),a(m,{modelValue:t.code,"onUpdate:modelValue":n[0]||=e=>t.code=e,size:`large`,class:`mb-3`,placeholder:t.$t(`codingBridge.pair.codePlaceholder`),clearable:``,onKeyup:c(t.onClaim,[`enter`])},null,8,[`modelValue`,`placeholder`,`onKeyup`]),a(ee,{type:`primary`,round:``,class:`w-full`,loading:t.claiming,disabled:!t.code.trim(),onClick:t.onClaim},{default:p(()=>[a(h,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`codingBridge.pair.claim`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])])]),_:1},8,[`model-value`,`title`])}var zr=U(Tr,[[`render`,Rr],[`__scopeId`,`data-v-54bd85f1`]]),Br=_({name:`CodingBridgePermissionDialog`,components:{CloseIcon:q,CodeIcon:k,ConfirmIcon:O,ElDialog:H,ElButton:W},computed:{request(){return(this.$store.state.codingBridge?.permissions??[]).find(e=>!Je(e))},hasInput(){return!!this.request?.input&&Object.keys(this.request.input).length>0},inputText(){try{return JSON.stringify(this.request?.input,null,2)}catch{return String(this.request?.input??``)}}},methods:{onAllow(){this.request&&this.$store.dispatch(`codingBridge/resolvePermission`,{request_id:this.request.request_id,decision:`allow`})},onDeny(){this.request&&this.$store.dispatch(`codingBridge/resolvePermission`,{request_id:this.request.request_id,decision:`deny`})}}}),Vr={key:0,class:`content`},Hr={class:`text-sm text-[var(--app-text-subtle)] mb-3`},Ur={class:`rounded-md border border-[var(--app-border-subtle)] p-3 mb-3`},Wr={class:`flex items-center gap-2 font-medium`},Gr={key:0,class:`text-xs text-[var(--app-text-subtle)] mt-1`},Kr={key:1,class:`mt-2 text-xs overflow-x-auto whitespace-pre-wrap break-words text-[var(--app-text-subtle)] max-h-[200px]`},qr={class:`flex justify-end gap-2`};function Jr(t,n,c,l,d,m){let h=u(`code-icon`),ee=u(`close-icon`),_=u(`el-button`),v=u(`confirm-icon`),y=u(`el-dialog`);return g(),f(y,{"model-value":!!t.request,width:`480px`,title:t.$t(`codingBridge.permission.title`),"close-on-click-modal":!1,"show-close":!1,center:``},{footer:p(()=>[e(`div`,qr,[a(_,{round:``,onClick:t.onDeny},{default:p(()=>[a(ee,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`codingBridge.permission.deny`)),1)]),_:1},8,[`onClick`]),a(_,{type:`primary`,round:``,onClick:t.onAllow},{default:p(()=>[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`codingBridge.permission.allow`)),1)]),_:1},8,[`onClick`])])]),default:p(()=>[t.request?(g(),s(`div`,Vr,[e(`p`,Hr,i(t.$t(`codingBridge.permission.subtitle`)),1),e(`div`,Ur,[e(`div`,Wr,[a(h,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,i(t.request.display_name||t.request.title||t.request.tool),1)]),t.request.description?(g(),s(`p`,Gr,i(t.request.description),1)):o(``,!0),t.hasInput?(g(),s(`pre`,Kr,i(t.inputText),1)):o(``,!0)])])):o(``,!0)]),_:1},8,[`model-value`,`title`])}var Yr=U(Br,[[`render`,Jr]]),Xr={claude:{src:Xt,invertOnDark:!1},codex:{src:Zt,invertOnDark:!0},copilot:{src:Qt,invertOnDark:!0}},Zr=_({name:`CodingBridgeHistoryDrawer`,components:{CodeIcon:k,RedoIcon:V,ElDrawer:b,ElButton:W},props:{visible:{type:Boolean,default:!1}},emits:[`update:visible`],computed:{currentNodeId(){return this.$store.state.codingBridge?.currentNodeId},loading(){return this.$store.state.codingBridge?.status?.getHistory===J.Request},sessions(){let e=this.currentNodeId;return[...e?this.$store.state.codingBridge?.history?.[e]??[]:[]].sort((e,t)=>(t.updated_at??0)-(e.updated_at??0))}},watch:{visible(e){e&&this.currentNodeId&&this.$store.dispatch(`codingBridge/getHistory`,this.currentNodeId)}},methods:{providerLabel(e){return{claude:`Claude Code`,codex:`Codex`,copilot:`GitHub Copilot`}[e]??e},providerIcon(e){return Xr[e]??null},refresh(){this.currentNodeId&&this.$store.dispatch(`codingBridge/getHistory`,this.currentNodeId)},open(e){this.currentNodeId&&(this.$store.dispatch(`codingBridge/reattachSession`,{node_id:this.currentNodeId,provider:e.provider,session_id:e.session_id}),this.$emit(`update:visible`,!1))},formatTime(e){try{return new Date(e).toLocaleString()}catch{return``}}}}),Qr={class:`flex flex-col h-full`},$r={class:`flex items-center justify-between mb-3`},ei={class:`text-xs text-[var(--app-text-subtle)] m-0`},ti={key:0,class:`m-auto text-sm text-[var(--app-text-subtle)]`},ni={key:1,class:`m-auto text-sm text-[var(--app-text-subtle)]`},ri={key:2,class:`m-auto text-sm text-[var(--app-text-subtle)] text-center`},ii={key:3,class:`list-none m-0 p-0 flex-1 overflow-y-auto flex flex-col gap-2`},ai=[`onClick`],oi={class:`flex items-center gap-2 mb-1`},si=[`src`,`alt`],ci={class:`text-sm font-medium truncate flex-1`},li=[`title`],ui={class:`text-[11px] text-[var(--app-text-subtle)] truncate`},di={key:0},fi={key:1},pi={class:`text-[11px] text-[var(--app-text-subtle)] mt-0.5`},mi={key:0},hi={key:1};function gi(t,c,d,m,ee,_){let v=u(`redo-icon`),y=u(`el-button`),b=u(`code-icon`),x=u(`el-drawer`);return g(),f(x,{"model-value":t.visible,direction:`rtl`,size:`380px`,title:t.$t(`codingBridge.history.title`),"onUpdate:modelValue":c[0]||=e=>t.$emit(`update:visible`,e)},{default:p(()=>[e(`div`,Qr,[e(`div`,$r,[e(`p`,ei,i(t.$t(`codingBridge.history.intro`)),1),a(y,{size:`small`,round:``,loading:t.loading,onClick:t.refresh},{default:p(()=>[t.loading?o(``,!0):(g(),f(v,{key:0,class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),r(` `+i(t.$t(`codingBridge.history.refresh`)),1)]),_:1},8,[`loading`,`onClick`])]),t.currentNodeId?t.loading&&!t.sessions.length?(g(),s(`div`,ni,i(t.$t(`codingBridge.history.loading`)),1)):t.sessions.length?(g(),s(`ul`,ii,[(g(!0),s(l,null,h(t.sessions,r=>(g(),s(`li`,{key:r.provider+`:`+r.session_id,class:`item rounded-lg p-3 cursor-pointer border border-[var(--app-border-subtle)]`,onClick:e=>t.open(r)},[e(`div`,oi,[t.providerIcon(r.provider)?(g(),s(`img`,{key:0,src:t.providerIcon(r.provider).src,class:n([`provider-icon`,{"provider-icon--invert":t.providerIcon(r.provider).invertOnDark}]),alt:t.providerLabel(r.provider)},null,10,si)):(g(),f(b,{key:1,class:`provider-icon`,title:t.providerLabel(r.provider),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`title`])),e(`span`,ci,i(r.title),1),r.running?(g(),s(`span`,{key:2,class:`running-dot`,title:t.$t(`codingBridge.history.running`)},null,8,li)):o(``,!0)]),e(`div`,ui,[r.cwd?(g(),s(`span`,di,i(r.cwd),1)):o(``,!0),r.git_branch?(g(),s(`span`,fi,` · `+i(r.git_branch),1)):o(``,!0)]),e(`div`,pi,[r.updated_at?(g(),s(`span`,mi,i(t.formatTime(r.updated_at)),1)):o(``,!0),r.message_count?(g(),s(`span`,hi,` · `+i(t.$t(`codingBridge.history.messages`,{count:r.message_count})),1)):o(``,!0)])],8,ai))),128))])):(g(),s(`div`,ri,i(t.$t(`codingBridge.history.empty`)),1)):(g(),s(`div`,ti,i(t.$t(`codingBridge.session.noDevice`)),1))])]),_:1},8,[`model-value`,`title`])}var _i=_({name:`CodingBridgeIndex`,components:{ElDrawer:b,NodeList:Ke,SessionView:wr,PairDialog:zr,PermissionDialog:Yr,HistoryDrawer:U(Zr,[[`render`,gi],[`__scopeId`,`data-v-af006e93`]])},data(){return{drawer:!1,pairVisible:!1,historyVisible:!1,initialCode:``}},mounted(){this.$store.dispatch(`codingBridge/connect`),this.$store.dispatch(`codingBridge/getNodes`);let e=this.$route.query.code;typeof e==`string`&&e&&(this.initialCode=e,this.pairVisible=!0),this.restoreFromUrl(),this.handleNotificationDeepLink(),this.cleanUrl()},beforeUnmount(){this.$store.dispatch(`codingBridge/disconnect`)},methods:{openPair(){this.initialCode=``,this.pairVisible=!0},openPairFromDrawer(){this.drawer=!1,this.openPair()},restoreFromUrl(){let e=this.$route.query,t=typeof e.session==`string`?e.session:``,n=typeof e.node==`string`?e.node:``;if(!t||!n)return;let r=e.provider===`codex`||e.provider===`copilot`?e.provider:`claude`;this.$store.commit(`codingBridge/setCurrentNode`,n),this.$store.commit(`codingBridge/setHistoryRef`,{node_id:n,provider:r,session_id:t}),this.$store.dispatch(`codingBridge/getHistory`,n),this.$store.dispatch(`codingBridge/requestSessions`,n)},cleanUrl(){let e=this.$route.query,t=[`session`,`node`,`provider`,`request`,`code`];if(!t.some(t=>t in e))return;let n={...e};t.forEach(e=>delete n[e]),this.$router.replace({query:n}).catch(()=>{})},handleNotificationDeepLink(){let e=this.$route.query.node;typeof e==`string`&&e&&(this.$route.query.session||this.$store.dispatch(`codingBridge/selectNode`,e),this.$store.dispatch(`codingBridge/requestPendingPermissions`,e))}}}),vi={class:`coding-bridge flex flex-row h-full relative`};function yi(e,t,n,r,i,o){let c=u(`node-list`),l=u(`session-view`),d=u(`el-drawer`),f=u(`pair-dialog`),m=u(`permission-dialog`),h=u(`history-drawer`);return g(),s(`div`,vi,[a(c,{class:`sidebar w-[300px] flex-none`,onPair:e.openPair},null,8,[`onPair`]),a(l,{class:`flex-1 min-w-0`,onHistory:t[0]||=t=>e.historyVisible=!0,onDevices:t[1]||=t=>e.drawer=!0}),a(d,{modelValue:e.drawer,"onUpdate:modelValue":t[2]||=t=>e.drawer=t,direction:`ltr`,"with-header":!1,size:`300px`,class:`drawer`},{default:p(()=>[a(c,{onPair:e.openPairFromDrawer},null,8,[`onPair`])]),_:1},8,[`modelValue`]),a(f,{visible:e.pairVisible,"onUpdate:visible":t[3]||=t=>e.pairVisible=t,"initial-code":e.initialCode},null,8,[`visible`,`initial-code`]),a(m),a(h,{visible:e.historyVisible,"onUpdate:visible":t[4]||=t=>e.historyVisible=t},null,8,[`visible`])])}var bi=U(_i,[[`render`,yi],[`__scopeId`,`data-v-2879fe0f`]]);export{bi as default};
|
|
@@ -1 +0,0 @@
|
|
|
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,ht as l,it as u,j as d,mt as f,rt as p,tt as m,x as h,z as g}from"./vendor-chart-Dw-P17PN.js";import{r as _,t as v}from"./select-Dl4jV9ad.js";import{t as y}from"./upload-C2rOvzuC.js";import{t as b}from"./tooltip-C8hGSYS3.js";import{t as x}from"./alert-iulQiAw7.js";import{n as S,r as C}from"./radio-DgDgyT2l.js";import{t as w}from"./drawer-D-bnXRf3.js";import{t as T}from"./switch-bcerPOeA.js";import{n as E}from"./taskDrawerMixin-SSME0Od-.js";import{t as D}from"./clock-BBfE8suJ.js";import{t as O}from"./CopyToClipboard-C6NFeJB8.js";import{r as k,t as A}from"./PromptTextarea--DkWRZzo.js";import{t as ee}from"./info-DcBJeNVH.js";import{t as j}from"./triangle-alert-B_KxyzDu.js";import{t as M}from"./upload-DgVbXugz.js";import{t as N}from"./wand-sparkles-_fUPopRY.js";import{di as P}from"./constants-OjwdsvEy.js";import{Bt as te,E as F,Gt as I,Ht as L,Mi as R,Ut as z,Vt as B,Wn as V,ai as H,en as U,gr as W,lr as G,ni as K,vi as q}from"./index-CGledtPk.js";import{t as J}from"./ImagePreview-dDtels8M.js";import{t as Y}from"./Consumption-C8TyvoKa.js";import{a as X,n as Z,r as Q,t as ne}from"./pagination-C9els9qY.js";import{t as re}from"./vue-plyr-wiIKa-zl.js";import{t as ie}from"./ApiCodeButton-CW2-0UoK.js";import{t as ae}from"./BotPlaceholder-Ch31vf63.js";var oe=g({name:`LayoutPika`,components:{MagicIcon:N,ElDrawer:w,ElButton:R},mixins:[E]}),se={class:`main flex flex-row flex-1`},ce={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)]`},le={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function ue(t,n,r,a,s,d){let p=c(`magic-icon`),g=c(`el-button`),_=c(`el-drawer`);return m(),o(`div`,se,[e(`div`,ce,[u(t.$slots,`config`,{},void 0,!0)]),e(`div`,le,[u(t.$slots,`result`,{},void 0,!0)]),l(i(g,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:f(()=>[i(p,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[h,!t.tasksEmpty]]),i(_,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`generator-drawer`},{default:f(()=>[u(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var de=F(oe,[[`render`,ue],[`__scopeId`,`data-v-14cc52c3`]]),fe=g({name:`IngredientsSelector`,components:{ElSwitch:T,InfoIcon:X},computed:{value:{get(){return this.$store.state.pika?.config?.ingredients},set(e){if(!e){this.$store.commit(`pika/setConfig`,{...this.$store.state.pika?.config,ingredients:e,ingredients_mode:void 0,image_url:void 0});return}this.$store.commit(`pika/setConfig`,{...this.$store.state.pika?.config,ingredients:e,model:`2.0`})}}},mounted(){this.value===void 0&&(this.value=!1)}}),pe={class:`field`},me={class:`label`},he={class:`title font-bold`};function ge(t,n,a,s,l,u){let d=c(`info-icon`),f=c(`el-switch`);return m(),o(`div`,pe,[e(`div`,me,[e(`h2`,he,r(t.$t(`pika.name.ingredients`)),1),i(d,{content:t.$t(`pika.description.ingredients`),class:`info`},null,8,[`content`])]),i(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])}var _e=F(fe,[[`render`,ge],[`__scopeId`,`data-v-606e1d1a`]]),ve=g({name:`EffectSelector`,components:{ElSelect:_,ElOption:v},data(){return{}},computed:{options(){return[{value:`Levitate`,label:this.$t(`pika.style.effect1`)},{value:`Decapitate`,label:this.$t(`pika.style.effect2`)},{value:`Eye-pop`,label:this.$t(`pika.style.effect3`)},{value:`Ta-da`,label:this.$t(`pika.style.effect4`)},{value:`Deflate`,label:this.$t(`pika.style.effect5`)},{value:`Crumble`,label:this.$t(`pika.style.effect6`)},{value:`Dissolve`,label:this.$t(`pika.style.effect7`)},{value:`Squish`,label:this.$t(`pika.style.effect8`)},{value:`Inflate`,label:this.$t(`pika.style.effect9`)},{value:`Melt`,label:this.$t(`pika.style.effect10`)},{value:`Cake-ify`,label:this.$t(`pika.style.effect11`)},{value:`Crush`,label:this.$t(`pika.style.effect12`)},{value:`Explode`,label:this.$t(`pika.style.effect13`)}]},value:{get(){return this.$store.state.pika?.config?.effect},set(e){this.$store.commit(`pika/setConfig`,{...this.$store.state.pika?.config,effect:e})}}}}),ye={class:`field`},be={class:`title font-bold`},xe={class:`float-left`};function Se(t,n,a,l,u,h){let g=c(`el-option`),_=c(`el-select`);return m(),o(`div`,ye,[e(`h2`,be,r(t.$t(`pika.name.effect`)),1),i(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`pika.placeholder.select`),clearable:``},{default:f(()=>[(m(!0),o(s,null,p(t.options,t=>(m(),d(g,{key:t.value,label:t.label,value:t.value},{default:f(()=>[e(`span`,xe,r(t.label),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Ce=F(ve,[[`render`,Se],[`__scopeId`,`data-v-d1c54475`]]),we=g({name:`IngredientsModelSelector`,components:{ElRadioButton:S,ElRadioGroup:C},data(){return{options:[{label:this.$t(`pika.button.precise`),value:`precise`},{label:this.$t(`pika.button.creative`),value:`creative`}]}},computed:{value:{get(){return this.$store.state.pika?.config?.ingredients_mode},set(e){this.$store.commit(`pika/setConfig`,{...this.$store.state.pika?.config,ingredients_mode:e})}}},mounted(){this.value||=P}}),Te={class:`field`},Ee={class:`title font-bold`};function De(t,a,l,u,h,g){let _=c(`el-radio-button`),v=c(`el-radio-group`);return m(),o(`div`,Te,[e(`h2`,Ee,r(t.$t(`pika.name.ingredientsModel`)),1),i(v,{modelValue:t.value,"onUpdate:modelValue":a[0]||=e=>t.value=e,class:`quality`},{default:f(()=>[(m(!0),o(s,null,p(t.options,e=>(m(),d(_,{key:e.value,label:e.value},{default:f(()=>[n(r(e.label),1)]),_:2},1032,[`label`]))),128))]),_:1},8,[`modelValue`])])}var Oe=F(we,[[`render`,De],[`__scopeId`,`data-v-b72865fa`]]),ke=g({name:`ModelSelector`,components:{ElSelect:_,ElOption:v},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`2.0`,label:`2.0`},{value:`1.5`,label:`1.5`}]}},computed:{value:{get(){return this.$store.state.pika?.config?.model},set(e){this.$store.commit(`pika/setConfig`,{...this.$store.state.pika.config,model:e})}}},mounted(){this.value||=`2.0`}}),Ae={class:`field`},je={class:`title font-bold`};function Me(t,n,a,l,u,h){let g=c(`el-option`),_=c(`el-select`);return m(),o(`div`,Ae,[e(`h2`,je,r(t.$t(`pika.name.model`)),1),i(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`pika.placeholder.select`)},{default:f(()=>[(m(!0),o(s,null,p(t.options,e=>(m(),d(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Ne=F(ke,[[`render`,Me],[`__scopeId`,`data-v-7b2e870a`]]),Pe=g({name:`ImageUrlInput`,components:{UploadIcon:M,ElUpload:y,ElButton:R,InfoIcon:X,ImagePreview:J},mixins:[z,B],data(){return{fileList:[],uploadUrl:H()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e.response?.file_url).filter(e=>!!e)},value(){return this.$store.state.pika?.config?.image_url}},mounted(){this.onSetStartImageUrl()},methods:{onExceed(){q.warning(this.$t(`pika.message.uploadStartImageExceed`))},onError(){q.error(this.$t(`pika.message.uploadStartImageError`))},onRemove(){this.onSetStartImageUrl()},onSetStartImageUrl(){this.$store.commit(`pika/setConfig`,{...this.$store.state.pika?.config,image_url:this.urls})},onSuccess(){this.onSetStartImageUrl()},onRemovePreview(e){let t=this.fileList.indexOf(e);t>=0&&this.fileList.splice(t,1),this.onSetStartImageUrl()}}}),Fe={class:`field`},Ie={class:`label`},Le={class:`title font-bold`},Re={class:`upload-control`};function ze(t,a,s,l,u,d){let p=c(`info-icon`),h=c(`image-preview`),g=c(`upload-icon`),_=c(`el-button`),v=c(`el-upload`);return m(),o(`div`,Fe,[e(`div`,Ie,[e(`h2`,Le,r(t.$t(`pika.name.imageUrl`)),1),i(p,{content:t.$t(`pika.description.imageUrl`),class:`info`},null,8,[`content`])]),e(`div`,Re,[i(v,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":a[0]||=e=>t.fileList=e,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,name:`file`,class:`value upload-wrapper`,limit:3,multiple:!0,"list-type":`picture`,action:t.uploadUrl,"on-exceed":t.onExceed,"on-error":t.onError,"on-remove":t.onRemove,"on-success":t.onSuccess,headers:t.headers},{file:f(({file:e})=>[i(h,{url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemovePreview(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])]),default:f(()=>[i(_,{size:`small`,type:`primary`,round:``},{default:f(()=>[i(g,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(t.$t(`pika.button.uploadImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-remove`,`on-success`,`headers`])])])}var Be=F(Pe,[[`render`,ze],[`__scopeId`,`data-v-c8a81acf`]]),Ve=g({name:`PromptInput`,components:{PromptTextarea:A},computed:{prompt:{get(){return this.$store.state.pika?.config?.prompt},set(e){this.$store.commit(`pika/setConfig`,{...this.$store.state.pika?.config,prompt:e})}}},mounted(){this.prompt||=``}});function He(e,t,n,r,i,a){let o=c(`prompt-textarea`);return m(),d(o,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`pika.name.prompt`),info:e.$t(`pika.description.prompt`),placeholder:e.$t(`pika.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var Ue=g({name:`PresetPanel`,components:{MagicIcon:N,ImageUrlInput:Be,ElButton:R,Consumption:Y,PromptInput:F(Ve,[[`render`,He]]),IngredientsSelector:_e,IngredientsModelSelector:Oe,ModelSelector:Ne,EffectSelector:Ce},emits:[`generate`],computed:{config(){return this.$store.state.pika?.config},consumption(){return I(this.config,this.service?.cost)},service(){return this.$store.state.pika?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),We={class:`flex flex-col h-full`},Ge={class:`flex-1 overflow-y-auto p-5`},Ke={class:`flex flex-col items-center justify-center px-5 pb-5`};function qe(t,s,l,u,p,h){let g=c(`prompt-input`),_=c(`model-selector`),v=c(`ingredients-selector`),y=c(`effect-selector`),b=c(`image-url-input`),x=c(`ingredients-model-selector`),S=c(`consumption`),C=c(`magic-icon`),w=c(`el-button`);return m(),o(`div`,We,[e(`div`,Ge,[i(g,{class:`mb-4`}),i(_,{class:`mb-4`}),i(v,{class:`mb-4`}),i(y,{class:`mb-4`}),t.config?.ingredients?(m(),d(b,{key:0,class:`mb-4`})):a(``,!0),t.config?.ingredients?(m(),d(x,{key:1,class:`mb-4`})):a(``,!0)]),e(`div`,Ke,[i(S,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),i(w,{type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:f(()=>[i(C,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(t.$t(`pika.button.generate`)),1)]),_:1},8,[`onClick`])])])}var Je=F(Ue,[[`render`,qe]]),Ye=g({name:`VideoPlayer`,components:{VuePlyr:re},props:{modelValue:{type:Object,required:!0}},data(){return{options:{quality:{default:1080,options:[1080]}}}}}),Xe=[`data-poster`],Ze=[`src`];function Qe(t,n,r,a,s,l){let u=c(`vue-plyr`);return m(),o(`div`,null,[i(u,{options:t.options,class:`video`},{default:f(()=>[e(`video`,{controls:``,playsinline:``,preload:`metadata`,"data-poster":t.modelValue?.image_url},[e(`source`,{size:`1080`,src:t.modelValue?.video_url,type:`video/mp4`},null,8,Ze)],8,Xe)]),_:1},8,[`options`])])}var $e=g({name:`TaskPreview`,components:{ChannelIcon:k,InfoIcon:ee,MagicIcon:N,TimeIcon:D,WarningIcon:j,CopyToClipboard:O,ElAlert:x,VideoPlayer:F(Ye,[[`render`,Qe],[`__scopeId`,`data-v-897d9fe0`]]),ElTooltip:b,ElButton:R,ApiCodeButton:ie},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.pika?.application},config(){return this.$store.state.pika?.config},videos(){let e=[],t=this.modelValue?.request?.action;return Array.isArray(this.modelValue?.response?.data)&&this.modelValue?.response?.data?.forEach(n=>{let r=n;t&&(r.action=t),e.push(r)}),e.length===0&&e.push({}),e}},methods:{isFailure(e){let t=this.modelValue?.response;return t?.success===!1||!!t?.error||e?.state===`failed`||e?.state===`cancelled`},isWaiting(e){return this.modelValue?.response?this.isFailure(e)||e?.video_url?!1:!e?.state||[`queued`,`pending`,`processing`,`running`].includes(e.state):!0},onDownload(e){console.log(`on download`),window.open(e,`_blank`)},onReload(e){let t=e.target,n=new URL(t.src),r=n.searchParams.get(`retry`);if(!r)n.searchParams.set(`retry`,`1`);else if(parseInt(r)<2)n.searchParams.set(`retry`,(parseInt(r)+1).toString());else return;t.src=n.toString()},onOpenVideo(e){window.open(e,`_blank`)}}}),et={class:`left`},tt={class:`main`},nt={class:`bot`},rt={class:`datetime`},it={class:`info`},at={key:0,class:`prompt mt-2`},ot={key:0},st={key:1},ct={key:0,class:t({content:!0,failed:!0})},lt={class:`image-wrapper`},ut={key:0,class:t({operations:!0,"mt-2":!0})},dt={key:0,class:`description`},ft={class:`description`},pt={key:1,class:`description`},mt={key:1,class:t({content:!0})},ht={class:`description`},gt={class:`description`},_t={key:0,class:`description`},vt={class:`description`},yt={key:2,class:t({content:!0})},$={class:`description`};function bt(t,l,u,h,g,_){let v=c(`capability-presentation`),y=c(`VideoPlayer`),b=c(`el-button`),x=c(`el-tooltip`),S=c(`api-code-button`),C=c(`channel-icon`),w=c(`magic-icon`),T=c(`copy-to-clipboard`),E=c(`time-icon`),D=c(`el-alert`),O=c(`warning-icon`),k=c(`info-icon`);return m(!0),o(s,null,p(t.videos,(s,c)=>(m(),o(`div`,{key:c,class:`preview`},[e(`div`,et,[i(v,{capability:`pika`,part:`avatar`,class:`avatar`})]),e(`div`,tt,[e(`div`,nt,[i(v,{capability:`pika`,part:`name`}),e(`span`,rt,r(t.$dayjs.format(``+new Date(parseFloat((t.modelValue?.created_at||``).toString())*1e3))),1)]),e(`div`,it,[t.modelValue?.request?.prompt?(m(),o(`p`,at,[n(r(t.modelValue?.request?.prompt)+` `,1),t.modelValue?.response?a(``,!0):(m(),o(`span`,ot,` - (`+r(t.$t(`pika.status.pending`))+`) `,1)),t.modelValue?.response&&t.isWaiting(s)?(m(),o(`span`,st,` - (`+r(t.$t(`pika.status.processing`))+`) `,1)):a(``,!0)])):a(``,!0)]),t.modelValue?.response?.success===!0&&s?.video_url?(m(),o(`div`,ct,[e(`div`,lt,[i(y,{"model-value":s},null,8,[`model-value`])]),s?(m(),o(`div`,ut,[i(x,{class:`box-item`,effect:`dark`,content:t.$t(`pika.message.downloadVideo`),placement:`top-start`},{default:f(()=>[s?.video_url?(m(),d(b,{key:0,type:`info`,size:`small`,class:`btn-action`,onClick:e=>t.onDownload(s?.video_url)},{default:f(()=>[n(r(t.$t(`pika.button.download`)),1)]),_:1},8,[`onClick`])):a(``,!0)]),_:2},1032,[`content`]),i(S,{path:`/pika/videos`,body:t.modelValue?.request},null,8,[`body`])])):a(``,!0),i(D,{closable:!1,class:`mt-2 success`},{default:f(()=>[t.modelValue?.request?.model?(m(),o(`p`,dt,[i(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(t.$t(`pika.name.model`))+`: `+r(t.modelValue?.request?.model),1)])):a(``,!0),e(`p`,ft,[i(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(t.$t(`pika.name.taskId`))+`: `+r(t.modelValue?.id)+` `,1),i(T,{content:t.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),t.modelValue?.elapsed?(m(),o(`p`,pt,[i(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(t.$t(`pika.name.elapsed`))+`: `+r(t.modelValue?.elapsed?.toFixed(2))+`s `,1)])):a(``,!0)]),_:1})])):a(``,!0),t.isFailure(s)?(m(),o(`div`,mt,[i(D,{closable:!1,class:`failure`},{template:f(()=>[i(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(t.$t(`pika.name.failure`)),1)]),default:f(()=>[e(`p`,ht,[i(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(t.$t(`pika.name.taskId`))+`: `+r(t.modelValue?.id)+` `,1),i(T,{content:t.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),e(`p`,gt,[i(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(t.$t(`pika.name.failureReason`))+`: `+r(t.modelValue?.response?.error?.message)+` `,1),i(T,{content:t.modelValue?.response?.error?.message,class:`btn-copy`},null,8,[`content`])]),t.modelValue?.elapsed?(m(),o(`p`,_t,[i(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(t.$t(`pika.name.elapsed`))+`: `+r(t.modelValue?.elapsed?.toFixed(2))+`s `,1)])):a(``,!0),e(`p`,vt,[i(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(t.$t(`pika.name.traceId`))+`: `+r(t.modelValue?.response?.trace_id)+` `,1),i(T,{content:t.modelValue?.response?.trace_id,class:`btn-copy`},null,8,[`content`])])]),_:1})])):a(``,!0),t.isWaiting(s)?(m(),o(`div`,yt,[i(D,{closable:!1,class:`info`},{template:f(()=>[i(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(t.$t(t.modelValue?.response?`pika.status.processing`:`pika.status.pending`)),1)]),default:f(()=>[e(`p`,$,[i(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(t.$t(`pika.name.taskId`))+`: `+r(t.modelValue?.id)+` `,1),i(T,{content:t.modelValue?.id,class:`btn-copy`},null,8,[`content`])])]),_:1})])):a(``,!0)])]))),128)}var xt=g({name:`RecentPanel`,components:{TaskPreview:F($e,[[`render`,bt],[`__scopeId`,`data-v-834518b2`]]),BotPlaceholder:ae,NoTasks:Q,ScrollList:Z},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.pika?.tasks,items:this.$store.state.pika?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),St={key:0},Ct={key:2,class:`w-full h-full flex items-center justify-center`};function wt(e,t,n,r,l,u){let h=c(`bot-placeholder`),g=c(`task-preview`),_=c(`scroll-list`),v=c(`no-tasks`);return m(),o(s,null,[e.tasks?.items===void 0?(m(),o(`div`,St,[i(h)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(m(),d(_,{key:1,ref:`scrollList`,class:`tasks h-full w-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:f(()=>[(m(!0),o(s,null,p(e.tasks?.items,(e,t)=>(m(),d(g,{key:t,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):a(``,!0),e.tasks?.items?.length===0?(m(),o(`div`,Ct,[i(v)])):a(``,!0)],64)}var Tt=g({name:`PikaIndex`,components:{ConfigPanel:Je,Layout:de,RecentPanel:F(xt,[[`render`,wt]])},mixins:[L],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.pika?.status?.getApplications===K.Request},tasksLoading(){return this.$store.state.pika?.status?.getTasks===K.Request||this.fetchingTasks},service(){return this.$store.state.pika.service},credential(){return this.$store.state.pika.credential},config(){return this.$store.state.pika.config},initializing(){return this.$store.state.pika.status.getApplications===K.Request},needApply(){return this.$store.state.pika.status.getApplications===K.Success&&!this.application},application(){return this.$store.state.pika.application},applications(){return this.$store.state.pika.applications},tasks(){return this.$store.state.pika.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 ne({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(`pika/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`pika/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},onApply(){G.create({application:this.application}).then(({data:e})=>{this.application=e,q.success(this.$t(`application.message.applySuccessfully`))}).catch(e=>{e?.response?.data?.code===`duplication`&&q.error(this.$t(`application.message.alreadyApplied`))})},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`pika/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!te(this.uploadTracker,e=>this.$t(e),e=>q.warning(e)))return;let e={...this.config,async:!0};if(!U())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}q.info(this.$t(`pika.message.startingTask`)),W(`pika`,V.generate(e,{token:t})).then(()=>{q.success(this.$t(`pika.message.startTaskSuccess`)),this.$store.commit(`pika/setConfig`,{config:void 0})}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?q.error(this.$t(`pika.message.usedUp`)):q.error(this.$t(`pika.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function Et(e,t,n,r,a,o){let s=c(`config-panel`),l=c(`recent-panel`),u=c(`layout`);return m(),d(u,null,{config:f(()=>[i(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:f(()=>[i(l,{ref:`recentPanel`,class:`panel recent`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var Dt=F(Tt,[[`render`,Et],[`__scopeId`,`data-v-fee6c9ea`]]);export{Dt as default};
|