@acedatacloud/nexior 3.371.6 → 3.371.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ApiCodeButton-C6FWrCva.js → ApiCodeButton-B93tec5P.js} +1 -1
- package/dist/assets/{ApiCodeDialog-BSOAGpIl.js → ApiCodeDialog-UX2WrLaq.js} +2 -2
- package/dist/assets/{Artifacts-v6aQr948.js → Artifacts-QUO3XUC2.js} +1 -1
- package/dist/assets/{AskUserQuestionCard-B9r5PAWt.js → AskUserQuestionCard-rgYMuDfH.js} +1 -1
- package/dist/assets/{AudioPreview-B8qr2QlT.js → AudioPreview-DOdo5JYp.js} +1 -1
- package/dist/assets/{Auth-Qz3S7RBz.js → Auth-qlvo72qY.js} +1 -1
- package/dist/assets/{Bare-CyyL0_4R.js → Bare-Ca-8Bpc6.js} +1 -1
- package/dist/assets/{BotPlaceholder-CG-3N26i.js → BotPlaceholder-BkPopfJB.js} +1 -1
- package/dist/assets/{BottomFooter-pZhbWjGC.js → BottomFooter-BlZzw8Kk.js} +1 -1
- package/dist/assets/{BrowseConnectors-B6itmWFg.js → BrowseConnectors-CuWt-q9C.js} +1 -1
- package/dist/assets/{BrowserPairingDialog-DSRNWzJg.js → BrowserPairingDialog-CVVnnD28.js} +1 -1
- package/dist/assets/{Callback-CZTWooWq.js → Callback-zAPnjgUI.js} +1 -1
- package/dist/assets/{CodeSnippet-DgcSbbsU.js → CodeSnippet-DpfR3y2m.js} +1 -1
- package/dist/assets/{Console-BBxTJLSJ.js → Console-B8c7yuB9.js} +1 -1
- package/dist/assets/{Conversation-CHN3U1zy.js → Conversation-Bw4LY5bq.js} +1 -1
- package/dist/assets/Conversation-CGARYdeY.js +1 -0
- package/dist/assets/{CopyToClipboard-CnfP3j6K.js → CopyToClipboard-B1ACSjaj.js} +1 -1
- package/dist/assets/Detail-BaETIqe8.js +2 -0
- package/dist/assets/{Detail-CTKzBwgm.css → Detail-DsfPabsJ.css} +1 -1
- package/dist/assets/Extra-DbD1ukUy.js +1 -0
- package/dist/assets/{FilePreview-3oibArLi.js → FilePreview-DBQ0hX8z.js} +1 -1
- package/dist/assets/{Hailuo-CzSCljMp.js → Hailuo-CN4EgVYY.js} +1 -1
- package/dist/assets/{History-DFUC7MI1.js → History-DHemfY40.js} +1 -1
- package/dist/assets/{ImagePreview-CZs9JDgj.js → ImagePreview-D1g-6oL0.js} +1 -1
- package/dist/assets/{ImageWrapper-BUBjCc4Y.js → ImageWrapper-B9cQmdhY.js} +1 -1
- package/dist/assets/{Index-CvbQ8pbZ.js → Index-71U0cpUC.js} +1 -1
- package/dist/assets/{Index-DjOhuydQ.js → Index-B1S3IHiI.js} +1 -1
- package/dist/assets/{Index-nreUcrR7.js → Index-B2__JRw7.js} +1 -1
- package/dist/assets/{Index-RLfIr6Wd.js → Index-BLJdiAQ7.js} +1 -1
- package/dist/assets/Index-BQIlMb2L.js +1 -0
- package/dist/assets/Index-BaTIs5ts.js +1 -0
- package/dist/assets/Index-Bhyr6Ahb.js +1 -0
- package/dist/assets/{Index-Ch0Xco0B2.js → Index-Bj6CxE4M2.js} +1 -1
- package/dist/assets/Index-BkX_lEmq.js +1 -0
- package/dist/assets/Index-Bu2yPS0y.js +1 -0
- package/dist/assets/{Index-Chf5wpzE.js → Index-C2rXcYmM.js} +2 -2
- package/dist/assets/{Index-BI7IvD_5.js → Index-C3Ir9Djo.js} +2 -2
- package/dist/assets/Index-CESz-qfT.js +1 -0
- package/dist/assets/{Index-cA9Q2kHT.js → Index-CHVkKFJf.js} +1 -1
- package/dist/assets/Index-CZ7RkzDI.js +1 -0
- package/dist/assets/{Index-B83nU58S.js → Index-Cd9_zOWL.js} +1 -1
- package/dist/assets/{Index-D_72nyK6.js → Index-Cdgj612o.js} +1 -1
- package/dist/assets/Index-CjneB2Xm.js +1 -0
- package/dist/assets/{Index-ChnzAzDM.js → Index-CmTMMphR.js} +1 -1
- package/dist/assets/{Index-Ds72pk48.js → Index-CniaiBN_.js} +1 -1
- package/dist/assets/Index-Crf04NXr.js +1 -0
- package/dist/assets/Index-CwHEGitL.js +1 -0
- package/dist/assets/Index-D4QML0tC.js +1 -0
- package/dist/assets/Index-D5pPqmYY.css +1 -0
- package/dist/assets/{Index-Dzw9vy2Q.js → Index-D9gp-UP4.js} +1 -1
- package/dist/assets/{Index-D-9JExIN.js → Index-DB-vLg7F.js} +1 -1
- package/dist/assets/Index-DLBl44wu.js +1 -0
- package/dist/assets/{Index-C8dz08xT.js → Index-D_TevSpN.js} +1 -1
- package/dist/assets/{Index-CYb1uz3n.js → Index-DmVBeoWX.js} +1 -1
- package/dist/assets/Index-DtFe65FA.js +1 -0
- package/dist/assets/{Index-BGgODwvs.js → Index-Iyr4ilkM.js} +1 -1
- package/dist/assets/Index-K5fdWe0m.js +1 -0
- package/dist/assets/{Index-yD08zqTo.js → Index-MPhzo625.js} +1 -1
- package/dist/assets/{Index-EbrrxMJp.js → Index-Mbt97CRK.js} +1 -1
- package/dist/assets/Index-MzHTw3FU.js +1 -0
- package/dist/assets/{Index-CLzix8gw.js → Index-crSOcMU3.js} +1 -1
- package/dist/assets/{Index-CedzRUkc.js → Index-nnlzifDb.js} +1 -1
- package/dist/assets/{Invitees-tJhxy9gP.js → Invitees-hE26y6Nr.js} +1 -1
- package/dist/assets/{List-k6GfD4W_.js → List-CjdTx057.js} +1 -1
- package/dist/assets/List-Ds6xVucJ.js +1 -0
- package/dist/assets/{List-QYECvNlK.js → List-lcwkHIdM.js} +1 -1
- package/dist/assets/{LocalTools-7PXxcEkm.js → LocalTools-Beu577cA.js} +1 -1
- package/dist/assets/{LocalTools-DdGKYdbA.js → LocalTools-Do_00QB3.js} +3 -3
- package/dist/assets/{Logo-BenBX9Da.js → Logo-DdBmVtEO.js} +1 -1
- package/dist/assets/{Main-p2YgZplk.js → Main-B4Y8MxZ5.js} +1 -1
- package/dist/assets/{Message-DqA6hbOr.js → Message-gO1fq6PZ.js} +2 -2
- package/dist/assets/{Model-BSBuC_kq.js → Model-D71PWZBB.js} +1 -1
- package/dist/assets/{Navigator-BOH7oW8Y.js → Navigator-CACP2kwk.js} +5 -5
- package/dist/assets/{NotFound-RbxyL3Bn.js → NotFound-CY2G0Gj3.js} +1 -1
- package/dist/assets/{PageHeader-BGawVup6.js → PageHeader-BQ58YU8W.js} +1 -1
- package/dist/assets/Pay-DN6qk_-o.js +1 -0
- package/dist/assets/{Player-zfV2wET8.js → Player-DJkcHeZq.js} +1 -1
- package/dist/assets/{Poivelle-BQSiSpTp.js → Poivelle-CyoJEgn2.js} +1 -1
- package/dist/assets/{RealtimeCall-9erGXsm6.js → RealtimeCall-D9QUmVtg.js} +1 -1
- package/dist/assets/{ReportButton-B0ZDQxLy.js → ReportButton-BBmWA8_S.js} +1 -1
- package/dist/assets/{ReportDialog-C9Ed7KVo.js → ReportDialog-Dyoqh25X.js} +1 -1
- package/dist/assets/{ScenarioPaymentMode-BMC9eBkY.js → ScenarioPaymentMode-DbOPRl7O.js} +1 -1
- package/dist/assets/{ScheduledTasks-BGSPlhqV.js → ScheduledTasks-D-0JatmU.js} +2 -2
- package/dist/assets/{ServicePricingSummary-CMOjp4_z.js → ServicePricingSummary-1K1ykvLb.js} +1 -1
- package/dist/assets/{ShowcaseGrid-Bi3bNMFN.js → ShowcaseGrid-A9xAzIYi.js} +1 -1
- package/dist/assets/{ShowcaseResultTabs-Be1u7B7Y.js → ShowcaseResultTabs-CVZZ_nZg.js} +1 -1
- package/dist/assets/{SolanaWalletPickerDialog-ZfFE4moG.js → SolanaWalletPickerDialog-CjUZyFBf.js} +1 -1
- package/dist/assets/{Status-CjqISdkv.js → Status-DH8e0m1-.js} +1 -1
- package/dist/assets/{Subscribe-BNKvzM85.js → Subscribe-CYTSX-QE.js} +1 -1
- package/dist/assets/{TabSwitcher-C378mpaQ.js → TabSwitcher-Fam59bz-.js} +1 -1
- package/dist/assets/{Tts-tiYmIS9F.js → Tts-Cx6-Re0W.js} +1 -1
- package/dist/assets/{VideoPlayer-DaI2iEuf.js → VideoPlayer-6wGsXW_D.js} +1 -1
- package/dist/assets/{VideoPreview-iLfPvLl6.js → VideoPreview-Dv4a2w-O.js} +1 -1
- package/dist/assets/{airwallexCheckout-CX2POYmT.js → airwallexCheckout-CF1DPbwH.js} +1 -1
- package/dist/assets/arrow-down-BpxSNCT7.js +1 -0
- package/dist/assets/{arrow-down-wide-narrow-CONJ6MMS.js → arrow-down-wide-narrow-DaDxXh4n.js} +1 -1
- package/dist/assets/arrow-left-DO24x3ub.js +1 -0
- package/dist/assets/arrow-right-CfMurUfH.js +1 -0
- package/dist/assets/arrow-up-CGVAYwQK.js +1 -0
- package/dist/assets/{authorizeFlow-DA7_paQn.js → authorizeFlow-CP334N5r.js} +1 -1
- package/dist/assets/{avatar-B4_zPbI4.js → avatar-NvGlyeGb.js} +1 -1
- package/dist/assets/{basic-DD2NrEBB.js → basic-D9s1AIK9.js} +1 -1
- package/dist/assets/{book-open-Cofs7E9U.js → book-open-BLXPdh3C.js} +1 -1
- package/dist/assets/{box-B17UUMMH.js → box-CHRkQcy7.js} +1 -1
- package/dist/assets/{boxes-ZhcRrPKY.js → boxes-DePy5CJr.js} +1 -1
- package/dist/assets/{brain-hlKyCeK7.js → brain-CeznXy3D.js} +1 -1
- package/dist/assets/{chart-no-axes-combined-CIn_DbGn.js → chart-no-axes-combined-h7zULTXW.js} +1 -1
- package/dist/assets/{chat-Ci38o-le.js → chat-B43L2aGW.js} +1 -1
- package/dist/assets/{chat-BExScufd.js → chat-B5nLdQEF.js} +1 -1
- package/dist/assets/{chat-Cn9u-rnV.js → chat-BCPQlkfj.js} +1 -1
- package/dist/assets/{chat-D-bnMuYT.js → chat-CL8NVle_.js} +1 -1
- package/dist/assets/{chat-DJsYRHJf.js → chat-CL9AEjY5.js} +1 -1
- package/dist/assets/{chat-YthdfkjU.js → chat-CQsb5UR1.js} +1 -1
- package/dist/assets/{chat-CVss2Cs-.js → chat-CWqHUxsw.js} +1 -1
- package/dist/assets/{chat-IGNEIVFo.js → chat-CwFJ9IW9.js} +1 -1
- package/dist/assets/{chat-DcUn6yD_.js → chat-D1d3BskG.js} +1 -1
- package/dist/assets/{chat-DM34UNU0.js → chat-DRiXccCf.js} +1 -1
- package/dist/assets/{chat-Dy3iX56V.js → chat-DgKBjSiQ.js} +1 -1
- package/dist/assets/{chat-L7TF_Xzr.js → chat-VHtR3l6u.js} +1 -1
- package/dist/assets/{chat-B2zk1WAX.js → chat-jxxP59Xc.js} +1 -1
- package/dist/assets/check-CxFFrA2H.js +1 -0
- package/dist/assets/chevron-down-Bd8iISZ5.js +1 -0
- package/dist/assets/chevron-right-B1JHudPf.js +1 -0
- package/dist/assets/{circle-alert-DMhbkY9i.js → circle-alert-DE_rjdYj.js} +1 -1
- package/dist/assets/circle-check-Bj2DeLNw.js +1 -0
- package/dist/assets/{circle-question-mark-C4awnefe.js → circle-question-mark-BqH7r5NM.js} +1 -1
- package/dist/assets/{clipboard-list-BtP8g_uG.js → clipboard-list-E1D9uxoG.js} +1 -1
- package/dist/assets/clock-D1BLtksi.js +1 -0
- package/dist/assets/code-CAfi29r8.js +1 -0
- package/dist/assets/codingBridge-DF5BJjOU.js +2 -0
- package/dist/assets/{codingBridgeNotify-Bs3sOsDi.js → codingBridgeNotify-z18IhBBc.js} +1 -1
- package/dist/assets/{coins-CGkvr3bq.js → coins-VpuxNvCN.js} +1 -1
- package/dist/assets/{collapse-D4pqPjny.js → collapse-BsOvS2k2.js} +1 -1
- package/dist/assets/constants-DZKY7i1h.js +1 -0
- package/dist/assets/{copy-Bgq_Lt5F.js → copy-B6Miieok.js} +1 -1
- package/dist/assets/{createTaskActions-CgTN396G.js → createTaskActions-iaE-OKNK.js} +1 -1
- package/dist/assets/{date-picker-CIVhQSq0.js → date-picker-ClosWWE4.js} +1 -1
- package/dist/assets/{digitalhuman-1RfVeR5X.js → digitalhuman-D0eHUw8B.js} +1 -1
- package/dist/assets/{dollar-sign--zIyRxW2.js → dollar-sign-BOt6VA-u.js} +1 -1
- package/dist/assets/{download-BpXfjPLY.js → download-BKOlQdPc.js} +1 -1
- package/dist/assets/{drawer-DttMD3IQ.js → drawer-XweF0Zwl.js} +1 -1
- package/dist/assets/{dropdown-xvOpGXaf.js → dropdown-DOsDoXKj.js} +1 -1
- package/dist/assets/{dropdown-uDZzlyvc.js → dropdown-NIPDTD0t.js} +1 -1
- package/dist/assets/{ellipsis-D-4XqsA_.js → ellipsis-CEl5Jw7L.js} +1 -1
- package/dist/assets/{esm-BxnuLIIk.js → esm-DiKCQCPQ.js} +2 -2
- package/dist/assets/{external-link-CfkUyibd.js → external-link-CS067nSl.js} +1 -1
- package/dist/assets/{eye-Dhb3D_OP.js → eye-DdmA3tL4.js} +1 -1
- package/dist/assets/{file-BY8wxxW3.js → file-3lhVoRqK.js} +1 -1
- package/dist/assets/{file-output-CSH2H9Po.js → file-output-kOI28SH-.js} +1 -1
- package/dist/assets/{file-text-iEDL634w.js → file-text-BAd8BF6y.js} +1 -1
- package/dist/assets/{fish-7f57Y8Hh.js → fish-rRt_eUuL.js} +1 -1
- package/dist/assets/{flux-Ca7x13EY.js → flux-BolnCoyc.js} +1 -1
- package/dist/assets/{folder-BQwFHQqf.js → folder-HmsrMHkH.js} +1 -1
- package/dist/assets/gauge-Bj8M9CeQ.js +1 -0
- package/dist/assets/{generationInput-Tp6tVYL4.js → generationInput-DtMcIQBc.js} +1 -1
- package/dist/assets/{globe-CeROj4EC.js → globe-D_PLQMn9.js} +1 -1
- package/dist/assets/{grokvideo-DBBElwKl.js → grokvideo-D_O7-kOj.js} +1 -1
- package/dist/assets/{hailuo-DndOJa7m.js → hailuo-Bfce9ERD.js} +1 -1
- package/dist/assets/{headphones-CFqTn-wN.js → headphones-CIWbcCHn.js} +1 -1
- package/dist/assets/{history-BRP3o6Xd.js → history-S2Hapyil.js} +1 -1
- package/dist/assets/{house-BUpAjJMo.js → house-D0GdWX6_.js} +1 -1
- package/dist/assets/{i18n-lmeSFJDq.js → i18n-C0FhlUwZ.js} +1 -1
- package/dist/assets/{image-CfYTaFPL.js → image-3PgWRLpX.js} +1 -1
- package/dist/assets/{imageRequests-DkHCCRlh.js → imageRequests-Bk-NTLv-.js} +1 -1
- package/dist/assets/index-DM4P_L36.js +572 -0
- package/dist/assets/{index.es-Chh6NaN3.js → index.es-CAXJ_OYQ.js} +1 -1
- package/dist/assets/{info-DbD2xHpS.js → info-B3DBTxI3.js} +1 -1
- package/dist/assets/{input-number-CMFoxP_g.js → input-number-CdZXN0nE.js} +1 -1
- package/dist/assets/{key-round-CIFO1AJb.js → key-round-Di5Arr8q.js} +1 -1
- package/dist/assets/{kling-BOhcy_Wh.js → kling-CACiwVTL.js} +1 -1
- package/dist/assets/{languages-U21LtzrS.js → languages-BPESqIAj.js} +1 -1
- package/dist/assets/{laptop-By9AaYDw.js → laptop-C6_WV1Da.js} +1 -1
- package/dist/assets/{lightbulb-Dmr-hP5L.js → lightbulb-BZKvLRh5.js} +1 -1
- package/dist/assets/{link-m8jORFL0.js → link-DiiLZIkM.js} +1 -1
- package/dist/assets/loader-circle-BFosSVek.js +1 -0
- package/dist/assets/{lock-ClNzLpGj.js → lock-DPbJmoqm.js} +1 -1
- package/dist/assets/{luma-Bbjxsp1K.js → luma-BJ0nif2J.js} +1 -1
- package/dist/assets/maestro-STYGIZOx.js +1 -0
- package/dist/assets/{maestroLanguages-nCvoB59e.js → maestroLanguages-CHRvK_Qw.js} +1 -1
- package/dist/assets/{mail-t2bgiRlI.js → mail-U4qWATHG.js} +1 -1
- package/dist/assets/{message-circle-BhkVaGxg.js → message-circle-C3zYawKD.js} +1 -1
- package/dist/assets/{mic-C_oCRbvR.js → mic-BXFqXqu5.js} +1 -1
- package/dist/assets/{midjourney-Du1OMPdL.js → midjourney-DkA55y3r.js} +1 -1
- package/dist/assets/{pika-BbThRPIH.js → minimax-Dz5nS6Kb.js} +1 -1
- package/dist/assets/{mobileLocalExec-Ce7U3Nmb.js → mobileLocalExec-D7oKl891.js} +1 -1
- package/dist/assets/{models-Cru5uJc2.js → models-xrsegcl3.js} +1 -1
- package/dist/assets/{monitor-CNUuuIgl.js → monitor-h7h9cmhQ.js} +1 -1
- package/dist/assets/{mouse-pointer-2-HsST9qMs.js → mouse-pointer-2-DTsr1Pxv.js} +1 -1
- package/dist/assets/music-2-CZ55vTcF.js +1 -0
- package/dist/assets/{nanobanana-DiX5DuZY.js → nanobanana-CESpp83-.js} +1 -1
- package/dist/assets/{omni-DJ2wmtaL.js → omni-GWzUhdyo.js} +1 -1
- package/dist/assets/{openaiimage-DiGQK-vZ.js → openaiimage-BCOWMe6j.js} +1 -1
- package/dist/assets/openaiimage-BoTJHTek.js +1 -0
- package/dist/assets/{openaiimage-C6c_JnqI.js → openaiimage-Bx-_gcGZ.js} +1 -1
- package/dist/assets/{openaiimage-pCmThaEj.js → openaiimage-C3NyItjU.js} +1 -1
- package/dist/assets/{openaiimage-D31IGt_l.js → openaiimage-C9I1FSao.js} +1 -1
- package/dist/assets/{openaiimage-C99BMPzr.js → openaiimage-CRU2SXEC.js} +1 -1
- package/dist/assets/{openaiimage-Ccy1A76U.js → openaiimage-CTLe_9cQ.js} +1 -1
- package/dist/assets/{openaiimage-DXJScwOs.js → openaiimage-Cbg7t8CV.js} +1 -1
- package/dist/assets/{openaiimage-Bv7qGbKM.js → openaiimage-DBrTmUJX.js} +1 -1
- package/dist/assets/{openaiimage-DJN2Ct9T.js → openaiimage-DLn1at9F.js} +1 -1
- package/dist/assets/{openaiimage-qTF1GUn3.js → openaiimage-HpiFh_h5.js} +1 -1
- package/dist/assets/{openaiimage-CQsujQnW.js → openaiimage-XlBhpvEL.js} +1 -1
- package/dist/assets/{openaiimage-BdSAUNcS.js → openaiimage-fbvglES0.js} +1 -1
- package/dist/assets/{pagination-B62agDTK.js → pagination-CiIWGl-f.js} +1 -1
- package/dist/assets/{pagination-B_nilV_t.js → pagination-XgiD7feo.js} +1 -1
- package/dist/assets/{pagination-DEYlwTlL.js → pagination-seaRMXo7.js} +1 -1
- package/dist/assets/{palette-zKJYv6Zy.js → palette-eEQnFFal.js} +1 -1
- package/dist/assets/{paperclip-D0oNKYmJ.js → paperclip-CVCHX7d8.js} +1 -1
- package/dist/assets/{pause-U4QQSdVl.js → pause-Cs8HUz1_.js} +1 -1
- package/dist/assets/{pencil-DHzOKEgq.js → pencil-CnDexofZ.js} +1 -1
- package/dist/assets/{minimax-Dt0kZ3Vo.js → pika-D5RJtSUs.js} +1 -1
- package/dist/assets/{pixverse-C-ZGeFKf.js → pixverse-Cc_u5djO.js} +1 -1
- package/dist/assets/play-9_WUYxrd.js +1 -0
- package/dist/assets/{plug-D5dZg2UY.js → plug-BhFNB99y.js} +1 -1
- package/dist/assets/plus-CuefAsbH.js +1 -0
- package/dist/assets/{poivelle-Ckaod8ZT.js → poivelle-B5T4AZam.js} +1 -1
- package/dist/assets/{popover-D2p4u8-Q.js → popover-Djj291a3.js} +1 -1
- package/dist/assets/{producer-BbFTej8S.js → producer-DhgoJSlI.js} +1 -1
- package/dist/assets/{qrart-VBAjMw1M.js → qrart-CQIBB86w.js} +1 -1
- package/dist/assets/{qwenimage-CuCAms4O.js → qwenimage-Cgn0W2AG.js} +1 -1
- package/dist/assets/{realtime-B8R0_LhC.js → realtime-Cew-yew8.js} +1 -1
- package/dist/assets/{refresh-cw-Br21vEXT.js → refresh-cw-C9LKXK6j.js} +1 -1
- package/dist/assets/rotate-ccw-4uBpzZs_.js +1 -0
- package/dist/assets/rotate-cw-ClSEOMTI.js +1 -0
- package/dist/assets/{row-DP0oDZAs.js → row-BVh__hfN.js} +1 -1
- package/dist/assets/search-D_rwEuEa.js +1 -0
- package/dist/assets/seedance-5BadopY-.js +1 -0
- package/dist/assets/{seedream-CaMAYFeC.js → seedream-BooJJl76.js} +1 -1
- package/dist/assets/{select-C_X0J3Ch.js → select-AVWFhCgw.js} +1 -1
- package/dist/assets/{serp-BCRB0Wv_.js → serp-Br5Wg99N.js} +1 -1
- package/dist/assets/{shield-BJ2lOk1S.js → shield-tD-q9a55.js} +1 -1
- package/dist/assets/{showcase-BzFqOq7u.js → showcase-BHpfzLPM.js} +1 -1
- package/dist/assets/{showcaseRecreateMixin-DyKdifmx.js → showcaseRecreateMixin-BU0A47vp.js} +1 -1
- package/dist/assets/{shuffle-DuAaOCLP.js → shuffle-CXveCVgs.js} +1 -1
- package/dist/assets/{siteHome-CubcvlzE.js → siteHome-BgxYb8Ow.js} +1 -1
- package/dist/assets/{slider-CdeLiUQL.js → slider-Bc8q1eHv.js} +1 -1
- package/dist/assets/{solana-wallets-Ctt177Lt.js → solana-wallets-nOUQF26v.js} +2 -2
- package/dist/assets/{sora-CRRO9qcp.js → sora-jaiUblaB.js} +1 -1
- package/dist/assets/{sparkles-CKXe2q1X.js → sparkles-e3Z56cAr.js} +1 -1
- package/dist/assets/square-NMLM-GRT.js +1 -0
- package/dist/assets/{store-DztoOndf.js → store-DliEGaeU.js} +1 -1
- package/dist/assets/{suno-BPfVaq-I.js → suno-C6-HkUpn.js} +1 -1
- package/dist/assets/{switch-DyfMMvH-.js → switch-Bl-ERD0O.js} +1 -1
- package/dist/assets/{table-BEiwdkro.js → table-FiCWkLRp.js} +1 -1
- package/dist/assets/{tabs-6hfO7ztL.js → tabs-BCSryEOe.js} +1 -1
- package/dist/assets/{tag-mqM1JPuG.js → tag-Cy5pdpzj.js} +1 -1
- package/dist/assets/{taskPolling-U8DOPUQy.js → taskPolling-BNmYldjY.js} +1 -1
- package/dist/assets/terminal-hBb-lQCb.js +1 -0
- package/dist/assets/{time-picker-DgkXiE-7.js → time-picker-B9YoZOYc.js} +1 -1
- package/dist/assets/{tooltip-OUJEXz3N.js → tooltip-tQ4WhmUH.js} +1 -1
- package/dist/assets/{trash-2-Cy68rO6n.js → trash-2-C9OfpMIF.js} +1 -1
- package/dist/assets/{triangle-alert-CjbgCRoN.js → triangle-alert-oV5X8VkO.js} +1 -1
- package/dist/assets/{upload-XPx0yx5g.js → upload-BwDQq500.js} +1 -1
- package/dist/assets/{upload-vSq7Ihy4.js → upload-DLqvhgDs.js} +1 -1
- package/dist/assets/user--AJYj8oW.js +1 -0
- package/dist/assets/{veo-BEgEF3Oz.js → veo-Clus4k1y.js} +1 -1
- package/dist/assets/{video-a0RDUv9h.js → video-D5MxuhO0.js} +1 -1
- package/dist/assets/{volume-2-DGSpj-NH.js → volume-2-BN7w82QG.js} +1 -1
- package/dist/assets/{wallet-Ca1vgVzZ.js → wallet-D8Evlezx.js} +1 -1
- package/dist/assets/{wan-iM8yvoVy.js → wan-CHOIWl5d.js} +1 -1
- package/dist/assets/{wand-sparkles-BLj6TbQF.js → wand-sparkles-Dk2E256b.js} +1 -1
- package/dist/assets/{web-D4sEVuy1.js → web-BspgRAsb.js} +1 -1
- package/dist/assets/{webextrator-CppLRjXW.js → webextrator-v8rK0Yl5.js} +1 -1
- package/dist/assets/{zap-D95myyfC.js → zap-LjueKUr3.js} +1 -1
- package/dist/index.html +4 -4
- package/package.json +1 -1
- package/dist/assets/Conversation-Djf4TKT3.js +0 -1
- package/dist/assets/Detail-H6T_ACAo.js +0 -2
- package/dist/assets/Extra-N4bz_ynA.js +0 -1
- package/dist/assets/Index-7yAAcCnc.js +0 -1
- package/dist/assets/Index-Bl8zKfvm.js +0 -1
- package/dist/assets/Index-BwOPPFrx.js +0 -1
- package/dist/assets/Index-Bx51kak2.css +0 -1
- package/dist/assets/Index-C8ztBhDJ.js +0 -1
- package/dist/assets/Index-CoUozD_X.js +0 -1
- package/dist/assets/Index-CuX8wB-J.js +0 -1
- package/dist/assets/Index-DBJQPnv-.js +0 -1
- package/dist/assets/Index-DKLECQzD.js +0 -1
- package/dist/assets/Index-DcSYotGI.js +0 -1
- package/dist/assets/Index-DzuFr4ZN.js +0 -1
- package/dist/assets/Index-QVhHmPeT.js +0 -1
- package/dist/assets/Index-bdI4gOf7.js +0 -1
- package/dist/assets/Index-i4QVlQSj.js +0 -1
- package/dist/assets/Index-kV9B534Y.js +0 -1
- package/dist/assets/Index-pSZ8x4oA.js +0 -1
- package/dist/assets/List-JRCW-2v3.js +0 -1
- package/dist/assets/Pay-HLlmauma.js +0 -1
- package/dist/assets/arrow-down-ChqsQZig.js +0 -1
- package/dist/assets/arrow-left-Dtuf3L2j.js +0 -1
- package/dist/assets/arrow-right-Bqfb6t60.js +0 -1
- package/dist/assets/arrow-up-CSpz0srB.js +0 -1
- package/dist/assets/check-CTUDvagB.js +0 -1
- package/dist/assets/chevron-down-Ce5WWTJ4.js +0 -1
- package/dist/assets/chevron-right-CIFdBNP8.js +0 -1
- package/dist/assets/circle-check-C7raGFyE.js +0 -1
- package/dist/assets/clock-CxvQJYC5.js +0 -1
- package/dist/assets/code-DnoJmxOh.js +0 -1
- package/dist/assets/codingBridge-Cvwiwqe7.js +0 -2
- package/dist/assets/constants-CuuFtMEu.js +0 -1
- package/dist/assets/gauge-Cn1dy4QG.js +0 -1
- package/dist/assets/index-DVmeVwK7.js +0 -572
- package/dist/assets/loader-circle-b6njcpdq.js +0 -1
- package/dist/assets/maestro-3lYA-9TB.js +0 -1
- package/dist/assets/music-2-JRU0Dy3p.js +0 -1
- package/dist/assets/openaiimage-BqvK74sh.js +0 -1
- package/dist/assets/play-CE4vLIhC.js +0 -1
- package/dist/assets/plus-CKVbpoNT.js +0 -1
- package/dist/assets/rotate-ccw-qPIu5GI_.js +0 -1
- package/dist/assets/rotate-cw-B7QEaCme.js +0 -1
- package/dist/assets/search-Ba7fFpK4.js +0 -1
- package/dist/assets/seedance-hj8hoS13.js +0 -1
- package/dist/assets/square-_WGgwmKd.js +0 -1
- package/dist/assets/terminal-Brg8gOCC.js +0 -1
- package/dist/assets/user-CbpGf9ep.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,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-C_X0J3Ch.js";import{n as x,t as S}from"./tabs-6hfO7ztL.js";import{t as C}from"./upload-XPx0yx5g.js";import{t as w}from"./tooltip-OUJEXz3N.js";import{t as T}from"./alert-BprQRUmf.js";import{h as E,v as D}from"./models-Cru5uJc2.js";import{n as O,r as k}from"./radio-BNhFzeBO.js";import{t as A}from"./drawer-DttMD3IQ.js";import{t as j}from"./input-number-CMFoxP_g.js";import{t as M}from"./slider-CdeLiUQL.js";import{t as N}from"./switch-DyfMMvH-.js";import{t as ee}from"./clock-CxvQJYC5.js";import{a as P,i as te,n as ne,r as re,s as ie,t as ae}from"./pagination-B62agDTK.js";import{t as oe}from"./headphones-CFqTn-wN.js";import{t as se}from"./info-DbD2xHpS.js";import{t as ce}from"./lightbulb-Dmr-hP5L.js";import{t as le}from"./trash-2-Cy68rO6n.js";import{t as ue}from"./triangle-alert-CjbgCRoN.js";import{t as F}from"./upload-vSq7Ihy4.js";import{t as I}from"./wand-sparkles-BLj6TbQF.js";import{Ai as de,Ei as fe,ji as pe,ki as me}from"./constants-CuuFtMEu.js";import{$a as he,A as L,Br as ge,Cn as R,La as z,Li as B,O as _e,Qi as ve,Va as V,Vi as ye,Vr as H,aa as be,at as U,ct as W,di as xe,et as Se,it as G,li as Ce,lo as K,nt as we,ot as Te,rt as Ee,st as q,to as J,tt as De,za as Oe,zi as Y,zr as ke}from"./index-DVmeVwK7.js";import{t as Ae}from"./CopyToClipboard-CnfP3j6K.js";import{t as je}from"./ReportButton-B0ZDQxLy.js";import{t as Me}from"./FilePreview-3oibArLi.js";import{t as X}from"./ImagePreview-CZs9JDgj.js";import{n as Ne}from"./taskDrawerMixin-DyAUhFEq.js";import{t as Pe}from"./ServicePricingSummary-CMOjp4_z.js";import{t as Fe}from"./AudioPreview-B8qr2QlT.js";import{t as Ie}from"./VideoPlayer-DaI2iEuf.js";import{t as Le}from"./VideoPreview-iLfPvLl6.js";import{t as Re}from"./ScenarioPaymentMode-BMC9eBkY.js";import{t as ze}from"./ApiCodeButton-C6FWrCva.js";import{t as Be}from"./BotPlaceholder-CG-3N26i.js";import{t as Ve}from"./taskPollingMixin-CcLxtz8z.js";import{t as He}from"./ShowcaseResultTabs-Be1u7B7Y.js";import{t as Ue}from"./showcaseRecreateMixin-DyKdifmx.js";import{n as We,t as Ge}from"./generationInput-Tp6tVYL4.js";var Ke=v({name:`LayoutKling`,components:{MagicIcon:I,ElDrawer:A,ElButton:J},mixins:[Ne]}),qe={class:`main flex flex-row flex-1 min-h-0`},Je={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)]`},Ye={class:`result h-full p-4 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Xe(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),h=l(`el-drawer`);return g(),s(`div`,qe,[e(`div`,Je,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,Ye,[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 Ze=L(Ke,[[`render`,Xe],[`__scopeId`,`data-v-f4b791b5`]]),Qe={text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1,referenceVideo:!1,referenceImages:!1};function Z(e,t,n){let r=t||`std`,i=n??5;switch(e){case`kling-v1`:return{text2video:!0,image2video:!0,endImage:i===5,audio:!1,motionControl:i===5,referenceVideo:!1,referenceImages:!1};case`kling-v1-6`:case`kling-v2-5-turbo`:return{text2video:!0,image2video:!0,endImage:r===`pro`,audio:!1,motionControl:!1,referenceVideo:!1,referenceImages:!1};case`kling-v2-6`:return{text2video:!0,image2video:!0,endImage:r===`pro`,audio:r===`pro`,motionControl:!1,referenceVideo:!1,referenceImages:!1};case`kling-v2-master`:case`kling-v2-1-master`:return{text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1,referenceVideo:!1,referenceImages:!1};case`kling-v3`:return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:r!==`4k`,referenceVideo:!1,referenceImages:!1};case`kling-v3-omni`:return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:!1,referenceVideo:!0,referenceImages:!0};case`kling-o1`:return{text2video:!0,image2video:!0,endImage:!0,audio:!1,motionControl:!1,referenceVideo:!0,referenceImages:!0};default:return Qe}}var Q=`<<<video_1>>>`,$e=/<<<image_\d+>>>/g;function et(e){return e?e.split(Q).join(` `).replace(/\s{2,}/g,` `).trim():``}function tt(e){return e?e.replace($e,` `).replace(/\s{2,}/g,` `).trim():``}function nt(e,t){if(!e)return[];let n=t.model??e.model,r=t.mode??e.mode,i=t.duration??e.duration;if(!n)return[];let a=Z(n,r,i),o=[];e.end_image_url&&!a.endImage&&o.push({field:`end_image_url`,i18nLabel:`kling.name.endImage`}),e.generate_audio&&!a.audio&&o.push({field:`generate_audio`,i18nLabel:`kling.name.generateAudio`}),e.camera_control?.type&&(!a.motionControl||e.start_image_url)&&o.push({field:`camera_control`,i18nLabel:`kling.name.cameraControl`}),e.video_list?.length&&!a.referenceVideo&&o.push({field:`video_list`,i18nLabel:`kling.name.referenceVideo`}),e.image_list?.length&&!a.referenceImages&&o.push({field:`image_list`,i18nLabel:`kling.name.referenceImages`});let s=n===`kling-o1`||!!(e.image_list?.length||e.video_list?.length);return s&&e.cfg_scale!==void 0&&o.push({field:`cfg_scale`,i18nLabel:`kling.name.cfgScale`}),s&&e.negative_prompt&&o.push({field:`negative_prompt`,i18nLabel:`kling.name.negativePrompt`}),o}function rt(e,t){let n={...e};for(let e of t)e.field===`end_image_url`&&(n.end_image_url=void 0),e.field===`generate_audio`&&(n.generate_audio=!1),e.field===`camera_control`&&(n.camera_control=void 0),e.field===`cfg_scale`&&(n.cfg_scale=void 0),e.field===`negative_prompt`&&(n.negative_prompt=void 0),e.field===`video_list`&&(n.video_list=void 0,n.prompt=et(n.prompt)),e.field===`image_list`&&(n.image_list=void 0,n.prompt=tt(n.prompt));return n}var it=v({name:`ModelSelector`,components:{ElSelect:y,ElOption:b},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{revertKey:0,options:[{value:`kling-v3`,label:`v3`},{value:`kling-v3-omni`,label:`v3-Omni`},{value:`kling-v2-6`,label:`v2.6`},{value:`kling-v2-5-turbo`,label:`v2.5-Turbo`},{value:`kling-v2-1-master`,label:`v2.1-Master`},{value:`kling-v2-master`,label:`v2-Master`},{value:`kling-v1-6`,label:`v1.6`},{value:`kling-v1`,label:`v1`},{value:`kling-o1`,label:`Kling O1`}]}},computed:{value(){return this.$store.state.kling?.config?.model}},mounted(){this.value||this.applyModel(fe)},methods:{async onChange(e){let t=this.$store.state.kling?.config||{},n=nt(t,{model:e});if(n.length===0){this.applyModel(e);return}let r=n.map(e=>this.$t(e.i18nLabel)).join(`、`);try{await V.confirm(this.$t(`kling.message.featureNotSupportedBody`,{fields:r}),this.$t(`kling.message.featureNotSupportedTitle`),{confirmButtonText:this.$t(`kling.button.confirmContinue`),cancelButtonText:this.$t(`kling.button.cancelSwitch`),type:`warning`});let i=rt({...t,model:e},n);this.$store.commit(`kling/setConfig`,i),D.success(this.$t(`kling.message.featureRemovedNotice`,{fields:r}))}catch{this.revertKey+=1}},applyModel(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling.config,model:e})}}}),at={class:`field`},ot={class:`title font-bold`};function st(t,n,r,a,o,u){let d=l(`el-option`),m=l(`el-select`);return g(),s(`div`,at,[e(`h2`,ot,i(t.$t(`pika.name.model`)),1),(g(),f(m,{key:t.revertKey,"model-value":t.value,class:`value`,placeholder:t.$t(`pika.placeholder.select`),onChange:t.onChange},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(d,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`model-value`,`placeholder`,`onChange`]))])}var ct=L(it,[[`render`,st],[`__scopeId`,`data-v-a74e7f31`]]),lt=v({name:`ModeSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:P},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||``},cameraControlSet(){return!!this.$store.state.kling?.config?.camera_control?.type},fourKReason(){return pe.includes(this.selectedModel)?this.cameraControlSet?this.$t(`kling.description.mode4kIncompatibleCamera`):``:this.$t(`kling.description.mode4kRequiresV3`)},options(){return[{value:`std`,label:this.$t(`kling.name.modeStd`),disabled:!1,disabledReason:``},{value:`pro`,label:this.$t(`kling.name.modePro`),disabled:!1,disabledReason:``},{value:`4k`,label:this.$t(`kling.name.mode4k`),disabled:!!this.fourKReason,disabledReason:this.fourKReason}]},value(){return this.$store.state.kling?.config?.mode}},watch:{fourKReason(e){e&&this.value===`4k`&&this.applyMode(`std`)}},mounted(){this.value||this.applyMode(`std`)},methods:{async onChange(e){let t=this.$store.state.kling?.config||{},n=nt(t,{mode:e});if(n.length===0){this.applyMode(e);return}let r=n.map(e=>this.$t(e.i18nLabel)).join(`、`);try{await V.confirm(this.$t(`kling.message.featureNotSupportedBody`,{fields:r}),this.$t(`kling.message.featureNotSupportedTitle`),{confirmButtonText:this.$t(`kling.button.confirmContinue`),cancelButtonText:this.$t(`kling.button.cancelSwitch`),type:`warning`});let i=rt({...t,mode:e},n);this.$store.commit(`kling/setConfig`,i),D.success(this.$t(`kling.message.featureRemovedNotice`,{fields:r}))}catch{this.revertKey+=1}},applyMode(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling.config,mode:e})}}}),ut={class:`field`},dt={class:`header`},ft={class:`title font-bold`},pt={key:0,class:`opt-tip`};function mt(t,r,u,d,m,_){let v=l(`info-icon`),y=l(`el-option`),b=l(`el-select`);return g(),s(`div`,ut,[e(`div`,dt,[e(`h2`,ft,i(t.$t(`kling.name.mode`)),1),a(v,{content:t.$t(`kling.description.mode`),class:`info-icon`},null,8,[`content`])]),(g(),f(b,{key:t.revertKey,"model-value":t.value,class:`value`,placeholder:t.$t(`kling.placeholder.select`),clearable:!0,onChange:t.onChange},{default:p(()=>[(g(!0),s(c,null,h(t.options,t=>(g(),f(y,{key:t.value,label:t.label,value:t.value,disabled:t.disabled},{default:p(()=>[e(`span`,{class:n({"opt-disabled":t.disabled})},i(t.label),3),t.disabled&&t.disabledReason?(g(),s(`span`,pt,i(t.disabledReason),1)):o(``,!0)]),_:2},1032,[`label`,`value`,`disabled`]))),128))]),_:1},8,[`model-value`,`placeholder`,`onChange`]))])}var ht=L(lt,[[`render`,mt],[`__scopeId`,`data-v-9a8fa3c5`]]),gt=[3,5,8,10,12,15],_t=[5,10],vt=[5],yt=v({name:`DurationSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:P},data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||``},isV3Model(){return pe.includes(this.selectedModel)},allowedDurations(){return this.selectedModel===`kling-o1`?vt:this.isV3Model?gt:_t},value(){return this.$store.state.kling?.config?.duration??5},selectValue(){let e=this.allowedDurations;return e.includes(this.value)?this.value:e.includes(5)?5:e[0]}},watch:{selectedModel(){this.allowedDurations.includes(this.value)||this.applyDuration(5)}},mounted(){this.$store.state.kling?.config?.duration||this.applyDuration(5)},methods:{async onChange(e){let t=this.$store.state.kling?.config||{},n=nt(t,{duration:e});if(n.length===0){this.applyDuration(e);return}let r=n.map(e=>this.$t(e.i18nLabel)).join(`、`);try{await V.confirm(this.$t(`kling.message.featureNotSupportedBody`,{fields:r}),this.$t(`kling.message.featureNotSupportedTitle`),{confirmButtonText:this.$t(`kling.button.confirmContinue`),cancelButtonText:this.$t(`kling.button.cancelSwitch`),type:`warning`});let i=rt({...t,duration:e},n);this.$store.commit(`kling/setConfig`,i),D.success(this.$t(`kling.message.featureRemovedNotice`,{fields:r}))}catch{this.revertKey+=1}},applyDuration(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling.config,duration:e})}}}),bt={class:`field`},xt={class:`control`},St={class:`label`},Ct={class:`title font-bold`};function wt(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,bt,[e(`div`,xt,[e(`div`,St,[e(`h2`,Ct,i(t.$t(`kling.name.duration`)),1),a(m,{content:t.$t(`kling.description.duration`),class:`info-icon ml-1`},null,8,[`content`])]),(g(),f(v,{key:t.revertKey,"model-value":t.selectValue,class:`value`,placeholder:t.$t(`kling.placeholder.select`),onChange:t.onChange},{default:p(()=>[(g(!0),s(c,null,h(t.allowedDurations,e=>(g(),f(_,{key:e,label:`${e}s`,value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`model-value`,`placeholder`,`onChange`]))])])}var Tt=L(yt,[[`render`,wt],[`__scopeId`,`data-v-496bf31c`]]),Et=v({name:`RatioSelector`,data(){return{options:[{value:`1:1`,label:`1:1`,width:20,height:20},{value:`16:9`,label:`16:9`,width:25,height:13},{value:`9:16`,label:`9:16`,width:13,height:25}]}},computed:{active(){return this.options.findIndex(e=>e.value===this.value)||0},value:{get(){return this.$store.state?.kling?.config?.aspect_ratio},set(e){console.debug(`set ratio`,e),this.$store.commit(`kling/setConfig`,{...this.$store.state?.kling?.config,aspect_ratio:e})}}},mounted(){this.value||=`1:1`}}),Dt={class:`text-sm font-bold mb-2 block`},Ot={class:`items`},kt=[`onClick`],At={class:`name`};function jt(t,r,a,o,l,u){return g(),s(`div`,null,[e(`span`,Dt,i(t.$t(`kling.name.ratio`)),1),e(`div`,Ot,[(g(!0),s(c,null,h(t.options,(r,a)=>(g(),s(`div`,{key:a,class:n({active:t.active===a,item:!0}),onClick:e=>t.value=r.value},[e(`div`,{class:n([`preview`,r.label])},[e(`div`,{class:`rect`,style:m({width:r.width+`px`,height:r.height+`px`})},null,4)],2),e(`p`,At,i(r.label),1)],10,kt))),128))])])}var Mt=L(Et,[[`render`,jt],[`__scopeId`,`data-v-cdb14b2f`]]),Nt=v({name:`StartImage`,components:{UploadIcon:F,ElUpload:C,ElButton:J,ElTooltip:w,InfoIcon:P,ImagePreview:X},mixins:[W,q,U],emits:[`change`],data(){return{fileList:[],uploadUrl:z()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},reachedLimit(){return(this.fileList?.length||0)>=1},value:{get(){return this.$store.state?.kling?.config?.start_image_url},set(){}}},watch:{value(e){!e&&this.fileList.length>0&&(this.fileList=[])}},mounted(){this.value||=void 0,this.onSetStartImageUrl()},methods:{onExceed(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onError(){D.error(this.$t(`kling.message.uploadReferencesError`))},onBeforeUpload(){let e=this.$store.state.kling?.config||{};if(e.video_list?.[0]?.refer_type===`base`)return D.warning(this.$t(`kling.message.baseVideoFrameConflict`)),!1;let t=e.video_list?.length?4:7;return(e.image_list?.length||0)+Number(!!e.end_image_url)+1>t?(D.warning(this.$t(`kling.message.referenceImagesTotalLimit`,{count:t})),!1):!0},onSetStartImageUrl(){let e=this.urls?.[0];this.$store.commit(`kling/setConfig`,{...this.$store.state?.kling?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.onSetStartImageUrl()}}}),Pt={class:`relative`},Ft={class:`flex min-h-8 items-center pr-20`},It={class:`flex justify-start items-center`},Lt={class:`text-sm font-bold`};function Rt(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-tooltip`),x=l(`el-upload`);return g(),s(`div`,Pt,[e(`div`,Ft,[e(`div`,It,[e(`span`,Lt,i(t.$t(`kling.name.startImage`)),1),a(h,{content:t.$t(`kling.description.uploadStartImage`)},null,8,[`content`])])]),a(x,{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,disabled:t.reachedLimit,class:`upload-wrapper`,multiple:!1,action:t.uploadUrl,"list-type":`picture`,"before-upload":t.onBeforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(b,{content:t.$t(`kling.message.uploadReferencesExceed`),disabled:!t.reachedLimit,placement:`top`},{default:p(()=>[e(`span`,null,[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`,disabled:t.reachedLimit},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferences`)),1)]),_:1},8,[`disabled`])])]),_:1},8,[`content`,`disabled`])]),_:1},8,[`file-list`,`disabled`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var zt=L(Nt,[[`render`,Rt],[`__scopeId`,`data-v-60844ac3`]]),Bt=v({name:`EndImage`,components:{UploadIcon:F,ElUpload:C,ElButton:J,ElTooltip:w,ImagePreview:X,InfoIcon:P},mixins:[W,q,U],data(){return{fileList:[],uploadUrl:z()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},reachedLimit(){return(this.fileList?.length||0)>=1},klingConfig(){return this.$store.state?.kling?.config||{}},endImageSupported(){return Z(this.klingConfig.model,this.klingConfig.mode,this.klingConfig.duration).endImage},hasStartImage(){return!!this.klingConfig.start_image_url},uploadDisabled(){return this.reachedLimit||!this.endImageSupported||!this.hasStartImage},uploadTooltip(){return this.endImageSupported?this.hasStartImage?this.reachedLimit?this.$t(`kling.message.uploadReferencesExceed`):``:this.$t(`kling.message.endImageRequiresStart`):this.$t(`kling.message.endImageNotSupported`)},storeValue(){return this.klingConfig.end_image_url},value:{get(){return this.storeValue},set(){}}},watch:{storeValue(e){!e&&this.fileList.length>0&&(this.fileList=[])},hasStartImage(e){!e&&this.storeValue&&(this.fileList=[],this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,end_image_url:void 0}))}},mounted(){this.value||=void 0,this.onSetEndImageUrl()},methods:{onBeforeUpload(){if(!this.endImageSupported)return D.warning(this.$t(`kling.message.endImageNotSupported`)),!1;if(!this.hasStartImage)return D.warning(this.$t(`kling.message.endImageRequiresStart`)),!1;if(this.klingConfig.video_list?.[0]?.refer_type===`base`)return D.warning(this.$t(`kling.message.baseVideoFrameConflict`)),!1;let e=this.klingConfig.video_list?.length?4:7;return(this.klingConfig.image_list?.length||0)+2>e?(D.warning(this.$t(`kling.message.referenceImagesTotalLimit`,{count:e})),!1):!0},onExceed(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onError(){D.error(this.$t(`kling.message.uploadReferencesError`))},onSetEndImageUrl(){let e=this.urls?.[0];this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.onSetEndImageUrl()}}}),Vt={class:`relative`},Ht={class:`flex min-h-8 items-center pr-20`},Ut={class:`flex justify-start items-center`},Wt={class:`text-sm font-bold`};function Gt(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-tooltip`),x=l(`el-upload`);return g(),s(`div`,Vt,[e(`div`,Ht,[e(`div`,Ut,[e(`span`,Wt,i(t.$t(`kling.name.endImage`)),1),a(h,{content:t.$t(`kling.description.uploadEndImage`)},null,8,[`content`])])]),a(x,{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,disabled:t.uploadDisabled,class:`upload-wrapper`,multiple:!1,action:t.uploadUrl,"list-type":`picture`,"before-upload":t.onBeforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(b,{content:t.uploadTooltip,disabled:!t.uploadDisabled,placement:`top`},{default:p(()=>[e(`span`,null,[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`,disabled:t.uploadDisabled},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferences`)),1)]),_:1},8,[`disabled`])])]),_:1},8,[`content`,`disabled`])]),_:1},8,[`file-list`,`disabled`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Kt=L(Bt,[[`render`,Gt],[`__scopeId`,`data-v-b286c4d0`]]),qt=v({name:`ReferenceVideo`,components:{ElUpload:C,ElButton:J,ElRadioButton:O,ElRadioGroup:k,ElSwitch:N,InfoIcon:P,FilePreview:Me,UploadIcon:F},mixins:[q,U],data(){return{fileList:[],uploadUrl:z()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},config(){return this.$store.state.kling?.config||{}},hasVideo(){return!!this.urls?.[0]},referenceType:{get(){return this.config.video_list?.[0]?.refer_type||`feature`},set(e){this.updateVideoOptions(e,this.keepOriginalSound)}},keepOriginalSound:{get(){return this.config.video_list?.[0]?.keep_original_sound===`yes`},set(e){this.updateVideoOptions(this.referenceType,e)}}},methods:{onExceed(){D.warning(this.$t(`kling.message.referenceVideoExceed`))},onError(){D.error(this.$t(`kling.message.referenceVideoError`))},beforeUpload(e){if((this.config.image_list?.length||0)+Number(!!this.config.start_image_url)+Number(!!this.config.end_image_url)>4)return D.error(this.$t(`kling.message.referenceVideoImageLimit`)),!1;let t=e.type===`video/mp4`||e.type===`video/quicktime`,n=Ee(e.size);return t?n?!0:(D.error(this.$t(`kling.message.referenceVideoSizeExceed`,{max:we(De)})),!1):(D.error(this.$t(`kling.message.referenceVideoTypeFailed`)),!1)},ensurePromptToken(e){let t=this.$store.state.kling?.config,n=t?.prompt||``,r=n.includes(Q),i;if(e&&!r)i=n?`${n} ${Q}`:Q;else if(!e&&r)i=et(n);else return;this.$store.commit(`kling/setConfig`,{...t,prompt:i})},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,video_list:void 0}),this.ensurePromptToken(!1)},onSetVideoList(){let e=this.urls?.[0],t=e?[{video_url:e,refer_type:this.referenceType,keep_original_sound:this.keepOriginalSound?`yes`:`no`}]:void 0;this.$store.commit(`kling/setConfig`,{...this.config,video_list:t,generate_audio:!1,camera_control:void 0,cfg_scale:void 0,negative_prompt:void 0}),this.ensurePromptToken(!!e)},updateVideoOptions(e,t){let n=this.urls?.[0];n&&this.$store.commit(`kling/setConfig`,{...this.config,video_list:[{video_url:n,refer_type:e,keep_original_sound:t?`yes`:`no`}],...e===`base`?{start_image_url:void 0,end_image_url:void 0}:{},generate_audio:!1,camera_control:void 0,cfg_scale:void 0,negative_prompt:void 0})},async onSuccess(){this.onSetVideoList()}}}),Jt={class:`relative`},Yt={class:`flex min-h-8 items-center pr-20`},Xt={class:`flex justify-start items-center`},Zt={class:`text-sm font-bold`},Qt={key:0,class:`reference-options mt-3 flex flex-col gap-3`},$t={class:`flex flex-col items-stretch gap-2 sm:flex-row sm:items-center sm:justify-between`},en={class:`text-sm`},tn={class:`flex items-center justify-between gap-3`},nn={class:`text-sm`};function rn(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`file-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`),x=l(`el-radio-button`),S=l(`el-radio-group`),C=l(`el-switch`);return g(),s(`div`,Jt,[e(`div`,Yt,[e(`div`,Xt,[e(`span`,Zt,i(t.$t(`kling.name.referenceVideo`)),1),a(h,{content:t.$t(`kling.description.omniReferenceVideo`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.mp4,.mov`,name:`file`,class:`value`,"show-file-list":!0,limit:1,multiple:!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.percentage===void 0?o(``,!0):(g(),f(_,{key:0,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferenceVideo`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`]),t.hasVideo?(g(),s(`div`,Qt,[e(`div`,$t,[e(`span`,en,i(t.$t(`kling.name.referenceVideoType`)),1),a(S,{modelValue:t.referenceType,"onUpdate:modelValue":n[1]||=e=>t.referenceType=e,size:`small`},{default:p(()=>[a(x,{value:`feature`},{default:p(()=>[r(i(t.$t(`kling.name.referenceVideoFeature`)),1)]),_:1}),a(x,{value:`base`},{default:p(()=>[r(i(t.$t(`kling.name.referenceVideoBase`)),1)]),_:1})]),_:1},8,[`modelValue`])]),e(`div`,tn,[e(`span`,nn,i(t.$t(`kling.name.keepOriginalSound`)),1),a(C,{modelValue:t.keepOriginalSound,"onUpdate:modelValue":n[2]||=e=>t.keepOriginalSound=e},null,8,[`modelValue`])])])):o(``,!0)])}var an=L(qt,[[`render`,rn],[`__scopeId`,`data-v-e3a9dfab`]]),on=v({name:`KlingReferenceImages`,components:{ElButton:J,ElUpload:C,UploadIcon:F,ImagePreview:X,InfoIcon:P},mixins:[W,q,U],data(){return{fileList:[],uploadUrl:z()+`/api/v1/files/`}},computed:{config(){return this.$store.state.kling?.config||{}},headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},frameCount(){return Number(!!this.config.start_image_url)+Number(!!this.config.end_image_url)},maxImages(){return this.config.video_list?.length?4:7},referenceLimit(){return Math.max(0,this.maxImages-this.frameCount)},remainingSlots(){return Math.max(0,this.referenceLimit-this.urls.length)},urls(){return this.fileList.map(e=>e.response?.file_url||e.url).filter(Boolean)},storeImages(){return this.config.image_list}},watch:{frameCount(){this.syncPromptTokens()},storeImages(e){!e?.length&&this.fileList.length>0&&(this.fileList=[])}},methods:{beforeUpload(){return this.remainingSlots===0?(this.onExceed(),!1):!0},onExceed(){D.warning(this.$t(`kling.message.referenceImagesExceed`,{count:this.remainingSlots}))},onError(){D.error(this.$t(`kling.message.referenceImagesError`))},clearOmniConflicts(e){return{...e,generate_audio:!1,camera_control:void 0,cfg_scale:void 0,negative_prompt:void 0}},syncPromptTokens(e){let t=e||this.config,n=[tt(t.prompt),...this.urls.map((e,t)=>`<<<image_${this.frameCount+t+1}>>>`)].filter(Boolean).join(` `);n!==t.prompt&&this.$store.commit(`kling/setConfig`,{...t,prompt:n})},syncConfig(){let e=this.urls.length?this.urls.map(e=>({image_url:e})):void 0,t=this.clearOmniConflicts({...this.config,image_list:e});this.$store.commit(`kling/setConfig`,t),this.syncPromptTokens(t)},async onSuccess(e,t){e?.file_url&&(t.url=e.file_url,t.response=e),this.syncConfig()},onRemove(e,t){this.fileList.splice(e,1),t.url?.startsWith(`blob:`)&&URL.revokeObjectURL(t.url),this.syncConfig()}}}),sn={class:`relative`},cn={class:`flex justify-between items-center`},ln={class:`flex justify-start items-center`},un={class:`text-sm font-bold`},dn={key:0,class:`file-list flex flex-wrap gap-2 mt-2`};function fn(t,n,u,d,m,_){let v=l(`info-icon`),y=l(`UploadIcon`),b=l(`el-button`),x=l(`el-upload`),S=l(`image-preview`);return g(),s(`div`,sn,[e(`div`,cn,[e(`div`,ln,[e(`span`,un,i(t.$t(`kling.name.referenceImages`)),1),a(v,{content:t.$t(`kling.description.referenceImages`)},null,8,[`content`])]),a(x,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.png,.jpg,.jpeg`,name:`file`,limit:t.referenceLimit,multiple:!0,"show-file-list":!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{default:p(()=>[a(b,{round:``,type:`primary`,size:`small`,disabled:t.remainingSlots===0},{default:p(()=>[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferenceImages`)),1)]),_:1},8,[`disabled`])]),_:1},8,[`file-list`,`limit`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])]),t.fileList.length?(g(),s(`div`,dn,[(g(!0),s(c,null,h(t.fileList,(e,n)=>(g(),f(S,{key:e.uid||e.url||n,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:r=>t.onRemove(n,e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))),128))])):o(``,!0)])}var pn=L(on,[[`render`,fn]]),mn=v({name:`CfgScaleSelector`,components:{ElSlider:M,InfoIcon:P,ElInputNumber:j},computed:{value:{get(){return this.$store.state?.kling?.config?.cfg_scale},set(e){console.debug(`set cfg_scale`,e),this.$store.commit(`kling/setConfig`,{...this.$store.state?.kling?.config,cfg_scale:e})}}},mounted(){this.value||=0}}),hn={class:`flex justify-between`},gn={class:`flex justify-start items-center`},_n={class:`text-sm font-bold`},vn={class:`flex justify-end items-center`},yn={class:`w-full`};function bn(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input-number`),p=l(`el-slider`);return g(),s(`div`,null,[e(`div`,hn,[e(`div`,gn,[e(`span`,_n,i(t.$t(`kling.name.cfgScale`)),1),a(d,{content:t.$t(`kling.description.cfgScale`)},null,8,[`content`])]),e(`div`,vn,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),e(`div`,yn,[a(p,{modelValue:t.value,"onUpdate:modelValue":n[1]||=e=>t.value=e,min:0,max:1,step:.1},null,8,[`modelValue`])])])}var xn=L(mn,[[`render`,bn]]),Sn=v({name:`GenerateAudioSelector`,components:{ElSwitch:N,InfoIcon:P},computed:{selectedModel(){return this.$store.state.kling?.config?.model||``},selectedMode(){return this.$store.state.kling?.config?.mode||``},supported(){return!!(pe.includes(this.selectedModel)||this.selectedModel===`kling-v2-6`&&this.selectedMode===`pro`)},tooltipContent(){return this.supported?this.$t(`kling.description.generateAudio`):this.$t(`kling.description.generateAudioUnsupported`)},value:{get(){return this.supported?this.$store.state.kling?.config?.generate_audio??!1:!1},set(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,generate_audio:e})}}},watch:{supported(e){!e&&this.$store.state.kling?.config?.generate_audio&&this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,generate_audio:!1})}}}),Cn={class:`relative`},wn={class:`flex justify-between items-center`},Tn={class:`flex justify-start items-center`},En={class:`text-sm font-bold`};function Dn(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return g(),s(`div`,Cn,[e(`div`,wn,[e(`div`,Tn,[e(`span`,En,i(t.$t(`kling.name.generateAudio`)),1),a(d,{content:t.tooltipContent},null,8,[`content`])]),a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,disabled:!t.supported},null,8,[`modelValue`,`disabled`])])])}var On=L(Sn,[[`render`,Dn]]),kn=[`horizontal`,`vertical`,`pan`,`tilt`,`roll`,`zoom`],An=v({name:`CameraControlSelector`,components:{ElSelect:y,ElOption:b,ElSlider:M,ElInputNumber:j,InfoIcon:P},data(){return{configKeys:kn}},computed:{typeOptions(){return[{value:``,label:this.$t(`kling.name.cameraTypeNone`)},{value:`simple`,label:this.$t(`kling.name.cameraTypeSimple`)},{value:`down_back`,label:this.$t(`kling.name.cameraTypeDownBack`)},{value:`forward_up`,label:this.$t(`kling.name.cameraTypeForwardUp`)},{value:`left_turn_forward`,label:this.$t(`kling.name.cameraTypeLeftTurnForward`)},{value:`right_turn_forward`,label:this.$t(`kling.name.cameraTypeRightTurnForward`)}]},selectedMode(){return this.$store.state.kling?.config?.mode||``},selectedModel(){return this.$store.state.kling?.config?.model||``},selectedDuration(){return this.$store.state.kling?.config?.duration},motionControlSupported(){return Z(this.selectedModel,this.selectedMode,this.selectedDuration).motionControl},hasStartImage(){return!!this.$store.state.kling?.config?.start_image_url},disabled(){return!this.motionControlSupported||this.hasStartImage},tooltipContent(){return this.motionControlSupported?this.hasStartImage?this.$t(`kling.description.cameraControlDisabledImage2Video`):this.$t(`kling.description.cameraControl`):this.$t(`kling.description.cameraControlNotSupported`)},selectedType(){return this.$store.state.kling?.config?.camera_control?.type},selectedTypeRaw:{get(){return this.selectedType??``},set(e){let t=this.$store.state.kling?.config||{};if(!e){let e={...t};delete e.camera_control,this.$store.commit(`kling/setConfig`,e);return}let n=e;this.$store.commit(`kling/setConfig`,{...t,camera_control:{type:n,config:n===`simple`?t.camera_control?.config||{}:void 0}})}},configValues(){return this.$store.state.kling?.config?.camera_control?.config||{}}},watch:{disabled(e){e&&this.selectedType!==void 0&&(this.selectedTypeRaw=``)}},methods:{writeConfig(e,t){let n=this.$store.state.kling?.config||{},r=n.camera_control||{type:`simple`},i={...r.config||{}};t==null?delete i[e]:i[e]=t,this.$store.commit(`kling/setConfig`,{...n,camera_control:{...r,type:`simple`,config:i}})},onSliderChange(e,t){this.writeConfig(e,t)},onNumberChange(e,t){this.writeConfig(e,t)}}}),jn={class:`field`},Mn={class:`header`},Nn={class:`text-sm font-bold`},Pn={key:0,class:`config-grid`},Fn={class:`cfg-row-head`},In={class:`cfg-name`};function Ln(t,n,r,u,d,m){let _=l(`info-icon`),v=l(`el-option`),y=l(`el-select`),b=l(`el-input-number`),x=l(`el-slider`);return g(),s(`div`,jn,[e(`div`,Mn,[e(`span`,Nn,i(t.$t(`kling.name.cameraControl`)),1),a(_,{content:t.tooltipContent},null,8,[`content`])]),a(y,{modelValue:t.selectedTypeRaw,"onUpdate:modelValue":n[0]||=e=>t.selectedTypeRaw=e,class:`value`,placeholder:t.$t(`kling.placeholder.cameraType`),clearable:!0,disabled:t.disabled},{default:p(()=>[(g(!0),s(c,null,h(t.typeOptions,e=>(g(),f(v,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`disabled`]),t.selectedType===`simple`&&!t.disabled?(g(),s(`div`,Pn,[(g(!0),s(c,null,h(t.configKeys,n=>(g(),s(`div`,{key:n,class:`cfg-row`},[e(`div`,Fn,[e(`span`,In,i(t.$t(`kling.name.cc_${n}`)),1),a(b,{modelValue:t.configValues[n],"onUpdate:modelValue":e=>t.configValues[n]=e,min:-1,max:1,step:.1,precision:1,"controls-position":`right`,size:`small`,class:`cfg-num`,onChange:e=>t.onNumberChange(n,e)},null,8,[`modelValue`,`onUpdate:modelValue`,`onChange`])]),a(x,{"model-value":t.configValues[n]??0,min:-1,max:1,step:.1,onInput:e=>t.onSliderChange(n,e)},null,8,[`model-value`,`onInput`])]))),128))])):o(``,!0)])}var Rn=L(An,[[`render`,Ln],[`__scopeId`,`data-v-cd896060`]]),zn=[{groupKey:`cameraMovements`,chipKeys:[`rotateAround`,`stationary`,`handheld`,`zoomOut`,`zoomIn`,`follow`,`panRight`,`tiltUp`,`tiltDown`,`orbit`]},{groupKey:`cameraSpeed`,chipKeys:[`speedSlow`,`speedMedium`,`speedFast`]},{groupKey:`shotType`,chipKeys:[`shotClose`,`shotMedium`,`shotLong`,`shotLowAngle`,`shotHighAngle`,`shotShallowDof`,`shotFront`,`shotProfile`,`shotCloseUp`,`shotDrone`]},{groupKey:`light`,chipKeys:[`lightSunlight`,`lightSoft`,`lightNeon`,`lightWarm`,`lightNature`,`lightCandle`,`lightCityNight`]},{groupKey:`frame`,chipKeys:[`frameRichDetails`,`frameSimpleBg`]},{groupKey:`atmosphere`,chipKeys:[`atmosphereMysterious`,`atmospherePeaceful`,`atmosphereHeartwarming`,`atmosphereVivid`,`atmosphereColorful`]}],$=`, `;function Bn(e,t){let n=(e||``).trim();return n?n.includes(t)?n:`${n}${$}${t}`:t}function Vn(e,t){if(!e||!t)return e||``;let n=[`${t}${$}`,`${$}${t}`,t],r=e;for(let e of n)if(r.includes(e)){r=r.replace(e,``);break}return r.replace(/(?:,\s*)+$/,``).replace(/^(?:,\s*)+/,``)}var Hn=v({name:`InspirationPills`,components:{CloseIcon:Oe},computed:{prompt(){return this.$store.state.kling?.config?.prompt||``},allChipTexts(){return zn.flatMap(e=>e.chipKeys.map(e=>this.$t(`kling.inspiration.chip.${e}`)))},selected(){let e=this.prompt;if(!e)return[];let t=[];for(let n of this.allChipTexts){let r=e.indexOf(n);r!==-1&&t.push({text:n,idx:r})}return t.sort((e,t)=>e.idx-t.idx).map(e=>e.text)}},methods:{onRemove(e){let t=Vn(this.prompt,e);this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,prompt:t})}}}),Un={key:0,class:`pills`,role:`list`},Wn={class:`pill-text`},Gn=[`aria-label`,`title`,`onClick`];function Kn(n,r,u,d,f,p){let m=l(`close-icon`);return n.selected.length>0?(g(),s(`div`,Un,[(g(!0),s(c,null,h(n.selected,r=>(g(),s(`div`,{key:r,class:`pill`,role:`listitem`},[e(`span`,Wn,i(r),1),e(`button`,{type:`button`,class:`pill-remove`,"aria-label":n.$t(`kling.inspiration.removeChip`),title:n.$t(`kling.inspiration.removeChip`),onClick:t(e=>n.onRemove(r),[`stop`])},[a(m,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Gn)]))),128))])):o(``,!0)}var qn=v({name:`PromptInput`,components:{IdeaIcon:ce,ElButton:J,PromptTextarea:te,InspirationPills:L(Hn,[[`render`,Kn],[`__scopeId`,`data-v-6be01bcf`]])},emits:[`open-inspiration`],computed:{prompt:{get(){return this.$store.state.kling?.config?.prompt},set(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,prompt:e})}}},mounted(){this.prompt||=``}});function Jn(e,t,n,o,s,c){let u=l(`idea-icon`),d=l(`el-button`),m=l(`inspiration-pills`),h=l(`prompt-textarea`);return g(),f(h,{modelValue:e.prompt,"onUpdate:modelValue":t[1]||=t=>e.prompt=t,title:e.$t(`kling.name.prompt`),info:e.$t(`kling.description.prompt`),placeholder:e.$t(`kling.placeholder.prompt`)},{actions:p(()=>[a(d,{text:``,size:`small`,class:`inspiration-btn`,onClick:t[0]||=t=>e.$emit(`open-inspiration`)},{default:p(()=>[a(u,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(e.$t(`kling.inspiration.openButton`)),1)]),_:1})]),before:p(()=>[a(m)]),_:1},8,[`modelValue`,`title`,`info`,`placeholder`])}var Yn=L(qn,[[`render`,Jn],[`__scopeId`,`data-v-5754ae54`]]),Xn=v({name:`NegativePromptInput`,components:{ElInput:K,InfoIcon:P},computed:{prompt:{get(){return this.$store.state.kling?.config?.negative_prompt},set(e){console.debug(`set prompt`,e),this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,negative_prompt:e})}}},mounted(){this.prompt||=``}}),Zn={class:`field`},Qn={class:`box`},$n={class:`title font-bold`};function er(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input`);return g(),s(`div`,Zn,[e(`div`,Qn,[e(`h2`,$n,i(t.$t(`kling.name.negativePrompt`)),1),a(d,{content:t.$t(`kling.description.negativePrompt`),class:`info`},null,8,[`content`])]),a(f,{modelValue:t.prompt,"onUpdate:modelValue":n[0]||=e=>t.prompt=e,rows:3,type:`textarea`,class:`prompt`,placeholder:t.$t(`kling.placeholder.negativePrompt`)},null,8,[`modelValue`,`placeholder`])])}var tr=L(Xn,[[`render`,er],[`__scopeId`,`data-v-de98cf01`]]),nr=v({name:`InspirationDrawer`,components:{Close:Oe,IdeaIcon:ce,ElDrawer:A,ElButton:J},props:{modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`],data(){return{groups:zn}},computed:{visible:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e)}},drawerSize(){return window.innerWidth<768?`100%`:`380px`},prompt(){return this.$store.state.kling?.config?.prompt||``},allChipTexts(){return this.groups.flatMap(e=>e.chipKeys.map(e=>this.$t(`kling.inspiration.chip.${e}`)))},selectedCount(){return this.allChipTexts.filter(e=>this.isSelected(e)).length}},methods:{chipText(e){return this.$t(`kling.inspiration.chip.${e}`)},isSelected(e){return e?this.prompt.includes(e):!1},setPrompt(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,prompt:e})},onToggle(e){e&&(this.isSelected(e)?this.setPrompt(Vn(this.prompt,e)):this.setPrompt(Bn(this.prompt,e)))},onClearSelected(){let e=this.prompt;for(let t of this.allChipTexts)for(;e.includes(t);)e=Vn(e,t);this.setPrompt(e)}}}),rr={class:`drawer-content`},ir={class:`drawer-header`},ar={class:`title-row`},or={class:`title`},sr={class:`hint`},cr={key:0,class:`selected-bar`},lr={class:`selected-text`},ur={class:`groups`},dr={class:`group-title`},fr={class:`chip-grid`},pr=[`onClick`];function mr(t,u,d,m,_,v){let y=l(`idea-icon`),b=l(`close`),x=l(`el-button`),S=l(`el-drawer`);return g(),f(S,{modelValue:t.visible,"onUpdate:modelValue":u[1]||=e=>t.visible=e,direction:`rtl`,"with-header":!1,size:t.drawerSize,"custom-class":`kling-inspiration-drawer`,"destroy-on-close":!1},{default:p(()=>[e(`div`,rr,[e(`div`,ir,[e(`div`,ar,[a(y,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,or,i(t.$t(`kling.inspiration.title`)),1)]),a(x,{text:``,class:`close-btn`,"aria-label":t.$t(`common.button.close`),title:t.$t(`common.button.close`),onClick:u[0]||=e=>t.visible=!1},{default:p(()=>[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`])]),e(`div`,sr,i(t.$t(`kling.inspiration.hint`)),1),t.selectedCount>0?(g(),s(`div`,cr,[e(`span`,lr,i(t.$t(`kling.inspiration.selectedSummary`,{count:t.selectedCount})),1),a(x,{text:``,size:`small`,class:`clear-btn`,onClick:t.onClearSelected},{default:p(()=>[r(i(t.$t(`kling.inspiration.clearSelected`)),1)]),_:1},8,[`onClick`])])):o(``,!0),e(`div`,ur,[(g(!0),s(c,null,h(t.groups,r=>(g(),s(`div`,{key:r.groupKey,class:`group`},[e(`div`,dr,i(t.$t(`kling.inspiration.group.${r.groupKey}`)),1),e(`div`,fr,[(g(!0),s(c,null,h(r.chipKeys,e=>(g(),s(`button`,{key:e,type:`button`,class:n({chip:!0,active:t.isSelected(t.chipText(e))}),onClick:n=>t.onToggle(t.chipText(e))},i(t.chipText(e)),11,pr))),128))])]))),128))])])]),_:1},8,[`modelValue`,`size`])}var hr=L(nr,[[`render`,mr],[`__scopeId`,`data-v-8b2e6a5d`]]),gr={"kling-v3":`v3`,"kling-v3-omni":`v3-Omni`,"kling-v2-6":`v2.6`,"kling-v2-5-turbo":`v2.5-Turbo`,"kling-v2-1-master":`v2.1-Master`,"kling-v2-master":`v2-Master`,"kling-v1-6":`v1.6`,"kling-v1":`v1`,"kling-o1":`Kling O1`},_r={std:`720p`,pro:`1080p`,"4k":`4K`},vr=v({name:`SummaryChip`,components:{AudioIcon:oe},computed:{config(){return this.$store.state.kling?.config||{}},modelLabel(){let e=this.config?.model||`kling-v2-5-turbo`;return gr[e]||e},durationLabel(){return`${this.config?.duration??5}s`},aspectRatio(){return this.config?.aspect_ratio||``},modeLabel(){let e=this.config?.mode||`std`;return _r[e]||e},generateAudio(){return!!this.config?.generate_audio}}}),yr={class:`summary-chip`},br=[`title`],xr=[`title`],Sr=[`title`],Cr=[`title`],wr=[`title`];function Tr(t,n,r,c,u,d){let f=l(`audio-icon`);return g(),s(`div`,yr,[e(`span`,{class:`part`,title:t.$t(`kling.name.model`)},i(t.modelLabel),9,br),n[0]||=e(`span`,{class:`dot`},`·`,-1),e(`span`,{class:`part`,title:t.$t(`kling.name.duration`)},i(t.durationLabel),9,xr),n[1]||=e(`span`,{class:`dot`},`·`,-1),e(`span`,{class:`part`,title:t.$t(`kling.name.ratio`)},i(t.aspectRatio||`16:9`),9,Sr),n[2]||=e(`span`,{class:`dot`},`·`,-1),e(`span`,{class:`part`,title:t.$t(`kling.name.mode`)},i(t.modeLabel),9,Cr),t.generateAudio?(g(),s(`span`,{key:0,class:`audio`,title:t.$t(`kling.name.generateAudio`)},[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,wr)):o(``,!0)])}var Er=v({name:`ConfigPanel`,components:{MagicIcon:I,ElButton:J,ServicePricingSummary:Pe,PromptInput:Yn,NegativePromptInput:tr,ModelSelector:ct,ModeSelector:ht,DurationSelector:Tt,RatioSelector:Mt,StartImage:zt,CfgScaleSelector:xn,GenerateAudioSelector:On,CameraControlSelector:Rn,InspirationDrawer:hr,SummaryChip:L(vr,[[`render`,Tr],[`__scopeId`,`data-v-c800852a`]]),EndImage:Kt,ReferenceImages:pn,ReferenceVideo:an,ScenarioPaymentMode:Re},emits:[`generate`],data(){return{inspirationOpen:!1,quoteTimer:0,quoteRunId:0}},computed:{canGenerate(){return Ge(`kling`,ge(this.config))},config(){return this.$store.state.kling?.config},capabilities(){return Z(this.config?.model,this.config?.mode,this.config?.duration)},omniActive(){return this.config?.model===`kling-o1`||!!(this.config?.image_list?.length||this.config?.video_list?.length)},consumption(){return R(this.config,this.service?.cost)},service(){return this.$store.state.kling?.service},walletMode(){return B()&&Y(`kling`).mode===`wallet`}},watch:{walletMode:{handler(e){e&&this.scheduleQuote()},immediate:!0},config:{handler(){this.walletMode&&this.scheduleQuote()},deep:!0}},beforeUnmount(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1},methods:{scheduleQuote(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1;let e=Y(`kling`);e.quoteUsdc=void 0,e.quoteLoading=!1,this.canGenerate&&(this.quoteTimer=window.setTimeout(this.refreshQuote,350))},async refreshQuote(){if(!this.canGenerate)return;let e=Y(`kling`),t=++this.quoteRunId;e.quoteLoading=!0,e.quoteUsdc=void 0;try{let n=await H.quote(ge(this.config));t===this.quoteRunId&&e.mode===`wallet`&&this.canGenerate&&(e.quoteUsdc=n.amountUsdc)}catch(e){console.warn(`x402 quote failed`,e)}finally{t===this.quoteRunId&&(e.quoteLoading=!1)}},onGenerate(){this.$emit(`generate`)}}}),Dr={class:`flex flex-col h-full`},Or={class:`flex-1 overflow-y-auto p-5`},kr={class:`flex flex-col items-center justify-center px-5 pb-5`};function Ar(t,n,c,u,d,m){let h=l(`prompt-input`),_=l(`model-selector`),v=l(`ratio-selector`),y=l(`reference-images`),b=l(`reference-video`),x=l(`start-image`),S=l(`end-image`),C=l(`duration-selector`),w=l(`mode-selector`),T=l(`generate-audio-selector`),E=l(`camera-control-selector`),D=l(`cfg-scale-selector`),O=l(`negative-prompt-input`),k=l(`summary-chip`),A=l(`scenario-payment-mode`),j=l(`service-pricing-summary`),M=l(`magic-icon`),N=l(`el-button`),ee=l(`inspiration-drawer`);return g(),s(`div`,Dr,[e(`div`,Or,[a(h,{class:`mb-4`,onOpenInspiration:n[0]||=e=>t.inspirationOpen=!0}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),t.capabilities.referenceImages?(g(),f(y,{key:0,class:`mb-3`})):o(``,!0),t.capabilities.referenceVideo?(g(),f(b,{key:1,class:`mb-4`})):o(``,!0),a(x,{class:`mb-4`}),a(S,{class:`mb-4`}),a(C,{class:`mb-4`}),a(w,{class:`mb-4`}),a(T,{class:`mb-4`}),t.omniActive?o(``,!0):(g(),f(E,{key:2,class:`mb-4`})),t.omniActive?o(``,!0):(g(),f(D,{key:3,class:`mb-4`})),t.omniActive?o(``,!0):(g(),f(O,{key:4,class:`mb-4`}))]),e(`div`,kr,[a(k),a(A,{scenario:`kling`}),t.walletMode?o(``,!0):(g(),f(j,{key:0,value:t.consumption,service:t.service},null,8,[`value`,`service`])),t.config?.video_url!==void 0||t.config?.custom?(g(),f(N,{key:1,type:`primary`,class:`btn w-full`,round:``,disabled:!t.canGenerate,onClick:t.onGenerate},{default:p(()=>[a(M,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.extend`)),1)]),_:1},8,[`disabled`,`onClick`])):(g(),f(N,{key:2,type:`primary`,class:`btn w-full`,round:``,disabled:!t.canGenerate,onClick:t.onGenerate},{default:p(()=>[a(M,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.generate`)),1)]),_:1},8,[`disabled`,`onClick`]))]),a(ee,{modelValue:t.inspirationOpen,"onUpdate:modelValue":n[1]||=e=>t.inspirationOpen=e},null,8,[`modelValue`])])}var jr=L(Er,[[`render`,Ar]]),Mr=v({name:`MotionImage`,components:{UploadIcon:F,ElUpload:C,ElButton:J,InfoIcon:P,ImagePreview:X},mixins:[W,q,U,Se],data(){return{fileList:[],uploadUrl:z()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},mounted(){this.onSetImageUrl()},methods:{onExceed(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onError(){D.error(this.$t(`kling.message.uploadReferencesError`))},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,image_url:void 0})},onSetImageUrl(){let e=this.urls?.[0];this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,image_url:e})},async onSuccess(){this.onSetImageUrl()}}}),Nr={class:`relative`},Pr={class:`flex justify-between`},Fr={class:`flex justify-start items-center`},Ir={class:`text-sm font-bold`};function Lr(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`,Nr,[e(`div`,Pr,[e(`div`,Fr,[e(`span`,Ir,i(t.$t(`kling.name.motionImage`)),1),a(h,{content:t.$t(`kling.description.motionImage`)},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,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"list-type":`picture`,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},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(`kling.button.uploadReferences`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Rr=L(Mr,[[`render`,Lr],[`__scopeId`,`data-v-4a95ef2c`]]),zr=v({name:`MotionVideo`,components:{UploadIcon:F,ElUpload:C,ElButton:J,InfoIcon:P,FilePreview:Me},mixins:[q,U],data(){return{fileList:[],uploadUrl:z()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},mounted(){this.onSetVideoUrl()},methods:{onExceed(){D.warning(this.$t(`kling.message.uploadVideoExceed`))},onError(){D.error(this.$t(`kling.message.uploadVideoError`))},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,video_url:void 0})},beforeUpload(e){let t=e.type===`video/mp4`||e.type===`video/quicktime`,n=e.size/1024/1024<100;return t?n?!0:(D.error(this.$t(`kling.message.uploadVideoSizeExceed`)),!1):(D.error(this.$t(`kling.message.uploadVideoTypeFailed`)),!1)},onSetVideoUrl(){let e=this.urls?.[0];this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,video_url:e})},async onSuccess(){this.onSetVideoUrl()}}}),Br={class:`relative`},Vr={class:`flex justify-between`},Hr={class:`flex justify-start items-center`},Ur={class:`text-sm font-bold`};function Wr(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`file-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return g(),s(`div`,Br,[e(`div`,Vr,[e(`div`,Hr,[e(`span`,Ur,i(t.$t(`kling.name.motionVideo`)),1),a(h,{content:t.$t(`kling.description.motionVideo`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.mp4,.mov`,name:`file`,class:`value`,"show-file-list":!0,limit:1,multiple:!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.percentage===void 0?o(``,!0):(g(),f(_,{key:0,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadVideoUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Gr=L(zr,[[`render`,Wr],[`__scopeId`,`data-v-630c4521`]]),Kr=v({name:`MotionPromptInput`,components:{ElInput:K,InfoIcon:P},computed:{prompt:{get(){return this.$store.state.kling?.motionConfig?.prompt||``},set(e){this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,prompt:e})}}}}),qr={class:`field`},Jr={class:`box`},Yr={class:`title font-bold`};function Xr(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input`);return g(),s(`div`,qr,[e(`div`,Jr,[e(`h2`,Yr,i(t.$t(`kling.name.motionPrompt`)),1),a(d,{content:t.$t(`kling.description.motionPrompt`),class:`info`},null,8,[`content`])]),a(f,{modelValue:t.prompt,"onUpdate:modelValue":n[0]||=e=>t.prompt=e,rows:3,type:`textarea`,class:`prompt`,placeholder:t.$t(`kling.placeholder.motionPrompt`)},null,8,[`modelValue`,`placeholder`])])}var Zr=L(Kr,[[`render`,Xr],[`__scopeId`,`data-v-ca9fdbe5`]]),Qr=`video`,$r=v({name:`CharacterOrientationSelector`,components:{ElRadioGroup:k,ElRadioButton:O,InfoIcon:P},computed:{value:{get(){return this.$store.state.kling?.motionConfig?.character_orientation||Qr},set(e){this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,character_orientation:e})}}},mounted(){this.$store.state.kling?.motionConfig?.character_orientation||(this.value=Qr)}}),ei={class:`field`},ti={class:`header`},ni={class:`text-sm font-bold`};function ri(t,n,o,c,u,d){let f=l(`info-icon`),m=l(`el-radio-button`),h=l(`el-radio-group`);return g(),s(`div`,ei,[e(`div`,ti,[e(`span`,ni,i(t.$t(`kling.name.characterOrientation`)),1),a(f,{content:t.$t(`kling.description.characterOrientation`)},null,8,[`content`])]),a(h,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,size:`small`,class:`value`},{default:p(()=>[a(m,{label:`image`},{default:p(()=>[r(i(t.$t(`kling.name.orientationImage`)),1)]),_:1}),a(m,{label:`video`},{default:p(()=>[r(i(t.$t(`kling.name.orientationVideo`)),1)]),_:1})]),_:1},8,[`modelValue`])])}var ii=L($r,[[`render`,ri],[`__scopeId`,`data-v-7a91195b`]]),ai=`kling-v2-6`,oi=v({name:`MotionModelSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:P},computed:{options(){return[{value:`kling-v2-6`,label:`Kling 2.6`},{value:`kling-v3`,label:`Kling 3.0`}]},value:{get(){return this.$store.state.kling?.motionConfig?.model_name||ai},set(e){this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,model_name:e})}}},mounted(){this.$store.state.kling?.motionConfig?.model_name||(this.value=ai)}}),si={class:`field`},ci={class:`header`},li={class:`title font-bold`};function ui(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,si,[e(`div`,ci,[e(`h2`,li,i(t.$t(`kling.name.motionModel`)),1),a(m,{content:t.$t(`kling.description.motionModel`)},null,8,[`content`])]),a(v,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.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 di=L(oi,[[`render`,ui],[`__scopeId`,`data-v-480e8da2`]]),fi=`std`,pi=v({name:`MotionModeSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:P},computed:{options(){return[{value:`std`,label:this.$t(`kling.name.modeStd`)},{value:`pro`,label:this.$t(`kling.name.modePro`)}]},value:{get(){return this.$store.state.kling?.motionConfig?.mode||fi},set(e){this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,mode:e})}}},mounted(){this.$store.state.kling?.motionConfig?.mode||(this.value=fi)}}),mi={class:`field`},hi={class:`header`},gi={class:`title font-bold`};function _i(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,mi,[e(`div`,hi,[e(`h2`,gi,i(t.$t(`kling.name.mode`)),1),a(m,{content:t.$t(`kling.description.motionMode`)},null,8,[`content`])]),a(v,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.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 vi=L(pi,[[`render`,_i],[`__scopeId`,`data-v-1295688c`]]),yi=v({name:`KeepOriginalSoundSelector`,components:{ElSwitch:N,InfoIcon:P},computed:{value:{get(){return(this.$store.state.kling?.motionConfig?.keep_original_sound??`yes`)===`yes`},set(e){this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,keep_original_sound:e?`yes`:`no`})}}}}),bi={class:`relative`},xi={class:`flex justify-between items-center`},Si={class:`flex justify-start items-center`},Ci={class:`text-sm font-bold`};function wi(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return g(),s(`div`,bi,[e(`div`,xi,[e(`div`,Si,[e(`span`,Ci,i(t.$t(`kling.name.keepOriginalSound`)),1),a(d,{content:t.$t(`kling.description.keepOriginalSound`)},null,8,[`content`])]),a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e},null,8,[`modelValue`])])])}var Ti=v({name:`MotionPanel`,components:{MagicIcon:I,ElButton:J,ServicePricingSummary:Pe,MotionImage:Rr,MotionVideo:Gr,MotionPromptInput:Zr,CharacterOrientationSelector:ii,MotionModelSelector:di,MotionModeSelector:vi,KeepOriginalSoundSelector:L(yi,[[`render`,wi]])},emits:[`generate`],computed:{motionConfig(){return this.$store.state.kling?.motionConfig},consumption(){return R({...this.motionConfig,duration:1},this.service?.cost)},service(){return this.$store.state.kling?.service},canGenerate(){let e=this.motionConfig;return!!(e?.image_url&&e?.video_url)}},methods:{onGenerate(){this.$emit(`generate`)}}}),Ei={class:`flex flex-col h-full`},Di={class:`flex-1 overflow-y-auto p-5`},Oi={class:`flex flex-col items-center justify-center px-5 pb-5`};function ki(t,n,o,c,u,d){let f=l(`motion-image`),m=l(`motion-video`),h=l(`motion-prompt-input`),_=l(`character-orientation-selector`),v=l(`motion-model-selector`),y=l(`motion-mode-selector`),b=l(`keep-original-sound-selector`),x=l(`service-pricing-summary`),S=l(`magic-icon`),C=l(`el-button`);return g(),s(`div`,Ei,[e(`div`,Di,[a(f,{class:`mb-3`}),a(m,{class:`mb-3`}),a(h,{class:`mb-4`}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),a(y,{class:`mb-4`}),a(b,{class:`mb-4`})]),e(`div`,Oi,[a(x,{value:t.consumption,service:t.service,"rate-unit":t.$t(`kling.name.perSecond`),note:t.$t(`kling.message.motionPricingNote`)},null,8,[`value`,`service`,`rate-unit`,`note`]),a(C,{type:`primary`,class:`btn w-full`,round:``,disabled:!t.canGenerate,onClick:t.onGenerate},{default:p(()=>[a(S,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.generateMotion`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var Ai=L(Ti,[[`render`,ki]]),ji=v({name:`KlingTabSwitcher`,components:{ElTabs:x,ElTabPane:S,ElTag:he},props:{modelValue:{type:String,default:`videos`}},emits:[`update:modelValue`],computed:{tabs(){return[{value:`videos`,label:this.$t(`kling.tab.videoGeneration`)},{value:`motion`,label:this.$t(`kling.tab.motionControl`)},{value:`talking-photo`,label:this.$t(`kling.tab.talkingPhoto`)}]}},methods:{onUpdate(e){this.$emit(`update:modelValue`,e)}}}),Mi=[`title`],Ni={class:`text`};function Pi(t,n,a,u,d,m){let _=l(`el-tag`),v=l(`el-tab-pane`),y=l(`el-tabs`);return g(),f(y,{"model-value":t.modelValue,class:`kling-tabs scenario-tabs scenario-tabs--divided`,"onUpdate:modelValue":t.onUpdate},{default:p(()=>[(g(!0),s(c,null,h(t.tabs,t=>(g(),f(v,{key:t.value,name:t.value,disabled:t.disabled},{label:p(()=>[e(`span`,{class:`tab-label`,title:t.disabled?t.disabledReason:void 0},[e(`span`,Ni,i(t.label),1),t.badge?(g(),f(_,{key:0,size:`small`,type:`warning`,class:`badge`},{default:p(()=>[r(i(t.badge),1)]),_:2},1024)):o(``,!0)],8,Mi)]),_:2},1032,[`name`,`disabled`]))),128))]),_:1},8,[`model-value`,`onUpdate:modelValue`])}var Fi=L(ji,[[`render`,Pi],[`__scopeId`,`data-v-e6a2bb26`]]),Ii={"kling-v2-6":`v2.6`,"kling-v2-5-turbo":`v2.5-Turbo`,"kling-v2-1-master":`v2.1-Master`,"kling-v2-master":`v2-Master`,"kling-v1-6":`v1.6`,"kling-v1":`v1`},Li=v({name:`TalkingPhotoModelSelector`,components:{ElSelect:y,ElOption:b},data(){return{options:de.map(e=>({value:e,label:Ii[e]||e}))}},computed:{value:{get(){return this.$store.state.kling?.talkingPhotoConfig?.model||`kling-v2-1-master`},set(e){this.$store.commit(`kling/setTalkingPhotoConfig`,{...this.$store.state.kling?.talkingPhotoConfig,model:e})}}},mounted(){this.$store.state.kling?.talkingPhotoConfig?.model||(this.value=me)}}),Ri={class:`field`},zi={class:`title font-bold`};function Bi(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,Ri,[e(`h2`,zi,i(t.$t(`kling.name.model`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Vi=L(Li,[[`render`,Bi],[`__scopeId`,`data-v-cbc83d11`]]),Hi=v({name:`TalkingPhotoModeSelector`,components:{ElSelect:y,ElOption:b},computed:{options(){return[{value:`std`,label:this.$t(`kling.name.modeStd`)},{value:`pro`,label:this.$t(`kling.name.modePro`)}]},value:{get(){return this.$store.state.kling?.talkingPhotoConfig?.mode||`pro`},set(e){this.$store.commit(`kling/setTalkingPhotoConfig`,{...this.$store.state.kling?.talkingPhotoConfig,mode:e})}}},mounted(){this.$store.state.kling?.talkingPhotoConfig?.mode||(this.value=`pro`)}}),Ui={class:`field`},Wi={class:`title font-bold`};function Gi(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,Ui,[e(`h2`,Wi,i(t.$t(`kling.name.mode`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Ki=v({name:`TalkingPhotoPanel`,components:{MagicIcon:I,UploadIcon:F,ElUpload:C,ElButton:J,ElInput:K,ServicePricingSummary:Pe,InfoIcon:P,ImagePreview:X,ModelSelector:Vi,ModeSelector:L(Hi,[[`render`,Gi],[`__scopeId`,`data-v-92525a1d`]]),ScenarioPaymentMode:Re},mixins:[U,Se],emits:[`generate`],data(){return{imageFiles:[],audioFiles:[],uploadUrl:z()+`/api/v1/files/`,quoteTimer:0,quoteRunId:0}},computed:{config(){return this.$store.state.kling?.talkingPhotoConfig||{}},audioUrl(){return this.config.audio_url},headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},service(){return this.$store.state.kling?.service},consumption(){return R({...this.config,action:`talking-photo`},this.service?.cost)},canGenerate(){return!!(this.config.image_url&&this.config.audio_url)},walletMode(){return B()&&Y(`kling`).mode===`wallet`}},watch:{walletMode:{handler(e){e&&this.scheduleQuote()},immediate:!0},config:{handler(){this.walletMode&&this.scheduleQuote()},deep:!0}},beforeUnmount(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1},methods:{scheduleQuote(){window.clearTimeout(this.quoteTimer),this.quoteTimer=window.setTimeout(this.refreshQuote,350)},async refreshQuote(){let e=Y(`kling`),t=++this.quoteRunId;e.quoteLoading=!0,e.quoteUsdc=void 0;try{let n=await H.quoteTalkingPhoto(ke(this.config));t===this.quoteRunId&&e.mode===`wallet`&&(e.quoteUsdc=n.amountUsdc)}catch(e){console.warn(`x402 quote failed`,e)}finally{t===this.quoteRunId&&(e.quoteLoading=!1)}},commit(e){this.$store.commit(`kling/setTalkingPhotoConfig`,{...this.config,...e})},onPromptChange(e){this.commit({prompt:e})},onImageExceed(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onImageError(){D.error(this.$t(`kling.message.uploadReferencesError`))},onImageSuccess(e){this.commit({image_url:e?.file_url})},onImageRemove(e){this.imageFiles.splice(this.imageFiles.indexOf(e),1),this.commit({image_url:void 0})},onAudioExceed(){D.warning(this.$t(`kling.message.uploadAudioExceed`))},onAudioError(){D.error(this.$t(`kling.message.uploadAudioError`))},onAudioSuccess(e){this.commit({audio_url:e?.file_url})},onAudioRemove(){this.commit({audio_url:void 0})},onGenerate(){this.$emit(`generate`)}}}),qi={class:`flex flex-col h-full`},Ji={class:`flex-1 overflow-y-auto p-5`},Yi={class:`relative mb-4`},Xi={class:`flex justify-start items-center`},Zi={class:`text-sm font-bold`},Qi={class:`relative mb-4`},$i={class:`flex justify-start items-center`},ea={class:`text-sm font-bold`},ta=[`src`],na={class:`mb-4`},ra={class:`flex justify-start items-center`},ia={class:`text-sm font-bold`},aa={class:`flex flex-col items-center justify-center px-5 pb-5`};function oa(t,n,c,u,d,m){let h=l(`model-selector`),_=l(`mode-selector`),v=l(`info-icon`),y=l(`image-preview`),b=l(`upload-icon`),x=l(`el-button`),S=l(`el-upload`),C=l(`el-input`),w=l(`scenario-payment-mode`),T=l(`service-pricing-summary`),E=l(`magic-icon`);return g(),s(`div`,qi,[e(`div`,Ji,[a(h,{class:`mb-4`}),a(_,{class:`mb-4`}),e(`div`,Yi,[e(`div`,Xi,[e(`span`,Zi,i(t.$t(`kling.name.talkingPhotoImage`)),1),a(v,{content:t.$t(`kling.description.talkingPhotoImage`)},null,8,[`content`])]),a(S,{ref:`imageUploader`,"file-list":t.imageFiles,"onUpdate:fileList":n[0]||=e=>t.imageFiles=e,name:`file`,accept:`.png,.jpg,.jpeg,.webp,.bmp`,limit:1,class:`upload-wrapper`,multiple:!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"list-type":`picture`,headers:t.headers,"on-exceed":t.onImageExceed,"on-error":t.onImageError,"on-success":t.onImageSuccess},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(y,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onImageRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(x,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(b,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferences`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`headers`,`on-exceed`,`on-error`,`on-success`])]),e(`div`,Qi,[e(`div`,$i,[e(`span`,ea,i(t.$t(`kling.name.talkingPhotoAudio`)),1),a(v,{content:t.$t(`kling.description.talkingPhotoAudio`)},null,8,[`content`])]),a(S,{ref:`audioUploader`,"file-list":t.audioFiles,"onUpdate:fileList":n[1]||=e=>t.audioFiles=e,name:`file`,accept:`.mp3,.wav,.m4a,.aac`,limit:1,class:`upload-wrapper`,multiple:!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,headers:t.headers,"on-exceed":t.onAudioExceed,"on-error":t.onAudioError,"on-success":t.onAudioSuccess,"on-remove":t.onAudioRemove},{default:p(()=>[a(x,{round:``,type:`primary`,size:`small`,class:`btn`},{default:p(()=>[a(b,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadAudio`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`headers`,`on-exceed`,`on-error`,`on-success`,`on-remove`]),t.audioUrl?(g(),s(`audio`,{key:0,src:t.audioUrl,controls:``,class:`w-full mt-2`},null,8,ta)):o(``,!0)]),e(`div`,na,[e(`div`,ra,[e(`span`,ia,i(t.$t(`kling.name.talkingPhotoPrompt`)),1),a(v,{content:t.$t(`kling.description.talkingPhotoPrompt`)},null,8,[`content`])]),a(C,{"model-value":t.config.prompt,type:`textarea`,rows:2,placeholder:t.$t(`kling.placeholder.talkingPhotoPrompt`),class:`mt-1`,"onUpdate:modelValue":t.onPromptChange},null,8,[`model-value`,`placeholder`,`onUpdate:modelValue`])])]),e(`div`,aa,[a(w,{scenario:`kling`}),t.walletMode?o(``,!0):(g(),f(T,{key:0,value:t.consumption,service:t.service},null,8,[`value`,`service`])),a(x,{type:`primary`,class:`btn w-full`,round:``,disabled:!t.canGenerate,onClick:t.onGenerate},{default:p(()=>[a(E,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.generateTalkingPhoto`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var sa=L(Ki,[[`render`,oa],[`__scopeId`,`data-v-46191f92`]]),ca=v({name:`TaskPreview`,components:{DeleteIcon:le,ChannelIcon:ie,InfoIcon:se,MagicIcon:I,TimeIcon:ee,WarningIcon:ue,CopyToClipboard:Ae,ElAlert:T,VideoPlayer:Ie,ElTooltip:w,ElButton:J,ImagePreview:X,VideoPreview:Le,AudioPreview:Fe,ApiCodeButton:ze,ReportButton:je},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{isFailure(){let e=this.modelValue?.response;return e?.success===!1||!!e?.error||e?.state===`failed`||e?.state===`cancelled`},isWaiting(){let e=this.modelValue?.response;return!e||!this.isFailure&&e.success!==!0&&!e.video_url},application(){return this.$store.state.kling?.application},config(){return this.$store.state.kling?.config},displayText(){return this.modelValue?.request?.prompt?.trim()||this.modelValue?.request?.text?.trim()||``},referenceImages(){let e=[],t=this.modelValue?.request?.start_image_url,n=this.modelValue?.request?.end_image_url,r=this.modelValue?.request?.image_url;return t&&e.push({url:t,name:`start-image`}),n&&e.push({url:n,name:`end-image`}),r&&e.push({url:r,name:`reference-image`}),e},referenceVideos(){let e=[],t=this.modelValue?.request?.video_url;t&&e.push({url:t,name:`reference-video`});let n=this.modelValue?.request?.video_list;return(Array.isArray(n)?n:[]).forEach((t,n)=>{t?.video_url&&e.push({url:t.video_url,name:`reference-video-${n+1}`})}),e},referenceAudios(){let e=this.modelValue?.request?.audio_url;return e?[{url:e,name:`reference-audio`}]:[]}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await V.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`kling/deleteTask`,{id:e}),D.success(this.$t(`common.message.deleteTaskSuccess`))}catch{D.error(this.$t(`common.message.deleteTaskFailed`))}}},onDownload(e,t){e?.stopPropagation(),console.log(`on download`),window.open(t,`_blank`)},onOpenVideo(e){window.open(e,`_blank`)}}}),la={class:`preview`},ua={class:`left`},da={class:`main`},fa={class:`bot`},pa={class:`datetime`},ma=[`aria-label`],ha={key:0,class:`info`},ga={key:0,class:`request-media flex justify-start items-center gap-2 w-full overflow-x-auto`},_a={key:1,class:`prompt`},va={key:0},ya={key:1},ba={key:1,class:n({content:!0,failed:!0})},xa={key:0,class:`mb-4`},Sa={key:1,class:n({operations:!0,"mt-2":!0})},Ca={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},wa={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ta={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Ea={key:2,class:n({content:!0})},Da={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Oa={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ka={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Aa={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},ja={key:3,class:n({content:!0})},Ma={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Na={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function Pa(n,u,d,m,_,v){let y=l(`capability-presentation`),b=l(`delete-icon`),x=l(`el-tooltip`),S=l(`image-preview`),C=l(`video-preview`),w=l(`audio-preview`),T=l(`video-player`),E=l(`el-button`),D=l(`api-code-button`),O=l(`report-button`),k=l(`channel-icon`),A=l(`magic-icon`),j=l(`copy-to-clipboard`),M=l(`time-icon`),N=l(`el-alert`),ee=l(`warning-icon`),P=l(`info-icon`);return g(),s(`div`,la,[e(`div`,ua,[a(y,{capability:`kling`,part:`avatar`,class:`avatar`})]),e(`div`,da,[e(`div`,fa,[a(y,{capability:`kling`,part:`name`}),e(`span`,pa,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(x,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:p(()=>[n.modelValue?.id?(g(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:u[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,ma)):o(``,!0)]),_:1},8,[`content`])]),n.referenceImages.length>0||n.referenceVideos.length>0||n.referenceAudios.length>0||n.displayText?(g(),s(`div`,ha,[n.referenceImages.length>0||n.referenceVideos.length>0||n.referenceAudios.length>0?(g(),s(`div`,ga,[(g(!0),s(c,null,h(n.referenceImages,(e,t)=>(g(),f(S,{key:`image-${t}`,url:e.url,name:e.name,closable:!1},null,8,[`url`,`name`]))),128)),(g(!0),s(c,null,h(n.referenceVideos,(e,t)=>(g(),f(C,{key:`video-${t}`,url:e.url,name:e.name},null,8,[`url`,`name`]))),128)),(g(!0),s(c,null,h(n.referenceAudios,(e,t)=>(g(),f(w,{key:`audio-${t}`,url:e.url,name:e.name},null,8,[`url`,`name`]))),128))])):o(``,!0),n.displayText?(g(),s(`p`,_a,[r(i(n.displayText)+` `,1),n.modelValue?.response?n.isWaiting?(g(),s(`span`,ya,` - (`+i(n.$t(`kling.status.processing`))+`) `,1)):o(``,!0):(g(),s(`span`,va,` - (`+i(n.$t(`kling.status.pending`))+`) `,1))])):o(``,!0)])):o(``,!0),n.modelValue?.response?.success===!0&&!n.isFailure?(g(),s(`div`,ba,[n.modelValue?.response.video_url?(g(),s(`div`,xa,[a(T,{src:n.modelValue?.response.video_url},null,8,[`src`])])):o(``,!0),n.modelValue?.response.success?(g(),s(`div`,Sa,[a(x,{class:`box-item`,effect:`dark`,content:n.$t(`kling.message.downloadVideo`),placement:`top-start`},{default:p(()=>[n.modelValue?.response.video_url?(g(),f(E,{key:0,type:`info`,size:`small`,class:`btn-action`,onClick:u[1]||=e=>n.onDownload(e,n.modelValue?.response.video_url)},{default:p(()=>[r(i(n.$t(`kling.button.download`)),1)]),_:1})):o(``,!0)]),_:1},8,[`content`]),a(D,{path:`/kling/videos`,body:n.modelValue?.request},null,8,[`body`]),a(O,{service:`kling`,"target-id":n.modelValue?.id,snapshot:{prompt:n.displayText}},null,8,[`target-id`,`snapshot`])])):o(``,!0),a(N,{closable:!1,class:`mt-2 success`},{default:p(()=>[e(`p`,Ca,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.model`))+`: `+i(n.modelValue?.request?.model),1)]),e(`p`,wa,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(j,{content:n.modelValue?.id},null,8,[`content`])]),n.modelValue?.elapsed?(g(),s(`p`,Ta,[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0)]),_:1})])):o(``,!0),n.isFailure?(g(),s(`div`,Ea,[a(N,{closable:!1,class:`failure`},{template:p(()=>[a(ee,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.failure`)),1)]),default:p(()=>[e(`p`,Da,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(j,{content:n.modelValue?.id},null,8,[`content`])]),e(`p`,Oa,[a(P,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(j,{content:n.modelValue?.response?.error?.message},null,8,[`content`])]),n.modelValue?.elapsed?(g(),s(`p`,ka,[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),n.modelValue?.response?.trace_id?(g(),s(`p`,Aa,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(j,{content:n.modelValue?.response?.trace_id},null,8,[`content`])])):o(``,!0)]),_:1})])):o(``,!0),n.isWaiting?(g(),s(`div`,ja,[a(N,{closable:!1,class:`info`},{template:p(()=>[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(n.modelValue?.response?`kling.status.processing`:`kling.status.pending`)),1)]),default:p(()=>[e(`p`,Ma,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(j,{content:n.modelValue?.id},null,8,[`content`])]),n.modelValue?.response?.trace_id?(g(),s(`p`,Na,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(j,{content:n.modelValue?.response?.trace_id},null,8,[`content`])])):o(``,!0)]),_:1})])):o(``,!0)])])}var Fa=v({name:`RecentPanel`,components:{TaskPreview:L(ca,[[`render`,Pa],[`__scopeId`,`data-v-73637147`]]),NoTasks:re,BotPlaceholder:Be,ScrollList:ne},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.kling?.tasks,items:this.$store.state.kling?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Ia={key:0},La={key:2,class:`w-full h-full flex items-center justify-center`};function Ra(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`,Ia,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(g(),f(_,{key:1,ref:`scrollList`,class:`h-full w-full overflow-y-auto tasks`,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`,La,[a(v)])):o(``,!0)],64)}var za=v({name:`KlingIndex`,components:{ConfigPanel:jr,MotionPanel:Ai,TalkingPhotoPanel:sa,TabSwitcher:Fi,Layout:Ze,RecentPanel:L(Fa,[[`render`,Ra]]),ShowcaseResultTabs:He},mixins:[Te,Ue(`kling`),Ve(`kling`)],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1,walletTaskIds:[]}},computed:{applicationsLoading(){return this.$store.state.kling?.status?.getApplications===E.Request},tasksLoading(){return this.$store.state.kling?.status?.getTasks===E.Request||this.fetchingTasks},credential(){return this.$store.state.kling.credential},config(){return this.$store.state.kling.config},motionConfig(){return this.$store.state.kling.motionConfig},talkingPhotoConfig(){return this.$store.state.kling.talkingPhotoConfig},taskType(){return this.$store.state.kling.taskType||`videos`},tasks(){return this.$store.state.kling.tasks},walletMode(){return this.taskType!==`motion`&&B()&&Y(`kling`).mode===`wallet`}},watch:{taskType:{handler(e){ye(`kling`,e!==`motion`)},immediate:!0},walletMode:{async handler(e,t){if(!(t===void 0||e===t)){if(this.$store.commit(`kling/setTasks`,void 0),e&&!this.job&&(this.job=window.setInterval(this.onPollTasks,5e3)),!e&&!this.credential?.token){window.clearInterval(this.job),this.job=0,await this.onScrollDown();return}await this.onGetTasks(),await this.onScrollDown()}}},tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job||=window.setInterval(this.onPollTasks,5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await ae({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(){console.debug(`start onGetService`),await this.$store.dispatch(`kling/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`kling/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`kling/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r,...this.walletMode&&!this.credential?.token?{mode:`x402`,ids:this.walletTaskIds}:{}})}finally{this.fetchingTasks=!1}},async onGenerate(){let e=ge(this.config),t=We(`kling`,e);if(t){D.error(this.$t(`common.message.${t}`));return}if(!G(this.uploadTracker,e=>this.$t(e),e=>D.warning(e)))return;let n=Number(!!e.start_image_url)+Number(!!e.end_image_url),r=e.image_list?.length||0,i=e.video_list?.length?4:7;if(n+r>i){D.warning(this.$t(`kling.message.referenceImagesTotalLimit`,{count:i}));return}if(e.video_list?.[0]?.refer_type===`base`&&(e.start_image_url||e.end_image_url||e.image_list?.some(({type:e})=>e))){D.warning(this.$t(`kling.message.baseVideoFrameConflict`));return}if(!e.video_id&&!e.video_url&&!e.start_image_url&&e.end_image_url){D.warning(this.$t(`kling.message.endImageRequiresStart`));return}let a=this.createPaymentOperation(t=>H.generate(e,t));a&&(D.info(this.$t(`kling.message.startingTask`)),ve(`kling`,a).then(e=>{this.recordWalletTask(e),D.success(this.$t(`kling.message.startTaskSuccess`))}).catch(e=>this.handleGenerationError(e)).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)}))},createPaymentOperation(e){if(!this.walletMode){if(!be())return;let t=this.credential?.token;return t?e({token:t}):void 0}let t=this.getWalletContext();if(!t){D.warning(this.$t(`common.x402Scenario.connectWalletFirst`));return}return e({mode:`x402`,x402:{wallet:t,confirm:e=>this.confirmWalletPayment(e),identityToken:this.credential?.token}})},recordWalletTask(e){let t=e?.data?.task_id;this.walletMode&&!this.credential?.token&&t&&!this.walletTaskIds.includes(t)&&this.walletTaskIds.unshift(t)},handleGenerationError(e){e instanceof Ce||_e(e,`kling`)||(this.walletMode?D.error(this.$t(`common.x402Scenario.paymentFailed`)):D.error(this.$t(`kling.message.startTaskFailed`)))},getWalletContext(){return xe(this.$wallet)},async confirmWalletPayment(e){return V.confirm(this.$t(`common.x402Scenario.confirmPayment`,{amount:e.amountUsdc}),this.$t(`order.message.x402ConfirmTitle`),{confirmButtonText:this.$t(`order.message.x402WalletPayCta`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`}).then(()=>!0).catch(()=>!1)},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()},async onTabChange(e){e!==this.taskType&&(await this.$store.dispatch(`kling/setTaskType`,e),await this.onGetTasks(),await this.onScrollDown())},async onGenerateMotion(){if(!G(this.uploadTracker,e=>this.$t(e),e=>D.warning(e)))return;let e=this.motionConfig||{};if(!e.image_url||!e.video_url){D.warning(this.$t(`kling.message.motionMissingInputs`));return}let t={image_url:e.image_url,video_url:e.video_url,character_orientation:e.character_orientation||`video`,mode:e.mode||`std`,keep_original_sound:e.keep_original_sound??`yes`,...e.model_name?{model_name:e.model_name}:{},...e.prompt?{prompt:e.prompt}:{},async:!0};if(!be())return;let n=this.credential?.token;if(!n){console.error(`no token specified`);return}D.info(this.$t(`kling.message.startingTask`)),ve(`kling`,H.motion(t,{token:n})).then(()=>{D.success(this.$t(`kling.message.startTaskSuccess`))}).catch(e=>{_e(e,`kling`)||D.error(this.$t(`kling.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},async onGenerateTalkingPhoto(){if(!G(this.uploadTracker,e=>this.$t(e),e=>D.warning(e)))return;let e=this.talkingPhotoConfig||{};if(!e.image_url||!e.audio_url){D.warning(this.$t(`kling.message.talkingPhotoMissingInputs`));return}let t=ke(e),n=this.createPaymentOperation(e=>H.talkingPhoto(t,e));n&&(D.info(this.$t(`kling.message.startingTask`)),ve(`kling`,n).then(e=>{this.recordWalletTask(e),D.success(this.$t(`kling.message.startTaskSuccess`))}).catch(e=>this.handleGenerationError(e)).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)}))}}}),Ba={class:`flex flex-col h-full`},Va={class:`flex-1 min-h-0`};function Ha(t,n,r,i,s,c){let u=l(`tab-switcher`),d=l(`config-panel`),m=l(`motion-panel`),h=l(`talking-photo-panel`),_=l(`recent-panel`),v=l(`showcase-result-tabs`),y=l(`layout`);return g(),f(y,null,{config:p(()=>[e(`div`,Ba,[a(u,{"model-value":t.taskType,"onUpdate:modelValue":t.onTabChange},null,8,[`model-value`,`onUpdate:modelValue`]),e(`div`,Va,[t.taskType===`videos`?(g(),f(d,{key:0,onGenerate:t.onGenerate},null,8,[`onGenerate`])):t.taskType===`motion`?(g(),f(m,{key:1,onGenerate:t.onGenerateMotion},null,8,[`onGenerate`])):t.taskType===`talking-photo`?(g(),f(h,{key:2,onGenerate:t.onGenerateTalkingPhoto},null,8,[`onGenerate`])):o(``,!0)])])]),result:p(()=>[a(v,{service:`kling`},{tasks:p(()=>[a(_,{ref:`recentPanel`,loading:t.loadingMore,onReachTop:t.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})]),_:1})}var Ua=L(za,[[`render`,Ha]]);export{Ua as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,it as d,j as f,mt as p,rt as m,tt as h,x as g,z as _}from"./vendor-chart-Dw-P17PN.js";import{t as v}from"./upload-XPx0yx5g.js";import{t as y}from"./tooltip-OUJEXz3N.js";import{t as b}from"./alert-BprQRUmf.js";import{h as x,v as S}from"./models-Cru5uJc2.js";import{t as C}from"./drawer-DttMD3IQ.js";import{t as w}from"./switch-DyfMMvH-.js";import{t as T}from"./clock-CxvQJYC5.js";import{a as E,i as D,n as O,r as k,s as A,t as ee}from"./pagination-B62agDTK.js";import{t as te}from"./info-DbD2xHpS.js";import{t as j}from"./trash-2-Cy68rO6n.js";import{t as M}from"./triangle-alert-CjbgCRoN.js";import{t as N}from"./upload-vSq7Ihy4.js";import{t as P}from"./wand-sparkles-BLj6TbQF.js";import"./constants-CuuFtMEu.js";import{A as F,Cn as ne,Gr as I,La as L,Li as R,O as re,Qi as ie,Va as z,Wr as B,aa as ae,at as V,ct as H,di as U,et as W,it as G,li as K,ot as q,st as J,to as Y,zi as X}from"./index-DVmeVwK7.js";import{t as oe}from"./CopyToClipboard-CnfP3j6K.js";import{t as se}from"./ReportButton-B0ZDQxLy.js";import{t as ce}from"./FilePreview-3oibArLi.js";import{t as Z}from"./ImagePreview-CZs9JDgj.js";import{n as le}from"./taskDrawerMixin-DyAUhFEq.js";import{t as ue}from"./ServicePricingSummary-CMOjp4_z.js";import{t as Q}from"./VideoPlayer-DaI2iEuf.js";import{t as de}from"./ScenarioPaymentMode-BMC9eBkY.js";import{t as fe}from"./ApiCodeButton-C6FWrCva.js";import{t as pe}from"./BotPlaceholder-CG-3N26i.js";import{t as me}from"./taskPollingMixin-CcLxtz8z.js";var he=_({name:`LayoutLuma`,components:{MagicIcon:P,ElDrawer:C,ElButton:Y},mixins:[le]}),ge={class:`main flex flex-row flex-1`},_e={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)]`},ve={class:`result h-full p-4 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function ye(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),_=l(`el-drawer`);return h(),s(`div`,ge,[e(`div`,_e,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,ve,[d(t.$slots,`result`,{},void 0,!0)]),u(a(m,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[g,!t.tasksEmpty]]),a(_,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`drawer generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var be=F(he,[[`render`,ye],[`__scopeId`,`data-v-4ab11479`]]),xe=_({name:`EnhancementSelector`,components:{ElSwitch:w,InfoIcon:E},computed:{value:{get(){return this.$store.state.luma?.config?.enhancement},set(e){console.debug(`set enhancement`,e),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,enhancement:e})}}},mounted(){this.value===void 0&&(this.value=!0)}}),Se={class:`relative`},Ce={class:`flex justify-between`},we={class:`flex justify-start items-center`},Te={class:`text-sm font-bold`},Ee={class:`flex justify-end items-center`};function De(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return h(),s(`div`,Se,[e(`div`,Ce,[e(`div`,we,[e(`span`,Te,i(t.$t(`luma.name.enhancement`)),1),a(d,{content:t.$t(`luma.description.enhancement`)},null,8,[`content`])]),e(`div`,Ee,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])])])}var Oe=F(xe,[[`render`,De]]),ke=_({name:`CustomSelector`,components:{ElSwitch:w,InfoIcon:E},computed:{value:{get(){return this.$store.state.luma?.config?.custom},set(e){console.debug(`set custom`,e),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,custom:e})}}},mounted(){this.value===void 0&&(this.value=!1)}}),Ae={class:`relative`},je={class:`flex justify-between`},Me={class:`flex justify-start items-center`},Ne={class:`text-sm font-bold`},Pe={class:`flex justify-end items-center`};function Fe(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return h(),s(`div`,Ae,[e(`div`,je,[e(`div`,Me,[e(`span`,Ne,i(t.$t(`luma.name.custom`)),1),a(d,{content:t.$t(`luma.description.custom`)},null,8,[`content`])]),e(`div`,Pe,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])])])}var Ie=F(ke,[[`render`,Fe]]),Le=_({name:`LoopSelector`,components:{ElSwitch:w,InfoIcon:E},computed:{value:{get(){return this.$store.state.luma?.config?.loop},set(e){console.debug(`set loop`,e),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,loop:e})}}},mounted(){this.value===void 0&&(this.value=!1)}}),Re={class:`relative`},ze={class:`flex justify-between`},Be={class:`flex justify-start items-center`},Ve={class:`text-sm font-bold`},He={class:`flex justify-end items-center`};function Ue(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return h(),s(`div`,Re,[e(`div`,ze,[e(`div`,Be,[e(`span`,Ve,i(t.$t(`luma.name.loop`)),1),a(d,{content:t.$t(`luma.description.loop`)},null,8,[`content`])]),e(`div`,He,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])])])}var We=F(Le,[[`render`,Ue]]),Ge=_({name:`EndImage`,components:{UploadIcon:N,ElUpload:v,ElButton:Y,ImagePreview:Z,InfoIcon:E},mixins:[H,J,V,W],data(){return{fileList:[],uploadUrl:L()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state?.luma?.config?.start_image_url},set(){}}},mounted(){this.value||=void 0,this.onSetEndImageUrl()},methods:{onExceed(){S.warning(this.$t(`luma.message.uploadReferencesExceed`))},onError(){S.error(this.$t(`luma.message.uploadReferencesError`))},onSetEndImageUrl(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),Ke={class:`relative`},qe={class:`flex justify-between`},Je={class:`flex justify-start items-center`},Ye={class:`text-sm font-bold`};function Xe(t,n,c,u,d,m){let g=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return h(),s(`div`,Ke,[e(`div`,qe,[e(`div`,Je,[e(`span`,Ye,i(t.$t(`luma.name.endImageUrl`)),1),a(g,{content:t.$t(`luma.description.endImageUrl`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:5,class:`upload-wrapper`,multiple:!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"list-type":`picture`,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(h(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`luma.button.uploadEndImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Ze=F(Ge,[[`render`,Xe],[`__scopeId`,`data-v-04c461bb`]]),Qe=_({name:`StartImage`,components:{UploadIcon:N,ElUpload:v,ElButton:Y,ImagePreview:Z,InfoIcon:E},mixins:[H,J,V,W],data(){return{fileList:[],uploadUrl:L()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state?.luma?.config?.start_image_url},set(){}}},mounted(){this.value||=void 0,this.onSetStartImageUrl()},methods:{onExceed(){S.warning(this.$t(`luma.message.uploadReferencesExceed`))},onError(){S.error(this.$t(`luma.message.uploadReferencesError`))},onSetStartImageUrl(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),$e={class:`relative`},et={class:`flex justify-between`},tt={class:`flex justify-start items-center`},nt={class:`text-sm font-bold`};function rt(t,n,c,u,d,m){let g=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return h(),s(`div`,$e,[e(`div`,et,[e(`div`,tt,[e(`span`,nt,i(t.$t(`luma.name.startImageUrl`)),1),a(g,{content:t.$t(`luma.description.startImageUrl`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:5,class:`upload-wrapper`,multiple:!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"list-type":`picture`,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.percentage==null?o(``,!0):(h(),f(_,{key:0,url:e.url||e.response.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`luma.button.uploadStartImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var it=F(Qe,[[`render`,rt],[`__scopeId`,`data-v-31c07a19`]]),at=_({name:`UploadVideo`,components:{UploadIcon:N,ElUpload:v,ElButton:Y,InfoIcon:E,FilePreview:ce},mixins:[J,V],data(){return{fileList:[],uploadUrl:L()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state.luma?.config?.video_url},set(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,video_url:e})}}},mounted(){this.value||=void 0},methods:{onExceed(){S.warning(this.$t(`luma.message.uploadVideoExceed`))},onError(){S.error(this.$t(`luma.message.uploadVideoError`))},beforeUpload(e){let t=e.type===`video/mp4`,n=e.size/1024/1024<10;return t?n?!0:(S.error(this.$t(`luma.message.uploadVideoSizeExceed`)),!1):(S.error(this.$t(`luma.message.uploadVideoTypeFailed`)),!1)},onSetVideoUrl(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,video_url:e,action:`extend`})},async onSuccess(){this.onSetVideoUrl()}}}),ot={class:`relative`},st={class:`flex justify-between`},ct={class:`flex justify-start items-center`},lt={class:`text-sm font-bold`};function ut(t,n,c,u,d,m){let g=l(`info-icon`),_=l(`file-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return h(),s(`div`,ot,[e(`div`,st,[e(`div`,ct,[e(`span`,lt,i(t.$t(`luma.name.videoUrl`)),1),a(g,{content:t.$t(`luma.description.videoUrl`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.mp4`,name:`file`,class:`value`,"show-file-list":!0,limit:1,multiple:!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.percentage==null?o(``,!0):(h(),f(_,{key:0,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`luma.button.uploadVideoUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var dt=F(at,[[`render`,ut],[`__scopeId`,`data-v-2189fc52`]]),ft=_({name:`PromptInput`,components:{PromptTextarea:D},computed:{prompt:{get(){return this.$store.state.luma?.config?.prompt},set(e){this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,prompt:e})}}},mounted(){this.prompt||=``}});function pt(e,t,n,r,i,a){let o=l(`prompt-textarea`);return h(),f(o,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`luma.name.prompt`),info:e.$t(`luma.description.prompt`),placeholder:e.$t(`luma.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var mt=F(ft,[[`render`,pt]]),ht=_({name:`ExtendFromInput`,components:{VideoPlayer:Q},props:{modelValue:{type:Object,required:!1,default:void 0}},data(){return{options:{quality:{default:`1080p`}}}},computed:{config(){return this.$store.state.luma?.config}}}),gt={class:`relative`},_t={class:`flex mb-2`},vt={class:`text-sm font-bold`};function yt(t,n,r,a,c,u){let d=l(`video-player`);return h(),s(`div`,gt,[e(`div`,_t,[e(`span`,vt,i(t.$t(`luma.name.extend`)),1)]),e(`div`,null,[t.config?.video_url?(h(),f(d,{key:0,src:t.config?.video_url},null,8,[`src`])):o(``,!0)])])}var bt=_({name:`ConfigPanel`,components:{MagicIcon:P,LoopSelector:We,StartImageInput:it,EndImageInput:Ze,EnhancementSelector:Oe,ElButton:Y,PromptInput:mt,ExtendFromInput:F(ht,[[`render`,yt]]),CustomSelector:Ie,UploadVideo:dt,ServicePricingSummary:ue,ScenarioPaymentMode:de},emits:[`generate`],data(){return{quoteTimer:0,quoteRunId:0}},computed:{config(){return this.$store.state.luma?.config},consumption(){return ne(this.config,this.service?.cost)},service(){return this.$store.state.luma?.service},walletMode(){return R()&&X(`luma`).mode===`wallet`}},watch:{walletMode:{handler(e){e&&this.scheduleQuote()},immediate:!0},config:{handler(){this.walletMode&&this.scheduleQuote()},deep:!0}},beforeUnmount(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1},methods:{scheduleQuote(){window.clearTimeout(this.quoteTimer),this.quoteTimer=window.setTimeout(this.refreshQuote,350)},async refreshQuote(){let e=X(`luma`),t=++this.quoteRunId;e.quoteLoading=!0,e.quoteUsdc=void 0;try{let n=await I.quote(B(this.config));t===this.quoteRunId&&e.mode===`wallet`&&(e.quoteUsdc=n.amountUsdc)}catch(e){console.warn(`x402 quote failed`,e)}finally{t===this.quoteRunId&&(e.quoteLoading=!1)}},onGenerate(){this.$emit(`generate`)}}}),xt={class:`flex flex-col h-full`},St={class:`flex-1 overflow-y-auto p-5`},Ct={class:`flex flex-col items-center justify-center px-5 pb-5`};function wt(t,n,c,u,d,m){let g=l(`extend-from-input`),_=l(`prompt-input`),v=l(`custom-selector`),y=l(`upload-video`),b=l(`start-image-input`),x=l(`end-image-input`),S=l(`enhancement-selector`),C=l(`loop-selector`),w=l(`scenario-payment-mode`),T=l(`service-pricing-summary`),E=l(`magic-icon`),D=l(`el-button`);return h(),s(`div`,xt,[e(`div`,St,[t.config?.video_id||t.config?.video_url?(h(),f(g,{key:0,class:`mb-4`})):o(``,!0),a(_,{class:`mb-4`}),t.config?.video_id?o(``,!0):(h(),f(v,{key:1,class:`mb-4`})),t.config?.custom?(h(),f(y,{key:2,class:`mb-4`})):o(``,!0),!(t.config?.video_id||t.config?.video_url)&&!t.config?.custom?(h(),f(b,{key:3,class:`mb-4`})):o(``,!0),a(x,{class:`mb-4`}),a(S,{class:`mb-4`}),a(C,{class:`mb-4`})]),e(`div`,Ct,[a(w,{scenario:`luma`}),t.walletMode?o(``,!0):(h(),f(T,{key:0,value:t.consumption,service:t.service},null,8,[`value`,`service`])),t.config?.video_url!==void 0||t.config?.custom?(h(),f(D,{key:1,type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(E,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`luma.button.extend`)),1)]),_:1},8,[`onClick`])):(h(),f(D,{key:2,type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(E,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`luma.button.generate`)),1)]),_:1},8,[`onClick`]))])])}var Tt=F(bt,[[`render`,wt]]),Et=_({name:`TaskPreview`,components:{DeleteIcon:j,ChannelIcon:A,InfoIcon:te,MagicIcon:P,TimeIcon:T,WarningIcon:M,CopyToClipboard:oe,ElAlert:b,VideoPlayer:Q,ElTooltip:y,ElButton:Y,ApiCodeButton:fe,ReportButton:se},props:{modelValue:{type:Object,required:!0}},emits:[`extend`],data(){return{}},computed:{application(){return this.$store.state.luma?.application},config(){return this.$store.state.luma?.config}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await z.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`luma/deleteTask`,{id:e}),S.success(this.$t(`common.message.deleteTaskSuccess`))}catch{S.error(this.$t(`common.message.deleteTaskFailed`))}}},onExtend(e,t){console.debug(`set config`,t),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,video_id:t.video_id,prompt:t.prompt,action:`extend`,thumbnail_url:t.thumbnail_url,video_url:t.video_url}),this.$emit(`extend`)},onDownload(e){window.open(e,`_blank`)}}}),Dt={class:`preview`},Ot={class:`left`},kt={class:`main`},At={class:`bot`},jt={class:`datetime`},Mt=[`aria-label`],Nt={class:`info`},Pt={key:0,class:`prompt mt-2`},Ft={key:0},It={key:1},Lt={key:0,class:n({content:!0,failed:!0})},Rt={key:0,class:`mb-4`},zt={key:1,class:n({operations:!0,"mt-2":!0,"mb-4":!0})},Bt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Vt={key:1,class:n({content:!0})},Ht={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ut={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Wt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Gt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Kt={key:2,class:n({content:!0})},qt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function Jt(n,c,u,d,f,m){let g=l(`capability-presentation`),_=l(`delete-icon`),v=l(`el-tooltip`),y=l(`video-player`),b=l(`el-button`),x=l(`api-code-button`),S=l(`report-button`),C=l(`magic-icon`),w=l(`copy-to-clipboard`),T=l(`time-icon`),E=l(`el-alert`),D=l(`warning-icon`),O=l(`info-icon`),k=l(`channel-icon`);return h(),s(`div`,Dt,[e(`div`,Ot,[a(g,{capability:`luma`,part:`avatar`,class:`avatar`})]),e(`div`,kt,[e(`div`,At,[a(g,{capability:`luma`,part:`name`}),e(`span`,jt,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(v,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:p(()=>[n.modelValue?.id?(h(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:c[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(_,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Mt)):o(``,!0)]),_:1},8,[`content`])]),e(`div`,Nt,[n.modelValue?.request?.prompt?(h(),s(`p`,Pt,[r(i(n.modelValue?.request?.prompt)+` `,1),n.modelValue?.response?o(``,!0):(h(),s(`span`,Ft,` - (`+i(n.$t(`luma.status.pending`))+`) `,1)),n.modelValue?.response?.state===`processing`||n.modelValue?.response?.state===`pending`?(h(),s(`span`,It,` - (`+i(n.$t(`luma.status.processing`))+`) `,1)):o(``,!0)])):o(``,!0)]),n.modelValue?.response?.success===!0?(h(),s(`div`,Lt,[n.modelValue.response.video_url?(h(),s(`div`,Rt,[a(y,{src:n.modelValue.response.video_url},null,8,[`src`])])):o(``,!0),n.modelValue?.response&&!n.config?.custom?(h(),s(`div`,zt,[a(v,{class:`box-item`,effect:`dark`,content:n.$t(`luma.message.extendVideo`),placement:`top-start`},{default:p(()=>[a(b,{type:`info`,size:`small`,class:`btn-action`,onClick:c[1]||=t(e=>n.onExtend(e,n.modelValue?.response),[`stop`])},{default:p(()=>[r(i(n.$t(`luma.button.extend`)),1)]),_:1})]),_:1},8,[`content`]),a(v,{class:`box-item`,effect:`dark`,content:n.$t(`luma.message.downloadVideo`),placement:`top-start`},{default:p(()=>[a(b,{type:`info`,size:`small`,class:`btn-action`,onClick:c[2]||=t(e=>n.onDownload(n.modelValue?.response?.video_url),[`stop`])},{default:p(()=>[r(i(n.$t(`luma.button.download`)),1)]),_:1})]),_:1},8,[`content`]),a(x,{path:`/luma/videos`,body:n.modelValue?.request},null,8,[`body`]),a(S,{service:`luma`,"target-id":n.modelValue?.id,snapshot:{prompt:n.modelValue?.request?.prompt}},null,8,[`target-id`,`snapshot`])])):o(``,!0),a(E,{closable:!1,class:`mt-2 success`},{default:p(()=>[e(`p`,Bt,[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])]),n.modelValue?.elapsed?(h(),s(`p`,$,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0)]),_:1})])):o(``,!0),n.modelValue?.response?.state===`failed`||n.modelValue?.response?.success===!1?(h(),s(`div`,Vt,[a(E,{closable:!1,class:`failure`},{template:p(()=>[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.failure`)),1)]),default:p(()=>[e(`p`,Ht,[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])]),e(`p`,Ut,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(w,{content:n.modelValue?.response?.error?.message},null,8,[`content`])]),n.modelValue?.elapsed?(h(),s(`p`,Wt,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e(`p`,Gt,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.traceId`))+`: `+i(n.modelValue?.trace_id)+` `,1),a(w,{content:n.modelValue?.response?.trace_id},null,8,[`content`])])]),_:1})])):o(``,!0),!n.modelValue?.response||n.modelValue?.response?.state===`processing`||n.modelValue?.response?.state===`pending`?(h(),s(`div`,Kt,[a(E,{closable:!1,class:`info`},{template:p(()=>[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(n.modelValue?.response?`luma.status.processing`:`luma.status.pending`)),1)]),default:p(()=>[e(`p`,qt,[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`luma.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])])]),_:1})])):o(``,!0)])])}var Yt=_({name:`RecentPanel`,components:{BotPlaceholder:pe,TaskPreview:F(Et,[[`render`,Jt],[`__scopeId`,`data-v-46a32bda`]]),NoTasks:k,ScrollList:O},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`,`extend`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.luma?.tasks,items:this.$store.state.luma?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Xt={key:0},Zt={key:2,class:`w-full h-full flex items-center justify-center`};function Qt(e,t,n,r,i,u){let d=l(`bot-placeholder`),g=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return h(),s(c,null,[e.tasks?.items===void 0?(h(),s(`div`,Xt,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(h(),f(_,{key:1,ref:`scrollList`,class:`tasks w-full h-full overflow-y-auto`,loading:e.loading,onReachTop:t[1]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(h(!0),s(c,null,m(e.tasks?.items,n=>(h(),f(g,{key:n.id,"model-value":n,onExtend:t[0]||=t=>e.$emit(`extend`)},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(h(),s(`div`,Zt,[a(v)])):o(``,!0)],64)}var $t=_({name:`LumaIndex`,components:{ConfigPanel:Tt,Layout:be,RecentPanel:F(Yt,[[`render`,Qt]])},mixins:[q,me(`luma`)],inject:[`initialized`],emits:[`extend`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1,walletTaskIds:[]}},computed:{applicationsLoading(){return this.$store.state.luma?.status?.getApplications===x.Request},tasksLoading(){return this.$store.state.luma?.status?.getTasks===x.Request||this.fetchingTasks},credential(){return this.$store.state.luma.credential},config(){return this.$store.state.luma.config},application(){return this.$store.state.luma.application},tasks(){return this.$store.state.luma.tasks},walletMode(){return R()&&X(`luma`).mode===`wallet`}},watch:{walletMode:{async handler(e,t){if(!(t===void 0||e===t)){if(this.$store.commit(`luma/setTasks`,void 0),e&&!this.job&&(this.job=window.setInterval(this.onPollTasks,5e3)),!e&&!this.credential?.token){window.clearInterval(this.job),this.job=0,await this.onScrollDown();return}await this.onGetTasks(),await this.onScrollDown()}}},tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job||=window.setInterval(this.onPollTasks,5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await ee({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`luma/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`luma/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){console.debug(`scrolling down`),await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`luma/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r,...this.walletMode&&!this.credential?.token?{mode:`x402`,ids:this.walletTaskIds}:{}})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!G(this.uploadTracker,e=>this.$t(e),e=>S.warning(e)))return;let e=B(this.config);if(!this.hasText(e.prompt)){S.error(this.$t(`luma.message.promptRequired`));return}e.prompt=e.prompt?.trim();let t;if(this.walletMode){let n=this.getWalletContext();if(!n){S.warning(this.$t(`common.x402Scenario.connectWalletFirst`));return}t=I.generate(e,{mode:`x402`,x402:{wallet:n,confirm:e=>this.confirmWalletPayment(e),identityToken:this.credential?.token}})}else{if(!ae())return;let n=this.credential?.token;if(!n)return;t=I.generate(e,{token:n})}S.info(this.$t(`luma.message.startingTask`)),ie(`luma`,t).then(e=>{let t=e?.data?.task_id;this.walletMode&&!this.credential?.token&&t&&!this.walletTaskIds.includes(t)&&this.walletTaskIds.unshift(t),S.success(this.$t(`luma.message.startTaskSuccess`))}).catch(e=>{e instanceof K||re(e,`luma`)||(this.walletMode?S.error(this.$t(`common.x402Scenario.paymentFailed`)):S.error(this.$t(`luma.message.startTaskFailed`)))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getWalletContext(){return U(this.$wallet)},async confirmWalletPayment(e){return z.confirm(this.$t(`common.x402Scenario.confirmPayment`,{amount:e.amountUsdc}),this.$t(`order.message.x402ConfirmTitle`),{confirmButtonText:this.$t(`order.message.x402WalletPayCta`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`}).then(()=>!0).catch(()=>!1)},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()},hasText(e){return typeof e==`string`&&e.trim().length>0}}});function en(e,t,n,r,i,o){let s=l(`config-panel`),c=l(`recent-panel`),u=l(`layout`);return h(),f(u,null,{config:p(()=>[a(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:p(()=>[a(c,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop,onExtend:t[0]||=t=>e.$emit(`extend`)},null,8,[`loading`,`onReachTop`])]),_:1})}var tn=F($t,[[`render`,en]]);export{tn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,it as d,j as f,mt as p,rt as m,tt as h,x as g,z as _}from"./vendor-chart-Dw-P17PN.js";import{r as v,t as y}from"./select-C_X0J3Ch.js";import{t as b}from"./upload-XPx0yx5g.js";import{t as x}from"./tooltip-OUJEXz3N.js";import{t as S}from"./alert-BprQRUmf.js";import{h as C,v as w}from"./models-Cru5uJc2.js";import{t as T}from"./drawer-DttMD3IQ.js";import{t as E}from"./input-number-CMFoxP_g.js";import{t as D}from"./slider-CdeLiUQL.js";import{t as O}from"./clock-CxvQJYC5.js";import{a as k,i as A,n as j,r as ee,s as M,t as N}from"./pagination-B62agDTK.js";import{t as P}from"./info-DbD2xHpS.js";import{t as F}from"./trash-2-Cy68rO6n.js";import{t as te}from"./triangle-alert-CjbgCRoN.js";import{t as ne}from"./upload-vSq7Ihy4.js";import{t as I}from"./wand-sparkles-BLj6TbQF.js";import{Ar as re,Or as ie,kr as L}from"./constants-CuuFtMEu.js";import{A as R,Cn as z,La as B,Li as V,O as H,Qi as U,Va as W,aa as G,at as K,br as q,ct as J,di as Y,et as ae,it as oe,li as se,ot as ce,st as le,to as X,xr as Z,zi as Q}from"./index-DVmeVwK7.js";import{t as ue}from"./CopyToClipboard-CnfP3j6K.js";import{t as de}from"./ReportButton-B0ZDQxLy.js";import{t as fe}from"./ImagePreview-CZs9JDgj.js";import{n as pe}from"./taskDrawerMixin-DyAUhFEq.js";import{t as me}from"./ServicePricingSummary-CMOjp4_z.js";import{t as he}from"./ScenarioPaymentMode-BMC9eBkY.js";import{t as ge}from"./ApiCodeButton-C6FWrCva.js";import{t as _e}from"./BotPlaceholder-CG-3N26i.js";import{t as ve}from"./taskPollingMixin-CcLxtz8z.js";import{n as ye,t as be}from"./generationInput-Tp6tVYL4.js";import{t as xe}from"./ImageWrapper-BUBjCc4Y.js";var Se=_({name:`LayoutFlux`,components:{MagicIcon:I,ElDrawer:T,ElButton:X},mixins:[pe]}),Ce={class:`main flex flex-row flex-1`},we={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)]`},Te={class:`result h-full p-4 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Ee(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),_=l(`el-drawer`);return h(),s(`div`,Ce,[e(`div`,we,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,Te,[d(t.$slots,`result`,{},void 0,!0)]),u(a(m,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[g,!t.tasksEmpty]]),a(_,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`drawer generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var De=R(Se,[[`render`,Ee],[`__scopeId`,`data-v-4cd4d561`]]),Oe=_({name:`ModelSelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`flux-dev`,label:`flux-dev`},{value:`flux-pro`,label:`flux-pro`},{value:`flux-kontext-pro`,label:`flux-kontext-pro`},{value:`flux-kontext-max`,label:`flux-kontext-max`},{value:`flux-2-flex`,label:`flux-2-flex`},{value:`flux-2-pro`,label:`flux-2-pro`},{value:`flux-2-max`,label:`flux-2-max`}]}},computed:{value:{get(){return this.$store.state.flux?.config?.model},set(e){this.$store.commit(`flux/setConfig`,{...this.$store.state.flux.config,model:e})}}},mounted(){this.value||=re}}),ke={class:`field`},Ae={class:`title font-bold`};function je(t,n,r,o,u,d){let g=l(`el-option`),_=l(`el-select`);return h(),s(`div`,ke,[e(`h2`,Ae,i(t.$t(`flux.name.model`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`flux.placeholder.select`)},{default:p(()=>[(h(!0),s(c,null,m(t.options,e=>(h(),f(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Me=R(Oe,[[`render`,je],[`__scopeId`,`data-v-e9b17945`]]),Ne=_({name:`CountSelector`,components:{ElSlider:D,InfoIcon:k,ElInputNumber:E},computed:{value:{get(){return this.$store.state.flux?.config?.count},set(e){console.debug(`set count`,e),this.$store.commit(`flux/setConfig`,{...this.$store.state.flux?.config,count:e})}}},mounted(){this.value||=1}}),Pe={class:`flex justify-between`},Fe={class:`flex justify-start items-center`},Ie={class:`text-sm font-bold`},Le={class:`flex justify-end items-center`},Re={class:`w-full`};function ze(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input-number`),p=l(`el-slider`);return h(),s(`div`,null,[e(`div`,Pe,[e(`div`,Fe,[e(`span`,Ie,i(t.$t(`flux.name.numbers`)),1),a(d,{content:t.$t(`flux.description.numbers`)},null,8,[`content`])]),e(`div`,Le,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),e(`div`,Re,[a(p,{modelValue:t.value,"onUpdate:modelValue":n[1]||=e=>t.value=e,min:1,max:4,step:1},null,8,[`modelValue`])])])}var Be=R(Ne,[[`render`,ze]]),Ve=_({name:`ActionSelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`generate`,label:this.$t(`flux.name.generate`)},{value:`edits`,label:this.$t(`flux.name.edits`)}]}},computed:{value:{get(){return this.$store.state.flux?.config?.action},set(e){this.$store.commit(`flux/setConfig`,{...this.$store.state.flux.config,action:e})}}},mounted(){this.value||=L}}),He={class:`field`},Ue={class:`title font-bold`};function We(t,n,r,o,u,d){let g=l(`el-option`),_=l(`el-select`);return h(),s(`div`,He,[e(`h2`,Ue,i(t.$t(`flux.name.task`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`flux.placeholder.select`)},{default:p(()=>[(h(!0),s(c,null,m(t.options,e=>(h(),f(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Ge=R(Ve,[[`render`,We],[`__scopeId`,`data-v-81fd05e5`]]),Ke=_({name:`ImageUrlInput`,components:{UploadIcon:ne,ElUpload:b,ElButton:X,InfoIcon:k,ImagePreview:fe},mixins:[J,le,K,ae],emits:[`change`],data(){return{fileList:[],uploadUrl:B()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},watch:{urls:{handler(e){console.debug(`URLs changed:`,e),this.$store.commit(`flux/setConfig`,{...this.$store.state.flux.config,image_url:e[0]})}}},methods:{onExceed(){w.warning(this.$t(`flux.message.uploadStartImageExceed`))},onError(){w.error(this.$t(`flux.message.uploadStartImageError`))}}}),qe={class:`relative`},Je={class:`flex justify-between`},Ye={class:`flex justify-start items-center`},Xe={class:`text-sm font-bold`};function Ze(t,n,o,c,u,d){let f=l(`info-icon`),m=l(`image-preview`),g=l(`upload-icon`),_=l(`el-button`),v=l(`el-upload`);return h(),s(`div`,qe,[e(`div`,Je,[e(`div`,Ye,[e(`span`,Xe,i(t.$t(`flux.name.imageUrl`)),1),a(f,{content:t.$t(`flux.description.imageUrl`)},null,8,[`content`])])]),a(v,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,limit:5,class:`upload-wrapper`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,multiple:!0,"list-type":`picture`,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"on-exceed":t.onExceed,"on-error":t.onError,headers:t.headers},{file:p(({file:e})=>[a(m,{url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])]),default:p(()=>[a(_,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(g,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`flux.button.uploadImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`headers`])])}var Qe=R(Ke,[[`render`,Ze],[`__scopeId`,`data-v-9830e0c3`]]),$e=_({name:`PromptInput`,components:{PromptTextarea:A},computed:{prompt:{get(){return this.$store.state.flux?.config?.prompt},set(e){this.$store.commit(`flux/setConfig`,{...this.$store.state.flux?.config,prompt:e})}}},mounted(){this.prompt||=``}});function et(e,t,n,r,i,a){let o=l(`prompt-textarea`);return h(),f(o,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`flux.name.prompt`),info:e.$t(`flux.description.prompt`),placeholder:e.$t(`flux.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var tt=R($e,[[`render`,et]]),nt=_({name:`SizeSelector`,components:{ElSelect:v,ElOption:y},data(){return{options:ie}},computed:{value:{get(){return this.$store.state.flux?.config?.size},set(e){this.$store.commit(`flux/setConfig`,{...this.$store.state.flux?.config,size:e})}}},mounted(){this.value||=`1:1`}}),rt={class:`field`},it={class:`title font-bold`};function at(t,n,r,o,u,d){let g=l(`el-option`),_=l(`el-select`);return h(),s(`div`,rt,[e(`h2`,it,i(t.$t(`flux.name.ratio`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`flux.placeholder.select`)},{default:p(()=>[(h(!0),s(c,null,m(t.options,e=>(h(),f(g,{key:e,label:e,value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var ot=R(nt,[[`render`,at],[`__scopeId`,`data-v-8c58dc91`]]),st=350,ct=_({name:`PresetPanel`,components:{MagicIcon:I,ElButton:X,PromptInput:tt,ModelSelector:Me,CountSelector:Be,ServicePricingSummary:me,ActionSelector:Ge,ImageUrlInput:Qe,SizeSelector:ot,ScenarioPaymentMode:he},emits:[`generate`],data(){return{quoteTimer:0,quoteRunId:0}},computed:{canGenerate(){return be(`flux`,q(this.config))},config(){return this.$store.state.flux?.config},consumption(){return z(this.config,this.service?.cost)},service(){return this.$store.state.flux?.service},walletMode(){return V()&&Q(`flux`).mode===`wallet`}},watch:{walletMode:{handler(e){e&&this.scheduleQuote()},immediate:!0},config:{handler(){this.walletMode&&this.scheduleQuote()},deep:!0}},beforeUnmount(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1},methods:{scheduleQuote(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1;let e=Q(`flux`);e.quoteUsdc=void 0,e.quoteLoading=!1,this.canGenerate&&(this.quoteTimer=window.setTimeout(this.refreshQuote,st))},async refreshQuote(){if(!this.canGenerate)return;let e=Q(`flux`),t=++this.quoteRunId;e.quoteLoading=!0,e.quoteUsdc=void 0;try{let n=await Z.quote(q(this.config));t===this.quoteRunId&&e.mode===`wallet`&&this.canGenerate&&(e.quoteUsdc=n.amountUsdc)}catch(e){console.warn(`x402 quote failed`,e)}finally{t===this.quoteRunId&&(e.quoteLoading=!1)}},onGenerate(){this.$emit(`generate`)}}}),lt={class:`flex flex-col h-full`},ut={class:`flex-1 overflow-y-auto p-5`},dt={class:`flex flex-col items-center justify-center px-5 pb-5`};function ft(t,n,c,u,d,m){let g=l(`action-selector`),_=l(`prompt-input`),v=l(`image-url-input`),y=l(`model-selector`),b=l(`size-selector`),x=l(`count-selector`),S=l(`scenario-payment-mode`),C=l(`service-pricing-summary`),w=l(`magic-icon`),T=l(`el-button`);return h(),s(`div`,lt,[e(`div`,ut,[a(g,{class:`mb-4`}),a(_,{class:`mb-4`}),t.config?.action===`edits`?(h(),f(v,{key:0,class:`mb-4`})):o(``,!0),a(y,{class:`mb-4`}),a(b,{class:`mb-4`}),a(x,{class:`mb-4`})]),e(`div`,dt,[a(S,{scenario:`flux`}),t.walletMode?o(``,!0):(h(),f(C,{key:0,value:t.consumption,service:t.service},null,8,[`value`,`service`])),a(T,{type:`primary`,class:`btn w-full`,round:``,disabled:!t.canGenerate,onClick:t.onGenerate},{default:p(()=>[a(w,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`flux.button.generate`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var pt=R(ct,[[`render`,ft]]),mt=_({name:`TaskPreview`,components:{DeleteIcon:F,ElTooltip:x,ChannelIcon:M,InfoIcon:P,MagicIcon:I,TimeIcon:O,WarningIcon:te,CopyToClipboard:ue,ElAlert:S,ImageWrapper:xe,ApiCodeButton:ge,ReportButton:de},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.flux?.application},config(){return this.$store.state.flux?.config},images(){let e=[],t=this.modelValue?.request?.action;return Array.isArray(this.modelValue?.response?.data)&&this.modelValue?.response?.data?.forEach(n=>{let r=n;t&&(r.action=t),e.push(r)}),e}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await W.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`flux/deleteTask`,{id:e}),w.success(this.$t(`common.message.deleteTaskSuccess`))}catch{w.error(this.$t(`common.message.deleteTaskFailed`))}}},onDownload(e,t){e?.stopPropagation(),console.log(`on download`),window.open(t,`_blank`)},onOpenImage(e){window.open(e,`_blank`)}}}),ht={class:`preview`},gt={class:`left`},_t={class:`main`},vt={class:`bot`},yt={class:`datetime`},bt=[`aria-label`],xt={class:`info`},St={key:0,class:`prompt mt-2`},Ct={key:0},wt={key:0,class:n({content:!0,failed:!0})},Tt={class:`flex justify-start items-center gap-4 w-full overflow-x-auto`},Et={class:n({operations:!0,"mt-2":!0,"mb-2":!0})},Dt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ot={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},kt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},At={key:1,class:n({content:!0})},jt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Mt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Nt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Pt={key:2,class:n({content:!0})},Ft={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function It(n,u,d,g,_,v){let y=l(`capability-presentation`),b=l(`delete-icon`),x=l(`el-tooltip`),S=l(`image-wrapper`),C=l(`api-code-button`),w=l(`report-button`),T=l(`channel-icon`),E=l(`magic-icon`),D=l(`copy-to-clipboard`),O=l(`time-icon`),k=l(`el-alert`),A=l(`warning-icon`),j=l(`info-icon`);return h(),s(`div`,ht,[e(`div`,gt,[a(y,{capability:`flux`,part:`avatar`,class:`avatar`})]),e(`div`,_t,[e(`div`,vt,[a(y,{capability:`flux`,part:`name`}),e(`span`,yt,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(x,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:p(()=>[n.modelValue?.id?(h(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:u[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,bt)):o(``,!0)]),_:1},8,[`content`])]),e(`div`,xt,[n.modelValue?.request?.prompt?(h(),s(`p`,St,[r(i(n.modelValue?.request?.prompt)+` `,1),n.modelValue?.response?o(``,!0):(h(),s(`span`,Ct,` - (`+i(n.$t(`flux.status.pending`))+`) `,1))])):o(``,!0)]),n.modelValue?.response?.success===!0?(h(),s(`div`,wt,[e(`div`,Tt,[(h(!0),s(c,null,m(n.images,(e,t)=>(h(),f(S,{key:t,src:e?.image_url,"raw-src":e?.image_url,"model-value":e},null,8,[`src`,`raw-src`,`model-value`]))),128))]),e(`div`,Et,[a(C,{path:`/flux/images`,body:n.modelValue?.request},null,8,[`body`]),a(w,{service:`flux`,"target-id":n.modelValue?.id,snapshot:{prompt:n.modelValue?.request?.prompt}},null,8,[`target-id`,`snapshot`])]),a(k,{closable:!1,class:`mt-2 success`},{default:p(()=>[e(`p`,Dt,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.model`))+`: `+i(n.modelValue?.request?.model),1)]),e(`p`,Ot,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(D,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),n.modelValue?.elapsed?(h(),s(`p`,kt,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0)]),_:1})])):o(``,!0),n.modelValue?.response?.success===!1?(h(),s(`div`,At,[a(k,{closable:!1,class:`failure`},{template:p(()=>[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.failure`)),1)]),default:p(()=>[e(`p`,jt,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(D,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),e(`p`,Mt,[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(D,{content:n.modelValue?.response?.error?.message,class:`btn-copy`},null,8,[`content`])]),n.modelValue?.elapsed?(h(),s(`p`,Nt,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e(`p`,$,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(D,{content:n.modelValue?.response?.trace_id,class:`btn-copy`},null,8,[`content`])])]),_:1})])):o(``,!0),n.modelValue?.response?o(``,!0):(h(),s(`div`,Pt,[a(k,{closable:!1,class:`info`},{template:p(()=>[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.status.pending`)),1)]),default:p(()=>[e(`p`,Ft,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`flux.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(D,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])])]),_:1})]))])])}var Lt=_({name:`RecentPanel`,components:{TaskPreview:R(mt,[[`render`,It],[`__scopeId`,`data-v-7bae4285`]]),BotPlaceholder:_e,NoTasks:ee,ScrollList:j},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.flux?.tasks,items:this.$store.state.flux?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Rt={key:0},zt={key:2,class:`w-full h-full flex items-center justify-center`};function Bt(e,t,n,r,i,u){let d=l(`bot-placeholder`),g=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return h(),s(c,null,[e.tasks?.items===void 0?(h(),s(`div`,Rt,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(h(),f(_,{key:1,ref:`scrollList`,class:`tasks h-full w-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(h(!0),s(c,null,m(e.tasks?.items,e=>(h(),f(g,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(h(),s(`div`,zt,[a(v)])):o(``,!0)],64)}var Vt=_({name:`FluxIndex`,components:{ConfigPanel:pt,Layout:De,RecentPanel:R(Lt,[[`render`,Bt]])},mixins:[ce,ve(`flux`)],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1,walletTaskIds:[]}},computed:{applicationsLoading(){return this.$store.state.flux?.status?.getApplications===C.Request},tasksLoading(){return this.$store.state.flux?.status?.getTasks===C.Request||this.fetchingTasks},credential(){return this.$store.state.flux?.credential},config(){return this.$store.state.flux?.config},application(){return this.$store.state.flux?.application},tasks(){return this.$store.state.flux?.tasks},walletMode(){return V()&&Q(`flux`).mode===`wallet`}},watch:{walletMode:{async handler(e,t){t===void 0||e===t||(this.$store.commit(`flux/setTasks`,void 0),await this.onGetTasks(),await this.onScrollDown())}},tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onPollTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await N({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`flux/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`flux/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`flux/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r,...this.walletMode&&!this.credential?.token?{mode:`x402`,ids:this.walletTaskIds}:{}})}finally{this.fetchingTasks=!1}},async onGenerate(){let e=q(this.config),t=ye(`flux`,e);if(t){w.error(this.$t(`common.message.${t}`));return}if(!oe(this.uploadTracker,e=>this.$t(e),e=>w.warning(e)))return;let n;if(this.walletMode){let t=this.getWalletContext();if(!t){w.warning(this.$t(`common.x402Scenario.connectWalletFirst`));return}n=Z.generate(e,{mode:`x402`,x402:{wallet:t,confirm:e=>this.confirmWalletPayment(e),identityToken:this.credential?.token}})}else{if(!G())return;let t=this.credential?.token;if(!t)return;n=Z.generate(e,{token:t})}w.info(this.$t(`flux.message.startingTask`)),U(`flux`,n).then(e=>{let t=e?.data?.task_id;this.walletMode&&!this.credential?.token&&t&&!this.walletTaskIds.includes(t)&&this.walletTaskIds.unshift(t),w.success(this.$t(`flux.message.startTaskSuccess`))}).catch(e=>{if(e instanceof se)return;let t=e?.response?.data;H(e,`flux`)||(this.walletMode?w.error(this.$t(`common.x402Scenario.paymentFailed`)):w.error(this.$t(`flux.message.startTaskFailed`)+(t?.error?.message||``)))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getWalletContext(){return Y(this.$wallet)},async confirmWalletPayment(e){return W.confirm(this.$t(`common.x402Scenario.confirmPayment`,{amount:e.amountUsdc}),this.$t(`order.message.x402ConfirmTitle`),{confirmButtonText:this.$t(`order.message.x402WalletPayCta`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`}).then(()=>!0).catch(()=>!1)},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function Ht(e,t,n,r,i,o){let s=l(`config-panel`),c=l(`recent-panel`),u=l(`layout`);return h(),f(u,null,{config:p(()=>[a(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:p(()=>[a(c,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var Ut=R(Vt,[[`render`,Ht]]);export{Ut as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,I as t,Jt as n,L as r,N as i,T as a,at as o,ht as s,j as c,mt as l,ot as u,rt as d,tt as f,z as p}from"./vendor-chart-Dw-P17PN.js";import{r as m,t as h}from"./select-C_X0J3Ch.js";import{n as ee,t as g}from"./table-BEiwdkro.js";import{o as _}from"./models-Cru5uJc2.js";import{t as v}from"./card-IQwqnRJR.js";import{t as y}from"./date-picker-CIVhQSq0.js";import{n as b,t as x}from"./row-DP0oDZAs.js";import{t as S}from"./skeleton-Dj_a_iIP.js";import{t as C}from"./circle-check-C7raGFyE.js";import{t as w}from"./clock-CxvQJYC5.js";import{t as T}from"./dollar-sign--zIyRxW2.js";import{t as E}from"./file-output-CSH2H9Po.js";import{$a as D,A as O,Ba as k,ei as A,to as j,wn as M}from"./index-DVmeVwK7.js";import{t as N}from"./CopyToClipboard-CnfP3j6K.js";import{t as P}from"./pagination-DEYlwTlL.js";var F=k(`receipt`,[[`path`,{d:`M12 17V7`,key:`pyj7ub`}],[`path`,{d:`M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8`,key:`1elt7d`}],[`path`,{d:`M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z`,key:`ycz6yz`}]]),I={total_count:0,total_spent:0,state_counts:{}},L=p({name:`ConsoleOrderList`,components:{ExportIcon:E,MoneyIcon:T,ReceiptIcon:F,SuccessIcon:C,TimeIcon:w,Pagination:P,CopyToClipboard:N,ElRow:x,ElCol:b,ElTable:g,ElTableColumn:ee,ElButton:j,ElTag:D,ElCard:v,ElSelect:m,ElOption:h,ElDatePicker:y,ElSkeleton:S},data(){return{OrderState:_,orders:[],loading:!1,total:void 0,limit:10,filterState:this.$route.query.state?.toString()||``,filterPayWay:this.$route.query.pay_way?.toString()||``,createdAtRange:(()=>{let e=this.$route.query.created_at_from?.toString(),t=this.$route.query.created_at_to?.toString();if(e&&t)return[new Date(e),new Date(t)]})(),summary:{...I},summaryLoading:!1,exporting:!1,shortcuts:[{text:this.$t(`usage.shortcuts.today`),value:()=>{let e=new Date,t=new Date;return t.setHours(0,0,0,0),[t,e]}},{text:this.$t(`usage.shortcuts.last7Days`),value:()=>{let e=new Date,t=new Date;return t.setDate(t.getDate()-7),[t,e]}},{text:this.$t(`usage.shortcuts.last1Month`),value:()=>{let e=new Date,t=new Date;return t.setMonth(t.getMonth()-1),[t,e]}}]}},computed:{page(){return parseInt(this.$route.query.page?.toString()||`1`)},stateOptions(){return[{value:_.PENDING,label:this.$t(`order.state.pending`)},{value:_.FINISHED,label:this.$t(`order.state.finished`)},{value:_.PAID,label:this.$t(`order.state.paid`)},{value:_.EXPIRED,label:this.$t(`order.state.expired`)},{value:_.FAILED,label:this.$t(`order.state.failed`)},{value:_.REFUNDED,label:this.$t(`order.state.refunded`)}]},payWayOptions(){return[{value:`WechatPay`,label:this.$t(`order.title.wechatPay`)},{value:`Stripe`,label:this.$t(`order.title.stripe`)},{value:`Card`,label:this.$t(`order.title.card`)},{value:`Airwallex`,label:this.$t(`order.title.card`)},{value:`AliPay`,label:this.$t(`order.title.aliPay`)},{value:`X402`,label:this.$t(`order.title.x402`)},{value:`PayPal`,label:this.$t(`order.title.paypal`)}]},filterQuery(){let e={user_id:this.$store.getters.user?.id};return this.filterState&&(e.state=this.filterState),this.filterPayWay&&(e.pay_way=this.filterPayWay),this.createdAtRange?.[0]&&(e.created_at_from=this.createdAtRange[0]),this.createdAtRange?.[1]&&(e.created_at_to=this.createdAtRange[1]),e}},watch:{page:{handler(){this.onFetchData()}}},mounted(){this.onFetchData(),this.onFetchSummary()},methods:{payWayLabel(e){return e?e===`Airwallex`?this.$t(`order.title.card`):e:`-`},getPriceString:M,stateTagType(e){return e===_.FINISHED||e===_.PAID?`success`:e===_.EXPIRED||e===_.FAILED?`danger`:e===_.REFUNDED?`warning`:`info`},stateLabel(e){return{[_.PENDING]:this.$t(`order.state.pending`),[_.PAID]:this.$t(`order.state.paid`),[_.FINISHED]:this.$t(`order.state.finished`),[_.EXPIRED]:this.$t(`order.state.expired`),[_.FAILED]:this.$t(`order.state.failed`),[_.REFUNDED]:this.$t(`order.state.refunded`)}[e]||e},isPendingAction(e){return e!==_.PAID&&e!==_.FINISHED&&e!==_.EXPIRED&&e!==_.FAILED&&e!==_.REFUNDED},goToDetail(e){this.$router.push({name:`console-order-detail`,params:{id:e}})},async onFilterChange(){await this.$router.push({name:this.$route.name?.toString(),query:{page:1,...this.filterState?{state:this.filterState}:{},...this.filterPayWay?{pay_way:this.filterPayWay}:{},...this.createdAtRange?.[0]?{created_at_from:this.createdAtRange[0].toISOString()}:{},...this.createdAtRange?.[1]?{created_at_to:this.createdAtRange[1].toISOString()}:{}}}),this.onFetchData(),this.onFetchSummary()},onPageChange(e){this.$router.push({name:this.$route.name?.toString(),query:{...this.$route.query,page:e}})},onFetchData(){this.loading=!0,A.getAll({ordering:`-created_at`,limit:this.limit,offset:(this.page-1)*this.limit,...this.filterQuery}).then(({data:e})=>{this.orders=e.items,this.total=e.count}).catch(()=>{}).finally(()=>{this.loading=!1})},onFetchSummary(){this.summaryLoading=!0,A.getSummary(this.filterQuery).then(({data:e})=>{this.summary=e}).catch(()=>{this.summary={...I}}).finally(()=>{this.summaryLoading=!1})},onExport(){this.exporting=!0,A.exportCsv(this.filterQuery).then(({data:e})=>{let t=window.URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`orders.csv`,n.click(),window.URL.revokeObjectURL(t)}).catch(()=>{}).finally(()=>{this.exporting=!1})}}}),R={class:`title`},z={key:1,class:`card-content`},B={class:`icon-wrapper`},V={class:`description`},H={class:`value`},U={key:1,class:`card-content`},W={class:`icon-wrapper`},G={class:`description`},K={class:`value`},q={key:1,class:`card-content`},J={class:`icon-wrapper`},te={class:`description`},Y={class:`value`},X={key:1,class:`card-content`},Z={class:`icon-wrapper`},Q={class:`description`},ne={class:`value`},re={class:`filter-row mb-3`},$={class:`key`},ie={class:`cursor-pointer`},ae={class:`price`},oe={class:`description`},se={class:`text-gray-500`},ce={class:`created-at`},le={class:`flex items-center justify-center flex-wrap`},ue={class:`float-right`};function de(p,m,h,ee,g,_){let v=o(`el-col`),y=o(`el-row`),b=o(`el-skeleton`),x=o(`receipt-icon`),S=o(`el-card`),C=o(`money-icon`),w=o(`success-icon`),T=o(`time-icon`),E=o(`el-option`),D=o(`el-select`),O=o(`el-date-picker`),k=o(`export-icon`),A=o(`el-button`),j=o(`copy-to-clipboard`),M=o(`el-table-column`),N=o(`el-tag`),P=o(`el-table`),F=o(`pagination`),I=u(`loading`);return f(),c(y,{class:`panel`},{default:l(()=>[r(v,{span:24},{default:l(()=>[r(y,null,{default:l(()=>[r(v,{span:24},{default:l(()=>[e(`h2`,R,n(p.$t(`common.title.allOrders`)),1)]),_:1})]),_:1}),r(y,{gutter:16},{default:l(()=>[r(v,{md:6,sm:12,xs:24},{default:l(()=>[r(S,{shadow:`hover`,class:`item-mini mb-3`},{default:l(()=>[p.summaryLoading?(f(),c(b,{key:0})):(f(),i(`div`,z,[e(`div`,B,[r(x,{class:`icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})]),e(`p`,V,n(p.$t(`order.title.totalOrders`)),1),e(`p`,H,n(p.summary.total_count),1)]))]),_:1})]),_:1}),r(v,{md:6,sm:12,xs:24},{default:l(()=>[r(S,{shadow:`hover`,class:`item-mini mb-3`},{default:l(()=>[p.summaryLoading?(f(),c(b,{key:0})):(f(),i(`div`,U,[e(`div`,W,[r(C,{class:`icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})]),e(`p`,G,n(p.$t(`order.title.totalSpent`)),1),e(`p`,K,n(p.getPriceString({value:p.summary.total_spent})),1)]))]),_:1})]),_:1}),r(v,{md:6,sm:12,xs:24},{default:l(()=>[r(S,{shadow:`hover`,class:`item-mini mb-3`},{default:l(()=>[p.summaryLoading?(f(),c(b,{key:0})):(f(),i(`div`,q,[e(`div`,J,[r(w,{class:`icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})]),e(`p`,te,n(p.$t(`order.title.finishedOrders`)),1),e(`p`,Y,n(p.summary.state_counts?.Finished||0),1)]))]),_:1})]),_:1}),r(v,{md:6,sm:12,xs:24},{default:l(()=>[r(S,{shadow:`hover`,class:`item-mini mb-3`},{default:l(()=>[p.summaryLoading?(f(),c(b,{key:0})):(f(),i(`div`,X,[e(`div`,Z,[r(T,{class:`icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})]),e(`p`,Q,n(p.$t(`order.title.pendingOrders`)),1),e(`p`,ne,n(p.summary.state_counts?.Pending||0),1)]))]),_:1})]),_:1})]),_:1}),e(`div`,re,[r(D,{modelValue:p.filterState,"onUpdate:modelValue":m[0]||=e=>p.filterState=e,clearable:``,placeholder:p.$t(`order.field.allStates`),class:`filter-select`,onChange:p.onFilterChange},{default:l(()=>[(f(!0),i(a,null,d(p.stateOptions,e=>(f(),c(E,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`onChange`]),r(D,{modelValue:p.filterPayWay,"onUpdate:modelValue":m[1]||=e=>p.filterPayWay=e,clearable:``,placeholder:p.$t(`order.field.allPayWays`),class:`filter-select`,onChange:p.onFilterChange},{default:l(()=>[(f(!0),i(a,null,d(p.payWayOptions,e=>(f(),c(E,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`onChange`]),r(O,{modelValue:p.createdAtRange,"onUpdate:modelValue":m[2]||=e=>p.createdAtRange=e,type:`datetimerange`,shortcuts:p.shortcuts,"range-separator":p.$t(`usage.placeholder.to`),"start-placeholder":p.$t(`usage.placeholder.startDate`),"end-placeholder":p.$t(`usage.placeholder.endDate`),onChange:p.onFilterChange},null,8,[`modelValue`,`shortcuts`,`range-separator`,`start-placeholder`,`end-placeholder`,`onChange`]),r(A,{type:`primary`,plain:``,loading:p.exporting,onClick:p.onExport},{default:l(()=>[r(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),t(` `+n(p.$t(`order.button.export`)),1)]),_:1},8,[`loading`,`onClick`])]),r(y,null,{default:l(()=>[r(v,{span:24},{default:l(()=>[r(S,{shadow:`hover`},{default:l(()=>[s((f(),c(P,{data:p.orders,stripe:``,"empty-text":p.$t(`common.message.noData`),class:`min-h-[calc(100vh-450px)] mb-[20px]`},{default:l(()=>[r(M,{prop:`id`,label:p.$t(`order.field.id`),"class-name":`text-center`,width:`200px`},{default:l(t=>[e(`span`,$,n(t.row.id),1),e(`span`,ie,[r(j,{content:t.row.id,class:`inline-block`},null,8,[`content`])])]),_:1},8,[`label`]),r(M,{label:p.$t(`order.field.price`),width:`110px`,align:`center`},{default:l(t=>[e(`span`,ae,n(p.getPriceString({value:t.row?.price})),1)]),_:1},8,[`label`]),r(M,{label:p.$t(`order.field.description`),"min-width":`220px`,"class-name":`hidden md:table-cell`,"label-class-name":`hidden md:table-cell`},{default:l(t=>[e(`span`,oe,n(t.row.description),1)]),_:1},8,[`label`]),r(M,{prop:`state`,label:p.$t(`order.field.state`),width:`130px`,align:`center`},{default:l(e=>[r(N,{type:p.stateTagType(e.row.state),class:`mx-1`,effect:`dark`,round:``,size:`small`},{default:l(()=>[t(n(p.stateLabel(e.row.state)),1)]),_:2},1032,[`type`])]),_:1},8,[`label`]),r(M,{label:p.$t(`order.field.payWay`),width:`120px`,align:`center`,"class-name":`hidden md:table-cell`,"label-class-name":`hidden md:table-cell`},{default:l(t=>[e(`span`,se,n(p.payWayLabel(t.row.pay_way)),1)]),_:1},8,[`label`]),r(M,{label:p.$t(`order.field.createdAt`),width:`200px`,"class-name":`hidden sm:table-cell`,"label-class-name":`hidden sm:table-cell`},{default:l(t=>[e(`span`,ce,n(p.$dayjs.format(t.row.created_at)),1)]),_:1},8,[`label`]),r(M,{"min-width":`130px`,fixed:`right`},{default:l(r=>[e(`div`,le,[p.isPendingAction(r.row.state)?(f(),c(A,{key:0,type:`primary`,size:`small`,onClick:e=>p.goToDetail(r.row.id)},{default:l(()=>[t(n(p.$t(`order.button.continuePay`)),1)]),_:1},8,[`onClick`])):(f(),c(A,{key:1,size:`small`,onClick:e=>p.goToDetail(r.row.id)},{default:l(()=>[t(n(p.$t(`order.button.checkDetail`)),1)]),_:1},8,[`onClick`]))])]),_:1})]),_:1},8,[`data`,`empty-text`])),[[I,p.loading]])]),_:1})]),_:1})]),_:1}),r(y,null,{default:l(()=>[r(v,{span:10,offset:14},{default:l(()=>[e(`div`,ue,[r(F,{"current-page":p.page,"page-size":p.limit,total:p.total,onChange:p.onPageChange},null,8,[`current-page`,`page-size`,`total`,`onChange`])])]),_:1})]),_:1})]),_:1})]),_:1})}var fe=O(L,[[`render`,de],[`__scopeId`,`data-v-01c53a75`]]);export{fe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,Gt as t,I as n,Jt as r,L as i,M as a,N as o,T as s,at as c,j as l,mt as u,tt as d,z as f}from"./vendor-chart-Dw-P17PN.js";import{t as p}from"./alert-BprQRUmf.js";import{o as m,v as ee}from"./models-Cru5uJc2.js";import{t as h}from"./card-IQwqnRJR.js";import{n as g,t as _}from"./row-DP0oDZAs.js";import{a as v,i as y,n as b,r as x,t as S}from"./airwallexCheckout-CX2POYmT.js";import{t as C}from"./divider-Du_3kymg.js";import{t as w}from"./skeleton-Dj_a_iIP.js";import{t as T}from"./circle-check-C7raGFyE.js";import{t as E}from"./copy-Bgq_Lt5F.js";import{T as D,b as O,j as k}from"./i18n-lmeSFJDq.js";import{$a as A,A as j,B as te,En as ne,Ka as M,ei as N,to as P,wn as F}from"./index-DVmeVwK7.js";import{t as I}from"./CopyToClipboard-CnfP3j6K.js";var L=f({name:`PublicWechatPayDialog`,components:{ElDialog:M,ElButton:P,CopyIcon:E,QrCode:te,ElRow:_,ElCol:g,SuccessIcon:T},props:{order:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:[`hide`],data(){return{copied:!1,copiedTimer:void 0}},computed:{isMobileOutsideWechat(){return x()&&!b()},isMobileInsideWechat(){return x()&&b()},dialogWidth(){return this.isMobileOutsideWechat||this.isMobileInsideWechat?`90%`:`500px`}},unmounted(){this.copiedTimer&&clearTimeout(this.copiedTimer)},methods:{async onCopyLink(){let e=typeof window<`u`?window.location.href:``;if(!e)return;let t=!1;try{t=await ne(e,{debug:!1})}catch{t=!1}t?(this.copied=!0,this.copiedTimer&&clearTimeout(this.copiedTimer),this.copiedTimer=window.setTimeout(()=>{this.copied=!1},3e3)):ee.error(String(this.$t(`common.message.copyFailed`)||`Copy failed`))}}}),R={key:0,class:`wechat-pay-mobile text-center py-[20px] px-[10px]`},z={class:`text-[14px] mb-3 leading-relaxed`},B={class:`text-[12px] text-gray-500 mb-4 leading-relaxed`},V={key:1,class:`wechat-pay-longpress text-center py-[20px] px-[10px]`},H={class:`text-[14px] mb-4 leading-relaxed`},U={class:`paycode wechat`},W={class:`help-text block bg-[#00c800] text-white text-[14px] h-[35px] w-[240px] text-center leading-[35px] mt-[10px] mx-auto`};function G(t,s,f,p,m,ee){let h=c(`qr-code`),g=c(`success-icon`),_=c(`copy-icon`),v=c(`el-button`),y=c(`el-col`),b=c(`el-row`),x=c(`el-dialog`);return d(),l(x,{"model-value":t.visible,title:t.$t(`application.title.buyService`),width:t.dialogWidth,center:``,onClose:s[0]||=e=>t.$emit(`hide`)},{default:u(()=>[t.isMobileOutsideWechat?(d(),o(`div`,R,[e(`p`,z,r(t.$t(`order.message.wechatPayMobileScanTip`)),1),t.order?.pay_url?(d(),l(h,{key:0,value:t.order?.pay_url,size:220,class:`qrcode m-auto mb-3`,type:`image/png`,color:{dark:`#000000`,light:`#ffffff`}},null,8,[`value`])):a(``,!0),e(`p`,B,r(t.$t(`order.message.wechatPayMobileHint`)),1),i(v,{size:`default`,round:``,class:`w-[220px]`,"aria-label":t.copied?t.$t(`common.message.copied`):t.$t(`order.button.copyPayLink`),onClick:t.onCopyLink},{default:u(()=>[t.copied?(d(),l(g,{key:0,class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(d(),l(_,{key:1,class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),n(` `+r(t.copied?t.$t(`common.message.copied`):t.$t(`order.button.copyPayLink`)),1)]),_:1},8,[`aria-label`,`onClick`])])):t.isMobileInsideWechat?(d(),o(`div`,V,[e(`p`,H,r(t.$t(`order.message.wechatPayLongPressTip`)),1),t.order?.pay_url?(d(),l(h,{key:0,value:t.order?.pay_url,size:240,class:`qrcode mx-auto`,type:`image/png`,color:{dark:`#000000`,light:`#ffffff`}},null,8,[`value`])):a(``,!0)])):(d(),l(b,{key:2,class:`paycodes py-[30px] w-[500px] mx-auto`},{default:u(()=>[i(y,{span:12},{default:u(()=>[e(`div`,U,[t.order?.pay_url?(d(),l(h,{key:0,value:t.order?.pay_url,size:200,class:`qrcode m-auto w-[200px] h-[200px]`,type:`image/png`,color:{dark:`#000000`,light:`#ffffff`}},null,8,[`value`])):a(``,!0),e(`p`,W,r(t.$t(`order.message.wechatPayHelp`)),1)])]),_:1}),i(y,{span:12},{default:u(()=>[...s[1]||=[e(`div`,{class:`help-img`},[e(`img`,{src:`https://midas.gtimg.cn/enterprise/images/ep_sys_wx_tip.jpg`})],-1)]]),_:1})]),_:1}))]),_:1},8,[`model-value`,`title`,`width`])}var K=j(L,[[`render`,G]]),q=f({name:`PublicStripePayDialog`,components:{ElDialog:M},props:{order:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:[`hide`],watch:{visible:{handler(e){e&&this.order?.pay_url&&window.open(this.order.pay_url,`_blank`)}}}}),J={class:`text-center`};function Y(t,n,i,a,o,s){let f=c(`el-dialog`);return d(),l(f,{"model-value":t.visible,title:t.$t(`application.title.buyService`),width:`500px`,center:``,onClose:n[0]||=e=>t.$emit(`hide`)},{default:u(()=>[e(`p`,J,r(t.$t(`order.message.buyInExternalUrl`)),1)]),_:1},8,[`model-value`,`title`])}var X=j(q,[[`render`,Y]]),Z=f({name:`PublicAlipayPayDialog`,components:{ElDialog:M},props:{order:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:[`hide`],watch:{visible:{handler(e){e&&this.order?.pay_url&&window.open(this.order.pay_url,`_blank`)}}}}),re={class:`text-center`};function ie(t,n,i,a,o,s){let f=c(`el-dialog`);return d(),l(f,{"model-value":t.visible,title:t.$t(`application.title.buyService`),width:`500px`,center:``,onClose:n[0]||=e=>t.$emit(`hide`)},{default:u(()=>[e(`p`,re,r(t.$t(`order.message.buyInExternalUrl`)),1)]),_:1},8,[`model-value`,`title`])}var ae=j(Z,[[`render`,ie]]),oe=7e3,se=2e3,Q=function(e){return e.WechatPay=`WechatPay`,e.Stripe=`Stripe`,e.AliPay=`AliPay`,e.Card=`Card`,e.Airwallex=`Airwallex`,e}(Q||{}),ce=f({name:`OrderPublicPay`,components:{ElButton:P,ElRow:_,ElCol:g,ElCard:h,ElSkeleton:w,ElDivider:C,ElAlert:p,ElDescriptions:y,ElDescriptionsItem:v,ElTag:A,PublicWechatPay:K,PublicStripePay:X,PublicAlipayPay:ae,CopyToClipboard:I},data(){return{PayWay:Q,OrderState:m,payWay:`WechatPay`,order:void 0,loading:!1,paying:!1,prepaying:!1}},computed:{id(){return this.$route.params?.id?.toString()??``},config(){return this.$store.getters.config},airwallexEnabled(){return this.config?.features?.airwallex===!0},enableCard(){return!!this.config?.features?.ENABLE_CARD||this.airwallexEnabled},showPayment(){return!D()}},watch:{paying(e){e?this.startOrderPolling(se):this.stopOrderPolling()}},created(){this._orderRefreshTimer=void 0},mounted(){this.onFetchData()},beforeUnmount(){this.stopOrderPolling()},methods:{getPriceString:F,payWayLabel(e){return{WechatPay:this.$t(`order.title.wechatPay`),Stripe:this.$t(`order.title.stripe`),AliPay:this.$t(`order.title.aliPay`),Card:this.$t(`order.title.card`),Airwallex:this.$t(`order.title.card`)}[e]||e},onFetchData(){this.id&&(this.loading=!0,N.getPublic(this.id).then(({data:e})=>{this.order=e,e?.pay_way&&e.pay_way in Q&&(this.payWay=e.pay_way),this.loading=!1}).catch(()=>{this.order=void 0,this.loading=!1}))},startOrderPolling(e=0){this.stopOrderPolling();let t=async()=>{try{let{data:e}=await N.getPublic(this.id);if(this.order=e,e?.state===m.PAID||e?.state===m.FINISHED||e?.state===m.FAILED||e?.state===m.EXPIRED){this.paying=!1,this.stopOrderPolling();return}}catch{}this.paying&&(this._orderRefreshTimer=window.setTimeout(t,oe))};this._orderRefreshTimer=window.setTimeout(t,e)},stopOrderPolling(){let e=this._orderRefreshTimer;e&&(clearTimeout(e),this._orderRefreshTimer=void 0)},onRepay(){if(this.order?.pay_way===`Airwallex`){this.onPay();return}this.paying=!0},selectedPayWay(){return this.order?.pay_way===`Airwallex`||this.payWay===`Card`&&this.airwallexEnabled?`Airwallex`:this.payWay},onPay(){if(!this.id)return;this.prepaying=!0;let e=this.selectedPayWay(),t={pay_way:e};e===`Airwallex`&&k()&&(t.payment_contract=`airwallex_payment_intent`),e===`AliPay`&&(t.surface=O()),N.payPublic(this.id,t).then(async({data:t})=>{this.prepaying=!1;let{payment:n,...r}=t;if(r?.id&&(this.order=r,this.payWay=r.pay_way||this.payWay),e===`Airwallex`&&n){this.paying=!0,await S(n);return}this.order&&this.order.price&&this.order.price>0&&(this.paying=!0)}).catch(()=>{this.prepaying=!1,this.paying=!1})}}}),le={class:`title`},ue={key:0,class:`pt-5`},de={key:1,class:`pt-10 text-center`},fe={key:2,class:`order`},pe={key:0,class:`price current unfree`},$={key:1,class:`price free`},me={key:0,class:`payways mb-6`},he={class:`payname`},ge={class:`payname`},_e={class:`payname`},ve={class:`payname`},ye={key:1},be={key:2};function xe(f,p,m,ee,h,g){let _=c(`el-col`),v=c(`el-row`),y=c(`el-skeleton`),b=c(`el-alert`),x=c(`copy-to-clipboard`),S=c(`el-descriptions-item`),C=c(`el-tag`),w=c(`el-descriptions`),T=c(`el-divider`),E=c(`el-button`),D=c(`el-card`),O=c(`public-wechat-pay`),k=c(`public-stripe-pay`),A=c(`public-alipay-pay`);return d(),o(s,null,[i(v,{class:`wrapper`},{default:u(()=>[i(_,{span:24},{default:u(()=>[i(v,null,{default:u(()=>[i(_,{span:24},{default:u(()=>[e(`h2`,le,r(f.$t(`order.title.info`)),1)]),_:1})]),_:1}),i(v,{class:`panel`},{default:u(()=>[i(_,{span:24},{default:u(()=>[i(D,{shadow:`hover`},{default:u(()=>[i(v,null,{default:u(()=>[i(_,{xs:{span:22,offset:1},sm:{span:16,offset:4}},{default:u(()=>[f.loading?(d(),o(`div`,ue,[i(y,{animated:``})])):f.order?(d(),o(`div`,fe,[i(w,{column:1},{default:u(()=>[i(S,{label:f.$t(`order.field.id`)},{default:u(()=>[e(`span`,null,r(f.order.id),1),f.order.id?(d(),l(x,{key:0,content:f.order.id,class:`inline-block`},null,8,[`content`])):a(``,!0)]),_:1},8,[`label`]),i(S,{label:f.$t(`order.field.description`)},{default:u(()=>[n(r(f.order.description),1)]),_:1},8,[`label`]),f.order.pay_way?(d(),l(S,{key:0,label:f.$t(`order.field.payWay`)},{default:u(()=>[i(C,{type:`info`,effect:`dark`,round:``,size:`small`},{default:u(()=>[n(r(f.payWayLabel(f.order.pay_way)),1)]),_:1})]),_:1},8,[`label`])):a(``,!0),i(S,{label:f.$t(`order.field.createdAt`)},{default:u(()=>[n(r(f.$dayjs.format(f.order.created_at||``)),1)]),_:1},8,[`label`]),i(S,{label:f.$t(`order.field.price`)},{default:u(()=>[f.order.price&&f.order.price>0?(d(),o(`span`,pe,r(f.getPriceString({value:f.order.price})),1)):(d(),o(`span`,$,r(f.$t(`order.message.free`)),1))]),_:1},8,[`label`])]),_:1})])):(d(),o(`div`,de,[i(b,{title:f.$t(`order.message.publicPayNotFound`),type:`error`,"show-icon":``,closable:!1},null,8,[`title`])]))]),_:1})]),_:1}),f.order?.state===f.OrderState.PAID||f.order?.state===f.OrderState.FINISHED?(d(),l(v,{key:0,class:`mb-5`},{default:u(()=>[i(_,{xs:{span:22,offset:1},sm:{span:16,offset:4}},{default:u(()=>[i(T,{"border-style":`dashed`}),i(b,{title:f.$t(`order.message.paidSuccessfully`),type:`success`,"show-icon":``,closable:!1},null,8,[`title`])]),_:1})]),_:1})):a(``,!0),f.order?.state===f.OrderState.EXPIRED?(d(),l(v,{key:1,class:`mb-5`},{default:u(()=>[i(_,{xs:{span:22,offset:1},sm:{span:16,offset:4}},{default:u(()=>[i(T,{"border-style":`dashed`}),i(b,{title:f.$t(`order.message.orderExpired`),type:`error`,"show-icon":``,closable:!1},null,8,[`title`])]),_:1})]),_:1})):a(``,!0),f.order?.state===f.OrderState.FAILED?(d(),l(v,{key:2,class:`mb-5`},{default:u(()=>[i(_,{xs:{span:22,offset:1},sm:{span:16,offset:4}},{default:u(()=>[i(T,{"border-style":`dashed`}),i(b,{title:f.$t(`order.state.failed`),type:`error`,"show-icon":``,closable:!1},null,8,[`title`])]),_:1})]),_:1})):a(``,!0),f.order?.state===f.OrderState.PENDING&&f.showPayment?(d(),l(v,{key:3},{default:u(()=>[i(_,{xs:{span:22,offset:1},sm:{span:16,offset:4}},{default:u(()=>[i(T,{"border-style":`dashed`}),!f.order.pay_way&&f.order.price&&f.order.price>0?(d(),o(`div`,me,[e(`div`,{class:t({payway:!0,wechatpay:!0,active:f.payWay===f.PayWay.WechatPay}),onClick:p[0]||=e=>f.payWay=f.PayWay.WechatPay},[p[7]||=e(`span`,{class:`payicon wechatpay`},null,-1),e(`span`,he,r(f.$t(`order.title.wechatPay`)),1)],2),e(`div`,{class:t({payway:!0,alipay:!0,active:f.payWay===f.PayWay.AliPay}),onClick:p[1]||=e=>f.payWay=f.PayWay.AliPay},[p[8]||=e(`span`,{class:`payicon alipay`},null,-1),e(`span`,ge,r(f.$t(`order.title.aliPay`)),1)],2),f.enableCard?a(``,!0):(d(),o(`div`,{key:0,class:t({payway:!0,stripe:!0,active:f.payWay===f.PayWay.Stripe}),onClick:p[2]||=e=>f.payWay=f.PayWay.Stripe},[p[9]||=e(`span`,{class:`payicon stripe`},null,-1),e(`span`,_e,r(f.$t(`order.title.stripe`)),1)],2)),f.enableCard?(d(),o(`div`,{key:1,class:t({payway:!0,creditcard:!0,active:f.payWay===f.PayWay.Card}),onClick:p[3]||=e=>f.payWay=f.PayWay.Card},[p[10]||=e(`span`,{class:`payicon card`,"aria-hidden":`true`},null,-1),e(`span`,ve,r(f.$t(`order.title.card`)),1)],2)):a(``,!0)])):a(``,!0),f.order.pay_way?(d(),o(`div`,be,[i(E,{type:`primary`,round:``,size:`large`,class:`btn-repay`,onClick:f.onRepay},{default:u(()=>[n(r(f.$t(`common.button.repay`)),1)]),_:1},8,[`onClick`])])):(d(),o(`div`,ye,[i(E,{loading:f.prepaying,round:``,type:`primary`,size:`large`,class:`btn-pay`,onClick:f.onPay},{default:u(()=>[n(r(f.$t(`common.button.pay`)),1)]),_:1},8,[`loading`,`onClick`])]))]),_:1})]),_:1})):a(``,!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),f.order&&f.payWay===f.PayWay.WechatPay?(d(),l(O,{key:0,order:f.order,visible:f.paying,onHide:p[4]||=e=>f.paying=!1},null,8,[`order`,`visible`])):a(``,!0),f.order&&(f.payWay===f.PayWay.Stripe||f.payWay===f.PayWay.Card)?(d(),l(k,{key:1,order:f.order,visible:f.paying,onHide:p[5]||=e=>f.paying=!1},null,8,[`order`,`visible`])):a(``,!0),f.order&&f.payWay===f.PayWay.AliPay?(d(),l(A,{key:2,order:f.order,visible:f.paying,onHide:p[6]||=e=>f.paying=!1},null,8,[`order`,`visible`])):a(``,!0)],64)}var Se=j(ce,[[`render`,xe],[`__scopeId`,`data-v-ab870464`]]);export{Se as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ba as e}from"./index-DVmeVwK7.js";var t=e(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ba as e}from"./index-DVmeVwK7.js";var t=e(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ba as e}from"./index-DVmeVwK7.js";var t=e(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ba as e}from"./index-DVmeVwK7.js";var t=e(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ba as e}from"./index-DVmeVwK7.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ba as e}from"./index-DVmeVwK7.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ba as e}from"./index-DVmeVwK7.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ba as e}from"./index-DVmeVwK7.js";var t=e(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ba as e}from"./index-DVmeVwK7.js";var t=e(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ba as e}from"./index-DVmeVwK7.js";var t=e(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]);export{t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./models-Cru5uJc2.js";import{A as t,B as n,C as r,D as i,Da as a,E as o,F as s,G as c,H as l,I as u,L as d,M as f,N as p,O as ee,P as te,R as m,S as h,T as ne,U as g,V as _,W as v,_ as y,a as b,b as re,c as x,d as S,f as C,g as w,h as ie,i as ae,j as oe,k as se,l as ce,m as T,n as E,o as D,p as O,r as k,s as A,t as j,u as M,v as N,w as P,x as F,y as I,z as L}from"./constants-CuuFtMEu.js";import{O as R,T as z}from"./i18n-lmeSFJDq.js";import{Hn as B,ca as V,na as H}from"./index-DVmeVwK7.js";import{a as U,i as W,n as G,o as le,r as ue}from"./codingBridgeNotify-Bs3sOsDi.js";function de(e,t){e.sessions[t.session_id]={...e.sessions[t.session_id],...t},e.events[t.session_id]??=[]}function fe(e,t,n){if(t===n||!e.sessions[t])return;e.sessions[n]={...e.sessions[n],...e.sessions[t],session_id:n},delete e.sessions[t];let r=e.events[t];r&&(r.length||!e.events[n]?.length)&&(e.events[n]=r),delete e.events[t],delete e.lastSeq[t],delete e.seqChecked[t],delete e.seqChecked[n];for(let r of e.permissions)r.session_id===t&&(r.session_id=n);e.currentSessionId===t&&(e.currentSessionId=n)}function pe(e,t){e.events[t.session_id]??=[],e.events[t.session_id].push(t)}function me(e,t,n,r){let i=e.events[t]?.find(e=>e.kind===`text`&&e.stream_id===n&&e.streaming);return i?(i.text=(i.text??``)+r,!0):!1}function he(e,t,n,r){let i=e.events[t]?.find(e=>e.kind===`text`&&e.stream_id===n);return i?(typeof r==`string`&&(i.text=r),i.streaming=!1,!0):!1}function ge(e,t){for(let n of e.events[t]??[])n.streaming&&=!1}function _e(e,t,n){let r=e.events[t];if(!r)return;if(!n){e.events[t]=[];return}let i=r.findIndex(e=>e.kind===`result`&&e.cut_uuid===n);i>=0&&(e.events[t]=r.slice(0,i+1))}var ve=()=>typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID().replace(/-/g,``):`${Date.now().toString(16)}${Math.random().toString(16).slice(2)}`,ye=()=>{try{return typeof localStorage<`u`&&localStorage.getItem(`cbDebug`)===`1`}catch{return!1}},K=(e,t)=>{if(!ye())return;let n=t?.payload??{};console.debug(`[codingBridge]`,e,{type:t?.type,id:t?.id,node_id:t?.node_id??t?.from_node,action:n?.action,event:n?.event,session_id:n?.session_id,trace_id:n?.trace_id})},be=class{ws;token;handlers;reconnectDelay=c;reconnectTimer;closedByUser=!1;constructor(e){this.token=H(),this.handlers=e}get isOpen(){return this.ws?.readyState===WebSocket.OPEN}connect(){this.closedByUser=!1,this.open()}open(){if(this.ws&&(this.ws.readyState===WebSocket.OPEN||this.ws.readyState===WebSocket.CONNECTING))return;let e=`${a}?token=${encodeURIComponent(this.token)}`,t;try{t=new WebSocket(e)}catch(e){console.warn(`[codingBridge] failed to open socket`,e),this.scheduleReconnect();return}this.ws=t,t.onopen=()=>{this.reconnectDelay=c,this.handlers.onOpen?.()},t.onmessage=e=>this.onMessage(e),t.onclose=()=>{this.handlers.onClose?.(),this.closedByUser||this.scheduleReconnect()},t.onerror=()=>{t.close()}}onMessage(e){let t;try{t=JSON.parse(e.data)}catch{return}let r=t?.payload??{};switch(K(`recv`,t),t?.type){case g:this.handlers.onEvent?.(r,t?.from_node);break;case n:this.handlers.onNodesSnapshot?.(r.nodes??[]);break;case l:this.handlers.onNodeStatus?.(r.node_id,r.status);break;case _:this.handlers.onNodeRenamed?.(r.node_id,r.name);break;case y:this.handlers.onRelayError?.(r.code??`error`,r.message??``);break;default:break}}scheduleReconnect(){if(this.closedByUser||this.reconnectTimer)return;let e=this.reconnectDelay;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=void 0,this.open()},e),this.reconnectDelay=Math.min(this.reconnectDelay*2,v)}sendEnvelope(e,t){if(!this.isOpen)return;let n={v:2,id:ve(),ts:Date.now(),type:e,...t};K(`send`,n),this.ws?.send(JSON.stringify(n))}sendToNode(e,t){this.sendEnvelope(w,{node_id:e,payload:t})}listNodes(){this.sendEnvelope(T,{})}resume(e){this.sendEnvelope(ie,{payload:{resume_from:e}})}close(){if(this.closedByUser=!0,this.reconnectTimer&&=(clearTimeout(this.reconnectTimer),void 0),this.ws){this.ws.onclose=null,this.ws.onerror=null,this.ws.onmessage=null,this.ws.onopen=null;try{this.ws.close()}catch{}this.ws=void 0}}},q,J=()=>typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID().replace(/-/g,``):`${Date.now().toString(16)}${Math.random().toString(16).slice(2)}`,Y=(e,t,n)=>({id:J(),session_id:e,kind:t,ts:Date.now(),...n}),X=e=>{try{let t=JSON.parse(e);if(t&&typeof t==`object`)return t}catch{}return{answers:{}}},xe=e=>{let t=X(e).answers??{};return Object.entries(t).map(([e,t])=>`${e} → ${Array.isArray(t)?t.join(`, `):t}`).join(`
|
|
2
|
-
`)},Se=(e,t)=>{G({title:`Approval needed`,body:`Claude wants to use ${t.tool||`a tool`}. Tap to review.`,data:t},t=>{t.node_id&&e(`selectNode`,t.node_id)})},Ce=(n,a,c,l,g)=>{let _=l?.event,v=l?.session_id,y=l?.trace_id,b=l?.seq;if(typeof b==`number`&&v){let e=c.lastSeq[v];if(e!==void 0&&b<=e){if(c.seqChecked[v])return;n(`resetLastSeq`,v),a(`resyncSession`,v)}n(`markSeqChecked`,v),n(`setLastSeq`,{session_id:v,seq:b})}switch(v&&y&&n(`updateSession`,{session_id:v,trace_id:y}),_){case f:n(`upsertSession`,{session_id:v,node_id:g,status:`running`,cwd:l.cwd,model:l.model,resolved_model:l.resolved_model,...l.effort===void 0?{}:{effort:l.effort},...l.permission_mode===void 0?{}:{permission_mode:l.permission_mode},trace_id:y});break;case ee:{let e=l.sdk_session_id;v&&e&&e!==v&&n(`renameSession`,{from:v,to:e});break}case s:{let e=l.id;e&&c.events[v]?.find(t=>t.kind===`text`&&t.stream_id===e)?n(`appendDelta`,{session_id:v,stream_id:e,text:l.text??``}):n(`appendEvent`,Y(v,`text`,{text:l.text??``,stream_id:e,streaming:!0,trace_id:y}));break}case te:{let e=l.id;e&&c.events[v]?.find(t=>t.kind===`text`&&t.stream_id===e)?n(`finalizeStream`,{session_id:v,stream_id:e,text:l.text}):n(`appendEvent`,Y(v,`text`,{text:l.text,trace_id:y}));break}case u:n(`appendEvent`,Y(v,`thinking`,{text:l.text,trace_id:y}));break;case m:n(`appendEvent`,Y(v,`tool_use`,{tool:l.tool,tool_use_id:l.tool_use_id,input:l.input,trace_id:y}));break;case d:n(`appendEvent`,Y(v,`tool_result`,{tool_use_id:l.tool_use_id,content:l.content,is_error:l.is_error,trace_id:y}));break;case r:n(`addPermission`,{request_id:l.request_id,session_id:v,node_id:g,tool:l.tool,input:l.input,title:l.title,display_name:l.display_name,description:l.description}),Se(a,{node_id:g,session_id:v,request_id:l.request_id,tool:l.display_name||l.title||l.tool});break;case h:for(let e of l.requests??[])n(`addPermission`,{request_id:e.request_id,session_id:e.session_id,node_id:g,tool:e.tool,input:e.input,title:e.title,display_name:e.display_name,description:e.description});break;case P:n(`removePermission`,l.request_id);break;case t:n(`finalizeAllStreams`,{session_id:v}),n(`appendEvent`,Y(v,`result`,{subtype:l.subtype,is_error:l.is_error,text:l.result,cost_usd:l.cost_usd,cut_uuid:l.cut_uuid,sdk_session_id:l.sdk_session_id,trace_id:y})),n(`updateSession`,{session_id:v,status:`idle`,cost_usd:l.cost_usd});break;case se:n(`appendEvent`,Y(v,`notice`,{text:l.text,subtype:l.code,command:l.command,level:l.level}));break;case i:n(`finalizeAllStreams`,{session_id:v}),n(`appendEvent`,Y(v,`error`,{text:l.message,trace_id:y})),n(`updateSession`,{session_id:v,status:`error`}),n(`updateStatus`,{key:`getHistoryDetail`,value:e.Success});break;case o:n(`finalizeAllStreams`,{session_id:v}),n(`updateSession`,{session_id:v,status:`closed`}),n(`clearSeqCheckedFor`,v);break;case oe:n(`rewindToCut`,{session_id:v,cut_uuid:l.cut_uuid}),l.prompt&&n(`appendEvent`,Y(v,`prompt`,{text:l.prompt,trace_id:y})),n(`updateSession`,{session_id:v,status:`running`});break;case p:n(`resetLastSeq`,v),n(`clearSeqCheckedFor`,v),a(`resyncSession`,v);break;case ne:for(let e of l.sessions??[]){let t=e.model;n(`upsertSession`,{session_id:e.session_id,node_id:g,status:e.status??`running`,started:!0,cwd:e.cwd,model:t,resolved_model:e.resolved_model,...e.effort===void 0?{}:{effort:e.effort},...e.permission_mode===void 0?{}:{permission_mode:e.permission_mode}})}break;case F:if(g){n(`setHistory`,{node_id:g,sessions:l.sessions??[]}),n(`updateStatus`,{key:`getHistory`,value:e.Success});let t=c.historyRef;t&&t.node_id===g&&!c.currentSessionId&&a(`reattachSession`,t)}break;case re:we(n,c,l,g),n(`updateStatus`,{key:`getHistoryDetail`,value:e.Success});break;case I:n(`setDirectory`,{path:l.path,parent:l.parent??null,sep:l.sep??`/`,entries:l.entries??[],truncated:l.truncated,error:l.error});break;case N:g&&n(`setCapabilities`,{node_id:g,capabilities:{providers:l.providers??[]}});break;default:break}},we=(e,t,n,r)=>{let i=n?.session_id,a=Te(n?.provider);if(!i||!r)return;let o=a===`claude`||a===`codex`||a===`copilot`,s=t.sessions[i],c=!!s&&(s.started===!0||s.status===`running`||s.status===`starting`),l=t.lastComposer?.[r]??{},u=(n.resolved_model===void 0?void 0:n.model)??s?.model;e(`upsertSession`,{session_id:i,node_id:r,status:c?s.status:`idle`,cwd:n.cwd??s?.cwd??l.cwd,model:u,resolved_model:n.resolved_model??s?.resolved_model,effort:n.effort??s?.effort??l.effort,permission_mode:n.permission_mode??s?.permission_mode??l.permissionMode,provider:a,started:!!c,readonly:!o&&!c});let d=t.events[i]?.length??0,f=(n.events??[]).length,p=s?.status===`running`||s?.status===`starting`;c&&d>0&&(p||d>=f)||e(`setEvents`,{session_id:i,events:(n.events??[]).map((e,t)=>({id:J(),session_id:i,kind:e.kind,ts:typeof e.ts==`number`?e.ts:Date.now()+t,text:e.text,tool:e.tool,tool_use_id:e.tool_use_id,input:e.input,content:e.content,is_error:e.is_error,subtype:e.subtype,cost_usd:e.cost_usd}))}),e(`setCurrentNode`,r),e(`setCurrentSession`,i),e(`setHistoryRef`,{node_id:r,provider:a,session_id:i})},Te=e=>e===`codex`||e===`copilot`?e:`claude`,Z=0,Q=new Map,Ee=({commit:e})=>{Q.clear(),e(`resetAll`)},De=async()=>{},Oe=async()=>{},ke=(e,t,n)=>{e(`setNodeName`,{node_id:t,name:n})},$={namespaced:!0,state:V,mutations:{resetAll:e=>{Object.assign(e,V())},updateStatus:(e,t)=>{e.status[t.key]=t.value},setConnection:(e,t)=>{e.connection=t},setNodes:(e,t)=>{e.nodes=t},mergeNodeSnapshot:(e,t)=>{let n=new Set(t.map(e=>e.node_id)),r=new Map(t.map(e=>[e.node_id,e.name]));for(let t of e.nodes){t.status=n.has(t.node_id)?`online`:`offline`;let e=r.get(t.node_id);e&&(t.name=e)}for(let n of t)e.nodes.some(e=>e.node_id===n.node_id)||e.nodes.push({...n,status:`online`})},setNodeStatus:(e,t)=>{let n=e.nodes.find(e=>e.node_id===t.node_id);n&&(n.status=t.status)},setNodeName:(e,t)=>{let n=e.nodes.find(e=>e.node_id===t.node_id);n&&(n.name=t.name)},setCurrentNode:(e,t)=>{e.currentNodeId=t},setCurrentSession:(e,t)=>{e.currentSessionId=t},upsertSession:(e,t)=>{de(e,t)},updateSession:(e,t)=>{let n=e.sessions[t.session_id];n&&(e.sessions[t.session_id]={...n,...t})},renameSession:(e,t)=>{fe(e,t.from,t.to),e.historyRef?.session_id===t.from&&(e.historyRef={...e.historyRef,session_id:t.to})},appendEvent:(e,t)=>{pe(e,t)},truncateEventsBefore:(e,t)=>{let n=e.events[t.session_id];if(!n)return;let r=n.findIndex(e=>e.id===t.event_id);r>=0&&(e.events[t.session_id]=n.slice(0,r))},rewindToCut:(e,t)=>{_e(e,t.session_id,t.cut_uuid)},setLastSeq:(e,t)=>{let n=e.lastSeq[t.session_id]??0;t.seq>n&&(e.lastSeq[t.session_id]=t.seq)},resetLastSeq:(e,t)=>{delete e.lastSeq[t]},markSeqChecked:(e,t)=>{e.seqChecked[t]=!0},clearSeqChecked:e=>{e.seqChecked={}},clearSeqCheckedFor:(e,t)=>{delete e.seqChecked[t]},appendDelta:(e,t)=>{me(e,t.session_id,t.stream_id,t.text)},finalizeStream:(e,t)=>{he(e,t.session_id,t.stream_id,t.text)},finalizeAllStreams:(e,t)=>{ge(e,t.session_id)},setEvents:(e,t)=>{e.events[t.session_id]=t.events},setHistory:(e,t)=>{e.history[t.node_id]=t.sessions},setHistoryRef:(e,t)=>{e.historyRef=t},setDirectory:(e,t)=>{e.directory=t,e.directoryLoading=!1},setDirectoryLoading:(e,t)=>{e.directoryLoading=t},setLastComposer:(e,t)=>{e.lastComposer={...e.lastComposer,[t.node_id]:{...e.lastComposer[t.node_id],...t.prefs}}},setCapabilities:(e,t)=>{e.capabilities[t.node_id]=t.capabilities},addPermission:(e,t)=>{e.permissions.some(e=>e.request_id===t.request_id)||e.permissions.push(t)},removePermission:(e,t)=>{e.permissions=e.permissions.filter(e=>e.request_id!==t)},removeNodeData:(e,t)=>{delete e.history[t],delete e.capabilities[t],e.historyRef?.node_id===t&&(e.historyRef=void 0);for(let n of Object.values(e.sessions))n.node_id===t&&(delete e.sessions[n.session_id],delete e.events[n.session_id],delete e.lastSeq[n.session_id],delete e.seqChecked[n.session_id],e.currentSessionId===n.session_id&&(e.currentSessionId=void 0))}},actions:{resetAll:Ee,getApplications:De,setApplication:Oe,getNodes:async({commit:t,rootState:n})=>{let r=n.token?.access;if(!r)return[];t(`updateStatus`,{key:`getNodes`,value:e.Request});let i=Z;try{let{data:n}=await B.getNodes({token:r}),a=(n.nodes??[]).map(e=>{let t=Q.get(e.node_id);return t&&t.at>i?{...e,name:t.name}:e});return t(`setNodes`,a),t(`updateStatus`,{key:`getNodes`,value:e.Success}),a}catch(n){throw t(`updateStatus`,{key:`getNodes`,value:e.Error}),n}},claimPair:async({commit:t,dispatch:n,rootState:r},i)=>{let a=r.token?.access;if(!a)throw Error(`not authenticated`);t(`updateStatus`,{key:`claimPair`,value:e.Request});try{let{data:r}=await B.claimPair(i.trim(),{token:a});return t(`updateStatus`,{key:`claimPair`,value:e.Success}),await n(`getNodes`),r.node_name}catch(n){throw t(`updateStatus`,{key:`claimPair`,value:e.Error}),n}},deleteNode:async({commit:t,dispatch:n,state:r,rootState:i},a)=>{let o=i.token?.access;if(!o)throw Error(`not authenticated`);t(`updateStatus`,{key:`deleteNode`,value:e.Request});try{await B.deleteNode(a,{token:o}),t(`removeNodeData`,a),r.currentNodeId===a&&(t(`setCurrentNode`,void 0),t(`setCurrentSession`,void 0)),t(`updateStatus`,{key:`deleteNode`,value:e.Success}),await n(`getNodes`)}catch(n){throw t(`updateStatus`,{key:`deleteNode`,value:e.Error}),n}},renameNode:async({commit:t,rootState:n},r)=>{let i=n.token?.access;if(!i)throw Error(`not authenticated`);let a=r.name.trim();if(!a)throw Error(`name must not be empty`);t(`updateStatus`,{key:`renameNode`,value:e.Request});try{let{data:n}=await B.renameNode(r.nodeId,a,{token:i}),o=n?.name??a;Q.size>=50&&Q.clear(),Q.set(r.nodeId,{name:o,at:++Z}),t(`setNodeName`,{node_id:r.nodeId,name:o}),t(`updateStatus`,{key:`renameNode`,value:e.Success})}catch(n){throw t(`updateStatus`,{key:`renameNode`,value:e.Error}),n}},connect:({commit:e,dispatch:t,state:n,rootState:r})=>{r.token?.access&&(q?.isOpen||(q?.close(),e(`setConnection`,`connecting`),q=new be({onOpen:()=>{e(`setConnection`,`connected`),e(`clearSeqChecked`);let r={...n.lastSeq};Object.keys(r).length&&q?.resume(r),n.currentNodeId&&(t(`getHistory`,n.currentNodeId),t(`getCapabilities`,n.currentNodeId),t(`requestSessions`,n.currentNodeId),t(`requestPendingPermissions`,n.currentNodeId))},onClose:()=>e(`setConnection`,`disconnected`),onEvent:(r,i)=>Ce(e,t,n,r,i),onNodesSnapshot:n=>{e(`mergeNodeSnapshot`,n),t(`getNodes`)},onNodeStatus:(r,i)=>{e(`setNodeStatus`,{node_id:r,status:i}),i===`online`&&r===n.currentNodeId&&(t(`getHistory`,r),t(`getCapabilities`,r),t(`requestSessions`,r),t(`requestPendingPermissions`,r))},onNodeRenamed:(t,n)=>{ke(e,t,n)},onRelayError:(e,t)=>console.warn(`[codingBridge] relay error`,e,t)}),q.connect()))},disconnect:({commit:e})=>{q?.close(),q=void 0,e(`setConnection`,`disconnected`)},selectNode:({commit:e,dispatch:t,state:n},r)=>{if(e(`setCurrentNode`,r),!r){e(`setCurrentSession`,void 0);return}let i=Object.values(n.sessions).filter(e=>e.node_id===r).map(e=>e.session_id);e(`setCurrentSession`,i.length?i[i.length-1]:void 0),t(`getHistory`,r),t(`getCapabilities`,r),t(`requestSessions`,r),t(`requestPendingPermissions`,r)},requestSessions:({state:e},t)=>{let n=t??e.currentNodeId;!n||!q||q.sendToNode(n,{action:x})},requestPendingPermissions:({state:e},t)=>{let n=t??e.currentNodeId;!n||!q||q.sendToNode(n,{action:D})},enableNotifications:async({dispatch:e,rootState:t})=>{let n=t.token?.access;if(!n)return`unsupported`;if(R()){let t=await ue(t=>{t?.node_id&&(e(`selectNode`,t.node_id),e(`requestPendingPermissions`,t.node_id))});return t?(await B.savePushSubscription({kind:z()?`apns`:`fcm`,token:t,ua:navigator.userAgent},{token:n}),`enabled`):`denied`}let r=await W();if(r===`unsupported`)return`unsupported`;if(r!==`granted`)return`denied`;try{let{data:e}=await B.getPushConfig();if(e.web_push_enabled&&e.vapid_public_key){let t=await U(e.vapid_public_key);t&&await B.savePushSubscription({kind:`webpush`,subscription:t,ua:navigator.userAgent},{token:n})}}catch(e){console.warn(`[codingBridge] web push setup skipped`,e)}return`enabled`},disableNotifications:async({rootState:e})=>{let t=e.token?.access;if(R()||!t)return;let n=await le();if(n)try{await B.deletePushSubscription({endpoint:n},{token:t})}catch(e){console.warn(`[codingBridge] failed to deregister web push`,e)}},newSession:({commit:e})=>{e(`setCurrentSession`,void 0),e(`setHistoryRef`,void 0)},sendPrompt:({commit:e,state:t},n)=>{let r=t.currentNodeId,i=n.prompt?.trim(),a=n.images?.length?n.images:void 0,o=n.attachments?.length?n.attachments:void 0;if(!r||!q||!i&&!a&&!o)return;let s=J(),c=t.currentSessionId,l=c?t.sessions[c]:void 0;if(!l||!l.started){let t=l?.provider||n.provider||`claude`;l?(c=l.session_id,e(`updateSession`,{session_id:c,status:`starting`,trace_id:s,...n.cwd?{cwd:n.cwd}:{},...n.model===void 0?{}:{model:n.model},...n.effort===void 0?{}:{effort:n.effort},...n.permissionMode===void 0?{}:{permission_mode:n.permissionMode}})):(c=J(),e(`upsertSession`,{session_id:c,node_id:r,status:`starting`,cwd:n.cwd,model:n.model,effort:n.effort,permission_mode:n.permissionMode,provider:t,trace_id:s}),e(`setCurrentSession`,c),e(`setHistoryRef`,{node_id:r,provider:t,session_id:c})),e(`appendEvent`,Y(c,`prompt`,{text:i,images:a,attachments:o,trace_id:s})),e(`updateSession`,{session_id:c,started:!0}),q.sendToNode(r,{action:O,session_id:c,trace_id:s,prompt:i,cwd:n.cwd||l?.cwd||void 0,model:n.model||l?.model||void 0,permission_mode:n.permissionMode||`bypassPermissions`,provider:t,effort:n.effort||void 0,images:a,attachments:o,resume_session_id:l?.session_id||void 0})}else e(`updateSession`,{session_id:c,trace_id:s}),e(`appendEvent`,Y(c,`prompt`,{text:i,images:a,attachments:o,trace_id:s})),e(`updateSession`,{session_id:c,status:`running`,model:n.model||void 0,...n.effort===void 0?{}:{effort:n.effort},...n.permissionMode===void 0?{}:{permission_mode:n.permissionMode}}),q.sendToNode(r,{action:C,session_id:c,trace_id:s,prompt:i,model:n.model??``,...n.effort===void 0?{}:{effort:n.effort},...n.permissionMode===void 0?{}:{permission_mode:n.permissionMode},images:a,attachments:o})},editPrompt:({commit:e,state:t},n)=>{let r=t.currentNodeId,i=t.currentSessionId,a=n.prompt?.trim();if(!r||!i||!q||!a)return;let o=t.sessions[i],s=t.events[i]??[],c=s.findIndex(e=>e.id===n.eventId);if(!o||c<0)return;let l;for(let e=c-1;e>=0;e--)if(s[e].kind===`result`&&s[e].cut_uuid){l=s[e].cut_uuid;break}let u=n.images?.length?n.images:void 0,d=n.attachments?.length?n.attachments:void 0,f=J();e(`truncateEventsBefore`,{session_id:i,event_id:n.eventId}),e(`updateSession`,{session_id:i,status:`running`,trace_id:f,model:n.model||o.model||void 0,...n.effort===void 0?{}:{effort:n.effort},...n.permissionMode===void 0?{}:{permission_mode:n.permissionMode}}),e(`appendEvent`,Y(i,`prompt`,{text:a,images:u,attachments:d,trace_id:f})),q.sendToNode(r,{action:M,session_id:i,trace_id:f,cut_uuid:l,prompt:a,model:n.model||o.model||void 0,permission_mode:n.permissionMode||void 0,effort:n.effort||void 0,images:u,attachments:d,restore_code:!!n.restoreCode})},retryLastPrompt:({commit:e,dispatch:t,state:n})=>{let r=n.currentSessionId;if(!r)return;let i=n.sessions[r],a=[...n.events[r]??[]].reverse().find(e=>e.kind===`prompt`);!i||!a||(e(`updateSession`,{session_id:r,started:!1}),t(`sendPrompt`,{prompt:a.text??``,cwd:i.cwd,model:i.model,provider:i.provider,images:a.images,attachments:a.attachments}))},interruptSession:({state:e})=>{let t=e.currentSessionId,n=e.currentNodeId;!t||!n||!q||q.sendToNode(n,{action:S,session_id:t})},closeSession:({commit:e,state:t},n)=>{let r=n??t.currentSessionId;if(!r)return;let i=t.sessions[r]?.node_id??t.currentNodeId;i&&q&&q.sendToNode(i,{action:ce,session_id:r}),e(`updateSession`,{session_id:r,status:`closed`}),t.currentSessionId===r&&e(`setCurrentSession`,void 0)},resolvePermission:({commit:e,state:t},n)=>{let r=t.permissions.find(e=>e.request_id===n.request_id);r&&(q?.sendToNode(r.node_id,{action:A,request_id:n.request_id,decision:n.decision}),e(`removePermission`,n.request_id))},answerQuestion:({commit:e,state:t},n)=>{let r=t.permissions.find(e=>e.request_id===n.request_id);r&&(q?.sendToNode(r.node_id,{action:A,request_id:n.request_id,decision:`allow`,answer:X(n.output),answer_text:xe(n.output)}),e(`removePermission`,n.request_id))},getHistory:({commit:t,state:n},r)=>{let i=r??n.currentNodeId;!i||!q||(t(`updateStatus`,{key:`getHistory`,value:e.Request}),q.sendToNode(i,{action:ae,limit:L}))},getHistoryDetail:({commit:t},n)=>{!n?.node_id||!n?.session_id||!q||(t(`updateStatus`,{key:`getHistoryDetail`,value:e.Request}),q.sendToNode(n.node_id,{action:k,provider:n.provider,session_id:n.session_id}),setTimeout(()=>t(`updateStatus`,{key:`getHistoryDetail`,value:e.Success}),12e3))},markHistoryRead:(e,t)=>{!t?.node_id||!t?.session_id||!t?.provider||!q||q.sendToNode(t.node_id,{action:b,provider:t.provider,session_id:t.session_id,updated_at:t.updated_at,limit:L})},reattachSession:({state:e,commit:t,dispatch:n},r)=>{if(!r?.node_id||!r?.session_id)return;t(`setCurrentNode`,r.node_id),t(`setCurrentSession`,r.session_id),n(`getHistoryDetail`,r),n(`requestSessions`,r.node_id),n(`requestPendingPermissions`,r.node_id);let i=e.lastSeq[r.session_id];i!==void 0&&q?.resume({[r.session_id]:i})},resyncSession:({state:e,dispatch:t},n)=>{let r=e.sessions[n];r?.node_id&&t(`getHistoryDetail`,{node_id:r.node_id,session_id:n,provider:r.provider??`claude`})},browseDir:({commit:e,state:t},n)=>{let r=t.currentNodeId;!r||!q||(e(`setDirectoryLoading`,!0),q.sendToNode(r,{action:E,path:n||void 0}))},clearDirectory:({commit:e})=>{e(`setDirectory`,void 0)},getCapabilities:({state:e},t)=>{let n=t??e.currentNodeId;!n||!q||q.sendToNode(n,{action:j})}}};export{$ as codingBridge,$ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./i18n-lmeSFJDq.js";var ee=`duplication`,te=`busy`,ne=`api_error`,re=`bad_request`,ie=`used_up`,ae=`unknown`,oe=`canceled`,se=`timeout`,ce=`content_too_large`,le=`too_many_requests`,ue=`not_applied`,t=typeof window<`u`&&window.location.origin===`https://studio-test.acedata.cloud`,n=t?`https://platform-test.acedata.cloud`:`https://platform.acedata.cloud`,r=t?`https://studio-test.acedata.cloud`:`https://studio.acedata.cloud`,i=t?`https://auth-test.acedata.cloud`:`https://auth.acedata.cloud`,a=t?`https://api-test.acedata.cloud`:`https://api.acedata.cloud`,de=`https://x402.acedata.cloud`,fe=`https://poivelle.acedata.cloud`,o=t?`https://coding-bridge-test.acedata.cloud`:`https://coding-bridge.acedata.cloud`,pe=`${o.replace(/^http/,`ws`)}/ws`,me=`wss://realtime.acedata.cloud/aichat2/realtime`;new URL(n).host;var he=new URL(r).host;new URL(i).host,new URL(a).host;var ge=`assistant`,_e=`user`,ve=`gpt-6-astra`,s=`gpt-5.6-sol`,ye=`gpt-5.6-terra`,be=`gpt-5.6-luna`,xe=`deepseek-v3`,Se=`deepseek-v3.2-exp`,Ce=`deepseek-v4-pro`,we=`deepseek-v4-flash`,Te=`deepseek-r1`,Ee=`grok-4`,De=`grok-3`,Oe=`gemini-3.1-pro`,ke=`gemini-3.0-pro`,Ae=`gemini-3.5-flash`,je=`gemini-3.6-flash`,Me=`gemini-2.5-pro`,Ne=`gemini-2.5-flash`,Pe=`claude-opus-5`,Fe=`claude-opus-4-8`,Ie=`claude-sonnet-4-6`,Le=`claude-haiku-4-5-20251001`,Re=`kimi-k3`,ze=`kimi-k2.6`,Be=`kimi-k2.5`,Ve=`kimi-k2-thinking`,He=`kimi-k2-thinking-turbo`,Ue=`glm-5.1`,We=`glm-4.7`,c=`https://cdn.acedata.cloud/7dljuv.png`,l=`https://cdn.acedata.cloud/p1ge98.png`,u=`https://cdn.acedata.cloud/zv0360.jpg`,d=`https://cdn.acedata.cloud/psfx0g.jpg`,f=`https://cdn.acedata.cloud/8fnw4v.jpg`,p=`https://cdn.acedata.cloud/57ebgy.png`,m=`https://cdn.acedata.cloud/jqi3nv.png`,Ge=`b1fbcc32-e218-4253-9dc3-4fe600a1bfb9`,h={enabled:!0,name:ve,icon:c,modelGroup:`chatgpt`,isFileSupported:!0,isImageSupported:!0,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.astra`),getDescription:()=>e.global.t(`chat.model.astraDescription`)},g={enabled:!0,name:s,icon:c,modelGroup:`chatgpt`,isFileSupported:!0,isImageSupported:!0,getDisplayName:()=>e.global.t(`chat.model.56Sol`),getDescription:()=>e.global.t(`chat.model.56SolDescription`)},Ke={enabled:!0,name:ye,icon:c,modelGroup:`chatgpt`,isFileSupported:!0,isImageSupported:!0,getDisplayName:()=>e.global.t(`chat.model.56Terra`),getDescription:()=>e.global.t(`chat.model.56TerraDescription`)},qe={enabled:!0,name:be,icon:c,modelGroup:`chatgpt`,isFileSupported:!0,isImageSupported:!0,isFree:!0,getDisplayName:()=>e.global.t(`chat.model.56Luna`),getDescription:()=>e.global.t(`chat.model.56LunaDescription`)},Je={enabled:!0,name:xe,icon:u,modelGroup:`deepseek`,getDisplayName:()=>e.global.t(`chat.model.deepseekChat`),getDescription:()=>e.global.t(`chat.model.deepseekChatDescription`)},Ye={enabled:!0,name:Se,icon:u,modelGroup:`deepseek`,getDisplayName:()=>e.global.t(`chat.model.deepseekChat32`),getDescription:()=>e.global.t(`chat.model.deepseekChat32Description`)},Xe={enabled:!0,name:Ce,icon:u,modelGroup:`deepseek`,getDisplayName:()=>e.global.t(`chat.model.deepseekV4Pro`),getDescription:()=>e.global.t(`chat.model.deepseekV4ProDescription`)},Ze={enabled:!0,name:we,icon:u,modelGroup:`deepseek`,getDisplayName:()=>e.global.t(`chat.model.deepseekV4Flash`),getDescription:()=>e.global.t(`chat.model.deepseekV4FlashDescription`)},Qe={enabled:!0,name:Te,icon:u,modelGroup:`deepseek`,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.deepseekReasoner`),getDescription:()=>e.global.t(`chat.model.deepseekReasonerDescription`)},$e={enabled:!0,name:Ee,icon:l,modelGroup:`grok`,isImageSupported:!0,getDisplayName:()=>e.global.t(`chat.model.grok4`),getDescription:()=>e.global.t(`chat.model.grok4Description`)},et={enabled:!0,name:De,icon:l,modelGroup:`grok`,getDisplayName:()=>e.global.t(`chat.model.grok3`),getDescription:()=>e.global.t(`chat.model.grok3Description`)},tt={enabled:!0,name:Oe,icon:d,modelGroup:`gemini`,isImageSupported:!0,isFileSupported:!0,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.gemini31Pro`),getDescription:()=>e.global.t(`chat.model.gemini31ProDescription`)},nt={enabled:!0,name:ke,icon:d,modelGroup:`gemini`,isImageSupported:!0,isFileSupported:!0,getDisplayName:()=>e.global.t(`chat.model.gemini30Pro`),getDescription:()=>e.global.t(`chat.model.gemini30ProDescription`)},rt={enabled:!0,name:je,icon:d,modelGroup:`gemini`,isImageSupported:!0,isFileSupported:!0,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.gemini36Flash`),getDescription:()=>e.global.t(`chat.model.gemini36FlashDescription`)},it={enabled:!0,name:Ae,icon:d,modelGroup:`gemini`,isImageSupported:!0,isFileSupported:!0,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.gemini35Flash`),getDescription:()=>e.global.t(`chat.model.gemini35FlashDescription`)},at={enabled:!0,name:Me,icon:d,modelGroup:`gemini`,isImageSupported:!0,isFileSupported:!0,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.gemini25Pro`),getDescription:()=>e.global.t(`chat.model.gemini25ProDescription`)},ot={enabled:!0,name:Ne,icon:d,modelGroup:`gemini`,isImageSupported:!0,isFileSupported:!0,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.gemini25Flash`),getDescription:()=>e.global.t(`chat.model.gemini25FlashDescription`)},st={enabled:!0,name:Pe,icon:f,modelGroup:`claude`,isImageSupported:!0,isFileSupported:!0,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.claudeOpus5`),getDescription:()=>e.global.t(`chat.model.claudeOpus5Description`)},ct={enabled:!0,name:Fe,icon:f,modelGroup:`claude`,isImageSupported:!0,isFileSupported:!0,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.claudeOpus48`),getDescription:()=>e.global.t(`chat.model.claudeOpus48Description`)},_={enabled:!0,name:Ie,icon:f,modelGroup:`claude`,isImageSupported:!0,isFileSupported:!0,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.claudeSonnet46`),getDescription:()=>e.global.t(`chat.model.claudeSonnet46Description`)},v={enabled:!0,name:Le,icon:f,modelGroup:`claude`,isImageSupported:!0,isFileSupported:!0,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.claudeHaiku45`),getDescription:()=>e.global.t(`chat.model.claudeHaiku45Description`)},y={enabled:!0,name:Re,icon:p,modelGroup:`kimi`,isImageSupported:!0,isFileSupported:!0,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.kimiK3`),getDescription:()=>e.global.t(`chat.model.kimiK3Description`)},b={enabled:!0,name:ze,icon:p,modelGroup:`kimi`,isImageSupported:!0,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.kimiK26`),getDescription:()=>e.global.t(`chat.model.kimiK26Description`)},x={enabled:!0,name:Be,icon:p,modelGroup:`kimi`,getDisplayName:()=>e.global.t(`chat.model.kimiK25`),getDescription:()=>e.global.t(`chat.model.kimiK25Description`)},S={enabled:!0,name:Ve,icon:p,modelGroup:`kimi`,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.kimiK2Thinking`),getDescription:()=>e.global.t(`chat.model.kimiK2ThinkingDescription`)},C={enabled:!0,name:He,icon:p,modelGroup:`kimi`,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.kimiK2ThinkingTurbo`),getDescription:()=>e.global.t(`chat.model.kimiK2ThinkingTurboDescription`)},w={enabled:!0,name:Ue,icon:m,modelGroup:`glm`,getDisplayName:()=>e.global.t(`chat.model.glm51`),getDescription:()=>e.global.t(`chat.model.glm51Description`)},T={enabled:!0,name:We,icon:m,modelGroup:`glm`,isReasoningSupported:!0,getDisplayName:()=>e.global.t(`chat.model.glm47`),getDescription:()=>e.global.t(`chat.model.glm47Description`)},E={icon:c,name:`chatgpt`,getDisplayName:()=>e.global.t(`chat.modelGroup.chatgpt`),getDescription:()=>e.global.t(`chat.modelGroup.chatgptDescription`),models:[h,qe,g,Ke],defaultModel:h,isVoiceCallSupported:!0},D={icon:u,name:`deepseek`,getDisplayName:()=>e.global.t(`chat.modelGroup.deepseek`),getDescription:()=>e.global.t(`chat.modelGroup.deepseekDescription`),models:[Xe,Ze,Je,Ye,Qe]},O={icon:l,name:`grok`,getDisplayName:()=>e.global.t(`chat.modelGroup.grok`),getDescription:()=>e.global.t(`chat.modelGroup.grokDescription`),models:[$e,et]},k={icon:d,name:`gemini`,getDisplayName:()=>e.global.t(`chat.modelGroup.gemini`),getDescription:()=>e.global.t(`chat.modelGroup.geminiDescription`),models:[rt,tt,nt,it,at,ot]},A={icon:f,name:`claude`,getDisplayName:()=>e.global.t(`chat.modelGroup.claude`),getDescription:()=>e.global.t(`chat.modelGroup.claudeDescription`),models:[st,ct,_,v]},j={icon:p,name:`kimi`,getDisplayName:()=>e.global.t(`chat.modelGroup.kimi`),getDescription:()=>e.global.t(`chat.modelGroup.kimiDescription`),models:[y,b,x,S,C]},lt={icon:m,name:`glm`,getDisplayName:()=>e.global.t(`chat.modelGroup.glm`),getDescription:()=>e.global.t(`chat.modelGroup.glmDescription`),models:[w,T]},ut=[h,qe,g,Ke,Xe,Ze,Je,Qe,$e,et,tt,nt,it,at,ot,st,ct,_,v,y,b,x,S,C,w,T],dt=[E,D,O,k,A,j,lt],ft=e=>e.defaultModel??e.models[0],pt=`b1fbcc32-e218-4253-9dc3-4fe600a1bfb9`,mt=`gpt-realtime`,ht=24e3,gt=[`alloy`,`ash`,`ballad`,`coral`,`echo`,`sage`,`shimmer`,`verse`,`marin`,`cedar`],_t=`alloy`,vt=`fast`,yt=`d87e5e99-b797-4ade-9e73-b896896b0461`,bt=`https://cdn.acedata.cloud/wto43b.png`,xt=vt,St=`imagine`,Ct=`480p`,wt=`38ecf158-36f2-42f2-8e7f-6786cdfc2452`,Tt=`https://cdn.acedata.cloud/5b0bc83357.svg`,Et=`text`,Dt=`center`,Ot=`square`,kt=`square`,At=`square`,jt=`dff45a0d-2858-4936-8e2b-3d49c52aff11`,Mt=`https://cdn.acedata.cloud/ahjfwi.png`,Nt=`c7d407fa-0f87-4031-abbb-4f0716ff51ad`,Pt=`https://cdn.acedata.cloud/4b285de64f.svg`,Ft=`creative`,It=`3369e077-2500-4263-86c7-cae0f0e7e843`,Lt=`https://cdn.acedata.cloud/qpbbbb.jpg`,Rt=`kling-v2-5-turbo`,zt=[`kling-v3`,`kling-v3-omni`],Bt=[`kling-v2-6`,`kling-v2-5-turbo`,`kling-v2-1-master`,`kling-v2-master`,`kling-v1-6`,`kling-v1`],Vt=`kling-v2-1-master`,Ht=`73cd74ba-a1bd-4a12-8df6-11d64c38df14`,Ut=`https://cdn.acedata.cloud/8nxyy9.jpg`,Wt=`veo31-fast`,Gt=`text2video`,Kt=`16:9`,qt=`b0761231-74e6-42d3-a095-c1987a61e900`,Jt=`https://cdn.acedata.cloud/z5id1u.png`,M=`sora-2`,N=`sora-2-pro`,Yt=M,Xt=`small`,Zt=[`small`,`large`],Qt=`text2video`,$t=`landscape`,en={[M]:[10,15],[N]:[10,15,25]},tn=`0d7031bf-610a-419e-a5a0-db8f240286d5`,nn=`https://cdn.acedata.cloud/df0e7b7eea.svg`,rn=`generate`,an=`remix`,on=[`9:16`,`16:9`,`1:1`],sn=[`zh-cn`,`en`,`ja`,`ko`,`es`,`fr`,`de`],cn=[`narrated`,`drama`,`avatar`,`captions`],ln=[`captions`,`avatar`],un={narrated:`https://cdn.acedata.cloud/fb12495d70.jpg`,drama:`https://cdn.acedata.cloud/33b9189ad0.jpg`,avatar:`https://cdn.acedata.cloud/540bda9cb6.jpg`,captions:`https://cdn.acedata.cloud/e86fddfc71.jpg`},dn=[`cinematic`,`glass`,`luxury`,`swiss`,`modern`,`editorial`,`warm`,`vibrant`,`neon`,`mono`,`pastel`,`bold`,`industrial`,`futuristic`,`retro`],fn=`.png,.jpg,.jpeg,.gif,.bmp,.webp,.mp4,.mov,.webm,.mp3,.wav,.m4a`,pn=rn,mn=[`zh-cn`],hn=`9:16`,gn=`narrated`,_n=`cinematic`,vn=[{key:`warm-female`,sample:`https://cdn.acedata.cloud/7b7cec364c.mp3`},{key:`bright-female`,sample:`https://cdn.acedata.cloud/32ee903837.mp3`},{key:`anchor-female`,sample:`https://cdn.acedata.cloud/04374b7885.mp3`},{key:`clean-female`,sample:`https://cdn.acedata.cloud/cc0776b86f.mp3`},{key:`calm-male`,sample:`https://cdn.acedata.cloud/2ea4b5eb49.mp3`},{key:`deep-male`,sample:`https://cdn.acedata.cloud/7ba529ae25.mp3`},{key:`documentary-male`,sample:`https://cdn.acedata.cloud/5617e445dd.mp3`},{key:`energetic-male`,sample:`https://cdn.acedata.cloud/d516b56517.mp3`},{key:`storyteller-male`,sample:`https://cdn.acedata.cloud/9dfbd0ed00.mp3`}],yn=`warm-female`,bn=`/poivelle-logo.png`,xn=`5b132265-40e8-4a79-9582-589f8eea4733`,Sn=`https://cdn.acedata.cloud/uploads/b47b3899-d41a-4295-93b9-20686ac98598`,Cn=[`zh`,`en`],wn=`video/mp4,video/quicktime,video/webm`,Tn=`image/png,image/jpeg,image/webp`,En=`audio/wav,audio/mpeg,audio/mp4,audio/x-m4a`,Dn=2400,On=`digitalhuman.voices`,kn=`74e74695-ceff-49d1-ac84-cfa876225ae8`,An=`https://cdn.acedata.cloud/viy61r.jpg`,jn=`v3.5`,Mn=`normal`,Nn=`540p`,Pn=`16:9`,Fn=`e8ebe055-429a-48e9-9d34-5089eae5fd89`,In=`https://cdn.acedata.cloud/ogm2oa.png`,Ln=`flux-dev`,Rn=`generate`,zn=[`21:9`,`16:9`,`4:3`,`3:2`,`1:1`,`2:3`,`3:4`,`9:16`,`9:21`],Bn=`5eaa73b7-b9a7-4a17-afb3-f658fd5495b0`,Vn=`https://cdn.acedata.cloud/0qg4gp.png`,Hn=`minimax-t2v`,Un=`2add8a2a-3577-4a0f-8fd4-e08aaabe8290`,Wn=`https://cdn.acedata.cloud/2440b75bb8.png`,Gn=`f2b646d8-3cfd-46ef-969a-1ea9eebde329`,Kn=`https://cdn.acedata.cloud/l3ffw7.jpg`,qn=`chirp-v5-5`,Jn=`864a7efd-c7a3-4ad8-b372-ba8d64cdeda8`,Yn=`https://cdn.acedata.cloud/id0mz5.jpg`,Xn=`FUZZ-2.0 Pro`,Zn=`44fa6ed2-1ad1-4c7e-a8bd-30002728c0d1`,Qn=`https://cdn.acedata.cloud/859plc.jpg`,P=`nano-banana`,$n=`nano-banana-2-lite`,er=`nano-banana-2`,tr=`nano-banana-pro`,nr=P,rr=`06f2acb7-e4d4-43de-9909-76e27b4e2355`,ir=c,F=`gpt-image-1`,I=`gpt-image-1.5`,L=`gpt-image-2`,R=`gpt-image-2.5-flare`,z=`gpt-image-2.5-flare:official`,B=`gpt-image-2.5-sunburst`,V=`gpt-image-2.5-sunburst:official`,H=`gpt-image-2:official`,ar=[H,z,V],or=e=>!!e&&ar.includes(e),sr=L,cr=[F,I,L,R,z,B,V,H],lr=`auto`,U=`1024x1024`,W=`1536x1024`,G=`1024x1536`,ur=`1792x1024`,dr=`1024x1792`,fr=`2048x2048`,pr=`2048x1536`,mr=`1536x2048`,hr=`2048x1152`,gr=`1152x2048`,_r=`2880x2880`,vr=`3264x2448`,yr=`2448x3264`,br=`3840x2160`,xr=`2160x3840`,Sr=lr,Cr=[U,W,G],wr=[U,W,G],Tr=[U,W,G,ur,dr],Er=[fr,pr,mr,hr,gr],Dr=[_r,vr,yr,br,xr],K=[...Tr,...Er,...Dr],Or={[F]:Cr,[I]:wr,[L]:K,[R]:K,[z]:K,[B]:K,[V]:K,[H]:K},kr=[L,R,z,B,V,H],Ar=kr,jr=3840,Mr=655360,Nr=8294400,Pr=`a0a296f0-22de-422b-943d-1c623a73b8dd`,Fr=`https://cdn.acedata.cloud/9egrbn.png`,Ir=`doubao-seedream-4-0-250828`,Lr=`doubao-seedream-4-5-251128`,q=`doubao-seedream-5-0-lite-260128`,Rr=`doubao-seedream-5-0-260128`,zr=`doubao-seedream-5-0-pro-260628`,Br=q,Vr=`1.5K`,Hr=[{value:`1024x1024`,ratio:`1:1`},{value:`1280x720`,ratio:`16:9`},{value:`720x1280`,ratio:`9:16`},{value:`1152x864`,ratio:`4:3`},{value:`864x1152`,ratio:`3:4`},{value:`1216x832`,ratio:`3:2`},{value:`832x1216`,ratio:`2:3`},{value:`2048x2048`,ratio:`1:1`},{value:`2560x1440`,ratio:`16:9`},{value:`1440x2560`,ratio:`9:16`},{value:`2304x1728`,ratio:`4:3`},{value:`1728x2304`,ratio:`3:4`}],Ur=[`jpeg`,`png`],Wr={[zr]:`doubao-seedream-5.0-pro`,[q]:`doubao-seedream-5.0-lite`,[Rr]:`doubao-seedream-5.0`,[Lr]:`doubao-seedream-4.5`,[Ir]:`doubao-seedream-4.0`},Gr=e=>{if(e)return Wr[e]||e},Kr=`9a33d10b-9f5d-438f-9701-c34906a2d891`,qr=`https://cdn.acedata.cloud/eff9c34a52.png`,Jr=`qwen-image-3.0`,Yr=`1024*1024`,Xr=e=>e,Zr=`762c5fd0-a81e-4c59-b9fe-16bcffad7d4a`,Qr=`https://cdn.acedata.cloud/9q90dl.png`,$r=`doubao-seedance-1-0-pro-250528`,ei=`doubao-seedance-1-0-pro-fast-251015`,ti=`doubao-seedance-1-5-pro-251215`,ni=`doubao-seedance-2-5-260628`,J=`doubao-seedance-2-0-260128`,ri=`doubao-seedance-2-0-fast-260128`,ii=`doubao-seedance-2-0-mini-260615`,ai=`doubao-seedance-1-0-lite-t2v-250428`,oi=`doubao-seedance-1-0-lite-i2v-250428`,si=J,ci=172800,li=`480p`,Y=`720p`,X=`1080p`,ui=Y,di=`16:9`,fi=`9:16`,pi=`21:9`,mi=`adaptive`,hi=di,Z={[ni]:{acceptsText:!0,acceptsImage:!0,requiresImage:!1,acceptsLastFrame:!0,acceptsAudio:!0,acceptsReturnLastFrame:!0,defaultResolution:Y,maxResolution:X,minDuration:4,maxDuration:30,supportsAutoDuration:!0,acceptsReferenceImage:!0,acceptsReferenceAudio:!0,acceptsReferenceVideo:!0,supportsAudioOnly:!0,maxReferenceImages:30,maxReferenceVideos:10,maxReferenceAudios:10,maxReferenceMedia:50,taskTypes:[`auto`,`reference`,`edit`,`extend`],outputFormats:[`mp4`,`mov`]},[$r]:{acceptsText:!0,acceptsImage:!0,requiresImage:!1,acceptsLastFrame:!0,acceptsAudio:!1,acceptsReturnLastFrame:!0,defaultResolution:X,maxResolution:X,minDuration:2,maxDuration:12,supportsAutoDuration:!1,acceptsReferenceImage:!1,acceptsReferenceAudio:!1,acceptsReferenceVideo:!1,supportsAudioOnly:!1,maxReferenceImages:0,maxReferenceVideos:0,maxReferenceAudios:0,maxReferenceMedia:0,taskTypes:[],outputFormats:[`mp4`]},[ei]:{acceptsText:!0,acceptsImage:!0,requiresImage:!1,acceptsLastFrame:!0,acceptsAudio:!1,acceptsReturnLastFrame:!0,defaultResolution:X,maxResolution:X,minDuration:2,maxDuration:12,supportsAutoDuration:!1,acceptsReferenceImage:!1,acceptsReferenceAudio:!1,acceptsReferenceVideo:!1,supportsAudioOnly:!1,maxReferenceImages:0,maxReferenceVideos:0,maxReferenceAudios:0,maxReferenceMedia:0,taskTypes:[],outputFormats:[`mp4`]},[ti]:{acceptsText:!0,acceptsImage:!0,requiresImage:!1,acceptsLastFrame:!0,acceptsAudio:!0,acceptsReturnLastFrame:!0,defaultResolution:Y,maxResolution:X,minDuration:4,maxDuration:12,supportsAutoDuration:!0,acceptsReferenceImage:!1,acceptsReferenceAudio:!1,acceptsReferenceVideo:!1,supportsAudioOnly:!1,maxReferenceImages:0,maxReferenceVideos:0,maxReferenceAudios:0,maxReferenceMedia:0,taskTypes:[],outputFormats:[`mp4`]},[J]:{acceptsText:!0,acceptsImage:!0,requiresImage:!1,acceptsLastFrame:!0,acceptsAudio:!0,acceptsReturnLastFrame:!1,defaultResolution:X,maxResolution:`4k`,minDuration:4,maxDuration:15,supportsAutoDuration:!0,acceptsReferenceImage:!0,acceptsReferenceAudio:!0,acceptsReferenceVideo:!0,supportsAudioOnly:!1,maxReferenceImages:9,maxReferenceVideos:3,maxReferenceAudios:3,maxReferenceMedia:15,taskTypes:[],outputFormats:[`mp4`]},[ri]:{acceptsText:!0,acceptsImage:!0,requiresImage:!1,acceptsLastFrame:!0,acceptsAudio:!0,acceptsReturnLastFrame:!1,defaultResolution:Y,maxResolution:Y,minDuration:4,maxDuration:15,supportsAutoDuration:!0,acceptsReferenceImage:!0,acceptsReferenceAudio:!0,acceptsReferenceVideo:!0,supportsAudioOnly:!1,maxReferenceImages:9,maxReferenceVideos:3,maxReferenceAudios:3,maxReferenceMedia:15,taskTypes:[],outputFormats:[`mp4`]},[ii]:{acceptsText:!0,acceptsImage:!0,requiresImage:!1,acceptsLastFrame:!0,acceptsAudio:!0,acceptsReturnLastFrame:!1,defaultResolution:Y,maxResolution:Y,minDuration:4,maxDuration:15,supportsAutoDuration:!0,acceptsReferenceImage:!0,acceptsReferenceAudio:!0,acceptsReferenceVideo:!0,supportsAudioOnly:!1,maxReferenceImages:9,maxReferenceVideos:3,maxReferenceAudios:3,maxReferenceMedia:15,taskTypes:[],outputFormats:[`mp4`]},[ai]:{acceptsText:!0,acceptsImage:!1,requiresImage:!1,acceptsLastFrame:!1,acceptsAudio:!1,acceptsReturnLastFrame:!1,defaultResolution:Y,maxResolution:Y,minDuration:2,maxDuration:12,supportsAutoDuration:!1,acceptsReferenceImage:!1,acceptsReferenceAudio:!1,acceptsReferenceVideo:!1,supportsAudioOnly:!1,maxReferenceImages:0,maxReferenceVideos:0,maxReferenceAudios:0,maxReferenceMedia:0,taskTypes:[],outputFormats:[`mp4`]},[oi]:{acceptsText:!1,acceptsImage:!0,requiresImage:!0,acceptsLastFrame:!1,acceptsAudio:!1,acceptsReturnLastFrame:!1,defaultResolution:Y,maxResolution:Y,minDuration:2,maxDuration:12,supportsAutoDuration:!1,acceptsReferenceImage:!1,acceptsReferenceAudio:!1,acceptsReferenceVideo:!1,supportsAudioOnly:!1,maxReferenceImages:0,maxReferenceVideos:0,maxReferenceAudios:0,maxReferenceMedia:0,taskTypes:[],outputFormats:[`mp4`]}},gi=e=>e&&Z[e]?Z[e]:Z[si],_i=`cbfe0ade-0b4e-4c42-83f4-3e2d5b429545`,vi=`https://cdn.acedata.cloud/p1ge98.png`,yi=`grok-imagine-video-1.5-fast:reverse`,bi=`grok-imagine-video:reverse`,xi=`grok-imagine-video:official`,Si=`grok-imagine-video-1.5:official`,Ci=yi,wi=`16:9`,Ti=`9:16`,Ei=wi,Di=`480p`,Oi=`720p`,ki=`1080p`,Ai=Di,ji=[1,3,5,6,8,10,12,15,20,25,30],Mi=[Si],Ni=e=>!!e&&Mi.includes(e),Pi=e=>e===`grok-imagine-video-1.5-fast:reverse`?30:15,Fi=e=>e===`grok-imagine-video-1.5-fast:reverse`?6:1,Ii=`dda998fe-e11f-41b8-afa9-0a9b8420d60d`,Li=`https://cdn.acedata.cloud/psfx0g.jpg`,Ri=`omni-flash`,zi=`16:9`,Bi=`9:16`,Vi=zi,Hi=`720p`,Ui=`1080p`,Wi=Hi,Gi=`a9af5926-e8d8-4c5e-bdef-bbebf19cdbc3`,Ki=`https://cdn.acedata.cloud/27e11e555d.png`,qi=`serp-index`,Ji=`f35a16da-726b-425f-96ba-bec7436cfc23`,Yi=`https://cdn.acedata.cloud/a033884259.png`,Xi=`wan2.6-t2v`,Zi=`38bebded-b12d-4c1c-9a91-cdaccdd71745`,Qi=`https://cdn.acedata.cloud/782648959c.png`,$i=`caf99abc-ddcf-4714-b2a5-862d9b469509`,ea=`https://cdn.acedata.cloud/e40fccc727.png`,ta=`s2.1-pro`,na=`s2-pro`,ra=na,ia=`https://cdn.acedata.cloud/2f29543715.apk`,aa=`https://play.google.com/store/apps/details?id=com.acedatacloud.nexior`,oa=`https://apps.apple.com/app/id6772432921`,sa=`https://github.com/AceDataCloud/Nexior/releases`,ca=`https://cdn.acedata.cloud/extension/acedata-extension-latest.zip`,la=`https://platform.acedata.cloud/documents/acedataext`,ua=`general`,da=`apiKey`,fa=`memory`,pa=`site`,ma=`siteServices`,ha=`banners`,ga=`analytics`,_a=`distribution`,va=`function`,ya=`auth`,ba=`subsites`,xa=`customDomain`,Sa=`localTools`,Ca=`about`,Q={sessionStart:`session.start`,sessionSend:`session.send`,sessionEdit:`session.edit`,sessionInterrupt:`session.interrupt`,sessionClose:`session.close`,permissionResolve:`permission.resolve`,permissionsList:`permissions.list`,sessionsList:`sessions.list`,historyList:`history.list`,historyGet:`history.get`,historyMarkRead:`history.mark_read`,capabilitiesGet:`capabilities.get`,ping:`ping`},$={sessionStarted:`session.started`,sessionIdentified:`session.identified`,sessionText:`session.text`,sessionTextDelta:`session.text_delta`,sessionThinking:`session.thinking`,sessionToolUse:`session.tool_use`,sessionToolResult:`session.tool_result`,permissionRequest:`permission.request`,permissionResolved:`permission.resolved`,permissionsSnapshot:`permissions.snapshot`,sessionResult:`session.result`,sessionNotice:`session.notice`,sessionError:`session.error`,sessionClosed:`session.closed`,sessionRewound:`session.rewound`,sessionStreamTruncated:`session.stream_truncated`,sessionsSnapshot:`sessions.snapshot`,historySnapshot:`history.snapshot`,historyDetail:`history.detail`,capabilities:`capabilities`,pong:`pong`},wa=`browser.to_node`,Ta=`browser.list_nodes`,Ea=`browser.resume`,Da=`node.to_browser`,Oa=`nodes.snapshot`,ka=`node.status`,Aa=`node.renamed`,ja=`error`,Ma=Q.sessionStart,Na=Q.sessionSend,Pa=Q.sessionEdit,Fa=Q.sessionInterrupt,Ia=Q.sessionClose,La=Q.permissionResolve,Ra=Q.permissionsList,za=Q.sessionsList,Ba=Q.historyList,Va=Q.historyGet,Ha=Q.historyMarkRead,Ua=200,Wa=`fs.list`,Ga=Q.capabilitiesGet;Q.ping;var Ka=$.sessionStarted,qa=$.sessionIdentified,Ja=$.sessionText,Ya=$.sessionTextDelta,Xa=$.sessionThinking,Za=$.sessionToolUse,Qa=$.sessionToolResult,$a=$.permissionRequest,eo=$.permissionResolved,to=$.permissionsSnapshot,no=$.sessionResult,ro=$.sessionNotice,io=$.sessionError,ao=$.sessionClosed,oo=$.sessionRewound,so=$.sessionStreamTruncated,co=$.sessionsSnapshot,lo=$.historySnapshot,uo=$.historyDetail,fo=`fs.list`,po=$.capabilities;$.pong;var mo=1e3,ho=15e3,go=`https://cdn.acedata.cloud/0b28123f35.png`;export{_a as $,gt as $i,z as $n,vn as $r,ci as $t,no as A,ne as Aa,Bt as Ai,Ir as An,Ln as Ar,zi as At,Oa as B,ie as Ba,At as Bi,jr as Bn,En as Br,Si as Bt,$a as C,n as Ca,Wt as Ci,Jr as Cn,Wn as Cr,qi as Ct,io as D,pe as Da,Lt as Di,Xr as Dn,Bn as Dr,Vi as Dt,ao as E,de as Ea,Rt as Ei,Kr as En,Vn as Er,Ri as Et,Ya as F,ee as Fa,Mt as Fi,Ur as Fn,Mn as Fr,Ci as Ft,mo as G,Ct as Gi,Sr as Gn,wn as Gr,Ti as Gt,ka as H,Tt as Hi,Mr as Hn,Tn as Hr,xi as Ht,Xa as I,ue as Ia,jt as Ii,Hr as In,Nn as Ir,Ei as It,ga as J,yt as Ji,cr as Jn,an as Jr,Oi as Jt,go as K,St as Ki,kr as Kn,On as Kr,ki as Kt,Qa as L,se as La,kt as Li,Pr as Ln,An as Lr,Ai as Lt,Ka as M,te as Ma,Ft as Mi,Rr as Mn,Fn as Mr,Ui as Mt,so as N,oe as Na,Pt as Ni,q as Nn,Pn as Nr,Hi as Nt,qa as O,me as Oa,It as Oi,Br as On,zn as Or,Wi as Ot,Ja as P,ce as Pa,Nt as Pi,zr as Pn,jn as Pr,Ii as Pt,xa as Q,pt as Qi,R as Qn,dn as Qr,Ni as Qt,Za as R,le as Ra,Ot as Ri,Vr as Rn,kn as Rr,ji as Rt,to as S,o as Sa,Kt as Si,gi as Sn,Gn as Sr,Ji as St,co as T,r as Ta,Ht as Ti,qr as Tn,Hn as Tr,Gi as Tt,Da as U,wt as Ui,Ar as Un,Sn as Ur,bi as Ut,Aa as V,Et as Vi,Nr as Vn,Dn as Vr,yi as Vt,ho as W,xt as Wi,sr as Wn,xn as Wr,wi as Wt,ya as X,_t as Xi,I as Xn,sn as Xr,Pi as Xt,da as Y,mt as Yi,F as Yn,on as Yr,_i as Yt,ha as Z,ht as Zi,L as Zn,cn as Zr,Fi as Zt,ja as _,_e as _a,Jt as _i,mi as _n,Xn as _r,na as _t,Ha as a,k as aa,yn as ai,ai as an,Tr as ar,ma as at,uo as b,a as ba,qt as bi,Y as bn,qn as br,Xi as bt,za as c,c as ca,un as ci,ti as cn,lr as cr,la as ct,Fa as d,d as da,en as di,ii as dn,Qn as dr,aa as dt,ut as ea,pn as ei,si as en,B as er,va as et,Na as f,l as fa,Zt as fi,ni as fn,P as fr,oa as ft,wa as g,ge as ga,Xt as gi,fi as gn,Zn as gr,ta as gt,Ea as h,Ge as ha,$t as hi,pi as hn,tr as hr,$i as ht,Ba as i,D as ia,_n as ii,oi as in,rr as ir,pa as it,oo as j,re as ja,zt as ji,Lr as jn,In as jr,Bi as jt,ro as k,t as ka,Vt as ki,Fr as kn,Rn as kr,Li as kt,Ia as l,f as la,tn as li,J as ln,or as lr,sa as lt,Ta as m,s as ma,Yt as mi,di as mn,$n as mr,ea as mt,Wa as n,E as na,mn as ni,ui as nn,H as nr,Sa as nt,Ra as o,O as oa,fn as oi,$r as on,Er as or,ba as ot,Ma as p,p as pa,Qt as pi,Z as pn,er as pr,ra as pt,Ca as q,bt as qi,ir as qn,bn as qr,Di as qt,Va as r,A as ra,gn as ri,Qr as rn,Or as rr,fa as rt,La as s,j as sa,nn as si,ei as sn,Dr as sr,ca as st,Ga as t,dt as ta,hn as ti,hi as tn,V as tr,ua as tt,Pa as u,u as ua,ln as ui,ri as un,nr as ur,ia as ut,po as v,ft as va,N as vi,X as vn,Yn as vr,Qi as vt,eo as w,fe as wa,Ut as wi,Yr as wn,Un as wr,Ki as wt,lo as x,i as xa,Gt as xi,Zr as xn,Kn as xr,Yi as xt,fo as y,he as ya,M as yi,li as yn,Jn as yr,Zi as yt,Ua as z,ae as za,Dt as zi,Gr as zn,Cn as zr,vi as zt};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ba as e}from"./index-DVmeVwK7.js";var t=e(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]);export{t};
|