@acedatacloud/nexior 3.330.8 → 3.330.9
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-6yNv6GzT.js → ApiCodeButton-m9CgZRja.js} +1 -1
- package/dist/assets/{Artifacts-Daj2aW6R.js → Artifacts-b1mvIzTj.js} +1 -1
- package/dist/assets/{AskUserQuestionCard-D6NWrkca.js → AskUserQuestionCard-CWc7mJna.js} +1 -1
- package/dist/assets/{AudioPreview-BwaUx8CQ.js → AudioPreview-ByhxL36r.js} +1 -1
- package/dist/assets/{Auth-t24ECk8p.js → Auth-BvtOvZAe.js} +1 -1
- package/dist/assets/{Bare-B0r772aH.js → Bare-B4amigK0.js} +1 -1
- package/dist/assets/{BotPlaceholder-CsV6S3zO.js → BotPlaceholder-c1cNbMr3.js} +1 -1
- package/dist/assets/{BottomFooter-0XO3UTHH.js → BottomFooter-CNpBxuVA.js} +1 -1
- package/dist/assets/{Callback-DWFJ3FIS.js → Callback-DmXAMcnu.js} +1 -1
- package/dist/assets/{CodeSnippet-DReHcwSF.js → CodeSnippet-D4wW1Hyx.js} +1 -1
- package/dist/assets/{Console-ICgTlpIn.js → Console-B0adb4lP.js} +1 -1
- package/dist/assets/{Consumption-NaAGG5D5.js → Consumption-BlwUHwce.js} +1 -1
- package/dist/assets/{Conversation-Domb3egF.js → Conversation-BrJiTzuI.js} +1 -1
- package/dist/assets/{Conversation-CvkouZ3M.js → Conversation-CrxoYLf3.js} +1 -1
- package/dist/assets/{CopyToClipboard-DFuxR3Az.js → CopyToClipboard-CkXS44Md.js} +1 -1
- package/dist/assets/{Detail-DV-JSHYE.js → Detail-CCHSOZsO.js} +2 -2
- package/dist/assets/{Extra-BvK6x-Q3.js → Extra-BbN511w6.js} +1 -1
- package/dist/assets/{FilePreview-lDiIA4f3.js → FilePreview-C5HB6QTD.js} +1 -1
- package/dist/assets/{Hailuo-ByNlGaAB.js → Hailuo-BOWbYkaB.js} +1 -1
- package/dist/assets/{History-CZNMTW2o.js → History-DX89tbX9.js} +1 -1
- package/dist/assets/{ImagePreview-BbEGVj7c.js → ImagePreview-CkB7m_mh.js} +1 -1
- package/dist/assets/{ImageWrapper-CZJchffe.js → ImageWrapper-BIgeTG-M.js} +1 -1
- package/dist/assets/{Index-bxOcRAXb.js → Index-2FUQsL_W.js} +1 -1
- package/dist/assets/{Index-D1HZkrcj.js → Index-83hGxEgs.js} +1 -1
- package/dist/assets/{Index-p850NYjM.js → Index-AVbHwy2B.js} +1 -1
- package/dist/assets/{Index-CKdU3-kl.js → Index-B5PqDb2Q.js} +1 -1
- package/dist/assets/{Index-BIi2sZ9J.js → Index-B6UVaRwd.js} +1 -1
- package/dist/assets/{Index-CiKtvMba.js → Index-BHNkZzTq.js} +1 -1
- package/dist/assets/{Index-BwNpMoFU.js → Index-BJcc4rj_.js} +1 -1
- package/dist/assets/{Index-D92ZwitE.js → Index-Ba1ARbtt.js} +1 -1
- package/dist/assets/{Index-DQm-e4Db.js → Index-Bf-eP6mv.js} +1 -1
- package/dist/assets/{Index-BZ0J95Zi.js → Index-BiWb2iqv.js} +1 -1
- package/dist/assets/{Index-KJoVmqHA.js → Index-Bnqx32lQ.js} +1 -1
- package/dist/assets/{Index-wDZvW7UP.js → Index-BqUPTk5-.js} +1 -1
- package/dist/assets/{Index-DeREZXl82.js → Index-Bvwo8Dpc2.js} +1 -1
- package/dist/assets/{Index-CCExcEGK.js → Index-Bx5iwvms.js} +1 -1
- package/dist/assets/{Index-D9LzrEzG.js → Index-C-z6k8de.js} +1 -1
- package/dist/assets/{Index-BSM8qmE12.js → Index-CGJW6nkd2.js} +1 -1
- package/dist/assets/{Index-C_PsMoRe2.js → Index-CKyYi4I42.js} +1 -1
- package/dist/assets/{Index-CdNwVjUJ.js → Index-CWp40RE1.js} +1 -1
- package/dist/assets/{Index-DbXHxGAA.js → Index-Cg1RH1m0.js} +1 -1
- package/dist/assets/{Index-BinizDEw.js → Index-CtZxhcER.js} +1 -1
- package/dist/assets/{Index-BpoOIp5T2.js → Index-Cvmp02No2.js} +1 -1
- package/dist/assets/{Index-DMezegh3.js → Index-DAyYU5uc.js} +1 -1
- package/dist/assets/{Index-CORewMsb.js → Index-DWtJQNBK.js} +1 -1
- package/dist/assets/{Index-B41YMrlv2.js → Index-Dkpt4I1k2.js} +1 -1
- package/dist/assets/{Index-Dq7ZZB8Q2.js → Index-DovZMhsH2.js} +1 -1
- package/dist/assets/{Index-Bg6RXp-22.js → Index-Dw5wNUaz2.js} +1 -1
- package/dist/assets/{Index-rHufd-Kr.js → Index-DxYpM3r9.js} +1 -1
- package/dist/assets/{Index-D_tsMe7s.js → Index-E6Ph8SkK.js} +1 -1
- package/dist/assets/{Index-2kWFtnq2.js → Index-EOlFmMPn.js} +1 -1
- package/dist/assets/{Index-CmTCSoOY.js → Index-R-fzOPB8.js} +1 -1
- package/dist/assets/{Invitees-BeYhOGAr.js → Invitees-BwZDYVa2.js} +1 -1
- package/dist/assets/{List-dILUs9ri.js → List-CDA_E1Oq.js} +1 -1
- package/dist/assets/{List-sZ4o16vO.js → List-CSuXcq0N.js} +1 -1
- package/dist/assets/{List-Br-c5Y7K.js → List-rLhI-6-o.js} +1 -1
- package/dist/assets/{LocalTools-CGlok3bS.js → LocalTools-C1CgwcZ_.js} +1 -1
- package/dist/assets/{LocalTools-Du10Q-KG.js → LocalTools-C931KULM.js} +1 -1
- package/dist/assets/{Main-CVHgo6nd.js → Main-BGumoyz-.js} +1 -1
- package/dist/assets/{Message-CEGebS3A.js → Message-C-bcV1zk.js} +1 -1
- package/dist/assets/{Model-ByrKNtxt.css → Model-DA5Wo_wI.css} +1 -1
- package/dist/assets/Model-aAWPPCTq.js +1 -0
- package/dist/assets/{Navigator-Dys8G60u.js → Navigator-CYwaAGh0.js} +3 -3
- package/dist/assets/{NotFound-B8xC3Xkg.js → NotFound-dotOX5_Q.js} +1 -1
- package/dist/assets/{Pay-B9D4VVUj.js → Pay-DF14M1iC.js} +1 -1
- package/dist/assets/{Player-B1-y36IF.js → Player-BSq4cWx5.js} +1 -1
- package/dist/assets/{Poivelle-Ch9SG0cc.js → Poivelle-BkO9X29a.js} +1 -1
- package/dist/assets/{PromptTextarea-BN5xMkDn.js → PromptTextarea-SlwbqpPN.js} +1 -1
- package/dist/assets/{RealtimeCall-HmxNqTRI.js → RealtimeCall-C0zs3mPS.js} +1 -1
- package/dist/assets/{ScheduledTasks-CXkBXL7j.js → ScheduledTasks-9VeFbfN5.js} +1 -1
- package/dist/assets/{Status-BkQ5kopN.js → Status-DLJOOlyv.js} +1 -1
- package/dist/assets/{Subscribe-CQAktB9Y.js → Subscribe-CcBpmgSm.js} +1 -1
- package/dist/assets/{TabSwitcher-DDvB84Ic.js → TabSwitcher-ChCyKGmJ.js} +1 -1
- package/dist/assets/{Tts-BXzjQr0k.js → Tts-GSLR98-9.js} +1 -1
- package/dist/assets/{VideoPlayer-D0YQE8B0.js → VideoPlayer-LQjA3Xp9.js} +1 -1
- package/dist/assets/{alert-BDplJjFH.js → alert-DDomaAor.js} +1 -1
- package/dist/assets/arrow-down-DNaufvwO.js +1 -0
- package/dist/assets/{arrow-down-wide-narrow-DXNmiMs8.js → arrow-down-wide-narrow-BXRJRFvD.js} +1 -1
- package/dist/assets/arrow-left-B-8iA8wZ.js +1 -0
- package/dist/assets/arrow-right-D2zeWlB4.js +1 -0
- package/dist/assets/arrow-up-D-ZWAKKl.js +1 -0
- package/dist/assets/{avatar-BSLfJakz.js → avatar-BnpvOXBB.js} +1 -1
- package/dist/assets/{basic-BDepb3x3.js → basic-BcSRbOqH.js} +1 -1
- package/dist/assets/{box-DZV2E00R.js → box-DQH9ZwMN.js} +1 -1
- package/dist/assets/{boxes-Ci-ujGBZ.js → boxes-Dlrv15CU.js} +1 -1
- package/dist/assets/{brain-CSEkXyaK.js → brain-mfEL4i6v.js} +1 -1
- package/dist/assets/{chart-no-axes-combined-n7ymo6Xg.js → chart-no-axes-combined-CPExWQbA.js} +1 -1
- package/dist/assets/{chat-B80d2mNI.js → chat-BKB7V3To.js} +1 -1
- package/dist/assets/check-H4hrhXzi.js +1 -0
- package/dist/assets/chevron-down-BkvFp-m4.js +1 -0
- package/dist/assets/chevron-right-CL3rv5CF.js +1 -0
- package/dist/assets/circle-check-BsxME_La.js +1 -0
- package/dist/assets/clock-B2aR5D-m.js +1 -0
- package/dist/assets/{codingBridge-C6l3ZwHz.js → codingBridge-8gnok1fk.js} +1 -1
- package/dist/assets/{codingBridgeNotify-DD5wHtJU.js → codingBridgeNotify-CgKiBqhC.js} +2 -2
- package/dist/assets/{coins-Bt77jBiZ.js → coins-BGpnmxMg.js} +1 -1
- package/dist/assets/{collapse-Cdk31esV.js → collapse-DdvUSajs.js} +1 -1
- package/dist/assets/{copy-CU5KsMub.js → copy-kbq6MzCp.js} +1 -1
- package/dist/assets/{createTaskActions-CQkmjGbZ.js → createTaskActions-BiMN-UBT.js} +1 -1
- package/dist/assets/{digitalhuman-BXlkAcCh.js → digitalhuman-Bns9fv_9.js} +1 -1
- package/dist/assets/{dollar-sign-BkNO69TI.js → dollar-sign-kpG1Pwih.js} +1 -1
- package/dist/assets/{download-CZBrzAe9.js → download-DKwe5970.js} +1 -1
- package/dist/assets/{drawer-oMnCzPYd.js → drawer-D3Ieb275.js} +1 -1
- package/dist/assets/{dropdown-Cx68tM9d.js → dropdown-BRcZ6yJ0.js} +1 -1
- package/dist/assets/{dropdown-CRdbOUFC.js → dropdown-D8A3-Bs9.js} +1 -1
- package/dist/assets/{ellipsis-VteHkYV-.js → ellipsis-DF7-Qd4J.js} +1 -1
- package/dist/assets/{esm-CQ2fMwjC.js → esm-78prJscw.js} +2 -2
- package/dist/assets/{esm-CH0bYXCY.js → esm-BA25ll2n.js} +1 -1
- package/dist/assets/{esm-BhkrvIUo.js → esm-BG5jXeVW.js} +1 -1
- package/dist/assets/{esm-Dk72GVDQ.js → esm-CBsPmIQ1.js} +1 -1
- package/dist/assets/esm-D-1QbIxF.js +1 -0
- package/dist/assets/{esm-CvujFTUm.js → esm-DTAUdfO_.js} +2 -2
- package/dist/assets/{esm-BduzBH2m.js → esm-DXg0huI1.js} +3 -3
- package/dist/assets/{external-link-DA8scqfR.js → external-link-D4yEFKxi.js} +1 -1
- package/dist/assets/{eye-BfWxK8aV.js → eye-gDH_xx9O.js} +1 -1
- package/dist/assets/{file-output-PWZ63KaJ.js → file-output-BIgEHuKl.js} +1 -1
- package/dist/assets/{file-text-BiCIu3qW.js → file-text-DANeqGNd.js} +1 -1
- package/dist/assets/{fish-CyjGhFG8.js → fish-CUC1T54V.js} +1 -1
- package/dist/assets/{flux-ChDNRKsU.js → flux-BQ1ypo_U.js} +1 -1
- package/dist/assets/{folder-BSdP--wE.js → folder-DDOJQuSc.js} +1 -1
- package/dist/assets/gauge-BzYDsP_L.js +1 -0
- package/dist/assets/{globe-vAb4i-UX.js → globe-BpbqhsJS.js} +1 -1
- package/dist/assets/{grokvideo-D9_K18Z6.js → grokvideo-BRqJwKcv.js} +1 -1
- package/dist/assets/{hailuo-DoG0Xfy6.js → hailuo-BeXmxhzr.js} +1 -1
- package/dist/assets/{headphones-DDtvT1Yz.js → headphones-_u-yo_Fu.js} +1 -1
- package/dist/assets/{history-BJworAx_.js → history--yhLvc2u.js} +1 -1
- package/dist/assets/{image-igPYo_Pj.js → image-ti3oDtsv.js} +1 -1
- package/dist/assets/{index-DjH2rtqz.js → index-DN3R8m7E.js} +3 -3
- package/dist/assets/{index.browser.esm-CPzH_DYo.js → index.browser.esm-D3lNZib9.js} +1 -1
- package/dist/assets/{index.es-x8_I2SBU.js → index.es-WSKeFAmG.js} +1 -1
- package/dist/assets/{info-BvANsMZ5.js → info-Bx0W99ua.js} +1 -1
- package/dist/assets/{input-number-i5U8XdBq.js → input-number-BNYhheHb.js} +1 -1
- package/dist/assets/{key-round-BhtGMhGK.js → key-round-l4h83Hai.js} +1 -1
- package/dist/assets/{kling-110lI2T2.js → kling-mcd_szjd.js} +1 -1
- package/dist/assets/{languages-ChstT9C4.js → languages-BzCnELaD.js} +1 -1
- package/dist/assets/{laptop-BmLkCJWZ.js → laptop-BSIVtN3V.js} +1 -1
- package/dist/assets/{lightbulb-DhMN6I26.js → lightbulb-CtyM4o9R.js} +1 -1
- package/dist/assets/{link-D5hSNwle.js → link-B0EjI27n.js} +1 -1
- package/dist/assets/loader-circle-zBaix28P.js +1 -0
- package/dist/assets/{luma-4spWj8kt.js → luma-BOVQ3G3c.js} +1 -1
- package/dist/assets/{maestro-D3hecJHK.js → maestro-B9Mi5bhU.js} +1 -1
- package/dist/assets/{mail-CJWp-hxo.js → mail-5ahYVd70.js} +1 -1
- package/dist/assets/{message-circle-yF7cDPPh.js → message-circle-DFzmEdUF.js} +1 -1
- package/dist/assets/{mic-DjAHk5K1.js → mic-CAis9Yx9.js} +1 -1
- package/dist/assets/{midjourney-BzentxgM.js → midjourney-Bo1VcySN.js} +1 -1
- package/dist/assets/{mobileLocalExec-DfzBb8QQ.js → mobileLocalExec-CnN7lTnl.js} +2 -2
- package/dist/assets/{mouse-pointer-2-D5k09eQB.js → mouse-pointer-2-CeLJ2sII.js} +1 -1
- package/dist/assets/music-2-BP_3MsIr.js +1 -0
- package/dist/assets/{nanobanana-oEZ9jCdu.js → nanobanana-DHB2FSIw.js} +1 -1
- package/dist/assets/{omni-BRXZsrc1.js → omni-CLxouFCN.js} +1 -1
- package/dist/assets/{openaiimage-DIi-WbEx.js → openaiimage-CaPUH9Aq.js} +1 -1
- package/dist/assets/{pagination-B3irjpSu.js → pagination-C1jD7-j5.js} +1 -1
- package/dist/assets/{pagination-CRTJLrs9.js → pagination-C4WgQYO7.js} +1 -1
- package/dist/assets/{palette-DXQDwyp1.js → palette-BtbLIsCu.js} +1 -1
- package/dist/assets/{paperclip-Ds_pgdCl.js → paperclip-B2sf3oRH.js} +1 -1
- package/dist/assets/{pause-GVi14-ft.js → pause-DlR5Figp.js} +1 -1
- package/dist/assets/{pencil-DBlQBmAn.js → pencil-NcAFAL58.js} +1 -1
- package/dist/assets/{pika-BvVnxn1P.js → pika-IYuco3PV.js} +1 -1
- package/dist/assets/{pixverse-r5huU6Ul.js → pixverse-lNgK-RD0.js} +1 -1
- package/dist/assets/play-BiSrmze1.js +1 -0
- package/dist/assets/plus-DOl_NN3y.js +1 -0
- package/dist/assets/{poivelle-BK46KraW.js → poivelle-BhKHXlXh.js} +1 -1
- package/dist/assets/{popover-Ca6MAZq8.js → popover-B1gUaY9n.js} +1 -1
- package/dist/assets/{producer-E_eCaX8O.js → producer-6yrVgeOd.js} +1 -1
- package/dist/assets/{qrart-D1rJnCCH.js → qrart-BIGvuu8X.js} +1 -1
- package/dist/assets/{realtime-Dd3584bn.js → realtime-CkswHtBL.js} +1 -1
- package/dist/assets/{refresh-cw-ByRXxRtZ.js → refresh-cw-BluoyT42.js} +1 -1
- package/dist/assets/rotate-ccw-BRcTnoAa.js +1 -0
- package/dist/assets/rotate-cw-sLGyQULY.js +1 -0
- package/dist/assets/{row-B4KJ5qAM.js → row-CLhyg4nI.js} +1 -1
- package/dist/assets/search-j0x-njM7.js +1 -0
- package/dist/assets/{seedance-B1OWhrfp.js → seedance-D11u8gDU.js} +1 -1
- package/dist/assets/{seedream-lJ9lgZpf.js → seedream-6j7_E5vu.js} +1 -1
- package/dist/assets/{select-BStvECg1.js → select-DW3H8Cyb.js} +1 -1
- package/dist/assets/{serp-DThQatO3.js → serp-BV2MWcgG.js} +1 -1
- package/dist/assets/{shield-WWFXGsj1.js → shield-CUnjzc05.js} +1 -1
- package/dist/assets/{shuffle-BqYVx2-u.js → shuffle-DYBASPpa.js} +1 -1
- package/dist/assets/{slider-CuTlFPPR.js → slider-D25-e_qO.js} +1 -1
- package/dist/assets/{sliders-horizontal-BtXQ68tz.js → sliders-horizontal-B0_n8LUb.js} +1 -1
- package/dist/assets/{solana-wallets-Bw6E39Pm.js → solana-wallets-BuMycLu_.js} +2 -2
- package/dist/assets/{solana-wallets-vue-RNIy_HkB.js → solana-wallets-vue-Bz5QmmDJ.js} +1 -1
- package/dist/assets/{sora-BZIm7ao3.js → sora-B5x17P2m.js} +1 -1
- package/dist/assets/{sparkles-iNFqRK4U.js → sparkles-DvfrOl7a.js} +1 -1
- package/dist/assets/square-CWbmcxRf.js +1 -0
- package/dist/assets/{suno-D2u_4X97.js → suno-D9haRZ-a.js} +1 -1
- package/dist/assets/{switch-D5lFTJY5.js → switch-soiMVhrL.js} +1 -1
- package/dist/assets/{table-CaTq0fbd.js → table-BAccHGob.js} +1 -1
- package/dist/assets/{tabs-LWySwjmg.js → tabs-DCuVAETd.js} +1 -1
- package/dist/assets/{tag-pQCbKxcO.js → tag-PH6eXs6V.js} +1 -1
- package/dist/assets/{taskDrawerMixin-Cl7YxaFY.js → taskDrawerMixin-CFzLna7k.js} +1 -1
- package/dist/assets/terminal-D8no06P_.js +1 -0
- package/dist/assets/{time-picker-CyN6mYku.js → time-picker-DCxtYEIZ.js} +1 -1
- package/dist/assets/{tooltip-D4EgKm6G.js → tooltip-Cp5x5YK-.js} +1 -1
- package/dist/assets/{trash-2-CiaDFmZj.js → trash-2-Calt7aGA.js} +1 -1
- package/dist/assets/{triangle-alert-C3z70mZA.js → triangle-alert-Bm11tXxr.js} +1 -1
- package/dist/assets/{upload-DGfOhnPA.js → upload-Bd3dUhzA.js} +1 -1
- package/dist/assets/{upload-ByNQwXJh.js → upload-zeb95gHP.js} +1 -1
- package/dist/assets/user-DFOv3q8g.js +1 -0
- package/dist/assets/{veo-WhmdJ9EC.js → veo-CcrR_tKa.js} +1 -1
- package/dist/assets/{video-Dm20ncFf.js → video-BRA4fel-.js} +1 -1
- package/dist/assets/{volume-2-xm5Y_nf-.js → volume-2-BTaDncDI.js} +1 -1
- package/dist/assets/{wallet-B_F55Sui.js → wallet-B-VpKB_2.js} +1 -1
- package/dist/assets/{wan-BoOyw4pn.js → wan-CsBibQR2.js} +1 -1
- package/dist/assets/{wand-sparkles-PLgBR18n.js → wand-sparkles-Bfkh-7H0.js} +1 -1
- package/dist/assets/{web-C2aaNWU_.js → web-BbQ7s02E.js} +1 -1
- package/dist/assets/{web-C3PH0T6Z.js → web-Bj2ovSaw.js} +1 -1
- package/dist/assets/{web-D2IogFzY.js → web-CG1zzaWW.js} +1 -1
- package/dist/assets/{web-C8GGdKUI.js → web-DAYHwJx6.js} +1 -1
- package/dist/assets/{web-CJf39ZmQ.js → web-es_ULX6B.js} +1 -1
- package/dist/assets/{webextrator-Bxv6PWrj.js → webextrator-DDYHcefR.js} +1 -1
- package/dist/assets/{zap-BEYIN2Rm.js → zap-C4aYn_F0.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/Model-CQsHyzsI.js +0 -1
- package/dist/assets/arrow-down-Hgc90ZTc.js +0 -1
- package/dist/assets/arrow-left-DB6qWRxA.js +0 -1
- package/dist/assets/arrow-right-RL8gvSEN.js +0 -1
- package/dist/assets/arrow-up-D3niKZHG.js +0 -1
- package/dist/assets/check-sBDe6s27.js +0 -1
- package/dist/assets/chevron-down-DiCB7_cE.js +0 -1
- package/dist/assets/chevron-right-Qv5p8ju5.js +0 -1
- package/dist/assets/circle-check-GlUp7XCt.js +0 -1
- package/dist/assets/clock-Wfu3yNCH.js +0 -1
- package/dist/assets/esm-BkoueZY1.js +0 -1
- package/dist/assets/gauge-CbjIJ_jY.js +0 -1
- package/dist/assets/loader-circle-By_qWfck.js +0 -1
- package/dist/assets/music-2-DwDkh_mX.js +0 -1
- package/dist/assets/play-loqVd6xQ.js +0 -1
- package/dist/assets/plus-5mgK_nZC.js +0 -1
- package/dist/assets/rotate-ccw-B1jJmco8.js +0 -1
- package/dist/assets/rotate-cw-DtZmpRHd.js +0 -1
- package/dist/assets/search-DilmuF2H.js +0 -1
- package/dist/assets/square-CMRoVOCf.js +0 -1
- package/dist/assets/terminal-D3j2ijKT.js +0 -1
- package/dist/assets/user-Bkb9jny8.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,S as c,T as l,at as u,bt as d,ht as f,it as p,j as m,mt as h,qt as g,rt as _,st as v,tt as y,x as b,z as x}from"./vendor-chart-Dw-P17PN.js";import{W as S}from"./use-deprecated-r4dlLNqm.js";import{r as C,t as w}from"./select-BStvECg1.js";import{t as T}from"./upload-ByNQwXJh.js";import{t as E}from"./alert-BDplJjFH.js";import{t as D}from"./drawer-oMnCzPYd.js";import{t as O}from"./input-number-i5U8XdBq.js";import{t as k}from"./switch-D5lFTJY5.js";import{n as A}from"./taskDrawerMixin-Cl7YxaFY.js";import{t as j}from"./check-sBDe6s27.js";import{t as M}from"./clock-Wfu3yNCH.js";import{t as N}from"./download-CZBrzAe9.js";import{t as P}from"./gauge-CbjIJ_jY.js";import{n as F,r as I,t as L}from"./PromptTextarea-BN5xMkDn.js";import{t as R}from"./info-BvANsMZ5.js";import{t as z}from"./languages-ChstT9C4.js";import{t as ee}from"./loader-circle-By_qWfck.js";import{t as te}from"./palette-DXQDwyp1.js";import{t as ne}from"./paperclip-Ds_pgdCl.js";import{t as re}from"./pause-GVi14-ft.js";import{t as ie}from"./play-loqVd6xQ.js";import{t as ae}from"./rotate-cw-DtZmpRHd.js";import{t as oe}from"./triangle-alert-C3z70mZA.js";import{t as se}from"./video-Dm20ncFf.js";import{t as B}from"./wand-sparkles-PLgBR18n.js";import{Ar as ce,Er as le,Lr as ue,Mr as de,Or as fe,Pr as pe,Ur as me,Vr as he,jr as V,kr as ge,zr as _e}from"./constants-P5wTiWzI.js";import{Bn as H,E as U,Mi as W,ai as ve,en as ye,gr as be,ni as G,nn as xe,on as K,rn as Se,vi as q}from"./index-DjH2rtqz.js";import{t as Ce}from"./CopyToClipboard-DFuxR3Az.js";import{t as we}from"./FilePreview-lDiIA4f3.js";import{t as Te}from"./ImagePreview-BbEGVj7c.js";import{a as Ee,n as De,r as Oe,t as ke}from"./pagination-CRTJLrs9.js";import{t as Ae}from"./VideoPlayer-D0YQE8B0.js";import{t as je}from"./ApiCodeButton-6yNv6GzT.js";import{t as Me}from"./BotPlaceholder-CsV6S3zO.js";import{n as Ne,t as Pe}from"./AudioPreview-BwaUx8CQ.js";import{a as J,i as Fe,n as Ie,o as Le,s as Re,t as ze}from"./maestro-C4KUqcGJ.js";var Be=x({name:`LayoutMaestro`,components:{MagicIcon:B,ElDrawer:D,ElButton:W},mixins:[A]}),Ve={class:`main flex flex-row flex-1`},He={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)]`},Ue={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function We(t,n,r,i,o,c){let l=u(`magic-icon`),d=u(`el-button`),m=u(`el-drawer`);return y(),s(`div`,Ve,[e(`div`,He,[p(t.$slots,`config`,{},void 0,!0)]),e(`div`,Ue,[p(t.$slots,`result`,{},void 0,!0)]),f(a(d,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:h(()=>[a(l,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[b,!t.tasksEmpty]]),a(m,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`generator-drawer`},{default:h(()=>[p(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var Ge=U(Be,[[`render`,We],[`__scopeId`,`data-v-808f6ae5`]]),Ke=x({name:`MaestroFileUrlsInput`,components:{AttachmentIcon:ne,ElUpload:T,ElButton:W},data(){return{fileList:[],uploadUrl:ve()+`/api/v1/files/`,MAESTRO_FILE_ACCEPT:_e,MAESTRO_FILE_LIMIT:6}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},value(){return this.$store.state.maestro?.config?.file_urls||[]}},watch:{value:{immediate:!0,handler(e){let t=new Map(this.fileList.map(e=>[e?.response?.file_url||e.url,e])),n=e.map(e=>t.get(e)||{name:e.split(`/`).pop()||e,url:e,status:`success`,percentage:100,response:{file_url:e}}),r=this.fileList.filter(e=>!(e?.response?.file_url||e.url));this.fileList=[...n,...r]}}},methods:{onExceed(){q.warning(this.$t(`maestro.message.uploadExceed`))},onError(){q.error(this.$t(`maestro.message.uploadError`))},onChange(){let e=this.fileList.map(e=>e?.response?.file_url||e.url).filter(e=>!!e);this.$store.commit(`maestro/setConfig`,{...this.$store.state.maestro?.config,file_urls:e})}}});function qe(e,t,n,o,c,l){let d=u(`attachment-icon`),f=u(`el-button`),p=u(`el-upload`);return y(),s(`div`,null,[a(p,{ref:`uploader`,"file-list":e.fileList,"onUpdate:fileList":t[0]||=t=>e.fileList=t,accept:e.MAESTRO_FILE_ACCEPT,name:`file`,class:`w-full`,limit:e.MAESTRO_FILE_LIMIT,multiple:!0,action:e.uploadUrl,headers:e.headers,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onChange,"on-remove":e.onChange},{default:h(()=>[a(f,{size:`small`,round:``},{default:h(()=>[a(d,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(e.$t(`maestro.button.uploadFiles`)),1)]),_:1})]),_:1},8,[`file-list`,`accept`,`limit`,`action`,`headers`,`on-exceed`,`on-error`,`on-success`,`on-remove`])])}var Je=U(Ke,[[`render`,qe]]),Ye={"9:16":{width:15,height:26},"16:9":{width:26,height:15},"1:1":{width:20,height:20}},Xe=x({name:`ConfigPanel`,components:{MagicIcon:B,ElButton:W,ElSelect:C,ElOption:w,ElInputNumber:O,ElAlert:E,ElSwitch:k,InfoIcon:Ee,PauseIcon:re,PlayIcon:ie,PromptTextarea:L,FileUrlsInput:Je},emits:[`generate`],data(){return{MAESTRO_MIN_DURATION:1,MAESTRO_MAX_DURATION:600,MAESTRO_ALLOWED_QUALITIES:fe,MAESTRO_ALLOWED_SCENARIOS:ge,MAESTRO_SCENARIO_THUMBNAILS:he,MAESTRO_ALLOWED_STYLES:ce,MAESTRO_ALLOWED_VOICES:V,playing:!1,audioEl:null}},computed:{config(){return this.$store.state.maestro?.config},service(){return this.$store.state.maestro?.service},ratioOptions(){return le.map(e=>({value:e,...Ye[e]??{width:20,height:20}}))},isRemixing(){let e=this.config?.action;return!!e&&e!==`generate`&&!!this.config?.ref_task_id},refTaskId(){return this.config?.ref_task_id},needsVideoUpload(){if(!this.scenarioCustomizationEnabled)return!1;let e=this.config?.scenario;return!e||!me.includes(e)?!1:!(this.config?.file_urls||[]).some(e=>K(e))},canGenerate(){return!!this.prompt?.trim()&&!this.needsVideoUpload},prompt:{get(){return this.config?.prompt},set(e){this.update({prompt:e})}},langs:{get(){return J(this.config?.langs)},set(e){this.update({langs:J(e)})}},languageOptions(){return Fe(this.$i18n.locale)},additionalLanguageOptions(){return this.languageOptions.filter(e=>e.value!==this.primaryLanguage)},primaryLanguage:{get(){return this.langs[0]||pe[0]},set(e){this.update({langs:Re(this.langs,e)})}},additionalLanguages:{get(){return this.langs.slice(1)},set(e){this.update({langs:Le(this.langs,e)})}},aspect:{get(){return this.config?.aspect},set(e){this.update({aspect:e})}},duration:{get(){return this.config?.duration},set(e){let t=Math.min(600,Math.max(1,Math.round(typeof e==`number`&&!Number.isNaN(e)?e:30)));this.update({duration:t})}},quality:{get(){return this.config?.quality},set(e){this.update({quality:e})}},scenarioCustomizationEnabled:{get(){return this.config?.scenario_customization_enabled??!1},set(e){this.update({scenario_customization_enabled:e})}},styleCustomizationEnabled:{get(){return this.config?.style_customization_enabled??!1},set(e){this.update({style_customization_enabled:e})}},voiceCustomizationEnabled:{get(){return this.config?.voice_customization_enabled??!1},set(e){e||this.stopSample(),this.update({voice_customization_enabled:e})}},scenario:{get(){return this.config?.scenario},set(e){this.update({scenario:e})}},style:{get(){return this.config?.style},set(e){let t=e?.trim();this.update({style:!t||t.toLowerCase()===`auto`?ue:t})}},voice:{get(){return this.config?.voice},set(e){this.stopSample(),this.update({voice:e||`warm-female`})}},currentSample(){return V.find(e=>e.key===this.voice)?.sample}},watch:{voiceCustomizationEnabled(e){e||this.stopSample()},voice(){this.stopSample()}},mounted(){this.update({action:this.config?.action??`generate`,langs:J(this.config?.langs),aspect:this.config?.aspect??`9:16`,duration:this.config?.duration??30,quality:this.config?.quality??`standard`})},beforeUnmount(){this.stopSample()},methods:{update(e){this.$store.commit(`maestro/setConfig`,{...this.config,...e})},onClearRemix(){this.update({action:de,ref_task_id:void 0})},onToggleSample(){let e=this.currentSample;if(e){if(this.audioEl||(this.audioEl=d(new Audio),this.audioEl.addEventListener(`ended`,()=>{this.playing=!1})),this.playing){this.audioEl.pause(),this.playing=!1;return}this.audioEl.src!==e&&(this.audioEl.src=e),this.audioEl.currentTime=0,this.audioEl.play().then(()=>{this.playing=!0}).catch(()=>{this.playing=!1})}},stopSample(){this.audioEl&&(this.audioEl.pause(),this.audioEl.currentTime=0),this.playing=!1},onGenerate(){this.$emit(`generate`)}}}),Ze={class:`flex flex-col h-full`},Qe={class:`flex-1 overflow-y-auto p-5`},$e={class:`text-xs mb-1`},et={class:`field-block mb-5`},tt={class:`field-head`},nt={class:`field-title font-bold`},rt={class:`field-block mb-5`},it={class:`field-head`},at={class:`field-title font-bold`},ot={class:`language-picker`},st={class:`language-role language-role--primary`},ct={class:`language-role-label`},lt={class:`language-role`},ut={class:`language-role-label`},dt={class:`field-block mb-5`},ft={class:`field-head`},pt={class:`field-title font-bold`},mt=[`aria-label`],ht=[`aria-checked`,`aria-label`,`onClick`,`onKeydown`],gt={class:`ratio-preview`},_t={class:`ratio-name`},vt={class:`field-row mb-4`},yt={class:`field-head`},bt={class:`field-title font-bold`},xt={class:`field-row`},St={class:`field-head`},Ct={class:`field-title font-bold`},wt={class:`custom-field`},Tt={class:`custom-field-header mb-2`},Et={class:`field-head`},Dt={class:`field-title font-bold`},Ot=[`aria-label`,`aria-disabled`],kt=[`aria-checked`,`aria-disabled`,`aria-label`,`tabindex`,`onClick`,`onKeydown`],At={class:`scenario-thumb`},jt=[`src`,`alt`],Mt={class:`scenario-name`},Nt={class:`custom-field`},Pt={class:`custom-field-header mb-2`},Ft={class:`field-head`},It={class:`field-title font-bold`},Lt={class:`custom-field`},Rt={class:`custom-field-header mb-2`},zt={class:`field-head`},Bt={class:`field-title font-bold`},Vt={class:`voice-row`},Ht={class:`flex flex-col items-center justify-center px-5 pb-5`};function Ut(d,f,p,v,b,x){let S=u(`magic-icon`),C=u(`el-button`),w=u(`el-alert`),T=u(`prompt-textarea`),E=u(`info-icon`),D=u(`file-urls-input`),O=u(`el-option`),k=u(`el-select`),A=u(`el-input-number`),j=u(`el-switch`),M=u(`pause-icon`),N=u(`play-icon`);return y(),s(`div`,Ze,[e(`div`,Qe,[d.isRemixing?(y(),m(w,{key:0,closable:!1,type:`info`,class:`mb-5`},{default:h(()=>[e(`p`,$e,[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`maestro.name.remixing`))+`: `+i(d.refTaskId),1)]),a(C,{size:`small`,text:``,onClick:d.onClearRemix},{default:h(()=>[r(i(d.$t(`maestro.button.cancelRemix`)),1)]),_:1},8,[`onClick`])]),_:1})):o(``,!0),a(T,{modelValue:d.prompt,"onUpdate:modelValue":f[0]||=e=>d.prompt=e,class:`mb-5`,title:d.$t(`maestro.name.prompt`),info:d.$t(`maestro.description.prompt`),placeholder:d.$t(`maestro.placeholder.prompt`),"min-rows":6},null,8,[`modelValue`,`title`,`info`,`placeholder`]),e(`div`,et,[e(`div`,tt,[e(`h2`,nt,i(d.$t(`maestro.name.files`)),1),a(E,{content:d.$t(`maestro.description.files`),class:`ml-1`},null,8,[`content`])]),a(D)]),e(`div`,rt,[e(`div`,it,[e(`h2`,at,i(d.$t(`maestro.name.langs`)),1),a(E,{content:d.$t(`maestro.description.langs`),class:`ml-1`},null,8,[`content`])]),e(`div`,ot,[e(`label`,st,[e(`span`,ct,i(d.$t(`maestro.name.primaryLanguage`)),1),a(k,{modelValue:d.primaryLanguage,"onUpdate:modelValue":f[1]||=e=>d.primaryLanguage=e,class:`w-full`},{default:h(()=>[(y(!0),s(l,null,_(d.languageOptions,e=>(y(),m(O,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),e(`label`,lt,[e(`span`,ut,i(d.$t(`maestro.name.additionalLanguages`)),1),a(k,{modelValue:d.additionalLanguages,"onUpdate:modelValue":f[2]||=e=>d.additionalLanguages=e,multiple:``,"collapse-tags":``,"collapse-tags-tooltip":``,placeholder:d.$t(`maestro.placeholder.additionalLanguages`),class:`w-full`},{default:h(()=>[(y(!0),s(l,null,_(d.additionalLanguageOptions,e=>(y(),m(O,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])])]),e(`div`,dt,[e(`div`,ft,[e(`h2`,pt,i(d.$t(`maestro.name.aspect`)),1)]),e(`div`,{class:`ratio-items`,role:`radiogroup`,"aria-label":d.$t(`maestro.name.aspect`)},[(y(!0),s(l,null,_(d.ratioOptions,r=>(y(),s(`div`,{key:r.value,class:n([`ratio-item`,{active:d.aspect===r.value}]),role:`radio`,"aria-checked":d.aspect===r.value,"aria-label":r.value,tabindex:`0`,onClick:e=>d.aspect=r.value,onKeydown:[c(t(e=>d.aspect=r.value,[`prevent`]),[`enter`]),c(t(e=>d.aspect=r.value,[`prevent`]),[`space`])]},[e(`div`,gt,[e(`div`,{class:`ratio-rect`,style:g({width:r.width+`px`,height:r.height+`px`})},null,4)]),e(`p`,_t,i(r.value),1)],42,ht))),128))],8,mt)]),e(`div`,vt,[e(`div`,yt,[e(`h2`,bt,i(d.$t(`maestro.name.duration`)),1),a(E,{content:d.$t(`maestro.description.duration`),class:`ml-1`},null,8,[`content`])]),a(A,{modelValue:d.duration,"onUpdate:modelValue":f[3]||=e=>d.duration=e,class:`field-control`,min:d.MAESTRO_MIN_DURATION,max:d.MAESTRO_MAX_DURATION,step:5,"controls-position":`right`},null,8,[`modelValue`,`min`,`max`])]),e(`div`,xt,[e(`div`,St,[e(`h2`,Ct,i(d.$t(`maestro.name.quality`)),1),a(E,{content:d.$t(`maestro.description.quality`),class:`ml-1`},null,8,[`content`])]),a(k,{modelValue:d.quality,"onUpdate:modelValue":f[4]||=e=>d.quality=e,class:`field-control`},{default:h(()=>[(y(!0),s(l,null,_(d.MAESTRO_ALLOWED_QUALITIES,e=>(y(),m(O,{key:e,label:d.$t(`maestro.option.quality.${e}`),value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),e(`div`,wt,[e(`div`,Tt,[e(`div`,Et,[e(`h2`,Dt,i(d.$t(`maestro.name.customizeScenario`)),1),a(E,{content:d.$t(`maestro.description.scenario`),class:`ml-1`},null,8,[`content`])]),a(j,{modelValue:d.scenarioCustomizationEnabled,"onUpdate:modelValue":f[5]||=e=>d.scenarioCustomizationEnabled=e,"aria-label":d.$t(`maestro.name.customizeScenario`)},null,8,[`modelValue`,`aria-label`])]),e(`div`,{class:n([`scenario-cards`,{"is-disabled":!d.scenarioCustomizationEnabled}]),role:`radiogroup`,"aria-label":d.$t(`maestro.name.scenario`),"aria-disabled":!d.scenarioCustomizationEnabled},[(y(!0),s(l,null,_(d.MAESTRO_ALLOWED_SCENARIOS,r=>(y(),s(`div`,{key:r,class:n([`scenario-card`,{active:d.scenarioCustomizationEnabled&&d.scenario===r,disabled:!d.scenarioCustomizationEnabled}]),role:`radio`,"aria-checked":d.scenarioCustomizationEnabled&&d.scenario===r,"aria-disabled":!d.scenarioCustomizationEnabled,"aria-label":d.$t(`maestro.option.scenario.${r}`),tabindex:d.scenarioCustomizationEnabled?0:-1,onClick:e=>d.scenarioCustomizationEnabled&&(d.scenario=r),onKeydown:[c(t(e=>d.scenarioCustomizationEnabled&&(d.scenario=r),[`prevent`]),[`enter`]),c(t(e=>d.scenarioCustomizationEnabled&&(d.scenario=r),[`prevent`]),[`space`])]},[e(`div`,At,[e(`img`,{src:d.MAESTRO_SCENARIO_THUMBNAILS[r],alt:d.$t(`maestro.option.scenario.${r}`),loading:`lazy`},null,8,jt)]),e(`p`,Mt,i(d.$t(`maestro.option.scenario.${r}`)),1)],42,kt))),128))],10,Ot),d.needsVideoUpload?(y(),m(w,{key:0,title:d.$t(`maestro.message.captionsNeedVideo`),type:`warning`,closable:!1,"show-icon":``,class:`mt-2`},null,8,[`title`])):o(``,!0)]),e(`div`,Nt,[e(`div`,Pt,[e(`div`,Ft,[e(`h2`,It,i(d.$t(`maestro.name.customizeStyle`)),1),a(E,{content:d.$t(`maestro.description.style`),class:`ml-1`},null,8,[`content`])]),a(j,{modelValue:d.styleCustomizationEnabled,"onUpdate:modelValue":f[6]||=e=>d.styleCustomizationEnabled=e,"aria-label":d.$t(`maestro.name.customizeStyle`)},null,8,[`modelValue`,`aria-label`])]),a(k,{modelValue:d.style,"onUpdate:modelValue":f[7]||=e=>d.style=e,class:`w-full`,filterable:``,"allow-create":``,"default-first-option":``,disabled:!d.styleCustomizationEnabled,"aria-label":d.$t(`maestro.name.customizeStyle`),placeholder:d.$t(`maestro.placeholder.select`)},{default:h(()=>[(y(!0),s(l,null,_(d.MAESTRO_ALLOWED_STYLES,e=>(y(),m(O,{key:e,label:d.$t(`maestro.option.style.${e}`),value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`,`aria-label`,`placeholder`])]),e(`div`,Lt,[e(`div`,Rt,[e(`div`,zt,[e(`h2`,Bt,i(d.$t(`maestro.name.customizeVoice`)),1),a(E,{content:d.$t(`maestro.description.voice`),class:`ml-1`},null,8,[`content`])]),a(j,{modelValue:d.voiceCustomizationEnabled,"onUpdate:modelValue":f[8]||=e=>d.voiceCustomizationEnabled=e,"aria-label":d.$t(`maestro.name.customizeVoice`)},null,8,[`modelValue`,`aria-label`])]),e(`div`,Vt,[a(k,{modelValue:d.voice,"onUpdate:modelValue":f[9]||=e=>d.voice=e,class:`voice-select`,disabled:!d.voiceCustomizationEnabled,"aria-label":d.$t(`maestro.name.customizeVoice`),placeholder:d.$t(`maestro.placeholder.select`)},{default:h(()=>[(y(!0),s(l,null,_(d.MAESTRO_ALLOWED_VOICES,e=>(y(),m(O,{key:e.key,label:d.$t(`maestro.option.voice.${e.key}`),value:e.key},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`,`aria-label`,`placeholder`]),a(C,{class:`voice-play`,disabled:!d.voiceCustomizationEnabled||!d.currentSample,title:d.$t(`maestro.button.preview`),"aria-label":d.$t(`maestro.button.preview`),onClick:d.onToggleSample},{default:h(()=>[d.playing?(y(),m(M,{key:0,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(y(),m(N,{key:1,size:`1em`,"aria-hidden":`true`,focusable:`false`}))]),_:1},8,[`disabled`,`title`,`aria-label`,`onClick`])])])]),e(`div`,Ht,[a(C,{type:`primary`,class:`btn w-full`,round:``,disabled:!d.canGenerate,onClick:d.onGenerate},{default:h(()=>[a(S,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`maestro.button.generate`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var Wt=U(Xe,[[`render`,Ut],[`__scopeId`,`data-v-a4840734`]]),Gt=50,Kt=1e4,Y=new Map,X=new Map,qt=(e,t)=>{if(Y.set(e,t),Y.size>Gt){let e=Y.keys().next().value;e&&Y.delete(e)}};async function Jt(e,t){let n=`${t.credentialKey}:${e}`,r=Y.get(n);if(r)return r;let i=X.get(n);if(i)return i.promise;let a=new AbortController,o,s={controller:a,promise:void 0},c=H.task(e,{token:t.token,signal:a.signal}).then(({data:e})=>{if(!a.signal.aborted)return qt(n,e),e}).catch(t=>{a.signal.aborted||console.warn(`failed to load maestro remix reference task`,e,t)}),l=new Promise(e=>{o=window.setTimeout(()=>{a.abort(),e(void 0)},Kt)});return s.promise=Promise.race([c,l]).finally(()=>{o!==void 0&&window.clearTimeout(o),X.get(n)===s&&X.delete(n)}),X.set(n,s),s.promise}var Z=[`plan`,`source`,`voice`,`compose`,`render`,`deliver`];function Q(e){if(!e)return-1;let t=e.toLowerCase(),n=Z.indexOf(t);return n>=0?n:/plan|storyboard|script|brief/.test(t)?0:/source|search|image|photo|asset|media/.test(t)?1:/voice|tts|audio|narrat/.test(t)?2:/compose|composit|build|layout|scene/.test(t)?3:/render|encode/.test(t)?4:/deliver|upload|cdn|complete|done|finish/.test(t)?5:-1}var Yt=x({name:`ProgressSteps`,components:{ElIcon:S,Loading:ee,Check:j},props:{modelValue:{type:Object,required:!0}},computed:{currentIndex(){let e=this.modelValue?.response?.data?.progress||[],t=-1;for(let n of e)t=Math.max(t,Q(n?.stage));return t=Math.max(t,Q(this.modelValue?.response?.data?.stage)),Math.max(t,0)},detail(){let e=this.modelValue?.response?.data;if(e?.activity)return e.activity;let t=e?.progress||[];for(let e=t.length-1;e>=0;e--)if(t[e]?.message)return t[e]?.message},steps(){return Z.map(e=>({key:e}))}},methods:{stateOf(e){let t=this.currentIndex;return e<t?`done`:e===t?`active`:`pending`}}}),Xt={class:`progress-steps`,"aria-live":`polite`},Zt=[`aria-current`],Qt={class:`ico`},$t={class:`txt`},en={key:0,class:`detail`};function tn(t,r,c,d,f,p){let g=u(`loading`),v=u(`el-icon`),b=u(`check`);return y(),s(`div`,Xt,[(y(!0),s(l,null,_(t.steps,(r,c)=>(y(),s(`div`,{key:r.key,class:n([`step`,t.stateOf(c)]),"aria-current":c===t.currentIndex?`step`:void 0},[e(`span`,Qt,[c===t.currentIndex?(y(),m(v,{key:0,class:`is-loading`,"aria-label":t.$t(`maestro.step.${r.key}`)},{default:h(()=>[a(g,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`])):c<t.currentIndex?(y(),m(v,{key:1},{default:h(()=>[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1})):o(``,!0)]),e(`span`,$t,i(t.$t(`maestro.step.${r.key}`)),1)],10,Zt))),128)),t.detail?(y(),s(`p`,en,i(t.detail),1)):o(``,!0)])}var nn=U(Yt,[[`render`,tn],[`__scopeId`,`data-v-8a883977`]]),rn=[`succeeded`,`failed`],an=[1e3,3e3],on=x({name:`TaskPreview`,components:{ChannelIcon:I,DownloadIcon:N,InfoIcon:R,LanguageIcon:z,MagicIcon:B,RedoIcon:ae,TimeIcon:M,WarningIcon:oe,CopyToClipboard:Ce,ElAlert:E,VideoPlayer:Ae,ElButton:W,ApiCodeButton:je,ImagePreview:Te,AudioPreview:Pe,VideoPreview:Ne,FilePreview:we,ProgressSteps:nn},props:{modelValue:{type:Object,required:!0}},data(){return{fetchedReferenceTask:void 0,fetchedReferenceKey:void 0,referenceLoadAttempt:0,referenceLoadFailed:!1,referenceLoadTimer:void 0,referenceLoadVersion:0}},computed:{variants(){return this.modelValue?.response?.data?.variants||[]},files(){let e=[...this.modelValue?.request?.file_urls||[]];if(this.referenceTaskId)for(let t of this.referenceTask?.response?.data?.variants||[])t.output_url&&e.push(t.output_url);return[...new Set(e)].filter(e=>!!e).map(e=>{let t=e.split(`?`)[0].split(`#`)[0],n=Se(t)?`image`:K(t)?`video`:xe(t)?`audio`:`file`;return{url:e,name:this.fileName(t),kind:n}})},referenceTaskId(){let e=this.modelValue?.request;return e?.action===`remix`?e?.ref_task_id:void 0},referenceLoadKey(){let e=this.$store.state.maestro?.credential,t=e?.token;if(!(!this.referenceTaskId||!t))return JSON.stringify([this.referenceTaskId,e?.id||e?.user_id||t,t])},referenceTask(){if(this.referenceTaskId)return this.$store.state.maestro?.tasks?.items?.find(e=>e.id===this.referenceTaskId)||(this.fetchedReferenceKey===this.referenceLoadKey?this.fetchedReferenceTask:void 0)},isTerminal(){return rn.includes(this.modelValue?.status||``)},traceId(){return this.modelValue?.trace_id||this.modelValue?.response?.trace_id},progressPct(){let e=this.modelValue?.response?.data?.progress,t=e?.length?e[e.length-1]:void 0;return typeof t?.pct==`number`?t.pct:void 0},progressText(){return this.progressPct===void 0?this.statusLabel:`${this.progressPct}%`},statusLabel(){let e=`maestro.status.${this.modelValue?.status||`pending`}`,t=this.$t(e);return t===e?this.$t(`maestro.status.processing`):t},failureReason(){let e=this.modelValue?.response?.error;if(e)return typeof e==`string`?e:e?.message},requestParams(){let e=this.modelValue?.request;if(!e)return[];let t=[];return e.action&&t.push({icon:d(B),label:this.$t(`maestro.name.mode`),value:this.optionLabel(`maestro.option.action`,e.action)}),e.scenario&&t.push({icon:d(se),label:this.$t(`maestro.name.scenario`),value:this.optionLabel(`maestro.option.scenario`,e.scenario)}),e.style&&t.push({icon:d(te),label:this.$t(`maestro.name.style`),value:this.optionLabel(`maestro.option.style`,e.style)}),e.quality&&t.push({icon:d(P),label:this.$t(`maestro.name.quality`),value:this.optionLabel(`maestro.option.quality`,e.quality)}),e.aspect&&t.push({icon:d(F),label:this.$t(`maestro.name.aspect`),value:e.aspect}),e.duration&&t.push({icon:d(M),label:this.$t(`maestro.name.duration`),value:`${e.duration}s`}),e.langs?.length&&t.push({icon:d(z),label:this.$t(`maestro.name.langs`),value:e.langs.join(` · `)}),t}},watch:{referenceLoadKey:{immediate:!0,handler(e){this.resetReferenceLoad(),e&&!this.referenceTask&&this.loadReferenceTask(e)}}},beforeUnmount(){this.resetReferenceLoad()},methods:{resetReferenceLoad(){this.referenceLoadTimer!==void 0&&window.clearTimeout(this.referenceLoadTimer),this.referenceLoadTimer=void 0,this.referenceLoadVersion+=1,this.referenceLoadAttempt=0,this.referenceLoadFailed=!1,this.fetchedReferenceTask=void 0,this.fetchedReferenceKey=void 0},async loadReferenceTask(e){if(e!==this.referenceLoadKey||this.referenceTask)return;let t=this.$store.state.maestro?.credential,n=t?.token,r=this.referenceTaskId;if(!r||!n)return;let i=t?.id||t?.user_id||n,a=this.referenceLoadVersion;this.referenceLoadAttempt+=1;let o=await Jt(r,{token:n,credentialKey:i});if(a!==this.referenceLoadVersion||e!==this.referenceLoadKey)return;if(o){this.fetchedReferenceTask=o,this.fetchedReferenceKey=e,this.referenceLoadFailed=!1;return}let s=an[this.referenceLoadAttempt-1];s===void 0?this.referenceLoadFailed=!0:this.referenceLoadTimer=window.setTimeout(()=>{this.referenceLoadTimer=void 0,this.loadReferenceTask(e)},s)},retryReferenceTask(){let e=this.referenceLoadKey;this.resetReferenceLoad(),e&&this.loadReferenceTask(e)},optionLabel(e,t){let n=`${e}.${t}`,r=this.$t(n);return r===n?t:r},fileName(e){let t=e.substring(e.lastIndexOf(`/`)+1);try{return decodeURIComponent(t)||e}catch{return t||e}},onDownload(e,t){e?.stopPropagation(),window.open(t,`_blank`)},onRemix(){if(!this.modelValue)return;let e=Ie(this.$store.state.maestro?.config,this.modelValue);this.$store.commit(`maestro/setConfig`,e),q.info(this.$t(`maestro.message.remixLoaded`))}}}),sn={class:`preview`},cn={class:`left`},ln={class:`main`},un={class:`bot`},dn={class:`datetime`},fn={class:`info`},pn={key:0,class:`flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto`},mn=[`href`,`title`],hn={key:1,class:`reference-load-failed flex items-center gap-1 mt-2 text-xs text-[var(--el-text-color-secondary)]`},gn={key:2,class:`prompt mt-2`},_n={key:0,class:`progress-pct`},vn={key:0,class:`content`},yn={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},bn={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},xn={key:1,class:`content`},Sn={class:`text-xs text-[var(--el-text-color-secondary)] mb-1`},Cn={key:0},wn={class:`operations`},Tn={key:0},En={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Dn={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},On={key:2,class:`content`},kn={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},An={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},jn={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Mn={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function Nn(t,c,d,f,p,g){let b=u(`capability-presentation`),x=u(`image-preview`),S=u(`video-preview`),C=u(`audio-preview`),w=u(`file-preview`),T=u(`info-icon`),E=u(`redo-icon`),D=u(`el-button`),O=u(`progress-steps`),k=u(`magic-icon`),A=u(`copy-to-clipboard`),j=u(`channel-icon`),M=u(`el-alert`),N=u(`language-icon`),P=u(`video-player`),F=u(`download-icon`),I=u(`api-code-button`),L=u(`time-icon`),R=u(`warning-icon`);return y(),s(`div`,sn,[e(`div`,cn,[a(b,{capability:`maestro`,part:`avatar`,class:`avatar`})]),e(`div`,ln,[e(`div`,un,[a(b,{capability:`maestro`,part:`name`}),e(`span`,dn,i(t.$dayjs.format(``+new Date(parseFloat((t.modelValue?.created_at||``).toString())*1e3))),1)]),e(`div`,fn,[t.files.length?(y(),s(`div`,pn,[(y(!0),s(l,null,_(t.files,(e,t)=>(y(),s(l,{key:t},[e.kind===`image`?(y(),m(x,{key:0,url:e.url,name:e.name,closable:!1},null,8,[`url`,`name`])):e.kind===`video`?(y(),m(S,{key:1,url:e.url,name:e.name},null,8,[`url`,`name`])):e.kind===`audio`?(y(),m(C,{key:2,url:e.url,name:e.name},null,8,[`url`,`name`])):(y(),s(`a`,{key:3,href:e.url,title:e.name,target:`_blank`,rel:`noopener noreferrer`,class:`shrink-0 no-underline`},[a(w,{name:e.name,closable:!1},null,8,[`name`])],8,mn))],64))),128))])):o(``,!0),t.referenceLoadFailed&&t.referenceTaskId&&!t.referenceTask?(y(),s(`div`,hn,[a(T,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,i(t.$t(`maestro.name.files`))+`: `+i(t.$t(`maestro.name.failure`)),1),a(D,{class:`reference-retry`,size:`small`,text:``,circle:``,title:t.$t(`codingBridge.session.retry`),"aria-label":t.$t(`codingBridge.session.retry`),onClick:t.retryReferenceTask},{default:h(()=>[a(E,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`title`,`aria-label`,`onClick`])])):o(``,!0),t.modelValue?.request?.prompt?(y(),s(`p`,gn,[r(i(t.modelValue?.request?.prompt)+` `,1),t.isTerminal?o(``,!0):(y(),s(`span`,_n,` · `+i(t.progressText),1))])):o(``,!0)]),t.isTerminal?o(``,!0):(y(),s(`div`,vn,[a(M,{closable:!1,class:`mt-2 processing`},{default:h(()=>[a(O,{"model-value":t.modelValue},null,8,[`model-value`]),(y(!0),s(l,null,_(t.requestParams,(e,t)=>(y(),s(`p`,{key:`param-${t}`,class:n([`text-[var(--el-text-color-regular)] text-xs mb-2`,{"mt-3":t===0}])},[(y(),m(v(e.icon),{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),r(` `+i(e.label)+`: `+i(e.value),1)],2))),128)),e(`p`,yn,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.taskId`))+`: `+i(t.modelValue?.id)+` `,1),a(A,{content:t.modelValue?.id},null,8,[`content`])]),t.traceId?(y(),s(`p`,bn,[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.traceId`))+`: `+i(t.traceId)+` `,1),a(A,{content:t.traceId},null,8,[`content`])])):o(``,!0)]),_:1})])),t.modelValue?.response?.success===!0&&t.variants.length?(y(),s(`div`,xn,[(y(!0),s(l,null,_(t.variants,(t,n)=>(y(),s(`div`,{key:n,class:`mb-4`},[e(`p`,Sn,[a(N,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(i(t.lang),1),t.title?(y(),s(`span`,Cn,` · `+i(t.title),1)):o(``,!0)]),t.output_url?(y(),m(P,{key:0,src:t.output_url},null,8,[`src`])):o(``,!0)]))),128)),e(`div`,wn,[(y(!0),s(l,null,_(t.variants,(e,n)=>(y(),s(l,{key:n},[e.output_url?(y(),m(D,{key:0,type:`info`,size:`small`,class:`btn-action`,onClick:n=>t.onDownload(n,e.output_url)},{default:h(()=>[a(F,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.button.download`)),1),t.variants.length>1?(y(),s(`span`,Tn,` · `+i(e.lang),1)):o(``,!0)]),_:2},1032,[`onClick`])):o(``,!0)],64))),128)),a(D,{size:`small`,type:`primary`,class:`btn-action`,onClick:t.onRemix},{default:h(()=>[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.button.remix`)),1)]),_:1},8,[`onClick`]),a(I,{path:`/maestro/videos`,body:t.modelValue?.request},null,8,[`body`])]),a(M,{closable:!1,class:`mt-2 success`},{default:h(()=>[(y(!0),s(l,null,_(t.requestParams,(e,t)=>(y(),s(`p`,{key:`param-${t}`,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},[(y(),m(v(e.icon),{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),r(` `+i(e.label)+`: `+i(e.value),1)]))),128)),e(`p`,En,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.taskId`))+`: `+i(t.modelValue?.id)+` `,1),a(A,{content:t.modelValue?.id},null,8,[`content`])]),t.modelValue?.elapsed?(y(),s(`p`,$,[a(L,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.elapsed`))+`: `+i(t.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),t.traceId?(y(),s(`p`,Dn,[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.traceId`))+`: `+i(t.traceId)+` `,1),a(A,{content:t.traceId},null,8,[`content`])])):o(``,!0)]),_:1})])):o(``,!0),t.modelValue?.response?.success===!1?(y(),s(`div`,On,[a(M,{closable:!1,class:`failure`},{template:h(()=>[a(R,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.failure`)),1)]),default:h(()=>[(y(!0),s(l,null,_(t.requestParams,(e,t)=>(y(),s(`p`,{key:`param-${t}`,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},[(y(),m(v(e.icon),{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),r(` `+i(e.label)+`: `+i(e.value),1)]))),128)),e(`p`,kn,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.taskId`))+`: `+i(t.modelValue?.id)+` `,1),a(A,{content:t.modelValue?.id},null,8,[`content`])]),t.failureReason?(y(),s(`p`,An,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.failureReason`))+`: `+i(t.failureReason),1)])):o(``,!0),t.modelValue?.elapsed?(y(),s(`p`,jn,[a(L,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.elapsed`))+`: `+i(t.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),t.traceId?(y(),s(`p`,Mn,[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.traceId`))+`: `+i(t.traceId)+` `,1),a(A,{content:t.traceId},null,8,[`content`])])):o(``,!0)]),_:1})])):o(``,!0)])])}var Pn=x({name:`RecentPanel`,components:{TaskPreview:U(on,[[`render`,Nn],[`__scopeId`,`data-v-aecd9f66`]]),NoTasks:Oe,BotPlaceholder:Me,ScrollList:De},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],computed:{tasks(){return{...this.$store.state.maestro?.tasks,items:this.$store.state.maestro?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Fn={key:0},In={key:2,class:`w-full h-full flex items-center justify-center`};function Ln(e,t,n,r,i,c){let d=u(`bot-placeholder`),f=u(`task-preview`),p=u(`scroll-list`),g=u(`no-tasks`);return y(),s(l,null,[e.tasks?.items===void 0?(y(),s(`div`,Fn,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(y(),m(p,{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:h(()=>[(y(!0),s(l,null,_(e.tasks?.items,(e,t)=>(y(),m(f,{key:t,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(y(),s(`div`,In,[a(g)])):o(``,!0)],64)}var Rn=x({name:`MaestroIndex`,components:{ConfigPanel:Wt,Layout:Ge,RecentPanel:U(Pn,[[`render`,Ln]])},inject:[`initialized`],data(){return{job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.maestro?.status?.getApplications===G.Request},tasksLoading(){return this.$store.state.maestro?.status?.getTasks===G.Request||this.fetchingTasks},credential(){return this.$store.state.maestro.credential},config(){return this.$store.state.maestro.config},tasks(){return this.$store.state.maestro.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 ke({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(){await this.$store.dispatch(`maestro/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(`maestro/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){let e=ze(this.config);if(!ye())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}q.info(this.$t(`maestro.message.startingTask`)),be(`maestro`,H.generate(e,{token:t})).then(()=>{q.success(this.$t(`maestro.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?q.error(this.$t(`maestro.message.usedUp`)):q.error(this.$t(`maestro.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function zn(e,t,n,r,i,o){let s=u(`config-panel`),c=u(`recent-panel`),l=u(`layout`);return y(),m(l,null,{config:h(()=>[a(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:h(()=>[a(c,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var Bn=U(Rn,[[`render`,zn]]);export{Bn as default};
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,S as c,T as l,at as u,bt as d,ht as f,it as p,j as m,mt as h,qt as g,rt as _,st as v,tt as y,x as b,z as x}from"./vendor-chart-Dw-P17PN.js";import{W as S}from"./use-deprecated-r4dlLNqm.js";import{r as C,t as w}from"./select-DW3H8Cyb.js";import{t as T}from"./upload-zeb95gHP.js";import{t as E}from"./alert-DDomaAor.js";import{t as D}from"./drawer-D3Ieb275.js";import{t as O}from"./input-number-BNYhheHb.js";import{t as k}from"./switch-soiMVhrL.js";import{n as A}from"./taskDrawerMixin-CFzLna7k.js";import{t as j}from"./check-H4hrhXzi.js";import{t as M}from"./clock-B2aR5D-m.js";import{t as N}from"./download-DKwe5970.js";import{t as P}from"./gauge-BzYDsP_L.js";import{n as F,r as I,t as L}from"./PromptTextarea-SlwbqpPN.js";import{t as R}from"./info-Bx0W99ua.js";import{t as z}from"./languages-BzCnELaD.js";import{t as ee}from"./loader-circle-zBaix28P.js";import{t as te}from"./palette-BtbLIsCu.js";import{t as ne}from"./paperclip-B2sf3oRH.js";import{t as re}from"./pause-DlR5Figp.js";import{t as ie}from"./play-BiSrmze1.js";import{t as ae}from"./rotate-cw-sLGyQULY.js";import{t as oe}from"./triangle-alert-Bm11tXxr.js";import{t as se}from"./video-BRA4fel-.js";import{t as B}from"./wand-sparkles-Bfkh-7H0.js";import{Ar as ce,Er as le,Lr as ue,Mr as de,Or as fe,Pr as pe,Ur as me,Vr as he,jr as V,kr as ge,zr as _e}from"./constants-P5wTiWzI.js";import{Bn as H,E as U,Mi as W,ai as ve,en as ye,gr as be,ni as G,nn as xe,on as K,rn as Se,vi as q}from"./index-DN3R8m7E.js";import{t as Ce}from"./CopyToClipboard-CkXS44Md.js";import{t as we}from"./FilePreview-C5HB6QTD.js";import{t as Te}from"./ImagePreview-CkB7m_mh.js";import{a as Ee,n as De,r as Oe,t as ke}from"./pagination-C4WgQYO7.js";import{t as Ae}from"./VideoPlayer-LQjA3Xp9.js";import{t as je}from"./ApiCodeButton-m9CgZRja.js";import{t as Me}from"./BotPlaceholder-c1cNbMr3.js";import{n as Ne,t as Pe}from"./AudioPreview-ByhxL36r.js";import{a as J,i as Fe,n as Ie,o as Le,s as Re,t as ze}from"./maestro-C4KUqcGJ.js";var Be=x({name:`LayoutMaestro`,components:{MagicIcon:B,ElDrawer:D,ElButton:W},mixins:[A]}),Ve={class:`main flex flex-row flex-1`},He={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)]`},Ue={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function We(t,n,r,i,o,c){let l=u(`magic-icon`),d=u(`el-button`),m=u(`el-drawer`);return y(),s(`div`,Ve,[e(`div`,He,[p(t.$slots,`config`,{},void 0,!0)]),e(`div`,Ue,[p(t.$slots,`result`,{},void 0,!0)]),f(a(d,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:h(()=>[a(l,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[b,!t.tasksEmpty]]),a(m,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`generator-drawer`},{default:h(()=>[p(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var Ge=U(Be,[[`render`,We],[`__scopeId`,`data-v-808f6ae5`]]),Ke=x({name:`MaestroFileUrlsInput`,components:{AttachmentIcon:ne,ElUpload:T,ElButton:W},data(){return{fileList:[],uploadUrl:ve()+`/api/v1/files/`,MAESTRO_FILE_ACCEPT:_e,MAESTRO_FILE_LIMIT:6}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},value(){return this.$store.state.maestro?.config?.file_urls||[]}},watch:{value:{immediate:!0,handler(e){let t=new Map(this.fileList.map(e=>[e?.response?.file_url||e.url,e])),n=e.map(e=>t.get(e)||{name:e.split(`/`).pop()||e,url:e,status:`success`,percentage:100,response:{file_url:e}}),r=this.fileList.filter(e=>!(e?.response?.file_url||e.url));this.fileList=[...n,...r]}}},methods:{onExceed(){q.warning(this.$t(`maestro.message.uploadExceed`))},onError(){q.error(this.$t(`maestro.message.uploadError`))},onChange(){let e=this.fileList.map(e=>e?.response?.file_url||e.url).filter(e=>!!e);this.$store.commit(`maestro/setConfig`,{...this.$store.state.maestro?.config,file_urls:e})}}});function qe(e,t,n,o,c,l){let d=u(`attachment-icon`),f=u(`el-button`),p=u(`el-upload`);return y(),s(`div`,null,[a(p,{ref:`uploader`,"file-list":e.fileList,"onUpdate:fileList":t[0]||=t=>e.fileList=t,accept:e.MAESTRO_FILE_ACCEPT,name:`file`,class:`w-full`,limit:e.MAESTRO_FILE_LIMIT,multiple:!0,action:e.uploadUrl,headers:e.headers,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onChange,"on-remove":e.onChange},{default:h(()=>[a(f,{size:`small`,round:``},{default:h(()=>[a(d,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(e.$t(`maestro.button.uploadFiles`)),1)]),_:1})]),_:1},8,[`file-list`,`accept`,`limit`,`action`,`headers`,`on-exceed`,`on-error`,`on-success`,`on-remove`])])}var Je=U(Ke,[[`render`,qe]]),Ye={"9:16":{width:15,height:26},"16:9":{width:26,height:15},"1:1":{width:20,height:20}},Xe=x({name:`ConfigPanel`,components:{MagicIcon:B,ElButton:W,ElSelect:C,ElOption:w,ElInputNumber:O,ElAlert:E,ElSwitch:k,InfoIcon:Ee,PauseIcon:re,PlayIcon:ie,PromptTextarea:L,FileUrlsInput:Je},emits:[`generate`],data(){return{MAESTRO_MIN_DURATION:1,MAESTRO_MAX_DURATION:600,MAESTRO_ALLOWED_QUALITIES:fe,MAESTRO_ALLOWED_SCENARIOS:ge,MAESTRO_SCENARIO_THUMBNAILS:he,MAESTRO_ALLOWED_STYLES:ce,MAESTRO_ALLOWED_VOICES:V,playing:!1,audioEl:null}},computed:{config(){return this.$store.state.maestro?.config},service(){return this.$store.state.maestro?.service},ratioOptions(){return le.map(e=>({value:e,...Ye[e]??{width:20,height:20}}))},isRemixing(){let e=this.config?.action;return!!e&&e!==`generate`&&!!this.config?.ref_task_id},refTaskId(){return this.config?.ref_task_id},needsVideoUpload(){if(!this.scenarioCustomizationEnabled)return!1;let e=this.config?.scenario;return!e||!me.includes(e)?!1:!(this.config?.file_urls||[]).some(e=>K(e))},canGenerate(){return!!this.prompt?.trim()&&!this.needsVideoUpload},prompt:{get(){return this.config?.prompt},set(e){this.update({prompt:e})}},langs:{get(){return J(this.config?.langs)},set(e){this.update({langs:J(e)})}},languageOptions(){return Fe(this.$i18n.locale)},additionalLanguageOptions(){return this.languageOptions.filter(e=>e.value!==this.primaryLanguage)},primaryLanguage:{get(){return this.langs[0]||pe[0]},set(e){this.update({langs:Re(this.langs,e)})}},additionalLanguages:{get(){return this.langs.slice(1)},set(e){this.update({langs:Le(this.langs,e)})}},aspect:{get(){return this.config?.aspect},set(e){this.update({aspect:e})}},duration:{get(){return this.config?.duration},set(e){let t=Math.min(600,Math.max(1,Math.round(typeof e==`number`&&!Number.isNaN(e)?e:30)));this.update({duration:t})}},quality:{get(){return this.config?.quality},set(e){this.update({quality:e})}},scenarioCustomizationEnabled:{get(){return this.config?.scenario_customization_enabled??!1},set(e){this.update({scenario_customization_enabled:e})}},styleCustomizationEnabled:{get(){return this.config?.style_customization_enabled??!1},set(e){this.update({style_customization_enabled:e})}},voiceCustomizationEnabled:{get(){return this.config?.voice_customization_enabled??!1},set(e){e||this.stopSample(),this.update({voice_customization_enabled:e})}},scenario:{get(){return this.config?.scenario},set(e){this.update({scenario:e})}},style:{get(){return this.config?.style},set(e){let t=e?.trim();this.update({style:!t||t.toLowerCase()===`auto`?ue:t})}},voice:{get(){return this.config?.voice},set(e){this.stopSample(),this.update({voice:e||`warm-female`})}},currentSample(){return V.find(e=>e.key===this.voice)?.sample}},watch:{voiceCustomizationEnabled(e){e||this.stopSample()},voice(){this.stopSample()}},mounted(){this.update({action:this.config?.action??`generate`,langs:J(this.config?.langs),aspect:this.config?.aspect??`9:16`,duration:this.config?.duration??30,quality:this.config?.quality??`standard`})},beforeUnmount(){this.stopSample()},methods:{update(e){this.$store.commit(`maestro/setConfig`,{...this.config,...e})},onClearRemix(){this.update({action:de,ref_task_id:void 0})},onToggleSample(){let e=this.currentSample;if(e){if(this.audioEl||(this.audioEl=d(new Audio),this.audioEl.addEventListener(`ended`,()=>{this.playing=!1})),this.playing){this.audioEl.pause(),this.playing=!1;return}this.audioEl.src!==e&&(this.audioEl.src=e),this.audioEl.currentTime=0,this.audioEl.play().then(()=>{this.playing=!0}).catch(()=>{this.playing=!1})}},stopSample(){this.audioEl&&(this.audioEl.pause(),this.audioEl.currentTime=0),this.playing=!1},onGenerate(){this.$emit(`generate`)}}}),Ze={class:`flex flex-col h-full`},Qe={class:`flex-1 overflow-y-auto p-5`},$e={class:`text-xs mb-1`},et={class:`field-block mb-5`},tt={class:`field-head`},nt={class:`field-title font-bold`},rt={class:`field-block mb-5`},it={class:`field-head`},at={class:`field-title font-bold`},ot={class:`language-picker`},st={class:`language-role language-role--primary`},ct={class:`language-role-label`},lt={class:`language-role`},ut={class:`language-role-label`},dt={class:`field-block mb-5`},ft={class:`field-head`},pt={class:`field-title font-bold`},mt=[`aria-label`],ht=[`aria-checked`,`aria-label`,`onClick`,`onKeydown`],gt={class:`ratio-preview`},_t={class:`ratio-name`},vt={class:`field-row mb-4`},yt={class:`field-head`},bt={class:`field-title font-bold`},xt={class:`field-row`},St={class:`field-head`},Ct={class:`field-title font-bold`},wt={class:`custom-field`},Tt={class:`custom-field-header mb-2`},Et={class:`field-head`},Dt={class:`field-title font-bold`},Ot=[`aria-label`,`aria-disabled`],kt=[`aria-checked`,`aria-disabled`,`aria-label`,`tabindex`,`onClick`,`onKeydown`],At={class:`scenario-thumb`},jt=[`src`,`alt`],Mt={class:`scenario-name`},Nt={class:`custom-field`},Pt={class:`custom-field-header mb-2`},Ft={class:`field-head`},It={class:`field-title font-bold`},Lt={class:`custom-field`},Rt={class:`custom-field-header mb-2`},zt={class:`field-head`},Bt={class:`field-title font-bold`},Vt={class:`voice-row`},Ht={class:`flex flex-col items-center justify-center px-5 pb-5`};function Ut(d,f,p,v,b,x){let S=u(`magic-icon`),C=u(`el-button`),w=u(`el-alert`),T=u(`prompt-textarea`),E=u(`info-icon`),D=u(`file-urls-input`),O=u(`el-option`),k=u(`el-select`),A=u(`el-input-number`),j=u(`el-switch`),M=u(`pause-icon`),N=u(`play-icon`);return y(),s(`div`,Ze,[e(`div`,Qe,[d.isRemixing?(y(),m(w,{key:0,closable:!1,type:`info`,class:`mb-5`},{default:h(()=>[e(`p`,$e,[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`maestro.name.remixing`))+`: `+i(d.refTaskId),1)]),a(C,{size:`small`,text:``,onClick:d.onClearRemix},{default:h(()=>[r(i(d.$t(`maestro.button.cancelRemix`)),1)]),_:1},8,[`onClick`])]),_:1})):o(``,!0),a(T,{modelValue:d.prompt,"onUpdate:modelValue":f[0]||=e=>d.prompt=e,class:`mb-5`,title:d.$t(`maestro.name.prompt`),info:d.$t(`maestro.description.prompt`),placeholder:d.$t(`maestro.placeholder.prompt`),"min-rows":6},null,8,[`modelValue`,`title`,`info`,`placeholder`]),e(`div`,et,[e(`div`,tt,[e(`h2`,nt,i(d.$t(`maestro.name.files`)),1),a(E,{content:d.$t(`maestro.description.files`),class:`ml-1`},null,8,[`content`])]),a(D)]),e(`div`,rt,[e(`div`,it,[e(`h2`,at,i(d.$t(`maestro.name.langs`)),1),a(E,{content:d.$t(`maestro.description.langs`),class:`ml-1`},null,8,[`content`])]),e(`div`,ot,[e(`label`,st,[e(`span`,ct,i(d.$t(`maestro.name.primaryLanguage`)),1),a(k,{modelValue:d.primaryLanguage,"onUpdate:modelValue":f[1]||=e=>d.primaryLanguage=e,class:`w-full`},{default:h(()=>[(y(!0),s(l,null,_(d.languageOptions,e=>(y(),m(O,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),e(`label`,lt,[e(`span`,ut,i(d.$t(`maestro.name.additionalLanguages`)),1),a(k,{modelValue:d.additionalLanguages,"onUpdate:modelValue":f[2]||=e=>d.additionalLanguages=e,multiple:``,"collapse-tags":``,"collapse-tags-tooltip":``,placeholder:d.$t(`maestro.placeholder.additionalLanguages`),class:`w-full`},{default:h(()=>[(y(!0),s(l,null,_(d.additionalLanguageOptions,e=>(y(),m(O,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])])]),e(`div`,dt,[e(`div`,ft,[e(`h2`,pt,i(d.$t(`maestro.name.aspect`)),1)]),e(`div`,{class:`ratio-items`,role:`radiogroup`,"aria-label":d.$t(`maestro.name.aspect`)},[(y(!0),s(l,null,_(d.ratioOptions,r=>(y(),s(`div`,{key:r.value,class:n([`ratio-item`,{active:d.aspect===r.value}]),role:`radio`,"aria-checked":d.aspect===r.value,"aria-label":r.value,tabindex:`0`,onClick:e=>d.aspect=r.value,onKeydown:[c(t(e=>d.aspect=r.value,[`prevent`]),[`enter`]),c(t(e=>d.aspect=r.value,[`prevent`]),[`space`])]},[e(`div`,gt,[e(`div`,{class:`ratio-rect`,style:g({width:r.width+`px`,height:r.height+`px`})},null,4)]),e(`p`,_t,i(r.value),1)],42,ht))),128))],8,mt)]),e(`div`,vt,[e(`div`,yt,[e(`h2`,bt,i(d.$t(`maestro.name.duration`)),1),a(E,{content:d.$t(`maestro.description.duration`),class:`ml-1`},null,8,[`content`])]),a(A,{modelValue:d.duration,"onUpdate:modelValue":f[3]||=e=>d.duration=e,class:`field-control`,min:d.MAESTRO_MIN_DURATION,max:d.MAESTRO_MAX_DURATION,step:5,"controls-position":`right`},null,8,[`modelValue`,`min`,`max`])]),e(`div`,xt,[e(`div`,St,[e(`h2`,Ct,i(d.$t(`maestro.name.quality`)),1),a(E,{content:d.$t(`maestro.description.quality`),class:`ml-1`},null,8,[`content`])]),a(k,{modelValue:d.quality,"onUpdate:modelValue":f[4]||=e=>d.quality=e,class:`field-control`},{default:h(()=>[(y(!0),s(l,null,_(d.MAESTRO_ALLOWED_QUALITIES,e=>(y(),m(O,{key:e,label:d.$t(`maestro.option.quality.${e}`),value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),e(`div`,wt,[e(`div`,Tt,[e(`div`,Et,[e(`h2`,Dt,i(d.$t(`maestro.name.customizeScenario`)),1),a(E,{content:d.$t(`maestro.description.scenario`),class:`ml-1`},null,8,[`content`])]),a(j,{modelValue:d.scenarioCustomizationEnabled,"onUpdate:modelValue":f[5]||=e=>d.scenarioCustomizationEnabled=e,"aria-label":d.$t(`maestro.name.customizeScenario`)},null,8,[`modelValue`,`aria-label`])]),e(`div`,{class:n([`scenario-cards`,{"is-disabled":!d.scenarioCustomizationEnabled}]),role:`radiogroup`,"aria-label":d.$t(`maestro.name.scenario`),"aria-disabled":!d.scenarioCustomizationEnabled},[(y(!0),s(l,null,_(d.MAESTRO_ALLOWED_SCENARIOS,r=>(y(),s(`div`,{key:r,class:n([`scenario-card`,{active:d.scenarioCustomizationEnabled&&d.scenario===r,disabled:!d.scenarioCustomizationEnabled}]),role:`radio`,"aria-checked":d.scenarioCustomizationEnabled&&d.scenario===r,"aria-disabled":!d.scenarioCustomizationEnabled,"aria-label":d.$t(`maestro.option.scenario.${r}`),tabindex:d.scenarioCustomizationEnabled?0:-1,onClick:e=>d.scenarioCustomizationEnabled&&(d.scenario=r),onKeydown:[c(t(e=>d.scenarioCustomizationEnabled&&(d.scenario=r),[`prevent`]),[`enter`]),c(t(e=>d.scenarioCustomizationEnabled&&(d.scenario=r),[`prevent`]),[`space`])]},[e(`div`,At,[e(`img`,{src:d.MAESTRO_SCENARIO_THUMBNAILS[r],alt:d.$t(`maestro.option.scenario.${r}`),loading:`lazy`},null,8,jt)]),e(`p`,Mt,i(d.$t(`maestro.option.scenario.${r}`)),1)],42,kt))),128))],10,Ot),d.needsVideoUpload?(y(),m(w,{key:0,title:d.$t(`maestro.message.captionsNeedVideo`),type:`warning`,closable:!1,"show-icon":``,class:`mt-2`},null,8,[`title`])):o(``,!0)]),e(`div`,Nt,[e(`div`,Pt,[e(`div`,Ft,[e(`h2`,It,i(d.$t(`maestro.name.customizeStyle`)),1),a(E,{content:d.$t(`maestro.description.style`),class:`ml-1`},null,8,[`content`])]),a(j,{modelValue:d.styleCustomizationEnabled,"onUpdate:modelValue":f[6]||=e=>d.styleCustomizationEnabled=e,"aria-label":d.$t(`maestro.name.customizeStyle`)},null,8,[`modelValue`,`aria-label`])]),a(k,{modelValue:d.style,"onUpdate:modelValue":f[7]||=e=>d.style=e,class:`w-full`,filterable:``,"allow-create":``,"default-first-option":``,disabled:!d.styleCustomizationEnabled,"aria-label":d.$t(`maestro.name.customizeStyle`),placeholder:d.$t(`maestro.placeholder.select`)},{default:h(()=>[(y(!0),s(l,null,_(d.MAESTRO_ALLOWED_STYLES,e=>(y(),m(O,{key:e,label:d.$t(`maestro.option.style.${e}`),value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`,`aria-label`,`placeholder`])]),e(`div`,Lt,[e(`div`,Rt,[e(`div`,zt,[e(`h2`,Bt,i(d.$t(`maestro.name.customizeVoice`)),1),a(E,{content:d.$t(`maestro.description.voice`),class:`ml-1`},null,8,[`content`])]),a(j,{modelValue:d.voiceCustomizationEnabled,"onUpdate:modelValue":f[8]||=e=>d.voiceCustomizationEnabled=e,"aria-label":d.$t(`maestro.name.customizeVoice`)},null,8,[`modelValue`,`aria-label`])]),e(`div`,Vt,[a(k,{modelValue:d.voice,"onUpdate:modelValue":f[9]||=e=>d.voice=e,class:`voice-select`,disabled:!d.voiceCustomizationEnabled,"aria-label":d.$t(`maestro.name.customizeVoice`),placeholder:d.$t(`maestro.placeholder.select`)},{default:h(()=>[(y(!0),s(l,null,_(d.MAESTRO_ALLOWED_VOICES,e=>(y(),m(O,{key:e.key,label:d.$t(`maestro.option.voice.${e.key}`),value:e.key},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`,`aria-label`,`placeholder`]),a(C,{class:`voice-play`,disabled:!d.voiceCustomizationEnabled||!d.currentSample,title:d.$t(`maestro.button.preview`),"aria-label":d.$t(`maestro.button.preview`),onClick:d.onToggleSample},{default:h(()=>[d.playing?(y(),m(M,{key:0,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(y(),m(N,{key:1,size:`1em`,"aria-hidden":`true`,focusable:`false`}))]),_:1},8,[`disabled`,`title`,`aria-label`,`onClick`])])])]),e(`div`,Ht,[a(C,{type:`primary`,class:`btn w-full`,round:``,disabled:!d.canGenerate,onClick:d.onGenerate},{default:h(()=>[a(S,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`maestro.button.generate`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var Wt=U(Xe,[[`render`,Ut],[`__scopeId`,`data-v-a4840734`]]),Gt=50,Kt=1e4,Y=new Map,X=new Map,qt=(e,t)=>{if(Y.set(e,t),Y.size>Gt){let e=Y.keys().next().value;e&&Y.delete(e)}};async function Jt(e,t){let n=`${t.credentialKey}:${e}`,r=Y.get(n);if(r)return r;let i=X.get(n);if(i)return i.promise;let a=new AbortController,o,s={controller:a,promise:void 0},c=H.task(e,{token:t.token,signal:a.signal}).then(({data:e})=>{if(!a.signal.aborted)return qt(n,e),e}).catch(t=>{a.signal.aborted||console.warn(`failed to load maestro remix reference task`,e,t)}),l=new Promise(e=>{o=window.setTimeout(()=>{a.abort(),e(void 0)},Kt)});return s.promise=Promise.race([c,l]).finally(()=>{o!==void 0&&window.clearTimeout(o),X.get(n)===s&&X.delete(n)}),X.set(n,s),s.promise}var Z=[`plan`,`source`,`voice`,`compose`,`render`,`deliver`];function Q(e){if(!e)return-1;let t=e.toLowerCase(),n=Z.indexOf(t);return n>=0?n:/plan|storyboard|script|brief/.test(t)?0:/source|search|image|photo|asset|media/.test(t)?1:/voice|tts|audio|narrat/.test(t)?2:/compose|composit|build|layout|scene/.test(t)?3:/render|encode/.test(t)?4:/deliver|upload|cdn|complete|done|finish/.test(t)?5:-1}var Yt=x({name:`ProgressSteps`,components:{ElIcon:S,Loading:ee,Check:j},props:{modelValue:{type:Object,required:!0}},computed:{currentIndex(){let e=this.modelValue?.response?.data?.progress||[],t=-1;for(let n of e)t=Math.max(t,Q(n?.stage));return t=Math.max(t,Q(this.modelValue?.response?.data?.stage)),Math.max(t,0)},detail(){let e=this.modelValue?.response?.data;if(e?.activity)return e.activity;let t=e?.progress||[];for(let e=t.length-1;e>=0;e--)if(t[e]?.message)return t[e]?.message},steps(){return Z.map(e=>({key:e}))}},methods:{stateOf(e){let t=this.currentIndex;return e<t?`done`:e===t?`active`:`pending`}}}),Xt={class:`progress-steps`,"aria-live":`polite`},Zt=[`aria-current`],Qt={class:`ico`},$t={class:`txt`},en={key:0,class:`detail`};function tn(t,r,c,d,f,p){let g=u(`loading`),v=u(`el-icon`),b=u(`check`);return y(),s(`div`,Xt,[(y(!0),s(l,null,_(t.steps,(r,c)=>(y(),s(`div`,{key:r.key,class:n([`step`,t.stateOf(c)]),"aria-current":c===t.currentIndex?`step`:void 0},[e(`span`,Qt,[c===t.currentIndex?(y(),m(v,{key:0,class:`is-loading`,"aria-label":t.$t(`maestro.step.${r.key}`)},{default:h(()=>[a(g,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`])):c<t.currentIndex?(y(),m(v,{key:1},{default:h(()=>[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1})):o(``,!0)]),e(`span`,$t,i(t.$t(`maestro.step.${r.key}`)),1)],10,Zt))),128)),t.detail?(y(),s(`p`,en,i(t.detail),1)):o(``,!0)])}var nn=U(Yt,[[`render`,tn],[`__scopeId`,`data-v-8a883977`]]),rn=[`succeeded`,`failed`],an=[1e3,3e3],on=x({name:`TaskPreview`,components:{ChannelIcon:I,DownloadIcon:N,InfoIcon:R,LanguageIcon:z,MagicIcon:B,RedoIcon:ae,TimeIcon:M,WarningIcon:oe,CopyToClipboard:Ce,ElAlert:E,VideoPlayer:Ae,ElButton:W,ApiCodeButton:je,ImagePreview:Te,AudioPreview:Pe,VideoPreview:Ne,FilePreview:we,ProgressSteps:nn},props:{modelValue:{type:Object,required:!0}},data(){return{fetchedReferenceTask:void 0,fetchedReferenceKey:void 0,referenceLoadAttempt:0,referenceLoadFailed:!1,referenceLoadTimer:void 0,referenceLoadVersion:0}},computed:{variants(){return this.modelValue?.response?.data?.variants||[]},files(){let e=[...this.modelValue?.request?.file_urls||[]];if(this.referenceTaskId)for(let t of this.referenceTask?.response?.data?.variants||[])t.output_url&&e.push(t.output_url);return[...new Set(e)].filter(e=>!!e).map(e=>{let t=e.split(`?`)[0].split(`#`)[0],n=Se(t)?`image`:K(t)?`video`:xe(t)?`audio`:`file`;return{url:e,name:this.fileName(t),kind:n}})},referenceTaskId(){let e=this.modelValue?.request;return e?.action===`remix`?e?.ref_task_id:void 0},referenceLoadKey(){let e=this.$store.state.maestro?.credential,t=e?.token;if(!(!this.referenceTaskId||!t))return JSON.stringify([this.referenceTaskId,e?.id||e?.user_id||t,t])},referenceTask(){if(this.referenceTaskId)return this.$store.state.maestro?.tasks?.items?.find(e=>e.id===this.referenceTaskId)||(this.fetchedReferenceKey===this.referenceLoadKey?this.fetchedReferenceTask:void 0)},isTerminal(){return rn.includes(this.modelValue?.status||``)},traceId(){return this.modelValue?.trace_id||this.modelValue?.response?.trace_id},progressPct(){let e=this.modelValue?.response?.data?.progress,t=e?.length?e[e.length-1]:void 0;return typeof t?.pct==`number`?t.pct:void 0},progressText(){return this.progressPct===void 0?this.statusLabel:`${this.progressPct}%`},statusLabel(){let e=`maestro.status.${this.modelValue?.status||`pending`}`,t=this.$t(e);return t===e?this.$t(`maestro.status.processing`):t},failureReason(){let e=this.modelValue?.response?.error;if(e)return typeof e==`string`?e:e?.message},requestParams(){let e=this.modelValue?.request;if(!e)return[];let t=[];return e.action&&t.push({icon:d(B),label:this.$t(`maestro.name.mode`),value:this.optionLabel(`maestro.option.action`,e.action)}),e.scenario&&t.push({icon:d(se),label:this.$t(`maestro.name.scenario`),value:this.optionLabel(`maestro.option.scenario`,e.scenario)}),e.style&&t.push({icon:d(te),label:this.$t(`maestro.name.style`),value:this.optionLabel(`maestro.option.style`,e.style)}),e.quality&&t.push({icon:d(P),label:this.$t(`maestro.name.quality`),value:this.optionLabel(`maestro.option.quality`,e.quality)}),e.aspect&&t.push({icon:d(F),label:this.$t(`maestro.name.aspect`),value:e.aspect}),e.duration&&t.push({icon:d(M),label:this.$t(`maestro.name.duration`),value:`${e.duration}s`}),e.langs?.length&&t.push({icon:d(z),label:this.$t(`maestro.name.langs`),value:e.langs.join(` · `)}),t}},watch:{referenceLoadKey:{immediate:!0,handler(e){this.resetReferenceLoad(),e&&!this.referenceTask&&this.loadReferenceTask(e)}}},beforeUnmount(){this.resetReferenceLoad()},methods:{resetReferenceLoad(){this.referenceLoadTimer!==void 0&&window.clearTimeout(this.referenceLoadTimer),this.referenceLoadTimer=void 0,this.referenceLoadVersion+=1,this.referenceLoadAttempt=0,this.referenceLoadFailed=!1,this.fetchedReferenceTask=void 0,this.fetchedReferenceKey=void 0},async loadReferenceTask(e){if(e!==this.referenceLoadKey||this.referenceTask)return;let t=this.$store.state.maestro?.credential,n=t?.token,r=this.referenceTaskId;if(!r||!n)return;let i=t?.id||t?.user_id||n,a=this.referenceLoadVersion;this.referenceLoadAttempt+=1;let o=await Jt(r,{token:n,credentialKey:i});if(a!==this.referenceLoadVersion||e!==this.referenceLoadKey)return;if(o){this.fetchedReferenceTask=o,this.fetchedReferenceKey=e,this.referenceLoadFailed=!1;return}let s=an[this.referenceLoadAttempt-1];s===void 0?this.referenceLoadFailed=!0:this.referenceLoadTimer=window.setTimeout(()=>{this.referenceLoadTimer=void 0,this.loadReferenceTask(e)},s)},retryReferenceTask(){let e=this.referenceLoadKey;this.resetReferenceLoad(),e&&this.loadReferenceTask(e)},optionLabel(e,t){let n=`${e}.${t}`,r=this.$t(n);return r===n?t:r},fileName(e){let t=e.substring(e.lastIndexOf(`/`)+1);try{return decodeURIComponent(t)||e}catch{return t||e}},onDownload(e,t){e?.stopPropagation(),window.open(t,`_blank`)},onRemix(){if(!this.modelValue)return;let e=Ie(this.$store.state.maestro?.config,this.modelValue);this.$store.commit(`maestro/setConfig`,e),q.info(this.$t(`maestro.message.remixLoaded`))}}}),sn={class:`preview`},cn={class:`left`},ln={class:`main`},un={class:`bot`},dn={class:`datetime`},fn={class:`info`},pn={key:0,class:`flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto`},mn=[`href`,`title`],hn={key:1,class:`reference-load-failed flex items-center gap-1 mt-2 text-xs text-[var(--el-text-color-secondary)]`},gn={key:2,class:`prompt mt-2`},_n={key:0,class:`progress-pct`},vn={key:0,class:`content`},yn={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},bn={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},xn={key:1,class:`content`},Sn={class:`text-xs text-[var(--el-text-color-secondary)] mb-1`},Cn={key:0},wn={class:`operations`},Tn={key:0},En={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Dn={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},On={key:2,class:`content`},kn={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},An={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},jn={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Mn={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function Nn(t,c,d,f,p,g){let b=u(`capability-presentation`),x=u(`image-preview`),S=u(`video-preview`),C=u(`audio-preview`),w=u(`file-preview`),T=u(`info-icon`),E=u(`redo-icon`),D=u(`el-button`),O=u(`progress-steps`),k=u(`magic-icon`),A=u(`copy-to-clipboard`),j=u(`channel-icon`),M=u(`el-alert`),N=u(`language-icon`),P=u(`video-player`),F=u(`download-icon`),I=u(`api-code-button`),L=u(`time-icon`),R=u(`warning-icon`);return y(),s(`div`,sn,[e(`div`,cn,[a(b,{capability:`maestro`,part:`avatar`,class:`avatar`})]),e(`div`,ln,[e(`div`,un,[a(b,{capability:`maestro`,part:`name`}),e(`span`,dn,i(t.$dayjs.format(``+new Date(parseFloat((t.modelValue?.created_at||``).toString())*1e3))),1)]),e(`div`,fn,[t.files.length?(y(),s(`div`,pn,[(y(!0),s(l,null,_(t.files,(e,t)=>(y(),s(l,{key:t},[e.kind===`image`?(y(),m(x,{key:0,url:e.url,name:e.name,closable:!1},null,8,[`url`,`name`])):e.kind===`video`?(y(),m(S,{key:1,url:e.url,name:e.name},null,8,[`url`,`name`])):e.kind===`audio`?(y(),m(C,{key:2,url:e.url,name:e.name},null,8,[`url`,`name`])):(y(),s(`a`,{key:3,href:e.url,title:e.name,target:`_blank`,rel:`noopener noreferrer`,class:`shrink-0 no-underline`},[a(w,{name:e.name,closable:!1},null,8,[`name`])],8,mn))],64))),128))])):o(``,!0),t.referenceLoadFailed&&t.referenceTaskId&&!t.referenceTask?(y(),s(`div`,hn,[a(T,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,i(t.$t(`maestro.name.files`))+`: `+i(t.$t(`maestro.name.failure`)),1),a(D,{class:`reference-retry`,size:`small`,text:``,circle:``,title:t.$t(`codingBridge.session.retry`),"aria-label":t.$t(`codingBridge.session.retry`),onClick:t.retryReferenceTask},{default:h(()=>[a(E,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`title`,`aria-label`,`onClick`])])):o(``,!0),t.modelValue?.request?.prompt?(y(),s(`p`,gn,[r(i(t.modelValue?.request?.prompt)+` `,1),t.isTerminal?o(``,!0):(y(),s(`span`,_n,` · `+i(t.progressText),1))])):o(``,!0)]),t.isTerminal?o(``,!0):(y(),s(`div`,vn,[a(M,{closable:!1,class:`mt-2 processing`},{default:h(()=>[a(O,{"model-value":t.modelValue},null,8,[`model-value`]),(y(!0),s(l,null,_(t.requestParams,(e,t)=>(y(),s(`p`,{key:`param-${t}`,class:n([`text-[var(--el-text-color-regular)] text-xs mb-2`,{"mt-3":t===0}])},[(y(),m(v(e.icon),{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),r(` `+i(e.label)+`: `+i(e.value),1)],2))),128)),e(`p`,yn,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.taskId`))+`: `+i(t.modelValue?.id)+` `,1),a(A,{content:t.modelValue?.id},null,8,[`content`])]),t.traceId?(y(),s(`p`,bn,[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.traceId`))+`: `+i(t.traceId)+` `,1),a(A,{content:t.traceId},null,8,[`content`])])):o(``,!0)]),_:1})])),t.modelValue?.response?.success===!0&&t.variants.length?(y(),s(`div`,xn,[(y(!0),s(l,null,_(t.variants,(t,n)=>(y(),s(`div`,{key:n,class:`mb-4`},[e(`p`,Sn,[a(N,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(i(t.lang),1),t.title?(y(),s(`span`,Cn,` · `+i(t.title),1)):o(``,!0)]),t.output_url?(y(),m(P,{key:0,src:t.output_url},null,8,[`src`])):o(``,!0)]))),128)),e(`div`,wn,[(y(!0),s(l,null,_(t.variants,(e,n)=>(y(),s(l,{key:n},[e.output_url?(y(),m(D,{key:0,type:`info`,size:`small`,class:`btn-action`,onClick:n=>t.onDownload(n,e.output_url)},{default:h(()=>[a(F,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.button.download`)),1),t.variants.length>1?(y(),s(`span`,Tn,` · `+i(e.lang),1)):o(``,!0)]),_:2},1032,[`onClick`])):o(``,!0)],64))),128)),a(D,{size:`small`,type:`primary`,class:`btn-action`,onClick:t.onRemix},{default:h(()=>[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.button.remix`)),1)]),_:1},8,[`onClick`]),a(I,{path:`/maestro/videos`,body:t.modelValue?.request},null,8,[`body`])]),a(M,{closable:!1,class:`mt-2 success`},{default:h(()=>[(y(!0),s(l,null,_(t.requestParams,(e,t)=>(y(),s(`p`,{key:`param-${t}`,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},[(y(),m(v(e.icon),{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),r(` `+i(e.label)+`: `+i(e.value),1)]))),128)),e(`p`,En,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.taskId`))+`: `+i(t.modelValue?.id)+` `,1),a(A,{content:t.modelValue?.id},null,8,[`content`])]),t.modelValue?.elapsed?(y(),s(`p`,$,[a(L,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.elapsed`))+`: `+i(t.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),t.traceId?(y(),s(`p`,Dn,[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.traceId`))+`: `+i(t.traceId)+` `,1),a(A,{content:t.traceId},null,8,[`content`])])):o(``,!0)]),_:1})])):o(``,!0),t.modelValue?.response?.success===!1?(y(),s(`div`,On,[a(M,{closable:!1,class:`failure`},{template:h(()=>[a(R,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.failure`)),1)]),default:h(()=>[(y(!0),s(l,null,_(t.requestParams,(e,t)=>(y(),s(`p`,{key:`param-${t}`,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},[(y(),m(v(e.icon),{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),r(` `+i(e.label)+`: `+i(e.value),1)]))),128)),e(`p`,kn,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.taskId`))+`: `+i(t.modelValue?.id)+` `,1),a(A,{content:t.modelValue?.id},null,8,[`content`])]),t.failureReason?(y(),s(`p`,An,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.failureReason`))+`: `+i(t.failureReason),1)])):o(``,!0),t.modelValue?.elapsed?(y(),s(`p`,jn,[a(L,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.elapsed`))+`: `+i(t.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),t.traceId?(y(),s(`p`,Mn,[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`maestro.name.traceId`))+`: `+i(t.traceId)+` `,1),a(A,{content:t.traceId},null,8,[`content`])])):o(``,!0)]),_:1})])):o(``,!0)])])}var Pn=x({name:`RecentPanel`,components:{TaskPreview:U(on,[[`render`,Nn],[`__scopeId`,`data-v-aecd9f66`]]),NoTasks:Oe,BotPlaceholder:Me,ScrollList:De},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],computed:{tasks(){return{...this.$store.state.maestro?.tasks,items:this.$store.state.maestro?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Fn={key:0},In={key:2,class:`w-full h-full flex items-center justify-center`};function Ln(e,t,n,r,i,c){let d=u(`bot-placeholder`),f=u(`task-preview`),p=u(`scroll-list`),g=u(`no-tasks`);return y(),s(l,null,[e.tasks?.items===void 0?(y(),s(`div`,Fn,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(y(),m(p,{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:h(()=>[(y(!0),s(l,null,_(e.tasks?.items,(e,t)=>(y(),m(f,{key:t,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(y(),s(`div`,In,[a(g)])):o(``,!0)],64)}var Rn=x({name:`MaestroIndex`,components:{ConfigPanel:Wt,Layout:Ge,RecentPanel:U(Pn,[[`render`,Ln]])},inject:[`initialized`],data(){return{job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.maestro?.status?.getApplications===G.Request},tasksLoading(){return this.$store.state.maestro?.status?.getTasks===G.Request||this.fetchingTasks},credential(){return this.$store.state.maestro.credential},config(){return this.$store.state.maestro.config},tasks(){return this.$store.state.maestro.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 ke({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(){await this.$store.dispatch(`maestro/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(`maestro/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){let e=ze(this.config);if(!ye())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}q.info(this.$t(`maestro.message.startingTask`)),be(`maestro`,H.generate(e,{token:t})).then(()=>{q.success(this.$t(`maestro.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?q.error(this.$t(`maestro.message.usedUp`)):q.error(this.$t(`maestro.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function zn(e,t,n,r,i,o){let s=u(`config-panel`),c=u(`recent-panel`),l=u(`layout`);return y(),m(l,null,{config:h(()=>[a(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:h(()=>[a(c,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var Bn=U(Rn,[[`render`,zn]]);export{Bn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,it as d,j as f,mt as p,qt as m,rt as h,tt as g,x as _,z as v}from"./vendor-chart-Dw-P17PN.js";import{r as y,t as b}from"./select-BStvECg1.js";import{t as x}from"./upload-ByNQwXJh.js";import{t as S}from"./tooltip-D4EgKm6G.js";import{t as C}from"./alert-BDplJjFH.js";import{t as w}from"./drawer-oMnCzPYd.js";import{n as T}from"./taskDrawerMixin-Cl7YxaFY.js";import{t as E}from"./box-DZV2E00R.js";import{t as D}from"./clock-Wfu3yNCH.js";import{n as O,r as k,t as A}from"./PromptTextarea-BN5xMkDn.js";import{t as ee}from"./info-BvANsMZ5.js";import{t as j}from"./triangle-alert-C3z70mZA.js";import{t as M}from"./upload-DGfOhnPA.js";import{t as N}from"./wand-sparkles-PLgBR18n.js";import{At as P,Bt as F,Ft as te,Ht as ne,It as re,Lt as ie,Mt as ae,Pt as oe,Rt as se,Ut as I,jt as L,kt as R,zt as z}from"./constants-P5wTiWzI.js";import{Bt as B,E as V,Gt as H,Ht as U,Mi as W,Sn as G,Ut as K,Vt as q,ai as J,en as ce,gr as le,ni as Y,vi as X}from"./index-DjH2rtqz.js";import{t as ue}from"./CopyToClipboard-DFuxR3Az.js";import{t as Z}from"./ImagePreview-BbEGVj7c.js";import{t as de}from"./Consumption-NaAGG5D5.js";import{a as Q,n as fe,r as pe,t as me}from"./pagination-CRTJLrs9.js";import{t as he}from"./VideoPlayer-D0YQE8B0.js";import{t as ge}from"./ApiCodeButton-6yNv6GzT.js";import{t as _e}from"./BotPlaceholder-CsV6S3zO.js";var ve=v({name:`LayoutGrokVideo`,components:{MagicIcon:N,ElDrawer:w,ElButton:W},mixins:[T]}),ye={class:`main flex flex-row flex-1`},be={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)]`},xe={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Se(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),h=l(`el-drawer`);return g(),s(`div`,ye,[e(`div`,be,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,xe,[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 Ce=V(ve,[[`render`,Se],[`__scopeId`,`data-v-cdd6b8f3`]]),we=v({name:`GrokVideoPromptInput`,components:{PromptTextarea:A},computed:{prompt:{get(){return this.$store.state.grokvideo?.config?.prompt},set(e){this.$store.commit(`grokvideo/setConfig`,{...this.$store.state.grokvideo?.config,prompt:e})}}},mounted(){this.prompt||=``}});function Te(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(`grokvideo.name.prompt`),info:e.$t(`grokvideo.description.prompt`),placeholder:e.$t(`grokvideo.placeholder.prompt`),"min-rows":5},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var Ee=V(we,[[`render`,Te]]),De=v({name:`GrokVideoModelSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:Q},data(){return{options:[{value:te,label:this.$t(`grokvideo.model.default`)},{value:oe,label:this.$t(`grokvideo.model.preview15`)}]}},computed:{value:{get(){return this.$store.state.grokvideo?.config?.model},set(e){this.$store.commit(`grokvideo/setConfig`,{...this.$store.state.grokvideo?.config,model:e})}}},mounted(){this.value||=R}}),Oe={class:`field`},ke={class:`label`},Ae={class:`box`},je={class:`title font-bold`};function Me(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,Oe,[e(`div`,ke,[e(`div`,Ae,[e(`h2`,je,i(t.$t(`grokvideo.name.model`)),1),a(m,{content:t.$t(`grokvideo.description.model`),class:`info`},null,8,[`content`])])]),a(v,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`grokvideo.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(_,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Ne=V(De,[[`render`,Me],[`__scopeId`,`data-v-291d93fb`]]),Pe=v({name:`GrokVideoDurationSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:Q},computed:{model(){return this.$store.state.grokvideo?.config?.model},maxDuration(){return ne(this.model)},options(){return ae.filter(e=>e<=this.maxDuration).map(e=>({value:e,label:`${e}s`}))},value:{get(){return this.$store.state.grokvideo?.config?.duration},set(e){this.$store.commit(`grokvideo/setConfig`,{...this.$store.state.grokvideo?.config,duration:e})}}},watch:{maxDuration(e){this.value&&this.value>e&&(this.value=e)}},mounted(){this.value||=6}}),Fe={class:`field`},Ie={class:`label`},Le={class:`box`},Re={class:`title font-bold`};function ze(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,Fe,[e(`div`,Ie,[e(`div`,Le,[e(`h2`,Re,i(t.$t(`grokvideo.name.duration`)),1),a(m,{content:t.$t(`grokvideo.description.duration`),class:`info`},null,8,[`content`])])]),a(v,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`grokvideo.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(_,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Be=V(Pe,[[`render`,ze],[`__scopeId`,`data-v-9c711686`]]),Ve=v({name:`GrokVideoResolutionSelector`,components:{InfoIcon:Q},data(){return{options:[{value:z,label:`480p`},{value:F,label:`720p`},{value:se,label:`1080p`}]}},computed:{value:{get(){return this.$store.state.grokvideo?.config?.resolution},set(e){this.$store.commit(`grokvideo/setConfig`,{...this.$store.state.grokvideo?.config,resolution:e})}}},mounted(){this.value||=L}}),He={class:`resolution`},Ue={class:`header`},We={class:`title font-bold`},Ge={class:`items`},Ke=[`onClick`];function qe(t,r,o,u,d,f){let p=l(`info-icon`);return g(),s(`div`,He,[e(`div`,Ue,[e(`h2`,We,i(t.$t(`grokvideo.name.resolution`)),1),a(p,{content:t.$t(`grokvideo.description.resolution`),class:`info`},null,8,[`content`])]),e(`div`,Ge,[(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,Ke))),128))])])}var Je=V(Ve,[[`render`,qe],[`__scopeId`,`data-v-54f22a22`]]),Ye=v({name:`GrokVideoRatioSelector`,components:{InfoIcon:Q},computed:{options(){return[{value:re,label:`16:9`,w:32,h:18},{value:ie,label:`9:16`,w:18,h:32},{value:`1:1`,label:`1:1`,w:24,h:24},{value:`4:3`,label:`4:3`,w:28,h:21},{value:`3:4`,label:`3:4`,w:21,h:28},{value:`3:2`,label:`3:2`,w:30,h:20},{value:`2:3`,label:`2:3`,w:20,h:30}]},value:{get(){return this.$store.state.grokvideo?.config?.aspect_ratio},set(e){this.$store.commit(`grokvideo/setConfig`,{...this.$store.state.grokvideo?.config,aspect_ratio:e})}}},mounted(){this.value||=P}}),Xe={class:`ratio`},Ze={class:`header`},Qe={class:`title font-bold`},$e={class:`items`},et=[`onClick`],tt={class:`preview`},nt={class:`name`};function rt(t,r,o,u,d,f){let p=l(`info-icon`);return g(),s(`div`,Xe,[e(`div`,Ze,[e(`h2`,Qe,i(t.$t(`grokvideo.name.ratio`)),1),a(p,{content:t.$t(`grokvideo.description.ratio`),class:`info`},null,8,[`content`])]),e(`div`,$e,[(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`,tt,[e(`div`,{class:`rect`,style:m({width:r.w+`px`,height:r.h+`px`})},null,4)]),e(`div`,nt,i(r.label),1)],10,et))),128))])])}var it=V(Ye,[[`render`,rt],[`__scopeId`,`data-v-70115284`]]),at=v({name:`GrokVideoImageInput`,components:{UploadIcon:M,ElUpload:x,ElButton:W,InfoIcon:Q,ImagePreview:Z},mixins:[K,q],data(){return{fileList:[],uploadUrl:J()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},required(){return I(this.$store.state.grokvideo?.config?.model)},urls(){return this.fileList.map(e=>e?.response?.file_url)}},methods:{onExceed(){X.warning(this.$t(`grokvideo.message.uploadExceed`))},onError(){X.error(this.$t(`grokvideo.message.uploadError`))},onSetImageUrl(){let e=this.urls?.[0];this.$store.commit(`grokvideo/setConfig`,{...this.$store.state.grokvideo?.config,image_url:e||void 0})},async onSuccess(){this.onSetImageUrl()},async onRemove(){this.onSetImageUrl()}}}),ot={class:`relative`},st={class:`flex justify-between`},ct={class:`flex justify-start items-center`},lt={class:`text-sm font-bold`},ut={key:0,class:`required-badge`};function dt(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return g(),s(`div`,ot,[e(`div`,st,[e(`div`,ct,[e(`span`,lt,i(t.$t(`grokvideo.name.image`)),1),t.required?(g(),s(`span`,ut,i(t.$t(`grokvideo.name.required`)),1)):o(``,!0),a(h,{content:t.$t(`grokvideo.description.image`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:1,class:`upload-wrapper`,multiple:!1,action:t.uploadUrl,"list-type":`picture`,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,"on-remove":t.onRemove,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`grokvideo.button.upload`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`on-remove`,`headers`])])}var ft=V(at,[[`render`,dt],[`__scopeId`,`data-v-38306c67`]]),pt=4,mt=v({name:`GrokVideoReferenceImagesInput`,components:{UploadIcon:M,ElUpload:x,ElButton:W,InfoIcon:Q,ImagePreview:Z},mixins:[K,q],data(){return{fileList:[],uploadUrl:J()+`/api/v1/files/`,limit:pt,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.grokvideo?.config?.reference_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(){X.warning(this.$t(`grokvideo.message.uploadReferenceExceed`))},onError(){X.error(this.$t(`grokvideo.message.uploadError`))},onSetReferenceImages(){let e=this.urls;this.suppressWatch=!0,this.$store.commit(`grokvideo/setConfig`,{...this.$store.state.grokvideo?.config,reference_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()}}}),ht={class:`field mb-[10px] flex items-center justify-between`},gt={class:`title m-0 text-[14px] font-bold`},_t={class:`upload-wrapper flex flex-col items-start gap-[8px]`},vt={class:`controls flex items-center`},yt={class:`file-list flex flex-wrap gap-[10px]`};function bt(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`,ht,[e(`h2`,gt,i(t.$t(`grokvideo.name.referenceImages`)),1),e(`div`,_t,[e(`div`,vt,[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(`grokvideo.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(`grokvideo.description.referenceImages`)},null,8,[`content`])])])]),e(`div`,yt,[(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 xt=v({name:`GrokVideoConfigPanel`,components:{MagicIcon:N,ElButton:W,PromptInput:Ee,ModelSelector:Ne,DurationSelector:Be,ResolutionSelector:Je,RatioSelector:it,ImageInput:ft,ReferenceImagesInput:V(mt,[[`render`,bt]]),Consumption:de},emits:[`generate`],computed:{config(){return this.$store.state.grokvideo?.config},supportsReferenceImages(){return!I(this.$store.state.grokvideo?.config?.model)},consumption(){return H(this.config,this.service?.cost)},service(){return this.$store.state.grokvideo?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),St={class:`flex flex-col h-full`},Ct={class:`flex-1 overflow-y-auto p-5`},wt={class:`flex flex-col items-center justify-center px-5 pb-5`};function Tt(t,n,c,u,d,m){let h=l(`prompt-input`),_=l(`model-selector`),v=l(`ratio-selector`),y=l(`resolution-selector`),b=l(`duration-selector`),x=l(`image-input`),S=l(`reference-images-input`),C=l(`consumption`),w=l(`magic-icon`),T=l(`el-button`);return g(),s(`div`,St,[e(`div`,Ct,[a(h,{class:`mb-4`}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),a(y,{class:`mb-4`}),a(b,{class:`mb-4`}),a(x,{class:`mb-4`}),t.supportsReferenceImages?(g(),f(S,{key:0,class:`mb-4`})):o(``,!0)]),e(`div`,wt,[a(C,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),a(T,{type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(w,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`grokvideo.button.generate`)),1)]),_:1},8,[`onClick`])])])}var Et=V(xt,[[`render`,Tt]]),Dt=v({name:`GrokVideoTaskPreview`,components:{ApplicationIcon:E,ChannelIcon:k,FullscreenIcon:O,InfoIcon:ee,MagicIcon:N,TimeIcon:D,WarningIcon:j,CopyToClipboard:ue,ElAlert:C,VideoPlayer:he,ElTooltip:S,ElButton:W,ImagePreview:Z,ApiCodeButton:ge},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_url},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`},kt={class:`left`},At={class:`main`},jt={class:`bot`},Mt={class:`datetime`},Nt={class:`info`},Pt={key:0,class:`flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto`},Ft={key:1,class:`prompt mt-2`},It={key:0},Lt={key:1},Rt={key:0,class:n({content:!0})},zt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Bt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Vt={key:1,class:n({content:!0})},Ht={key:0,class:`mb-4`},Ut={key:1,class:n({operations:!0,"mt-2":!0,"mb-2":!0})},Wt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Gt={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Kt={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},qt={key:0},$={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Jt={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Yt={key:4,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Xt={key:2,class:n({content:!0})},Zt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Qt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$t={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},en={key:3,class:n({content:!0})},tn={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function nn(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(`fullscreen-icon`),O=l(`channel-icon`),k=l(`warning-icon`),A=l(`info-icon`);return g(),s(`div`,Ot,[e(`div`,kt,[a(h,{capability:`grokvideo`,part:`avatar`,class:`avatar`})]),e(`div`,At,[e(`div`,jt,[a(h,{capability:`grokvideo`,part:`name`}),e(`span`,Mt,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1)]),e(`div`,Nt,[n.inputImage?(g(),s(`div`,Pt,[a(_,{url:n.inputImage,name:`image`,closable:!1},null,8,[`url`])])):o(``,!0),n.modelValue?.request?.prompt?(g(),s(`p`,Ft,[r(i(n.modelValue?.request?.prompt)+` `,1),n.modelValue?.response?n.video?.state===`processing`||n.video?.state===`pending`?(g(),s(`span`,Lt,` - (`+i(n.$t(`grokvideo.status.processing`))+`) `,1)):o(``,!0):(g(),s(`span`,It,` - (`+i(n.$t(`grokvideo.status.pending`))+`) `,1))])):o(``,!0)]),n.modelValue?.response?n.modelValue?.response?.success===!0?(g(),s(`div`,Vt,[n.video?.video_url?(g(),s(`div`,Ht,[a(S,{src:n.video?.video_url},null,8,[`src`])])):o(``,!0),n.video?.video_url?(g(),s(`div`,Ut,[a(w,{class:`box-item`,effect:`dark`,content:n.$t(`grokvideo.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(`grokvideo.button.download`)),1)]),_:1})]),_:1},8,[`content`]),a(T,{path:`/grok/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`,Wt,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.name.model`))+`: `+i(n.modelValue?.request?.model),1)])):o(``,!0),n.video?.duration?(g(),s(`p`,Gt,[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.name.duration`))+`: `+i(n.video?.duration)+`s `,1)])):o(``,!0),n.modelValue?.request?.resolution?(g(),s(`p`,Kt,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.name.resolution`))+`: `+i(n.modelValue?.request?.resolution)+` `,1),n.modelValue?.request?.aspect_ratio?(g(),s(`span`,qt,` · `+i(n.modelValue?.request?.aspect_ratio),1)):o(``,!0)])):o(``,!0),e(`p`,$,[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.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`,Jt,[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),n.modelValue?.response?.trace_id?(g(),s(`p`,Yt,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.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`,Xt,[a(x,{closable:!1,class:`failure`},{template:p(()=>[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.name.failure`)),1)]),default:p(()=>[e(`p`,Zt,[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.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`,Qt,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.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`,$t,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.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`,en,[a(x,{closable:!1,class:`info`},{template:p(()=>[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.name.status`)),1)]),default:p(()=>[e(`p`,tn,[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.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`,Rt,[a(x,{closable:!1,class:`info`},{template:p(()=>[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.status.pending`)),1)]),default:p(()=>[e(`p`,zt,[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.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`,Bt,[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.name.elapsed`))+`: `+i(n.pendingElapsed)+`s `,1)]))]),_:1})]))])])}var rn=v({name:`GrokVideoRecentPanel`,components:{TaskPreview:V(Dt,[[`render`,nn],[`__scopeId`,`data-v-714ce001`]]),BotPlaceholder:_e,NoTasks:pe,ScrollList:fe},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],computed:{tasks(){return{...this.$store.state.grokvideo?.tasks,items:this.$store.state.grokvideo?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),an={key:0},on={key:2,class:`w-full h-full flex items-center justify-center`};function sn(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`,an,[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`,on,[a(v)])):o(``,!0)],64)}var cn=v({name:`GrokVideoIndex`,components:{ConfigPanel:Et,Layout:Ce,RecentPanel:V(rn,[[`render`,sn]])},mixins:[U],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.grokvideo?.status?.getApplications===Y.Request},tasksLoading(){return this.$store.state.grokvideo?.status?.getTasks===Y.Request||this.fetchingTasks},credential(){return this.$store.state.grokvideo?.credential},config(){return this.$store.state.grokvideo?.config},tasks(){return this.$store.state.grokvideo?.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 me({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(`grokvideo/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(`grokvideo/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!B(this.uploadTracker,e=>this.$t(e),e=>X.warning(e)))return;let e={...this.config||{}};typeof e?.prompt==`string`&&(e.prompt=e.prompt.trim(),e.prompt||delete e.prompt),typeof e?.image_url==`string`&&!e.image_url.trim()&&delete e.image_url,(I(e?.model)||!(Array.isArray(e?.reference_image_urls)&&e.reference_image_urls.length))&&delete e.reference_image_urls;let t=!!e?.image_url;if(I(e?.model)&&!t){X.warning(this.$t(`grokvideo.message.modelRequiresImage`));return}if(!t&&!e?.prompt){X.warning(this.$t(`grokvideo.message.promptOrImageRequired`));return}let n={...e,async:!0};if(!ce())return;let r=this.credential?.token;if(!r){console.error(`no token specified`);return}X.info(this.$t(`grokvideo.message.startingTask`)),le(`grokvideo`,G.generate(n,{token:r})).then(()=>{X.success(this.$t(`grokvideo.message.startTaskSuccess`))}).catch(e=>{let t=e?.response?.data;t?.error?.code===`used_up`?X.error(this.$t(`grokvideo.message.usedUp`)):X.error(this.$t(`grokvideo.message.startTaskFailed`)+(t?.error?.message||``))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function ln(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 un=V(cn,[[`render`,ln]]);export{un as default};
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,it as d,j as f,mt as p,qt as m,rt as h,tt as g,x as _,z as v}from"./vendor-chart-Dw-P17PN.js";import{r as y,t as b}from"./select-DW3H8Cyb.js";import{t as x}from"./upload-zeb95gHP.js";import{t as S}from"./tooltip-Cp5x5YK-.js";import{t as C}from"./alert-DDomaAor.js";import{t as w}from"./drawer-D3Ieb275.js";import{n as T}from"./taskDrawerMixin-CFzLna7k.js";import{t as E}from"./box-DQH9ZwMN.js";import{t as D}from"./clock-B2aR5D-m.js";import{n as O,r as k,t as A}from"./PromptTextarea-SlwbqpPN.js";import{t as ee}from"./info-Bx0W99ua.js";import{t as j}from"./triangle-alert-Bm11tXxr.js";import{t as M}from"./upload-Bd3dUhzA.js";import{t as N}from"./wand-sparkles-Bfkh-7H0.js";import{At as P,Bt as F,Ft as te,Ht as ne,It as re,Lt as ie,Mt as ae,Pt as oe,Rt as se,Ut as I,jt as L,kt as R,zt as z}from"./constants-P5wTiWzI.js";import{Bt as B,E as V,Gt as H,Ht as U,Mi as W,Sn as G,Ut as K,Vt as q,ai as J,en as ce,gr as le,ni as Y,vi as X}from"./index-DN3R8m7E.js";import{t as ue}from"./CopyToClipboard-CkXS44Md.js";import{t as Z}from"./ImagePreview-CkB7m_mh.js";import{t as de}from"./Consumption-BlwUHwce.js";import{a as Q,n as fe,r as pe,t as me}from"./pagination-C4WgQYO7.js";import{t as he}from"./VideoPlayer-LQjA3Xp9.js";import{t as ge}from"./ApiCodeButton-m9CgZRja.js";import{t as _e}from"./BotPlaceholder-c1cNbMr3.js";var ve=v({name:`LayoutGrokVideo`,components:{MagicIcon:N,ElDrawer:w,ElButton:W},mixins:[T]}),ye={class:`main flex flex-row flex-1`},be={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)]`},xe={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Se(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),h=l(`el-drawer`);return g(),s(`div`,ye,[e(`div`,be,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,xe,[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 Ce=V(ve,[[`render`,Se],[`__scopeId`,`data-v-cdd6b8f3`]]),we=v({name:`GrokVideoPromptInput`,components:{PromptTextarea:A},computed:{prompt:{get(){return this.$store.state.grokvideo?.config?.prompt},set(e){this.$store.commit(`grokvideo/setConfig`,{...this.$store.state.grokvideo?.config,prompt:e})}}},mounted(){this.prompt||=``}});function Te(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(`grokvideo.name.prompt`),info:e.$t(`grokvideo.description.prompt`),placeholder:e.$t(`grokvideo.placeholder.prompt`),"min-rows":5},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var Ee=V(we,[[`render`,Te]]),De=v({name:`GrokVideoModelSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:Q},data(){return{options:[{value:te,label:this.$t(`grokvideo.model.default`)},{value:oe,label:this.$t(`grokvideo.model.preview15`)}]}},computed:{value:{get(){return this.$store.state.grokvideo?.config?.model},set(e){this.$store.commit(`grokvideo/setConfig`,{...this.$store.state.grokvideo?.config,model:e})}}},mounted(){this.value||=R}}),Oe={class:`field`},ke={class:`label`},Ae={class:`box`},je={class:`title font-bold`};function Me(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,Oe,[e(`div`,ke,[e(`div`,Ae,[e(`h2`,je,i(t.$t(`grokvideo.name.model`)),1),a(m,{content:t.$t(`grokvideo.description.model`),class:`info`},null,8,[`content`])])]),a(v,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`grokvideo.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(_,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Ne=V(De,[[`render`,Me],[`__scopeId`,`data-v-291d93fb`]]),Pe=v({name:`GrokVideoDurationSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:Q},computed:{model(){return this.$store.state.grokvideo?.config?.model},maxDuration(){return ne(this.model)},options(){return ae.filter(e=>e<=this.maxDuration).map(e=>({value:e,label:`${e}s`}))},value:{get(){return this.$store.state.grokvideo?.config?.duration},set(e){this.$store.commit(`grokvideo/setConfig`,{...this.$store.state.grokvideo?.config,duration:e})}}},watch:{maxDuration(e){this.value&&this.value>e&&(this.value=e)}},mounted(){this.value||=6}}),Fe={class:`field`},Ie={class:`label`},Le={class:`box`},Re={class:`title font-bold`};function ze(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,Fe,[e(`div`,Ie,[e(`div`,Le,[e(`h2`,Re,i(t.$t(`grokvideo.name.duration`)),1),a(m,{content:t.$t(`grokvideo.description.duration`),class:`info`},null,8,[`content`])])]),a(v,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`grokvideo.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(_,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Be=V(Pe,[[`render`,ze],[`__scopeId`,`data-v-9c711686`]]),Ve=v({name:`GrokVideoResolutionSelector`,components:{InfoIcon:Q},data(){return{options:[{value:z,label:`480p`},{value:F,label:`720p`},{value:se,label:`1080p`}]}},computed:{value:{get(){return this.$store.state.grokvideo?.config?.resolution},set(e){this.$store.commit(`grokvideo/setConfig`,{...this.$store.state.grokvideo?.config,resolution:e})}}},mounted(){this.value||=L}}),He={class:`resolution`},Ue={class:`header`},We={class:`title font-bold`},Ge={class:`items`},Ke=[`onClick`];function qe(t,r,o,u,d,f){let p=l(`info-icon`);return g(),s(`div`,He,[e(`div`,Ue,[e(`h2`,We,i(t.$t(`grokvideo.name.resolution`)),1),a(p,{content:t.$t(`grokvideo.description.resolution`),class:`info`},null,8,[`content`])]),e(`div`,Ge,[(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,Ke))),128))])])}var Je=V(Ve,[[`render`,qe],[`__scopeId`,`data-v-54f22a22`]]),Ye=v({name:`GrokVideoRatioSelector`,components:{InfoIcon:Q},computed:{options(){return[{value:re,label:`16:9`,w:32,h:18},{value:ie,label:`9:16`,w:18,h:32},{value:`1:1`,label:`1:1`,w:24,h:24},{value:`4:3`,label:`4:3`,w:28,h:21},{value:`3:4`,label:`3:4`,w:21,h:28},{value:`3:2`,label:`3:2`,w:30,h:20},{value:`2:3`,label:`2:3`,w:20,h:30}]},value:{get(){return this.$store.state.grokvideo?.config?.aspect_ratio},set(e){this.$store.commit(`grokvideo/setConfig`,{...this.$store.state.grokvideo?.config,aspect_ratio:e})}}},mounted(){this.value||=P}}),Xe={class:`ratio`},Ze={class:`header`},Qe={class:`title font-bold`},$e={class:`items`},et=[`onClick`],tt={class:`preview`},nt={class:`name`};function rt(t,r,o,u,d,f){let p=l(`info-icon`);return g(),s(`div`,Xe,[e(`div`,Ze,[e(`h2`,Qe,i(t.$t(`grokvideo.name.ratio`)),1),a(p,{content:t.$t(`grokvideo.description.ratio`),class:`info`},null,8,[`content`])]),e(`div`,$e,[(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`,tt,[e(`div`,{class:`rect`,style:m({width:r.w+`px`,height:r.h+`px`})},null,4)]),e(`div`,nt,i(r.label),1)],10,et))),128))])])}var it=V(Ye,[[`render`,rt],[`__scopeId`,`data-v-70115284`]]),at=v({name:`GrokVideoImageInput`,components:{UploadIcon:M,ElUpload:x,ElButton:W,InfoIcon:Q,ImagePreview:Z},mixins:[K,q],data(){return{fileList:[],uploadUrl:J()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},required(){return I(this.$store.state.grokvideo?.config?.model)},urls(){return this.fileList.map(e=>e?.response?.file_url)}},methods:{onExceed(){X.warning(this.$t(`grokvideo.message.uploadExceed`))},onError(){X.error(this.$t(`grokvideo.message.uploadError`))},onSetImageUrl(){let e=this.urls?.[0];this.$store.commit(`grokvideo/setConfig`,{...this.$store.state.grokvideo?.config,image_url:e||void 0})},async onSuccess(){this.onSetImageUrl()},async onRemove(){this.onSetImageUrl()}}}),ot={class:`relative`},st={class:`flex justify-between`},ct={class:`flex justify-start items-center`},lt={class:`text-sm font-bold`},ut={key:0,class:`required-badge`};function dt(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return g(),s(`div`,ot,[e(`div`,st,[e(`div`,ct,[e(`span`,lt,i(t.$t(`grokvideo.name.image`)),1),t.required?(g(),s(`span`,ut,i(t.$t(`grokvideo.name.required`)),1)):o(``,!0),a(h,{content:t.$t(`grokvideo.description.image`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:1,class:`upload-wrapper`,multiple:!1,action:t.uploadUrl,"list-type":`picture`,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,"on-remove":t.onRemove,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`grokvideo.button.upload`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`on-remove`,`headers`])])}var ft=V(at,[[`render`,dt],[`__scopeId`,`data-v-38306c67`]]),pt=4,mt=v({name:`GrokVideoReferenceImagesInput`,components:{UploadIcon:M,ElUpload:x,ElButton:W,InfoIcon:Q,ImagePreview:Z},mixins:[K,q],data(){return{fileList:[],uploadUrl:J()+`/api/v1/files/`,limit:pt,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.grokvideo?.config?.reference_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(){X.warning(this.$t(`grokvideo.message.uploadReferenceExceed`))},onError(){X.error(this.$t(`grokvideo.message.uploadError`))},onSetReferenceImages(){let e=this.urls;this.suppressWatch=!0,this.$store.commit(`grokvideo/setConfig`,{...this.$store.state.grokvideo?.config,reference_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()}}}),ht={class:`field mb-[10px] flex items-center justify-between`},gt={class:`title m-0 text-[14px] font-bold`},_t={class:`upload-wrapper flex flex-col items-start gap-[8px]`},vt={class:`controls flex items-center`},yt={class:`file-list flex flex-wrap gap-[10px]`};function bt(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`,ht,[e(`h2`,gt,i(t.$t(`grokvideo.name.referenceImages`)),1),e(`div`,_t,[e(`div`,vt,[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(`grokvideo.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(`grokvideo.description.referenceImages`)},null,8,[`content`])])])]),e(`div`,yt,[(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 xt=v({name:`GrokVideoConfigPanel`,components:{MagicIcon:N,ElButton:W,PromptInput:Ee,ModelSelector:Ne,DurationSelector:Be,ResolutionSelector:Je,RatioSelector:it,ImageInput:ft,ReferenceImagesInput:V(mt,[[`render`,bt]]),Consumption:de},emits:[`generate`],computed:{config(){return this.$store.state.grokvideo?.config},supportsReferenceImages(){return!I(this.$store.state.grokvideo?.config?.model)},consumption(){return H(this.config,this.service?.cost)},service(){return this.$store.state.grokvideo?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),St={class:`flex flex-col h-full`},Ct={class:`flex-1 overflow-y-auto p-5`},wt={class:`flex flex-col items-center justify-center px-5 pb-5`};function Tt(t,n,c,u,d,m){let h=l(`prompt-input`),_=l(`model-selector`),v=l(`ratio-selector`),y=l(`resolution-selector`),b=l(`duration-selector`),x=l(`image-input`),S=l(`reference-images-input`),C=l(`consumption`),w=l(`magic-icon`),T=l(`el-button`);return g(),s(`div`,St,[e(`div`,Ct,[a(h,{class:`mb-4`}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),a(y,{class:`mb-4`}),a(b,{class:`mb-4`}),a(x,{class:`mb-4`}),t.supportsReferenceImages?(g(),f(S,{key:0,class:`mb-4`})):o(``,!0)]),e(`div`,wt,[a(C,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),a(T,{type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(w,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`grokvideo.button.generate`)),1)]),_:1},8,[`onClick`])])])}var Et=V(xt,[[`render`,Tt]]),Dt=v({name:`GrokVideoTaskPreview`,components:{ApplicationIcon:E,ChannelIcon:k,FullscreenIcon:O,InfoIcon:ee,MagicIcon:N,TimeIcon:D,WarningIcon:j,CopyToClipboard:ue,ElAlert:C,VideoPlayer:he,ElTooltip:S,ElButton:W,ImagePreview:Z,ApiCodeButton:ge},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_url},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`},kt={class:`left`},At={class:`main`},jt={class:`bot`},Mt={class:`datetime`},Nt={class:`info`},Pt={key:0,class:`flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto`},Ft={key:1,class:`prompt mt-2`},It={key:0},Lt={key:1},Rt={key:0,class:n({content:!0})},zt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Bt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Vt={key:1,class:n({content:!0})},Ht={key:0,class:`mb-4`},Ut={key:1,class:n({operations:!0,"mt-2":!0,"mb-2":!0})},Wt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Gt={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Kt={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},qt={key:0},$={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Jt={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Yt={key:4,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Xt={key:2,class:n({content:!0})},Zt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Qt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$t={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},en={key:3,class:n({content:!0})},tn={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function nn(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(`fullscreen-icon`),O=l(`channel-icon`),k=l(`warning-icon`),A=l(`info-icon`);return g(),s(`div`,Ot,[e(`div`,kt,[a(h,{capability:`grokvideo`,part:`avatar`,class:`avatar`})]),e(`div`,At,[e(`div`,jt,[a(h,{capability:`grokvideo`,part:`name`}),e(`span`,Mt,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1)]),e(`div`,Nt,[n.inputImage?(g(),s(`div`,Pt,[a(_,{url:n.inputImage,name:`image`,closable:!1},null,8,[`url`])])):o(``,!0),n.modelValue?.request?.prompt?(g(),s(`p`,Ft,[r(i(n.modelValue?.request?.prompt)+` `,1),n.modelValue?.response?n.video?.state===`processing`||n.video?.state===`pending`?(g(),s(`span`,Lt,` - (`+i(n.$t(`grokvideo.status.processing`))+`) `,1)):o(``,!0):(g(),s(`span`,It,` - (`+i(n.$t(`grokvideo.status.pending`))+`) `,1))])):o(``,!0)]),n.modelValue?.response?n.modelValue?.response?.success===!0?(g(),s(`div`,Vt,[n.video?.video_url?(g(),s(`div`,Ht,[a(S,{src:n.video?.video_url},null,8,[`src`])])):o(``,!0),n.video?.video_url?(g(),s(`div`,Ut,[a(w,{class:`box-item`,effect:`dark`,content:n.$t(`grokvideo.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(`grokvideo.button.download`)),1)]),_:1})]),_:1},8,[`content`]),a(T,{path:`/grok/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`,Wt,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.name.model`))+`: `+i(n.modelValue?.request?.model),1)])):o(``,!0),n.video?.duration?(g(),s(`p`,Gt,[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.name.duration`))+`: `+i(n.video?.duration)+`s `,1)])):o(``,!0),n.modelValue?.request?.resolution?(g(),s(`p`,Kt,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.name.resolution`))+`: `+i(n.modelValue?.request?.resolution)+` `,1),n.modelValue?.request?.aspect_ratio?(g(),s(`span`,qt,` · `+i(n.modelValue?.request?.aspect_ratio),1)):o(``,!0)])):o(``,!0),e(`p`,$,[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.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`,Jt,[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),n.modelValue?.response?.trace_id?(g(),s(`p`,Yt,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.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`,Xt,[a(x,{closable:!1,class:`failure`},{template:p(()=>[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.name.failure`)),1)]),default:p(()=>[e(`p`,Zt,[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.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`,Qt,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.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`,$t,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.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`,en,[a(x,{closable:!1,class:`info`},{template:p(()=>[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.name.status`)),1)]),default:p(()=>[e(`p`,tn,[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.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`,Rt,[a(x,{closable:!1,class:`info`},{template:p(()=>[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.status.pending`)),1)]),default:p(()=>[e(`p`,zt,[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.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`,Bt,[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`grokvideo.name.elapsed`))+`: `+i(n.pendingElapsed)+`s `,1)]))]),_:1})]))])])}var rn=v({name:`GrokVideoRecentPanel`,components:{TaskPreview:V(Dt,[[`render`,nn],[`__scopeId`,`data-v-714ce001`]]),BotPlaceholder:_e,NoTasks:pe,ScrollList:fe},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],computed:{tasks(){return{...this.$store.state.grokvideo?.tasks,items:this.$store.state.grokvideo?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),an={key:0},on={key:2,class:`w-full h-full flex items-center justify-center`};function sn(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`,an,[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`,on,[a(v)])):o(``,!0)],64)}var cn=v({name:`GrokVideoIndex`,components:{ConfigPanel:Et,Layout:Ce,RecentPanel:V(rn,[[`render`,sn]])},mixins:[U],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.grokvideo?.status?.getApplications===Y.Request},tasksLoading(){return this.$store.state.grokvideo?.status?.getTasks===Y.Request||this.fetchingTasks},credential(){return this.$store.state.grokvideo?.credential},config(){return this.$store.state.grokvideo?.config},tasks(){return this.$store.state.grokvideo?.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 me({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(`grokvideo/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(`grokvideo/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!B(this.uploadTracker,e=>this.$t(e),e=>X.warning(e)))return;let e={...this.config||{}};typeof e?.prompt==`string`&&(e.prompt=e.prompt.trim(),e.prompt||delete e.prompt),typeof e?.image_url==`string`&&!e.image_url.trim()&&delete e.image_url,(I(e?.model)||!(Array.isArray(e?.reference_image_urls)&&e.reference_image_urls.length))&&delete e.reference_image_urls;let t=!!e?.image_url;if(I(e?.model)&&!t){X.warning(this.$t(`grokvideo.message.modelRequiresImage`));return}if(!t&&!e?.prompt){X.warning(this.$t(`grokvideo.message.promptOrImageRequired`));return}let n={...e,async:!0};if(!ce())return;let r=this.credential?.token;if(!r){console.error(`no token specified`);return}X.info(this.$t(`grokvideo.message.startingTask`)),le(`grokvideo`,G.generate(n,{token:r})).then(()=>{X.success(this.$t(`grokvideo.message.startTaskSuccess`))}).catch(e=>{let t=e?.response?.data;t?.error?.code===`used_up`?X.error(this.$t(`grokvideo.message.usedUp`)):X.error(this.$t(`grokvideo.message.startTaskFailed`)+(t?.error?.message||``))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function ln(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 un=V(cn,[[`render`,ln]]);export{un as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,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 A,n as te,r as j,s as ne}from"./runtime-BTM7t9of.js";import{a as re,c as M,dt as N,ht as ie,i as P,it as F,n as ae,r as oe,yt as se}from"./use-deprecated-r4dlLNqm.js";import{r as I,t as ce}from"./select-BStvECg1.js";import{t as L}from"./use-aria-9DurtVZO.js";import{n as R,t as le}from"./form-BNJ9LdPs.js";import{r as ue,t as z}from"./event-BGnHezxC.js";import{t as de}from"./input-number-i5U8XdBq.js";import{t as B}from"./arrow-left-DB6qWRxA.js";import{t as V}from"./arrow-up-D3niKZHG.js";import{t as H}from"./box-DZV2E00R.js";import{t as U}from"./chevron-down-DiCB7_cE.js";import{t as W}from"./chevron-right-Qv5p8ju5.js";import{t as fe}from"./copy-CU5KsMub.js";import{t as G}from"./download-CZBrzAe9.js";import{t as K}from"./file-text-BiCIu3qW.js";import{t as pe}from"./history-BJworAx_.js";import{t as me}from"./image-igPYo_Pj.js";import{t as he}from"./loader-circle-By_qWfck.js";import{t as ge}from"./mouse-pointer-2-D5k09eQB.js";import{t as _e}from"./music-2-DwDkh_mX.js";import{t as ve}from"./play-loqVd6xQ.js";import{t as ye}from"./plus-5mgK_nZC.js";import{t as be}from"./search-DilmuF2H.js";import{t as xe}from"./sparkles-iNFqRK4U.js";import{t as Se}from"./trash-2-CiaDFmZj.js";import{t as Ce}from"./triangle-alert-C3z70mZA.js";import{t as we}from"./upload-DGfOhnPA.js";import{t as Te}from"./video-Dm20ncFf.js";import{i as q}from"./i18n-m-rMtkos.js";import{Ci as Ee,E as J,Mi as Y,Vi as X,_i as De,gi as Z,ni as Oe,ri as ke,vi as Ae}from"./index-DjH2rtqz.js";var je={label:`label`,value:`value`,disabled:`disabled`},Me=te({direction:{type:j(String),default:`horizontal`},options:{type:j(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},props:{type:j(Object),default:()=>je},block:Boolean,size:F,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...L([`ariaLabel`])}),Ne={[ue]:e=>m(e)||ne(e)||A(e),[z]:e=>m(e)||ne(e)||A(e)},Pe=k(O(D({...D({name:`ElSegmented`}),props:Me,emits:Ne,setup(t,{emit:a}){let l=t,u=ee(`segmented`),m=M(),h=oe(),_=ae(),{formItem:y}=P(),{inputId:x,isLabeledByFormItem:w}=re(l,{formItemContext:y}),D=E(null),O=ie(),k=d({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),A=e=>{let t=j(e);a(ue,t),a(z,t)},te=b(()=>({...je,...l.props})),j=e=>p(e)?e[te.value.value]:e,ne=e=>p(e)?e[te.value.label]:e,F=e=>!!(_.value||p(e)&&e[te.value.disabled]),I=e=>l.modelValue===j(e),ce=e=>l.options.find(t=>j(t)===e),L=e=>[u.e(`item`),u.is(`selected`,I(e)),u.is(`disabled`,F(e))],R=()=>{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{}},le=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`,F(ce(l.modelValue))),u.is(`focus-visible`,k.focusVisible)]),V=b(()=>l.name||m.value);return se(D,R),g(O,R),g(()=>l.modelValue,()=>{var e;R(),l.validateEvent&&((e=y?.validate)==null||e.call(y,`change`).catch(e=>N(e)))},{flush:`post`}),(t,a)=>t.options.length?(T(),c(`div`,{key:0,id:s(x),ref_key:`segmentedRef`,ref:D,class:n(s(le)),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(L(a))},[e(`input`,{class:n(s(u).e(`item-input`)),type:`radio`,name:s(V),disabled:F(a),checked:I(a),onChange:e=>A(a)},null,42,[`name`,`disabled`,`checked`,`onChange`]),e(`div`,{class:n(s(u).e(`item-label`))},[v(t.$slots,`default`,{item:a},()=>[r(i(ne(a)),1)])],2)],2))),128))],2)],10,[`id`,`aria-label`,`aria-labelledby`])):o(`v-if`,!0)}}),[[`__file`,`segmented.vue`]])),Fe=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`}]]),Ie=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`}]]),Le=Z(`building-2`,[[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]]),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`}]]),Re=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`}]]),ze=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`}]]),Be=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`}]]),Ve=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`}]]),He=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`}]]),Ue=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`}]]),We={class:`discovery-home`},$={class:`discovery-header`},Ge={class:`brand`},Ke={class:`project-links`},qe=[`title`,`aria-label`,`onClick`],Je={key:0,class:`discovery-state`,role:`status`},Ye={class:`creator`,"aria-labelledby":`poivelle-create-title`},Xe={class:`creator-kicker`},Ze={id:`poivelle-create-title`},Qe=[`aria-label`],$e=[`disabled`,`onClick`],et=[`placeholder`,`disabled`],tt={class:`composer-footer`},nt=[`disabled`,`title`],rt={class:`prompt-starters`},it=[`disabled`,`onClick`],at={class:`works`,"aria-labelledby":`poivelle-works-title`},ot={class:`works-heading`},st={id:`poivelle-works-title`},ct={class:`search`},lt=[`placeholder`,`aria-label`],ut={class:`category-tabs`},dt=[`onClick`],ft={class:`work-grid`},pt={class:`cover`},mt=[`src`,`alt`,`onError`],ht={class:`work-copy`},gt={class:`work-meta`},_t=[`disabled`,`onClick`],vt=J(D({__name:`DiscoveryHome`,emits:[`open-studio`],setup(u,{emit:d}){let p=d,m=ke(),g=b(()=>m.state.poivelle),v=b(()=>g.value?.projects??[]),x=b(()=>g.value?.discoveryWorks??[]),S=E(``),D=E(``),O=E(!1),ee=E(new Set),k=E(`official:pulsecam`),A=E(`all`),te=[{workId:`official:pulsecam`,label:`poivelle.discovery.commercial`,icon:Q},{workId:`official:moonlit-signal`,label:`poivelle.discovery.musicVideo`,icon:_e},{workId:`official:northstar-origin`,label:`poivelle.discovery.documentary`,icon:Le}],j=[`poivelle.discovery.starterProduct`,`poivelle.discovery.starterMusic`,`poivelle.discovery.starterDocumentary`],ne=[{value:`all`,label:`poivelle.discovery.all`},{value:`commercial`,label:`poivelle.discovery.commercial`},{value:`music_video`,label:`poivelle.discovery.musicVideo`},{value:`documentary`,label:`poivelle.discovery.documentary`},{value:`community`,label:`poivelle.discovery.community`}],re=b(()=>{let e=D.value.trim().toLowerCase();return x.value.filter(t=>(A.value===`all`||t.category===A.value)&&(!e||`${t.title} ${t.description} ${t.creator_name} ${(t.tags??[]).join(` `)}`.toLowerCase().includes(e)))}),M=b(()=>g.value?.status?.bootstrap===Oe.Request),N=b(()=>g.value?.error),ie=b(()=>x.value.find(e=>e.id===k.value)??x.value[0]),P=()=>m.dispatch(`poivelle/bootstrap`,{loadProject:!1}),F=e=>{ee.value=new Set([...ee.value,e])},ae=async e=>{await m.dispatch(`poivelle/loadProject`,e),p(`open-studio`)},oe=async(e,t)=>{if(!O.value){O.value=!0;try{await m.dispatch(`poivelle/copyDiscoveryWork`,{work_id:e.id,prompt:t,title:t.slice(0,80)}),p(`open-studio`)}catch(e){Ae.error(e?.message??q(`poivelle.error.generic`))}finally{O.value=!1}}},se=async()=>{let e=ie.value;e&&S.value.trim()&&await oe(e,S.value.trim())},I=async e=>{await oe(e,S.value.trim()||`${q(`poivelle.discovery.copyPrefix`)} ${e.title}`)};return l(P),(l,u)=>(T(),c(`main`,We,[e(`header`,$,[e(`div`,Ge,[a(s(Q),{size:19,"aria-hidden":`true`}),u[2]||=r(` POIVELLE`,-1)]),e(`div`,Ke,[(T(!0),c(f,null,C(v.value.slice(0,3),e=>(T(),c(`button`,{key:e.id,type:`button`,title:e.title,"aria-label":e.title,onClick:t=>ae(e.id)},[r(i(e.title)+` `,1),a(s(W),{size:13,"aria-hidden":`true`})],8,qe))),128))])]),M.value||N.value?(T(),c(`div`,Je,[M.value?(T(),y(s(he),{key:0,size:16,class:`spinning`,"aria-hidden":`true`})):o(``,!0),e(`span`,null,i(M.value?l.$t(`poivelle.status.loading`):N.value),1),N.value?(T(),c(`button`,{key:1,type:`button`,onClick:P},i(l.$t(`poivelle.action.retry`)),1)):o(``,!0)])):o(``,!0),e(`section`,Ye,[e(`p`,Xe,i(l.$t(`poivelle.discovery.kicker`)),1),e(`h1`,Ze,i(l.$t(`poivelle.discovery.title`)),1),e(`div`,{class:`mode-switch`,"aria-label":l.$t(`poivelle.discovery.skills`)},[(T(),c(f,null,C(te,t=>e(`button`,{key:t.workId,type:`button`,class:n({active:k.value===t.workId}),disabled:M.value,onClick:e=>k.value=t.workId},[(T(),y(w(t.icon),{size:15,"aria-hidden":`true`})),r(` `+i(l.$t(t.label)),1)],10,$e)),64))],8,Qe),e(`form`,{class:`composer`,onSubmit:t(se,[`prevent`])},[_(e(`textarea`,{"onUpdate:modelValue":u[0]||=e=>S.value=e,placeholder:l.$t(`poivelle.discovery.placeholder`),disabled:M.value,maxlength:`500`,rows:`4`},null,8,et),[[h,S.value]]),e(`div`,tt,[e(`span`,null,i(S.value.length)+`/500`,1),e(`button`,{type:`submit`,disabled:!S.value.trim()||!ie.value||M.value||O.value,title:l.$t(`poivelle.discovery.create`)},[O.value?(T(),y(s(he),{key:0,size:18,class:`spinning`,"aria-hidden":`true`})):(T(),y(s(V),{key:1,size:18,"aria-hidden":`true`}))],8,nt)])],32),e(`div`,rt,[(T(),c(f,null,C(j,t=>e(`button`,{key:t,type:`button`,disabled:M.value,onClick:e=>S.value=l.$t(t)},i(l.$t(t)),9,it)),64))])]),e(`section`,at,[e(`div`,ot,[e(`div`,null,[e(`span`,null,i(l.$t(`poivelle.discovery.galleryKicker`)),1),e(`h2`,st,i(l.$t(`poivelle.discovery.gallery`)),1)]),e(`label`,ct,[a(s(be),{size:16,"aria-hidden":`true`}),_(e(`input`,{"onUpdate:modelValue":u[1]||=e=>D.value=e,placeholder:l.$t(`poivelle.discovery.search`),"aria-label":l.$t(`poivelle.discovery.search`)},null,8,lt),[[h,D.value]])])]),e(`div`,ut,[(T(),c(f,null,C(ne,t=>e(`button`,{key:t.value,type:`button`,class:n({active:A.value===t.value}),onClick:e=>A.value=t.value},i(l.$t(t.label)),11,dt)),64))]),e(`div`,ft,[(T(!0),c(f,null,C(re.value,t=>(T(),c(`article`,{key:t.id,class:`work-card`},[e(`div`,pt,[t.cover_url&&!ee.value.has(t.id)?(T(),c(`img`,{key:0,src:t.cover_url,alt:t.title,loading:`lazy`,onError:e=>F(t.id)},null,40,mt)):(T(),y(s(Re),{key:1,size:32,"aria-hidden":`true`})),e(`span`,null,i(t.duration_seconds?`${t.duration_seconds}s`:l.$t(`poivelle.discovery.community`)),1)]),e(`div`,ht,[e(`div`,gt,[e(`span`,null,i(t.creator_name),1),e(`strong`,null,i(t.title),1),e(`p`,null,i(t.description),1)]),e(`button`,{type:`button`,disabled:M.value||O.value,onClick:e=>I(t)},[a(s(fe),{size:14,"aria-hidden":`true`}),r(` `+i(l.$t(`poivelle.discovery.copy`)),1)],8,_t)])]))),128))])])]))}}),[[`__scopeId`,`data-v-d0d58a50`]]),yt={class:`studio-header`},bt={class:`identity`},xt=[`title`],St={class:`wordmark`},Ct={key:0,class:`version`},wt={class:`actions`},Tt={class:`sync-state`},Et=[`title`],Dt=[`disabled`],Ot=J(D({__name:`StudioHeader`,props:{projectTitle:{},graphVersion:{},canRun:{type:Boolean},canEdit:{type:Boolean}},emits:[`open-projects`,`home`,`commit`,`run`],setup(t){return(n,l)=>(T(),c(`header`,yt,[e(`div`,bt,[e(`button`,{class:`home-button`,type:`button`,title:n.$t(`poivelle.discovery.back`),onClick:l[0]||=e=>n.$emit(`home`)},[a(s(B),{size:16,"aria-hidden":`true`})],8,xt),e(`span`,St,[a(s(Q),{size:15,"aria-hidden":`true`}),l[4]||=r(` POIVELLE`,-1)]),e(`button`,{class:`project-button`,type:`button`,onClick:l[1]||=e=>n.$emit(`open-projects`)},[e(`span`,null,i(t.projectTitle||n.$t(`poivelle.project.noProject`)),1),a(s(U),{size:14,"aria-hidden":`true`})]),t.graphVersion===void 0?o(``,!0):(T(),c(`span`,Ct,`Graph v`+i(t.graphVersion),1))]),e(`div`,wt,[e(`span`,Tt,[l[5]||=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[2]||=e=>n.$emit(`commit`)},[a(s(ze),{size:17,"aria-hidden":`true`})],8,Et)):o(``,!0),e(`button`,{class:`primary-button`,type:`button`,disabled:!t.canRun,onClick:l[3]||=e=>n.$emit(`run`)},[a(s(ve),{size:15,fill:`currentColor`,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.action.runSkill`)),1)],8,Dt)])]))}}),[[`__scopeId`,`data-v-8329a116`]]),kt={class:`production-rail`},At={class:`rail-section`},jt={class:`section-heading`},Mt=[`title`],Nt={class:`project-list`},Pt=[`onClick`],Ft={key:0,class:`empty-copy`},It={class:`rail-section assets-section`},Lt={class:`section-heading`},Rt=[`title`],zt={class:`asset-filters`},Bt=[`onClick`],Vt={class:`asset-list`},Ht={key:0,class:`empty-copy`},Ut={class:`rail-section compact-section`},Wt={class:`section-heading static`},Gt={class:`revision-list`},Kt={key:0,class:`empty-copy`},qt=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`?Te:e===`voice`||e===`music`||e===`sfx`?Fe:e===`script`||e===`brand`?K:me;return(r,m)=>(T(),c(`aside`,kt,[e(`div`,At,[e(`div`,jt,[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(ye),{size:15,"aria-hidden":`true`})],8,Mt)):o(``,!0)]),e(`div`,Nt,[(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,Pt))),128)),t.projects.length?o(``,!0):(T(),c(`p`,Ft,i(r.$t(`poivelle.project.empty`)),1))])]),e(`div`,It,[e(`div`,Lt,[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(we),{size:15,"aria-hidden":`true`})],8,Rt)):o(``,!0)]),e(`div`,zt,[(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,Bt)),64))]),e(`div`,Vt,[(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`,Ht,i(r.$t(`poivelle.asset.empty`)),1))])]),e(`div`,Ut,[e(`div`,Wt,[e(`span`,null,i(r.$t(`poivelle.section.revisions`)),1),a(s(pe),{size:14,"aria-hidden":`true`})]),e(`div`,Gt,[(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`,Kt,i(r.$t(`poivelle.revision.empty`)),1))])])]))}}),[[`__scopeId`,`data-v-24e37657`]]),Jt=[`aria-label`],Yt=[`onClick`],Xt=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:Be},{value:`storyboard`,label:`poivelle.projection.storyboard`,icon:Q},{value:`timeline`,label:`poivelle.projection.timeline`,icon:Ue},{value:`review`,label:`poivelle.projection.review`,icon:Ve}];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,Yt)),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(ye),{size:14,"aria-hidden":`true`}),r(` `+i(u.$t(`poivelle.node.create`)),1)])):o(``,!0)],8,Jt))}}),[[`__scopeId`,`data-v-bea5d208`]]),Zt={class:`connections`,"aria-hidden":`true`},Qt=[`x1`,`y1`,`x2`,`y2`],$t=[`onClick`],en={class:`node-type`},tn={class:`node-summary`},nn={key:0,class:`lock-mark`},rn={key:0,class:`empty-canvas`},an=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`,Zt,[(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,Qt))),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`,en,i(f.node_type),1),e(`strong`,null,i(f.title),1),e(`span`,tn,i(v(f)),1),f.locked_paths.length?(T(),c(`span`,nn,[a(s(He),{size:11}),d[2]||=r(` locked`,-1)])):o(``,!0)],14,$t))),128)),l.graph.nodes.length?o(``,!0):(T(),c(`div`,rn,[a(s(Be),{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(ye),{size:15,"aria-hidden":`true`}),r(` `+i(u.$t(`poivelle.node.create`)),1)])):o(``,!0)]))]))}}),[[`__scopeId`,`data-v-cd67c1fc`]]),on={class:`media-lane`},sn={key:0,class:`candidate-strip`},cn=[`src`],ln=[`src`],un=[`onClick`],dn={key:1},fn=[`onClick`],pn={key:1,class:`unavailable-takes`},mn={key:2,class:`empty-candidates`},hn=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`,on,[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`,sn,[(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,cn)):(T(),c(`video`,{key:1,src:a.artifact.storage_url,controls:``,preload:`metadata`},null,8,ln)),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,un)):a.selected?(T(),c(`em`,dn,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,fn)])],2))),128))])):o(``,!0),s.value.length?(T(),c(`div`,pn,[(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`,mn,i(r.$t(`poivelle.storyboard.noCandidates`)),1)):o(``,!0)]))}}),[[`__scopeId`,`data-v-4e385f6a`]]),gn={class:`storyboard-view`},_n={key:0,class:`storyboard-heading`},vn={class:`section-label`},yn=[`onClick`],bn={class:`shot-number`},xn={class:`shot-production`},Sn={class:`shot-metadata`},Cn={class:`prompt-columns`},wn={class:`candidate-columns`},Tn=[`onClick`],En={key:0,class:`empty-view`},Dn=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`,gn,[t.storyboard?(T(),c(`header`,_n,[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`,vn,[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`,bn,`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,yn),e(`div`,xn,[e(`dl`,Sn,[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`,Cn,[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`,wn,[a(hn,{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(hn,{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,Tn))),128)),u.value.length?o(``,!0):(T(),c(`div`,En,[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`]]),On={class:`timeline-view`},kn={key:0,class:`master-output`,"aria-labelledby":`poivelle-master-title`},An={class:`master-heading`},jn={class:`master-kicker`},Mn={id:`poivelle-master-title`},Nn=[`href`],Pn=[`src`,`aria-label`],Fn={key:0,class:`master-status`,role:`status`},In={key:1,class:`master-status is-error`,role:`alert`},Ln={class:`master-metadata`},Rn={class:`timeline-ruler`},zn={key:1,class:`tracks`},Bn={class:`track-label`},Vn={class:`track-lane`},Hn=[`title`],Un=[`aria-label`],Wn={key:0,class:`clip-actions`},Gn=[`disabled`,`onClick`],Kn=[`disabled`,`onClick`],qn={key:2,class:`empty-timeline`},Jn=120/5e3,Yn=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*Jn}px`,width:`${Math.max(48,(e.source_out_ms-e.source_in_ms)/(e.speed??1)*Jn)}px`});return(n,g)=>(T(),c(`div`,On,[l.value?(T(),c(`section`,kn,[e(`div`,An,[e(`div`,null,[e(`span`,jn,i(n.$t(`poivelle.timeline.deliverable`)),1),e(`h2`,Mn,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(G),{size:15,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.timeline.download`)),1)],8,Nn)]),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,Pn),u.value&&!d.value?(T(),c(`div`,Fn,[a(s(he),{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`,In,[a(s(Ce),{size:24,"aria-hidden":`true`}),e(`span`,null,i(n.$t(`poivelle.timeline.loadError`)),1)])):o(``,!0)],4),e(`dl`,Ln,[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`,Rn,[(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`,zn,[(T(!0),c(f,null,C(t.timeline.tracks,r=>(T(),c(`div`,{key:r.id,class:`track-row`},[e(`div`,Bn,i(r.title||r.kind||r.id),1),e(`div`,Vn,[(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,Un),t.canEdit&&r.kind===`video`?(T(),c(`span`,Wn,[e(`button`,{type:`button`,disabled:s===0,onClick:e=>n.$emit(`move-clip`,{trackId:r.id,clipId:a.id,direction:-1})},` ‹ `,8,Gn),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,Kn)])):o(``,!0)],12,Hn))),128))])]))),128))])):(T(),c(`div`,qn,[a(s(Re),{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`]]),Xn={class:`review-view`},Zn={class:`review-summary`},Qn={class:`eyebrow`},$n={class:`summary-metrics`},er={class:`review-columns`},tr={key:0,class:`item-actions`},nr=[`onClick`],rr={key:0,class:`empty-copy`},ir=[`onClick`],ar=[`onClick`],or={key:0,class:`empty-copy`},sr={key:1,class:`run-detail`},cr={key:0},lr=[`onClick`],ur={key:2,class:`forensic-failures`,role:`alert`},dr=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`,Xn,[e(`section`,Zn,[e(`div`,null,[e(`span`,Qn,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`,$n,[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`,er,[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`,tr,[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,nr)])):o(``,!0)]))),128)),l.value.length?o(``,!0):(T(),c(`p`,rr,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,ar)):o(``,!0)],10,ir))),128)),a.runs.length?o(``,!0):(T(),c(`p`,or,i(s.$t(`poivelle.review.noRuns`)),1)),a.activeRun?(T(),c(`section`,sr,[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`,cr,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,lr)):o(``,!0)]))),128))])):o(``,!0),m.value.length?(T(),c(`section`,ur,[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`]]),fr={class:`inspector-panel`},pr={class:`inspector-heading`},mr={class:`field`},hr={class:`field`},gr=[`value`],_r={class:`field grow`},vr={class:`node-meta`},yr={key:1,class:`empty-inspector`},br=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`?Te:o.node.node_type===`audio`?Fe:[`shot`,`scene`,`storyboard`].includes(o.node.node_type)?Q:[`image`,`character`,`location`].includes(o.node.node_type)?me:o.node.node_type===`script`||o.node.node_type===`text`?K:H:ge),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`,fr,[e(`div`,pr,[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`,mr,[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`,hr,[e(`span`,null,i(n.$t(`poivelle.field.type`)),1),e(`input`,{value:t.node.node_type,type:`text`,disabled:``},null,8,gr)]),e(`label`,_r,[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`,vr,[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(Se),{size:14,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.node.delete`)),1)])],64)):(T(),c(`div`,yr,[a(s(ge),{size:24,"stroke-width":`1.4`}),e(`p`,null,i(n.$t(`poivelle.inspector.empty`)),1)]))]))}}),[[`__scopeId`,`data-v-7a6ae318`]]),xr={class:`agent-dock`},Sr={class:`agent-identity`},Cr={class:`proposal-strip`},wr=[`onClick`],Tr={key:0},Er=[`disabled`],Dr=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`,xr,[e(`div`,Sr,[a(s(Ie),{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`,Cr,[(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,wr))),128)),u.value.length?o(``,!0):(T(),c(`p`,Tr,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(xe),{size:15,"aria-hidden":`true`}),r(` `+i(l.$t(`poivelle.agent.plan`)),1)],8,Er)):o(``,!0)]))}}),[[`__scopeId`,`data-v-81fac9f8`]]),Or={class:`poivelle-studio`},kr={key:0,class:`error-banner`},Ar={key:1,class:`loading-state`},jr={key:2,class:`studio-body`},Mr={class:`projection-workspace`},Nr={class:`projection-content`},Pr={key:3,class:`onboarding`},Fr={key:0,class:`dry-run-summary`},Ir={class:`dry-run-note`},Lr=J(D({__name:`StudioWorkspace`,emits:[`back-home`],setup(n){let u=ke(),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??[]),A=b(()=>p.value?.activeRun),te=b(()=>p.value?.evaluations??[]),j=b(()=>p.value?.forensicValidations??[]),ne=b(()=>p.value?.costs),re=b(()=>p.value?.timeline),M=b(()=>p.value?.projection??`canvas`),N=b(()=>p.value?.selectedNodeId),ie=b(()=>g.value?.nodes.find(e=>e.id===N.value)),P=b(()=>h.value.find(e=>e.id===p.value?.currentProjectId)),F=b(()=>[`owner`,`producer`,`director`,`editor`].includes(p.value?.currentMembership?.role??``)),ae=b(()=>p.value?.dryRun),oe=b(()=>p.value?.error),se=b(()=>[p.value?.status?.bootstrap,p.value?.status?.graph].includes(Oe.Request)),L=E(!1),ue=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:``}),pe=[`script`,`character`,`location`,`prop`,`storyboard`,`scene`,`shot`,`image`,`video`,`audio`,`subtitle`,`composition`,`output`,`note`],me=[`character`,`location`,`prop`,`image`,`video`,`voice`,`music`,`sfx`,`brand`],ge=()=>u.dispatch(`poivelle/bootstrap`),_e=e=>u.dispatch(`poivelle/loadProject`,e),ve=e=>u.dispatch(`poivelle/selectNode`,e),be=e=>u.dispatch(`poivelle/setProjection`,e),xe=()=>{W.workspace_id=p.value?.currentWorkspaceId??m.value[0]?.id??``,z.value=!0},Se=async()=>{U.name.trim()&&await $(async()=>{await u.dispatch(`poivelle/createWorkspace`,{...U,name:U.name.trim()}),ue.value=!1,xe()})},we=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}),be(`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=``})},Te=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=``})},J=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})},Z=e=>u.dispatch(`poivelle/updateSelectedNode`,e),je=async()=>{await De.confirm(q(`poivelle.node.deleteConfirm`),``,{type:`warning`}),await u.dispatch(`poivelle/deleteSelectedNode`)},Me=async()=>{await u.dispatch(`poivelle/commitRevision`,`Studio checkpoint`),Ae.success(q(`poivelle.revision.committed`))},Ne=async()=>{ie.value&&await $(async()=>{await u.dispatch(`poivelle/dryRun`,ie.value?.node_type===`composition`?`compose`:`generate`),H.value=!0})},Fe=async()=>{await $(async()=>{let e=await u.dispatch(`poivelle/confirmDryRun`);H.value=!1,e&&Ae.success(q(`poivelle.run.queued`))})},Ie=e=>{be(`review`),Ae.info(`${q(`poivelle.agent.proposal`)} ${e.slice(-8)}`)},Le=async e=>{await De.confirm(q(`poivelle.review.rejectConfirm`),``,{type:`warning`}),await $(()=>u.dispatch(`poivelle/rejectProposal`,e))},ze=async e=>{await De.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(!re.value)return;let t=re.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`,{...re.value,clips:t}))},Ue=async e=>{await $(async()=>{await u.dispatch(`poivelle/selectTake`,e),Ae.success(q(`poivelle.storyboard.selectionSaved`))})},We=e=>`${(e/1e6).toFixed(2)} credits`,$=async e=>{L.value=!0;try{await e()}catch(e){Ae.error(e?.response?.data?.detail?.message??e?.response?.data?.detail??e?.message??q(`poivelle.error.generic`))}finally{L.value=!1}};return l(ge),(n,l)=>(T(),c(`main`,Or,[a(Ot,{"project-title":P.value?.title,"graph-version":g.value?.graph_version,"can-run":F.value&&!!ie.value,"can-edit":F.value,onOpenProjects:l[0]||=e=>z.value=!0,onHome:l[1]||=e=>n.$emit(`back-home`),onCommit:Me,onRun:Ne},null,8,[`project-title`,`graph-version`,`can-run`,`can-edit`]),oe.value?(T(),c(`div`,kr,[a(s(Ce),{size:15,"aria-hidden":`true`}),e(`span`,null,i(oe.value),1),e(`button`,{type:`button`,onClick:ge},i(n.$t(`poivelle.action.retry`)),1)])):o(``,!0),se.value&&!g.value?(T(),c(`div`,Ar,[a(s(he),{size:25,class:`is-spinning`,"aria-hidden":`true`}),e(`span`,null,i(n.$t(`poivelle.status.loading`)),1)])):P.value&&g.value?(T(),c(`div`,jr,[a(qt,{projects:h.value,"current-project-id":P.value.id,assets:_.value,revisions:O.value,"can-edit":F.value,onSelectProject:_e,onCreateProject:xe,onImportAsset:l[2]||=e=>V.value=!0},null,8,[`projects`,`current-project-id`,`assets`,`revisions`,`can-edit`]),e(`section`,Mr,[a(Xt,{"model-value":M.value,"can-edit":F.value,"onUpdate:modelValue":be,onCreateNode:l[3]||=e=>B.value=!0},null,8,[`model-value`,`can-edit`]),e(`div`,Nr,[M.value===`canvas`?(T(),y(an,{key:0,graph:g.value,"selected-node-id":N.value,"can-edit":F.value,onSelectNode:ve,onCreateNode:l[4]||=e=>B.value=!0},null,8,[`graph`,`selected-node-id`,`can-edit`])):M.value===`storyboard`?(T(),y(Dn,{key:1,graph:g.value,storyboard:D.value,artifacts:v.value,takes:S.value,selections:w.value,"selected-node-id":N.value,"can-edit":F.value,"can-select":F.value&&O.value.length>0,onSelectNode:ve,onSelectTake:Ue},null,8,[`graph`,`storyboard`,`artifacts`,`takes`,`selections`,`selected-node-id`,`can-edit`,`can-select`])):M.value===`timeline`?(T(),y(Yn,{key:2,timeline:re.value,graph:g.value,artifacts:v.value,"can-edit":F.value,onMoveClip:He},null,8,[`timeline`,`graph`,`artifacts`,`can-edit`])):(T(),y(dr,{key:3,graph:g.value,proposals:ee.value,revisions:O.value,runs:k.value,"active-run":A.value,evaluations:te.value,"forensic-validations":j.value,costs:ne.value,"can-edit":F.value,onRejectProposal:Le,onCancelRun:ze,onOpenRun:Be,onRetryStep:Ve},null,8,[`graph`,`proposals`,`revisions`,`runs`,`active-run`,`evaluations`,`forensic-validations`,`costs`,`can-edit`]))]),a(Dr,{proposals:ee.value,"selected-node-id":N.value,skill:P.value.active_skill,"can-edit":F.value,onRun:Ne,onOpenProposal:Ie},null,8,[`proposals`,`selected-node-id`,`skill`,`can-edit`])]),F.value?(T(),y(br,{key:0,node:ie.value,onUpdate:Z,onDelete:je},null,8,[`node`])):o(``,!0)])):(T(),c(`section`,Pr,[l[37]||=e(`div`,{class:`onboarding-number`},`01 / STUDIO`,-1),a(s(Re),{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?F.value?(T(),c(`button`,{key:1,type:`button`,onClick:xe},[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[5]||=e=>ue.value=!0},[a(s(ye),{size:15,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.workspace.create`)),1)]))])),a(s(Ee),{modelValue:ue.value,"onUpdate:modelValue":l[10]||=e=>ue.value=e,title:n.$t(`poivelle.workspace.create`),width:`420px`},{footer:x(()=>[a(s(Y),{onClick:l[9]||=e=>ue.value=!1},{default:x(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),a(s(Y),{type:`primary`,loading:L.value,onClick:Se},{default:x(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:x(()=>[a(s(le),{"label-position":`top`,onSubmit:l[8]||=t(()=>{},[`prevent`])},{default:x(()=>[a(s(R),{label:n.$t(`poivelle.workspace.name`)},{default:x(()=>[a(s(X),{modelValue:U.name,"onUpdate:modelValue":l[6]||=e=>U.name=e,maxlength:`120`,autofocus:``},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.workspace.budget`)},{default:x(()=>[a(s(de),{modelValue:U.monthly_limit_microcredits,"onUpdate:modelValue":l[7]||=e=>U.monthly_limit_microcredits=e,min:0,step:1e6},null,8,[`modelValue`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`modelValue`,`title`]),a(s(Ee),{modelValue:z.value,"onUpdate:modelValue":l[21]||=e=>z.value=e,title:n.$t(`poivelle.project.create`),width:`460px`},{footer:x(()=>[a(s(Y),{onClick:l[20]||=e=>z.value=!1},{default:x(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),a(s(Y),{type:`primary`,loading:L.value,onClick:we},{default:x(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:x(()=>[a(s(le),{"label-position":`top`,onSubmit:l[19]||=t(()=>{},[`prevent`])},{default:x(()=>[a(s(R),{label:n.$t(`poivelle.project.workspace`)},{default:x(()=>[a(s(I),{modelValue:W.workspace_id,"onUpdate:modelValue":l[11]||=e=>W.workspace_id=e,style:{width:`100%`}},{default:x(()=>[(T(!0),c(f,null,C(m.value,e=>(T(),y(s(ce),{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.project.title`)},{default:x(()=>[a(s(X),{modelValue:W.title,"onUpdate:modelValue":l[12]||=e=>W.title=e,maxlength:`200`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.project.workflow`)},{default:x(()=>[a(s(Pe),{modelValue:W.workflow,"onUpdate:modelValue":l[13]||=e=>W.workflow=e,options:fe,block:``},null,8,[`modelValue`])]),_:1},8,[`label`]),W.workflow===`commercial_tvc`?(T(),c(f,{key:0},[a(s(R),{label:n.$t(`poivelle.project.productName`)},{default:x(()=>[a(s(X),{modelValue:W.product_name,"onUpdate:modelValue":l[14]||=e=>W.product_name=e,maxlength:`120`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.project.productCategory`)},{default:x(()=>[a(s(X),{modelValue:W.product_category,"onUpdate:modelValue":l[15]||=e=>W.product_category=e,maxlength:`180`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.project.brandTone`)},{default:x(()=>[a(s(X),{modelValue:W.brand_tone,"onUpdate:modelValue":l[16]||=e=>W.brand_tone=e,type:`textarea`,rows:2,maxlength:`240`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.project.aspectRatio`)},{default:x(()=>[a(s(Pe),{modelValue:W.aspect_ratio,"onUpdate:modelValue":l[17]||=e=>W.aspect_ratio=e,options:[`16:9`,`9:16`,`1:1`]},null,8,[`modelValue`])]),_:1},8,[`label`])],64)):o(``,!0),a(s(R),{label:n.$t(`poivelle.project.skill`)},{default:x(()=>[W.workflow===`blank`?(T(),y(s(I),{key:0,modelValue:W.skill,"onUpdate:modelValue":l[18]||=e=>W.skill=e,style:{width:`100%`}},{default:x(()=>[a(s(ce),{label:`Short drama · professional`,value:`film.drama.short@1.0.0`}),a(s(ce),{label:`Commercial film · professional`,value:`film.commercial@1.0.0`}),a(s(ce),{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(Ee),{modelValue:B.value,"onUpdate:modelValue":l[27]||=e=>B.value=e,title:n.$t(`poivelle.node.create`),width:`460px`},{footer:x(()=>[a(s(Y),{onClick:l[26]||=e=>B.value=!1},{default:x(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),a(s(Y),{type:`primary`,loading:L.value,onClick:Te},{default:x(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:x(()=>[a(s(le),{"label-position":`top`,onSubmit:l[25]||=t(()=>{},[`prevent`])},{default:x(()=>[a(s(R),{label:n.$t(`poivelle.field.type`)},{default:x(()=>[a(s(I),{modelValue:G.node_type,"onUpdate:modelValue":l[22]||=e=>G.node_type=e,style:{width:`100%`}},{default:x(()=>[(T(),c(f,null,C(pe,e=>a(s(ce),{key:e,label:e,value:e},null,8,[`label`,`value`])),64))]),_:1},8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.field.title`)},{default:x(()=>[a(s(X),{modelValue:G.title,"onUpdate:modelValue":l[23]||=e=>G.title=e,maxlength:`240`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.field.prompt`)},{default:x(()=>[a(s(X),{modelValue:G.prompt,"onUpdate:modelValue":l[24]||=e=>G.prompt=e,type:`textarea`,rows:5},null,8,[`modelValue`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`modelValue`,`title`]),a(s(Ee),{modelValue:V.value,"onUpdate:modelValue":l[34]||=e=>V.value=e,title:n.$t(`poivelle.asset.import`),width:`500px`},{footer:x(()=>[a(s(Y),{onClick:l[33]||=e=>V.value=!1},{default:x(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),a(s(Y),{type:`primary`,loading:L.value,onClick:J},{default:x(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:x(()=>[a(s(le),{"label-position":`top`,onSubmit:l[32]||=t(()=>{},[`prevent`])},{default:x(()=>[a(s(R),{label:n.$t(`poivelle.asset.title`)},{default:x(()=>[a(s(X),{modelValue:K.title,"onUpdate:modelValue":l[28]||=e=>K.title=e,maxlength:`240`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.field.type`)},{default:x(()=>[a(s(I),{modelValue:K.kind,"onUpdate:modelValue":l[29]||=e=>K.kind=e,style:{width:`100%`}},{default:x(()=>[(T(),c(f,null,C(me,e=>a(s(ce),{key:e,label:e,value:e},null,8,[`label`,`value`])),64))]),_:1},8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.asset.url`)},{default:x(()=>[a(s(X),{modelValue:K.source_url,"onUpdate:modelValue":l[30]||=e=>K.source_url=e},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.asset.hash`)},{default:x(()=>[a(s(X),{modelValue:K.content_hash,"onUpdate:modelValue":l[31]||=e=>K.content_hash=e,placeholder:`sha256:...`},null,8,[`modelValue`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`modelValue`,`title`]),a(s(Ee),{modelValue:H.value,"onUpdate:modelValue":l[36]||=e=>H.value=e,title:n.$t(`poivelle.run.confirmTitle`),width:`520px`},{footer:x(()=>[a(s(Y),{onClick:l[35]||=e=>H.value=!1},{default:x(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),a(s(Y),{type:`primary`,loading:L.value,onClick:Fe},{default:x(()=>[r(i(n.$t(`poivelle.run.confirm`)),1)]),_:1},8,[`loading`])]),default:x(()=>[ae.value?(T(),c(`div`,Fr,[e(`div`,null,[e(`span`,null,i(n.$t(`poivelle.run.targets`)),1),e(`strong`,null,i(ae.value.dependency_closure.length),1)]),e(`div`,null,[e(`span`,null,i(n.$t(`poivelle.run.maximum`)),1),e(`strong`,null,i(We(ae.value.max_cost_microcredits)),1)]),e(`div`,null,[e(`span`,null,i(n.$t(`poivelle.run.approval`)),1),e(`strong`,null,i(ae.value.required_approval),1)])])):o(``,!0),e(`p`,Ir,i(n.$t(`poivelle.run.confirmBody`)),1)]),_:1},8,[`modelValue`,`title`])]))}}),[[`__scopeId`,`data-v-1c683780`]]),Rr=D({__name:`Index`,setup(e){let t=E(`discovery`);return(e,n)=>t.value===`discovery`?(T(),y(vt,{key:0,onOpenStudio:n[0]||=e=>t.value=`studio`})):(T(),y(Lr,{key:1,onBackHome:n[1]||=e=>t.value=`discovery`}))}});export{Rr as default};
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,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 A,n as te,r as j,s as ne}from"./runtime-BTM7t9of.js";import{a as re,c as M,dt as N,ht as ie,i as P,it as F,n as ae,r as oe,yt as se}from"./use-deprecated-r4dlLNqm.js";import{r as I,t as ce}from"./select-DW3H8Cyb.js";import{t as L}from"./use-aria-9DurtVZO.js";import{n as R,t as le}from"./form-BNJ9LdPs.js";import{r as ue,t as z}from"./event-BGnHezxC.js";import{t as de}from"./input-number-BNYhheHb.js";import{t as B}from"./arrow-left-B-8iA8wZ.js";import{t as V}from"./arrow-up-D-ZWAKKl.js";import{t as H}from"./box-DQH9ZwMN.js";import{t as U}from"./chevron-down-BkvFp-m4.js";import{t as W}from"./chevron-right-CL3rv5CF.js";import{t as fe}from"./copy-kbq6MzCp.js";import{t as G}from"./download-DKwe5970.js";import{t as K}from"./file-text-DANeqGNd.js";import{t as pe}from"./history--yhLvc2u.js";import{t as me}from"./image-ti3oDtsv.js";import{t as he}from"./loader-circle-zBaix28P.js";import{t as ge}from"./mouse-pointer-2-CeLJ2sII.js";import{t as _e}from"./music-2-BP_3MsIr.js";import{t as ve}from"./play-BiSrmze1.js";import{t as ye}from"./plus-DOl_NN3y.js";import{t as be}from"./search-j0x-njM7.js";import{t as xe}from"./sparkles-DvfrOl7a.js";import{t as Se}from"./trash-2-Calt7aGA.js";import{t as Ce}from"./triangle-alert-Bm11tXxr.js";import{t as we}from"./upload-Bd3dUhzA.js";import{t as Te}from"./video-BRA4fel-.js";import{i as q}from"./i18n-m-rMtkos.js";import{Ci as Ee,E as J,Mi as Y,Vi as X,_i as De,gi as Z,ni as Oe,ri as ke,vi as Ae}from"./index-DN3R8m7E.js";var je={label:`label`,value:`value`,disabled:`disabled`},Me=te({direction:{type:j(String),default:`horizontal`},options:{type:j(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},props:{type:j(Object),default:()=>je},block:Boolean,size:F,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...L([`ariaLabel`])}),Ne={[ue]:e=>m(e)||ne(e)||A(e),[z]:e=>m(e)||ne(e)||A(e)},Pe=k(O(D({...D({name:`ElSegmented`}),props:Me,emits:Ne,setup(t,{emit:a}){let l=t,u=ee(`segmented`),m=M(),h=oe(),_=ae(),{formItem:y}=P(),{inputId:x,isLabeledByFormItem:w}=re(l,{formItemContext:y}),D=E(null),O=ie(),k=d({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),A=e=>{let t=j(e);a(ue,t),a(z,t)},te=b(()=>({...je,...l.props})),j=e=>p(e)?e[te.value.value]:e,ne=e=>p(e)?e[te.value.label]:e,F=e=>!!(_.value||p(e)&&e[te.value.disabled]),I=e=>l.modelValue===j(e),ce=e=>l.options.find(t=>j(t)===e),L=e=>[u.e(`item`),u.is(`selected`,I(e)),u.is(`disabled`,F(e))],R=()=>{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{}},le=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`,F(ce(l.modelValue))),u.is(`focus-visible`,k.focusVisible)]),V=b(()=>l.name||m.value);return se(D,R),g(O,R),g(()=>l.modelValue,()=>{var e;R(),l.validateEvent&&((e=y?.validate)==null||e.call(y,`change`).catch(e=>N(e)))},{flush:`post`}),(t,a)=>t.options.length?(T(),c(`div`,{key:0,id:s(x),ref_key:`segmentedRef`,ref:D,class:n(s(le)),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(L(a))},[e(`input`,{class:n(s(u).e(`item-input`)),type:`radio`,name:s(V),disabled:F(a),checked:I(a),onChange:e=>A(a)},null,42,[`name`,`disabled`,`checked`,`onChange`]),e(`div`,{class:n(s(u).e(`item-label`))},[v(t.$slots,`default`,{item:a},()=>[r(i(ne(a)),1)])],2)],2))),128))],2)],10,[`id`,`aria-label`,`aria-labelledby`])):o(`v-if`,!0)}}),[[`__file`,`segmented.vue`]])),Fe=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`}]]),Ie=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`}]]),Le=Z(`building-2`,[[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]]),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`}]]),Re=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`}]]),ze=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`}]]),Be=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`}]]),Ve=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`}]]),He=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`}]]),Ue=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`}]]),We={class:`discovery-home`},$={class:`discovery-header`},Ge={class:`brand`},Ke={class:`project-links`},qe=[`title`,`aria-label`,`onClick`],Je={key:0,class:`discovery-state`,role:`status`},Ye={class:`creator`,"aria-labelledby":`poivelle-create-title`},Xe={class:`creator-kicker`},Ze={id:`poivelle-create-title`},Qe=[`aria-label`],$e=[`disabled`,`onClick`],et=[`placeholder`,`disabled`],tt={class:`composer-footer`},nt=[`disabled`,`title`],rt={class:`prompt-starters`},it=[`disabled`,`onClick`],at={class:`works`,"aria-labelledby":`poivelle-works-title`},ot={class:`works-heading`},st={id:`poivelle-works-title`},ct={class:`search`},lt=[`placeholder`,`aria-label`],ut={class:`category-tabs`},dt=[`onClick`],ft={class:`work-grid`},pt={class:`cover`},mt=[`src`,`alt`,`onError`],ht={class:`work-copy`},gt={class:`work-meta`},_t=[`disabled`,`onClick`],vt=J(D({__name:`DiscoveryHome`,emits:[`open-studio`],setup(u,{emit:d}){let p=d,m=ke(),g=b(()=>m.state.poivelle),v=b(()=>g.value?.projects??[]),x=b(()=>g.value?.discoveryWorks??[]),S=E(``),D=E(``),O=E(!1),ee=E(new Set),k=E(`official:pulsecam`),A=E(`all`),te=[{workId:`official:pulsecam`,label:`poivelle.discovery.commercial`,icon:Q},{workId:`official:moonlit-signal`,label:`poivelle.discovery.musicVideo`,icon:_e},{workId:`official:northstar-origin`,label:`poivelle.discovery.documentary`,icon:Le}],j=[`poivelle.discovery.starterProduct`,`poivelle.discovery.starterMusic`,`poivelle.discovery.starterDocumentary`],ne=[{value:`all`,label:`poivelle.discovery.all`},{value:`commercial`,label:`poivelle.discovery.commercial`},{value:`music_video`,label:`poivelle.discovery.musicVideo`},{value:`documentary`,label:`poivelle.discovery.documentary`},{value:`community`,label:`poivelle.discovery.community`}],re=b(()=>{let e=D.value.trim().toLowerCase();return x.value.filter(t=>(A.value===`all`||t.category===A.value)&&(!e||`${t.title} ${t.description} ${t.creator_name} ${(t.tags??[]).join(` `)}`.toLowerCase().includes(e)))}),M=b(()=>g.value?.status?.bootstrap===Oe.Request),N=b(()=>g.value?.error),ie=b(()=>x.value.find(e=>e.id===k.value)??x.value[0]),P=()=>m.dispatch(`poivelle/bootstrap`,{loadProject:!1}),F=e=>{ee.value=new Set([...ee.value,e])},ae=async e=>{await m.dispatch(`poivelle/loadProject`,e),p(`open-studio`)},oe=async(e,t)=>{if(!O.value){O.value=!0;try{await m.dispatch(`poivelle/copyDiscoveryWork`,{work_id:e.id,prompt:t,title:t.slice(0,80)}),p(`open-studio`)}catch(e){Ae.error(e?.message??q(`poivelle.error.generic`))}finally{O.value=!1}}},se=async()=>{let e=ie.value;e&&S.value.trim()&&await oe(e,S.value.trim())},I=async e=>{await oe(e,S.value.trim()||`${q(`poivelle.discovery.copyPrefix`)} ${e.title}`)};return l(P),(l,u)=>(T(),c(`main`,We,[e(`header`,$,[e(`div`,Ge,[a(s(Q),{size:19,"aria-hidden":`true`}),u[2]||=r(` POIVELLE`,-1)]),e(`div`,Ke,[(T(!0),c(f,null,C(v.value.slice(0,3),e=>(T(),c(`button`,{key:e.id,type:`button`,title:e.title,"aria-label":e.title,onClick:t=>ae(e.id)},[r(i(e.title)+` `,1),a(s(W),{size:13,"aria-hidden":`true`})],8,qe))),128))])]),M.value||N.value?(T(),c(`div`,Je,[M.value?(T(),y(s(he),{key:0,size:16,class:`spinning`,"aria-hidden":`true`})):o(``,!0),e(`span`,null,i(M.value?l.$t(`poivelle.status.loading`):N.value),1),N.value?(T(),c(`button`,{key:1,type:`button`,onClick:P},i(l.$t(`poivelle.action.retry`)),1)):o(``,!0)])):o(``,!0),e(`section`,Ye,[e(`p`,Xe,i(l.$t(`poivelle.discovery.kicker`)),1),e(`h1`,Ze,i(l.$t(`poivelle.discovery.title`)),1),e(`div`,{class:`mode-switch`,"aria-label":l.$t(`poivelle.discovery.skills`)},[(T(),c(f,null,C(te,t=>e(`button`,{key:t.workId,type:`button`,class:n({active:k.value===t.workId}),disabled:M.value,onClick:e=>k.value=t.workId},[(T(),y(w(t.icon),{size:15,"aria-hidden":`true`})),r(` `+i(l.$t(t.label)),1)],10,$e)),64))],8,Qe),e(`form`,{class:`composer`,onSubmit:t(se,[`prevent`])},[_(e(`textarea`,{"onUpdate:modelValue":u[0]||=e=>S.value=e,placeholder:l.$t(`poivelle.discovery.placeholder`),disabled:M.value,maxlength:`500`,rows:`4`},null,8,et),[[h,S.value]]),e(`div`,tt,[e(`span`,null,i(S.value.length)+`/500`,1),e(`button`,{type:`submit`,disabled:!S.value.trim()||!ie.value||M.value||O.value,title:l.$t(`poivelle.discovery.create`)},[O.value?(T(),y(s(he),{key:0,size:18,class:`spinning`,"aria-hidden":`true`})):(T(),y(s(V),{key:1,size:18,"aria-hidden":`true`}))],8,nt)])],32),e(`div`,rt,[(T(),c(f,null,C(j,t=>e(`button`,{key:t,type:`button`,disabled:M.value,onClick:e=>S.value=l.$t(t)},i(l.$t(t)),9,it)),64))])]),e(`section`,at,[e(`div`,ot,[e(`div`,null,[e(`span`,null,i(l.$t(`poivelle.discovery.galleryKicker`)),1),e(`h2`,st,i(l.$t(`poivelle.discovery.gallery`)),1)]),e(`label`,ct,[a(s(be),{size:16,"aria-hidden":`true`}),_(e(`input`,{"onUpdate:modelValue":u[1]||=e=>D.value=e,placeholder:l.$t(`poivelle.discovery.search`),"aria-label":l.$t(`poivelle.discovery.search`)},null,8,lt),[[h,D.value]])])]),e(`div`,ut,[(T(),c(f,null,C(ne,t=>e(`button`,{key:t.value,type:`button`,class:n({active:A.value===t.value}),onClick:e=>A.value=t.value},i(l.$t(t.label)),11,dt)),64))]),e(`div`,ft,[(T(!0),c(f,null,C(re.value,t=>(T(),c(`article`,{key:t.id,class:`work-card`},[e(`div`,pt,[t.cover_url&&!ee.value.has(t.id)?(T(),c(`img`,{key:0,src:t.cover_url,alt:t.title,loading:`lazy`,onError:e=>F(t.id)},null,40,mt)):(T(),y(s(Re),{key:1,size:32,"aria-hidden":`true`})),e(`span`,null,i(t.duration_seconds?`${t.duration_seconds}s`:l.$t(`poivelle.discovery.community`)),1)]),e(`div`,ht,[e(`div`,gt,[e(`span`,null,i(t.creator_name),1),e(`strong`,null,i(t.title),1),e(`p`,null,i(t.description),1)]),e(`button`,{type:`button`,disabled:M.value||O.value,onClick:e=>I(t)},[a(s(fe),{size:14,"aria-hidden":`true`}),r(` `+i(l.$t(`poivelle.discovery.copy`)),1)],8,_t)])]))),128))])])]))}}),[[`__scopeId`,`data-v-d0d58a50`]]),yt={class:`studio-header`},bt={class:`identity`},xt=[`title`],St={class:`wordmark`},Ct={key:0,class:`version`},wt={class:`actions`},Tt={class:`sync-state`},Et=[`title`],Dt=[`disabled`],Ot=J(D({__name:`StudioHeader`,props:{projectTitle:{},graphVersion:{},canRun:{type:Boolean},canEdit:{type:Boolean}},emits:[`open-projects`,`home`,`commit`,`run`],setup(t){return(n,l)=>(T(),c(`header`,yt,[e(`div`,bt,[e(`button`,{class:`home-button`,type:`button`,title:n.$t(`poivelle.discovery.back`),onClick:l[0]||=e=>n.$emit(`home`)},[a(s(B),{size:16,"aria-hidden":`true`})],8,xt),e(`span`,St,[a(s(Q),{size:15,"aria-hidden":`true`}),l[4]||=r(` POIVELLE`,-1)]),e(`button`,{class:`project-button`,type:`button`,onClick:l[1]||=e=>n.$emit(`open-projects`)},[e(`span`,null,i(t.projectTitle||n.$t(`poivelle.project.noProject`)),1),a(s(U),{size:14,"aria-hidden":`true`})]),t.graphVersion===void 0?o(``,!0):(T(),c(`span`,Ct,`Graph v`+i(t.graphVersion),1))]),e(`div`,wt,[e(`span`,Tt,[l[5]||=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[2]||=e=>n.$emit(`commit`)},[a(s(ze),{size:17,"aria-hidden":`true`})],8,Et)):o(``,!0),e(`button`,{class:`primary-button`,type:`button`,disabled:!t.canRun,onClick:l[3]||=e=>n.$emit(`run`)},[a(s(ve),{size:15,fill:`currentColor`,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.action.runSkill`)),1)],8,Dt)])]))}}),[[`__scopeId`,`data-v-8329a116`]]),kt={class:`production-rail`},At={class:`rail-section`},jt={class:`section-heading`},Mt=[`title`],Nt={class:`project-list`},Pt=[`onClick`],Ft={key:0,class:`empty-copy`},It={class:`rail-section assets-section`},Lt={class:`section-heading`},Rt=[`title`],zt={class:`asset-filters`},Bt=[`onClick`],Vt={class:`asset-list`},Ht={key:0,class:`empty-copy`},Ut={class:`rail-section compact-section`},Wt={class:`section-heading static`},Gt={class:`revision-list`},Kt={key:0,class:`empty-copy`},qt=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`?Te:e===`voice`||e===`music`||e===`sfx`?Fe:e===`script`||e===`brand`?K:me;return(r,m)=>(T(),c(`aside`,kt,[e(`div`,At,[e(`div`,jt,[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(ye),{size:15,"aria-hidden":`true`})],8,Mt)):o(``,!0)]),e(`div`,Nt,[(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,Pt))),128)),t.projects.length?o(``,!0):(T(),c(`p`,Ft,i(r.$t(`poivelle.project.empty`)),1))])]),e(`div`,It,[e(`div`,Lt,[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(we),{size:15,"aria-hidden":`true`})],8,Rt)):o(``,!0)]),e(`div`,zt,[(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,Bt)),64))]),e(`div`,Vt,[(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`,Ht,i(r.$t(`poivelle.asset.empty`)),1))])]),e(`div`,Ut,[e(`div`,Wt,[e(`span`,null,i(r.$t(`poivelle.section.revisions`)),1),a(s(pe),{size:14,"aria-hidden":`true`})]),e(`div`,Gt,[(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`,Kt,i(r.$t(`poivelle.revision.empty`)),1))])])]))}}),[[`__scopeId`,`data-v-24e37657`]]),Jt=[`aria-label`],Yt=[`onClick`],Xt=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:Be},{value:`storyboard`,label:`poivelle.projection.storyboard`,icon:Q},{value:`timeline`,label:`poivelle.projection.timeline`,icon:Ue},{value:`review`,label:`poivelle.projection.review`,icon:Ve}];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,Yt)),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(ye),{size:14,"aria-hidden":`true`}),r(` `+i(u.$t(`poivelle.node.create`)),1)])):o(``,!0)],8,Jt))}}),[[`__scopeId`,`data-v-bea5d208`]]),Zt={class:`connections`,"aria-hidden":`true`},Qt=[`x1`,`y1`,`x2`,`y2`],$t=[`onClick`],en={class:`node-type`},tn={class:`node-summary`},nn={key:0,class:`lock-mark`},rn={key:0,class:`empty-canvas`},an=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`,Zt,[(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,Qt))),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`,en,i(f.node_type),1),e(`strong`,null,i(f.title),1),e(`span`,tn,i(v(f)),1),f.locked_paths.length?(T(),c(`span`,nn,[a(s(He),{size:11}),d[2]||=r(` locked`,-1)])):o(``,!0)],14,$t))),128)),l.graph.nodes.length?o(``,!0):(T(),c(`div`,rn,[a(s(Be),{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(ye),{size:15,"aria-hidden":`true`}),r(` `+i(u.$t(`poivelle.node.create`)),1)])):o(``,!0)]))]))}}),[[`__scopeId`,`data-v-cd67c1fc`]]),on={class:`media-lane`},sn={key:0,class:`candidate-strip`},cn=[`src`],ln=[`src`],un=[`onClick`],dn={key:1},fn=[`onClick`],pn={key:1,class:`unavailable-takes`},mn={key:2,class:`empty-candidates`},hn=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`,on,[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`,sn,[(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,cn)):(T(),c(`video`,{key:1,src:a.artifact.storage_url,controls:``,preload:`metadata`},null,8,ln)),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,un)):a.selected?(T(),c(`em`,dn,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,fn)])],2))),128))])):o(``,!0),s.value.length?(T(),c(`div`,pn,[(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`,mn,i(r.$t(`poivelle.storyboard.noCandidates`)),1)):o(``,!0)]))}}),[[`__scopeId`,`data-v-4e385f6a`]]),gn={class:`storyboard-view`},_n={key:0,class:`storyboard-heading`},vn={class:`section-label`},yn=[`onClick`],bn={class:`shot-number`},xn={class:`shot-production`},Sn={class:`shot-metadata`},Cn={class:`prompt-columns`},wn={class:`candidate-columns`},Tn=[`onClick`],En={key:0,class:`empty-view`},Dn=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`,gn,[t.storyboard?(T(),c(`header`,_n,[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`,vn,[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`,bn,`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,yn),e(`div`,xn,[e(`dl`,Sn,[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`,Cn,[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`,wn,[a(hn,{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(hn,{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,Tn))),128)),u.value.length?o(``,!0):(T(),c(`div`,En,[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`]]),On={class:`timeline-view`},kn={key:0,class:`master-output`,"aria-labelledby":`poivelle-master-title`},An={class:`master-heading`},jn={class:`master-kicker`},Mn={id:`poivelle-master-title`},Nn=[`href`],Pn=[`src`,`aria-label`],Fn={key:0,class:`master-status`,role:`status`},In={key:1,class:`master-status is-error`,role:`alert`},Ln={class:`master-metadata`},Rn={class:`timeline-ruler`},zn={key:1,class:`tracks`},Bn={class:`track-label`},Vn={class:`track-lane`},Hn=[`title`],Un=[`aria-label`],Wn={key:0,class:`clip-actions`},Gn=[`disabled`,`onClick`],Kn=[`disabled`,`onClick`],qn={key:2,class:`empty-timeline`},Jn=120/5e3,Yn=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*Jn}px`,width:`${Math.max(48,(e.source_out_ms-e.source_in_ms)/(e.speed??1)*Jn)}px`});return(n,g)=>(T(),c(`div`,On,[l.value?(T(),c(`section`,kn,[e(`div`,An,[e(`div`,null,[e(`span`,jn,i(n.$t(`poivelle.timeline.deliverable`)),1),e(`h2`,Mn,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(G),{size:15,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.timeline.download`)),1)],8,Nn)]),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,Pn),u.value&&!d.value?(T(),c(`div`,Fn,[a(s(he),{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`,In,[a(s(Ce),{size:24,"aria-hidden":`true`}),e(`span`,null,i(n.$t(`poivelle.timeline.loadError`)),1)])):o(``,!0)],4),e(`dl`,Ln,[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`,Rn,[(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`,zn,[(T(!0),c(f,null,C(t.timeline.tracks,r=>(T(),c(`div`,{key:r.id,class:`track-row`},[e(`div`,Bn,i(r.title||r.kind||r.id),1),e(`div`,Vn,[(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,Un),t.canEdit&&r.kind===`video`?(T(),c(`span`,Wn,[e(`button`,{type:`button`,disabled:s===0,onClick:e=>n.$emit(`move-clip`,{trackId:r.id,clipId:a.id,direction:-1})},` ‹ `,8,Gn),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,Kn)])):o(``,!0)],12,Hn))),128))])]))),128))])):(T(),c(`div`,qn,[a(s(Re),{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`]]),Xn={class:`review-view`},Zn={class:`review-summary`},Qn={class:`eyebrow`},$n={class:`summary-metrics`},er={class:`review-columns`},tr={key:0,class:`item-actions`},nr=[`onClick`],rr={key:0,class:`empty-copy`},ir=[`onClick`],ar=[`onClick`],or={key:0,class:`empty-copy`},sr={key:1,class:`run-detail`},cr={key:0},lr=[`onClick`],ur={key:2,class:`forensic-failures`,role:`alert`},dr=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`,Xn,[e(`section`,Zn,[e(`div`,null,[e(`span`,Qn,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`,$n,[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`,er,[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`,tr,[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,nr)])):o(``,!0)]))),128)),l.value.length?o(``,!0):(T(),c(`p`,rr,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,ar)):o(``,!0)],10,ir))),128)),a.runs.length?o(``,!0):(T(),c(`p`,or,i(s.$t(`poivelle.review.noRuns`)),1)),a.activeRun?(T(),c(`section`,sr,[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`,cr,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,lr)):o(``,!0)]))),128))])):o(``,!0),m.value.length?(T(),c(`section`,ur,[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`]]),fr={class:`inspector-panel`},pr={class:`inspector-heading`},mr={class:`field`},hr={class:`field`},gr=[`value`],_r={class:`field grow`},vr={class:`node-meta`},yr={key:1,class:`empty-inspector`},br=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`?Te:o.node.node_type===`audio`?Fe:[`shot`,`scene`,`storyboard`].includes(o.node.node_type)?Q:[`image`,`character`,`location`].includes(o.node.node_type)?me:o.node.node_type===`script`||o.node.node_type===`text`?K:H:ge),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`,fr,[e(`div`,pr,[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`,mr,[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`,hr,[e(`span`,null,i(n.$t(`poivelle.field.type`)),1),e(`input`,{value:t.node.node_type,type:`text`,disabled:``},null,8,gr)]),e(`label`,_r,[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`,vr,[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(Se),{size:14,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.node.delete`)),1)])],64)):(T(),c(`div`,yr,[a(s(ge),{size:24,"stroke-width":`1.4`}),e(`p`,null,i(n.$t(`poivelle.inspector.empty`)),1)]))]))}}),[[`__scopeId`,`data-v-7a6ae318`]]),xr={class:`agent-dock`},Sr={class:`agent-identity`},Cr={class:`proposal-strip`},wr=[`onClick`],Tr={key:0},Er=[`disabled`],Dr=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`,xr,[e(`div`,Sr,[a(s(Ie),{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`,Cr,[(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,wr))),128)),u.value.length?o(``,!0):(T(),c(`p`,Tr,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(xe),{size:15,"aria-hidden":`true`}),r(` `+i(l.$t(`poivelle.agent.plan`)),1)],8,Er)):o(``,!0)]))}}),[[`__scopeId`,`data-v-81fac9f8`]]),Or={class:`poivelle-studio`},kr={key:0,class:`error-banner`},Ar={key:1,class:`loading-state`},jr={key:2,class:`studio-body`},Mr={class:`projection-workspace`},Nr={class:`projection-content`},Pr={key:3,class:`onboarding`},Fr={key:0,class:`dry-run-summary`},Ir={class:`dry-run-note`},Lr=J(D({__name:`StudioWorkspace`,emits:[`back-home`],setup(n){let u=ke(),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??[]),A=b(()=>p.value?.activeRun),te=b(()=>p.value?.evaluations??[]),j=b(()=>p.value?.forensicValidations??[]),ne=b(()=>p.value?.costs),re=b(()=>p.value?.timeline),M=b(()=>p.value?.projection??`canvas`),N=b(()=>p.value?.selectedNodeId),ie=b(()=>g.value?.nodes.find(e=>e.id===N.value)),P=b(()=>h.value.find(e=>e.id===p.value?.currentProjectId)),F=b(()=>[`owner`,`producer`,`director`,`editor`].includes(p.value?.currentMembership?.role??``)),ae=b(()=>p.value?.dryRun),oe=b(()=>p.value?.error),se=b(()=>[p.value?.status?.bootstrap,p.value?.status?.graph].includes(Oe.Request)),L=E(!1),ue=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:``}),pe=[`script`,`character`,`location`,`prop`,`storyboard`,`scene`,`shot`,`image`,`video`,`audio`,`subtitle`,`composition`,`output`,`note`],me=[`character`,`location`,`prop`,`image`,`video`,`voice`,`music`,`sfx`,`brand`],ge=()=>u.dispatch(`poivelle/bootstrap`),_e=e=>u.dispatch(`poivelle/loadProject`,e),ve=e=>u.dispatch(`poivelle/selectNode`,e),be=e=>u.dispatch(`poivelle/setProjection`,e),xe=()=>{W.workspace_id=p.value?.currentWorkspaceId??m.value[0]?.id??``,z.value=!0},Se=async()=>{U.name.trim()&&await $(async()=>{await u.dispatch(`poivelle/createWorkspace`,{...U,name:U.name.trim()}),ue.value=!1,xe()})},we=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}),be(`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=``})},Te=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=``})},J=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})},Z=e=>u.dispatch(`poivelle/updateSelectedNode`,e),je=async()=>{await De.confirm(q(`poivelle.node.deleteConfirm`),``,{type:`warning`}),await u.dispatch(`poivelle/deleteSelectedNode`)},Me=async()=>{await u.dispatch(`poivelle/commitRevision`,`Studio checkpoint`),Ae.success(q(`poivelle.revision.committed`))},Ne=async()=>{ie.value&&await $(async()=>{await u.dispatch(`poivelle/dryRun`,ie.value?.node_type===`composition`?`compose`:`generate`),H.value=!0})},Fe=async()=>{await $(async()=>{let e=await u.dispatch(`poivelle/confirmDryRun`);H.value=!1,e&&Ae.success(q(`poivelle.run.queued`))})},Ie=e=>{be(`review`),Ae.info(`${q(`poivelle.agent.proposal`)} ${e.slice(-8)}`)},Le=async e=>{await De.confirm(q(`poivelle.review.rejectConfirm`),``,{type:`warning`}),await $(()=>u.dispatch(`poivelle/rejectProposal`,e))},ze=async e=>{await De.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(!re.value)return;let t=re.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`,{...re.value,clips:t}))},Ue=async e=>{await $(async()=>{await u.dispatch(`poivelle/selectTake`,e),Ae.success(q(`poivelle.storyboard.selectionSaved`))})},We=e=>`${(e/1e6).toFixed(2)} credits`,$=async e=>{L.value=!0;try{await e()}catch(e){Ae.error(e?.response?.data?.detail?.message??e?.response?.data?.detail??e?.message??q(`poivelle.error.generic`))}finally{L.value=!1}};return l(ge),(n,l)=>(T(),c(`main`,Or,[a(Ot,{"project-title":P.value?.title,"graph-version":g.value?.graph_version,"can-run":F.value&&!!ie.value,"can-edit":F.value,onOpenProjects:l[0]||=e=>z.value=!0,onHome:l[1]||=e=>n.$emit(`back-home`),onCommit:Me,onRun:Ne},null,8,[`project-title`,`graph-version`,`can-run`,`can-edit`]),oe.value?(T(),c(`div`,kr,[a(s(Ce),{size:15,"aria-hidden":`true`}),e(`span`,null,i(oe.value),1),e(`button`,{type:`button`,onClick:ge},i(n.$t(`poivelle.action.retry`)),1)])):o(``,!0),se.value&&!g.value?(T(),c(`div`,Ar,[a(s(he),{size:25,class:`is-spinning`,"aria-hidden":`true`}),e(`span`,null,i(n.$t(`poivelle.status.loading`)),1)])):P.value&&g.value?(T(),c(`div`,jr,[a(qt,{projects:h.value,"current-project-id":P.value.id,assets:_.value,revisions:O.value,"can-edit":F.value,onSelectProject:_e,onCreateProject:xe,onImportAsset:l[2]||=e=>V.value=!0},null,8,[`projects`,`current-project-id`,`assets`,`revisions`,`can-edit`]),e(`section`,Mr,[a(Xt,{"model-value":M.value,"can-edit":F.value,"onUpdate:modelValue":be,onCreateNode:l[3]||=e=>B.value=!0},null,8,[`model-value`,`can-edit`]),e(`div`,Nr,[M.value===`canvas`?(T(),y(an,{key:0,graph:g.value,"selected-node-id":N.value,"can-edit":F.value,onSelectNode:ve,onCreateNode:l[4]||=e=>B.value=!0},null,8,[`graph`,`selected-node-id`,`can-edit`])):M.value===`storyboard`?(T(),y(Dn,{key:1,graph:g.value,storyboard:D.value,artifacts:v.value,takes:S.value,selections:w.value,"selected-node-id":N.value,"can-edit":F.value,"can-select":F.value&&O.value.length>0,onSelectNode:ve,onSelectTake:Ue},null,8,[`graph`,`storyboard`,`artifacts`,`takes`,`selections`,`selected-node-id`,`can-edit`,`can-select`])):M.value===`timeline`?(T(),y(Yn,{key:2,timeline:re.value,graph:g.value,artifacts:v.value,"can-edit":F.value,onMoveClip:He},null,8,[`timeline`,`graph`,`artifacts`,`can-edit`])):(T(),y(dr,{key:3,graph:g.value,proposals:ee.value,revisions:O.value,runs:k.value,"active-run":A.value,evaluations:te.value,"forensic-validations":j.value,costs:ne.value,"can-edit":F.value,onRejectProposal:Le,onCancelRun:ze,onOpenRun:Be,onRetryStep:Ve},null,8,[`graph`,`proposals`,`revisions`,`runs`,`active-run`,`evaluations`,`forensic-validations`,`costs`,`can-edit`]))]),a(Dr,{proposals:ee.value,"selected-node-id":N.value,skill:P.value.active_skill,"can-edit":F.value,onRun:Ne,onOpenProposal:Ie},null,8,[`proposals`,`selected-node-id`,`skill`,`can-edit`])]),F.value?(T(),y(br,{key:0,node:ie.value,onUpdate:Z,onDelete:je},null,8,[`node`])):o(``,!0)])):(T(),c(`section`,Pr,[l[37]||=e(`div`,{class:`onboarding-number`},`01 / STUDIO`,-1),a(s(Re),{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?F.value?(T(),c(`button`,{key:1,type:`button`,onClick:xe},[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[5]||=e=>ue.value=!0},[a(s(ye),{size:15,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.workspace.create`)),1)]))])),a(s(Ee),{modelValue:ue.value,"onUpdate:modelValue":l[10]||=e=>ue.value=e,title:n.$t(`poivelle.workspace.create`),width:`420px`},{footer:x(()=>[a(s(Y),{onClick:l[9]||=e=>ue.value=!1},{default:x(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),a(s(Y),{type:`primary`,loading:L.value,onClick:Se},{default:x(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:x(()=>[a(s(le),{"label-position":`top`,onSubmit:l[8]||=t(()=>{},[`prevent`])},{default:x(()=>[a(s(R),{label:n.$t(`poivelle.workspace.name`)},{default:x(()=>[a(s(X),{modelValue:U.name,"onUpdate:modelValue":l[6]||=e=>U.name=e,maxlength:`120`,autofocus:``},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.workspace.budget`)},{default:x(()=>[a(s(de),{modelValue:U.monthly_limit_microcredits,"onUpdate:modelValue":l[7]||=e=>U.monthly_limit_microcredits=e,min:0,step:1e6},null,8,[`modelValue`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`modelValue`,`title`]),a(s(Ee),{modelValue:z.value,"onUpdate:modelValue":l[21]||=e=>z.value=e,title:n.$t(`poivelle.project.create`),width:`460px`},{footer:x(()=>[a(s(Y),{onClick:l[20]||=e=>z.value=!1},{default:x(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),a(s(Y),{type:`primary`,loading:L.value,onClick:we},{default:x(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:x(()=>[a(s(le),{"label-position":`top`,onSubmit:l[19]||=t(()=>{},[`prevent`])},{default:x(()=>[a(s(R),{label:n.$t(`poivelle.project.workspace`)},{default:x(()=>[a(s(I),{modelValue:W.workspace_id,"onUpdate:modelValue":l[11]||=e=>W.workspace_id=e,style:{width:`100%`}},{default:x(()=>[(T(!0),c(f,null,C(m.value,e=>(T(),y(s(ce),{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.project.title`)},{default:x(()=>[a(s(X),{modelValue:W.title,"onUpdate:modelValue":l[12]||=e=>W.title=e,maxlength:`200`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.project.workflow`)},{default:x(()=>[a(s(Pe),{modelValue:W.workflow,"onUpdate:modelValue":l[13]||=e=>W.workflow=e,options:fe,block:``},null,8,[`modelValue`])]),_:1},8,[`label`]),W.workflow===`commercial_tvc`?(T(),c(f,{key:0},[a(s(R),{label:n.$t(`poivelle.project.productName`)},{default:x(()=>[a(s(X),{modelValue:W.product_name,"onUpdate:modelValue":l[14]||=e=>W.product_name=e,maxlength:`120`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.project.productCategory`)},{default:x(()=>[a(s(X),{modelValue:W.product_category,"onUpdate:modelValue":l[15]||=e=>W.product_category=e,maxlength:`180`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.project.brandTone`)},{default:x(()=>[a(s(X),{modelValue:W.brand_tone,"onUpdate:modelValue":l[16]||=e=>W.brand_tone=e,type:`textarea`,rows:2,maxlength:`240`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.project.aspectRatio`)},{default:x(()=>[a(s(Pe),{modelValue:W.aspect_ratio,"onUpdate:modelValue":l[17]||=e=>W.aspect_ratio=e,options:[`16:9`,`9:16`,`1:1`]},null,8,[`modelValue`])]),_:1},8,[`label`])],64)):o(``,!0),a(s(R),{label:n.$t(`poivelle.project.skill`)},{default:x(()=>[W.workflow===`blank`?(T(),y(s(I),{key:0,modelValue:W.skill,"onUpdate:modelValue":l[18]||=e=>W.skill=e,style:{width:`100%`}},{default:x(()=>[a(s(ce),{label:`Short drama · professional`,value:`film.drama.short@1.0.0`}),a(s(ce),{label:`Commercial film · professional`,value:`film.commercial@1.0.0`}),a(s(ce),{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(Ee),{modelValue:B.value,"onUpdate:modelValue":l[27]||=e=>B.value=e,title:n.$t(`poivelle.node.create`),width:`460px`},{footer:x(()=>[a(s(Y),{onClick:l[26]||=e=>B.value=!1},{default:x(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),a(s(Y),{type:`primary`,loading:L.value,onClick:Te},{default:x(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:x(()=>[a(s(le),{"label-position":`top`,onSubmit:l[25]||=t(()=>{},[`prevent`])},{default:x(()=>[a(s(R),{label:n.$t(`poivelle.field.type`)},{default:x(()=>[a(s(I),{modelValue:G.node_type,"onUpdate:modelValue":l[22]||=e=>G.node_type=e,style:{width:`100%`}},{default:x(()=>[(T(),c(f,null,C(pe,e=>a(s(ce),{key:e,label:e,value:e},null,8,[`label`,`value`])),64))]),_:1},8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.field.title`)},{default:x(()=>[a(s(X),{modelValue:G.title,"onUpdate:modelValue":l[23]||=e=>G.title=e,maxlength:`240`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.field.prompt`)},{default:x(()=>[a(s(X),{modelValue:G.prompt,"onUpdate:modelValue":l[24]||=e=>G.prompt=e,type:`textarea`,rows:5},null,8,[`modelValue`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`modelValue`,`title`]),a(s(Ee),{modelValue:V.value,"onUpdate:modelValue":l[34]||=e=>V.value=e,title:n.$t(`poivelle.asset.import`),width:`500px`},{footer:x(()=>[a(s(Y),{onClick:l[33]||=e=>V.value=!1},{default:x(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),a(s(Y),{type:`primary`,loading:L.value,onClick:J},{default:x(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:x(()=>[a(s(le),{"label-position":`top`,onSubmit:l[32]||=t(()=>{},[`prevent`])},{default:x(()=>[a(s(R),{label:n.$t(`poivelle.asset.title`)},{default:x(()=>[a(s(X),{modelValue:K.title,"onUpdate:modelValue":l[28]||=e=>K.title=e,maxlength:`240`},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.field.type`)},{default:x(()=>[a(s(I),{modelValue:K.kind,"onUpdate:modelValue":l[29]||=e=>K.kind=e,style:{width:`100%`}},{default:x(()=>[(T(),c(f,null,C(me,e=>a(s(ce),{key:e,label:e,value:e},null,8,[`label`,`value`])),64))]),_:1},8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.asset.url`)},{default:x(()=>[a(s(X),{modelValue:K.source_url,"onUpdate:modelValue":l[30]||=e=>K.source_url=e},null,8,[`modelValue`])]),_:1},8,[`label`]),a(s(R),{label:n.$t(`poivelle.asset.hash`)},{default:x(()=>[a(s(X),{modelValue:K.content_hash,"onUpdate:modelValue":l[31]||=e=>K.content_hash=e,placeholder:`sha256:...`},null,8,[`modelValue`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`modelValue`,`title`]),a(s(Ee),{modelValue:H.value,"onUpdate:modelValue":l[36]||=e=>H.value=e,title:n.$t(`poivelle.run.confirmTitle`),width:`520px`},{footer:x(()=>[a(s(Y),{onClick:l[35]||=e=>H.value=!1},{default:x(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),a(s(Y),{type:`primary`,loading:L.value,onClick:Fe},{default:x(()=>[r(i(n.$t(`poivelle.run.confirm`)),1)]),_:1},8,[`loading`])]),default:x(()=>[ae.value?(T(),c(`div`,Fr,[e(`div`,null,[e(`span`,null,i(n.$t(`poivelle.run.targets`)),1),e(`strong`,null,i(ae.value.dependency_closure.length),1)]),e(`div`,null,[e(`span`,null,i(n.$t(`poivelle.run.maximum`)),1),e(`strong`,null,i(We(ae.value.max_cost_microcredits)),1)]),e(`div`,null,[e(`span`,null,i(n.$t(`poivelle.run.approval`)),1),e(`strong`,null,i(ae.value.required_approval),1)])])):o(``,!0),e(`p`,Ir,i(n.$t(`poivelle.run.confirmBody`)),1)]),_:1},8,[`modelValue`,`title`])]))}}),[[`__scopeId`,`data-v-1c683780`]]),Rr=D({__name:`Index`,setup(e){let t=E(`discovery`);return(e,n)=>t.value===`discovery`?(T(),y(vt,{key:0,onOpenStudio:n[0]||=e=>t.value=`studio`})):(T(),y(Lr,{key:1,onBackHome:n[1]||=e=>t.value=`discovery`}))}});export{Rr as default};
|