@acedatacloud/nexior 3.227.0 → 3.228.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ApiCodeButton-CkYl1m8R.js → ApiCodeButton-dD8o0Cnu.js} +1 -1
- package/dist/assets/{Auth-Bkv0eW0O.js → Auth-BwrwiMD2.js} +1 -1
- package/dist/assets/{BotPlaceholder-yR_kBFno.js → BotPlaceholder-Bue2f9Kq.js} +1 -1
- package/dist/assets/{Callback-Bk5nyZcm.js → Callback-D67ABUBB.js} +1 -1
- package/dist/assets/{Console-Dutu0YcF.js → Console-B51B7n--.js} +1 -1
- package/dist/assets/{Consumption-BHLp19TR.js → Consumption-7qH37pE9.js} +1 -1
- package/dist/assets/{Conversation-D8MCeYKI.js → Conversation-D_M3FHdS.js} +1 -1
- package/dist/assets/{CopyToClipboard-DYhphNXQ.js → CopyToClipboard-wxqTxzCB.js} +1 -1
- package/dist/assets/{Detail-JNFESlB-.js → Detail-D_c8gBNc.js} +2 -2
- package/dist/assets/{Extra-BN7QgnU9.js → Extra-CWFXym3Z.js} +1 -1
- package/dist/assets/{FilePreview-Cccng5bk.js → FilePreview-TstwU9At.js} +1 -1
- package/dist/assets/{Hailuo-CjUpl1yc.js → Hailuo-Cj9eGMio.js} +1 -1
- package/dist/assets/{History-B7Sxqf8C.js → History-BKDNunN_.js} +1 -1
- package/dist/assets/{ImagePreview-EvK72jMd.js → ImagePreview-DXG-cniF.js} +1 -1
- package/dist/assets/{ImageWrapper-C6NFWtUs.js → ImageWrapper-PjSkDo1l.js} +1 -1
- package/dist/assets/{Index-DfaFH5vb.js → Index-09p_zVGh.js} +1 -1
- package/dist/assets/{Index-Db9F9SKV.js → Index-1tI3zWev.js} +1 -1
- package/dist/assets/{Index-D_y79uxA.js → Index-B2tIwprH.js} +1 -1
- package/dist/assets/{Index-CGwsCGAJ.js → Index-B5hfIBsq.js} +1 -1
- package/dist/assets/{Index-BNoE6qlR.js → Index-BBh-4ejN.js} +1 -1
- package/dist/assets/{Index-zVvbrZ1U.js → Index-BFSpRo34.js} +1 -1
- package/dist/assets/{Index-CKXuIUCn.js → Index-BKTaRwqW.js} +1 -1
- package/dist/assets/{Index-BnDqfgJC.js → Index-BNleEvch.js} +1 -1
- package/dist/assets/{Index-BDHmeDSF.js → Index-BNygbMrQ.js} +1 -1
- package/dist/assets/{Index-D9zeMzCg.js → Index-BTMBneAm.js} +1 -1
- package/dist/assets/{Index-DAFMrYOh.js → Index-BbjMo7Lv.js} +1 -1
- package/dist/assets/{Index-mylng2p-.js → Index-Bgev-nTv.js} +1 -1
- package/dist/assets/{Index-C2b2AZMo.js → Index-C0RYRxnh.js} +1 -1
- package/dist/assets/{Index-B_M875sK.js → Index-C7EzqETO.js} +1 -1
- package/dist/assets/{Index-B8LUE7P0.js → Index-C8x0kf2s.js} +1 -1
- package/dist/assets/{Index-ir0gSLfa.js → Index-CU76SubV.js} +1 -1
- package/dist/assets/{Index-DVQdwKgX.js → Index-CqA4KSJb.js} +1 -1
- package/dist/assets/{Index-CgYJdX4S.js → Index-CuZuL7tS.js} +1 -1
- package/dist/assets/{Index-B1hFJK_t.js → Index-CvbEok64.js} +1 -1
- package/dist/assets/{Index-ltN7ThEu.js → Index-D-_XdBhJ.js} +1 -1
- package/dist/assets/{Index-BMe46H6w.js → Index-DcBVNSiz.js} +1 -1
- package/dist/assets/{Index-D_fuE-Vv.js → Index-Dh6H7BrW.js} +1 -1
- package/dist/assets/{Index-CQYwhsnt.js → Index-DkgSrHWX.js} +1 -1
- package/dist/assets/{Index-2v2P-xnM.js → Index-e6tN_tHu.js} +1 -1
- package/dist/assets/{Index-1OLlCJgY.js → Index-vNT6LOvE.js} +1 -1
- package/dist/assets/{Invitees-BfN072Nr.js → Invitees-BcwmI73y.js} +1 -1
- package/dist/assets/{List-DpBawTfr.js → List-D6sqz5Mj.js} +1 -1
- package/dist/assets/{List-Hv7KL-tQ.js → List-DGsk0Kff.js} +1 -1
- package/dist/assets/{List-C4IeAIBN.js → List-Dty5jDYs.js} +1 -1
- package/dist/assets/{Main-ICqHIXhb.js → Main-Dl9-2APx.js} +1 -1
- package/dist/assets/{Model-DtY9Idrt.js → Model-B1R0LXht.js} +1 -1
- package/dist/assets/{Navigator-Bm5iIRLG.js → Navigator-BelaGn-K.js} +1 -1
- package/dist/assets/{NoTasks-8MEigfee.js → NoTasks-DHYh2L_b.js} +1 -1
- package/dist/assets/{NotFound-DVls16cy.js → NotFound-g8Pwbtz8.js} +1 -1
- package/dist/assets/{Pagination-emXa8hti.js → Pagination-CHlB8q3U.js} +1 -1
- package/dist/assets/{Player.vue_vue_type_script_setup_true_lang-D6H40eWR.js → Player.vue_vue_type_script_setup_true_lang-CvNCeJRd.js} +1 -1
- package/dist/assets/{Status-BXBFWSlB.js → Status-C2fT2DDm.js} +1 -1
- package/dist/assets/{Subscribe-CBj4qXvn.js → Subscribe-BsxDWOK4.js} +1 -1
- package/dist/assets/{TabSwitcher-DJhlpLCz.js → TabSwitcher-D29jda70.js} +1 -1
- package/dist/assets/{Tts-DWibmJah.js → Tts-C2sPzdZZ.js} +1 -1
- package/dist/assets/{VideoPlayer-CndFbOvW.js → VideoPlayer-C1kby6jb.js} +1 -1
- package/dist/assets/{_Uint8Array-BzP45VD9.js → _Uint8Array-C9GurXZS.js} +1 -1
- package/dist/assets/{_baseClone-DNu4QAe9.js → _baseClone-CQPgJfCg.js} +1 -1
- package/dist/assets/{_baseIteratee-SNuyx3Mb.js → _baseIteratee-DRD8Id2G.js} +1 -1
- package/dist/assets/{_initCloneObject-C0YmUjML.js → _initCloneObject-DwJv9kbk.js} +1 -1
- package/dist/assets/{add-7LCqcsbS.js → add-DWssFSaU.js} +1 -1
- package/dist/assets/{all-wallets-G36_EkcA.js → all-wallets-C0HS1H15.js} +1 -1
- package/dist/assets/{app-store-CKCanXCF.js → app-store-WJfy0_xx.js} +1 -1
- package/dist/assets/{apple-BVLw29Kb.js → apple-QFWVf_b5.js} +1 -1
- package/dist/assets/{arrow-bottom-DOySie-2.js → arrow-bottom-93u8J8Ci.js} +1 -1
- package/dist/assets/{arrow-bottom-circle-Dk7fOTaE.js → arrow-bottom-circle-DW-qJMdY.js} +1 -1
- package/dist/assets/{arrow-left-DMMzwmB-.js → arrow-left-CNcU_JU4.js} +1 -1
- package/dist/assets/{arrow-right-CnH2OyTV.js → arrow-right-DR-2TsoR.js} +1 -1
- package/dist/assets/{arrow-top-D1G87VUH.js → arrow-top-DZLgcbmu.js} +1 -1
- package/dist/assets/{avatar-DY8Yqfr4.js → avatar-BngSAaDG.js} +1 -1
- package/dist/assets/{bank-CFYADZ-l.js → bank-C7LeyK-L.js} +1 -1
- package/dist/assets/{basic-vZ-Z_DeI.js → basic-UqRXPOJZ.js} +1 -1
- package/dist/assets/{browser-BO3d__dK.js → browser-B1gi0_iw.js} +1 -1
- package/dist/assets/{byokCredential-Cv_PkBLY.js → byokCredential-BlooSx3J.js} +1 -1
- package/dist/assets/{card-BGDoDCmN.js → card-Dcb5jEXq.js} +1 -1
- package/dist/assets/{castArray-DtkWeMZp.js → castArray-DFDDfxIX.js} +1 -1
- package/dist/assets/{chat-Bnq31iMM.js → chat-CVAmxetZ.js} +1 -1
- package/dist/assets/{checkmark-BTiGJB_c.js → checkmark-BG_O072w.js} +1 -1
- package/dist/assets/{checkmark-bold-raUqwozi.js → checkmark-bold-DsPXyPz5.js} +1 -1
- package/dist/assets/{chevron-bottom-DF4zZ1Mp.js → chevron-bottom-DMWTNlQ9.js} +1 -1
- package/dist/assets/{chevron-left-BbJPVu2o.js → chevron-left-VrQW4sYZ.js} +1 -1
- package/dist/assets/{chevron-right-BYzrOmn4.js → chevron-right-D2aicsk0.js} +1 -1
- package/dist/assets/{chevron-top-gn0BD0wm.js → chevron-top-BwNxsMW4.js} +1 -1
- package/dist/assets/{chrome-store-EaqcehDo.js → chrome-store-CTVUJuI6.js} +1 -1
- package/dist/assets/{clock-BpSL0EYf.js → clock-CAi02QKx.js} +1 -1
- package/dist/assets/{close-BUo5bvku.js → close-BfWyUXzL.js} +1 -1
- package/dist/assets/{coinPlaceholder-BEofWDFV.js → coinPlaceholder-CAk59Ly_.js} +1 -1
- package/dist/assets/{compass-3CVdi2WA.js → compass-DcGtqsvC.js} +1 -1
- package/dist/assets/{copy-DQbIeTHc.js → copy-Dk4Z2S0m.js} +1 -1
- package/dist/assets/{createTaskActions-CRQlZc-e.js → createTaskActions-DUWJSitV.js} +1 -1
- package/dist/assets/{cursor-DYxNvfi2.js → cursor-B2UIa_AY.js} +1 -1
- package/dist/assets/{cursor-transparent-s-kTHsWZ.js → cursor-transparent-BNMJOnE0.js} +1 -1
- package/dist/assets/{debounce-je8R6qMJ.js → debounce-p4kYWNVH.js} +1 -1
- package/dist/assets/{desktop-Bqetpf7y.js → desktop-B6Tsrbt7.js} +1 -1
- package/dist/assets/{disconnect-DnOS5CU5.js → disconnect-D9nlxRME.js} +1 -1
- package/dist/assets/{discord-CHBwtOK2.js → discord-BDvQvzVd.js} +1 -1
- package/dist/assets/{distribution-Dq0NLnfn.js → distribution-BqI3pSHr.js} +1 -1
- package/dist/assets/{dropdown-CPrqYIX4.js → dropdown-C2KkkC_s.js} +1 -1
- package/dist/assets/{etherscan-EpPx0BTk.js → etherscan-GMFqDVEl.js} +1 -1
- package/dist/assets/{exclamation-triangle-CwBo_Au3.js → exclamation-triangle-2_xTLIKv.js} +1 -1
- package/dist/assets/{extension-BwxkxE-s.js → extension-D3UobEit.js} +1 -1
- package/dist/assets/{external-link-6pQnSJ7J.js → external-link-CNu9_cCr.js} +1 -1
- package/dist/assets/{facebook-Ct-M3NhB.js → facebook-Bq0BzPNP.js} +1 -1
- package/dist/assets/{farcaster-CwmKsGh5.js → farcaster-DgnqXJ7M.js} +1 -1
- package/dist/assets/{filters-CEZ6FQ9y.js → filters-cbdMd5Rs.js} +1 -1
- package/dist/assets/{github-Cz8UeVXd.js → github-X2qxlIQI.js} +1 -1
- package/dist/assets/{google-CtV2EESl.js → google-CwtPZjUn.js} +1 -1
- package/dist/assets/{help-circle-BBVzMXpD.js → help-circle-B9Iy3WoI.js} +1 -1
- package/dist/assets/{highlight-Vc3jp7ut.js → highlight-BKO0nM6d.js} +1 -1
- package/dist/assets/{id-CmZB-3YY.js → id-4rv-8xHQ.js} +1 -1
- package/dist/assets/{image-DsUQTZV4.js → image-CdVNJkm8.js} +1 -1
- package/dist/assets/{index-C7McF3Oe.js → index-1ILjlG8L.js} +1 -1
- package/dist/assets/{index-DQMReEJY.js → index-5cf0-Kfe.js} +1 -1
- package/dist/assets/{index-D4Cw4cZb.js → index-61bV5wmY.js} +1 -1
- package/dist/assets/{index-BaG_sRuE.js → index-7LpFMt7p.js} +1 -1
- package/dist/assets/{index-MDstgJ-D.js → index-83Jk7O74.js} +1 -1
- package/dist/assets/{index-BC0sfYOV.js → index-8xHCAAaC.js} +1 -1
- package/dist/assets/{index-Cd3rYVU2.js → index-B8FmSXVz.js} +1 -1
- package/dist/assets/{index-BsShQ3H_.js → index-BAlxHZjs.js} +1 -1
- package/dist/assets/{index-DwaK76qa.js → index-BC_S-uaw.js} +1 -1
- package/dist/assets/{index-COgQJANw.js → index-BQeFjr82.js} +1 -1
- package/dist/assets/{index-agKHxhiT.js → index-BQqSBNTv.js} +1 -1
- package/dist/assets/{index-BIYITIcQ.js → index-BY9FLlvx.js} +1 -1
- package/dist/assets/{index-CmNLAc2g.js → index-BbRDX8SV.js} +1 -1
- package/dist/assets/{index-byRx5hf4.js → index-BcB_-lzn.js} +1 -1
- package/dist/assets/{index-GG9QrNv-.js → index-BfEq0Clt.js} +1 -1
- package/dist/assets/{index-CmoUI70B.js → index-BfMUOzLd.js} +1 -1
- package/dist/assets/{index-cz53lH1U.js → index-BlDrRQ7b.js} +1 -1
- package/dist/assets/{index-DrjPIAUK.js → index-Bxc4afsE.js} +1 -1
- package/dist/assets/{index-B9C3QmXP.js → index-ByWnkv1G.js} +1 -1
- package/dist/assets/{index-htRHiPfV.js → index-BzHvsm7i.js} +1 -1
- package/dist/assets/{index-x1QLguWA.js → index-BzOvVoYn.js} +1 -1
- package/dist/assets/{index-CBxkbXoj.js → index-C0T1mBSZ.js} +1 -1
- package/dist/assets/{index-CEKCGr2W.js → index-C4j1dHcE.js} +1 -1
- package/dist/assets/{index-DAuJS-Gl.js → index-CACIu92m.js} +1 -1
- package/dist/assets/{index-DqN39zT1.js → index-CHXltq9o.js} +5 -5
- package/dist/assets/{index-CPCQrSA8.js → index-CIwIUBTQ.js} +1 -1
- package/dist/assets/{index-CpQQa5g-.js → index-CKU6Uvvh.js} +1 -1
- package/dist/assets/{index-DRyHg8zJ.js → index-CM8dx-Mj.js} +1 -1
- package/dist/assets/{index-CP6RgWF7.js → index-CN8ZC3ff.js} +1 -1
- package/dist/assets/{index-Cb1pouha.js → index-COqf7aEE.js} +1 -1
- package/dist/assets/{index-BB8IU4AC.js → index-CRWC8q75.js} +1 -1
- package/dist/assets/{index-5zXswERx.js → index-CSP1FYs7.js} +1 -1
- package/dist/assets/{index-B1wz-hVP.js → index-CTtwbbbX.js} +1 -1
- package/dist/assets/{index-I01PKHE0.js → index-CX8UOyJV.js} +1 -1
- package/dist/assets/{index-BMODuPUA.js → index-Cj1peHLJ.js} +1 -1
- package/dist/assets/{index-DAqgZs_n.js → index-CsHqzWXz.js} +1 -1
- package/dist/assets/{index-CPOFhPMc.js → index-CvHyK_GJ.js} +1 -1
- package/dist/assets/{index-DnjDfk8P.js → index-D2C2YeG3.js} +1 -1
- package/dist/assets/{index-DIv7I-iE.js → index-D3m1f5QC.js} +1 -1
- package/dist/assets/{index-3EWFx-Vj.js → index-D84FynKl.js} +1 -1
- package/dist/assets/{index-DXAzTy_q.js → index-D9rFyh62.js} +1 -1
- package/dist/assets/{index-CCPrigDQ.js → index-DC0neZBN.js} +1 -1
- package/dist/assets/{index-C7mr_FlY.js → index-DGVR6QBZ.js} +1 -1
- package/dist/assets/{index-BUuCh7Xt.js → index-DOFsHwj1.js} +1 -1
- package/dist/assets/{index-DuHoXoI1.js → index-DU7eINNo.js} +1 -1
- package/dist/assets/{index-CdhuTWNw.js → index-DUeLs6nI.js} +1 -1
- package/dist/assets/{index-BMrzZEO4.js → index-DY86lbEX.js} +1 -1
- package/dist/assets/{index-DCq7rnCm.js → index-Dc0xaPg1.js} +1 -1
- package/dist/assets/{index-CaBmSn29.js → index-DhvHpkEZ.js} +1 -1
- package/dist/assets/{index-BYllLVr5.js → index-DiSidSvU.js} +3 -3
- package/dist/assets/{index-D9l-HbDE.js → index-DkmVyT7W.js} +1 -1
- package/dist/assets/{index-BEQGtLAt.js → index-DlrvZGBU.js} +1 -1
- package/dist/assets/{index-hO1QjxiB.js → index-DxWfjb_C.js} +1 -1
- package/dist/assets/{index-BNhDr0dA.js → index-DxkK4W6u.js} +1 -1
- package/dist/assets/{index-BePmogR4.js → index-HZX2BloZ.js} +1 -1
- package/dist/assets/{index-mHdYnQ9c.js → index-M0EpmU-A.js} +3 -3
- package/dist/assets/{index-BNbeH26B.js → index-VMe2FOtz.js} +1 -1
- package/dist/assets/{index-DsYuSVnF.js → index-W_Hg68aN.js} +1 -1
- package/dist/assets/{index-CaGN2hWU.js → index-ZPlTL2pP.js} +1 -1
- package/dist/assets/{index-T-uPPTQC.js → index-lf5NiTr1.js} +1 -1
- package/dist/assets/{index-B5Zvx0FP.js → index-s2VXF4fr.js} +2 -2
- package/dist/assets/{index-ZBbEwsOq.js → index-s7RXppbp.js} +1 -1
- package/dist/assets/{index-C4aXUBAg.js → index-zclFx667.js} +1 -1
- package/dist/assets/{index.browser.esm-DXPcenqM.js → index.browser.esm-CSmFp8cx.js} +1 -1
- package/dist/assets/{index.es-DkaS06k9.js → index.es-BeLOywfI.js} +1 -1
- package/dist/assets/{info-CAUiz2nA.js → info-Emy8MnLC.js} +1 -1
- package/dist/assets/{info-circle-BDnJ4-n0.js → info-circle-BWGrRWAJ.js} +1 -1
- package/dist/assets/{isEqual-CTU2BQwF.js → isEqual-Bit6excc.js} +1 -1
- package/dist/assets/{isPlainObject-CT9W9CoU.js → isPlainObject-i9qOcW_m.js} +1 -1
- package/dist/assets/{lightbulb-BjespwcV.js → lightbulb-DXiTEJLI.js} +1 -1
- package/dist/assets/{mail-7ez_cBCf.js → mail-tKiXZbke.js} +1 -1
- package/dist/assets/{midjourney-DI_L7ZDA.js → midjourney-BeFCkFBO.js} +1 -1
- package/dist/assets/{mobile-v1MO4BmR.js → mobile-D8KlJWOt.js} +1 -1
- package/dist/assets/{more-DqNvUfwV.js → more-CylgjYxA.js} +1 -1
- package/dist/assets/{network-placeholder-CKv-KIT1.js → network-placeholder-BKMIUjni.js} +1 -1
- package/dist/assets/{nftPlaceholder-C5VFJoUY.js → nftPlaceholder-BY3UyWGE.js} +1 -1
- package/dist/assets/{off-aS-KN2-U.js → off-BewgkoUP.js} +1 -1
- package/dist/assets/{order-D746WVMu.js → order-BhfcgpUs.js} +1 -1
- package/dist/assets/{pagination-DMcg_VSJ.js → pagination-BQ6ALt71.js} +2 -2
- package/dist/assets/pagination-BeIJPGoU.css +1 -0
- package/dist/assets/{play-store-DVxjmxkl.js → play-store-Dzs4Q6fw.js} +1 -1
- package/dist/assets/{plus-DvDujsz5.js → plus-XAaTdIG1.js} +1 -1
- package/dist/assets/{price-CGbNB5nq.js → price-8kJQGF1-.js} +1 -1
- package/dist/assets/{producer-B-1ty2Co.js → producer-DY9V7kxq.js} +1 -1
- package/dist/assets/{qr-code-6OEQkJ82.js → qr-code-C29k4CV7.js} +1 -1
- package/dist/assets/{recycle-horizontal-vq2U7foE.js → recycle-horizontal-_Dp7OgoM.js} +1 -1
- package/dist/assets/{refresh-8FgGrezG.js → refresh--TQJRJKm.js} +1 -1
- package/dist/assets/{reown-logo-BZSi7Mt5.js → reown-logo-Cfs0LwiI.js} +1 -1
- package/dist/assets/{search-CgZuvIg2.js → search-Dtx_Olte.js} +1 -1
- package/dist/assets/{secp256k1-QHaNdGAb.js → secp256k1-CGwSterS.js} +1 -1
- package/dist/assets/{secp256k1-DeLdxC_a.js → secp256k1-_OGG1YHV.js} +1 -1
- package/dist/assets/{seedream-Da8rFZbK.js → seedream-3G3afkJQ.js} +1 -1
- package/dist/assets/{send-BLMDyJYH.js → send-DihpKyim.js} +1 -1
- package/dist/assets/{service-BKHTVQDz.js → service-BC0by850.js} +1 -1
- package/dist/assets/{solana-wallets-ftXUKUR6.js → solana-wallets-DIJFsdGU.js} +2 -2
- package/dist/assets/{solana-wallets-vue-BjCcNz7B.js → solana-wallets-vue-DkIbko_T.js} +1 -1
- package/dist/assets/{suno-_zBN272v.js → suno-DR-WSsg0.js} +1 -1
- package/dist/assets/{swapHorizontal-CXk_LcWK.js → swapHorizontal-Dq7uiqBT.js} +1 -1
- package/dist/assets/{swapHorizontalBold-CIjaQWUW.js → swapHorizontalBold-CQMOqjwR.js} +1 -1
- package/dist/assets/{swapHorizontalMedium-CHr7kZWU.js → swapHorizontalMedium-cH1d4tFE.js} +1 -1
- package/dist/assets/{swapHorizontalRoundedBold-ebsjc-Vl.js → swapHorizontalRoundedBold-IOdna4Nb.js} +1 -1
- package/dist/assets/{swapVertical-DtgfRHL1.js → swapVertical-BTMTJiRs.js} +1 -1
- package/dist/assets/{telegram-Bq67Z5kN.js → telegram-DC6yvqTP.js} +1 -1
- package/dist/assets/{three-dots-B1gkS2C6.js → three-dots-CIBr4lUY.js} +1 -1
- package/dist/assets/{twitch-3xrpPCB5.js → twitch-bqNNMZIh.js} +1 -1
- package/dist/assets/{twitterIcon-BeAi7GHS.js → twitterIcon-qqEknqCF.js} +1 -1
- package/dist/assets/{typescript-Bxp48IAw.js → typescript-BkLdnbkx.js} +1 -1
- package/dist/assets/{use-form-item-DE6wXJCu.js → use-form-item-D7ZQ0uNO.js} +1 -1
- package/dist/assets/validator-C6X05_Cn.js +1 -0
- package/dist/assets/{verify-filled-DxfM46KO.js → verify-filled-BR0zvmlT.js} +1 -1
- package/dist/assets/{verify-DuKaC8bO.js → verify-gYYpdAsG.js} +1 -1
- package/dist/assets/{w3m-modal-DuUmL31d.js → w3m-modal-T3Ec4LGK.js} +1 -1
- package/dist/assets/{wallet-CLoU2WLh.js → wallet-BsGFJDHN.js} +1 -1
- package/dist/assets/{wallet-placeholder-BGeeZp15.js → wallet-placeholder-DFuQITHq.js} +1 -1
- package/dist/assets/{walletconnect-xe1MWi5T.js → walletconnect-D7o2TSMZ.js} +1 -1
- package/dist/assets/{warning-circle-DP1b0vPS.js → warning-circle-WEMxepHP.js} +1 -1
- package/dist/assets/{web-4piV9sh9.js → web-BKKfoVBE.js} +1 -1
- package/dist/assets/{web-DwWD-qIO.js → web-i0_N59k5.js} +1 -1
- package/dist/assets/{x-LUNDbySz.js → x-BdSKlfcx.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/pagination-CzRYhsIC.css +0 -1
- package/dist/assets/validator-ugFyeEgc.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as c}from"./index.es-
|
|
1
|
+
import{F as c}from"./index.es-BeLOywfI.js";import{J as p,H as m}from"./index-DiSidSvU.js";import{E as f}from"./index-C0T1mBSZ.js";import{d,H as a,E as t,C as o,G as x,L as u,F as g,J as h,D as n,q as i}from"./vendor-vue-NSDaktjZ.js";const _=d({name:"FilePreview",components:{FontAwesomeIcon:c,ElProgress:f},props:{name:{type:String,required:!0},percentage:{type:Number,required:!1,default:void 0},closable:{type:Boolean,required:!1,default:!0}},emits:["remove"],methods:{isImageUrl:p}}),v={class:"file cursor-pointer relative rounded-[10px] h-[50px] w-[250px] flex flex-row items-center justify-start bg-[var(--el-bg-color)]"},w={class:"left h-[50px] w-[50px] flex items-center justify-center"},y={class:"wrapper relative w-[35px] h-[35px] flex items-center justify-center rounded-[10px] text-white bg-[#10a37f] m-auto"},b={class:"right flex-1 h-[50px] flex items-center justify-start pl-[2px] text-[14px] text-[var(--el-text-color-primary)] truncate"},k={class:"text-xs font-bold truncate"},F={key:0,class:"close absolute cursor-pointer top-[5px] right-[5px] bg-[rgba(0,0,0,0.7)] text-white w-[15px] rounded-full h-[15px] flex text-[10px] text-center items-center justify-center"};function $(e,s,j,C,q,B){const r=n("font-awesome-icon"),l=n("el-progress");return i(),a("div",v,[t("div",w,[t("div",y,[o(r,{icon:"fa-regular fa-file-alt"}),x(o(l,{type:"circle","stroke-width":3,percentage:e.percentage,width:25,class:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[25px] h-[25px] z-[10] m-auto"},null,8,["percentage"]),[[u,e.percentage&&e.percentage<100]])])]),t("div",b,[t("span",k,g(e.name),1)]),e.closable?(i(),a("div",F,[o(r,{icon:"fa-solid fa-xmark",class:"icon icon-close",onClick:s[0]||(s[0]=E=>e.$emit("remove"))})])):h("",!0)])}const V=m(_,[["render",$]]);export{V as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as c}from"./index.es-
|
|
1
|
+
import{F as c}from"./index.es-BeLOywfI.js";import{E as m}from"./index-BY9FLlvx.js";import{E as p}from"./index-DGVR6QBZ.js";import{d as u,H as _,E as n,z as r,C as t,y as l,D as a,q as w}from"./vendor-vue-NSDaktjZ.js";import{H as v}from"./index-DiSidSvU.js";const b=u({name:"LayoutHailuo",components:{ElDrawer:p,ElButton:m,FontAwesomeIcon:c},data(){return{drawer:!1}}}),g={class:"main flex flex-row flex-1"},x={class:"config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},$={class:"result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"};function h(e,o,E,C,V,y){const d=a("font-awesome-icon"),i=a("el-button"),f=a("el-drawer");return w(),_("div",g,[n("div",x,[r(e.$slots,"config",{},void 0,!0)]),n("div",$,[r(e.$slots,"result",{},void 0,!0)]),t(i,{circle:"",class:"menu",onClick:o[0]||(o[0]=s=>e.drawer=!0)},{default:l(()=>[t(d,{icon:"fa-solid fa-magic"})]),_:1}),t(f,{modelValue:e.drawer,"onUpdate:modelValue":o[1]||(o[1]=s=>e.drawer=s),direction:"ltr","with-header":!1,size:"340px"},{default:l(()=>[r(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const D=v(b,[["render",h],["__scopeId","data-v-91c9c1f2"]]);export{D as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as g}from"./Pagination-
|
|
1
|
+
import{P as g}from"./Pagination-CHlB8q3U.js";import{C as b}from"./CopyToClipboard-wxqTxzCB.js";import{b as w}from"./distribution-BqI3pSHr.js";import{H as y}from"./index-DiSidSvU.js";import{g as $}from"./price-8kJQGF1-.js";import{E as C}from"./index-DOFsHwj1.js";import{E as v,a as D}from"./index-D9rFyh62.js";import{E,a as H}from"./index-CIwIUBTQ.js";import{d as P,x as c,y as o,C as e,E as a,F as s,G as S,D as r,K as F,q as m}from"./vendor-vue-NSDaktjZ.js";import"./index-CRWC8q75.js";import"./index-DlrvZGBU.js";import"./index-D84FynKl.js";import"./typescript-BkLdnbkx.js";import"./index-CSP1FYs7.js";import"./strings-beZM2Y-f.js";import"./isEqual-Bit6excc.js";import"./_Uint8Array-C9GurXZS.js";import"./castArray-DFDDfxIX.js";import"./use-form-item-D7ZQ0uNO.js";import"./index-DhvHpkEZ.js";import"./index-ZPlTL2pP.js";import"./debounce-p4kYWNVH.js";import"./_baseIteratee-DRD8Id2G.js";import"./index-DkmVyT7W.js";import"./index.es-BeLOywfI.js";import"./index-BLjywj98.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./_initCloneObject-DwJv9kbk.js";import"./isPlainObject-i9qOcW_m.js";import"./index-lf5NiTr1.js";const k=P({name:"ConsoleDistributionList",components:{Pagination:g,CopyToClipboard:b,ElRow:H,ElCol:E,ElTable:D,ElTableColumn:v,ElCard:C},data(){return{distributionHistories:[],distributionStatus:void 0,loading:!1,total:void 0,limit:10}},computed:{redirect(){return this.$route.query.redirect},page(){return parseInt(this.$route.query.page?.toString()||"1")}},watch:{page:{handler(){this.onFetchData()}}},mounted(){this.onFetchData()},methods:{getPriceString:$,onPageChange(t){this.$router.push({name:this.$route.name?.toString(),query:{page:t}})},onFetchData(){this.loading=!0,Promise.all([this.onFetchDistributionHistory()]).finally(()=>{this.loading=!1})},async onFetchDistributionHistory(){const{data:t}=await w.getAll({user_id:this.$store.getters.user.id,ordering:"-created_at",limit:this.limit,offset:(this.page-1)*this.limit});this.distributionHistories=t.items,this.total=t.count}}}),q={class:"title"},B={class:"key"},I={class:"copy"},T={class:"key"},z={class:"copy"},A={class:"price"},N={class:"description"},V={class:"description"},j={class:"created-at"},G={class:"pagination m-v-lg"};function K(t,L,O,R,J,M){const l=r("el-col"),d=r("el-row"),p=r("copy-to-clipboard"),n=r("el-table-column"),u=r("el-table"),_=r("el-card"),h=r("pagination"),f=F("loading");return m(),c(d,{class:"panel"},{default:o(()=>[e(l,{span:24},{default:o(()=>[e(d,null,{default:o(()=>[e(l,{span:24},{default:o(()=>[a("h2",q,s(t.$t("common.title.distributionHistory")),1)]),_:1})]),_:1}),e(d,null,{default:o(()=>[e(l,{span:24},{default:o(()=>[e(_,{shadow:"hover"},{default:o(()=>[S((m(),c(u,{data:t.distributionHistories,stripe:""},{default:o(()=>[e(n,{prop:"id",label:t.$t("distribution.field.id"),"class-name":"text-center",width:"350px"},{default:o(i=>[a("span",B,s(i.row.id),1),a("span",I,[e(p,{content:i.row.id},null,8,["content"])])]),_:1},8,["label"]),e(n,{prop:"id",label:t.$t("distribution.field.userId"),"class-name":"text-center",width:"350px"},{default:o(i=>[a("span",T,s(i.row.user_id),1),a("span",z,[e(p,{content:i.row.user_id},null,8,["content"])])]),_:1},8,["label"]),e(n,{label:t.$t("distribution.field.price"),width:"100px"},{default:o(i=>[a("span",A,s(t.getPriceString({value:i.row?.price})),1)]),_:1},8,["label"]),e(n,{label:t.$t("distribution.field.reward"),width:"100px"},{default:o(i=>[a("span",N,s(t.getPriceString({value:i.row?.reward})),1)]),_:1},8,["label"]),e(n,{label:t.$t("distribution.field.percentage"),width:"120px"},{default:o(i=>[a("span",V,s(i.row.percentage)+"%",1)]),_:1},8,["label"]),e(n,{label:t.$t("distribution.field.createdAt"),width:"200px"},{default:o(i=>[a("span",j,s(t.$dayjs.format(i.row.created_at)),1)]),_:1},8,["label"])]),_:1},8,["data"])),[[f,t.loading]])]),_:1})]),_:1})]),_:1}),e(d,null,{default:o(()=>[e(l,{span:10,offset:14},{default:o(()=>[a("div",G,[e(h,{"current-page":t.page,"page-size":t.limit,total:t.total,onChange:t.onPageChange},null,8,["current-page","page-size","total","onChange"])])]),_:1})]),_:1})]),_:1})]),_:1})}const Et=y(k,[["render",K],["__scopeId","data-v-74b9e778"]]);export{Et as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as m}from"./index.es-
|
|
1
|
+
import{F as m}from"./index.es-BeLOywfI.js";import{E as d}from"./index-C0T1mBSZ.js";import{d as u,H as r,E as t,G as s,L as a,C as n,M as f,J as g,D as l,q as i}from"./vendor-vue-NSDaktjZ.js";import{H as v}from"./index-DiSidSvU.js";const h=u({name:"ImagePreview",components:{FontAwesomeIcon:m,ElProgress:d},props:{url:{type:String,required:!0},name:{type:String,required:!0},percentage:{type:Number,required:!1,default:void 0},closable:{type:Boolean,required:!1,default:!0}},emits:["remove"]}),b={class:"image w-[50px] h-[50px] relative rounded-[var(--el-border-radius-base)] overflow-hidden shadow-sm bg-[var(--el-fill-color-lighter)]"},w=["src","alt"],x={class:"overlay absolute inset-0 bg-[var(--el-mask-color)] backdrop-blur-[1px]"},_={key:0,class:"close absolute cursor-pointer top-[4px] right-[4px] bg-[rgba(0,0,0,0.65)] text-white w-[16px] h-[16px] rounded-full flex text-[10px] text-center items-center justify-center hover:bg-[rgba(0,0,0,0.8)]"};function y(e,o,k,$,q,C){const c=l("el-progress"),p=l("font-awesome-icon");return i(),r("div",b,[t("img",{class:"w-full h-full object-cover",src:e.url,alt:e.name},null,8,w),s(t("div",x,null,512),[[a,e.percentage&&e.percentage<100]]),s(n(c,{type:"circle","stroke-width":4,percentage:e.percentage,width:34,class:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[34px] h-[34px] z-[10] m-auto text-[12px]"},null,8,["percentage"]),[[a,e.percentage&&e.percentage<100]]),e.closable?(i(),r("div",_,[n(p,{icon:"fa-solid fa-xmark",class:"icon icon-close",onClick:o[0]||(o[0]=f(B=>e.$emit("remove"),["stop"]))})])):g("",!0)])}const S=v(h,[["render",y]]);export{S as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as i}from"./index-
|
|
1
|
+
import{E as i}from"./index-BY9FLlvx.js";import{d as m,H as a,J as p,x as l,y as d,I as u,F as f,D as g,q as s}from"./vendor-vue-NSDaktjZ.js";import{H as y}from"./index-DiSidSvU.js";const w=m({name:"ImageWrapper",components:{ElButton:i},props:{src:{type:String,required:!0},rawSrc:{type:String,required:!1,default:void 0}},methods:{onOpenUrl(e){window.open(e,"_blank")},onReload(e){const r=e.target,t=new URL(r.src),o=t.searchParams.get("retry");if(!o)t.searchParams.set("retry","1");else if(parseInt(o)<2)t.searchParams.set("retry",(parseInt(o)+1).toString());else return;r.src=t.toString()}}}),I={class:"image-wrapper"},S=["src"];function _(e,r,t,o,k,$){const c=g("el-button");return s(),a("div",I,[e.src?(s(),a("img",{key:0,src:e.src,class:"image",onError:r[0]||(r[0]=n=>e.onReload(n))},null,40,S)):p("",!0),e.rawSrc?(s(),l(c,{key:1,type:"info",round:"",class:"btn-raw",onClick:r[1]||(r[1]=n=>e.onOpenUrl(e.rawSrc))},{default:d(()=>[u(f(e.$t("common.button.seeRawImage")),1)]),_:1})):p("",!0)])}const h=y(w,[["render",_],["__scopeId","data-v-4deff0d6"]]);export{h as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as A}from"./index.es-DkaS06k9.js";import{E as L}from"./index-BIYITIcQ.js";import{E as O}from"./index-C7mr_FlY.js";import{d as g,H as l,E as r,z as R,C as t,y as m,D as s,q as a,F as n,O as S,N as C,x as w,I as _,J as h,Q as U}from"./vendor-vue-NSDaktjZ.js";import{H as $,bp as B,cs as j,aG as F,o as N,S as P,ct as z}from"./index-BYllLVr5.js";import{a as K,b as H,c as J}from"./pika-DpzVVVef.js";import{I as G,S as Q,l as W}from"./pagination-DMcg_VSJ.js";import{E as X}from"./index-DCq7rnCm.js";import{E as D,a as M}from"./index-BB8IU4AC.js";import{a as Y,E as Z}from"./index-agKHxhiT.js";import{p as x}from"./pasteUploadMixin-BurWbGNQ.js";import{I as ee}from"./ImagePreview-EvK72jMd.js";import{E as te}from"./index-hO1QjxiB.js";import{E as V}from"./index-B9C3QmXP.js";import{P as oe,N as se}from"./NoTasks-8MEigfee.js";import{C as ae}from"./Consumption-BHLp19TR.js";import{a as ne}from"./price-CGbNB5nq.js";import{b as ie,a as le}from"./errorCode-Cqj9Td_Z.js";import{C as re}from"./CopyToClipboard-DYhphNXQ.js";import{s as ce}from"./vue-plyr-BO2nlN4c.js";import{A as pe}from"./ApiCodeButton-CkYl1m8R.js";import{E as de}from"./index-BEQGtLAt.js";import{E as ue}from"./index-DIv7I-iE.js";import{E as me}from"./index-byRx5hf4.js";import{B as fe}from"./BotPlaceholder-yR_kBFno.js";import"./use-form-item-DE6wXJCu.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./highlight-Vc3jp7ut.js";import"./index-BLjywj98.js";import"./vendor-highlight-lEWW1Jxd.js";import"./validator-ugFyeEgc.js";import"./index-3EWFx-Vj.js";import"./index-5zXswERx.js";import"./typescript-Bxp48IAw.js";import"./strings-beZM2Y-f.js";import"./isEqual-CTU2BQwF.js";import"./_Uint8Array-BzP45VD9.js";import"./castArray-DtkWeMZp.js";import"./index-CaBmSn29.js";import"./index-CaGN2hWU.js";import"./debounce-je8R6qMJ.js";import"./_baseIteratee-SNuyx3Mb.js";import"./index-D9l-HbDE.js";import"./index-CBxkbXoj.js";import"./_baseClone-DNu4QAe9.js";import"./_initCloneObject-C0YmUjML.js";import"./index-C7McF3Oe.js";const _e=g({name:"LayoutPika",components:{ElDrawer:O,ElButton:L,FontAwesomeIcon:A},data(){return{drawer:!1}}}),he={class:"main flex flex-row flex-1"},ge={class:"config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},$e={class:"result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"};function ke(e,o,c,d,k,v){const p=s("font-awesome-icon"),f=s("el-button"),i=s("el-drawer");return a(),l("div",he,[r("div",ge,[R(e.$slots,"config",{},void 0,!0)]),r("div",$e,[R(e.$slots,"result",{},void 0,!0)]),t(f,{circle:"",class:"menu",onClick:o[0]||(o[0]=b=>e.drawer=!0)},{default:m(()=>[t(p,{icon:"fa-solid fa-magic"})]),_:1}),t(i,{modelValue:e.drawer,"onUpdate:modelValue":o[1]||(o[1]=b=>e.drawer=b),direction:"ltr","with-header":!1,size:"350px"},{default:m(()=>[R(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const ve=$(_e,[["render",ke],["__scopeId","data-v-10596416"]]),be=g({name:"IngredientsSelector",components:{ElSwitch:X,InfoIcon:G},computed:{value:{get(){return this.$store.state.pika?.config?.ingredients},set(e){console.debug("set ingredients",e),e||this.$store.commit("pika/setConfig",{...this.$store.state.pika?.config,ingredients:e,ingredients_mode:void 0,image_url:void 0}),this.$store.commit("pika/setConfig",{...this.$store.state.pika?.config,ingredients:e,model:"2.0"})}}},mounted(){this.value===void 0&&(this.value=K)}}),ye={class:"field"},we={class:"title font-bold"};function Ve(e,o,c,d,k,v){const p=s("el-switch"),f=s("info-icon");return a(),l("div",ye,[r("h2",we,n(e.$t("pika.name.ingredients")),1),t(p,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=i=>e.value=i),class:"value"},null,8,["modelValue"]),t(f,{content:e.$t("pika.description.ingredients"),class:"info"},null,8,["content"])])}const Ee=$(be,[["render",Ve],["__scopeId","data-v-17c0af5c"]]),Ie=g({name:"EffectSelector",components:{ElSelect:M,ElOption:D},data(){return{}},computed:{options(){return[{value:"Levitate",label:this.$t("pika.style.effect1")},{value:"Decapitate",label:this.$t("pika.style.effect2")},{value:"Eye-pop",label:this.$t("pika.style.effect3")},{value:"Ta-da",label:this.$t("pika.style.effect4")},{value:"Deflate",label:this.$t("pika.style.effect5")},{value:"Crumble",label:this.$t("pika.style.effect6")},{value:"Dissolve",label:this.$t("pika.style.effect7")},{value:"Squish",label:this.$t("pika.style.effect8")},{value:"Inflate",label:this.$t("pika.style.effect9")},{value:"Melt",label:this.$t("pika.style.effect10")},{value:"Cake-ify",label:this.$t("pika.style.effect11")},{value:"Crush",label:this.$t("pika.style.effect12")},{value:"Explode",label:this.$t("pika.style.effect13")}]},value:{get(){return this.$store.state.pika?.config?.effect},set(e){this.$store.commit("pika/setConfig",{...this.$store.state.pika?.config,effect:e})}}}}),Se={class:"field"},Te={class:"title font-bold"},Ce={class:"float-left"};function Pe(e,o,c,d,k,v){const p=s("el-option"),f=s("el-select");return a(),l("div",Se,[r("h2",Te,n(e.$t("pika.name.effect")),1),t(f,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=i=>e.value=i),class:"value",placeholder:e.$t("pika.placeholder.select"),clearable:""},{default:m(()=>[(a(!0),l(S,null,C(e.options,i=>(a(),w(p,{key:i.value,label:i.label,value:i.value},{default:m(()=>[r("span",Ce,n(i.label),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}const Ae=$(Ie,[["render",Pe],["__scopeId","data-v-d1c54475"]]),Le=g({name:"IngredientsModelSelector",components:{ElRadioButton:Z,ElRadioGroup:Y},data(){return{options:[{label:this.$t("pika.button.precise"),value:"precise"},{label:this.$t("pika.button.creative"),value:"creative"}]}},computed:{value:{get(){return this.$store.state.pika?.config?.ingredients_mode},set(e){this.$store.commit("pika/setConfig",{...this.$store.state.pika?.config,ingredients_mode:e})}}},mounted(){this.value||(this.value=H)}}),Ue={class:"field"},Re={class:"title font-bold"};function Ge(e,o,c,d,k,v){const p=s("el-radio-button"),f=s("el-radio-group");return a(),l("div",Ue,[r("h2",Re,n(e.$t("pika.name.ingredientsModel")),1),t(f,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=i=>e.value=i),class:"quality"},{default:m(()=>[(a(!0),l(S,null,C(e.options,i=>(a(),w(p,{key:i.value,label:i.value},{default:m(()=>[_(n(i.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])}const De=$(Le,[["render",Ge],["__scopeId","data-v-b72865fa"]]),Me=g({name:"ModelSelector",components:{ElSelect:M,ElOption:D},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{options:[{value:"2.0",label:"2.0"},{value:"1.5",label:"1.5"}]}},computed:{value:{get(){return this.$store.state.pika?.config?.model},set(e){this.$store.commit("pika/setConfig",{...this.$store.state.pika.config,model:e})}}},mounted(){this.value||(this.value=J)}}),qe={class:"field"},Oe={class:"title font-bold"};function Be(e,o,c,d,k,v){const p=s("el-option"),f=s("el-select");return a(),l("div",qe,[r("h2",Oe,n(e.$t("pika.name.model")),1),t(f,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=i=>e.value=i),class:"value",placeholder:e.$t("pika.placeholder.select")},{default:m(()=>[(a(!0),l(S,null,C(e.options,i=>(a(),w(p,{key:i.value,label:i.label,value:i.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}const je=$(Me,[["render",Be],["__scopeId","data-v-7b2e870a"]]),Fe=g({name:"ImageUrlInput",components:{ElUpload:te,ElButton:L,InfoIcon:G,ImagePreview:ee,FontAwesomeIcon:A},mixins:[x],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)},value:{get(){return this.$store.state.pika?.config?.image_url},set(){const e=this.urls?.[0];this.$store.commit("pika/setConfig",{...this.$store.state.pika?.config,image_url:e})}}},mounted(){this.value||(this.value=void 0),this.onSetStartImageUrl()},methods:{onExceed(){V.warning(this.$t("pika.message.uploadStartImageExceed"))},onError(){V.error(this.$t("pika.message.uploadStartImageError"))},async onRemove(){V.error(this.$t("pika.message.uploadStartImageError"))},onSetStartImageUrl(){this.$store.commit("pika/setConfig",{...this.$store.state.pika?.config,image_url:this.urls})},async onSuccess(){this.onSetStartImageUrl()}}}),Ne={class:"field"},ze={class:"title font-bold"},Ke={class:"upload-wrapper"};function He(e,o,c,d,k,v){const p=s("image-preview"),f=s("font-awesome-icon"),i=s("el-button"),b=s("el-upload"),E=s("info-icon");return a(),l("div",Ne,[r("h2",ze,n(e.$t("pika.name.imageUrl")),1),r("div",Ke,[t(b,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":o[0]||(o[0]=u=>e.fileList=u),accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",name:"file",class:"value upload-wrapper",limit:3,multiple:!0,"list-type":"picture",action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,"on-remove":e.onRemove,"on-success":e.onSuccess,headers:e.headers},{file:m(({file:u})=>[t(p,{url:u.url||u.response?.file_url,name:u.name,percentage:u.percentage,onRemove:I=>e.fileList.splice(e.fileList.indexOf(u),1)},null,8,["url","name","percentage","onRemove"])]),default:m(()=>[t(i,{size:"small",type:"primary",round:""},{default:m(()=>[t(f,{icon:"fa-solid fa-upload",class:"mr-1"}),_(" "+n(e.$t("pika.button.uploadImageUrl")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-remove","on-success","headers"])]),t(E,{content:e.$t("pika.description.imageUrl"),class:"info"},null,8,["content"])])}const Je=$(Fe,[["render",He],["__scopeId","data-v-a948772f"]]),Qe="",We=g({name:"PromptInput",components:{PromptTextarea:oe},computed:{prompt:{get(){return this.$store.state.pika?.config?.prompt},set(e){this.$store.commit("pika/setConfig",{...this.$store.state.pika?.config,prompt:e})}}},mounted(){this.prompt||(this.prompt=Qe)}});function Xe(e,o,c,d,k,v){const p=s("prompt-textarea");return a(),w(p,{modelValue:e.prompt,"onUpdate:modelValue":o[0]||(o[0]=f=>e.prompt=f),title:e.$t("pika.name.prompt"),info:e.$t("pika.description.prompt"),placeholder:e.$t("pika.placeholder.prompt")},null,8,["modelValue","title","info","placeholder"])}const Ye=$(We,[["render",Xe]]),Ze=g({name:"PresetPanel",components:{ImageUrlInput:Je,ElButton:L,FontAwesomeIcon:A,Consumption:ae,PromptInput:Ye,IngredientsSelector:Ee,IngredientsModelSelector:De,ModelSelector:je,EffectSelector:Ae},emits:["generate"],computed:{config(){return this.$store.state.pika?.config},consumption(){return ne(this.config,this.service?.cost)},service(){return this.$store.state.pika?.service}},methods:{onGenerate(){this.$emit("generate")}}}),xe={class:"flex flex-col h-full"},et={class:"flex-1 overflow-y-auto p-5"},tt={class:"flex flex-col items-center justify-center px-5 pb-5"};function ot(e,o,c,d,k,v){const p=s("prompt-input"),f=s("model-selector"),i=s("ingredients-selector"),b=s("effect-selector"),E=s("image-url-input"),u=s("ingredients-model-selector"),I=s("consumption"),T=s("font-awesome-icon"),y=s("el-button");return a(),l("div",xe,[r("div",et,[t(p,{class:"mb-4"}),t(f,{class:"mb-4"}),t(i,{class:"mb-4"}),t(b,{class:"mb-4"}),e.config?.ingredients?(a(),w(E,{key:0,class:"mb-4"})):h("",!0),e.config?.ingredients?(a(),w(u,{key:1,class:"mb-4"})):h("",!0)]),r("div",tt,[t(I,{value:e.consumption,service:e.service},null,8,["value","service"]),t(y,{type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:m(()=>[t(T,{icon:"fa-solid fa-magic",class:"mr-2"}),_(" "+n(e.$t("pika.button.generate")),1)]),_:1},8,["onClick"])])])}const st=$(Ze,[["render",ot]]),at=g({name:"VideoPlayer",components:{VuePlyr:ce},props:{modelValue:{type:Object,required:!0}},data(){return{options:{quality:{default:1080,options:[1080]}}}}}),nt=["data-poster"],it=["src"];function lt(e,o,c,d,k,v){const p=s("vue-plyr");return a(),l("div",null,[t(p,{options:e.options,class:"video"},{default:m(()=>[r("video",{controls:"",playsinline:"",preload:"metadata","data-poster":e.modelValue?.image_url},[r("source",{size:"1080",src:e.modelValue?.video_url,type:"video/mp4"},null,8,it)],8,nt)]),_:1},8,["options"])])}const rt=$(at,[["render",lt],["__scopeId","data-v-897d9fe0"]]),ct=g({name:"TaskPreview",components:{ElImage:me,CopyToClipboard:re,FontAwesomeIcon:A,ElAlert:ue,VideoPlayer:rt,ElTooltip:de,ElButton:L,ApiCodeButton:pe},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.pika?.application},config(){return this.$store.state.pika?.config},videos(){let e=[];const o=this.modelValue?.request?.action;return Array.isArray(this.modelValue?.response?.data)&&this.modelValue?.response?.data?.forEach(c=>{let d=c;o&&(d.action=o),e.push(d)}),e}},methods:{onDownload(e){console.log("on download"),window.open(e,"_blank")},onReload(e){const o=e.target,c=new URL(o.src),d=c.searchParams.get("retry");if(!d)c.searchParams.set("retry","1");else if(parseInt(d)<2)c.searchParams.set("retry",(parseInt(d)+1).toString());else return;o.src=c.toString()},onOpenVideo(e){window.open(e,"_blank")}}}),pt={class:"left"},dt={class:"main"},ut={class:"bot"},mt={class:"datetime"},ft={class:"info"},_t={key:0,class:"prompt mt-2"},ht={key:0},gt={key:1},$t={key:0,class:U({content:!0,failed:!0})},kt={class:"image-wrapper"},vt={key:0,class:U({operations:!0,"mt-2":!0})},bt={key:0,class:"description"},yt={class:"description"},wt={key:1,class:"description"},Vt={key:1,class:U({content:!0})},Et={class:"description"},It={class:"description"},St={key:0,class:"description"},Tt={class:"description"},Ct={key:2,class:U({content:!0})},Pt={class:"description"};function At(e,o,c,d,k,v){const p=s("el-image"),f=s("VideoPlayer"),i=s("el-button"),b=s("el-tooltip"),E=s("api-code-button"),u=s("font-awesome-icon"),I=s("copy-to-clipboard"),T=s("el-alert");return a(!0),l(S,null,C(e.videos,(y,q)=>(a(),l("div",{key:q,class:"preview"},[r("div",pt,[t(p,{src:"https://cdn.acedata.cloud/i80tgn.png",class:"avatar"})]),r("div",dt,[r("div",ut,[_(n(e.$t("pika.name.pikaBot"))+" ",1),r("span",mt,n(e.$dayjs.format(""+new Date(parseFloat((e.modelValue?.created_at||"").toString())*1e3))),1)]),r("div",ft,[e.modelValue?.request?.prompt?(a(),l("p",_t,[_(n(e.modelValue?.request?.prompt)+" ",1),e.modelValue?.response?h("",!0):(a(),l("span",ht," - ("+n(e.$t("pika.status.pending"))+") ",1)),y?.state==="processing"||y?.state==="pending"?(a(),l("span",gt," - ("+n(e.$t("pika.status.processing"))+") ",1)):h("",!0)])):h("",!0)]),e.modelValue?.response?.success===!0?(a(),l("div",$t,[r("div",kt,[t(f,{"model-value":y},null,8,["model-value"])]),y?(a(),l("div",vt,[t(b,{class:"box-item",effect:"dark",content:e.$t("pika.message.downloadVideo"),placement:"top-start"},{default:m(()=>[y?.video_url?(a(),w(i,{key:0,type:"info",size:"small",class:"btn-action",onClick:jt=>e.onDownload(y?.video_url)},{default:m(()=>[_(n(e.$t("pika.button.download")),1)]),_:1},8,["onClick"])):h("",!0)]),_:2},1032,["content"]),t(E,{path:"/pika/videos",body:e.modelValue?.request},null,8,["body"])])):h("",!0),t(T,{closable:!1,class:"mt-2 success"},{default:m(()=>[e.modelValue?.request?.model?(a(),l("p",bt,[t(u,{icon:"fa-solid fa-hashtag",class:"mr-1"}),_(" "+n(e.$t("pika.name.model"))+": "+n(e.modelValue?.request?.model),1)])):h("",!0),r("p",yt,[t(u,{icon:"fa-solid fa-magic",class:"mr-1"}),_(" "+n(e.$t("pika.name.taskId"))+": "+n(e.modelValue?.id)+" ",1),t(I,{content:e.modelValue?.id,class:"btn-copy"},null,8,["content"])]),e.modelValue?.elapsed?(a(),l("p",wt,[t(u,{icon:"fa-solid fa-clock",class:"mr-1"}),_(" "+n(e.$t("pika.name.elapsed"))+": "+n(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):h("",!0)]),_:1})])):h("",!0),e.modelValue?.response?.success===!1?(a(),l("div",Vt,[t(T,{closable:!1,class:"failure"},{template:m(()=>[t(u,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),_(" "+n(e.$t("pika.name.failure")),1)]),default:m(()=>[r("p",Et,[t(u,{icon:"fa-solid fa-magic",class:"mr-1"}),_(" "+n(e.$t("pika.name.taskId"))+": "+n(e.modelValue?.id)+" ",1),t(I,{content:e.modelValue?.id,class:"btn-copy"},null,8,["content"])]),r("p",It,[t(u,{icon:"fa-solid fa-circle-info",class:"mr-1"}),_(" "+n(e.$t("pika.name.failureReason"))+": "+n(e.modelValue?.response?.error?.message)+" ",1),t(I,{content:e.modelValue?.response?.error?.message,class:"btn-copy"},null,8,["content"])]),e.modelValue?.elapsed?(a(),l("p",St,[t(u,{icon:"fa-solid fa-clock",class:"mr-1"}),_(" "+n(e.$t("pika.name.elapsed"))+": "+n(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):h("",!0),r("p",Tt,[t(u,{icon:"fa-solid fa-hashtag",class:"mr-1"}),_(" "+n(e.$t("pika.name.traceId"))+": "+n(e.modelValue?.response?.trace_id)+" ",1),t(I,{content:e.modelValue?.response?.trace_id,class:"btn-copy"},null,8,["content"])])]),_:1})])):h("",!0),!e.modelValue?.response||y?.state==="processing"||y?.state==="pending"?(a(),l("div",Ct,[t(T,{closable:!1,class:"info"},{template:m(()=>[t(u,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),_(" "+n(e.$t("pika.name.failure")),1)]),default:m(()=>[r("p",Pt,[t(u,{icon:"fa-solid fa-magic",class:"mr-1"}),_(" "+n(e.$t("pika.name.taskId"))+": "+n(e.modelValue?.id)+" ",1),t(I,{content:e.modelValue?.id,class:"btn-copy"},null,8,["content"])])]),_:1})])):h("",!0)])]))),128)}const Lt=$(ct,[["render",At],["__scopeId","data-v-86bc86fb"]]),Ut=g({name:"RecentPanel",components:{TaskPreview:Lt,BotPlaceholder:fe,NoTasks:se,ScrollList:Q},props:{loading:{type:Boolean,default:!1}},emits:["reach-top"],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.pika?.tasks,items:this.$store.state.pika?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Rt={key:0},Gt={key:2,class:"w-full h-full flex items-center justify-center"};function Dt(e,o,c,d,k,v){const p=s("bot-placeholder"),f=s("task-preview"),i=s("scroll-list"),b=s("no-tasks");return a(),l(S,null,[e.tasks?.items===void 0?(a(),l("div",Rt,[t(p)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(a(),w(i,{key:1,ref:"scrollList",class:"tasks h-full w-full overflow-y-auto",loading:e.loading,onReachTop:o[0]||(o[0]=E=>e.$emit("reach-top"))},{default:m(()=>[(a(!0),l(S,null,C(e.tasks?.items,(E,u)=>(a(),w(f,{key:u,"model-value":E},null,8,["model-value"]))),128))]),_:1},8,["loading"])):h("",!0),e.tasks?.items?.length===0?(a(),l("div",Gt,[t(b)])):h("",!0)],64)}const Mt=$(Ut,[["render",Dt]]),qt=z("pika"),Ot=g({name:"PikaIndex",components:{ConfigPanel:st,Layout:ve,RecentPanel:Mt},inject:["initialized"],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.pika?.status?.getApplications===P.Request},tasksLoading(){return this.$store.state.pika?.status?.getTasks===P.Request||this.fetchingTasks},service(){return this.$store.state.pika.service},credential(){return this.$store.state.pika.credential},config(){return this.$store.state.pika.config},initializing(){return this.$store.state.pika.status.getApplications===P.Request},needApply(){return this.$store.state.pika.status.getApplications===P.Success&&!this.application},application(){return this.$store.state.pika.application},applications(){return this.$store.state.pika.applications},tasks(){return this.$store.state.pika.tasks}},watch:{tasks:{handler(e,o){e?.items?.length>o?.items?.length&&console.debug("new tasks detected")},deep:!0},initialized:{async handler(e){e&&(console.debug("layout initialized"),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await W({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("pika/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("pika/getApplications"),console.debug("end onGetApplication"),await this.onGetTasks()},onApply(){N.create({application:this.application}).then(({data:e})=>{this.application=e,V.success(this.$t("application.message.applySuccessfully"))}).catch(e=>{e?.response?.data?.code===le&&V.error(this.$t("application.message.alreadyApplied"))})},async onScrollDown(){await this.$nextTick();const 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);const{limit:o=5,createdAtMin:c,createdAtMax:d}=e||{};console.debug("limit",o,"createdAtMin",c,"createdAtMax",d),this.fetchingTasks=!0;try{await this.$store.dispatch("pika/getTasks",{limit:o,createdAtMin:c,createdAtMax:d})}finally{this.fetchingTasks=!1}},async onGenerate(){const e={...this.config,callback_url:qt},o=this.credential?.token;if(!o){console.error("no token specified");return}V.info(this.$t("pika.message.startingTask")),j("pika",F.generate(e,{token:o})).then(()=>{V.success(this.$t("pika.message.startTaskSuccess")),this.$store.commit("pika/setConfig",{config:void 0})}).catch(c=>{c?.response?.data?.error?.code===ie?V.error(this.$t("pika.message.usedUp")):V.error(this.$t("pika.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function Bt(e,o,c,d,k,v){const p=s("config-panel"),f=s("recent-panel"),i=s("layout");return a(),w(i,null,{config:m(()=>[t(p,{onGenerate:e.onGenerate},null,8,["onGenerate"])]),result:m(()=>[t(f,{ref:"recentPanel",class:"panel recent",loading:e.loadingMore,onReachTop:e.onReachTop},null,8,["loading","onReachTop"])]),_:1})}const Oo=$(Ot,[["render",Bt],["__scopeId","data-v-3cd7cf5b"]]);export{Oo as default};
|
|
1
|
+
import{F as A}from"./index.es-BeLOywfI.js";import{E as L}from"./index-BY9FLlvx.js";import{E as O}from"./index-DGVR6QBZ.js";import{d as g,H as l,E as r,z as R,C as t,y as m,D as s,q as a,F as n,O as S,N as C,x as w,I as _,J as h,Q as U}from"./vendor-vue-NSDaktjZ.js";import{H as $,bp as B,cs as j,aG as F,o as N,S as P,ct as z}from"./index-DiSidSvU.js";import{a as K,b as H,c as J}from"./pika-DpzVVVef.js";import{I as G,S as Q,l as W}from"./pagination-BQ6ALt71.js";import{E as X}from"./index-Dc0xaPg1.js";import{E as D,a as M}from"./index-CRWC8q75.js";import{a as Y,E as Z}from"./index-BQqSBNTv.js";import{p as x}from"./pasteUploadMixin-BurWbGNQ.js";import{I as ee}from"./ImagePreview-DXG-cniF.js";import{E as te}from"./index-DxWfjb_C.js";import{E as V}from"./index-ByWnkv1G.js";import{P as oe,N as se}from"./NoTasks-DHYh2L_b.js";import{C as ae}from"./Consumption-7qH37pE9.js";import{a as ne}from"./price-8kJQGF1-.js";import{b as ie,a as le}from"./errorCode-Cqj9Td_Z.js";import{C as re}from"./CopyToClipboard-wxqTxzCB.js";import{s as ce}from"./vue-plyr-BO2nlN4c.js";import{A as pe}from"./ApiCodeButton-dD8o0Cnu.js";import{E as de}from"./index-DlrvZGBU.js";import{E as ue}from"./index-D3m1f5QC.js";import{E as me}from"./index-BcB_-lzn.js";import{B as fe}from"./BotPlaceholder-Bue2f9Kq.js";import"./use-form-item-D7ZQ0uNO.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./highlight-BKO0nM6d.js";import"./index-BLjywj98.js";import"./vendor-highlight-lEWW1Jxd.js";import"./validator-C6X05_Cn.js";import"./index-D84FynKl.js";import"./index-CSP1FYs7.js";import"./typescript-BkLdnbkx.js";import"./strings-beZM2Y-f.js";import"./isEqual-Bit6excc.js";import"./_Uint8Array-C9GurXZS.js";import"./castArray-DFDDfxIX.js";import"./index-DhvHpkEZ.js";import"./index-ZPlTL2pP.js";import"./debounce-p4kYWNVH.js";import"./_baseIteratee-DRD8Id2G.js";import"./index-DkmVyT7W.js";import"./index-C0T1mBSZ.js";import"./_baseClone-CQPgJfCg.js";import"./_initCloneObject-DwJv9kbk.js";import"./index-1ILjlG8L.js";const _e=g({name:"LayoutPika",components:{ElDrawer:O,ElButton:L,FontAwesomeIcon:A},data(){return{drawer:!1}}}),he={class:"main flex flex-row flex-1"},ge={class:"config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},$e={class:"result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"};function ke(e,o,c,d,k,v){const p=s("font-awesome-icon"),f=s("el-button"),i=s("el-drawer");return a(),l("div",he,[r("div",ge,[R(e.$slots,"config",{},void 0,!0)]),r("div",$e,[R(e.$slots,"result",{},void 0,!0)]),t(f,{circle:"",class:"menu",onClick:o[0]||(o[0]=b=>e.drawer=!0)},{default:m(()=>[t(p,{icon:"fa-solid fa-magic"})]),_:1}),t(i,{modelValue:e.drawer,"onUpdate:modelValue":o[1]||(o[1]=b=>e.drawer=b),direction:"ltr","with-header":!1,size:"350px"},{default:m(()=>[R(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const ve=$(_e,[["render",ke],["__scopeId","data-v-10596416"]]),be=g({name:"IngredientsSelector",components:{ElSwitch:X,InfoIcon:G},computed:{value:{get(){return this.$store.state.pika?.config?.ingredients},set(e){console.debug("set ingredients",e),e||this.$store.commit("pika/setConfig",{...this.$store.state.pika?.config,ingredients:e,ingredients_mode:void 0,image_url:void 0}),this.$store.commit("pika/setConfig",{...this.$store.state.pika?.config,ingredients:e,model:"2.0"})}}},mounted(){this.value===void 0&&(this.value=K)}}),ye={class:"field"},we={class:"title font-bold"};function Ve(e,o,c,d,k,v){const p=s("el-switch"),f=s("info-icon");return a(),l("div",ye,[r("h2",we,n(e.$t("pika.name.ingredients")),1),t(p,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=i=>e.value=i),class:"value"},null,8,["modelValue"]),t(f,{content:e.$t("pika.description.ingredients"),class:"info"},null,8,["content"])])}const Ee=$(be,[["render",Ve],["__scopeId","data-v-17c0af5c"]]),Ie=g({name:"EffectSelector",components:{ElSelect:M,ElOption:D},data(){return{}},computed:{options(){return[{value:"Levitate",label:this.$t("pika.style.effect1")},{value:"Decapitate",label:this.$t("pika.style.effect2")},{value:"Eye-pop",label:this.$t("pika.style.effect3")},{value:"Ta-da",label:this.$t("pika.style.effect4")},{value:"Deflate",label:this.$t("pika.style.effect5")},{value:"Crumble",label:this.$t("pika.style.effect6")},{value:"Dissolve",label:this.$t("pika.style.effect7")},{value:"Squish",label:this.$t("pika.style.effect8")},{value:"Inflate",label:this.$t("pika.style.effect9")},{value:"Melt",label:this.$t("pika.style.effect10")},{value:"Cake-ify",label:this.$t("pika.style.effect11")},{value:"Crush",label:this.$t("pika.style.effect12")},{value:"Explode",label:this.$t("pika.style.effect13")}]},value:{get(){return this.$store.state.pika?.config?.effect},set(e){this.$store.commit("pika/setConfig",{...this.$store.state.pika?.config,effect:e})}}}}),Se={class:"field"},Te={class:"title font-bold"},Ce={class:"float-left"};function Pe(e,o,c,d,k,v){const p=s("el-option"),f=s("el-select");return a(),l("div",Se,[r("h2",Te,n(e.$t("pika.name.effect")),1),t(f,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=i=>e.value=i),class:"value",placeholder:e.$t("pika.placeholder.select"),clearable:""},{default:m(()=>[(a(!0),l(S,null,C(e.options,i=>(a(),w(p,{key:i.value,label:i.label,value:i.value},{default:m(()=>[r("span",Ce,n(i.label),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}const Ae=$(Ie,[["render",Pe],["__scopeId","data-v-d1c54475"]]),Le=g({name:"IngredientsModelSelector",components:{ElRadioButton:Z,ElRadioGroup:Y},data(){return{options:[{label:this.$t("pika.button.precise"),value:"precise"},{label:this.$t("pika.button.creative"),value:"creative"}]}},computed:{value:{get(){return this.$store.state.pika?.config?.ingredients_mode},set(e){this.$store.commit("pika/setConfig",{...this.$store.state.pika?.config,ingredients_mode:e})}}},mounted(){this.value||(this.value=H)}}),Ue={class:"field"},Re={class:"title font-bold"};function Ge(e,o,c,d,k,v){const p=s("el-radio-button"),f=s("el-radio-group");return a(),l("div",Ue,[r("h2",Re,n(e.$t("pika.name.ingredientsModel")),1),t(f,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=i=>e.value=i),class:"quality"},{default:m(()=>[(a(!0),l(S,null,C(e.options,i=>(a(),w(p,{key:i.value,label:i.value},{default:m(()=>[_(n(i.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])}const De=$(Le,[["render",Ge],["__scopeId","data-v-b72865fa"]]),Me=g({name:"ModelSelector",components:{ElSelect:M,ElOption:D},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{options:[{value:"2.0",label:"2.0"},{value:"1.5",label:"1.5"}]}},computed:{value:{get(){return this.$store.state.pika?.config?.model},set(e){this.$store.commit("pika/setConfig",{...this.$store.state.pika.config,model:e})}}},mounted(){this.value||(this.value=J)}}),qe={class:"field"},Oe={class:"title font-bold"};function Be(e,o,c,d,k,v){const p=s("el-option"),f=s("el-select");return a(),l("div",qe,[r("h2",Oe,n(e.$t("pika.name.model")),1),t(f,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=i=>e.value=i),class:"value",placeholder:e.$t("pika.placeholder.select")},{default:m(()=>[(a(!0),l(S,null,C(e.options,i=>(a(),w(p,{key:i.value,label:i.label,value:i.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}const je=$(Me,[["render",Be],["__scopeId","data-v-7b2e870a"]]),Fe=g({name:"ImageUrlInput",components:{ElUpload:te,ElButton:L,InfoIcon:G,ImagePreview:ee,FontAwesomeIcon:A},mixins:[x],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)},value:{get(){return this.$store.state.pika?.config?.image_url},set(){const e=this.urls?.[0];this.$store.commit("pika/setConfig",{...this.$store.state.pika?.config,image_url:e})}}},mounted(){this.value||(this.value=void 0),this.onSetStartImageUrl()},methods:{onExceed(){V.warning(this.$t("pika.message.uploadStartImageExceed"))},onError(){V.error(this.$t("pika.message.uploadStartImageError"))},async onRemove(){V.error(this.$t("pika.message.uploadStartImageError"))},onSetStartImageUrl(){this.$store.commit("pika/setConfig",{...this.$store.state.pika?.config,image_url:this.urls})},async onSuccess(){this.onSetStartImageUrl()}}}),Ne={class:"field"},ze={class:"title font-bold"},Ke={class:"upload-wrapper"};function He(e,o,c,d,k,v){const p=s("image-preview"),f=s("font-awesome-icon"),i=s("el-button"),b=s("el-upload"),E=s("info-icon");return a(),l("div",Ne,[r("h2",ze,n(e.$t("pika.name.imageUrl")),1),r("div",Ke,[t(b,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":o[0]||(o[0]=u=>e.fileList=u),accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",name:"file",class:"value upload-wrapper",limit:3,multiple:!0,"list-type":"picture",action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,"on-remove":e.onRemove,"on-success":e.onSuccess,headers:e.headers},{file:m(({file:u})=>[t(p,{url:u.url||u.response?.file_url,name:u.name,percentage:u.percentage,onRemove:I=>e.fileList.splice(e.fileList.indexOf(u),1)},null,8,["url","name","percentage","onRemove"])]),default:m(()=>[t(i,{size:"small",type:"primary",round:""},{default:m(()=>[t(f,{icon:"fa-solid fa-upload",class:"mr-1"}),_(" "+n(e.$t("pika.button.uploadImageUrl")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-remove","on-success","headers"])]),t(E,{content:e.$t("pika.description.imageUrl"),class:"info"},null,8,["content"])])}const Je=$(Fe,[["render",He],["__scopeId","data-v-a948772f"]]),Qe="",We=g({name:"PromptInput",components:{PromptTextarea:oe},computed:{prompt:{get(){return this.$store.state.pika?.config?.prompt},set(e){this.$store.commit("pika/setConfig",{...this.$store.state.pika?.config,prompt:e})}}},mounted(){this.prompt||(this.prompt=Qe)}});function Xe(e,o,c,d,k,v){const p=s("prompt-textarea");return a(),w(p,{modelValue:e.prompt,"onUpdate:modelValue":o[0]||(o[0]=f=>e.prompt=f),title:e.$t("pika.name.prompt"),info:e.$t("pika.description.prompt"),placeholder:e.$t("pika.placeholder.prompt")},null,8,["modelValue","title","info","placeholder"])}const Ye=$(We,[["render",Xe]]),Ze=g({name:"PresetPanel",components:{ImageUrlInput:Je,ElButton:L,FontAwesomeIcon:A,Consumption:ae,PromptInput:Ye,IngredientsSelector:Ee,IngredientsModelSelector:De,ModelSelector:je,EffectSelector:Ae},emits:["generate"],computed:{config(){return this.$store.state.pika?.config},consumption(){return ne(this.config,this.service?.cost)},service(){return this.$store.state.pika?.service}},methods:{onGenerate(){this.$emit("generate")}}}),xe={class:"flex flex-col h-full"},et={class:"flex-1 overflow-y-auto p-5"},tt={class:"flex flex-col items-center justify-center px-5 pb-5"};function ot(e,o,c,d,k,v){const p=s("prompt-input"),f=s("model-selector"),i=s("ingredients-selector"),b=s("effect-selector"),E=s("image-url-input"),u=s("ingredients-model-selector"),I=s("consumption"),T=s("font-awesome-icon"),y=s("el-button");return a(),l("div",xe,[r("div",et,[t(p,{class:"mb-4"}),t(f,{class:"mb-4"}),t(i,{class:"mb-4"}),t(b,{class:"mb-4"}),e.config?.ingredients?(a(),w(E,{key:0,class:"mb-4"})):h("",!0),e.config?.ingredients?(a(),w(u,{key:1,class:"mb-4"})):h("",!0)]),r("div",tt,[t(I,{value:e.consumption,service:e.service},null,8,["value","service"]),t(y,{type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:m(()=>[t(T,{icon:"fa-solid fa-magic",class:"mr-2"}),_(" "+n(e.$t("pika.button.generate")),1)]),_:1},8,["onClick"])])])}const st=$(Ze,[["render",ot]]),at=g({name:"VideoPlayer",components:{VuePlyr:ce},props:{modelValue:{type:Object,required:!0}},data(){return{options:{quality:{default:1080,options:[1080]}}}}}),nt=["data-poster"],it=["src"];function lt(e,o,c,d,k,v){const p=s("vue-plyr");return a(),l("div",null,[t(p,{options:e.options,class:"video"},{default:m(()=>[r("video",{controls:"",playsinline:"",preload:"metadata","data-poster":e.modelValue?.image_url},[r("source",{size:"1080",src:e.modelValue?.video_url,type:"video/mp4"},null,8,it)],8,nt)]),_:1},8,["options"])])}const rt=$(at,[["render",lt],["__scopeId","data-v-897d9fe0"]]),ct=g({name:"TaskPreview",components:{ElImage:me,CopyToClipboard:re,FontAwesomeIcon:A,ElAlert:ue,VideoPlayer:rt,ElTooltip:de,ElButton:L,ApiCodeButton:pe},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.pika?.application},config(){return this.$store.state.pika?.config},videos(){let e=[];const o=this.modelValue?.request?.action;return Array.isArray(this.modelValue?.response?.data)&&this.modelValue?.response?.data?.forEach(c=>{let d=c;o&&(d.action=o),e.push(d)}),e}},methods:{onDownload(e){console.log("on download"),window.open(e,"_blank")},onReload(e){const o=e.target,c=new URL(o.src),d=c.searchParams.get("retry");if(!d)c.searchParams.set("retry","1");else if(parseInt(d)<2)c.searchParams.set("retry",(parseInt(d)+1).toString());else return;o.src=c.toString()},onOpenVideo(e){window.open(e,"_blank")}}}),pt={class:"left"},dt={class:"main"},ut={class:"bot"},mt={class:"datetime"},ft={class:"info"},_t={key:0,class:"prompt mt-2"},ht={key:0},gt={key:1},$t={key:0,class:U({content:!0,failed:!0})},kt={class:"image-wrapper"},vt={key:0,class:U({operations:!0,"mt-2":!0})},bt={key:0,class:"description"},yt={class:"description"},wt={key:1,class:"description"},Vt={key:1,class:U({content:!0})},Et={class:"description"},It={class:"description"},St={key:0,class:"description"},Tt={class:"description"},Ct={key:2,class:U({content:!0})},Pt={class:"description"};function At(e,o,c,d,k,v){const p=s("el-image"),f=s("VideoPlayer"),i=s("el-button"),b=s("el-tooltip"),E=s("api-code-button"),u=s("font-awesome-icon"),I=s("copy-to-clipboard"),T=s("el-alert");return a(!0),l(S,null,C(e.videos,(y,q)=>(a(),l("div",{key:q,class:"preview"},[r("div",pt,[t(p,{src:"https://cdn.acedata.cloud/i80tgn.png",class:"avatar"})]),r("div",dt,[r("div",ut,[_(n(e.$t("pika.name.pikaBot"))+" ",1),r("span",mt,n(e.$dayjs.format(""+new Date(parseFloat((e.modelValue?.created_at||"").toString())*1e3))),1)]),r("div",ft,[e.modelValue?.request?.prompt?(a(),l("p",_t,[_(n(e.modelValue?.request?.prompt)+" ",1),e.modelValue?.response?h("",!0):(a(),l("span",ht," - ("+n(e.$t("pika.status.pending"))+") ",1)),y?.state==="processing"||y?.state==="pending"?(a(),l("span",gt," - ("+n(e.$t("pika.status.processing"))+") ",1)):h("",!0)])):h("",!0)]),e.modelValue?.response?.success===!0?(a(),l("div",$t,[r("div",kt,[t(f,{"model-value":y},null,8,["model-value"])]),y?(a(),l("div",vt,[t(b,{class:"box-item",effect:"dark",content:e.$t("pika.message.downloadVideo"),placement:"top-start"},{default:m(()=>[y?.video_url?(a(),w(i,{key:0,type:"info",size:"small",class:"btn-action",onClick:jt=>e.onDownload(y?.video_url)},{default:m(()=>[_(n(e.$t("pika.button.download")),1)]),_:1},8,["onClick"])):h("",!0)]),_:2},1032,["content"]),t(E,{path:"/pika/videos",body:e.modelValue?.request},null,8,["body"])])):h("",!0),t(T,{closable:!1,class:"mt-2 success"},{default:m(()=>[e.modelValue?.request?.model?(a(),l("p",bt,[t(u,{icon:"fa-solid fa-hashtag",class:"mr-1"}),_(" "+n(e.$t("pika.name.model"))+": "+n(e.modelValue?.request?.model),1)])):h("",!0),r("p",yt,[t(u,{icon:"fa-solid fa-magic",class:"mr-1"}),_(" "+n(e.$t("pika.name.taskId"))+": "+n(e.modelValue?.id)+" ",1),t(I,{content:e.modelValue?.id,class:"btn-copy"},null,8,["content"])]),e.modelValue?.elapsed?(a(),l("p",wt,[t(u,{icon:"fa-solid fa-clock",class:"mr-1"}),_(" "+n(e.$t("pika.name.elapsed"))+": "+n(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):h("",!0)]),_:1})])):h("",!0),e.modelValue?.response?.success===!1?(a(),l("div",Vt,[t(T,{closable:!1,class:"failure"},{template:m(()=>[t(u,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),_(" "+n(e.$t("pika.name.failure")),1)]),default:m(()=>[r("p",Et,[t(u,{icon:"fa-solid fa-magic",class:"mr-1"}),_(" "+n(e.$t("pika.name.taskId"))+": "+n(e.modelValue?.id)+" ",1),t(I,{content:e.modelValue?.id,class:"btn-copy"},null,8,["content"])]),r("p",It,[t(u,{icon:"fa-solid fa-circle-info",class:"mr-1"}),_(" "+n(e.$t("pika.name.failureReason"))+": "+n(e.modelValue?.response?.error?.message)+" ",1),t(I,{content:e.modelValue?.response?.error?.message,class:"btn-copy"},null,8,["content"])]),e.modelValue?.elapsed?(a(),l("p",St,[t(u,{icon:"fa-solid fa-clock",class:"mr-1"}),_(" "+n(e.$t("pika.name.elapsed"))+": "+n(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):h("",!0),r("p",Tt,[t(u,{icon:"fa-solid fa-hashtag",class:"mr-1"}),_(" "+n(e.$t("pika.name.traceId"))+": "+n(e.modelValue?.response?.trace_id)+" ",1),t(I,{content:e.modelValue?.response?.trace_id,class:"btn-copy"},null,8,["content"])])]),_:1})])):h("",!0),!e.modelValue?.response||y?.state==="processing"||y?.state==="pending"?(a(),l("div",Ct,[t(T,{closable:!1,class:"info"},{template:m(()=>[t(u,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),_(" "+n(e.$t("pika.name.failure")),1)]),default:m(()=>[r("p",Pt,[t(u,{icon:"fa-solid fa-magic",class:"mr-1"}),_(" "+n(e.$t("pika.name.taskId"))+": "+n(e.modelValue?.id)+" ",1),t(I,{content:e.modelValue?.id,class:"btn-copy"},null,8,["content"])])]),_:1})])):h("",!0)])]))),128)}const Lt=$(ct,[["render",At],["__scopeId","data-v-86bc86fb"]]),Ut=g({name:"RecentPanel",components:{TaskPreview:Lt,BotPlaceholder:fe,NoTasks:se,ScrollList:Q},props:{loading:{type:Boolean,default:!1}},emits:["reach-top"],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.pika?.tasks,items:this.$store.state.pika?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Rt={key:0},Gt={key:2,class:"w-full h-full flex items-center justify-center"};function Dt(e,o,c,d,k,v){const p=s("bot-placeholder"),f=s("task-preview"),i=s("scroll-list"),b=s("no-tasks");return a(),l(S,null,[e.tasks?.items===void 0?(a(),l("div",Rt,[t(p)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(a(),w(i,{key:1,ref:"scrollList",class:"tasks h-full w-full overflow-y-auto",loading:e.loading,onReachTop:o[0]||(o[0]=E=>e.$emit("reach-top"))},{default:m(()=>[(a(!0),l(S,null,C(e.tasks?.items,(E,u)=>(a(),w(f,{key:u,"model-value":E},null,8,["model-value"]))),128))]),_:1},8,["loading"])):h("",!0),e.tasks?.items?.length===0?(a(),l("div",Gt,[t(b)])):h("",!0)],64)}const Mt=$(Ut,[["render",Dt]]),qt=z("pika"),Ot=g({name:"PikaIndex",components:{ConfigPanel:st,Layout:ve,RecentPanel:Mt},inject:["initialized"],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.pika?.status?.getApplications===P.Request},tasksLoading(){return this.$store.state.pika?.status?.getTasks===P.Request||this.fetchingTasks},service(){return this.$store.state.pika.service},credential(){return this.$store.state.pika.credential},config(){return this.$store.state.pika.config},initializing(){return this.$store.state.pika.status.getApplications===P.Request},needApply(){return this.$store.state.pika.status.getApplications===P.Success&&!this.application},application(){return this.$store.state.pika.application},applications(){return this.$store.state.pika.applications},tasks(){return this.$store.state.pika.tasks}},watch:{tasks:{handler(e,o){e?.items?.length>o?.items?.length&&console.debug("new tasks detected")},deep:!0},initialized:{async handler(e){e&&(console.debug("layout initialized"),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await W({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("pika/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("pika/getApplications"),console.debug("end onGetApplication"),await this.onGetTasks()},onApply(){N.create({application:this.application}).then(({data:e})=>{this.application=e,V.success(this.$t("application.message.applySuccessfully"))}).catch(e=>{e?.response?.data?.code===le&&V.error(this.$t("application.message.alreadyApplied"))})},async onScrollDown(){await this.$nextTick();const 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);const{limit:o=5,createdAtMin:c,createdAtMax:d}=e||{};console.debug("limit",o,"createdAtMin",c,"createdAtMax",d),this.fetchingTasks=!0;try{await this.$store.dispatch("pika/getTasks",{limit:o,createdAtMin:c,createdAtMax:d})}finally{this.fetchingTasks=!1}},async onGenerate(){const e={...this.config,callback_url:qt},o=this.credential?.token;if(!o){console.error("no token specified");return}V.info(this.$t("pika.message.startingTask")),j("pika",F.generate(e,{token:o})).then(()=>{V.success(this.$t("pika.message.startTaskSuccess")),this.$store.commit("pika/setConfig",{config:void 0})}).catch(c=>{c?.response?.data?.error?.code===ie?V.error(this.$t("pika.message.usedUp")):V.error(this.$t("pika.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function Bt(e,o,c,d,k,v){const p=s("config-panel"),f=s("recent-panel"),i=s("layout");return a(),w(i,null,{config:m(()=>[t(p,{onGenerate:e.onGenerate},null,8,["onGenerate"])]),result:m(()=>[t(f,{ref:"recentPanel",class:"panel recent",loading:e.loadingMore,onReachTop:e.onReachTop},null,8,["loading","onReachTop"])]),_:1})}const Oo=$(Ot,[["render",Bt],["__scopeId","data-v-3cd7cf5b"]]);export{Oo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{at as _,H as g}from"./index-
|
|
1
|
+
import{at as _,H as g}from"./index-DiSidSvU.js";import{E as h}from"./index-BY9FLlvx.js";import{d as b,H as r,E as o,F as e,x as m,y as t,I as l,J as c,C as d,D as p,q as i}from"./vendor-vue-NSDaktjZ.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./use-form-item-D7ZQ0uNO.js";import"./index-BuyEbX8F.js";const f="3.35.0",v="https://cdn.acedata.cloud/2f29543715.apk",$="",w="",D=b({name:"DownloadIndex",components:{ElButton:h,QrCode:_},computed:{version(){return f},androidDownloadUrl(){return v},hasAndroidDownload(){return!0},iosDownloadUrl(){return $},iosFallbackUrl(){return w},hasIosDownload(){return!1}},methods:{openSupport(){window.open("https://platform.acedata.cloud/support","_blank")}}}),A={class:"download-page"},y={class:"container"},I={class:"hero-shell"},k={class:"hero-copy"},O={class:"subtitle"},S={class:"hero-tags"},U={class:"tag"},L={class:"tag"},N={class:"tag tag--soft"},C={class:"hero-actions"},E={class:"metrics"},B={class:"metric"},R={class:"metric"},z={class:"metric"},F={class:"hero-panels"},q={class:"panel panel--android"},V={class:"panel__head"},H={class:"status status--live"},M={class:"panel__text"},P={key:0,class:"qr-frame"},T={class:"panel__footer"},W={class:"panel__meta"},J={class:"panel panel--ios"},K={class:"panel__head"},Q={class:"status status--pending"},j={class:"panel__text"},G={class:"panel__footer panel__footer--stacked"},X={key:0,class:"button-group"},Y={class:"panel__meta"},Z={class:"advantage-grid"},x={class:"advantage-card"},oo={class:"advantage-card"},so={class:"advantage-card"},eo={class:"note"};function ao(s,a,no,to,lo,io){const n=p("el-button"),u=p("qr-code");return i(),r("div",A,[a[9]||(a[9]=o("div",{class:"ambient ambient--cyan"},null,-1)),a[10]||(a[10]=o("div",{class:"ambient ambient--gold"},null,-1)),o("div",y,[o("section",I,[o("div",k,[a[2]||(a[2]=o("p",{class:"eyebrow"},"AceData App",-1)),o("h1",null,e(s.$t("common.title.mobileApp")),1),o("p",O,e(s.$t("common.message.mobileAppDescription")),1),o("div",S,[o("span",U,e(s.$t("common.message.mobileAvailableNow")),1),o("span",L,"v"+e(s.version),1),o("span",N,e(s.$t("common.message.mobileSecureDelivery")),1)]),o("div",C,[s.hasAndroidDownload?(i(),m(n,{key:0,type:"primary",round:"",size:"large",tag:"a",href:s.androidDownloadUrl,target:"_blank"},{default:t(()=>[l(e(s.$t("common.button.downloadAndroid")),1)]),_:1},8,["href"])):c("",!0),d(n,{round:"",size:"large",class:"secondary-action",onClick:s.openSupport},{default:t(()=>[l(e(s.$t("common.nav.support")),1)]),_:1},8,["onClick"])]),o("div",E,[o("article",B,[a[0]||(a[0]=o("strong",null,"Android",-1)),o("span",null,e(s.$t("common.message.mobileDirectInstall")),1)]),o("article",R,[o("strong",null,"v"+e(s.version),1),o("span",null,e(s.$t("common.message.mobileLatestRelease")),1)]),o("article",z,[a[1]||(a[1]=o("strong",null,"AceData",-1)),o("span",null,e(s.$t("common.message.mobileSharedAccount")),1)])])]),o("div",F,[o("article",q,[o("div",V,[a[3]||(a[3]=o("span",{class:"platform-badge"},"Android",-1)),o("span",H,e(s.$t("common.message.mobileAvailableNow")),1)]),o("h2",null,e(s.$t("common.button.downloadAndroid")),1),o("p",M,e(s.$t("common.message.mobileAndroidHint")),1),s.hasAndroidDownload?(i(),r("div",P,[d(u,{value:s.androidDownloadUrl,width:176,height:176,class:"qr",type:"image/png",color:{dark:"#07253dff",light:"#ffffffff"}},null,8,["value"])])):c("",!0),o("div",T,[s.hasAndroidDownload?(i(),m(n,{key:0,type:"primary",round:"",size:"large",tag:"a",href:s.androidDownloadUrl,target:"_blank"},{default:t(()=>[l(e(s.$t("common.button.downloadAndroid")),1)]),_:1},8,["href"])):c("",!0),o("span",W,e(s.$t("common.message.mobileSecureDelivery")),1)])]),o("article",J,[o("div",K,[a[4]||(a[4]=o("span",{class:"platform-badge platform-badge--ios"},"iOS",-1)),o("span",Q,e(s.$t("common.message.mobileIosPending")),1)]),o("h2",null,e(s.$t("common.button.downloadIos")),1),o("p",j,e(s.hasIosDownload?s.$t("common.message.mobileIosHint"):s.$t("common.message.mobileIosPending")),1),a[5]||(a[5]=o("div",{class:"device-ghost"},[o("div",{class:"device-ghost__screen"},[o("span",null,"iOS"),o("small",null,"Signing in progress")])],-1)),o("div",G,[s.hasIosDownload?(i(),r("div",X,[d(n,{type:"primary",round:"",size:"large",tag:"a",href:s.iosDownloadUrl,target:"_blank"},{default:t(()=>[l(e(s.$t("common.button.installIos")),1)]),_:1},8,["href"]),d(n,{round:"",size:"large",tag:"a",href:s.iosFallbackUrl,target:"_blank"},{default:t(()=>[l(e(s.$t("common.button.downloadIos")),1)]),_:1},8,["href"])])):(i(),m(n,{key:1,round:"",size:"large",class:"secondary-action",onClick:s.openSupport},{default:t(()=>[l(e(s.$t("common.nav.support")),1)]),_:1},8,["onClick"])),o("span",Y,e(s.$t("common.message.mobileInstallNote")),1)])])])]),o("section",Z,[o("article",x,[a[6]||(a[6]=o("p",{class:"advantage-card__eyebrow"},"01",-1)),o("h3",null,e(s.$t("common.title.mobileFastAccess")),1),o("p",null,e(s.$t("common.message.mobileFastAccess")),1)]),o("article",oo,[a[7]||(a[7]=o("p",{class:"advantage-card__eyebrow"},"02",-1)),o("h3",null,e(s.$t("common.title.mobileTrustedRelease")),1),o("p",null,e(s.$t("common.message.mobileTrustedRelease")),1)]),o("article",so,[a[8]||(a[8]=o("p",{class:"advantage-card__eyebrow"},"03",-1)),o("h3",null,e(s.$t("common.title.mobileUnifiedExperience")),1),o("p",null,e(s.$t("common.message.mobileUnifiedExperience")),1)])]),o("section",eo,[o("p",null,e(s.$t("common.message.mobileInstallNote")),1)])])])}const bo=g(D,[["render",ao],["__scopeId","data-v-8e81a800"]]);export{bo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as L}from"./index.es-DkaS06k9.js";import{E as M}from"./index-BIYITIcQ.js";import{E as ce}from"./index-C7mr_FlY.js";import{d as b,H as m,E as i,z as N,C as n,y as f,D as o,q as l,F as r,x as C,O as V,N as T,Q as R,J as v,R as ve,I as w,M as be}from"./vendor-vue-NSDaktjZ.js";import{H as y,bp as K,ah as ye,I as we,cs as te,aI as oe,S as ne,ct as Ce}from"./index-BYllLVr5.js";import{a as Se,b as se,c as q,d as D,e as Ve,f as Ie,g as Te}from"./kling-DwJwIwVI.js";import{E as P,a as G}from"./index-BB8IU4AC.js";import{E as H}from"./index-DAuJS-Gl.js";import{E as S}from"./index-B9C3QmXP.js";import{I,S as Ee,l as Le}from"./pagination-DMcg_VSJ.js";import{p as W}from"./pasteUploadMixin-BurWbGNQ.js";import{I as O}from"./ImagePreview-EvK72jMd.js";import{E as J}from"./index-BEQGtLAt.js";import{E as j}from"./index-hO1QjxiB.js";import{C as de}from"./Consumption-BHLp19TR.js";import{E as me}from"./index-CEKCGr2W.js";import{E as ue}from"./index-CdhuTWNw.js";import{E as pe}from"./index-DCq7rnCm.js";import{P as Me,N as Re}from"./NoTasks-8MEigfee.js";import{E as ge}from"./index-CaBmSn29.js";import{a as fe}from"./price-CGbNB5nq.js";import{F as Ue}from"./FilePreview-Cccng5bk.js";import{E as Ae,a as De}from"./index-agKHxhiT.js";import{E as Pe,a as Ge}from"./index-BMrzZEO4.js";import{b as ie}from"./errorCode-Cqj9Td_Z.js";import{C as Ke}from"./CopyToClipboard-DYhphNXQ.js";import{V as Oe}from"./VideoPlayer-CndFbOvW.js";import{A as je}from"./ApiCodeButton-CkYl1m8R.js";import{E as Be}from"./index-DIv7I-iE.js";import{E as Ne}from"./index-byRx5hf4.js";import{B as ze}from"./BotPlaceholder-yR_kBFno.js";import"./use-form-item-DE6wXJCu.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./index-5zXswERx.js";import"./typescript-Bxp48IAw.js";import"./index-3EWFx-Vj.js";import"./strings-beZM2Y-f.js";import"./isEqual-CTU2BQwF.js";import"./_Uint8Array-BzP45VD9.js";import"./castArray-DtkWeMZp.js";import"./debounce-je8R6qMJ.js";import"./_baseIteratee-SNuyx3Mb.js";import"./index-D9l-HbDE.js";import"./validator-ugFyeEgc.js";import"./highlight-Vc3jp7ut.js";import"./index-BLjywj98.js";import"./vendor-highlight-lEWW1Jxd.js";import"./index-CBxkbXoj.js";import"./_baseClone-DNu4QAe9.js";import"./_initCloneObject-C0YmUjML.js";import"./index-Cu41y2Fl.js";import"./index-CaGN2hWU.js";import"./isPlainObject-CT9W9CoU.js";import"./vue-plyr-BO2nlN4c.js";import"./index-C7McF3Oe.js";const Fe=b({name:"LayoutKling",components:{ElDrawer:ce,ElButton:M,FontAwesomeIcon:L},data(){return{drawer:!1}}}),qe={class:"main flex flex-row flex-1 min-h-0"},He={class:"config w-[320px] flex-none h-full flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},We={class:"result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"};function Je(e,t,s,a,u,$){const d=o("font-awesome-icon"),p=o("el-button"),g=o("el-drawer");return l(),m("div",qe,[i("div",He,[N(e.$slots,"config",{},void 0,!0)]),i("div",We,[N(e.$slots,"result",{},void 0,!0)]),n(p,{circle:"",class:"menu",onClick:t[0]||(t[0]=c=>e.drawer=!0)},{default:f(()=>[n(d,{icon:"fa-solid fa-magic"})]),_:1}),n(g,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=c=>e.drawer=c),direction:"ltr","with-header":!1,size:"350px"},{default:f(()=>[N(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const Qe=y(Fe,[["render",Je],["__scopeId","data-v-be4bb0df"]]),Ye={text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};function Q(e,t,s){const a=t||"std",u=s??5;switch(e){case"kling-v1":return{text2video:!0,image2video:!0,endImage:u===5,audio:!1,motionControl:u===5};case"kling-v1-6":case"kling-v2-5-turbo":return{text2video:!0,image2video:!0,endImage:a==="pro",audio:!1,motionControl:!1};case"kling-v2-6":return{text2video:!0,image2video:!0,endImage:a==="pro",audio:a==="pro",motionControl:!1};case"kling-v2-master":case"kling-v2-1-master":return{text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};case"kling-v3":return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:a!=="4k"};case"kling-v3-omni":return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:!1};case"kling-video-o1":return{text2video:!0,image2video:!0,endImage:!0,audio:!1,motionControl:!1};default:return Ye}}function Y(e,t){if(!e)return[];const s=t.model??e.model,a=t.mode??e.mode,u=t.duration??e.duration;if(!s)return[];const $=Q(s,a,u),d=[];return e.end_image_url&&!$.endImage&&d.push({field:"end_image_url",i18nLabel:"kling.name.endImage"}),e.generate_audio&&!$.audio&&d.push({field:"generate_audio",i18nLabel:"kling.name.generateAudio"}),e.camera_control?.type&&(!$.motionControl||e.start_image_url)&&d.push({field:"camera_control",i18nLabel:"kling.name.cameraControl"}),d}function X(e,t){const s={...e};for(const a of t)a.field==="end_image_url"&&(s.end_image_url=void 0),a.field==="generate_audio"&&(s.generate_audio=!1),a.field==="camera_control"&&(s.camera_control=void 0);return s}const Xe=b({name:"ModelSelector",components:{ElSelect:G,ElOption:P},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-video-o1",label:"Video-o1"}]}},computed:{value(){return this.$store.state.kling?.config?.model}},mounted(){this.value||this.applyModel(Se)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{model:e});if(s.length===0){this.applyModel(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await H.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,model:e},s);this.$store.commit("kling/setConfig",u),S.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyModel(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,model:e})}}}),Ze={class:"field"},xe={class:"title font-bold"};function et(e,t,s,a,u,$){const d=o("el-option"),p=o("el-select");return l(),m("div",Ze,[i("h2",xe,r(e.$t("pika.name.model")),1),(l(),C(p,{key:e.revertKey,"model-value":e.value,class:"value",placeholder:e.$t("pika.placeholder.select"),onChange:e.onChange},{default:f(()=>[(l(!0),m(V,null,T(e.options,g=>(l(),C(d,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const tt=y(Xe,[["render",et],["__scopeId","data-v-04059875"]]),ot=b({name:"ModeSelector",components:{ElSelect:G,ElOption:P,InfoIcon:I},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 q.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(se)}},mounted(){this.value||this.applyMode(se)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{mode:e});if(s.length===0){this.applyMode(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await H.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,mode:e},s);this.$store.commit("kling/setConfig",u),S.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyMode(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,mode:e})}}}),nt={class:"field"},st={class:"header"},it={class:"title font-bold"},lt={key:0,class:"opt-tip"};function at(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-option"),g=o("el-select");return l(),m("div",nt,[i("div",st,[i("h2",it,r(e.$t("kling.name.mode")),1),n(d,{content:e.$t("kling.description.mode"),class:"info-icon"},null,8,["content"])]),(l(),C(g,{key:e.revertKey,"model-value":e.value,class:"value",placeholder:e.$t("kling.placeholder.select"),clearable:!0,onChange:e.onChange},{default:f(()=>[(l(!0),m(V,null,T(e.options,c=>(l(),C(p,{key:c.value,label:c.label,value:c.value,disabled:c.disabled},{default:f(()=>[i("span",{class:R({"opt-disabled":c.disabled})},r(c.label),3),c.disabled&&c.disabledReason?(l(),m("span",lt,r(c.disabledReason),1)):v("",!0)]),_:2},1032,["label","value","disabled"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const rt=y(ot,[["render",at],["__scopeId","data-v-9a8fa3c5"]]),ct=[3,5,8,10,12,15],dt=[5,10],mt=b({name:"DurationSelector",components:{ElSelect:G,ElOption:P,InfoIcon:I},data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},isV3Model(){return q.includes(this.selectedModel)},allowedDurations(){return this.isV3Model?ct:dt},value(){return this.$store.state.kling?.config?.duration??D},selectValue(){const e=this.allowedDurations;return e.includes(this.value)?this.value:e.includes(D)?D:e[0]}},watch:{isV3Model(){this.allowedDurations.includes(this.value)||this.applyDuration(D)}},mounted(){this.$store.state.kling?.config?.duration||this.applyDuration(D)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{duration:e});if(s.length===0){this.applyDuration(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await H.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,duration:e},s);this.$store.commit("kling/setConfig",u),S.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyDuration(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,duration:e})}}}),ut={class:"field"},pt={class:"control"},gt={class:"label"},ft={class:"title font-bold"};function ht(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-option"),g=o("el-select");return l(),m("div",ut,[i("div",pt,[i("div",gt,[i("h2",ft,r(e.$t("kling.name.duration")),1),n(d,{content:e.$t("kling.description.duration"),class:"info-icon ml-1"},null,8,["content"])]),(l(),C(g,{key:e.revertKey,"model-value":e.selectValue,class:"value",placeholder:e.$t("kling.placeholder.select"),onChange:e.onChange},{default:f(()=>[(l(!0),m(V,null,T(e.allowedDurations,c=>(l(),C(p,{key:c,label:`${c}s`,value:c},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])])}const _t=y(mt,[["render",ht],["__scopeId","data-v-5ae55e28"]]),$t=b({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||(this.value=Ve)}}),kt={class:"text-sm font-bold mb-2 block"},vt={class:"items"},bt=["onClick"],yt={class:"name"};function wt(e,t,s,a,u,$){return l(),m("div",null,[i("span",kt,r(e.$t("kling.name.ratio")),1),i("div",vt,[(l(!0),m(V,null,T(e.options,(d,p)=>(l(),m("div",{key:p,class:R({active:e.active===p,item:!0}),onClick:g=>e.value=d.value},[i("div",{class:R(["preview",d.label])},[i("div",{class:"rect",style:ve({width:d.width+"px",height:d.height+"px"})},null,4)],2),i("p",yt,r(d.label),1)],10,bt))),128))])])}const Ct=y($t,[["render",wt],["__scopeId","data-v-cdb14b2f"]]),St=b({name:"StartImage",components:{ElUpload:j,ElButton:M,ElTooltip:J,InfoIcon:I,FontAwesomeIcon:L,ImagePreview:O},mixins:[W],emits:["change"],data(){return{fileList:[],uploadUrl:K()+"/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(){}}},mounted(){this.value||(this.value=void 0),this.onSetStartImageUrl()},methods:{onExceed(){S.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){S.error(this.$t("kling.message.uploadReferencesError"))},onSetStartImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),Vt={class:"relative"},It={class:"flex justify-between"},Tt={class:"flex justify-start items-center"},Et={class:"text-sm font-bold"};function Lt(e,t,s,a,u,$){const d=o("info-icon"),p=o("image-preview"),g=o("font-awesome-icon"),c=o("el-button"),k=o("el-tooltip"),h=o("el-upload");return l(),m("div",Vt,[i("div",It,[i("div",Tt,[i("span",Et,r(e.$t("kling.name.startImage")),1),n(d,{content:e.$t("kling.description.uploadStartImage")},null,8,["content"])])]),n(h,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,disabled:e.reachedLimit,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:f(({file:_})=>[_.url&&_.percentage!==void 0?(l(),C(p,{key:0,url:_.url,name:_.name,percentage:_.percentage,onRemove:E=>e.fileList.splice(e.fileList.indexOf(_),1)},null,8,["url","name","percentage","onRemove"])):v("",!0)]),default:f(()=>[n(k,{content:e.$t("kling.message.uploadReferencesExceed"),disabled:!e.reachedLimit,placement:"top"},{default:f(()=>[i("span",null,[n(c,{round:"",type:"primary",size:"small",class:"btn btn-upload",disabled:e.reachedLimit},{default:f(()=>[n(g,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1},8,["disabled"])])]),_:1},8,["content","disabled"])]),_:1},8,["file-list","disabled","action","on-exceed","on-error","on-success","headers"])])}const Mt=y(St,[["render",Lt],["__scopeId","data-v-68cf38f5"]]),Rt=b({name:"EndImage",components:{ElUpload:j,ElButton:M,ElTooltip:J,ImagePreview:O,InfoIcon:I,FontAwesomeIcon:L},mixins:[W],data(){return{fileList:[],uploadUrl:K()+"/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 Q(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||(this.value=void 0),this.onSetEndImageUrl()},methods:{onBeforeUpload(){return this.endImageSupported?this.hasStartImage?!0:(S.warning(this.$t("kling.message.endImageRequiresStart")),!1):(S.warning(this.$t("kling.message.endImageNotSupported")),!1)},onExceed(){S.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){S.error(this.$t("kling.message.uploadReferencesError"))},onSetEndImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),Ut={class:"relative"},At={class:"flex justify-between"},Dt={class:"flex justify-start items-center"},Pt={class:"text-sm font-bold"};function Gt(e,t,s,a,u,$){const d=o("info-icon"),p=o("image-preview"),g=o("font-awesome-icon"),c=o("el-button"),k=o("el-tooltip"),h=o("el-upload");return l(),m("div",Ut,[i("div",At,[i("div",Dt,[i("span",Pt,r(e.$t("kling.name.endImage")),1),n(d,{content:e.$t("kling.description.uploadEndImage")},null,8,["content"])])]),n(h,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,disabled:e.uploadDisabled,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","before-upload":e.onBeforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:f(({file:_})=>[_.url&&_.percentage!==void 0?(l(),C(p,{key:0,url:_.url,name:_.name,percentage:_.percentage,onRemove:E=>e.fileList.splice(e.fileList.indexOf(_),1)},null,8,["url","name","percentage","onRemove"])):v("",!0)]),default:f(()=>[n(k,{content:e.uploadTooltip,disabled:!e.uploadDisabled,placement:"top"},{default:f(()=>[i("span",null,[n(c,{round:"",type:"primary",size:"small",class:"btn btn-upload",disabled:e.uploadDisabled},{default:f(()=>[n(g,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$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"])])}const Kt=y(Rt,[["render",Gt],["__scopeId","data-v-593c3bde"]]),Ot=b({name:"CfgScaleSelector",components:{ElSlider:ue,InfoIcon:I,ElInputNumber:me},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||(this.value=Ie)}}),jt={class:"flex justify-between"},Bt={class:"flex justify-start items-center"},Nt={class:"text-sm font-bold"},zt={class:"flex justify-end items-center"},Ft={class:"w-full"};function qt(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-input-number"),g=o("el-slider");return l(),m("div",null,[i("div",jt,[i("div",Bt,[i("span",Nt,r(e.$t("kling.name.cfgScale")),1),n(d,{content:e.$t("kling.description.cfgScale")},null,8,["content"])]),i("div",zt,[n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=c=>e.value=c),"controls-position":"right"},null,8,["modelValue"])])]),i("div",Ft,[n(g,{modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=c=>e.value=c),min:0,max:1,step:.1},null,8,["modelValue"])])])}const Ht=y(Ot,[["render",qt]]),Wt=b({name:"GenerateAudioSelector",components:{ElSwitch:pe,InfoIcon:I},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},selectedMode(){return this.$store.state.kling?.config?.mode||""},supported(){return!!(q.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??Te:!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})}}}),Jt={class:"relative"},Qt={class:"flex justify-between items-center"},Yt={class:"flex justify-start items-center"},Xt={class:"text-sm font-bold"};function Zt(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-switch");return l(),m("div",Jt,[i("div",Qt,[i("div",Yt,[i("span",Xt,r(e.$t("kling.name.generateAudio")),1),n(d,{content:e.tooltipContent},null,8,["content"])]),n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=g=>e.value=g),class:"value",disabled:!e.supported},null,8,["modelValue","disabled"])])])}const xt=y(Wt,[["render",Zt]]),eo=["horizontal","vertical","pan","tilt","roll","zoom"],to=b({name:"CameraControlSelector",components:{ElSelect:G,ElOption:P,ElSlider:ue,ElInputNumber:me,InfoIcon:I},data(){return{configKeys:eo}},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 Q(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){const t=this.$store.state.kling?.config||{};if(!e){const a={...t};delete a.camera_control,this.$store.commit("kling/setConfig",a);return}const s=e;this.$store.commit("kling/setConfig",{...t,camera_control:{type:s,config:s==="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){const s=this.$store.state.kling?.config||{},a=s.camera_control||{type:"simple"},u={...a.config||{}};t==null?delete u[e]:u[e]=t,this.$store.commit("kling/setConfig",{...s,camera_control:{...a,type:"simple",config:u}})},onSliderChange(e,t){this.writeConfig(e,t)},onNumberChange(e,t){this.writeConfig(e,t)}}}),oo={class:"field"},no={class:"header"},so={class:"text-sm font-bold"},io={key:0,class:"config-grid"},lo={class:"cfg-row-head"},ao={class:"cfg-name"};function ro(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-option"),g=o("el-select"),c=o("el-input-number"),k=o("el-slider");return l(),m("div",oo,[i("div",no,[i("span",so,r(e.$t("kling.name.cameraControl")),1),n(d,{content:e.tooltipContent},null,8,["content"])]),n(g,{modelValue:e.selectedTypeRaw,"onUpdate:modelValue":t[0]||(t[0]=h=>e.selectedTypeRaw=h),class:"value",placeholder:e.$t("kling.placeholder.cameraType"),clearable:!0,disabled:e.disabled},{default:f(()=>[(l(!0),m(V,null,T(e.typeOptions,h=>(l(),C(p,{key:h.value,label:h.label,value:h.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","disabled"]),e.selectedType==="simple"&&!e.disabled?(l(),m("div",io,[(l(!0),m(V,null,T(e.configKeys,h=>(l(),m("div",{key:h,class:"cfg-row"},[i("div",lo,[i("span",ao,r(e.$t(`kling.name.cc_${h}`)),1),n(c,{modelValue:e.configValues[h],"onUpdate:modelValue":_=>e.configValues[h]=_,min:-1,max:1,step:.1,precision:1,"controls-position":"right",size:"small",class:"cfg-num",onChange:_=>e.onNumberChange(h,_)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),n(k,{"model-value":e.configValues[h]??0,min:-1,max:1,step:.1,onInput:_=>e.onSliderChange(h,_)},null,8,["model-value","onInput"])]))),128))])):v("",!0)])}const co=y(to,[["render",ro],["__scopeId","data-v-cd896060"]]),he=[{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"]}],z=", ";function mo(e,t){const s=(e||"").trim();return s?s.includes(t)?s:`${s}${z}${t}`:t}function F(e,t){if(!e||!t)return e||"";const s=[`${t}${z}`,`${z}${t}`,t];let a=e;for(const u of s)if(a.includes(u)){a=a.replace(u,"");break}return a.replace(/(?:,\s*)+$/,"").replace(/^(?:,\s*)+/,"")}const uo=b({name:"InspirationPills",components:{FontAwesomeIcon:L},computed:{prompt(){return this.$store.state.kling?.config?.prompt||""},allChipTexts(){return he.flatMap(e=>e.chipKeys.map(t=>this.$t(`kling.inspiration.chip.${t}`)))},selected(){const e=this.prompt;if(!e)return[];const t=[];for(const s of this.allChipTexts){const a=e.indexOf(s);a!==-1&&t.push({text:s,idx:a})}return t.sort((s,a)=>s.idx-a.idx).map(s=>s.text)}},methods:{onRemove(e){const t=F(this.prompt,e);this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:t})}}}),po={key:0,class:"pills",role:"list"},go={class:"pill-text"},fo=["aria-label","onClick"];function ho(e,t,s,a,u,$){const d=o("font-awesome-icon");return e.selected.length>0?(l(),m("div",po,[(l(!0),m(V,null,T(e.selected,p=>(l(),m("div",{key:p,class:"pill",role:"listitem"},[i("span",go,r(p),1),i("button",{type:"button",class:"pill-remove","aria-label":e.$t("kling.inspiration.removeChip"),onClick:be(g=>e.onRemove(p),["stop"])},[n(d,{icon:"fa-solid fa-xmark"})],8,fo)]))),128))])):v("",!0)}const _o=y(uo,[["render",ho],["__scopeId","data-v-5fc4fa65"]]),$o="",ko=b({name:"PromptInput",components:{ElButton:M,FontAwesomeIcon:L,PromptTextarea:Me,InspirationPills:_o},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||(this.prompt=$o)}});function vo(e,t,s,a,u,$){const d=o("font-awesome-icon"),p=o("el-button"),g=o("inspiration-pills"),c=o("prompt-textarea");return l(),C(c,{modelValue:e.prompt,"onUpdate:modelValue":t[1]||(t[1]=k=>e.prompt=k),title:e.$t("kling.name.prompt"),info:e.$t("kling.description.prompt"),placeholder:e.$t("kling.placeholder.prompt")},{actions:f(()=>[n(p,{text:"",size:"small",class:"inspiration-btn",onClick:t[0]||(t[0]=k=>e.$emit("open-inspiration"))},{default:f(()=>[n(d,{icon:"fa-regular fa-lightbulb",class:"mr-1"}),w(" "+r(e.$t("kling.inspiration.openButton")),1)]),_:1})]),before:f(()=>[n(g)]),_:1},8,["modelValue","title","info","placeholder"])}const bo=y(ko,[["render",vo],["__scopeId","data-v-c01fc1a6"]]),yo="",wo=b({name:"NegativePromptInput",components:{ElInput:ge,InfoIcon:I},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||(this.prompt=yo)}}),Co={class:"field"},So={class:"box"},Vo={class:"title font-bold"};function Io(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-input");return l(),m("div",Co,[i("div",So,[i("h2",Vo,r(e.$t("kling.name.negativePrompt")),1),n(d,{content:e.$t("kling.description.negativePrompt"),class:"info"},null,8,["content"])]),n(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=g=>e.prompt=g),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.negativePrompt")},null,8,["modelValue","placeholder"])])}const To=y(wo,[["render",Io],["__scopeId","data-v-de98cf01"]]),Eo=b({name:"InspirationDrawer",components:{ElDrawer:ce,ElButton:M,FontAwesomeIcon:L},props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{groups:he,Close:ye}},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(t=>this.$t(`kling.inspiration.chip.${t}`)))},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(F(this.prompt,e)):this.setPrompt(mo(this.prompt,e)))},onClearSelected(){let e=this.prompt;for(const t of this.allChipTexts)for(;e.includes(t);)e=F(e,t);this.setPrompt(e)}}}),Lo={class:"drawer-content"},Mo={class:"drawer-header"},Ro={class:"title-row"},Uo={class:"title"},Ao={class:"hint"},Do={key:0,class:"selected-bar"},Po={class:"selected-text"},Go={class:"groups"},Ko={class:"group-title"},Oo={class:"chip-grid"},jo=["onClick"];function Bo(e,t,s,a,u,$){const d=o("font-awesome-icon"),p=o("el-button"),g=o("el-drawer");return l(),C(g,{modelValue:e.visible,"onUpdate:modelValue":t[1]||(t[1]=c=>e.visible=c),direction:"rtl","with-header":!1,size:e.drawerSize,"custom-class":"kling-inspiration-drawer","destroy-on-close":!1},{default:f(()=>[i("div",Lo,[i("div",Mo,[i("div",Ro,[n(d,{icon:"fa-regular fa-lightbulb",class:"mr-2"}),i("span",Uo,r(e.$t("kling.inspiration.title")),1)]),n(p,{text:"",icon:e.Close,class:"close-btn",onClick:t[0]||(t[0]=c=>e.visible=!1)},null,8,["icon"])]),i("div",Ao,r(e.$t("kling.inspiration.hint")),1),e.selectedCount>0?(l(),m("div",Do,[i("span",Po,r(e.$t("kling.inspiration.selectedSummary",{count:e.selectedCount})),1),n(p,{text:"",size:"small",class:"clear-btn",onClick:e.onClearSelected},{default:f(()=>[w(r(e.$t("kling.inspiration.clearSelected")),1)]),_:1},8,["onClick"])])):v("",!0),i("div",Go,[(l(!0),m(V,null,T(e.groups,c=>(l(),m("div",{key:c.groupKey,class:"group"},[i("div",Ko,r(e.$t(`kling.inspiration.group.${c.groupKey}`)),1),i("div",Oo,[(l(!0),m(V,null,T(c.chipKeys,k=>(l(),m("button",{key:k,type:"button",class:R({chip:!0,active:e.isSelected(e.chipText(k))}),onClick:h=>e.onToggle(e.chipText(k))},r(e.chipText(k)),11,jo))),128))])]))),128))])])]),_:1},8,["modelValue","size"])}const No=y(Eo,[["render",Bo],["__scopeId","data-v-7d457a69"]]),zo={"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-video-o1":"Video-o1"},Fo={std:"720p",pro:"1080p","4k":"4K"},qo=b({name:"SummaryChip",components:{FontAwesomeIcon:L},computed:{config(){return this.$store.state.kling?.config||{}},modelLabel(){const e=this.config?.model||"kling-v2-5-turbo";return zo[e]||e},durationLabel(){return`${this.config?.duration??5}s`},aspectRatio(){return this.config?.aspect_ratio||""},modeLabel(){const e=this.config?.mode||"std";return Fo[e]||e},generateAudio(){return!!this.config?.generate_audio}}}),Ho={class:"summary-chip"},Wo=["title"],Jo=["title"],Qo=["title"],Yo=["title"],Xo=["title"];function Zo(e,t,s,a,u,$){const d=o("font-awesome-icon");return l(),m("div",Ho,[i("span",{class:"part",title:e.$t("kling.name.model")},r(e.modelLabel),9,Wo),t[0]||(t[0]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.duration")},r(e.durationLabel),9,Jo),t[1]||(t[1]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.ratio")},r(e.aspectRatio||"16:9"),9,Qo),t[2]||(t[2]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.mode")},r(e.modeLabel),9,Yo),e.generateAudio?(l(),m("span",{key:0,class:"audio",title:e.$t("kling.name.generateAudio")},[n(d,{icon:"fa-solid fa-headphones"})],8,Xo)):v("",!0)])}const xo=y(qo,[["render",Zo],["__scopeId","data-v-418a6733"]]),en=b({name:"ConfigPanel",components:{ElButton:M,Consumption:de,FontAwesomeIcon:L,PromptInput:bo,NegativePromptInput:To,ModelSelector:tt,ModeSelector:rt,DurationSelector:_t,RatioSelector:Ct,StartImage:Mt,CfgScaleSelector:Ht,GenerateAudioSelector:xt,CameraControlSelector:co,InspirationDrawer:No,SummaryChip:xo,EndImage:Kt},emits:["generate"],data(){return{inspirationOpen:!1}},computed:{config(){return this.$store.state.kling?.config},consumption(){return fe(this.config,this.service?.cost)},service(){return this.$store.state.kling?.service}},methods:{onGenerate(){this.$emit("generate")}}}),tn={class:"flex flex-col h-full"},on={class:"flex-1 overflow-y-auto p-5"},nn={class:"flex flex-col items-center justify-center px-5 pb-5"};function sn(e,t,s,a,u,$){const d=o("prompt-input"),p=o("model-selector"),g=o("ratio-selector"),c=o("start-image"),k=o("end-image"),h=o("duration-selector"),_=o("mode-selector"),E=o("generate-audio-selector"),U=o("camera-control-selector"),A=o("cfg-scale-selector"),B=o("negative-prompt-input"),_e=o("summary-chip"),$e=o("consumption"),Z=o("font-awesome-icon"),x=o("el-button"),ke=o("inspiration-drawer");return l(),m("div",tn,[i("div",on,[n(d,{class:"mb-4",onOpenInspiration:t[0]||(t[0]=ee=>e.inspirationOpen=!0)}),n(p,{class:"mb-4"}),n(g,{class:"mb-4"}),n(c,{class:"mb-2"}),n(k,{class:"mb-2"}),n(h,{class:"mb-4"}),n(_,{class:"mb-4"}),n(E,{class:"mb-4"}),n(U,{class:"mb-4"}),n(A,{class:"mb-4"}),n(B,{class:"mb-4"})]),i("div",nn,[n(_e),n($e,{value:e.consumption,service:e.service},null,8,["value","service"]),e.config?.video_url!==void 0||e.config?.custom?(l(),C(x,{key:0,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:f(()=>[n(Z,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.extend")),1)]),_:1},8,["onClick"])):(l(),C(x,{key:1,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:f(()=>[n(Z,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.generate")),1)]),_:1},8,["onClick"]))]),n(ke,{modelValue:e.inspirationOpen,"onUpdate:modelValue":t[1]||(t[1]=ee=>e.inspirationOpen=ee)},null,8,["modelValue"])])}const ln=y(en,[["render",sn]]),an=b({name:"MotionImage",components:{ElUpload:j,ElButton:M,InfoIcon:I,FontAwesomeIcon:L,ImagePreview:O},mixins:[W],data(){return{fileList:[],uploadUrl:K()+"/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(){S.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){S.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(){const e=this.urls?.[0];this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,image_url:e})},async onSuccess(){this.onSetImageUrl()}}}),rn={class:"relative"},cn={class:"flex justify-between"},dn={class:"flex justify-start items-center"},mn={class:"text-sm font-bold"};function un(e,t,s,a,u,$){const d=o("info-icon"),p=o("image-preview"),g=o("font-awesome-icon"),c=o("el-button"),k=o("el-upload");return l(),m("div",rn,[i("div",cn,[i("div",dn,[i("span",mn,r(e.$t("kling.name.motionImage")),1),n(d,{content:e.$t("kling.description.motionImage")},null,8,["content"])])]),n(k,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=h=>e.fileList=h),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:f(({file:h})=>[h.url&&h.percentage!==void 0?(l(),C(p,{key:0,url:h.url,name:h.name,percentage:h.percentage,onRemove:_=>e.onRemove(h)},null,8,["url","name","percentage","onRemove"])):v("",!0)]),default:f(()=>[n(c,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:f(()=>[n(g,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])}const pn=y(an,[["render",un],["__scopeId","data-v-37d42da7"]]),gn=b({name:"MotionVideo",components:{ElUpload:j,ElButton:M,InfoIcon:I,FilePreview:Ue,FontAwesomeIcon:L},data(){return{fileList:[],uploadUrl:K()+"/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(){S.warning(this.$t("kling.message.uploadVideoExceed"))},onError(){S.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){const t=e.type==="video/mp4"||e.type==="video/quicktime",s=e.size/1024/1024<100;return t?s?!0:(S.error(this.$t("kling.message.uploadVideoSizeExceed")),!1):(S.error(this.$t("kling.message.uploadVideoTypeFailed")),!1)},onSetVideoUrl(){const e=this.urls?.[0];this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,video_url:e})},async onSuccess(){this.onSetVideoUrl()}}}),fn={class:"relative"},hn={class:"flex justify-between"},_n={class:"flex justify-start items-center"},$n={class:"text-sm font-bold"};function kn(e,t,s,a,u,$){const d=o("info-icon"),p=o("file-preview"),g=o("font-awesome-icon"),c=o("el-button"),k=o("el-upload");return l(),m("div",fn,[i("div",hn,[i("div",_n,[i("span",$n,r(e.$t("kling.name.motionVideo")),1),n(d,{content:e.$t("kling.description.motionVideo")},null,8,["content"])])]),n(k,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=h=>e.fileList=h),accept:".mp4,.mov",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"before-upload":e.beforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:f(({file:h})=>[h.percentage!==void 0?(l(),C(p,{key:0,url:h.url||h.response?.file_url,name:h.name,percentage:h.percentage,onRemove:_=>e.onRemove(h)},null,8,["url","name","percentage","onRemove"])):v("",!0)]),default:f(()=>[n(c,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:f(()=>[n(g,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadVideoUrl")),1)]),_:1})]),_:1},8,["file-list","action","before-upload","on-exceed","on-error","on-success","headers"])])}const vn=y(gn,[["render",kn],["__scopeId","data-v-5cf93212"]]),bn=b({name:"MotionPromptInput",components:{ElInput:ge,InfoIcon:I},computed:{prompt:{get(){return this.$store.state.kling?.motionConfig?.prompt||""},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,prompt:e})}}}}),yn={class:"field"},wn={class:"box"},Cn={class:"title font-bold"};function Sn(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-input");return l(),m("div",yn,[i("div",wn,[i("h2",Cn,r(e.$t("kling.name.motionPrompt")),1),n(d,{content:e.$t("kling.description.motionPrompt"),class:"info"},null,8,["content"])]),n(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=g=>e.prompt=g),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.motionPrompt")},null,8,["modelValue","placeholder"])])}const Vn=y(bn,[["render",Sn],["__scopeId","data-v-ca9fdbe5"]]),le="video",In=b({name:"CharacterOrientationSelector",components:{ElRadioGroup:De,ElRadioButton:Ae,InfoIcon:I},computed:{value:{get(){return this.$store.state.kling?.motionConfig?.character_orientation||le},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=le)}}),Tn={class:"field"},En={class:"header"},Ln={class:"text-sm font-bold"};function Mn(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-radio-button"),g=o("el-radio-group");return l(),m("div",Tn,[i("div",En,[i("span",Ln,r(e.$t("kling.name.characterOrientation")),1),n(d,{content:e.$t("kling.description.characterOrientation")},null,8,["content"])]),n(g,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=c=>e.value=c),size:"small",class:"value"},{default:f(()=>[n(p,{label:"image"},{default:f(()=>[w(r(e.$t("kling.name.orientationImage")),1)]),_:1}),n(p,{label:"video"},{default:f(()=>[w(r(e.$t("kling.name.orientationVideo")),1)]),_:1})]),_:1},8,["modelValue"])])}const Rn=y(In,[["render",Mn],["__scopeId","data-v-7a91195b"]]),ae="std",Un=b({name:"MotionModeSelector",components:{ElSelect:G,ElOption:P,InfoIcon:I},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||ae},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,mode:e})}}},mounted(){this.$store.state.kling?.motionConfig?.mode||(this.value=ae)}}),An={class:"field"},Dn={class:"header"},Pn={class:"title font-bold"};function Gn(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-option"),g=o("el-select");return l(),m("div",An,[i("div",Dn,[i("h2",Pn,r(e.$t("kling.name.mode")),1),n(d,{content:e.$t("kling.description.motionMode")},null,8,["content"])]),n(g,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=c=>e.value=c),class:"value",placeholder:e.$t("kling.placeholder.select")},{default:f(()=>[(l(!0),m(V,null,T(e.options,c=>(l(),C(p,{key:c.value,label:c.label,value:c.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}const Kn=y(Un,[["render",Gn],["__scopeId","data-v-1295688c"]]),On=b({name:"KeepOriginalSoundSelector",components:{ElSwitch:pe,InfoIcon:I},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"})}}}}),jn={class:"relative"},Bn={class:"flex justify-between items-center"},Nn={class:"flex justify-start items-center"},zn={class:"text-sm font-bold"};function Fn(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-switch");return l(),m("div",jn,[i("div",Bn,[i("div",Nn,[i("span",zn,r(e.$t("kling.name.keepOriginalSound")),1),n(d,{content:e.$t("kling.description.keepOriginalSound")},null,8,["content"])]),n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=g=>e.value=g)},null,8,["modelValue"])])])}const qn=y(On,[["render",Fn]]),Hn=b({name:"MotionPanel",components:{ElButton:M,FontAwesomeIcon:L,Consumption:de,MotionImage:pn,MotionVideo:vn,MotionPromptInput:Vn,CharacterOrientationSelector:Rn,MotionModeSelector:Kn,KeepOriginalSoundSelector:qn},emits:["generate"],computed:{motionConfig(){return this.$store.state.kling?.motionConfig},consumption(){return fe(this.motionConfig,this.service?.cost)},service(){return this.$store.state.kling?.service},canGenerate(){const e=this.motionConfig;return!!(e?.image_url&&e?.video_url)}},methods:{onGenerate(){this.$emit("generate")}}}),Wn={class:"flex flex-col h-full"},Jn={class:"flex-1 overflow-y-auto p-5"},Qn={class:"flex flex-col items-center justify-center px-5 pb-5"};function Yn(e,t,s,a,u,$){const d=o("motion-image"),p=o("motion-video"),g=o("motion-prompt-input"),c=o("character-orientation-selector"),k=o("motion-mode-selector"),h=o("keep-original-sound-selector"),_=o("consumption"),E=o("font-awesome-icon"),U=o("el-button");return l(),m("div",Wn,[i("div",Jn,[n(d,{class:"mb-3"}),n(p,{class:"mb-3"}),n(g,{class:"mb-4"}),n(c,{class:"mb-4"}),n(k,{class:"mb-4"}),n(h,{class:"mb-4"})]),i("div",Qn,[n(_,{value:e.consumption,service:e.service},null,8,["value","service"]),n(U,{type:"primary",class:"btn w-full",round:"",disabled:!e.canGenerate,onClick:e.onGenerate},{default:f(()=>[n(E,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.generateMotion")),1)]),_:1},8,["disabled","onClick"])])])}const Xn=y(Hn,[["render",Yn]]),Zn=b({name:"KlingTabSwitcher",components:{ElTabs:Ge,ElTabPane:Pe,ElTag:we},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")}]}},methods:{onUpdate(e){this.$emit("update:modelValue",e)}}}),xn=["title"],es={class:"text"};function ts(e,t,s,a,u,$){const d=o("el-tag"),p=o("el-tab-pane"),g=o("el-tabs");return l(),C(g,{"model-value":e.modelValue,class:"kling-tabs",stretch:"","onUpdate:modelValue":e.onUpdate},{default:f(()=>[(l(!0),m(V,null,T(e.tabs,c=>(l(),C(p,{key:c.value,name:c.value,disabled:c.disabled},{label:f(()=>[i("span",{class:"tab-label",title:c.disabled?c.disabledReason:void 0},[i("span",es,r(c.label),1),c.badge?(l(),C(d,{key:0,size:"small",type:"warning",class:"badge"},{default:f(()=>[w(r(c.badge),1)]),_:2},1024)):v("",!0)],8,xn)]),_:2},1032,["name","disabled"]))),128))]),_:1},8,["model-value","onUpdate:modelValue"])}const os=y(Zn,[["render",ts],["__scopeId","data-v-bf00c27e"]]),ns=b({name:"TaskPreview",components:{ElImage:Ne,CopyToClipboard:Ke,FontAwesomeIcon:L,ElAlert:Be,VideoPlayer:Oe,ElTooltip:J,ElButton:M,ImagePreview:O,ApiCodeButton:je},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.kling?.application},config(){return this.$store.state.kling?.config},referenceImages(){const e=[],t=this.modelValue?.request?.start_image_url,s=this.modelValue?.request?.end_image_url;return t&&e.push({url:t,name:"start-image"}),s&&e.push({url:s,name:"end-image"}),e}},methods:{onDownload(e,t){e.stopPropagation(),console.log("on download"),window.open(t,"_blank")},onOpenVideo(e){window.open(e,"_blank")}}}),ss={class:"preview"},is={class:"left"},ls={class:"main"},as={class:"bot"},rs={class:"datetime"},cs={class:"info"},ds={key:0,class:"flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto"},ms={key:1,class:"prompt mt-2"},us={key:0},ps={key:1},gs={key:0,class:R({content:!0,failed:!0})},fs={key:0,class:"mb-4"},hs={key:1,class:R({operations:!0,"mt-2":!0})},_s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},$s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ks={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},vs={key:1,class:R({content:!0})},bs={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ys={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ws={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Cs={key:1,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},Ss={key:2,class:R({content:!0})},Vs={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Is={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"};function Ts(e,t,s,a,u,$){const d=o("el-image"),p=o("image-preview"),g=o("video-player"),c=o("el-button"),k=o("el-tooltip"),h=o("api-code-button"),_=o("font-awesome-icon"),E=o("copy-to-clipboard"),U=o("el-alert");return l(),m("div",ss,[i("div",is,[n(d,{src:"https://cdn.acedata.cloud/qpbbbb.jpg",class:"avatar"})]),i("div",ls,[i("div",as,[w(r(e.$t("kling.name.klingBot"))+" ",1),i("span",rs,r(e.$dayjs.format(""+new Date(parseFloat((e.modelValue?.created_at||"").toString())*1e3))),1)]),i("div",cs,[e.referenceImages.length>0?(l(),m("div",ds,[(l(!0),m(V,null,T(e.referenceImages,(A,B)=>(l(),C(p,{key:B,url:A.url,name:A.name,closable:!1},null,8,["url","name"]))),128))])):v("",!0),e.modelValue?.request?.prompt?(l(),m("p",ms,[w(r(e.modelValue?.request?.prompt)+" ",1),e.modelValue?.response?v("",!0):(l(),m("span",us," - ("+r(e.$t("kling.status.pending"))+") ",1)),e.modelValue?.response?.state==="submitted"||e.modelValue?.response?.state==="processing"||e.modelValue?.response?.state==="pending"||e.modelValue?.response?.state==="completed"?(l(),m("span",ps," - ("+r(e.$t("kling.status.processing"))+") ",1)):v("",!0)])):v("",!0)]),e.modelValue?.response?.success===!0?(l(),m("div",gs,[e.modelValue?.response.video_url?(l(),m("div",fs,[n(g,{src:e.modelValue?.response.video_url},null,8,["src"])])):v("",!0),e.modelValue?.response.success?(l(),m("div",hs,[n(k,{class:"box-item",effect:"dark",content:e.$t("kling.message.downloadVideo"),placement:"top-start"},{default:f(()=>[e.modelValue?.response.video_url?(l(),C(c,{key:0,type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=A=>e.onDownload(A,e.modelValue?.response.video_url))},{default:f(()=>[w(r(e.$t("kling.button.download")),1)]),_:1})):v("",!0)]),_:1},8,["content"]),n(h,{path:"/kling/videos",body:e.modelValue?.request},null,8,["body"])])):v("",!0),n(U,{closable:!1,class:"mt-2 success"},{default:f(()=>[i("p",_s,[n(_,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.model"))+": "+r(e.modelValue?.request?.model),1)]),i("p",$s,[n(_,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(E,{content:e.modelValue?.id},null,8,["content"])]),e.modelValue?.elapsed?(l(),m("p",ks,[n(_,{icon:"fa-solid fa-clock",class:"mr-1"}),w(" "+r(e.$t("kling.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):v("",!0)]),_:1})])):v("",!0),e.modelValue?.response?.success===!1?(l(),m("div",vs,[n(U,{closable:!1,class:"failure"},{template:f(()=>[n(_,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),w(" "+r(e.$t("kling.name.failure")),1)]),default:f(()=>[i("p",bs,[n(_,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(E,{content:e.modelValue?.id},null,8,["content"])]),i("p",ys,[n(_,{icon:"fa-solid fa-circle-info",class:"mr-1"}),w(" "+r(e.$t("kling.name.failureReason"))+": "+r(e.modelValue?.response?.error?.message)+" ",1),n(E,{content:e.modelValue?.response?.error?.message},null,8,["content"])]),e.modelValue?.elapsed?(l(),m("p",ws,[n(_,{icon:"fa-solid fa-clock",class:"mr-1"}),w(" "+r(e.$t("kling.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):v("",!0),e.modelValue?.response?.trace_id?(l(),m("p",Cs,[n(_,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),n(E,{content:e.modelValue?.response?.trace_id},null,8,["content"])])):v("",!0)]),_:1})])):v("",!0),e.modelValue?.response?.success===void 0?(l(),m("div",Ss,[n(U,{closable:!1,class:"info"},{template:f(()=>[n(_,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),w(" "+r(e.$t("kling.name.failure")),1)]),default:f(()=>[i("p",Vs,[n(_,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(E,{content:e.modelValue?.id},null,8,["content"])]),e.modelValue?.response?.trace_id?(l(),m("p",Is,[n(_,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),n(E,{content:e.modelValue?.response?.trace_id},null,8,["content"])])):v("",!0)]),_:1})])):v("",!0)])])}const Es=y(ns,[["render",Ts],["__scopeId","data-v-4e0e18c9"]]),Ls=b({name:"RecentPanel",components:{TaskPreview:Es,NoTasks:Re,BotPlaceholder:ze,ScrollList:Ee},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?.()}}}),Ms={key:0},Rs={key:2,class:"w-full h-full flex items-center justify-center"};function Us(e,t,s,a,u,$){const d=o("bot-placeholder"),p=o("task-preview"),g=o("scroll-list"),c=o("no-tasks");return l(),m(V,null,[e.tasks?.items===void 0?(l(),m("div",Ms,[n(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(l(),C(g,{key:1,ref:"scrollList",class:"h-full w-full overflow-y-auto tasks",loading:e.loading,onReachTop:t[0]||(t[0]=k=>e.$emit("reach-top"))},{default:f(()=>[(l(!0),m(V,null,T(e.tasks?.items,k=>(l(),C(p,{key:k.id,"model-value":k},null,8,["model-value"]))),128))]),_:1},8,["loading"])):v("",!0),e.tasks?.items?.length===0?(l(),m("div",Rs,[n(c)])):v("",!0)],64)}const As=y(Ls,[["render",Us]]),re=Ce("kling"),Ds=b({name:"KlingIndex",components:{ConfigPanel:ln,MotionPanel:Xn,TabSwitcher:os,Layout:Qe,RecentPanel:As},inject:["initialized"],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.kling?.status?.getApplications===ne.Request},tasksLoading(){return this.$store.state.kling?.status?.getTasks===ne.Request||this.fetchingTasks},credential(){return this.$store.state.kling.credential},config(){return this.$store.state.kling.config},motionConfig(){return this.$store.state.kling.motionConfig},taskType(){return this.$store.state.kling.taskType||"videos"},tasks(){return this.$store.state.kling.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug("new tasks detected")},deep:!0},initialized:{async handler(e){e&&(console.debug("layout initialized"),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await Le({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();const 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);const{limit:t=5,createdAtMin:s,createdAtMax:a}=e||{};console.debug("limit",t,"createdAtMin",s,"createdAtMax",a),this.fetchingTasks=!0;try{await this.$store.dispatch("kling/getTasks",{limit:t,createdAtMin:s,createdAtMax:a})}finally{this.fetchingTasks=!1}},async onGenerate(){const{camera_control:e,...t}=this.config||{},s={...t,callback_url:re};if(!s.video_id&&!t.video_url&&!s.start_image_url&&s.end_image_url){S.warning(this.$t("kling.message.endImageRequiresStart"));return}s.action||(s.video_id||t.video_url?s.action="extend":s.start_image_url?s.action="image2video":s.action="text2video"),s.action==="text2video"&&s.end_image_url&&delete s.end_image_url,e?.type&&(s.camera_control={type:e.type,...e.type==="simple"&&e.config?{config:Object.fromEntries(Object.entries(e.config).filter(([,u])=>u!=null))}:{}});const a=this.credential?.token;if(!a){console.error("no token specified");return}S.info(this.$t("kling.message.startingTask")),te("kling",oe.generate(s,{token:a})).then(()=>{S.success(this.$t("kling.message.startTaskSuccess"))}).catch(u=>{u?.response?.data?.error?.code===ie?S.error(this.$t("kling.message.usedUp")):S.error(this.$t("kling.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},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(){const e=this.motionConfig||{};if(!e.image_url||!e.video_url){S.warning(this.$t("kling.message.motionMissingInputs"));return}const 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.prompt?{prompt:e.prompt}:{},callback_url:re},s=this.credential?.token;if(!s){console.error("no token specified");return}S.info(this.$t("kling.message.startingTask")),te("kling",oe.motion(t,{token:s})).then(()=>{S.success(this.$t("kling.message.startTaskSuccess"))}).catch(a=>{a?.response?.data?.error?.code===ie?S.error(this.$t("kling.message.usedUp")):S.error(this.$t("kling.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})}}}),Ps={class:"flex flex-col h-full"},Gs={class:"flex-1 min-h-0"};function Ks(e,t,s,a,u,$){const d=o("tab-switcher"),p=o("config-panel"),g=o("motion-panel"),c=o("recent-panel"),k=o("layout");return l(),C(k,null,{config:f(()=>[i("div",Ps,[n(d,{"model-value":e.taskType,"onUpdate:modelValue":e.onTabChange},null,8,["model-value","onUpdate:modelValue"]),i("div",Gs,[e.taskType==="videos"?(l(),C(p,{key:0,onGenerate:e.onGenerate},null,8,["onGenerate"])):e.taskType==="motion"?(l(),C(g,{key:1,onGenerate:e.onGenerateMotion},null,8,["onGenerate"])):v("",!0)])])]),result:f(()=>[n(c,{ref:"recentPanel",loading:e.loadingMore,onReachTop:e.onReachTop},null,8,["loading","onReachTop"])]),_:1})}const zi=y(Ds,[["render",Ks]]);export{zi as default};
|
|
1
|
+
import{F as L}from"./index.es-BeLOywfI.js";import{E as M}from"./index-BY9FLlvx.js";import{E as ce}from"./index-DGVR6QBZ.js";import{d as b,H as m,E as i,z as N,C as n,y as f,D as o,q as l,F as r,x as C,O as V,N as T,Q as R,J as v,R as ve,I as w,M as be}from"./vendor-vue-NSDaktjZ.js";import{H as y,bp as K,ah as ye,I as we,cs as te,aI as oe,S as ne,ct as Ce}from"./index-DiSidSvU.js";import{a as Se,b as se,c as q,d as D,e as Ve,f as Ie,g as Te}from"./kling-DwJwIwVI.js";import{E as P,a as G}from"./index-CRWC8q75.js";import{E as H}from"./index-CACIu92m.js";import{E as S}from"./index-ByWnkv1G.js";import{I,S as Ee,l as Le}from"./pagination-BQ6ALt71.js";import{p as W}from"./pasteUploadMixin-BurWbGNQ.js";import{I as O}from"./ImagePreview-DXG-cniF.js";import{E as J}from"./index-DlrvZGBU.js";import{E as j}from"./index-DxWfjb_C.js";import{C as de}from"./Consumption-7qH37pE9.js";import{E as me}from"./index-C4j1dHcE.js";import{E as ue}from"./index-DUeLs6nI.js";import{E as pe}from"./index-Dc0xaPg1.js";import{P as Me,N as Re}from"./NoTasks-DHYh2L_b.js";import{E as ge}from"./index-DhvHpkEZ.js";import{a as fe}from"./price-8kJQGF1-.js";import{F as Ue}from"./FilePreview-TstwU9At.js";import{E as Ae,a as De}from"./index-BQqSBNTv.js";import{E as Pe,a as Ge}from"./index-DY86lbEX.js";import{b as ie}from"./errorCode-Cqj9Td_Z.js";import{C as Ke}from"./CopyToClipboard-wxqTxzCB.js";import{V as Oe}from"./VideoPlayer-C1kby6jb.js";import{A as je}from"./ApiCodeButton-dD8o0Cnu.js";import{E as Be}from"./index-D3m1f5QC.js";import{E as Ne}from"./index-BcB_-lzn.js";import{B as ze}from"./BotPlaceholder-Bue2f9Kq.js";import"./use-form-item-D7ZQ0uNO.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./index-CSP1FYs7.js";import"./typescript-BkLdnbkx.js";import"./index-D84FynKl.js";import"./strings-beZM2Y-f.js";import"./isEqual-Bit6excc.js";import"./_Uint8Array-C9GurXZS.js";import"./castArray-DFDDfxIX.js";import"./debounce-p4kYWNVH.js";import"./_baseIteratee-DRD8Id2G.js";import"./index-DkmVyT7W.js";import"./validator-C6X05_Cn.js";import"./highlight-BKO0nM6d.js";import"./index-BLjywj98.js";import"./vendor-highlight-lEWW1Jxd.js";import"./index-C0T1mBSZ.js";import"./_baseClone-CQPgJfCg.js";import"./_initCloneObject-DwJv9kbk.js";import"./index-Cu41y2Fl.js";import"./index-ZPlTL2pP.js";import"./isPlainObject-i9qOcW_m.js";import"./vue-plyr-BO2nlN4c.js";import"./index-1ILjlG8L.js";const Fe=b({name:"LayoutKling",components:{ElDrawer:ce,ElButton:M,FontAwesomeIcon:L},data(){return{drawer:!1}}}),qe={class:"main flex flex-row flex-1 min-h-0"},He={class:"config w-[320px] flex-none h-full flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},We={class:"result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"};function Je(e,t,s,a,u,$){const d=o("font-awesome-icon"),p=o("el-button"),g=o("el-drawer");return l(),m("div",qe,[i("div",He,[N(e.$slots,"config",{},void 0,!0)]),i("div",We,[N(e.$slots,"result",{},void 0,!0)]),n(p,{circle:"",class:"menu",onClick:t[0]||(t[0]=c=>e.drawer=!0)},{default:f(()=>[n(d,{icon:"fa-solid fa-magic"})]),_:1}),n(g,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=c=>e.drawer=c),direction:"ltr","with-header":!1,size:"350px"},{default:f(()=>[N(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const Qe=y(Fe,[["render",Je],["__scopeId","data-v-be4bb0df"]]),Ye={text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};function Q(e,t,s){const a=t||"std",u=s??5;switch(e){case"kling-v1":return{text2video:!0,image2video:!0,endImage:u===5,audio:!1,motionControl:u===5};case"kling-v1-6":case"kling-v2-5-turbo":return{text2video:!0,image2video:!0,endImage:a==="pro",audio:!1,motionControl:!1};case"kling-v2-6":return{text2video:!0,image2video:!0,endImage:a==="pro",audio:a==="pro",motionControl:!1};case"kling-v2-master":case"kling-v2-1-master":return{text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};case"kling-v3":return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:a!=="4k"};case"kling-v3-omni":return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:!1};case"kling-video-o1":return{text2video:!0,image2video:!0,endImage:!0,audio:!1,motionControl:!1};default:return Ye}}function Y(e,t){if(!e)return[];const s=t.model??e.model,a=t.mode??e.mode,u=t.duration??e.duration;if(!s)return[];const $=Q(s,a,u),d=[];return e.end_image_url&&!$.endImage&&d.push({field:"end_image_url",i18nLabel:"kling.name.endImage"}),e.generate_audio&&!$.audio&&d.push({field:"generate_audio",i18nLabel:"kling.name.generateAudio"}),e.camera_control?.type&&(!$.motionControl||e.start_image_url)&&d.push({field:"camera_control",i18nLabel:"kling.name.cameraControl"}),d}function X(e,t){const s={...e};for(const a of t)a.field==="end_image_url"&&(s.end_image_url=void 0),a.field==="generate_audio"&&(s.generate_audio=!1),a.field==="camera_control"&&(s.camera_control=void 0);return s}const Xe=b({name:"ModelSelector",components:{ElSelect:G,ElOption:P},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-video-o1",label:"Video-o1"}]}},computed:{value(){return this.$store.state.kling?.config?.model}},mounted(){this.value||this.applyModel(Se)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{model:e});if(s.length===0){this.applyModel(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await H.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,model:e},s);this.$store.commit("kling/setConfig",u),S.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyModel(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,model:e})}}}),Ze={class:"field"},xe={class:"title font-bold"};function et(e,t,s,a,u,$){const d=o("el-option"),p=o("el-select");return l(),m("div",Ze,[i("h2",xe,r(e.$t("pika.name.model")),1),(l(),C(p,{key:e.revertKey,"model-value":e.value,class:"value",placeholder:e.$t("pika.placeholder.select"),onChange:e.onChange},{default:f(()=>[(l(!0),m(V,null,T(e.options,g=>(l(),C(d,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const tt=y(Xe,[["render",et],["__scopeId","data-v-04059875"]]),ot=b({name:"ModeSelector",components:{ElSelect:G,ElOption:P,InfoIcon:I},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 q.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(se)}},mounted(){this.value||this.applyMode(se)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{mode:e});if(s.length===0){this.applyMode(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await H.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,mode:e},s);this.$store.commit("kling/setConfig",u),S.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyMode(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,mode:e})}}}),nt={class:"field"},st={class:"header"},it={class:"title font-bold"},lt={key:0,class:"opt-tip"};function at(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-option"),g=o("el-select");return l(),m("div",nt,[i("div",st,[i("h2",it,r(e.$t("kling.name.mode")),1),n(d,{content:e.$t("kling.description.mode"),class:"info-icon"},null,8,["content"])]),(l(),C(g,{key:e.revertKey,"model-value":e.value,class:"value",placeholder:e.$t("kling.placeholder.select"),clearable:!0,onChange:e.onChange},{default:f(()=>[(l(!0),m(V,null,T(e.options,c=>(l(),C(p,{key:c.value,label:c.label,value:c.value,disabled:c.disabled},{default:f(()=>[i("span",{class:R({"opt-disabled":c.disabled})},r(c.label),3),c.disabled&&c.disabledReason?(l(),m("span",lt,r(c.disabledReason),1)):v("",!0)]),_:2},1032,["label","value","disabled"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const rt=y(ot,[["render",at],["__scopeId","data-v-9a8fa3c5"]]),ct=[3,5,8,10,12,15],dt=[5,10],mt=b({name:"DurationSelector",components:{ElSelect:G,ElOption:P,InfoIcon:I},data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},isV3Model(){return q.includes(this.selectedModel)},allowedDurations(){return this.isV3Model?ct:dt},value(){return this.$store.state.kling?.config?.duration??D},selectValue(){const e=this.allowedDurations;return e.includes(this.value)?this.value:e.includes(D)?D:e[0]}},watch:{isV3Model(){this.allowedDurations.includes(this.value)||this.applyDuration(D)}},mounted(){this.$store.state.kling?.config?.duration||this.applyDuration(D)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{duration:e});if(s.length===0){this.applyDuration(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await H.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,duration:e},s);this.$store.commit("kling/setConfig",u),S.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyDuration(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,duration:e})}}}),ut={class:"field"},pt={class:"control"},gt={class:"label"},ft={class:"title font-bold"};function ht(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-option"),g=o("el-select");return l(),m("div",ut,[i("div",pt,[i("div",gt,[i("h2",ft,r(e.$t("kling.name.duration")),1),n(d,{content:e.$t("kling.description.duration"),class:"info-icon ml-1"},null,8,["content"])]),(l(),C(g,{key:e.revertKey,"model-value":e.selectValue,class:"value",placeholder:e.$t("kling.placeholder.select"),onChange:e.onChange},{default:f(()=>[(l(!0),m(V,null,T(e.allowedDurations,c=>(l(),C(p,{key:c,label:`${c}s`,value:c},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])])}const _t=y(mt,[["render",ht],["__scopeId","data-v-5ae55e28"]]),$t=b({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||(this.value=Ve)}}),kt={class:"text-sm font-bold mb-2 block"},vt={class:"items"},bt=["onClick"],yt={class:"name"};function wt(e,t,s,a,u,$){return l(),m("div",null,[i("span",kt,r(e.$t("kling.name.ratio")),1),i("div",vt,[(l(!0),m(V,null,T(e.options,(d,p)=>(l(),m("div",{key:p,class:R({active:e.active===p,item:!0}),onClick:g=>e.value=d.value},[i("div",{class:R(["preview",d.label])},[i("div",{class:"rect",style:ve({width:d.width+"px",height:d.height+"px"})},null,4)],2),i("p",yt,r(d.label),1)],10,bt))),128))])])}const Ct=y($t,[["render",wt],["__scopeId","data-v-cdb14b2f"]]),St=b({name:"StartImage",components:{ElUpload:j,ElButton:M,ElTooltip:J,InfoIcon:I,FontAwesomeIcon:L,ImagePreview:O},mixins:[W],emits:["change"],data(){return{fileList:[],uploadUrl:K()+"/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(){}}},mounted(){this.value||(this.value=void 0),this.onSetStartImageUrl()},methods:{onExceed(){S.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){S.error(this.$t("kling.message.uploadReferencesError"))},onSetStartImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),Vt={class:"relative"},It={class:"flex justify-between"},Tt={class:"flex justify-start items-center"},Et={class:"text-sm font-bold"};function Lt(e,t,s,a,u,$){const d=o("info-icon"),p=o("image-preview"),g=o("font-awesome-icon"),c=o("el-button"),k=o("el-tooltip"),h=o("el-upload");return l(),m("div",Vt,[i("div",It,[i("div",Tt,[i("span",Et,r(e.$t("kling.name.startImage")),1),n(d,{content:e.$t("kling.description.uploadStartImage")},null,8,["content"])])]),n(h,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,disabled:e.reachedLimit,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:f(({file:_})=>[_.url&&_.percentage!==void 0?(l(),C(p,{key:0,url:_.url,name:_.name,percentage:_.percentage,onRemove:E=>e.fileList.splice(e.fileList.indexOf(_),1)},null,8,["url","name","percentage","onRemove"])):v("",!0)]),default:f(()=>[n(k,{content:e.$t("kling.message.uploadReferencesExceed"),disabled:!e.reachedLimit,placement:"top"},{default:f(()=>[i("span",null,[n(c,{round:"",type:"primary",size:"small",class:"btn btn-upload",disabled:e.reachedLimit},{default:f(()=>[n(g,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1},8,["disabled"])])]),_:1},8,["content","disabled"])]),_:1},8,["file-list","disabled","action","on-exceed","on-error","on-success","headers"])])}const Mt=y(St,[["render",Lt],["__scopeId","data-v-68cf38f5"]]),Rt=b({name:"EndImage",components:{ElUpload:j,ElButton:M,ElTooltip:J,ImagePreview:O,InfoIcon:I,FontAwesomeIcon:L},mixins:[W],data(){return{fileList:[],uploadUrl:K()+"/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 Q(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||(this.value=void 0),this.onSetEndImageUrl()},methods:{onBeforeUpload(){return this.endImageSupported?this.hasStartImage?!0:(S.warning(this.$t("kling.message.endImageRequiresStart")),!1):(S.warning(this.$t("kling.message.endImageNotSupported")),!1)},onExceed(){S.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){S.error(this.$t("kling.message.uploadReferencesError"))},onSetEndImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),Ut={class:"relative"},At={class:"flex justify-between"},Dt={class:"flex justify-start items-center"},Pt={class:"text-sm font-bold"};function Gt(e,t,s,a,u,$){const d=o("info-icon"),p=o("image-preview"),g=o("font-awesome-icon"),c=o("el-button"),k=o("el-tooltip"),h=o("el-upload");return l(),m("div",Ut,[i("div",At,[i("div",Dt,[i("span",Pt,r(e.$t("kling.name.endImage")),1),n(d,{content:e.$t("kling.description.uploadEndImage")},null,8,["content"])])]),n(h,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,disabled:e.uploadDisabled,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","before-upload":e.onBeforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:f(({file:_})=>[_.url&&_.percentage!==void 0?(l(),C(p,{key:0,url:_.url,name:_.name,percentage:_.percentage,onRemove:E=>e.fileList.splice(e.fileList.indexOf(_),1)},null,8,["url","name","percentage","onRemove"])):v("",!0)]),default:f(()=>[n(k,{content:e.uploadTooltip,disabled:!e.uploadDisabled,placement:"top"},{default:f(()=>[i("span",null,[n(c,{round:"",type:"primary",size:"small",class:"btn btn-upload",disabled:e.uploadDisabled},{default:f(()=>[n(g,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$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"])])}const Kt=y(Rt,[["render",Gt],["__scopeId","data-v-593c3bde"]]),Ot=b({name:"CfgScaleSelector",components:{ElSlider:ue,InfoIcon:I,ElInputNumber:me},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||(this.value=Ie)}}),jt={class:"flex justify-between"},Bt={class:"flex justify-start items-center"},Nt={class:"text-sm font-bold"},zt={class:"flex justify-end items-center"},Ft={class:"w-full"};function qt(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-input-number"),g=o("el-slider");return l(),m("div",null,[i("div",jt,[i("div",Bt,[i("span",Nt,r(e.$t("kling.name.cfgScale")),1),n(d,{content:e.$t("kling.description.cfgScale")},null,8,["content"])]),i("div",zt,[n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=c=>e.value=c),"controls-position":"right"},null,8,["modelValue"])])]),i("div",Ft,[n(g,{modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=c=>e.value=c),min:0,max:1,step:.1},null,8,["modelValue"])])])}const Ht=y(Ot,[["render",qt]]),Wt=b({name:"GenerateAudioSelector",components:{ElSwitch:pe,InfoIcon:I},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},selectedMode(){return this.$store.state.kling?.config?.mode||""},supported(){return!!(q.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??Te:!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})}}}),Jt={class:"relative"},Qt={class:"flex justify-between items-center"},Yt={class:"flex justify-start items-center"},Xt={class:"text-sm font-bold"};function Zt(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-switch");return l(),m("div",Jt,[i("div",Qt,[i("div",Yt,[i("span",Xt,r(e.$t("kling.name.generateAudio")),1),n(d,{content:e.tooltipContent},null,8,["content"])]),n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=g=>e.value=g),class:"value",disabled:!e.supported},null,8,["modelValue","disabled"])])])}const xt=y(Wt,[["render",Zt]]),eo=["horizontal","vertical","pan","tilt","roll","zoom"],to=b({name:"CameraControlSelector",components:{ElSelect:G,ElOption:P,ElSlider:ue,ElInputNumber:me,InfoIcon:I},data(){return{configKeys:eo}},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 Q(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){const t=this.$store.state.kling?.config||{};if(!e){const a={...t};delete a.camera_control,this.$store.commit("kling/setConfig",a);return}const s=e;this.$store.commit("kling/setConfig",{...t,camera_control:{type:s,config:s==="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){const s=this.$store.state.kling?.config||{},a=s.camera_control||{type:"simple"},u={...a.config||{}};t==null?delete u[e]:u[e]=t,this.$store.commit("kling/setConfig",{...s,camera_control:{...a,type:"simple",config:u}})},onSliderChange(e,t){this.writeConfig(e,t)},onNumberChange(e,t){this.writeConfig(e,t)}}}),oo={class:"field"},no={class:"header"},so={class:"text-sm font-bold"},io={key:0,class:"config-grid"},lo={class:"cfg-row-head"},ao={class:"cfg-name"};function ro(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-option"),g=o("el-select"),c=o("el-input-number"),k=o("el-slider");return l(),m("div",oo,[i("div",no,[i("span",so,r(e.$t("kling.name.cameraControl")),1),n(d,{content:e.tooltipContent},null,8,["content"])]),n(g,{modelValue:e.selectedTypeRaw,"onUpdate:modelValue":t[0]||(t[0]=h=>e.selectedTypeRaw=h),class:"value",placeholder:e.$t("kling.placeholder.cameraType"),clearable:!0,disabled:e.disabled},{default:f(()=>[(l(!0),m(V,null,T(e.typeOptions,h=>(l(),C(p,{key:h.value,label:h.label,value:h.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","disabled"]),e.selectedType==="simple"&&!e.disabled?(l(),m("div",io,[(l(!0),m(V,null,T(e.configKeys,h=>(l(),m("div",{key:h,class:"cfg-row"},[i("div",lo,[i("span",ao,r(e.$t(`kling.name.cc_${h}`)),1),n(c,{modelValue:e.configValues[h],"onUpdate:modelValue":_=>e.configValues[h]=_,min:-1,max:1,step:.1,precision:1,"controls-position":"right",size:"small",class:"cfg-num",onChange:_=>e.onNumberChange(h,_)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),n(k,{"model-value":e.configValues[h]??0,min:-1,max:1,step:.1,onInput:_=>e.onSliderChange(h,_)},null,8,["model-value","onInput"])]))),128))])):v("",!0)])}const co=y(to,[["render",ro],["__scopeId","data-v-cd896060"]]),he=[{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"]}],z=", ";function mo(e,t){const s=(e||"").trim();return s?s.includes(t)?s:`${s}${z}${t}`:t}function F(e,t){if(!e||!t)return e||"";const s=[`${t}${z}`,`${z}${t}`,t];let a=e;for(const u of s)if(a.includes(u)){a=a.replace(u,"");break}return a.replace(/(?:,\s*)+$/,"").replace(/^(?:,\s*)+/,"")}const uo=b({name:"InspirationPills",components:{FontAwesomeIcon:L},computed:{prompt(){return this.$store.state.kling?.config?.prompt||""},allChipTexts(){return he.flatMap(e=>e.chipKeys.map(t=>this.$t(`kling.inspiration.chip.${t}`)))},selected(){const e=this.prompt;if(!e)return[];const t=[];for(const s of this.allChipTexts){const a=e.indexOf(s);a!==-1&&t.push({text:s,idx:a})}return t.sort((s,a)=>s.idx-a.idx).map(s=>s.text)}},methods:{onRemove(e){const t=F(this.prompt,e);this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:t})}}}),po={key:0,class:"pills",role:"list"},go={class:"pill-text"},fo=["aria-label","onClick"];function ho(e,t,s,a,u,$){const d=o("font-awesome-icon");return e.selected.length>0?(l(),m("div",po,[(l(!0),m(V,null,T(e.selected,p=>(l(),m("div",{key:p,class:"pill",role:"listitem"},[i("span",go,r(p),1),i("button",{type:"button",class:"pill-remove","aria-label":e.$t("kling.inspiration.removeChip"),onClick:be(g=>e.onRemove(p),["stop"])},[n(d,{icon:"fa-solid fa-xmark"})],8,fo)]))),128))])):v("",!0)}const _o=y(uo,[["render",ho],["__scopeId","data-v-5fc4fa65"]]),$o="",ko=b({name:"PromptInput",components:{ElButton:M,FontAwesomeIcon:L,PromptTextarea:Me,InspirationPills:_o},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||(this.prompt=$o)}});function vo(e,t,s,a,u,$){const d=o("font-awesome-icon"),p=o("el-button"),g=o("inspiration-pills"),c=o("prompt-textarea");return l(),C(c,{modelValue:e.prompt,"onUpdate:modelValue":t[1]||(t[1]=k=>e.prompt=k),title:e.$t("kling.name.prompt"),info:e.$t("kling.description.prompt"),placeholder:e.$t("kling.placeholder.prompt")},{actions:f(()=>[n(p,{text:"",size:"small",class:"inspiration-btn",onClick:t[0]||(t[0]=k=>e.$emit("open-inspiration"))},{default:f(()=>[n(d,{icon:"fa-regular fa-lightbulb",class:"mr-1"}),w(" "+r(e.$t("kling.inspiration.openButton")),1)]),_:1})]),before:f(()=>[n(g)]),_:1},8,["modelValue","title","info","placeholder"])}const bo=y(ko,[["render",vo],["__scopeId","data-v-c01fc1a6"]]),yo="",wo=b({name:"NegativePromptInput",components:{ElInput:ge,InfoIcon:I},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||(this.prompt=yo)}}),Co={class:"field"},So={class:"box"},Vo={class:"title font-bold"};function Io(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-input");return l(),m("div",Co,[i("div",So,[i("h2",Vo,r(e.$t("kling.name.negativePrompt")),1),n(d,{content:e.$t("kling.description.negativePrompt"),class:"info"},null,8,["content"])]),n(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=g=>e.prompt=g),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.negativePrompt")},null,8,["modelValue","placeholder"])])}const To=y(wo,[["render",Io],["__scopeId","data-v-de98cf01"]]),Eo=b({name:"InspirationDrawer",components:{ElDrawer:ce,ElButton:M,FontAwesomeIcon:L},props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{groups:he,Close:ye}},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(t=>this.$t(`kling.inspiration.chip.${t}`)))},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(F(this.prompt,e)):this.setPrompt(mo(this.prompt,e)))},onClearSelected(){let e=this.prompt;for(const t of this.allChipTexts)for(;e.includes(t);)e=F(e,t);this.setPrompt(e)}}}),Lo={class:"drawer-content"},Mo={class:"drawer-header"},Ro={class:"title-row"},Uo={class:"title"},Ao={class:"hint"},Do={key:0,class:"selected-bar"},Po={class:"selected-text"},Go={class:"groups"},Ko={class:"group-title"},Oo={class:"chip-grid"},jo=["onClick"];function Bo(e,t,s,a,u,$){const d=o("font-awesome-icon"),p=o("el-button"),g=o("el-drawer");return l(),C(g,{modelValue:e.visible,"onUpdate:modelValue":t[1]||(t[1]=c=>e.visible=c),direction:"rtl","with-header":!1,size:e.drawerSize,"custom-class":"kling-inspiration-drawer","destroy-on-close":!1},{default:f(()=>[i("div",Lo,[i("div",Mo,[i("div",Ro,[n(d,{icon:"fa-regular fa-lightbulb",class:"mr-2"}),i("span",Uo,r(e.$t("kling.inspiration.title")),1)]),n(p,{text:"",icon:e.Close,class:"close-btn",onClick:t[0]||(t[0]=c=>e.visible=!1)},null,8,["icon"])]),i("div",Ao,r(e.$t("kling.inspiration.hint")),1),e.selectedCount>0?(l(),m("div",Do,[i("span",Po,r(e.$t("kling.inspiration.selectedSummary",{count:e.selectedCount})),1),n(p,{text:"",size:"small",class:"clear-btn",onClick:e.onClearSelected},{default:f(()=>[w(r(e.$t("kling.inspiration.clearSelected")),1)]),_:1},8,["onClick"])])):v("",!0),i("div",Go,[(l(!0),m(V,null,T(e.groups,c=>(l(),m("div",{key:c.groupKey,class:"group"},[i("div",Ko,r(e.$t(`kling.inspiration.group.${c.groupKey}`)),1),i("div",Oo,[(l(!0),m(V,null,T(c.chipKeys,k=>(l(),m("button",{key:k,type:"button",class:R({chip:!0,active:e.isSelected(e.chipText(k))}),onClick:h=>e.onToggle(e.chipText(k))},r(e.chipText(k)),11,jo))),128))])]))),128))])])]),_:1},8,["modelValue","size"])}const No=y(Eo,[["render",Bo],["__scopeId","data-v-7d457a69"]]),zo={"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-video-o1":"Video-o1"},Fo={std:"720p",pro:"1080p","4k":"4K"},qo=b({name:"SummaryChip",components:{FontAwesomeIcon:L},computed:{config(){return this.$store.state.kling?.config||{}},modelLabel(){const e=this.config?.model||"kling-v2-5-turbo";return zo[e]||e},durationLabel(){return`${this.config?.duration??5}s`},aspectRatio(){return this.config?.aspect_ratio||""},modeLabel(){const e=this.config?.mode||"std";return Fo[e]||e},generateAudio(){return!!this.config?.generate_audio}}}),Ho={class:"summary-chip"},Wo=["title"],Jo=["title"],Qo=["title"],Yo=["title"],Xo=["title"];function Zo(e,t,s,a,u,$){const d=o("font-awesome-icon");return l(),m("div",Ho,[i("span",{class:"part",title:e.$t("kling.name.model")},r(e.modelLabel),9,Wo),t[0]||(t[0]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.duration")},r(e.durationLabel),9,Jo),t[1]||(t[1]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.ratio")},r(e.aspectRatio||"16:9"),9,Qo),t[2]||(t[2]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.mode")},r(e.modeLabel),9,Yo),e.generateAudio?(l(),m("span",{key:0,class:"audio",title:e.$t("kling.name.generateAudio")},[n(d,{icon:"fa-solid fa-headphones"})],8,Xo)):v("",!0)])}const xo=y(qo,[["render",Zo],["__scopeId","data-v-418a6733"]]),en=b({name:"ConfigPanel",components:{ElButton:M,Consumption:de,FontAwesomeIcon:L,PromptInput:bo,NegativePromptInput:To,ModelSelector:tt,ModeSelector:rt,DurationSelector:_t,RatioSelector:Ct,StartImage:Mt,CfgScaleSelector:Ht,GenerateAudioSelector:xt,CameraControlSelector:co,InspirationDrawer:No,SummaryChip:xo,EndImage:Kt},emits:["generate"],data(){return{inspirationOpen:!1}},computed:{config(){return this.$store.state.kling?.config},consumption(){return fe(this.config,this.service?.cost)},service(){return this.$store.state.kling?.service}},methods:{onGenerate(){this.$emit("generate")}}}),tn={class:"flex flex-col h-full"},on={class:"flex-1 overflow-y-auto p-5"},nn={class:"flex flex-col items-center justify-center px-5 pb-5"};function sn(e,t,s,a,u,$){const d=o("prompt-input"),p=o("model-selector"),g=o("ratio-selector"),c=o("start-image"),k=o("end-image"),h=o("duration-selector"),_=o("mode-selector"),E=o("generate-audio-selector"),U=o("camera-control-selector"),A=o("cfg-scale-selector"),B=o("negative-prompt-input"),_e=o("summary-chip"),$e=o("consumption"),Z=o("font-awesome-icon"),x=o("el-button"),ke=o("inspiration-drawer");return l(),m("div",tn,[i("div",on,[n(d,{class:"mb-4",onOpenInspiration:t[0]||(t[0]=ee=>e.inspirationOpen=!0)}),n(p,{class:"mb-4"}),n(g,{class:"mb-4"}),n(c,{class:"mb-2"}),n(k,{class:"mb-2"}),n(h,{class:"mb-4"}),n(_,{class:"mb-4"}),n(E,{class:"mb-4"}),n(U,{class:"mb-4"}),n(A,{class:"mb-4"}),n(B,{class:"mb-4"})]),i("div",nn,[n(_e),n($e,{value:e.consumption,service:e.service},null,8,["value","service"]),e.config?.video_url!==void 0||e.config?.custom?(l(),C(x,{key:0,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:f(()=>[n(Z,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.extend")),1)]),_:1},8,["onClick"])):(l(),C(x,{key:1,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:f(()=>[n(Z,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.generate")),1)]),_:1},8,["onClick"]))]),n(ke,{modelValue:e.inspirationOpen,"onUpdate:modelValue":t[1]||(t[1]=ee=>e.inspirationOpen=ee)},null,8,["modelValue"])])}const ln=y(en,[["render",sn]]),an=b({name:"MotionImage",components:{ElUpload:j,ElButton:M,InfoIcon:I,FontAwesomeIcon:L,ImagePreview:O},mixins:[W],data(){return{fileList:[],uploadUrl:K()+"/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(){S.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){S.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(){const e=this.urls?.[0];this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,image_url:e})},async onSuccess(){this.onSetImageUrl()}}}),rn={class:"relative"},cn={class:"flex justify-between"},dn={class:"flex justify-start items-center"},mn={class:"text-sm font-bold"};function un(e,t,s,a,u,$){const d=o("info-icon"),p=o("image-preview"),g=o("font-awesome-icon"),c=o("el-button"),k=o("el-upload");return l(),m("div",rn,[i("div",cn,[i("div",dn,[i("span",mn,r(e.$t("kling.name.motionImage")),1),n(d,{content:e.$t("kling.description.motionImage")},null,8,["content"])])]),n(k,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=h=>e.fileList=h),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:f(({file:h})=>[h.url&&h.percentage!==void 0?(l(),C(p,{key:0,url:h.url,name:h.name,percentage:h.percentage,onRemove:_=>e.onRemove(h)},null,8,["url","name","percentage","onRemove"])):v("",!0)]),default:f(()=>[n(c,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:f(()=>[n(g,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])}const pn=y(an,[["render",un],["__scopeId","data-v-37d42da7"]]),gn=b({name:"MotionVideo",components:{ElUpload:j,ElButton:M,InfoIcon:I,FilePreview:Ue,FontAwesomeIcon:L},data(){return{fileList:[],uploadUrl:K()+"/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(){S.warning(this.$t("kling.message.uploadVideoExceed"))},onError(){S.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){const t=e.type==="video/mp4"||e.type==="video/quicktime",s=e.size/1024/1024<100;return t?s?!0:(S.error(this.$t("kling.message.uploadVideoSizeExceed")),!1):(S.error(this.$t("kling.message.uploadVideoTypeFailed")),!1)},onSetVideoUrl(){const e=this.urls?.[0];this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,video_url:e})},async onSuccess(){this.onSetVideoUrl()}}}),fn={class:"relative"},hn={class:"flex justify-between"},_n={class:"flex justify-start items-center"},$n={class:"text-sm font-bold"};function kn(e,t,s,a,u,$){const d=o("info-icon"),p=o("file-preview"),g=o("font-awesome-icon"),c=o("el-button"),k=o("el-upload");return l(),m("div",fn,[i("div",hn,[i("div",_n,[i("span",$n,r(e.$t("kling.name.motionVideo")),1),n(d,{content:e.$t("kling.description.motionVideo")},null,8,["content"])])]),n(k,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=h=>e.fileList=h),accept:".mp4,.mov",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"before-upload":e.beforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:f(({file:h})=>[h.percentage!==void 0?(l(),C(p,{key:0,url:h.url||h.response?.file_url,name:h.name,percentage:h.percentage,onRemove:_=>e.onRemove(h)},null,8,["url","name","percentage","onRemove"])):v("",!0)]),default:f(()=>[n(c,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:f(()=>[n(g,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadVideoUrl")),1)]),_:1})]),_:1},8,["file-list","action","before-upload","on-exceed","on-error","on-success","headers"])])}const vn=y(gn,[["render",kn],["__scopeId","data-v-5cf93212"]]),bn=b({name:"MotionPromptInput",components:{ElInput:ge,InfoIcon:I},computed:{prompt:{get(){return this.$store.state.kling?.motionConfig?.prompt||""},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,prompt:e})}}}}),yn={class:"field"},wn={class:"box"},Cn={class:"title font-bold"};function Sn(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-input");return l(),m("div",yn,[i("div",wn,[i("h2",Cn,r(e.$t("kling.name.motionPrompt")),1),n(d,{content:e.$t("kling.description.motionPrompt"),class:"info"},null,8,["content"])]),n(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=g=>e.prompt=g),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.motionPrompt")},null,8,["modelValue","placeholder"])])}const Vn=y(bn,[["render",Sn],["__scopeId","data-v-ca9fdbe5"]]),le="video",In=b({name:"CharacterOrientationSelector",components:{ElRadioGroup:De,ElRadioButton:Ae,InfoIcon:I},computed:{value:{get(){return this.$store.state.kling?.motionConfig?.character_orientation||le},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=le)}}),Tn={class:"field"},En={class:"header"},Ln={class:"text-sm font-bold"};function Mn(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-radio-button"),g=o("el-radio-group");return l(),m("div",Tn,[i("div",En,[i("span",Ln,r(e.$t("kling.name.characterOrientation")),1),n(d,{content:e.$t("kling.description.characterOrientation")},null,8,["content"])]),n(g,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=c=>e.value=c),size:"small",class:"value"},{default:f(()=>[n(p,{label:"image"},{default:f(()=>[w(r(e.$t("kling.name.orientationImage")),1)]),_:1}),n(p,{label:"video"},{default:f(()=>[w(r(e.$t("kling.name.orientationVideo")),1)]),_:1})]),_:1},8,["modelValue"])])}const Rn=y(In,[["render",Mn],["__scopeId","data-v-7a91195b"]]),ae="std",Un=b({name:"MotionModeSelector",components:{ElSelect:G,ElOption:P,InfoIcon:I},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||ae},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,mode:e})}}},mounted(){this.$store.state.kling?.motionConfig?.mode||(this.value=ae)}}),An={class:"field"},Dn={class:"header"},Pn={class:"title font-bold"};function Gn(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-option"),g=o("el-select");return l(),m("div",An,[i("div",Dn,[i("h2",Pn,r(e.$t("kling.name.mode")),1),n(d,{content:e.$t("kling.description.motionMode")},null,8,["content"])]),n(g,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=c=>e.value=c),class:"value",placeholder:e.$t("kling.placeholder.select")},{default:f(()=>[(l(!0),m(V,null,T(e.options,c=>(l(),C(p,{key:c.value,label:c.label,value:c.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}const Kn=y(Un,[["render",Gn],["__scopeId","data-v-1295688c"]]),On=b({name:"KeepOriginalSoundSelector",components:{ElSwitch:pe,InfoIcon:I},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"})}}}}),jn={class:"relative"},Bn={class:"flex justify-between items-center"},Nn={class:"flex justify-start items-center"},zn={class:"text-sm font-bold"};function Fn(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-switch");return l(),m("div",jn,[i("div",Bn,[i("div",Nn,[i("span",zn,r(e.$t("kling.name.keepOriginalSound")),1),n(d,{content:e.$t("kling.description.keepOriginalSound")},null,8,["content"])]),n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=g=>e.value=g)},null,8,["modelValue"])])])}const qn=y(On,[["render",Fn]]),Hn=b({name:"MotionPanel",components:{ElButton:M,FontAwesomeIcon:L,Consumption:de,MotionImage:pn,MotionVideo:vn,MotionPromptInput:Vn,CharacterOrientationSelector:Rn,MotionModeSelector:Kn,KeepOriginalSoundSelector:qn},emits:["generate"],computed:{motionConfig(){return this.$store.state.kling?.motionConfig},consumption(){return fe(this.motionConfig,this.service?.cost)},service(){return this.$store.state.kling?.service},canGenerate(){const e=this.motionConfig;return!!(e?.image_url&&e?.video_url)}},methods:{onGenerate(){this.$emit("generate")}}}),Wn={class:"flex flex-col h-full"},Jn={class:"flex-1 overflow-y-auto p-5"},Qn={class:"flex flex-col items-center justify-center px-5 pb-5"};function Yn(e,t,s,a,u,$){const d=o("motion-image"),p=o("motion-video"),g=o("motion-prompt-input"),c=o("character-orientation-selector"),k=o("motion-mode-selector"),h=o("keep-original-sound-selector"),_=o("consumption"),E=o("font-awesome-icon"),U=o("el-button");return l(),m("div",Wn,[i("div",Jn,[n(d,{class:"mb-3"}),n(p,{class:"mb-3"}),n(g,{class:"mb-4"}),n(c,{class:"mb-4"}),n(k,{class:"mb-4"}),n(h,{class:"mb-4"})]),i("div",Qn,[n(_,{value:e.consumption,service:e.service},null,8,["value","service"]),n(U,{type:"primary",class:"btn w-full",round:"",disabled:!e.canGenerate,onClick:e.onGenerate},{default:f(()=>[n(E,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.generateMotion")),1)]),_:1},8,["disabled","onClick"])])])}const Xn=y(Hn,[["render",Yn]]),Zn=b({name:"KlingTabSwitcher",components:{ElTabs:Ge,ElTabPane:Pe,ElTag:we},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")}]}},methods:{onUpdate(e){this.$emit("update:modelValue",e)}}}),xn=["title"],es={class:"text"};function ts(e,t,s,a,u,$){const d=o("el-tag"),p=o("el-tab-pane"),g=o("el-tabs");return l(),C(g,{"model-value":e.modelValue,class:"kling-tabs",stretch:"","onUpdate:modelValue":e.onUpdate},{default:f(()=>[(l(!0),m(V,null,T(e.tabs,c=>(l(),C(p,{key:c.value,name:c.value,disabled:c.disabled},{label:f(()=>[i("span",{class:"tab-label",title:c.disabled?c.disabledReason:void 0},[i("span",es,r(c.label),1),c.badge?(l(),C(d,{key:0,size:"small",type:"warning",class:"badge"},{default:f(()=>[w(r(c.badge),1)]),_:2},1024)):v("",!0)],8,xn)]),_:2},1032,["name","disabled"]))),128))]),_:1},8,["model-value","onUpdate:modelValue"])}const os=y(Zn,[["render",ts],["__scopeId","data-v-bf00c27e"]]),ns=b({name:"TaskPreview",components:{ElImage:Ne,CopyToClipboard:Ke,FontAwesomeIcon:L,ElAlert:Be,VideoPlayer:Oe,ElTooltip:J,ElButton:M,ImagePreview:O,ApiCodeButton:je},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.kling?.application},config(){return this.$store.state.kling?.config},referenceImages(){const e=[],t=this.modelValue?.request?.start_image_url,s=this.modelValue?.request?.end_image_url;return t&&e.push({url:t,name:"start-image"}),s&&e.push({url:s,name:"end-image"}),e}},methods:{onDownload(e,t){e.stopPropagation(),console.log("on download"),window.open(t,"_blank")},onOpenVideo(e){window.open(e,"_blank")}}}),ss={class:"preview"},is={class:"left"},ls={class:"main"},as={class:"bot"},rs={class:"datetime"},cs={class:"info"},ds={key:0,class:"flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto"},ms={key:1,class:"prompt mt-2"},us={key:0},ps={key:1},gs={key:0,class:R({content:!0,failed:!0})},fs={key:0,class:"mb-4"},hs={key:1,class:R({operations:!0,"mt-2":!0})},_s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},$s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ks={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},vs={key:1,class:R({content:!0})},bs={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ys={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ws={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Cs={key:1,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},Ss={key:2,class:R({content:!0})},Vs={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Is={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"};function Ts(e,t,s,a,u,$){const d=o("el-image"),p=o("image-preview"),g=o("video-player"),c=o("el-button"),k=o("el-tooltip"),h=o("api-code-button"),_=o("font-awesome-icon"),E=o("copy-to-clipboard"),U=o("el-alert");return l(),m("div",ss,[i("div",is,[n(d,{src:"https://cdn.acedata.cloud/qpbbbb.jpg",class:"avatar"})]),i("div",ls,[i("div",as,[w(r(e.$t("kling.name.klingBot"))+" ",1),i("span",rs,r(e.$dayjs.format(""+new Date(parseFloat((e.modelValue?.created_at||"").toString())*1e3))),1)]),i("div",cs,[e.referenceImages.length>0?(l(),m("div",ds,[(l(!0),m(V,null,T(e.referenceImages,(A,B)=>(l(),C(p,{key:B,url:A.url,name:A.name,closable:!1},null,8,["url","name"]))),128))])):v("",!0),e.modelValue?.request?.prompt?(l(),m("p",ms,[w(r(e.modelValue?.request?.prompt)+" ",1),e.modelValue?.response?v("",!0):(l(),m("span",us," - ("+r(e.$t("kling.status.pending"))+") ",1)),e.modelValue?.response?.state==="submitted"||e.modelValue?.response?.state==="processing"||e.modelValue?.response?.state==="pending"||e.modelValue?.response?.state==="completed"?(l(),m("span",ps," - ("+r(e.$t("kling.status.processing"))+") ",1)):v("",!0)])):v("",!0)]),e.modelValue?.response?.success===!0?(l(),m("div",gs,[e.modelValue?.response.video_url?(l(),m("div",fs,[n(g,{src:e.modelValue?.response.video_url},null,8,["src"])])):v("",!0),e.modelValue?.response.success?(l(),m("div",hs,[n(k,{class:"box-item",effect:"dark",content:e.$t("kling.message.downloadVideo"),placement:"top-start"},{default:f(()=>[e.modelValue?.response.video_url?(l(),C(c,{key:0,type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=A=>e.onDownload(A,e.modelValue?.response.video_url))},{default:f(()=>[w(r(e.$t("kling.button.download")),1)]),_:1})):v("",!0)]),_:1},8,["content"]),n(h,{path:"/kling/videos",body:e.modelValue?.request},null,8,["body"])])):v("",!0),n(U,{closable:!1,class:"mt-2 success"},{default:f(()=>[i("p",_s,[n(_,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.model"))+": "+r(e.modelValue?.request?.model),1)]),i("p",$s,[n(_,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(E,{content:e.modelValue?.id},null,8,["content"])]),e.modelValue?.elapsed?(l(),m("p",ks,[n(_,{icon:"fa-solid fa-clock",class:"mr-1"}),w(" "+r(e.$t("kling.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):v("",!0)]),_:1})])):v("",!0),e.modelValue?.response?.success===!1?(l(),m("div",vs,[n(U,{closable:!1,class:"failure"},{template:f(()=>[n(_,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),w(" "+r(e.$t("kling.name.failure")),1)]),default:f(()=>[i("p",bs,[n(_,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(E,{content:e.modelValue?.id},null,8,["content"])]),i("p",ys,[n(_,{icon:"fa-solid fa-circle-info",class:"mr-1"}),w(" "+r(e.$t("kling.name.failureReason"))+": "+r(e.modelValue?.response?.error?.message)+" ",1),n(E,{content:e.modelValue?.response?.error?.message},null,8,["content"])]),e.modelValue?.elapsed?(l(),m("p",ws,[n(_,{icon:"fa-solid fa-clock",class:"mr-1"}),w(" "+r(e.$t("kling.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):v("",!0),e.modelValue?.response?.trace_id?(l(),m("p",Cs,[n(_,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),n(E,{content:e.modelValue?.response?.trace_id},null,8,["content"])])):v("",!0)]),_:1})])):v("",!0),e.modelValue?.response?.success===void 0?(l(),m("div",Ss,[n(U,{closable:!1,class:"info"},{template:f(()=>[n(_,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),w(" "+r(e.$t("kling.name.failure")),1)]),default:f(()=>[i("p",Vs,[n(_,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(E,{content:e.modelValue?.id},null,8,["content"])]),e.modelValue?.response?.trace_id?(l(),m("p",Is,[n(_,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),n(E,{content:e.modelValue?.response?.trace_id},null,8,["content"])])):v("",!0)]),_:1})])):v("",!0)])])}const Es=y(ns,[["render",Ts],["__scopeId","data-v-4e0e18c9"]]),Ls=b({name:"RecentPanel",components:{TaskPreview:Es,NoTasks:Re,BotPlaceholder:ze,ScrollList:Ee},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?.()}}}),Ms={key:0},Rs={key:2,class:"w-full h-full flex items-center justify-center"};function Us(e,t,s,a,u,$){const d=o("bot-placeholder"),p=o("task-preview"),g=o("scroll-list"),c=o("no-tasks");return l(),m(V,null,[e.tasks?.items===void 0?(l(),m("div",Ms,[n(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(l(),C(g,{key:1,ref:"scrollList",class:"h-full w-full overflow-y-auto tasks",loading:e.loading,onReachTop:t[0]||(t[0]=k=>e.$emit("reach-top"))},{default:f(()=>[(l(!0),m(V,null,T(e.tasks?.items,k=>(l(),C(p,{key:k.id,"model-value":k},null,8,["model-value"]))),128))]),_:1},8,["loading"])):v("",!0),e.tasks?.items?.length===0?(l(),m("div",Rs,[n(c)])):v("",!0)],64)}const As=y(Ls,[["render",Us]]),re=Ce("kling"),Ds=b({name:"KlingIndex",components:{ConfigPanel:ln,MotionPanel:Xn,TabSwitcher:os,Layout:Qe,RecentPanel:As},inject:["initialized"],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.kling?.status?.getApplications===ne.Request},tasksLoading(){return this.$store.state.kling?.status?.getTasks===ne.Request||this.fetchingTasks},credential(){return this.$store.state.kling.credential},config(){return this.$store.state.kling.config},motionConfig(){return this.$store.state.kling.motionConfig},taskType(){return this.$store.state.kling.taskType||"videos"},tasks(){return this.$store.state.kling.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug("new tasks detected")},deep:!0},initialized:{async handler(e){e&&(console.debug("layout initialized"),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await Le({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();const 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);const{limit:t=5,createdAtMin:s,createdAtMax:a}=e||{};console.debug("limit",t,"createdAtMin",s,"createdAtMax",a),this.fetchingTasks=!0;try{await this.$store.dispatch("kling/getTasks",{limit:t,createdAtMin:s,createdAtMax:a})}finally{this.fetchingTasks=!1}},async onGenerate(){const{camera_control:e,...t}=this.config||{},s={...t,callback_url:re};if(!s.video_id&&!t.video_url&&!s.start_image_url&&s.end_image_url){S.warning(this.$t("kling.message.endImageRequiresStart"));return}s.action||(s.video_id||t.video_url?s.action="extend":s.start_image_url?s.action="image2video":s.action="text2video"),s.action==="text2video"&&s.end_image_url&&delete s.end_image_url,e?.type&&(s.camera_control={type:e.type,...e.type==="simple"&&e.config?{config:Object.fromEntries(Object.entries(e.config).filter(([,u])=>u!=null))}:{}});const a=this.credential?.token;if(!a){console.error("no token specified");return}S.info(this.$t("kling.message.startingTask")),te("kling",oe.generate(s,{token:a})).then(()=>{S.success(this.$t("kling.message.startTaskSuccess"))}).catch(u=>{u?.response?.data?.error?.code===ie?S.error(this.$t("kling.message.usedUp")):S.error(this.$t("kling.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},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(){const e=this.motionConfig||{};if(!e.image_url||!e.video_url){S.warning(this.$t("kling.message.motionMissingInputs"));return}const 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.prompt?{prompt:e.prompt}:{},callback_url:re},s=this.credential?.token;if(!s){console.error("no token specified");return}S.info(this.$t("kling.message.startingTask")),te("kling",oe.motion(t,{token:s})).then(()=>{S.success(this.$t("kling.message.startTaskSuccess"))}).catch(a=>{a?.response?.data?.error?.code===ie?S.error(this.$t("kling.message.usedUp")):S.error(this.$t("kling.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})}}}),Ps={class:"flex flex-col h-full"},Gs={class:"flex-1 min-h-0"};function Ks(e,t,s,a,u,$){const d=o("tab-switcher"),p=o("config-panel"),g=o("motion-panel"),c=o("recent-panel"),k=o("layout");return l(),C(k,null,{config:f(()=>[i("div",Ps,[n(d,{"model-value":e.taskType,"onUpdate:modelValue":e.onTabChange},null,8,["model-value","onUpdate:modelValue"]),i("div",Gs,[e.taskType==="videos"?(l(),C(p,{key:0,onGenerate:e.onGenerate},null,8,["onGenerate"])):e.taskType==="motion"?(l(),C(g,{key:1,onGenerate:e.onGenerateMotion},null,8,["onGenerate"])):v("",!0)])])]),result:f(()=>[n(c,{ref:"recentPanel",loading:e.loadingMore,onReachTop:e.onReachTop},null,8,["loading","onReachTop"])]),_:1})}const zi=y(Ds,[["render",Ks]]);export{zi as default};
|