@acedatacloud/nexior 3.360.0 → 3.361.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-Dh0e3VYw.js → ApiCodeButton-BA7ubKjq.js} +1 -1
- package/dist/assets/{ApiCodeDialog-DpBy84t3.js → ApiCodeDialog-S6KhbKGC.js} +2 -2
- package/dist/assets/{Artifacts-BmyA60t9.js → Artifacts-6i2WfKet.js} +1 -1
- package/dist/assets/{AskUserQuestionCard-B5MKrPzt.js → AskUserQuestionCard-Bojjb9xA.js} +1 -1
- package/dist/assets/{AudioPreview-BGWgOrNN.js → AudioPreview-hNyLEGK1.js} +1 -1
- package/dist/assets/{Auth-xS-EuHJA.js → Auth-DuKmlnO_.js} +1 -1
- package/dist/assets/{Bare-D71gSqKE.js → Bare-BRPmoVxo.js} +1 -1
- package/dist/assets/{BotPlaceholder-D55egP4z.js → BotPlaceholder-CLTFqIYe.js} +1 -1
- package/dist/assets/{BottomFooter-DA9b04xf.js → BottomFooter-CjTWNxxs.js} +1 -1
- package/dist/assets/{BrowseConnectors-D8Db2Sau.js → BrowseConnectors-BhEhsECv.js} +1 -1
- package/dist/assets/{BrowserPairingDialog-XYsGv__q.js → BrowserPairingDialog-DdrMJ6S2.js} +1 -1
- package/dist/assets/{Callback-hNDdYeqS.js → Callback-BxY_Q9F4.js} +1 -1
- package/dist/assets/{CodeSnippet-Ty_4_CTP.js → CodeSnippet-CB615CO7.js} +1 -1
- package/dist/assets/{Console-DjOjxwZQ.js → Console-FqfYZT4L.js} +1 -1
- package/dist/assets/{Consumption-DBu0ktO9.js → Consumption-RQBkhx2x.js} +1 -1
- package/dist/assets/Conversation-BZZ_gr0U.js +1 -0
- package/dist/assets/{Conversation-DsJRUcLN.js → Conversation-RgYBJJoR.js} +1 -1
- package/dist/assets/{CopyToClipboard-CGwG-ynF.js → CopyToClipboard-CgR-ErWz.js} +1 -1
- package/dist/assets/Detail-BqqqanQ8.js +2 -0
- package/dist/assets/Extra-DqRK8twx.js +1 -0
- package/dist/assets/{FilePreview-CNpEeq4z.js → FilePreview-BLtM6V7w.js} +1 -1
- package/dist/assets/{Hailuo-Bu85S4kU.js → Hailuo-CQkdh_O2.js} +1 -1
- package/dist/assets/{History-CV0kfdmB.js → History-BevD_27t.js} +1 -1
- package/dist/assets/{ImagePreview-COEccbcx.js → ImagePreview-B6uigACk.js} +1 -1
- package/dist/assets/{ImageWrapper-wYnQ-6uQ.js → ImageWrapper-XqGyA-WJ.js} +1 -1
- package/dist/assets/{Index-D14ip-eO.css → Index-4SF6bXRE.css} +1 -1
- package/dist/assets/{Index-vwDzZvRr.js → Index-B4QYPzlU.js} +1 -1
- package/dist/assets/{Index-BVLVBIEM.js → Index-BAVNlBsR.js} +2 -2
- package/dist/assets/Index-BJ5-bopy.js +1 -0
- package/dist/assets/{Index-BU5zipXg.js → Index-BhNNc9TL.js} +1 -1
- package/dist/assets/{Index-kkW-6KV5.css → Index-BxvJoufB.css} +1 -1
- package/dist/assets/Index-BzlTnuL2.js +1 -0
- package/dist/assets/Index-C5rfeJWr.js +1 -0
- package/dist/assets/{Index-CTP6z3HC.js → Index-CFclOrgQ.js} +1 -1
- package/dist/assets/{Index-Ctaf6i3t.js → Index-CI5vWS_f.js} +1 -1
- package/dist/assets/Index-CMwV_Stu.js +1 -0
- package/dist/assets/{Index-sP0w7E5Y.css → Index-CS3pCCuq.css} +1 -1
- package/dist/assets/Index-CSpFDfvC.js +1 -0
- package/dist/assets/Index-CXe69mqQ.js +1 -0
- package/dist/assets/{Index-DMm2-tI2.css → Index-CXloS3Dk.css} +1 -1
- package/dist/assets/{Index-BDp2zTIt2.js → Index-CgZMB6Yr2.js} +1 -1
- package/dist/assets/Index-Cgv-i8Dl.js +1 -0
- package/dist/assets/{Index-BvaN5lwK.js → Index-Ch5jHoxX.js} +1 -1
- package/dist/assets/Index-Crov2ncQ.js +1 -0
- package/dist/assets/Index-CuJlpHPU.js +1 -0
- package/dist/assets/Index-CuvflAng.js +1 -0
- package/dist/assets/{Index-B-iCrV5d.css → Index-D1AyX1Wb.css} +1 -1
- package/dist/assets/Index-D6Vv8KRG.js +1 -0
- package/dist/assets/Index-DDMZOfqq.js +1 -0
- package/dist/assets/Index-DHGXYI15.js +1 -0
- package/dist/assets/Index-DLxsWxQ7.js +1 -0
- package/dist/assets/Index-DYp9tfT7.js +1 -0
- package/dist/assets/{Index-C9Ku9BKB.js → Index-DdtvOzKV.js} +1 -1
- package/dist/assets/{Index-CE39V6gV.js → Index-DfwO-C1q.js} +1 -1
- package/dist/assets/Index-DlDqP0u6.js +1 -0
- package/dist/assets/{Index-e9yQNtrh.js → Index-DstCVts7.js} +1 -1
- package/dist/assets/Index-DxOJE8-1.js +1 -0
- package/dist/assets/{Index-Cwmg7dN4.js → Index-JuzeH0Fs.js} +1 -1
- package/dist/assets/Index-NRJPyzSV.js +1 -0
- package/dist/assets/Index-TqMGmyjh.js +1 -0
- package/dist/assets/Index-Zm6I1Agu.js +1 -0
- package/dist/assets/{Index-BUf9FFq2.js → Index-dSI8KvCT.js} +1 -1
- package/dist/assets/Index-fLPL9nL5.js +1 -0
- package/dist/assets/Index-nibWkdf_.js +1 -0
- package/dist/assets/Index-q1OweWS5.js +1 -0
- package/dist/assets/{Invitees-DK_TIIfN.js → Invitees-t7TJn0JC.js} +1 -1
- package/dist/assets/{List-CBWKgk0a.js → List-BW5sKHph.js} +1 -1
- package/dist/assets/List-BnidpiBe.js +1 -0
- package/dist/assets/List-C6GTjVzp.js +1 -0
- package/dist/assets/{LocalTools-CKgauRfj.js → LocalTools-C5PdBGfL.js} +3 -3
- package/dist/assets/{LocalTools-BMvTGYcX.js → LocalTools-CremS1Ga.js} +1 -1
- package/dist/assets/{Logo-nwdT-9cQ.js → Logo-GjczKJ_W.js} +1 -1
- package/dist/assets/Main-CYicGHpS.js +1 -0
- package/dist/assets/Main-D6jB9eDr.css +1 -0
- package/dist/assets/{Message-tz2f1Hh7.js → Message-HF8t63Wl.js} +2 -2
- package/dist/assets/Model-DDjKb1AZ.js +1 -0
- package/dist/assets/{Model-DA5Wo_wI.css → Model-DVPDf5oT.css} +1 -1
- package/dist/assets/{Navigator-ByxI29p7.js → Navigator-BecoenVy.js} +4 -4
- package/dist/assets/{NotFound-p5BzZGCL.js → NotFound-DMqAH60Q.js} +1 -1
- package/dist/assets/{PageHeader-DwqWzeFN.js → PageHeader-cu-g7EyM.js} +1 -1
- package/dist/assets/{Pay-Cbj76O0D.js → Pay-Bx9_YMyu.js} +1 -1
- package/dist/assets/{Player-BVXbVXzD.js → Player-hh3Pr6tu.js} +1 -1
- package/dist/assets/{Poivelle-DBNnTjly.js → Poivelle-CazPKFid.js} +1 -1
- package/dist/assets/{RealtimeCall-B03pDx80.js → RealtimeCall-CIH53MnR.js} +1 -1
- package/dist/assets/{ReportButton-DTNrYuaU.js → ReportButton-BSorvQYf.js} +1 -1
- package/dist/assets/{ReportDialog-BycYyA98.js → ReportDialog-WiKqM9Vm.js} +1 -1
- package/dist/assets/ScenarioPaymentMode-DVAjX6bP.js +1 -0
- package/dist/assets/{ScheduledTasks-De_sRGrg.js → ScheduledTasks-C7IbNK2E.js} +2 -2
- package/dist/assets/{SolanaWalletPickerDialog-DJXeSkon.js → SolanaWalletPickerDialog-735M3QGu.js} +1 -1
- package/dist/assets/Status-C00lRgSw.js +1 -0
- package/dist/assets/Status-C7QwaD2O.css +1 -0
- package/dist/assets/{Subscribe-8H7BrvN6.js → Subscribe-BtuC4a3g.js} +1 -1
- package/dist/assets/{TabSwitcher-AuKNH5HD.js → TabSwitcher-Dq3BuFKr.js} +1 -1
- package/dist/assets/{Tts-B-_FnarM.js → Tts-DbSbiMUF.js} +1 -1
- package/dist/assets/{VideoPlayer-Dlr4zmTe.js → VideoPlayer-Danzr525.js} +1 -1
- package/dist/assets/{VideoPreview-CYw6jPbC.js → VideoPreview-D-5Eymg5.js} +1 -1
- package/dist/assets/arrow-down-BnpXJ4MS.js +1 -0
- package/dist/assets/{arrow-down-wide-narrow-N9PI6aG3.js → arrow-down-wide-narrow-DALYzi0l.js} +1 -1
- package/dist/assets/arrow-left-HGt8Y0qS.js +1 -0
- package/dist/assets/arrow-right-DrnvS7bG.js +1 -0
- package/dist/assets/arrow-up-5b4LifIB.js +1 -0
- package/dist/assets/authorizeFlow-CPNVqc-y.js +1 -0
- package/dist/assets/{avatar-C_mk-bnf.js → avatar-D77Q9I5Z.js} +1 -1
- package/dist/assets/{basic-BiSlMG94.js → basic-DXyE8Szk.js} +1 -1
- package/dist/assets/{book-open-BCLZH-En.js → book-open-DziY1qjk.js} +1 -1
- package/dist/assets/{box-hvoqdbSL.js → box-B2XhdT1C.js} +1 -1
- package/dist/assets/{boxes-C3OmL03p.js → boxes-Cnffqurr.js} +1 -1
- package/dist/assets/{brain-BanKJA0f.js → brain-CoybKpkw.js} +1 -1
- package/dist/assets/{chart-no-axes-combined-BO2W5bO8.js → chart-no-axes-combined-Dolfq-C_.js} +1 -1
- package/dist/assets/{chat-vuR7a0wY.js → chat-D31ofNtO.js} +1 -1
- package/dist/assets/check-BncYR7t9.js +1 -0
- package/dist/assets/chevron-down-DmL6EUCD.js +1 -0
- package/dist/assets/chevron-right-DCDTOGvH.js +1 -0
- package/dist/assets/circle-check-DPKlOsLa.js +1 -0
- package/dist/assets/{circle-question-mark-kiKFln6-.js → circle-question-mark-D1R5zeC6.js} +1 -1
- package/dist/assets/{clipboard-list-CYUmuvxu.js → clipboard-list-BURngToR.js} +1 -1
- package/dist/assets/clock-BD11izpq.js +1 -0
- package/dist/assets/code-DcCaqUya.js +1 -0
- package/dist/assets/{codingBridge-CAgfVMcb.js → codingBridge-CzTH3TS4.js} +2 -2
- package/dist/assets/codingBridgeNotify-D_t-xgGw.js +2 -0
- package/dist/assets/{coins-BGKsSQIe.js → coins-aszS5ujE.js} +1 -1
- package/dist/assets/{collapse-BynYX4nc.js → collapse-P2dnu9lT.js} +1 -1
- package/dist/assets/{common-CFA9D-B8.js → common--t549Ajy.js} +1 -1
- package/dist/assets/{common-B0AwyZ0R.js → common-04BFI7g0.js} +1 -1
- package/dist/assets/{common-CIIPW1V6.js → common-0Pxh5Sqo.js} +1 -1
- package/dist/assets/{common-BxghAawV.js → common-B8bPfPQQ.js} +1 -1
- package/dist/assets/{common-Xc5jgBlX.js → common-CO531gVy.js} +1 -1
- package/dist/assets/{common-NE7dgihi.js → common-Cq3Rjlxn.js} +1 -1
- package/dist/assets/{common-Ci6lFKFu.js → common-CqZRACxD.js} +1 -1
- package/dist/assets/{common-D10tIq4t.js → common-CrpbH69_.js} +1 -1
- package/dist/assets/{common-D_IBIEcB.js → common-DH6tW-B7.js} +1 -1
- package/dist/assets/{common-DvJgI5Kb.js → common-DLQVVlBO.js} +1 -1
- package/dist/assets/{common-DnhdQFuG.js → common-DUW0I6RT.js} +1 -1
- package/dist/assets/{common-C91IcTAP.js → common-DVs2Q2Id.js} +1 -1
- package/dist/assets/{common-BhFY4Nfj.js → common-DXqzj5vp.js} +1 -1
- package/dist/assets/{common-h-S2acsx.js → common-H3S9nltR.js} +1 -1
- package/dist/assets/{common-CS44-vkN.js → common-MEqIdFxY.js} +1 -1
- package/dist/assets/{common-CGyig8uz.js → common-MJ8wamRJ.js} +1 -1
- package/dist/assets/{common-DCZ9WgJa.js → common-OHH4AAa6.js} +1 -1
- package/dist/assets/{common-DHIqv_E2.js → common-fekX8pEE.js} +1 -1
- package/dist/assets/{constants-fPCXwWF5.js → constants-BHt-rxvE.js} +1 -1
- package/dist/assets/{copy-BblyTnYh.js → copy-kYEBJ3UM.js} +1 -1
- package/dist/assets/{createTaskActions-yQCYafsg.js → createTaskActions-DxUBegVj.js} +1 -1
- package/dist/assets/{digitalhuman-B3cY4kr8.js → digitalhuman-IutRtGaA.js} +1 -1
- package/dist/assets/dist-BTKWrJnG.js +1 -0
- package/dist/assets/{dollar-sign-BqDT_Rax.js → dollar-sign-Cz2Dh1ZL.js} +1 -1
- package/dist/assets/{download-DXGBv4fw.js → download-DP0k376l.js} +1 -1
- package/dist/assets/{drawer-DeX9ylXe.js → drawer-BHgjWQtL.js} +1 -1
- package/dist/assets/{dropdown-BK1MA18J.js → dropdown-DlwhX5sb.js} +1 -1
- package/dist/assets/{dropdown-odlCBrK8.js → dropdown-DwPgFNC_.js} +1 -1
- package/dist/assets/{ellipsis-BfbDX1Im.js → ellipsis-D7rFzcnB.js} +1 -1
- package/dist/assets/{esm-DdiN3DgH.js → esm--389sWkC.js} +1 -1
- package/dist/assets/esm-Bme5NiGB.js +3 -0
- package/dist/assets/esm-CZ75UNzr.js +2 -0
- package/dist/assets/esm-DAvHON9I.js +28 -0
- package/dist/assets/esm-DCaPwA4R.js +1 -0
- package/dist/assets/{esm-1RRQVG3T.js → esm-DkEgJOIk.js} +1 -1
- package/dist/assets/esm-lz8LG3c9.js +2 -0
- package/dist/assets/{external-link-COz3zr-1.js → external-link-DPlr_OQI.js} +1 -1
- package/dist/assets/{eye-DLHCgXYF.js → eye-D649mJgG.js} +1 -1
- package/dist/assets/{file-CBL-Xmkx.js → file-NCfTiMN4.js} +1 -1
- package/dist/assets/{file-output-DzpZPLl7.js → file-output-F854FNtn.js} +1 -1
- package/dist/assets/{file-text-B9QIn9gw.js → file-text-BLSWfaze.js} +1 -1
- package/dist/assets/fish-D0JSz1Q5.js +1 -0
- package/dist/assets/{flux-JR4IGKM9.js → flux-BRJMoJK-.js} +1 -1
- package/dist/assets/{folder-CmPAcd83.js → folder-BRSI48X4.js} +1 -1
- package/dist/assets/gauge-C_zXN16f.js +1 -0
- package/dist/assets/{globe-BBZQHNRh.js → globe-jar9arxG.js} +1 -1
- package/dist/assets/{grokvideo-CjPZ_CCZ.js → grokvideo-CT6187fH.js} +1 -1
- package/dist/assets/{hailuo-DXHT8umU.js → hailuo-GSPxT2mf.js} +1 -1
- package/dist/assets/{headphones-CyLzwLZl.js → headphones-BzVkprS0.js} +1 -1
- package/dist/assets/{history-Bc2D9Hc5.js → history-CUU1j-Aj.js} +1 -1
- package/dist/assets/{house-Dc9tgUCb.js → house-BEJdbqWo.js} +1 -1
- package/dist/assets/{i18n-D4nr5BAx.js → i18n-C4cbwxeO.js} +1 -1
- package/dist/assets/{image-BA6QTiGp.js → image-qfXtr376.js} +1 -1
- package/dist/assets/{imageRequests-BjSBSzeM.js → imageRequests-BHX1yf2J.js} +1 -1
- package/dist/assets/index-CgyjiEUz.js +570 -0
- package/dist/assets/index.browser.esm-BuWinGJ1.js +2 -0
- package/dist/assets/{index.es-CUm3UI6r.js → index.es-46PgFVO-.js} +1 -1
- package/dist/assets/{info-BNXVGCAa.js → info-zysMX1Bn.js} +1 -1
- package/dist/assets/{input-number-CulKOOnA.js → input-number-BEoDC5S3.js} +1 -1
- package/dist/assets/{key-round-DYDNb3RR.js → key-round-DFHvfDpU.js} +1 -1
- package/dist/assets/{kling-Da6f0L-N.js → kling-c2Y171Po.js} +1 -1
- package/dist/assets/{languages-B7T1r5t8.js → languages-De7xQdTU.js} +1 -1
- package/dist/assets/{laptop-DitBasOD.js → laptop-U-iUI1ED.js} +1 -1
- package/dist/assets/{lightbulb-C2JdRcH3.js → lightbulb-B7E60EWC.js} +1 -1
- package/dist/assets/{link-DgrmI785.js → link-DZt-Ka9H.js} +1 -1
- package/dist/assets/loader-circle-CUqIryFT.js +1 -0
- package/dist/assets/{lock-CZtQQ55R.js → lock-CwvIUPHz.js} +1 -1
- package/dist/assets/{veo-DYzzaGw8.js → luma-Bx1F0dzT.js} +1 -1
- package/dist/assets/maestro-Dn9nJWji.js +1 -0
- package/dist/assets/{maestroLanguages-aThsRCEV.js → maestroLanguages-DApMPNkq.js} +1 -1
- package/dist/assets/{mail-Pp_9c5Tk.js → mail-BkJPsu8Q.js} +1 -1
- package/dist/assets/{message-circle-SfeT_L3K.js → message-circle-DXDgPie6.js} +1 -1
- package/dist/assets/{mic-Cn9RB1yv.js → mic-CD7Sfw2B.js} +1 -1
- package/dist/assets/{midjourney-CNt_laVt.js → midjourney-CQ6plFFm.js} +1 -1
- package/dist/assets/{minimax-zuh2D9dA.js → minimax-N7TVLowp.js} +1 -1
- package/dist/assets/{mobileLocalExec-C6uwUBCb.js → mobileLocalExec-KLktqnbi.js} +2 -2
- package/dist/assets/{models-C7ANi-Un.js → models-CqVJobW3.js} +1 -1
- package/dist/assets/{monitor-CdtULFyZ.js → monitor-cY3eNJXh.js} +1 -1
- package/dist/assets/{mouse-pointer-2-DjsSLxjN.js → mouse-pointer-2-BeVUrQkv.js} +1 -1
- package/dist/assets/music-2-Bg9vUeHe.js +1 -0
- package/dist/assets/{nanobanana-CmXIeR9Z.js → nanobanana-nmS49G98.js} +1 -1
- package/dist/assets/{omni-Clsq5ES8.js → omni-8tzvdH0x.js} +1 -1
- package/dist/assets/{openaiimage-Btwxs_mV.js → openaiimage-Ds5l5Iq0.js} +1 -1
- package/dist/assets/{pagination-CIX0MX3t.js → pagination-C6VF5AZw.js} +1 -1
- package/dist/assets/{pagination-BjoEfHiN.js → pagination-CJyJZAtw.js} +1 -1
- package/dist/assets/{pagination-Lro_X_rE.js → pagination-Chr3Bm4I.js} +1 -1
- package/dist/assets/{palette-CYvVBbIc.js → palette-OY_lk0pu.js} +1 -1
- package/dist/assets/{paperclip-CGTRhARZ.js → paperclip-UqMx9oTt.js} +1 -1
- package/dist/assets/{pause-BMalNKCY.js → pause-Bb0Zy0Ox.js} +1 -1
- package/dist/assets/{pencil-a0ovNlh4.js → pencil-Cuh7SjOQ.js} +1 -1
- package/dist/assets/{pika-BxM6ykVj.js → pika-IClks1Vt.js} +1 -1
- package/dist/assets/{pixverse-CPpfOOZO.js → pixverse-Bc0IhuOo.js} +1 -1
- package/dist/assets/play-Di6Xy0TE.js +1 -0
- package/dist/assets/{plug-BNnFblsy.js → plug-D_8OPw7-.js} +1 -1
- package/dist/assets/plus-Cvno_lxC.js +1 -0
- package/dist/assets/{poivelle-BWX2hhDF.js → poivelle-D2JQWdXM.js} +1 -1
- package/dist/assets/{popover-CCabhxbU.js → popover-BqNr2rOR.js} +1 -1
- package/dist/assets/{producer-sye1Huyx.js → producer-DCl-BCgp.js} +1 -1
- package/dist/assets/{qrart-BL9fqeRZ.js → qrart-C4hgV7fB.js} +1 -1
- package/dist/assets/{realtime-DFxU7-1a.js → realtime-wKVR52zF.js} +1 -1
- package/dist/assets/{refresh-cw-CEDoG8Dx.js → refresh-cw-BQnJXfgm.js} +1 -1
- package/dist/assets/rotate-ccw-DmXiyzHI.js +1 -0
- package/dist/assets/rotate-cw-_zOYPTu3.js +1 -0
- package/dist/assets/{row-DwvEQ4Kv.js → row-DQNf_Mdc.js} +1 -1
- package/dist/assets/search-BQxsspV5.js +1 -0
- package/dist/assets/{seedance-s45LWDKW.js → seedance-B5xzbpHK.js} +1 -1
- package/dist/assets/{seedream-Dze5uUQ1.js → seedream-CqwOT5xd.js} +1 -1
- package/dist/assets/{select-CeX_bNg0.js → select-Cnf2vYb_.js} +1 -1
- package/dist/assets/{serp-CzL67O53.js → serp-Boj4lLEQ.js} +1 -1
- package/dist/assets/{shield-B3Il942k.js → shield-DHgHFF9N.js} +1 -1
- package/dist/assets/{shuffle-Ceuvb3Pq.js → shuffle-BuxLhivp.js} +1 -1
- package/dist/assets/{slider-EsCfJqwi.js → slider-DntXhQ3E.js} +1 -1
- package/dist/assets/solana-CLOcWury.js +2 -0
- package/dist/assets/solana-wallets-CKZodRRP.js +2 -0
- package/dist/assets/{solana-wallets-vue-CLd3Bp3c.js → solana-wallets-vue-B8MVw466.js} +3 -3
- package/dist/assets/{sora-90o8cs5a.js → sora-Dy_4VVEE.js} +1 -1
- package/dist/assets/{sparkles-CLFz4tXS.js → sparkles-BEzTYbiu.js} +1 -1
- package/dist/assets/square-BNYgxHOr.js +1 -0
- package/dist/assets/{store-BhIfsufA.js → store-BN9wuOAx.js} +1 -1
- package/dist/assets/{suno-C3w1uyOT.js → suno-Cnx6w3Tk.js} +1 -1
- package/dist/assets/{switch-CNbPld6w.js → switch-DEk8VUni.js} +1 -1
- package/dist/assets/{table-DvZrfif5.js → table-4PIoceyd.js} +1 -1
- package/dist/assets/{tabs-4TPiegps.js → tabs-BJDTXj1f.js} +1 -1
- package/dist/assets/{tag-Ba8zFUBB.js → tag-D56ecTVc.js} +1 -1
- package/dist/assets/terminal-BitAioPY.js +1 -0
- package/dist/assets/{time-picker-BYmX0sAP.js → time-picker-CjcV4SjV.js} +1 -1
- package/dist/assets/{tooltip-FKvalKCm.js → tooltip-BTxABu9c.js} +1 -1
- package/dist/assets/{trash-2-CCnFGmoK.js → trash-2-BwCwpfRq.js} +1 -1
- package/dist/assets/{triangle-alert-CmopbNHi.js → triangle-alert-B_dh4qI1.js} +1 -1
- package/dist/assets/{upload-D9uL4dkQ.js → upload-BzOXGCPD.js} +1 -1
- package/dist/assets/{upload-B_e6GXND.js → upload-Ga2zshQX.js} +1 -1
- package/dist/assets/user-CFHLj_p8.js +1 -0
- package/dist/assets/{luma-c1z5u3Tt.js → veo-CUYWB_ln.js} +1 -1
- package/dist/assets/{video-CtGoK_4t.js → video-DR9H7S5e.js} +1 -1
- package/dist/assets/{volume-2-DBsnfXmG.js → volume-2-BjI8VfRk.js} +1 -1
- package/dist/assets/{wallet-BayS1PIM.js → wallet-iCYWJGYu.js} +1 -1
- package/dist/assets/{wan-DsOYUFTC.js → wan-D0-hXkHW.js} +1 -1
- package/dist/assets/{wand-sparkles-DoGA5MuS.js → wand-sparkles-CDrVNjr9.js} +1 -1
- package/dist/assets/{web-BkMQZT4M.js → web-C2Oc1edI.js} +1 -1
- package/dist/assets/{web-DotMPgJb.js → web-CIuMscHI.js} +1 -1
- package/dist/assets/{web-CGfTDr08.js → web-CPWaBZ7x.js} +1 -1
- package/dist/assets/{web-BAIyltVw.js → web-CWLZXA5C.js} +1 -1
- package/dist/assets/{web-Cw7-ECXo.js → web-C_nz8qwx.js} +1 -1
- package/dist/assets/{webextrator-BBdpOFYt.js → webextrator-D1AWHfaW.js} +1 -1
- package/dist/assets/{zap-CZ02c990.js → zap-Cno_KF-T.js} +1 -1
- package/dist/index.html +7 -4
- package/package.json +1 -1
- package/dist/assets/Conversation-CRqJWOb-.js +0 -1
- package/dist/assets/Detail-CN4qBrqa.js +0 -2
- package/dist/assets/Extra-Bk8BGvR7.js +0 -1
- package/dist/assets/Index-BBuwMXxr.js +0 -1
- package/dist/assets/Index-BKwWNdkD.js +0 -1
- package/dist/assets/Index-BS-CVfGF.js +0 -1
- package/dist/assets/Index-BTWcJusZ.js +0 -1
- package/dist/assets/Index-BZD5EOlO.js +0 -1
- package/dist/assets/Index-B_dscbOL.js +0 -1
- package/dist/assets/Index-BsxaSTgq.js +0 -1
- package/dist/assets/Index-Bxb-zaau.js +0 -1
- package/dist/assets/Index-C6ZohPAI.js +0 -1
- package/dist/assets/Index-C7MiXUYB.js +0 -1
- package/dist/assets/Index-CY0jqHV_.js +0 -1
- package/dist/assets/Index-Cd8MO61v.js +0 -1
- package/dist/assets/Index-CkbP3e0s.js +0 -1
- package/dist/assets/Index-D3OWaY9K.js +0 -1
- package/dist/assets/Index-DVNFZg1_.js +0 -1
- package/dist/assets/Index-DgvHJ1Q0.js +0 -1
- package/dist/assets/Index-Dpb-f_TW.js +0 -1
- package/dist/assets/Index-DyZjYpkO.js +0 -1
- package/dist/assets/Index-IQYM4Npt.js +0 -1
- package/dist/assets/Index-eQOWN-kj.js +0 -1
- package/dist/assets/Index-i6l_Ug1h.js +0 -1
- package/dist/assets/Index-nHdc4bFS.js +0 -1
- package/dist/assets/Index-oeqRy6sE.js +0 -1
- package/dist/assets/List-CRr6bWE9.js +0 -1
- package/dist/assets/List-f729hgqX.js +0 -1
- package/dist/assets/Main-BK7rF6os.js +0 -1
- package/dist/assets/Main-CUxrmxme.css +0 -1
- package/dist/assets/Model-BSgvWknV.js +0 -1
- package/dist/assets/ScenarioPaymentMode-D5rkIuHw.js +0 -1
- package/dist/assets/Status-Dqmgq95G.css +0 -1
- package/dist/assets/Status-qFA8vAiM.js +0 -1
- package/dist/assets/arrow-down-oGu5Mf6h.js +0 -1
- package/dist/assets/arrow-left-ChILYj5b.js +0 -1
- package/dist/assets/arrow-right-CBi9bCfZ.js +0 -1
- package/dist/assets/arrow-up-FlLGQPvk.js +0 -1
- package/dist/assets/authorizeFlow-BAdD2PFZ.js +0 -1
- package/dist/assets/check-Dp9-eY7h.js +0 -1
- package/dist/assets/chevron-down-DXkdjvB0.js +0 -1
- package/dist/assets/chevron-right-kh4R7_XG.js +0 -1
- package/dist/assets/circle-check-BTdTav-h.js +0 -1
- package/dist/assets/clock-CTJFRyio.js +0 -1
- package/dist/assets/code-COF542pV.js +0 -1
- package/dist/assets/codingBridgeNotify-BGiAuoCE.js +0 -2
- package/dist/assets/esm-B-mMn9Pd.js +0 -3
- package/dist/assets/esm-BJF22HMX.js +0 -1
- package/dist/assets/esm-BSKlzMOp.js +0 -2
- package/dist/assets/esm-Bg4ngxSQ.js +0 -28
- package/dist/assets/esm-CLs8Pj3d.js +0 -2
- package/dist/assets/fish-BsxH3ehp.js +0 -1
- package/dist/assets/gauge--DE_s4Eh.js +0 -1
- package/dist/assets/index-BcBWKKi1.js +0 -570
- package/dist/assets/index.browser.esm-BGQvgXoe.js +0 -2
- package/dist/assets/loader-circle-CwxkgZr9.js +0 -1
- package/dist/assets/maestro-C0-TTUwh.js +0 -1
- package/dist/assets/music-2-CYeSEWCC.js +0 -1
- package/dist/assets/play-CaHLVQC6.js +0 -1
- package/dist/assets/plus-C9kUVwFa.js +0 -1
- package/dist/assets/rotate-ccw-Bnq60__y.js +0 -1
- package/dist/assets/rotate-cw-D0rJoUHk.js +0 -1
- package/dist/assets/scenarioPayment-DsDn3g93.js +0 -1
- package/dist/assets/search-DHxVw0ij.js +0 -1
- package/dist/assets/solana-BrezZweG.js +0 -2
- package/dist/assets/solana-wallets-D3rOnkt9.js +0 -2
- package/dist/assets/square-Bk41T292.js +0 -1
- package/dist/assets/terminal-C8RjohOp.js +0 -1
- package/dist/assets/user-mH5pTyTU.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,it as d,j as f,mt as p,qt as m,rt as h,tt as g,x as _,z as v}from"./vendor-chart-Dw-P17PN.js";import{r as y,t as b}from"./select-Cnf2vYb_.js";import{n as x,t as S}from"./tabs-BJDTXj1f.js";import{t as C}from"./upload-Ga2zshQX.js";import{t as w}from"./tooltip-BTxABu9c.js";import{t as T}from"./alert-BprQRUmf.js";import{h as E,v as D}from"./models-CqVJobW3.js";import{n as O,r as k}from"./radio-BNhFzeBO.js";import{t as A}from"./drawer-BHgjWQtL.js";import{t as j}from"./input-number-BEoDC5S3.js";import{t as M}from"./slider-DntXhQ3E.js";import{t as N}from"./switch-DEk8VUni.js";import{t as P}from"./clock-BD11izpq.js";import{a as F,i as ee,n as te,r as ne,s as re,t as ie}from"./pagination-CJyJZAtw.js";import{t as ae}from"./headphones-BzVkprS0.js";import{t as oe}from"./info-zysMX1Bn.js";import{t as se}from"./lightbulb-B7E60EWC.js";import{t as ce}from"./trash-2-BwCwpfRq.js";import{t as le}from"./triangle-alert-B_dh4qI1.js";import{t as I}from"./upload-BzOXGCPD.js";import{t as L}from"./wand-sparkles-CDrVNjr9.js";import{_i as R,fi as ue,gi as de,hi as fe}from"./constants-BHt-rxvE.js";import{$r as pe,$t as z,Aa as me,Ba as B,Dr as he,Jt as ge,Ma as V,O as H,Oi as U,Or as _e,Qt as W,Xt as ve,Yt as ye,Zr as be,Zt as xe,en as Se,ga as Ce,gi as we,hi as G,ia as K,in as Te,kr as q,mi as Ee,nn as J,pn as De,tn as Y,va as X}from"./index-CgyjiEUz.js";import{t as Oe}from"./CopyToClipboard-CgR-ErWz.js";import{t as ke}from"./ReportButton-BSorvQYf.js";import{t as Ae}from"./FilePreview-BLtM6V7w.js";import{t as Z}from"./ImagePreview-B6uigACk.js";import{n as je}from"./taskDrawerMixin-DyAUhFEq.js";import{t as Me}from"./Consumption-RQBkhx2x.js";import{t as Ne}from"./AudioPreview-hNyLEGK1.js";import{t as Pe}from"./VideoPlayer-Danzr525.js";import{t as Fe}from"./VideoPreview-D-5Eymg5.js";import{t as Ie}from"./ScenarioPaymentMode-DVAjX6bP.js";import{t as Le}from"./ApiCodeButton-BA7ubKjq.js";import{t as Re}from"./BotPlaceholder-CLTFqIYe.js";var ze=v({name:`LayoutKling`,components:{MagicIcon:L,ElDrawer:A,ElButton:V},mixins:[je]}),Be={class:`main flex flex-row flex-1 min-h-0`},Ve={class:`config w-[320px] flex-none h-full min-h-0 overflow-hidden flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},He={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Ue(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),h=l(`el-drawer`);return g(),s(`div`,Be,[e(`div`,Ve,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,He,[d(t.$slots,`result`,{},void 0,!0)]),u(a(m,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[_,!t.tasksEmpty]]),a(h,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var We=H(ze,[[`render`,Ue],[`__scopeId`,`data-v-2d826924`]]),Ge={text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1,referenceVideo:!1,referenceImages:!1};function Q(e,t,n){let r=t||`std`,i=n??5;switch(e){case`kling-v1`:return{text2video:!0,image2video:!0,endImage:i===5,audio:!1,motionControl:i===5,referenceVideo:!1,referenceImages:!1};case`kling-v1-6`:case`kling-v2-5-turbo`:return{text2video:!0,image2video:!0,endImage:r===`pro`,audio:!1,motionControl:!1,referenceVideo:!1,referenceImages:!1};case`kling-v2-6`:return{text2video:!0,image2video:!0,endImage:r===`pro`,audio:r===`pro`,motionControl:!1,referenceVideo:!1,referenceImages:!1};case`kling-v2-master`:case`kling-v2-1-master`:return{text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1,referenceVideo:!1,referenceImages:!1};case`kling-v3`:return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:r!==`4k`,referenceVideo:!1,referenceImages:!1};case`kling-v3-omni`:return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:!1,referenceVideo:!0,referenceImages:!0};case`kling-o1`:return{text2video:!0,image2video:!0,endImage:!0,audio:!1,motionControl:!1,referenceVideo:!0,referenceImages:!0};default:return Ge}}var $=`<<<video_1>>>`,Ke=/<<<image_\d+>>>/g;function qe(e){return e?e.split($).join(` `).replace(/\s{2,}/g,` `).trim():``}function Je(e){return e?e.replace(Ke,` `).replace(/\s{2,}/g,` `).trim():``}function Ye(e,t){if(!e)return[];let n=t.model??e.model,r=t.mode??e.mode,i=t.duration??e.duration;if(!n)return[];let a=Q(n,r,i),o=[];e.end_image_url&&!a.endImage&&o.push({field:`end_image_url`,i18nLabel:`kling.name.endImage`}),e.generate_audio&&!a.audio&&o.push({field:`generate_audio`,i18nLabel:`kling.name.generateAudio`}),e.camera_control?.type&&(!a.motionControl||e.start_image_url)&&o.push({field:`camera_control`,i18nLabel:`kling.name.cameraControl`}),e.video_list?.length&&!a.referenceVideo&&o.push({field:`video_list`,i18nLabel:`kling.name.referenceVideo`}),e.image_list?.length&&!a.referenceImages&&o.push({field:`image_list`,i18nLabel:`kling.name.referenceImages`});let s=n===`kling-o1`||!!(e.image_list?.length||e.video_list?.length);return s&&e.cfg_scale!==void 0&&o.push({field:`cfg_scale`,i18nLabel:`kling.name.cfgScale`}),s&&e.negative_prompt&&o.push({field:`negative_prompt`,i18nLabel:`kling.name.negativePrompt`}),o}function Xe(e,t){let n={...e};for(let e of t)e.field===`end_image_url`&&(n.end_image_url=void 0),e.field===`generate_audio`&&(n.generate_audio=!1),e.field===`camera_control`&&(n.camera_control=void 0),e.field===`cfg_scale`&&(n.cfg_scale=void 0),e.field===`negative_prompt`&&(n.negative_prompt=void 0),e.field===`video_list`&&(n.video_list=void 0,n.prompt=qe(n.prompt)),e.field===`image_list`&&(n.image_list=void 0,n.prompt=Je(n.prompt));return n}var Ze=v({name:`ModelSelector`,components:{ElSelect:y,ElOption:b},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{revertKey:0,options:[{value:`kling-v3`,label:`v3`},{value:`kling-v3-omni`,label:`v3-Omni`},{value:`kling-v2-6`,label:`v2.6`},{value:`kling-v2-5-turbo`,label:`v2.5-Turbo`},{value:`kling-v2-1-master`,label:`v2.1-Master`},{value:`kling-v2-master`,label:`v2-Master`},{value:`kling-v1-6`,label:`v1.6`},{value:`kling-v1`,label:`v1`},{value:`kling-o1`,label:`Kling O1`}]}},computed:{value(){return this.$store.state.kling?.config?.model}},mounted(){this.value||this.applyModel(ue)},methods:{async onChange(e){let t=this.$store.state.kling?.config||{},n=Ye(t,{model:e});if(n.length===0){this.applyModel(e);return}let r=n.map(e=>this.$t(e.i18nLabel)).join(`、`);try{await X.confirm(this.$t(`kling.message.featureNotSupportedBody`,{fields:r}),this.$t(`kling.message.featureNotSupportedTitle`),{confirmButtonText:this.$t(`kling.button.confirmContinue`),cancelButtonText:this.$t(`kling.button.cancelSwitch`),type:`warning`});let i=Xe({...t,model:e},n);this.$store.commit(`kling/setConfig`,i),D.success(this.$t(`kling.message.featureRemovedNotice`,{fields:r}))}catch{this.revertKey+=1}},applyModel(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling.config,model:e})}}}),Qe={class:`field`},$e={class:`title font-bold`};function et(t,n,r,a,o,u){let d=l(`el-option`),m=l(`el-select`);return g(),s(`div`,Qe,[e(`h2`,$e,i(t.$t(`pika.name.model`)),1),(g(),f(m,{key:t.revertKey,"model-value":t.value,class:`value`,placeholder:t.$t(`pika.placeholder.select`),onChange:t.onChange},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(d,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`model-value`,`placeholder`,`onChange`]))])}var tt=H(Ze,[[`render`,et],[`__scopeId`,`data-v-a74e7f31`]]),nt=v({name:`ModeSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:F},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 R.includes(this.selectedModel)?this.cameraControlSet?this.$t(`kling.description.mode4kIncompatibleCamera`):``:this.$t(`kling.description.mode4kRequiresV3`)},options(){return[{value:`std`,label:this.$t(`kling.name.modeStd`),disabled:!1,disabledReason:``},{value:`pro`,label:this.$t(`kling.name.modePro`),disabled:!1,disabledReason:``},{value:`4k`,label:this.$t(`kling.name.mode4k`),disabled:!!this.fourKReason,disabledReason:this.fourKReason}]},value(){return this.$store.state.kling?.config?.mode}},watch:{fourKReason(e){e&&this.value===`4k`&&this.applyMode(`std`)}},mounted(){this.value||this.applyMode(`std`)},methods:{async onChange(e){let t=this.$store.state.kling?.config||{},n=Ye(t,{mode:e});if(n.length===0){this.applyMode(e);return}let r=n.map(e=>this.$t(e.i18nLabel)).join(`、`);try{await X.confirm(this.$t(`kling.message.featureNotSupportedBody`,{fields:r}),this.$t(`kling.message.featureNotSupportedTitle`),{confirmButtonText:this.$t(`kling.button.confirmContinue`),cancelButtonText:this.$t(`kling.button.cancelSwitch`),type:`warning`});let i=Xe({...t,mode:e},n);this.$store.commit(`kling/setConfig`,i),D.success(this.$t(`kling.message.featureRemovedNotice`,{fields:r}))}catch{this.revertKey+=1}},applyMode(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling.config,mode:e})}}}),rt={class:`field`},it={class:`header`},at={class:`title font-bold`},ot={key:0,class:`opt-tip`};function st(t,r,u,d,m,_){let v=l(`info-icon`),y=l(`el-option`),b=l(`el-select`);return g(),s(`div`,rt,[e(`div`,it,[e(`h2`,at,i(t.$t(`kling.name.mode`)),1),a(v,{content:t.$t(`kling.description.mode`),class:`info-icon`},null,8,[`content`])]),(g(),f(b,{key:t.revertKey,"model-value":t.value,class:`value`,placeholder:t.$t(`kling.placeholder.select`),clearable:!0,onChange:t.onChange},{default:p(()=>[(g(!0),s(c,null,h(t.options,t=>(g(),f(y,{key:t.value,label:t.label,value:t.value,disabled:t.disabled},{default:p(()=>[e(`span`,{class:n({"opt-disabled":t.disabled})},i(t.label),3),t.disabled&&t.disabledReason?(g(),s(`span`,ot,i(t.disabledReason),1)):o(``,!0)]),_:2},1032,[`label`,`value`,`disabled`]))),128))]),_:1},8,[`model-value`,`placeholder`,`onChange`]))])}var ct=H(nt,[[`render`,st],[`__scopeId`,`data-v-9a8fa3c5`]]),lt=[3,5,8,10,12,15],ut=[5,10],dt=[5],ft=v({name:`DurationSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:F},data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||``},isV3Model(){return R.includes(this.selectedModel)},allowedDurations(){return this.selectedModel===`kling-o1`?dt:this.isV3Model?lt:ut},value(){return this.$store.state.kling?.config?.duration??5},selectValue(){let e=this.allowedDurations;return e.includes(this.value)?this.value:e.includes(5)?5:e[0]}},watch:{selectedModel(){this.allowedDurations.includes(this.value)||this.applyDuration(5)}},mounted(){this.$store.state.kling?.config?.duration||this.applyDuration(5)},methods:{async onChange(e){let t=this.$store.state.kling?.config||{},n=Ye(t,{duration:e});if(n.length===0){this.applyDuration(e);return}let r=n.map(e=>this.$t(e.i18nLabel)).join(`、`);try{await X.confirm(this.$t(`kling.message.featureNotSupportedBody`,{fields:r}),this.$t(`kling.message.featureNotSupportedTitle`),{confirmButtonText:this.$t(`kling.button.confirmContinue`),cancelButtonText:this.$t(`kling.button.cancelSwitch`),type:`warning`});let i=Xe({...t,duration:e},n);this.$store.commit(`kling/setConfig`,i),D.success(this.$t(`kling.message.featureRemovedNotice`,{fields:r}))}catch{this.revertKey+=1}},applyDuration(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling.config,duration:e})}}}),pt={class:`field`},mt={class:`control`},ht={class:`label`},gt={class:`title font-bold`};function _t(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,pt,[e(`div`,mt,[e(`div`,ht,[e(`h2`,gt,i(t.$t(`kling.name.duration`)),1),a(m,{content:t.$t(`kling.description.duration`),class:`info-icon ml-1`},null,8,[`content`])]),(g(),f(v,{key:t.revertKey,"model-value":t.selectValue,class:`value`,placeholder:t.$t(`kling.placeholder.select`),onChange:t.onChange},{default:p(()=>[(g(!0),s(c,null,h(t.allowedDurations,e=>(g(),f(_,{key:e,label:`${e}s`,value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`model-value`,`placeholder`,`onChange`]))])])}var vt=H(ft,[[`render`,_t],[`__scopeId`,`data-v-496bf31c`]]),yt=v({name:`RatioSelector`,data(){return{options:[{value:`1:1`,label:`1:1`,width:20,height:20},{value:`16:9`,label:`16:9`,width:25,height:13},{value:`9:16`,label:`9:16`,width:13,height:25}]}},computed:{active(){return this.options.findIndex(e=>e.value===this.value)||0},value:{get(){return this.$store.state?.kling?.config?.aspect_ratio},set(e){console.debug(`set ratio`,e),this.$store.commit(`kling/setConfig`,{...this.$store.state?.kling?.config,aspect_ratio:e})}}},mounted(){this.value||=`1:1`}}),bt={class:`text-sm font-bold mb-2 block`},xt={class:`items`},St=[`onClick`],Ct={class:`name`};function wt(t,r,a,o,l,u){return g(),s(`div`,null,[e(`span`,bt,i(t.$t(`kling.name.ratio`)),1),e(`div`,xt,[(g(!0),s(c,null,h(t.options,(r,a)=>(g(),s(`div`,{key:a,class:n({active:t.active===a,item:!0}),onClick:e=>t.value=r.value},[e(`div`,{class:n([`preview`,r.label])},[e(`div`,{class:`rect`,style:m({width:r.width+`px`,height:r.height+`px`})},null,4)],2),e(`p`,Ct,i(r.label),1)],10,St))),128))])])}var Tt=H(yt,[[`render`,wt],[`__scopeId`,`data-v-cdb14b2f`]]),Et=v({name:`StartImage`,components:{UploadIcon:I,ElUpload:C,ElButton:V,ElTooltip:w,InfoIcon:F,ImagePreview:Z},mixins:[J,Y,z],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(){}}},watch:{value(e){!e&&this.fileList.length>0&&(this.fileList=[])}},mounted(){this.value||=void 0,this.onSetStartImageUrl()},methods:{onExceed(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onError(){D.error(this.$t(`kling.message.uploadReferencesError`))},onBeforeUpload(){let e=this.$store.state.kling?.config||{};if(e.video_list?.[0]?.refer_type===`base`)return D.warning(this.$t(`kling.message.baseVideoFrameConflict`)),!1;let t=e.video_list?.length?4:7;return(e.image_list?.length||0)+Number(!!e.end_image_url)+1>t?(D.warning(this.$t(`kling.message.referenceImagesTotalLimit`,{count:t})),!1):!0},onSetStartImageUrl(){let e=this.urls?.[0];this.$store.commit(`kling/setConfig`,{...this.$store.state?.kling?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.onSetStartImageUrl()}}}),Dt={class:`relative`},Ot={class:`flex min-h-8 items-center pr-20`},kt={class:`flex justify-start items-center`},At={class:`text-sm font-bold`};function jt(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-tooltip`),x=l(`el-upload`);return g(),s(`div`,Dt,[e(`div`,Ot,[e(`div`,kt,[e(`span`,At,i(t.$t(`kling.name.startImage`)),1),a(h,{content:t.$t(`kling.description.uploadStartImage`)},null,8,[`content`])])]),a(x,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:1,disabled:t.reachedLimit,class:`upload-wrapper`,multiple:!1,action:t.uploadUrl,"list-type":`picture`,"before-upload":t.onBeforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(b,{content:t.$t(`kling.message.uploadReferencesExceed`),disabled:!t.reachedLimit,placement:`top`},{default:p(()=>[e(`span`,null,[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`,disabled:t.reachedLimit},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferences`)),1)]),_:1},8,[`disabled`])])]),_:1},8,[`content`,`disabled`])]),_:1},8,[`file-list`,`disabled`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Mt=H(Et,[[`render`,jt],[`__scopeId`,`data-v-60844ac3`]]),Nt=v({name:`EndImage`,components:{UploadIcon:I,ElUpload:C,ElButton:V,ElTooltip:w,ImagePreview:Z,InfoIcon:F},mixins:[J,Y,z],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||=void 0,this.onSetEndImageUrl()},methods:{onBeforeUpload(){if(!this.endImageSupported)return D.warning(this.$t(`kling.message.endImageNotSupported`)),!1;if(!this.hasStartImage)return D.warning(this.$t(`kling.message.endImageRequiresStart`)),!1;if(this.klingConfig.video_list?.[0]?.refer_type===`base`)return D.warning(this.$t(`kling.message.baseVideoFrameConflict`)),!1;let e=this.klingConfig.video_list?.length?4:7;return(this.klingConfig.image_list?.length||0)+2>e?(D.warning(this.$t(`kling.message.referenceImagesTotalLimit`,{count:e})),!1):!0},onExceed(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onError(){D.error(this.$t(`kling.message.uploadReferencesError`))},onSetEndImageUrl(){let e=this.urls?.[0];this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.onSetEndImageUrl()}}}),Pt={class:`relative`},Ft={class:`flex min-h-8 items-center pr-20`},It={class:`flex justify-start items-center`},Lt={class:`text-sm font-bold`};function Rt(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-tooltip`),x=l(`el-upload`);return g(),s(`div`,Pt,[e(`div`,Ft,[e(`div`,It,[e(`span`,Lt,i(t.$t(`kling.name.endImage`)),1),a(h,{content:t.$t(`kling.description.uploadEndImage`)},null,8,[`content`])])]),a(x,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:1,disabled:t.uploadDisabled,class:`upload-wrapper`,multiple:!1,action:t.uploadUrl,"list-type":`picture`,"before-upload":t.onBeforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(b,{content:t.uploadTooltip,disabled:!t.uploadDisabled,placement:`top`},{default:p(()=>[e(`span`,null,[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`,disabled:t.uploadDisabled},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferences`)),1)]),_:1},8,[`disabled`])])]),_:1},8,[`content`,`disabled`])]),_:1},8,[`file-list`,`disabled`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var zt=H(Nt,[[`render`,Rt],[`__scopeId`,`data-v-b286c4d0`]]),Bt=v({name:`ReferenceVideo`,components:{ElUpload:C,ElButton:V,ElRadioButton:O,ElRadioGroup:k,ElSwitch:N,InfoIcon:F,FilePreview:Ae,UploadIcon:I},mixins:[Y,z],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)},config(){return this.$store.state.kling?.config||{}},hasVideo(){return!!this.urls?.[0]},referenceType:{get(){return this.config.video_list?.[0]?.refer_type||`feature`},set(e){this.updateVideoOptions(e,this.keepOriginalSound)}},keepOriginalSound:{get(){return this.config.video_list?.[0]?.keep_original_sound===`yes`},set(e){this.updateVideoOptions(this.referenceType,e)}}},methods:{onExceed(){D.warning(this.$t(`kling.message.referenceVideoExceed`))},onError(){D.error(this.$t(`kling.message.referenceVideoError`))},beforeUpload(e){if((this.config.image_list?.length||0)+Number(!!this.config.start_image_url)+Number(!!this.config.end_image_url)>4)return D.error(this.$t(`kling.message.referenceVideoImageLimit`)),!1;let t=e.type===`video/mp4`||e.type===`video/quicktime`,n=xe(e.size);return t?n?!0:(D.error(this.$t(`kling.message.referenceVideoSizeExceed`,{max:ve(ye)})),!1):(D.error(this.$t(`kling.message.referenceVideoTypeFailed`)),!1)},ensurePromptToken(e){let t=this.$store.state.kling?.config,n=t?.prompt||``,r=n.includes($),i;if(e&&!r)i=n?`${n} ${$}`:$;else if(!e&&r)i=qe(n);else return;this.$store.commit(`kling/setConfig`,{...t,prompt:i})},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,video_list:void 0}),this.ensurePromptToken(!1)},onSetVideoList(){let e=this.urls?.[0],t=e?[{video_url:e,refer_type:this.referenceType,keep_original_sound:this.keepOriginalSound?`yes`:`no`}]:void 0;this.$store.commit(`kling/setConfig`,{...this.config,video_list:t,generate_audio:!1,camera_control:void 0,cfg_scale:void 0,negative_prompt:void 0}),this.ensurePromptToken(!!e)},updateVideoOptions(e,t){let n=this.urls?.[0];n&&this.$store.commit(`kling/setConfig`,{...this.config,video_list:[{video_url:n,refer_type:e,keep_original_sound:t?`yes`:`no`}],...e===`base`?{start_image_url:void 0,end_image_url:void 0}:{},generate_audio:!1,camera_control:void 0,cfg_scale:void 0,negative_prompt:void 0})},async onSuccess(){this.onSetVideoList()}}}),Vt={class:`relative`},Ht={class:`flex min-h-8 items-center pr-20`},Ut={class:`flex justify-start items-center`},Wt={class:`text-sm font-bold`},Gt={key:0,class:`reference-options mt-3 flex flex-col gap-3`},Kt={class:`flex flex-col items-stretch gap-2 sm:flex-row sm:items-center sm:justify-between`},qt={class:`text-sm`},Jt={class:`flex items-center justify-between gap-3`},Yt={class:`text-sm`};function Xt(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`file-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`),x=l(`el-radio-button`),S=l(`el-radio-group`),C=l(`el-switch`);return g(),s(`div`,Vt,[e(`div`,Ht,[e(`div`,Ut,[e(`span`,Wt,i(t.$t(`kling.name.referenceVideo`)),1),a(h,{content:t.$t(`kling.description.omniReferenceVideo`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.mp4,.mov`,name:`file`,class:`value`,"show-file-list":!0,limit:1,multiple:!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.percentage===void 0?o(``,!0):(g(),f(_,{key:0,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferenceVideo`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`]),t.hasVideo?(g(),s(`div`,Gt,[e(`div`,Kt,[e(`span`,qt,i(t.$t(`kling.name.referenceVideoType`)),1),a(S,{modelValue:t.referenceType,"onUpdate:modelValue":n[1]||=e=>t.referenceType=e,size:`small`},{default:p(()=>[a(x,{value:`feature`},{default:p(()=>[r(i(t.$t(`kling.name.referenceVideoFeature`)),1)]),_:1}),a(x,{value:`base`},{default:p(()=>[r(i(t.$t(`kling.name.referenceVideoBase`)),1)]),_:1})]),_:1},8,[`modelValue`])]),e(`div`,Jt,[e(`span`,Yt,i(t.$t(`kling.name.keepOriginalSound`)),1),a(C,{modelValue:t.keepOriginalSound,"onUpdate:modelValue":n[2]||=e=>t.keepOriginalSound=e},null,8,[`modelValue`])])])):o(``,!0)])}var Zt=H(Bt,[[`render`,Xt],[`__scopeId`,`data-v-e3a9dfab`]]),Qt=v({name:`KlingReferenceImages`,components:{ElButton:V,ElUpload:C,UploadIcon:I,ImagePreview:Z,InfoIcon:F},mixins:[J,Y,z],data(){return{fileList:[],uploadUrl:K()+`/api/v1/files/`}},computed:{config(){return this.$store.state.kling?.config||{}},headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},frameCount(){return Number(!!this.config.start_image_url)+Number(!!this.config.end_image_url)},maxImages(){return this.config.video_list?.length?4:7},referenceLimit(){return Math.max(0,this.maxImages-this.frameCount)},remainingSlots(){return Math.max(0,this.referenceLimit-this.urls.length)},urls(){return this.fileList.map(e=>e.response?.file_url||e.url).filter(Boolean)},storeImages(){return this.config.image_list}},watch:{frameCount(){this.syncPromptTokens()},storeImages(e){!e?.length&&this.fileList.length>0&&(this.fileList=[])}},methods:{beforeUpload(){return this.remainingSlots===0?(this.onExceed(),!1):!0},onExceed(){D.warning(this.$t(`kling.message.referenceImagesExceed`,{count:this.remainingSlots}))},onError(){D.error(this.$t(`kling.message.referenceImagesError`))},clearOmniConflicts(e){return{...e,generate_audio:!1,camera_control:void 0,cfg_scale:void 0,negative_prompt:void 0}},syncPromptTokens(e){let t=e||this.config,n=[Je(t.prompt),...this.urls.map((e,t)=>`<<<image_${this.frameCount+t+1}>>>`)].filter(Boolean).join(` `);n!==t.prompt&&this.$store.commit(`kling/setConfig`,{...t,prompt:n})},syncConfig(){let e=this.urls.length?this.urls.map(e=>({image_url:e})):void 0,t=this.clearOmniConflicts({...this.config,image_list:e});this.$store.commit(`kling/setConfig`,t),this.syncPromptTokens(t)},async onSuccess(e,t){e?.file_url&&(t.url=e.file_url,t.response=e),this.syncConfig()},onRemove(e,t){this.fileList.splice(e,1),t.url?.startsWith(`blob:`)&&URL.revokeObjectURL(t.url),this.syncConfig()}}}),$t={class:`relative`},en={class:`flex justify-between items-center`},tn={class:`flex justify-start items-center`},nn={class:`text-sm font-bold`},rn={key:0,class:`file-list flex flex-wrap gap-2 mt-2`};function an(t,n,u,d,m,_){let v=l(`info-icon`),y=l(`UploadIcon`),b=l(`el-button`),x=l(`el-upload`),S=l(`image-preview`);return g(),s(`div`,$t,[e(`div`,en,[e(`div`,tn,[e(`span`,nn,i(t.$t(`kling.name.referenceImages`)),1),a(v,{content:t.$t(`kling.description.referenceImages`)},null,8,[`content`])]),a(x,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.png,.jpg,.jpeg`,name:`file`,limit:t.referenceLimit,multiple:!0,"show-file-list":!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{default:p(()=>[a(b,{round:``,type:`primary`,size:`small`,disabled:t.remainingSlots===0},{default:p(()=>[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferenceImages`)),1)]),_:1},8,[`disabled`])]),_:1},8,[`file-list`,`limit`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])]),t.fileList.length?(g(),s(`div`,rn,[(g(!0),s(c,null,h(t.fileList,(e,n)=>(g(),f(S,{key:e.uid||e.url||n,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:r=>t.onRemove(n,e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))),128))])):o(``,!0)])}var on=H(Qt,[[`render`,an]]),sn=v({name:`CfgScaleSelector`,components:{ElSlider:M,InfoIcon:F,ElInputNumber:j},computed:{value:{get(){return this.$store.state?.kling?.config?.cfg_scale},set(e){console.debug(`set cfg_scale`,e),this.$store.commit(`kling/setConfig`,{...this.$store.state?.kling?.config,cfg_scale:e})}}},mounted(){this.value||=0}}),cn={class:`flex justify-between`},ln={class:`flex justify-start items-center`},un={class:`text-sm font-bold`},dn={class:`flex justify-end items-center`},fn={class:`w-full`};function pn(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input-number`),p=l(`el-slider`);return g(),s(`div`,null,[e(`div`,cn,[e(`div`,ln,[e(`span`,un,i(t.$t(`kling.name.cfgScale`)),1),a(d,{content:t.$t(`kling.description.cfgScale`)},null,8,[`content`])]),e(`div`,dn,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),e(`div`,fn,[a(p,{modelValue:t.value,"onUpdate:modelValue":n[1]||=e=>t.value=e,min:0,max:1,step:.1},null,8,[`modelValue`])])])}var mn=H(sn,[[`render`,pn]]),hn=v({name:`GenerateAudioSelector`,components:{ElSwitch:N,InfoIcon:F},computed:{selectedModel(){return this.$store.state.kling?.config?.model||``},selectedMode(){return this.$store.state.kling?.config?.mode||``},supported(){return!!(R.includes(this.selectedModel)||this.selectedModel===`kling-v2-6`&&this.selectedMode===`pro`)},tooltipContent(){return this.supported?this.$t(`kling.description.generateAudio`):this.$t(`kling.description.generateAudioUnsupported`)},value:{get(){return this.supported?this.$store.state.kling?.config?.generate_audio??!1:!1},set(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,generate_audio:e})}}},watch:{supported(e){!e&&this.$store.state.kling?.config?.generate_audio&&this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,generate_audio:!1})}}}),gn={class:`relative`},_n={class:`flex justify-between items-center`},vn={class:`flex justify-start items-center`},yn={class:`text-sm font-bold`};function bn(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return g(),s(`div`,gn,[e(`div`,_n,[e(`div`,vn,[e(`span`,yn,i(t.$t(`kling.name.generateAudio`)),1),a(d,{content:t.tooltipContent},null,8,[`content`])]),a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,disabled:!t.supported},null,8,[`modelValue`,`disabled`])])])}var xn=H(hn,[[`render`,bn]]),Sn=[`horizontal`,`vertical`,`pan`,`tilt`,`roll`,`zoom`],Cn=v({name:`CameraControlSelector`,components:{ElSelect:y,ElOption:b,ElSlider:M,ElInputNumber:j,InfoIcon:F},data(){return{configKeys:Sn}},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){let t=this.$store.state.kling?.config||{};if(!e){let e={...t};delete e.camera_control,this.$store.commit(`kling/setConfig`,e);return}let n=e;this.$store.commit(`kling/setConfig`,{...t,camera_control:{type:n,config:n===`simple`?t.camera_control?.config||{}:void 0}})}},configValues(){return this.$store.state.kling?.config?.camera_control?.config||{}}},watch:{disabled(e){e&&this.selectedType!==void 0&&(this.selectedTypeRaw=``)}},methods:{writeConfig(e,t){let n=this.$store.state.kling?.config||{},r=n.camera_control||{type:`simple`},i={...r.config||{}};t==null?delete i[e]:i[e]=t,this.$store.commit(`kling/setConfig`,{...n,camera_control:{...r,type:`simple`,config:i}})},onSliderChange(e,t){this.writeConfig(e,t)},onNumberChange(e,t){this.writeConfig(e,t)}}}),wn={class:`field`},Tn={class:`header`},En={class:`text-sm font-bold`},Dn={key:0,class:`config-grid`},On={class:`cfg-row-head`},kn={class:`cfg-name`};function An(t,n,r,u,d,m){let _=l(`info-icon`),v=l(`el-option`),y=l(`el-select`),b=l(`el-input-number`),x=l(`el-slider`);return g(),s(`div`,wn,[e(`div`,Tn,[e(`span`,En,i(t.$t(`kling.name.cameraControl`)),1),a(_,{content:t.tooltipContent},null,8,[`content`])]),a(y,{modelValue:t.selectedTypeRaw,"onUpdate:modelValue":n[0]||=e=>t.selectedTypeRaw=e,class:`value`,placeholder:t.$t(`kling.placeholder.cameraType`),clearable:!0,disabled:t.disabled},{default:p(()=>[(g(!0),s(c,null,h(t.typeOptions,e=>(g(),f(v,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`disabled`]),t.selectedType===`simple`&&!t.disabled?(g(),s(`div`,Dn,[(g(!0),s(c,null,h(t.configKeys,n=>(g(),s(`div`,{key:n,class:`cfg-row`},[e(`div`,On,[e(`span`,kn,i(t.$t(`kling.name.cc_${n}`)),1),a(b,{modelValue:t.configValues[n],"onUpdate:modelValue":e=>t.configValues[n]=e,min:-1,max:1,step:.1,precision:1,"controls-position":`right`,size:`small`,class:`cfg-num`,onChange:e=>t.onNumberChange(n,e)},null,8,[`modelValue`,`onUpdate:modelValue`,`onChange`])]),a(x,{"model-value":t.configValues[n]??0,min:-1,max:1,step:.1,onInput:e=>t.onSliderChange(n,e)},null,8,[`model-value`,`onInput`])]))),128))])):o(``,!0)])}var jn=H(Cn,[[`render`,An],[`__scopeId`,`data-v-cd896060`]]),Mn=[{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`]}],Nn=`, `;function Pn(e,t){let n=(e||``).trim();return n?n.includes(t)?n:`${n}${Nn}${t}`:t}function Fn(e,t){if(!e||!t)return e||``;let n=[`${t}${Nn}`,`${Nn}${t}`,t],r=e;for(let e of n)if(r.includes(e)){r=r.replace(e,``);break}return r.replace(/(?:,\s*)+$/,``).replace(/^(?:,\s*)+/,``)}var In=v({name:`InspirationPills`,components:{CloseIcon:Ce},computed:{prompt(){return this.$store.state.kling?.config?.prompt||``},allChipTexts(){return Mn.flatMap(e=>e.chipKeys.map(e=>this.$t(`kling.inspiration.chip.${e}`)))},selected(){let e=this.prompt;if(!e)return[];let t=[];for(let n of this.allChipTexts){let r=e.indexOf(n);r!==-1&&t.push({text:n,idx:r})}return t.sort((e,t)=>e.idx-t.idx).map(e=>e.text)}},methods:{onRemove(e){let t=Fn(this.prompt,e);this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,prompt:t})}}}),Ln={key:0,class:`pills`,role:`list`},Rn={class:`pill-text`},zn=[`aria-label`,`title`,`onClick`];function Bn(n,r,u,d,f,p){let m=l(`close-icon`);return n.selected.length>0?(g(),s(`div`,Ln,[(g(!0),s(c,null,h(n.selected,r=>(g(),s(`div`,{key:r,class:`pill`,role:`listitem`},[e(`span`,Rn,i(r),1),e(`button`,{type:`button`,class:`pill-remove`,"aria-label":n.$t(`kling.inspiration.removeChip`),title:n.$t(`kling.inspiration.removeChip`),onClick:t(e=>n.onRemove(r),[`stop`])},[a(m,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,zn)]))),128))])):o(``,!0)}var Vn=v({name:`PromptInput`,components:{IdeaIcon:se,ElButton:V,PromptTextarea:ee,InspirationPills:H(In,[[`render`,Bn],[`__scopeId`,`data-v-6be01bcf`]])},emits:[`open-inspiration`],computed:{prompt:{get(){return this.$store.state.kling?.config?.prompt},set(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,prompt:e})}}},mounted(){this.prompt||=``}});function Hn(e,t,n,o,s,c){let u=l(`idea-icon`),d=l(`el-button`),m=l(`inspiration-pills`),h=l(`prompt-textarea`);return g(),f(h,{modelValue:e.prompt,"onUpdate:modelValue":t[1]||=t=>e.prompt=t,title:e.$t(`kling.name.prompt`),info:e.$t(`kling.description.prompt`),placeholder:e.$t(`kling.placeholder.prompt`)},{actions:p(()=>[a(d,{text:``,size:`small`,class:`inspiration-btn`,onClick:t[0]||=t=>e.$emit(`open-inspiration`)},{default:p(()=>[a(u,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(e.$t(`kling.inspiration.openButton`)),1)]),_:1})]),before:p(()=>[a(m)]),_:1},8,[`modelValue`,`title`,`info`,`placeholder`])}var Un=H(Vn,[[`render`,Hn],[`__scopeId`,`data-v-5754ae54`]]),Wn=v({name:`NegativePromptInput`,components:{ElInput:B,InfoIcon:F},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||=``}}),Gn={class:`field`},Kn={class:`box`},qn={class:`title font-bold`};function Jn(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input`);return g(),s(`div`,Gn,[e(`div`,Kn,[e(`h2`,qn,i(t.$t(`kling.name.negativePrompt`)),1),a(d,{content:t.$t(`kling.description.negativePrompt`),class:`info`},null,8,[`content`])]),a(f,{modelValue:t.prompt,"onUpdate:modelValue":n[0]||=e=>t.prompt=e,rows:3,type:`textarea`,class:`prompt`,placeholder:t.$t(`kling.placeholder.negativePrompt`)},null,8,[`modelValue`,`placeholder`])])}var Yn=H(Wn,[[`render`,Jn],[`__scopeId`,`data-v-de98cf01`]]),Xn=v({name:`InspirationDrawer`,components:{Close:Ce,IdeaIcon:se,ElDrawer:A,ElButton:V},props:{modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`],data(){return{groups:Mn}},computed:{visible:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e)}},drawerSize(){return window.innerWidth<768?`100%`:`380px`},prompt(){return this.$store.state.kling?.config?.prompt||``},allChipTexts(){return this.groups.flatMap(e=>e.chipKeys.map(e=>this.$t(`kling.inspiration.chip.${e}`)))},selectedCount(){return this.allChipTexts.filter(e=>this.isSelected(e)).length}},methods:{chipText(e){return this.$t(`kling.inspiration.chip.${e}`)},isSelected(e){return e?this.prompt.includes(e):!1},setPrompt(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,prompt:e})},onToggle(e){e&&(this.isSelected(e)?this.setPrompt(Fn(this.prompt,e)):this.setPrompt(Pn(this.prompt,e)))},onClearSelected(){let e=this.prompt;for(let t of this.allChipTexts)for(;e.includes(t);)e=Fn(e,t);this.setPrompt(e)}}}),Zn={class:`drawer-content`},Qn={class:`drawer-header`},$n={class:`title-row`},er={class:`title`},tr={class:`hint`},nr={key:0,class:`selected-bar`},rr={class:`selected-text`},ir={class:`groups`},ar={class:`group-title`},or={class:`chip-grid`},sr=[`onClick`];function cr(t,u,d,m,_,v){let y=l(`idea-icon`),b=l(`close`),x=l(`el-button`),S=l(`el-drawer`);return g(),f(S,{modelValue:t.visible,"onUpdate:modelValue":u[1]||=e=>t.visible=e,direction:`rtl`,"with-header":!1,size:t.drawerSize,"custom-class":`kling-inspiration-drawer`,"destroy-on-close":!1},{default:p(()=>[e(`div`,Zn,[e(`div`,Qn,[e(`div`,$n,[a(y,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,er,i(t.$t(`kling.inspiration.title`)),1)]),a(x,{text:``,class:`close-btn`,"aria-label":t.$t(`common.button.close`),title:t.$t(`common.button.close`),onClick:u[0]||=e=>t.visible=!1},{default:p(()=>[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`])]),e(`div`,tr,i(t.$t(`kling.inspiration.hint`)),1),t.selectedCount>0?(g(),s(`div`,nr,[e(`span`,rr,i(t.$t(`kling.inspiration.selectedSummary`,{count:t.selectedCount})),1),a(x,{text:``,size:`small`,class:`clear-btn`,onClick:t.onClearSelected},{default:p(()=>[r(i(t.$t(`kling.inspiration.clearSelected`)),1)]),_:1},8,[`onClick`])])):o(``,!0),e(`div`,ir,[(g(!0),s(c,null,h(t.groups,r=>(g(),s(`div`,{key:r.groupKey,class:`group`},[e(`div`,ar,i(t.$t(`kling.inspiration.group.${r.groupKey}`)),1),e(`div`,or,[(g(!0),s(c,null,h(r.chipKeys,e=>(g(),s(`button`,{key:e,type:`button`,class:n({chip:!0,active:t.isSelected(t.chipText(e))}),onClick:n=>t.onToggle(t.chipText(e))},i(t.chipText(e)),11,sr))),128))])]))),128))])])]),_:1},8,[`modelValue`,`size`])}var lr=H(Xn,[[`render`,cr],[`__scopeId`,`data-v-8b2e6a5d`]]),ur={"kling-v3":`v3`,"kling-v3-omni":`v3-Omni`,"kling-v2-6":`v2.6`,"kling-v2-5-turbo":`v2.5-Turbo`,"kling-v2-1-master":`v2.1-Master`,"kling-v2-master":`v2-Master`,"kling-v1-6":`v1.6`,"kling-v1":`v1`,"kling-o1":`Kling O1`},dr={std:`720p`,pro:`1080p`,"4k":`4K`},fr=v({name:`SummaryChip`,components:{AudioIcon:ae},computed:{config(){return this.$store.state.kling?.config||{}},modelLabel(){let e=this.config?.model||`kling-v2-5-turbo`;return ur[e]||e},durationLabel(){return`${this.config?.duration??5}s`},aspectRatio(){return this.config?.aspect_ratio||``},modeLabel(){let e=this.config?.mode||`std`;return dr[e]||e},generateAudio(){return!!this.config?.generate_audio}}}),pr={class:`summary-chip`},mr=[`title`],hr=[`title`],gr=[`title`],_r=[`title`],vr=[`title`];function yr(t,n,r,c,u,d){let f=l(`audio-icon`);return g(),s(`div`,pr,[e(`span`,{class:`part`,title:t.$t(`kling.name.model`)},i(t.modelLabel),9,mr),n[0]||=e(`span`,{class:`dot`},`·`,-1),e(`span`,{class:`part`,title:t.$t(`kling.name.duration`)},i(t.durationLabel),9,hr),n[1]||=e(`span`,{class:`dot`},`·`,-1),e(`span`,{class:`part`,title:t.$t(`kling.name.ratio`)},i(t.aspectRatio||`16:9`),9,gr),n[2]||=e(`span`,{class:`dot`},`·`,-1),e(`span`,{class:`part`,title:t.$t(`kling.name.mode`)},i(t.modeLabel),9,_r),t.generateAudio?(g(),s(`span`,{key:0,class:`audio`,title:t.$t(`kling.name.generateAudio`)},[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,vr)):o(``,!0)])}var br=v({name:`ConfigPanel`,components:{MagicIcon:L,ElButton:V,Consumption:Me,PromptInput:Un,NegativePromptInput:Yn,ModelSelector:tt,ModeSelector:ct,DurationSelector:vt,RatioSelector:Tt,StartImage:Mt,CfgScaleSelector:mn,GenerateAudioSelector:xn,CameraControlSelector:jn,InspirationDrawer:lr,SummaryChip:H(fr,[[`render`,yr],[`__scopeId`,`data-v-c800852a`]]),EndImage:zt,ReferenceImages:on,ReferenceVideo:Zt,ScenarioPaymentMode:Ie},emits:[`generate`],data(){return{inspirationOpen:!1,quoteTimer:0,quoteRunId:0}},computed:{config(){return this.$store.state.kling?.config},capabilities(){return Q(this.config?.model,this.config?.mode,this.config?.duration)},omniActive(){return this.config?.model===`kling-o1`||!!(this.config?.image_list?.length||this.config?.video_list?.length)},consumption(){return Te(this.config,this.service?.cost)},service(){return this.$store.state.kling?.service},walletMode(){return Ee()&&G(`kling`).mode===`wallet`}},watch:{walletMode:{handler(e){e&&this.scheduleQuote()},immediate:!0},config:{handler(){this.walletMode&&this.scheduleQuote()},deep:!0}},beforeUnmount(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1},methods:{scheduleQuote(){window.clearTimeout(this.quoteTimer),this.quoteTimer=window.setTimeout(this.refreshQuote,350)},async refreshQuote(){let e=G(`kling`),t=++this.quoteRunId;e.quoteLoading=!0,e.quoteUsdc=void 0;try{let n=await q.quote(_e(this.config));t===this.quoteRunId&&e.mode===`wallet`&&(e.quoteUsdc=n.amountUsdc)}catch(e){console.warn(`x402 quote failed`,e)}finally{t===this.quoteRunId&&(e.quoteLoading=!1)}},onGenerate(){this.$emit(`generate`)}}}),xr={class:`flex flex-col h-full`},Sr={class:`flex-1 overflow-y-auto p-5`},Cr={class:`flex flex-col items-center justify-center px-5 pb-5`};function wr(t,n,c,u,d,m){let h=l(`prompt-input`),_=l(`model-selector`),v=l(`ratio-selector`),y=l(`reference-images`),b=l(`reference-video`),x=l(`start-image`),S=l(`end-image`),C=l(`duration-selector`),w=l(`mode-selector`),T=l(`generate-audio-selector`),E=l(`camera-control-selector`),D=l(`cfg-scale-selector`),O=l(`negative-prompt-input`),k=l(`summary-chip`),A=l(`scenario-payment-mode`),j=l(`consumption`),M=l(`magic-icon`),N=l(`el-button`),P=l(`inspiration-drawer`);return g(),s(`div`,xr,[e(`div`,Sr,[a(h,{class:`mb-4`,onOpenInspiration:n[0]||=e=>t.inspirationOpen=!0}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),t.capabilities.referenceImages?(g(),f(y,{key:0,class:`mb-3`})):o(``,!0),t.capabilities.referenceVideo?(g(),f(b,{key:1,class:`mb-4`})):o(``,!0),a(x,{class:`mb-4`}),a(S,{class:`mb-4`}),a(C,{class:`mb-4`}),a(w,{class:`mb-4`}),a(T,{class:`mb-4`}),t.omniActive?o(``,!0):(g(),f(E,{key:2,class:`mb-4`})),t.omniActive?o(``,!0):(g(),f(D,{key:3,class:`mb-4`})),t.omniActive?o(``,!0):(g(),f(O,{key:4,class:`mb-4`}))]),e(`div`,Cr,[a(k),a(A,{scenario:`kling`}),t.walletMode?o(``,!0):(g(),f(j,{key:0,value:t.consumption,service:t.service},null,8,[`value`,`service`])),t.config?.video_url!==void 0||t.config?.custom?(g(),f(N,{key:1,type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(M,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.extend`)),1)]),_:1},8,[`onClick`])):(g(),f(N,{key:2,type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(M,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.generate`)),1)]),_:1},8,[`onClick`]))]),a(P,{modelValue:t.inspirationOpen,"onUpdate:modelValue":n[1]||=e=>t.inspirationOpen=e},null,8,[`modelValue`])])}var Tr=H(br,[[`render`,wr]]),Er=v({name:`MotionImage`,components:{UploadIcon:I,ElUpload:C,ElButton:V,InfoIcon:F,ImagePreview:Z},mixins:[J,Y,z,ge],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(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onError(){D.error(this.$t(`kling.message.uploadReferencesError`))},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,image_url:void 0})},onSetImageUrl(){let e=this.urls?.[0];this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,image_url:e})},async onSuccess(){this.onSetImageUrl()}}}),Dr={class:`relative`},Or={class:`flex justify-between`},kr={class:`flex justify-start items-center`},Ar={class:`text-sm font-bold`};function jr(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return g(),s(`div`,Dr,[e(`div`,Or,[e(`div`,kr,[e(`span`,Ar,i(t.$t(`kling.name.motionImage`)),1),a(h,{content:t.$t(`kling.description.motionImage`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:1,class:`upload-wrapper`,multiple:!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"list-type":`picture`,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferences`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Mr=H(Er,[[`render`,jr],[`__scopeId`,`data-v-4a95ef2c`]]),Nr=v({name:`MotionVideo`,components:{UploadIcon:I,ElUpload:C,ElButton:V,InfoIcon:F,FilePreview:Ae},mixins:[Y,z],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(){D.warning(this.$t(`kling.message.uploadVideoExceed`))},onError(){D.error(this.$t(`kling.message.uploadVideoError`))},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,video_url:void 0})},beforeUpload(e){let t=e.type===`video/mp4`||e.type===`video/quicktime`,n=e.size/1024/1024<100;return t?n?!0:(D.error(this.$t(`kling.message.uploadVideoSizeExceed`)),!1):(D.error(this.$t(`kling.message.uploadVideoTypeFailed`)),!1)},onSetVideoUrl(){let e=this.urls?.[0];this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,video_url:e})},async onSuccess(){this.onSetVideoUrl()}}}),Pr={class:`relative`},Fr={class:`flex justify-between`},Ir={class:`flex justify-start items-center`},Lr={class:`text-sm font-bold`};function Rr(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`file-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return g(),s(`div`,Pr,[e(`div`,Fr,[e(`div`,Ir,[e(`span`,Lr,i(t.$t(`kling.name.motionVideo`)),1),a(h,{content:t.$t(`kling.description.motionVideo`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.mp4,.mov`,name:`file`,class:`value`,"show-file-list":!0,limit:1,multiple:!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.percentage===void 0?o(``,!0):(g(),f(_,{key:0,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadVideoUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var zr=H(Nr,[[`render`,Rr],[`__scopeId`,`data-v-630c4521`]]),Br=v({name:`MotionPromptInput`,components:{ElInput:B,InfoIcon:F},computed:{prompt:{get(){return this.$store.state.kling?.motionConfig?.prompt||``},set(e){this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,prompt:e})}}}}),Vr={class:`field`},Hr={class:`box`},Ur={class:`title font-bold`};function Wr(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input`);return g(),s(`div`,Vr,[e(`div`,Hr,[e(`h2`,Ur,i(t.$t(`kling.name.motionPrompt`)),1),a(d,{content:t.$t(`kling.description.motionPrompt`),class:`info`},null,8,[`content`])]),a(f,{modelValue:t.prompt,"onUpdate:modelValue":n[0]||=e=>t.prompt=e,rows:3,type:`textarea`,class:`prompt`,placeholder:t.$t(`kling.placeholder.motionPrompt`)},null,8,[`modelValue`,`placeholder`])])}var Gr=H(Br,[[`render`,Wr],[`__scopeId`,`data-v-ca9fdbe5`]]),Kr=`video`,qr=v({name:`CharacterOrientationSelector`,components:{ElRadioGroup:k,ElRadioButton:O,InfoIcon:F},computed:{value:{get(){return this.$store.state.kling?.motionConfig?.character_orientation||Kr},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=Kr)}}),Jr={class:`field`},Yr={class:`header`},Xr={class:`text-sm font-bold`};function Zr(t,n,o,c,u,d){let f=l(`info-icon`),m=l(`el-radio-button`),h=l(`el-radio-group`);return g(),s(`div`,Jr,[e(`div`,Yr,[e(`span`,Xr,i(t.$t(`kling.name.characterOrientation`)),1),a(f,{content:t.$t(`kling.description.characterOrientation`)},null,8,[`content`])]),a(h,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,size:`small`,class:`value`},{default:p(()=>[a(m,{label:`image`},{default:p(()=>[r(i(t.$t(`kling.name.orientationImage`)),1)]),_:1}),a(m,{label:`video`},{default:p(()=>[r(i(t.$t(`kling.name.orientationVideo`)),1)]),_:1})]),_:1},8,[`modelValue`])])}var Qr=H(qr,[[`render`,Zr],[`__scopeId`,`data-v-7a91195b`]]),$r=`kling-v2-6`,ei=v({name:`MotionModelSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:F},computed:{options(){return[{value:`kling-v2-6`,label:`Kling 2.6`},{value:`kling-v3`,label:`Kling 3.0`}]},value:{get(){return this.$store.state.kling?.motionConfig?.model_name||$r},set(e){this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,model_name:e})}}},mounted(){this.$store.state.kling?.motionConfig?.model_name||(this.value=$r)}}),ti={class:`field`},ni={class:`header`},ri={class:`title font-bold`};function ii(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,ti,[e(`div`,ni,[e(`h2`,ri,i(t.$t(`kling.name.motionModel`)),1),a(m,{content:t.$t(`kling.description.motionModel`)},null,8,[`content`])]),a(v,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(_,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var ai=H(ei,[[`render`,ii],[`__scopeId`,`data-v-480e8da2`]]),oi=`std`,si=v({name:`MotionModeSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:F},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||oi},set(e){this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,mode:e})}}},mounted(){this.$store.state.kling?.motionConfig?.mode||(this.value=oi)}}),ci={class:`field`},li={class:`header`},ui={class:`title font-bold`};function di(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,ci,[e(`div`,li,[e(`h2`,ui,i(t.$t(`kling.name.mode`)),1),a(m,{content:t.$t(`kling.description.motionMode`)},null,8,[`content`])]),a(v,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(_,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var fi=H(si,[[`render`,di],[`__scopeId`,`data-v-1295688c`]]),pi=v({name:`KeepOriginalSoundSelector`,components:{ElSwitch:N,InfoIcon:F},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`})}}}}),mi={class:`relative`},hi={class:`flex justify-between items-center`},gi={class:`flex justify-start items-center`},_i={class:`text-sm font-bold`};function vi(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return g(),s(`div`,mi,[e(`div`,hi,[e(`div`,gi,[e(`span`,_i,i(t.$t(`kling.name.keepOriginalSound`)),1),a(d,{content:t.$t(`kling.description.keepOriginalSound`)},null,8,[`content`])]),a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e},null,8,[`modelValue`])])])}var yi=v({name:`MotionPanel`,components:{MagicIcon:L,ElButton:V,Consumption:Me,MotionImage:Mr,MotionVideo:zr,MotionPromptInput:Gr,CharacterOrientationSelector:Qr,MotionModelSelector:ai,MotionModeSelector:fi,KeepOriginalSoundSelector:H(pi,[[`render`,vi]])},emits:[`generate`],computed:{motionConfig(){return this.$store.state.kling?.motionConfig},consumption(){return Te({...this.motionConfig,duration:1},this.service?.cost)},service(){return this.$store.state.kling?.service},canGenerate(){let e=this.motionConfig;return!!(e?.image_url&&e?.video_url)}},methods:{onGenerate(){this.$emit(`generate`)}}}),bi={class:`flex flex-col h-full`},xi={class:`flex-1 overflow-y-auto p-5`},Si={class:`flex flex-col items-center justify-center px-5 pb-5`};function Ci(t,n,o,c,u,d){let f=l(`motion-image`),m=l(`motion-video`),h=l(`motion-prompt-input`),_=l(`character-orientation-selector`),v=l(`motion-model-selector`),y=l(`motion-mode-selector`),b=l(`keep-original-sound-selector`),x=l(`consumption`),S=l(`magic-icon`),C=l(`el-button`);return g(),s(`div`,bi,[e(`div`,xi,[a(f,{class:`mb-3`}),a(m,{class:`mb-3`}),a(h,{class:`mb-4`}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),a(y,{class:`mb-4`}),a(b,{class:`mb-4`})]),e(`div`,Si,[a(x,{value:t.consumption,service:t.service,"rate-unit":t.$t(`kling.name.perSecond`),note:t.$t(`kling.message.motionPricingNote`)},null,8,[`value`,`service`,`rate-unit`,`note`]),a(C,{type:`primary`,class:`btn w-full`,round:``,disabled:!t.canGenerate,onClick:t.onGenerate},{default:p(()=>[a(S,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.generateMotion`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var wi=H(yi,[[`render`,Ci]]),Ti=v({name:`KlingTabSwitcher`,components:{ElTabs:x,ElTabPane:S,ElTag:me},props:{modelValue:{type:String,default:`videos`}},emits:[`update:modelValue`],computed:{tabs(){return[{value:`videos`,label:this.$t(`kling.tab.videoGeneration`)},{value:`motion`,label:this.$t(`kling.tab.motionControl`)},{value:`talking-photo`,label:this.$t(`kling.tab.talkingPhoto`)}]}},methods:{onUpdate(e){this.$emit(`update:modelValue`,e)}}}),Ei=[`title`],Di={class:`text`};function Oi(t,n,a,u,d,m){let _=l(`el-tag`),v=l(`el-tab-pane`),y=l(`el-tabs`);return g(),f(y,{"model-value":t.modelValue,class:`kling-tabs scenario-tabs scenario-tabs--divided`,"onUpdate:modelValue":t.onUpdate},{default:p(()=>[(g(!0),s(c,null,h(t.tabs,t=>(g(),f(v,{key:t.value,name:t.value,disabled:t.disabled},{label:p(()=>[e(`span`,{class:`tab-label`,title:t.disabled?t.disabledReason:void 0},[e(`span`,Di,i(t.label),1),t.badge?(g(),f(_,{key:0,size:`small`,type:`warning`,class:`badge`},{default:p(()=>[r(i(t.badge),1)]),_:2},1024)):o(``,!0)],8,Ei)]),_:2},1032,[`name`,`disabled`]))),128))]),_:1},8,[`model-value`,`onUpdate:modelValue`])}var ki=H(Ti,[[`render`,Oi],[`__scopeId`,`data-v-e6a2bb26`]]),Ai={"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`},ji=v({name:`TalkingPhotoModelSelector`,components:{ElSelect:y,ElOption:b},data(){return{options:de.map(e=>({value:e,label:Ai[e]||e}))}},computed:{value:{get(){return this.$store.state.kling?.talkingPhotoConfig?.model||`kling-v2-1-master`},set(e){this.$store.commit(`kling/setTalkingPhotoConfig`,{...this.$store.state.kling?.talkingPhotoConfig,model:e})}}},mounted(){this.$store.state.kling?.talkingPhotoConfig?.model||(this.value=fe)}}),Mi={class:`field`},Ni={class:`title font-bold`};function Pi(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,Mi,[e(`h2`,Ni,i(t.$t(`kling.name.model`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Fi=H(ji,[[`render`,Pi],[`__scopeId`,`data-v-cbc83d11`]]),Ii=v({name:`TalkingPhotoModeSelector`,components:{ElSelect:y,ElOption:b},computed:{options(){return[{value:`std`,label:this.$t(`kling.name.modeStd`)},{value:`pro`,label:this.$t(`kling.name.modePro`)}]},value:{get(){return this.$store.state.kling?.talkingPhotoConfig?.mode||`pro`},set(e){this.$store.commit(`kling/setTalkingPhotoConfig`,{...this.$store.state.kling?.talkingPhotoConfig,mode:e})}}},mounted(){this.$store.state.kling?.talkingPhotoConfig?.mode||(this.value=`pro`)}}),Li={class:`field`},Ri={class:`title font-bold`};function zi(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,Li,[e(`h2`,Ri,i(t.$t(`kling.name.mode`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Bi=v({name:`TalkingPhotoPanel`,components:{MagicIcon:L,UploadIcon:I,ElUpload:C,ElButton:V,ElInput:B,Consumption:Me,InfoIcon:F,ImagePreview:Z,ModelSelector:Fi,ModeSelector:H(Ii,[[`render`,zi],[`__scopeId`,`data-v-92525a1d`]]),ScenarioPaymentMode:Ie},mixins:[z,ge],emits:[`generate`],data(){return{imageFiles:[],audioFiles:[],uploadUrl:K()+`/api/v1/files/`,quoteTimer:0,quoteRunId:0}},computed:{config(){return this.$store.state.kling?.talkingPhotoConfig||{}},audioUrl(){return this.config.audio_url},headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},service(){return this.$store.state.kling?.service},consumption(){return Te({...this.config,action:`talking-photo`},this.service?.cost)},canGenerate(){return!!(this.config.image_url&&this.config.audio_url)},walletMode(){return Ee()&&G(`kling`).mode===`wallet`}},watch:{walletMode:{handler(e){e&&this.scheduleQuote()},immediate:!0},config:{handler(){this.walletMode&&this.scheduleQuote()},deep:!0}},beforeUnmount(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1},methods:{scheduleQuote(){window.clearTimeout(this.quoteTimer),this.quoteTimer=window.setTimeout(this.refreshQuote,350)},async refreshQuote(){let e=G(`kling`),t=++this.quoteRunId;e.quoteLoading=!0,e.quoteUsdc=void 0;try{let n=await q.quoteTalkingPhoto(he(this.config));t===this.quoteRunId&&e.mode===`wallet`&&(e.quoteUsdc=n.amountUsdc)}catch(e){console.warn(`x402 quote failed`,e)}finally{t===this.quoteRunId&&(e.quoteLoading=!1)}},commit(e){this.$store.commit(`kling/setTalkingPhotoConfig`,{...this.config,...e})},onPromptChange(e){this.commit({prompt:e})},onImageExceed(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onImageError(){D.error(this.$t(`kling.message.uploadReferencesError`))},onImageSuccess(e){this.commit({image_url:e?.file_url})},onImageRemove(e){this.imageFiles.splice(this.imageFiles.indexOf(e),1),this.commit({image_url:void 0})},onAudioExceed(){D.warning(this.$t(`kling.message.uploadAudioExceed`))},onAudioError(){D.error(this.$t(`kling.message.uploadAudioError`))},onAudioSuccess(e){this.commit({audio_url:e?.file_url})},onAudioRemove(){this.commit({audio_url:void 0})},onGenerate(){this.$emit(`generate`)}}}),Vi={class:`flex flex-col h-full`},Hi={class:`flex-1 overflow-y-auto p-5`},Ui={class:`relative mb-4`},Wi={class:`flex justify-start items-center`},Gi={class:`text-sm font-bold`},Ki={class:`relative mb-4`},qi={class:`flex justify-start items-center`},Ji={class:`text-sm font-bold`},Yi=[`src`],Xi={class:`mb-4`},Zi={class:`flex justify-start items-center`},Qi={class:`text-sm font-bold`},$i={class:`flex flex-col items-center justify-center px-5 pb-5`};function ea(t,n,c,u,d,m){let h=l(`model-selector`),_=l(`mode-selector`),v=l(`info-icon`),y=l(`image-preview`),b=l(`upload-icon`),x=l(`el-button`),S=l(`el-upload`),C=l(`el-input`),w=l(`scenario-payment-mode`),T=l(`consumption`),E=l(`magic-icon`);return g(),s(`div`,Vi,[e(`div`,Hi,[a(h,{class:`mb-4`}),a(_,{class:`mb-4`}),e(`div`,Ui,[e(`div`,Wi,[e(`span`,Gi,i(t.$t(`kling.name.talkingPhotoImage`)),1),a(v,{content:t.$t(`kling.description.talkingPhotoImage`)},null,8,[`content`])]),a(S,{ref:`imageUploader`,"file-list":t.imageFiles,"onUpdate:fileList":n[0]||=e=>t.imageFiles=e,name:`file`,accept:`.png,.jpg,.jpeg,.webp,.bmp`,limit:1,class:`upload-wrapper`,multiple:!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"list-type":`picture`,headers:t.headers,"on-exceed":t.onImageExceed,"on-error":t.onImageError,"on-success":t.onImageSuccess},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(y,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onImageRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(x,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(b,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferences`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`headers`,`on-exceed`,`on-error`,`on-success`])]),e(`div`,Ki,[e(`div`,qi,[e(`span`,Ji,i(t.$t(`kling.name.talkingPhotoAudio`)),1),a(v,{content:t.$t(`kling.description.talkingPhotoAudio`)},null,8,[`content`])]),a(S,{ref:`audioUploader`,"file-list":t.audioFiles,"onUpdate:fileList":n[1]||=e=>t.audioFiles=e,name:`file`,accept:`.mp3,.wav,.m4a,.aac`,limit:1,class:`upload-wrapper`,multiple:!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,headers:t.headers,"on-exceed":t.onAudioExceed,"on-error":t.onAudioError,"on-success":t.onAudioSuccess,"on-remove":t.onAudioRemove},{default:p(()=>[a(x,{round:``,type:`primary`,size:`small`,class:`btn`},{default:p(()=>[a(b,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadAudio`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`headers`,`on-exceed`,`on-error`,`on-success`,`on-remove`]),t.audioUrl?(g(),s(`audio`,{key:0,src:t.audioUrl,controls:``,class:`w-full mt-2`},null,8,Yi)):o(``,!0)]),e(`div`,Xi,[e(`div`,Zi,[e(`span`,Qi,i(t.$t(`kling.name.talkingPhotoPrompt`)),1),a(v,{content:t.$t(`kling.description.talkingPhotoPrompt`)},null,8,[`content`])]),a(C,{"model-value":t.config.prompt,type:`textarea`,rows:2,placeholder:t.$t(`kling.placeholder.talkingPhotoPrompt`),class:`mt-1`,"onUpdate:modelValue":t.onPromptChange},null,8,[`model-value`,`placeholder`,`onUpdate:modelValue`])])]),e(`div`,$i,[a(w,{scenario:`kling`}),t.walletMode?o(``,!0):(g(),f(T,{key:0,value:t.consumption,service:t.service},null,8,[`value`,`service`])),a(x,{type:`primary`,class:`btn w-full`,round:``,disabled:!t.canGenerate,onClick:t.onGenerate},{default:p(()=>[a(E,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.generateTalkingPhoto`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var ta=H(Bi,[[`render`,ea],[`__scopeId`,`data-v-791e4108`]]),na=v({name:`TaskPreview`,components:{DeleteIcon:ce,ChannelIcon:re,InfoIcon:oe,MagicIcon:L,TimeIcon:P,WarningIcon:le,CopyToClipboard:Oe,ElAlert:T,VideoPlayer:Pe,ElTooltip:w,ElButton:V,ImagePreview:Z,VideoPreview:Fe,AudioPreview:Ne,ApiCodeButton:Le,ReportButton:ke},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{isFailure(){let e=this.modelValue?.response;return e?.success===!1||!!e?.error||e?.state===`failed`||e?.state===`cancelled`},isWaiting(){let e=this.modelValue?.response;return!e||!this.isFailure&&e.success!==!0&&!e.video_url},application(){return this.$store.state.kling?.application},config(){return this.$store.state.kling?.config},displayText(){return this.modelValue?.request?.prompt?.trim()||this.modelValue?.request?.text?.trim()||``},referenceImages(){let e=[],t=this.modelValue?.request?.start_image_url,n=this.modelValue?.request?.end_image_url,r=this.modelValue?.request?.image_url;return t&&e.push({url:t,name:`start-image`}),n&&e.push({url:n,name:`end-image`}),r&&e.push({url:r,name:`reference-image`}),e},referenceVideos(){let e=[],t=this.modelValue?.request?.video_url;t&&e.push({url:t,name:`reference-video`});let n=this.modelValue?.request?.video_list;return(Array.isArray(n)?n:[]).forEach((t,n)=>{t?.video_url&&e.push({url:t.video_url,name:`reference-video-${n+1}`})}),e},referenceAudios(){let e=this.modelValue?.request?.audio_url;return e?[{url:e,name:`reference-audio`}]:[]}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await X.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`kling/deleteTask`,{id:e}),D.success(this.$t(`common.message.deleteTaskSuccess`))}catch{D.error(this.$t(`common.message.deleteTaskFailed`))}}},onDownload(e,t){e?.stopPropagation(),console.log(`on download`),window.open(t,`_blank`)},onOpenVideo(e){window.open(e,`_blank`)}}}),ra={class:`preview`},ia={class:`left`},aa={class:`main`},oa={class:`bot`},sa={class:`datetime`},ca=[`aria-label`],la={key:0,class:`info`},ua={key:0,class:`request-media flex justify-start items-center gap-2 w-full overflow-x-auto`},da={key:1,class:`prompt`},fa={key:0},pa={key:1},ma={key:1,class:n({content:!0,failed:!0})},ha={key:0,class:`mb-4`},ga={key:1,class:n({operations:!0,"mt-2":!0})},_a={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},va={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ya={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},ba={key:2,class:n({content:!0})},xa={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Sa={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ca={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},wa={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Ta={key:3,class:n({content:!0})},Ea={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Da={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function Oa(n,u,d,m,_,v){let y=l(`capability-presentation`),b=l(`delete-icon`),x=l(`el-tooltip`),S=l(`image-preview`),C=l(`video-preview`),w=l(`audio-preview`),T=l(`video-player`),E=l(`el-button`),D=l(`api-code-button`),O=l(`report-button`),k=l(`channel-icon`),A=l(`magic-icon`),j=l(`copy-to-clipboard`),M=l(`time-icon`),N=l(`el-alert`),P=l(`warning-icon`),F=l(`info-icon`);return g(),s(`div`,ra,[e(`div`,ia,[a(y,{capability:`kling`,part:`avatar`,class:`avatar`})]),e(`div`,aa,[e(`div`,oa,[a(y,{capability:`kling`,part:`name`}),e(`span`,sa,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(x,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:p(()=>[n.modelValue?.id?(g(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:u[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,ca)):o(``,!0)]),_:1},8,[`content`])]),n.referenceImages.length>0||n.referenceVideos.length>0||n.referenceAudios.length>0||n.displayText?(g(),s(`div`,la,[n.referenceImages.length>0||n.referenceVideos.length>0||n.referenceAudios.length>0?(g(),s(`div`,ua,[(g(!0),s(c,null,h(n.referenceImages,(e,t)=>(g(),f(S,{key:`image-${t}`,url:e.url,name:e.name,closable:!1},null,8,[`url`,`name`]))),128)),(g(!0),s(c,null,h(n.referenceVideos,(e,t)=>(g(),f(C,{key:`video-${t}`,url:e.url,name:e.name},null,8,[`url`,`name`]))),128)),(g(!0),s(c,null,h(n.referenceAudios,(e,t)=>(g(),f(w,{key:`audio-${t}`,url:e.url,name:e.name},null,8,[`url`,`name`]))),128))])):o(``,!0),n.displayText?(g(),s(`p`,da,[r(i(n.displayText)+` `,1),n.modelValue?.response?n.isWaiting?(g(),s(`span`,pa,` - (`+i(n.$t(`kling.status.processing`))+`) `,1)):o(``,!0):(g(),s(`span`,fa,` - (`+i(n.$t(`kling.status.pending`))+`) `,1))])):o(``,!0)])):o(``,!0),n.modelValue?.response?.success===!0&&!n.isFailure?(g(),s(`div`,ma,[n.modelValue?.response.video_url?(g(),s(`div`,ha,[a(T,{src:n.modelValue?.response.video_url},null,8,[`src`])])):o(``,!0),n.modelValue?.response.success?(g(),s(`div`,ga,[a(x,{class:`box-item`,effect:`dark`,content:n.$t(`kling.message.downloadVideo`),placement:`top-start`},{default:p(()=>[n.modelValue?.response.video_url?(g(),f(E,{key:0,type:`info`,size:`small`,class:`btn-action`,onClick:u[1]||=e=>n.onDownload(e,n.modelValue?.response.video_url)},{default:p(()=>[r(i(n.$t(`kling.button.download`)),1)]),_:1})):o(``,!0)]),_:1},8,[`content`]),a(D,{path:`/kling/videos`,body:n.modelValue?.request},null,8,[`body`]),a(O,{service:`kling`,"target-id":n.modelValue?.id,snapshot:{prompt:n.displayText}},null,8,[`target-id`,`snapshot`])])):o(``,!0),a(N,{closable:!1,class:`mt-2 success`},{default:p(()=>[e(`p`,_a,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.model`))+`: `+i(n.modelValue?.request?.model),1)]),e(`p`,va,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(j,{content:n.modelValue?.id},null,8,[`content`])]),n.modelValue?.elapsed?(g(),s(`p`,ya,[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0)]),_:1})])):o(``,!0),n.isFailure?(g(),s(`div`,ba,[a(N,{closable:!1,class:`failure`},{template:p(()=>[a(P,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.failure`)),1)]),default:p(()=>[e(`p`,xa,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(j,{content:n.modelValue?.id},null,8,[`content`])]),e(`p`,Sa,[a(F,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(j,{content:n.modelValue?.response?.error?.message},null,8,[`content`])]),n.modelValue?.elapsed?(g(),s(`p`,Ca,[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),n.modelValue?.response?.trace_id?(g(),s(`p`,wa,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(j,{content:n.modelValue?.response?.trace_id},null,8,[`content`])])):o(``,!0)]),_:1})])):o(``,!0),n.isWaiting?(g(),s(`div`,Ta,[a(N,{closable:!1,class:`info`},{template:p(()=>[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(n.modelValue?.response?`kling.status.processing`:`kling.status.pending`)),1)]),default:p(()=>[e(`p`,Ea,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(j,{content:n.modelValue?.id},null,8,[`content`])]),n.modelValue?.response?.trace_id?(g(),s(`p`,Da,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(j,{content:n.modelValue?.response?.trace_id},null,8,[`content`])])):o(``,!0)]),_:1})])):o(``,!0)])])}var ka=v({name:`RecentPanel`,components:{TaskPreview:H(na,[[`render`,Oa],[`__scopeId`,`data-v-73637147`]]),NoTasks:ne,BotPlaceholder:Re,ScrollList:te},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?.()}}}),Aa={key:0},ja={key:2,class:`w-full h-full flex items-center justify-center`};function Ma(e,t,n,r,i,u){let d=l(`bot-placeholder`),m=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return g(),s(c,null,[e.tasks?.items===void 0?(g(),s(`div`,Aa,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(g(),f(_,{key:1,ref:`scrollList`,class:`h-full w-full overflow-y-auto tasks`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(g(!0),s(c,null,h(e.tasks?.items,e=>(g(),f(m,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(g(),s(`div`,ja,[a(v)])):o(``,!0)],64)}var Na=v({name:`KlingIndex`,components:{ConfigPanel:Tr,MotionPanel:wi,TalkingPhotoPanel:ta,TabSwitcher:ki,Layout:We,RecentPanel:H(ka,[[`render`,Ma]])},mixins:[Se],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1,walletTaskIds:[]}},computed:{applicationsLoading(){return this.$store.state.kling?.status?.getApplications===E.Request},tasksLoading(){return this.$store.state.kling?.status?.getTasks===E.Request||this.fetchingTasks},credential(){return this.$store.state.kling.credential},config(){return this.$store.state.kling.config},motionConfig(){return this.$store.state.kling.motionConfig},talkingPhotoConfig(){return this.$store.state.kling.talkingPhotoConfig},taskType(){return this.$store.state.kling.taskType||`videos`},tasks(){return this.$store.state.kling.tasks},walletMode(){return this.taskType!==`motion`&&Ee()&&G(`kling`).mode===`wallet`}},watch:{walletMode:{async handler(e,t){if(!(t===void 0||e===t)){if(this.$store.commit(`kling/setTasks`,void 0),e&&!this.job&&(this.job=window.setInterval(this.onGetTasks,5e3)),!e&&!this.credential?.token){window.clearInterval(this.job),this.job=0,await this.onScrollDown();return}await this.onGetTasks(),await this.onScrollDown()}}},tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job||=window.setInterval(this.onGetTasks,5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await ie({tasks:this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`kling/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`kling/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`kling/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r,...this.walletMode&&!this.credential?.token?{mode:`x402`,ids:this.walletTaskIds}:{}})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!W(this.uploadTracker,e=>this.$t(e),e=>D.warning(e)))return;let e=_e(this.config),t=Number(!!e.start_image_url)+Number(!!e.end_image_url),n=e.image_list?.length||0,r=e.video_list?.length?4:7;if(t+n>r){D.warning(this.$t(`kling.message.referenceImagesTotalLimit`,{count:r}));return}if(e.video_list?.[0]?.refer_type===`base`&&(e.start_image_url||e.end_image_url||e.image_list?.some(({type:e})=>e))){D.warning(this.$t(`kling.message.baseVideoFrameConflict`));return}if(!e.video_id&&!e.video_url&&!e.start_image_url&&e.end_image_url){D.warning(this.$t(`kling.message.endImageRequiresStart`));return}let i=this.createPaymentOperation(t=>q.generate(e,t));i&&(D.info(this.$t(`kling.message.startingTask`)),U(`kling`,i).then(e=>{this.recordWalletTask(e),D.success(this.$t(`kling.message.startTaskSuccess`))}).catch(e=>this.handleGenerationError(e)).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)}))},createPaymentOperation(e){if(!this.walletMode){if(!De())return;let t=this.credential?.token;return t?e({token:t}):void 0}let t=this.getWalletContext();if(!t){D.warning(this.$t(`common.x402Scenario.connectWalletFirst`));return}return e({mode:`x402`,x402:{wallet:t,confirm:e=>this.confirmWalletPayment(e),identityToken:this.credential?.token}})},recordWalletTask(e){let t=e?.data?.task_id;this.walletMode&&!this.credential?.token&&t&&!this.walletTaskIds.includes(t)&&this.walletTaskIds.unshift(t)},handleGenerationError(e){e instanceof be||((e?.response?.data)?.error?.code===`used_up`?D.error(this.$t(`kling.message.usedUp`)):this.walletMode?D.error(`${this.$t(`common.x402Scenario.paymentFailed`)} ${e?.message||``}`.trim()):D.error(this.$t(`kling.message.startTaskFailed`)))},getWalletContext(){return pe(this.$wallet)},async confirmWalletPayment(e){return X.confirm(this.$t(`common.x402Scenario.confirmPayment`,{amount:e.amountUsdc}),this.$t(`order.message.x402ConfirmTitle`),{confirmButtonText:this.$t(`order.message.x402WalletPayCta`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`}).then(()=>!0).catch(()=>!1)},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()},async onTabChange(e){e!==this.taskType&&(e===`motion`&&we(`kling`,`credits`),await this.$store.dispatch(`kling/setTaskType`,e),await this.onGetTasks(),await this.onScrollDown())},async onGenerateMotion(){if(!W(this.uploadTracker,e=>this.$t(e),e=>D.warning(e)))return;let e=this.motionConfig||{};if(!e.image_url||!e.video_url){D.warning(this.$t(`kling.message.motionMissingInputs`));return}let t={image_url:e.image_url,video_url:e.video_url,character_orientation:e.character_orientation||`video`,mode:e.mode||`std`,keep_original_sound:e.keep_original_sound??`yes`,...e.model_name?{model_name:e.model_name}:{},...e.prompt?{prompt:e.prompt}:{},async:!0};if(!De())return;let n=this.credential?.token;if(!n){console.error(`no token specified`);return}D.info(this.$t(`kling.message.startingTask`)),U(`kling`,q.motion(t,{token:n})).then(()=>{D.success(this.$t(`kling.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?D.error(this.$t(`kling.message.usedUp`)):D.error(this.$t(`kling.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},async onGenerateTalkingPhoto(){if(!W(this.uploadTracker,e=>this.$t(e),e=>D.warning(e)))return;let e=this.talkingPhotoConfig||{};if(!e.image_url||!e.audio_url){D.warning(this.$t(`kling.message.talkingPhotoMissingInputs`));return}let t=he(e),n=this.createPaymentOperation(e=>q.talkingPhoto(t,e));n&&(D.info(this.$t(`kling.message.startingTask`)),U(`kling`,n).then(e=>{this.recordWalletTask(e),D.success(this.$t(`kling.message.startTaskSuccess`))}).catch(e=>this.handleGenerationError(e)).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)}))}}}),Pa={class:`flex flex-col h-full`},Fa={class:`flex-1 min-h-0`};function Ia(t,n,r,i,s,c){let u=l(`tab-switcher`),d=l(`config-panel`),m=l(`motion-panel`),h=l(`talking-photo-panel`),_=l(`recent-panel`),v=l(`layout`);return g(),f(v,null,{config:p(()=>[e(`div`,Pa,[a(u,{"model-value":t.taskType,"onUpdate:modelValue":t.onTabChange},null,8,[`model-value`,`onUpdate:modelValue`]),e(`div`,Fa,[t.taskType===`videos`?(g(),f(d,{key:0,onGenerate:t.onGenerate},null,8,[`onGenerate`])):t.taskType===`motion`?(g(),f(m,{key:1,onGenerate:t.onGenerateMotion},null,8,[`onGenerate`])):t.taskType===`talking-photo`?(g(),f(h,{key:2,onGenerate:t.onGenerateTalkingPhoto},null,8,[`onGenerate`])):o(``,!0)])])]),result:p(()=>[a(_,{ref:`recentPanel`,loading:t.loadingMore,onReachTop:t.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var La=H(Na,[[`render`,Ia]]);export{La as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,Gt as t,I as n,Jt as r,L as i,M as a,N as o,T as s,at as c,j as l,mt as u,qt as ee,rt as d,tt as f,z as p}from"./vendor-chart-Dw-P17PN.js";import{t as m}from"./arrow-right-CBi9bCfZ.js";import{t as h}from"./check-Dp9-eY7h.js";import{Qi as g}from"./constants-fPCXwWF5.js";import{M as _,O as v,ga as y,i as b,r as x}from"./index-BcBWKKi1.js";var S=(e,t)=>({zh:e,en:t}),C={chatDesktop:S(`https://cdn.acedata.cloud/uploads/24b9ad71-e5c0-4550-b950-d52e73d74926`,`https://cdn.acedata.cloud/uploads/850faad3-4acd-4a4f-9f1a-29ca77119274`),chatMobile:S(`https://cdn.acedata.cloud/uploads/4bf02973-6482-4c5b-8174-83740d22ecca`,`https://cdn.acedata.cloud/uploads/1401bef2-4588-429a-9d5e-c3655a6a51a7`),midjourneyDesktop:S(`https://cdn.acedata.cloud/uploads/d5d1566f-893c-4dac-bf3d-3b181b7e8ab3`,`https://cdn.acedata.cloud/uploads/21379382-9aef-4597-8d6f-6bad33375943`),midjourneyMobile:S(`https://cdn.acedata.cloud/uploads/0671efb0-5f62-461c-b3a7-8b8eb08a6c39`,`https://cdn.acedata.cloud/uploads/93be4fb8-24bc-47f1-9fea-2d6504ec17f7`),nanobananaDesktop:S(`https://cdn.acedata.cloud/uploads/089b6deb-1ff1-4cf5-b938-36a2493a40da`,`https://cdn.acedata.cloud/uploads/165db012-430e-455c-844e-cd88bc88f60c`),nanobananaMobile:S(`https://cdn.acedata.cloud/uploads/8154ce9b-f221-4543-86c8-7e4556ee1917`,`https://cdn.acedata.cloud/uploads/6358331d-acf7-4784-b4f0-4f15189f9876`),seedreamDesktop:S(`https://cdn.acedata.cloud/uploads/7e45490e-8b41-48e9-9d31-dfae7072a7fa`,`https://cdn.acedata.cloud/uploads/91c96b92-31ff-4e99-bdd7-5314d1781246`),fluxDesktop:S(`https://cdn.acedata.cloud/uploads/7f7caa8d-5d61-4c03-9b14-14ddc865be5a`,`https://cdn.acedata.cloud/uploads/63e300df-a3c1-43c7-b170-6fd3fdfe15b5`),sunoDesktop:S(`https://cdn.acedata.cloud/uploads/5ab7f19e-2047-4c62-a228-ae4170ca58b0`,`https://cdn.acedata.cloud/uploads/6e962c96-1b2c-4e17-a791-e1c4a7929ba3`),sunoMobile:S(`https://cdn.acedata.cloud/uploads/f3a06507-d4fa-4568-9803-cfacfa39cfd6`,`https://cdn.acedata.cloud/uploads/aff42de2-62fe-43ad-9dd7-ceac814880e5`),fishDesktop:S(`https://cdn.acedata.cloud/uploads/db375091-7ddc-4d36-a4f8-db13fe1df424`,`https://cdn.acedata.cloud/uploads/d50b6bcd-e6a3-4863-a964-c68f259c4ae0`),klingDesktop:S(`https://cdn.acedata.cloud/uploads/fd38b6c8-9794-4414-884c-9ca9619c7da6`,`https://cdn.acedata.cloud/uploads/3531e27b-58d8-4c65-9010-148b7c785560`),klingMobile:S(`https://cdn.acedata.cloud/uploads/3abfa61f-d735-4a1d-b983-8b09a9c9e5f0`,`https://cdn.acedata.cloud/uploads/c3cb4afb-f554-4031-8f8b-c91359906f18`),veoDesktop:S(`https://cdn.acedata.cloud/uploads/e8291d40-e2d1-465e-88b6-3febbbba9a9b`,`https://cdn.acedata.cloud/uploads/efc32760-db07-439d-beff-ceaef735c3b4`),seedanceDesktop:S(`https://cdn.acedata.cloud/uploads/26a91d87-e267-4e39-9bbd-a2c5c8ec0cdc`,`https://cdn.acedata.cloud/uploads/8fd9cdc3-41f8-4d2f-9f32-60d083683307`),maestroDesktop:S(`https://cdn.acedata.cloud/uploads/e20d1a42-7824-4803-b6b6-8d121a7eb713`,`https://cdn.acedata.cloud/uploads/3b6887f8-5be1-4a19-9fcc-45ec6d695af0`),maestroMobile:S(`https://cdn.acedata.cloud/uploads/72648704-4c8e-40b4-9a60-70cbecc76401`,`https://cdn.acedata.cloud/uploads/12879735-e957-4c04-a30a-e6f463435bd7`),digitalHumanDesktop:S(`https://cdn.acedata.cloud/uploads/3a49d5fa-cd7a-4fb6-a6c0-e4f0a6d56d4d`,`https://cdn.acedata.cloud/uploads/b2ce6c5c-56d3-45e7-9d9e-598b5dfd9ae4`),serpDesktop:S(`https://cdn.acedata.cloud/uploads/8ccda980-60e5-4db7-9d99-66628ced5c44`,`https://cdn.acedata.cloud/uploads/94c23b79-4af7-4afd-9deb-1ac760e01950`),webextratorDesktop:S(`https://cdn.acedata.cloud/uploads/e1b19df4-1720-4674-abdd-9db0f7f529b2`,`https://cdn.acedata.cloud/uploads/6c9e4c43-d0bc-4a63-ba9e-4e9fbbd6b245`),codingBridgeDesktop:S(`https://cdn.acedata.cloud/uploads/ef0be118-adfa-4814-b672-a6977915e7f0`,`https://cdn.acedata.cloud/uploads/97d60828-c1c1-4ebb-a219-30bbed1e6353`),connectorsDesktop:S(`https://cdn.acedata.cloud/uploads/5a5ce9af-8a88-44c5-9262-dbf276aa5058`,`https://cdn.acedata.cloud/uploads/fb40fc97-9177-4778-b02a-0f2f1f37ad6c`)},w=[{key:`chat`,featureKeys:[`chatgpt`,`claude`,`gemini`,`grok`,`deepseek`,`kimi`],eyebrowKey:`intro.eyebrow.chat`,titleKey:`intro.title.chat`,siteTitleKey:`intro.title.site.chat`,subtitleKey:`intro.subtitle.chat`,bullets:[{key:`intro.bullet.chat.models`,catalogOnly:!0},{key:`intro.bullet.chat.multimodal`},{key:`intro.bullet.chat.agentic`}],entries:[{name:`ChatGPT`,descriptionKey:`intro.model.chatgpt`,featureKey:`chatgpt`,path:`/chatgpt`},{name:`Claude`,descriptionKey:`intro.model.claude`,featureKey:`claude`,path:`/claude`},{name:`Gemini`,descriptionKey:`intro.model.gemini`,featureKey:`gemini`,path:`/gemini`},{name:`Grok`,descriptionKey:`intro.model.grok`,featureKey:`grok`,path:`/grok`},{name:`DeepSeek`,descriptionKey:`intro.model.deepseek`,featureKey:`deepseek`,path:`/deepseek`},{name:`Kimi`,descriptionKey:`intro.model.kimi`,featureKey:`kimi`,path:`/kimi`},{name:`GLM`,descriptionKey:`intro.model.glm`,featureKey:`chatgpt`,icon:g,path:`/chatgpt`}],path:`/chatgpt`,screenshots:{chatgpt:{desktop:C.chatDesktop,mobile:C.chatMobile}}},{key:`image`,featureKeys:[`midjourney`,`nanobanana`,`openaiimage`,`seedream`,`flux`,`qrart`],eyebrowKey:`intro.eyebrow.image`,titleKey:`intro.title.image`,siteTitleKey:`intro.title.site.image`,subtitleKey:`intro.subtitle.image`,bullets:[{key:`intro.bullet.image.models`,catalogOnly:!0},{key:`intro.bullet.image.editing`,featureKeys:[`nanobanana`,`openaiimage`,`seedream`]},{key:`intro.bullet.image.resolution`,featureKeys:[`nanobanana`,`openaiimage`,`seedream`]}],entries:[{name:`Midjourney`,descriptionKey:`intro.model.midjourney`,featureKey:`midjourney`,path:`/midjourney`},{name:`Nano Banana`,descriptionKey:`intro.model.nanobanana`,featureKey:`nanobanana`,path:`/nanobanana`},{name:`GPT Image`,descriptionKey:`intro.model.gptimage`,featureKey:`openaiimage`,path:`/openaiimage`},{name:`Seedream`,descriptionKey:`intro.model.seedream`,featureKey:`seedream`,path:`/seedream`},{name:`Flux`,descriptionKey:`intro.model.flux`,featureKey:`flux`,path:`/flux`},{name:`QR Art`,descriptionKey:`intro.model.qrart`,featureKey:`qrart`,path:`/qrart`}],path:`/nanobanana`,screenshots:{midjourney:{desktop:C.midjourneyDesktop,mobile:C.midjourneyMobile},nanobanana:{desktop:C.nanobananaDesktop,mobile:C.nanobananaMobile},seedream:{desktop:C.seedreamDesktop},flux:{desktop:C.fluxDesktop}}},{key:`video`,featureKeys:[`kling`,`veo`,`sora`,`seedance`,`hailuo`,`minimax`,`luma`,`wan`,`pixverse`,`grokvideo`,`omni`],eyebrowKey:`intro.eyebrow.video`,titleKey:`intro.title.video`,siteTitleKey:`intro.title.site.video`,subtitleKey:`intro.subtitle.video`,bullets:[{key:`intro.bullet.video.models`,catalogOnly:!0},{key:`intro.bullet.video.control`,featureKeys:[`kling`,`veo`,`seedance`,`luma`]},{key:`intro.bullet.video.quality`,featureKeys:[`kling`,`seedance`,`grokvideo`]}],entries:[{name:`Kling`,descriptionKey:`intro.model.kling`,featureKey:`kling`,path:`/kling`},{name:`Veo`,descriptionKey:`intro.model.veo`,featureKey:`veo`,path:`/veo`},{name:`Sora`,descriptionKey:`intro.model.sora`,featureKey:`sora`,path:`/sora`},{name:`Seedance`,descriptionKey:`intro.model.seedance`,featureKey:`seedance`,path:`/seedance`},{name:`Hailuo`,descriptionKey:`intro.model.hailuo`,featureKey:`hailuo`,path:`/hailuo`},{name:`MiniMax H3`,descriptionKey:`intro.model.minimax`,featureKey:`minimax`,path:`/minimax`},{name:`Luma`,descriptionKey:`intro.model.luma`,featureKey:`luma`,path:`/luma`},{name:`Wan`,descriptionKey:`intro.model.wan`,featureKey:`wan`,path:`/wan`},{name:`Pixverse`,descriptionKey:`intro.model.pixverse`,featureKey:`pixverse`,path:`/pixverse`},{name:`Grok Imagine`,descriptionKey:`intro.model.grokvideo`,featureKey:`grokvideo`,path:`/grokvideo`},{name:`Omni`,descriptionKey:`intro.model.omni`,featureKey:`omni`,path:`/omni`}],path:`/kling`,screenshots:{kling:{desktop:C.klingDesktop,mobile:C.klingMobile},veo:{desktop:C.veoDesktop},seedance:{desktop:C.seedanceDesktop}}},{key:`music`,featureKeys:[`suno`,`producer`,`fish`],eyebrowKey:`intro.eyebrow.music`,titleKey:`intro.title.music`,siteTitleKey:`intro.title.site.music`,subtitleKey:`intro.subtitle.music`,bullets:[{key:`intro.bullet.music.models`},{key:`intro.bullet.music.control`,featureKeys:[`suno`,`producer`]},{key:`intro.bullet.music.voice`,featureKeys:[`fish`]}],entries:[{name:`Suno`,descriptionKey:`intro.model.suno`,featureKey:`suno`,path:`/suno`},{name:`Producer`,descriptionKey:`intro.model.producer`,featureKey:`producer`,path:`/producer`},{name:`Fish Audio`,descriptionKey:`intro.model.fish`,featureKey:`fish`,path:`/fish`}],path:`/suno`,screenshots:{suno:{desktop:C.sunoDesktop,mobile:C.sunoMobile},fish:{desktop:C.fishDesktop}}},{key:`production`,featureKeys:[`maestro`,`digitalhuman`,`poivelle`],eyebrowKey:`intro.eyebrow.production`,titleKey:`intro.title.production`,siteTitleKey:`intro.title.site.production`,subtitleKey:`intro.subtitle.production`,bullets:[{key:`intro.bullet.production.oneline`,featureKeys:[`maestro`]},{key:`intro.bullet.production.styles`,featureKeys:[`maestro`,`digitalhuman`,`poivelle`]},{key:`intro.bullet.production.languages`,featureKeys:[`maestro`,`digitalhuman`]}],entries:[{name:`Maestro`,descriptionKey:`intro.model.maestro`,featureKey:`maestro`,path:`/maestro`},{name:`Digital Human`,descriptionKey:`intro.model.digitalhuman`,featureKey:`digitalhuman`,path:`/digital-human`},{name:`Poivelle`,descriptionKey:`intro.model.poivelle`,featureKey:`poivelle`,path:`/poivelle`}],path:`/maestro`,screenshots:{maestro:{desktop:C.maestroDesktop,mobile:C.maestroMobile},digitalhuman:{desktop:C.digitalHumanDesktop}}},{key:`tools`,featureKeys:[`serp`,`webextrator`,`codingBridge`],eyebrowKey:`intro.eyebrow.tools`,titleKey:`intro.title.tools`,siteTitleKey:`intro.title.site.tools`,subtitleKey:`intro.subtitle.tools`,bullets:[{key:`intro.bullet.tools.search`,featureKeys:[`serp`]},{key:`intro.bullet.tools.extract`,featureKeys:[`webextrator`]},{key:`intro.bullet.tools.coding`,featureKeys:[`codingBridge`]}],entries:[{name:`SERP`,descriptionKey:`intro.model.serp`,featureKey:`serp`,path:`/serp`},{name:`WebExtrator`,descriptionKey:`intro.model.webextrator`,featureKey:`webextrator`,path:`/webextrator`},{name:`Coding Bridge`,descriptionKey:`intro.model.codingbridge`,featureKey:`codingBridge`,path:`/coding-bridge`}],path:`/serp`,screenshots:{serp:{desktop:C.serpDesktop},webextrator:{desktop:C.webextratorDesktop},codingBridge:{desktop:C.codingBridgeDesktop}}}],T=[`intro.bullet.connector.catalog`,`intro.bullet.connector.modes`,`intro.bullet.connector.security`],E=p({name:`ProductHome`,components:{ElButton:y,ConfirmIcon:h,NextIcon:m},data(){return{connectorBullets:T}},computed:{site(){return this.$store.state.site},enabledFeatures(){return this.site?.features??{}},siteLoaded(){return!!this.site?.id},isChineseLocale(){return String(this.$i18n.locale).toLowerCase().startsWith(`zh`)},availableKeys(){return this.siteLoaded?b.filter(e=>this.enabledFeatures[e]?.enabled):[]},heroTitle(){return this.site?.title?.trim()||this.$t(`intro.title.hero`)},heroSubtitle(){return this.site?.description?.trim()||this.$t(`intro.subtitle.hero`)},heroStats(){return[{value:`${this.availableKeys.length}`,labelKey:`intro.stat.capabilities`},{value:`${this.visibleEntryCount}`,labelKey:`intro.stat.products`},{value:`80+`,labelKey:`intro.stat.connectors`}]},visibleEntryCount(){return this.sections.reduce((e,t)=>e+t.entries.length,0)},sections(){let e=new Set(this.availableKeys);return w.map(t=>{let n=t.entries.filter(t=>!t.featureKey||e.has(t.featureKey)),r=this.sectionScreenshot(t.screenshots,e);return{...t,displayTitleKey:this.siteLoaded?t.siteTitleKey:t.titleKey,entries:n.map(e=>({...e,icon:e.icon??(e.featureKey?x[e.featureKey]:void 0)})),subtitle:this.siteLoaded?n.map(e=>e.name).join(` · `):this.$t(t.subtitleKey),bulletKeys:t.bullets.filter(t=>t.catalogOnly&&this.siteLoaded?!1:!t.featureKeys||t.featureKeys.some(t=>e.has(t))).map(e=>e.key),desktop:r?this.pick(r.desktop):void 0,mobile:r?.mobile?this.pick(r.mobile):void 0}}).filter(e=>e.entries.length>0).map(e=>({...e,path:e.entries.some(t=>t.path===e.path)?e.path:e.entries.find(e=>e.path)?.path??e.path}))},firstSectionKey(){return this.sections[0]?.key},heroDesktop(){return this.sections.find(e=>e.key===`chat`)?.desktop??this.sections.find(e=>e.desktop)?.desktop},heroMobile(){return this.sections.find(e=>e.key===`chat`)?.mobile??this.sections.find(e=>e.mobile)?.mobile},connectorShot(){return this.pick(C.connectorsDesktop)}},methods:{pick(e){return this.isChineseLocale?e.zh:e.en},sectionScreenshot(e,t){for(let n of b)if(t.has(n)&&e[n])return e[n]},onStart(){this.$router.push(_())},open(e){this.$router.push(e)},scrollTo(e){let t=document.getElementById(`app`),n=document.getElementById(e);if(!t||!n)return;let r=document.querySelector(`.header`)?.offsetHeight??0;t.scrollTop=n.offsetTop-r}}}),D={key:0,class:`intro`},O={class:`hero`},k={class:`container hero__content`},A={class:`eyebrow`},j={class:`hero__summary`},M={class:`hero__actions`},N={class:`hero__stats`},P={key:0,class:`hero__screens`},F={class:`macbook-frame hero__desktop`,"aria-hidden":`true`},I={class:`macbook-frame__lid`},L={class:`macbook-frame__viewport`},R=[`src`],z={key:0,class:`phone-device hero__mobile`,"aria-hidden":`true`},B={class:`phone-device__screen`},V=[`src`],H=[`id`],U={class:`container`},W={class:`capability__head`},G={class:`eyebrow eyebrow--light`},K={class:`macbook-frame screen-pair__desktop`},q={class:`macbook-frame__lid`},te={class:`macbook-frame__viewport`},J=[`src`,`alt`],Y={key:0,class:`phone-device screen-pair__mobile`},X={class:`phone-device__screen`},Z=[`src`],Q={class:`capability__copy`},ne={class:`feature-points`},re={class:`model-card__heading`},ie={class:`model-card__logo`,"aria-hidden":`true`},ae=[`src`],oe={class:`section connector-section`},se={class:`container`},ce={class:`capability__head`},le={class:`eyebrow eyebrow--light`},ue={class:`capability__body`},de={class:`screen-pair`},fe={class:`macbook-frame screen-pair__desktop`},pe={class:`macbook-frame__lid`},$={class:`macbook-frame__viewport`},me=[`src`,`alt`],he={class:`capability__copy`},ge={class:`feature-points`},_e={class:`final-cta`},ve={class:`container final-cta__content`},ye={class:`story-kicker`},be={class:`final-cta__actions`},xe=[`aria-label`];function Se(p,m,h,g,_,v){let y=c(`el-button`),b=c(`confirm-icon`),x=c(`next-icon`);return p.siteLoaded?(f(),o(`div`,D,[e(`section`,O,[m[7]||=e(`div`,{class:`hero__grid`},null,-1),e(`div`,k,[e(`span`,A,r(p.$t(`intro.badge.hero`)),1),e(`h1`,null,r(p.heroTitle),1),e(`p`,j,r(p.heroSubtitle),1),e(`div`,M,[i(y,{type:`primary`,size:`large`,onClick:p.onStart},{default:u(()=>[n(r(p.$t(`common.button.startForFree`)),1)]),_:1},8,[`onClick`]),p.firstSectionKey?(f(),l(y,{key:0,size:`large`,onClick:m[0]||=e=>p.scrollTo(p.firstSectionKey)},{default:u(()=>[n(r(p.$t(`intro.button.explore`)),1)]),_:1})):a(``,!0)]),e(`dl`,N,[(f(!0),o(s,null,d(p.heroStats,t=>(f(),o(`div`,{key:t.labelKey},[e(`dt`,null,r(t.value),1),e(`dd`,null,r(p.$t(t.labelKey)),1)]))),128))]),p.heroDesktop?(f(),o(`div`,P,[e(`div`,F,[e(`div`,I,[m[2]||=e(`span`,{class:`macbook-frame__camera`},null,-1),e(`div`,L,[e(`img`,{src:p.heroDesktop,alt:``},null,8,R)]),m[3]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[4]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)]),p.heroMobile?(f(),o(`div`,z,[m[6]||=e(`span`,{class:`phone-device__speaker`},null,-1),e(`div`,B,[m[5]||=e(`span`,{class:`phone-device__island`},null,-1),e(`img`,{src:p.heroMobile,alt:``},null,8,V)])])):a(``,!0)])):a(``,!0)])]),(f(!0),o(s,null,d(p.sections,(c,l)=>(f(),o(`section`,{id:c.key,key:c.key,class:t([`section capability`,{"capability--alt":l%2==1}])},[e(`div`,U,[e(`div`,W,[e(`span`,G,r(p.$t(c.eyebrowKey)),1),e(`h2`,null,r(p.$t(c.displayTitleKey)),1),e(`p`,null,r(c.subtitle),1)]),e(`div`,{class:t([`capability__body`,{"capability__body--reverse":l%2==1&&c.desktop,"capability__body--copy-only":!c.desktop}])},[c.desktop?(f(),o(`div`,{key:0,class:t([`screen-pair`,{"screen-pair--with-phone":c.mobile}])},[e(`div`,K,[e(`div`,q,[m[8]||=e(`span`,{class:`macbook-frame__camera`,"aria-hidden":`true`},null,-1),e(`div`,te,[e(`img`,{src:c.desktop,alt:p.$t(c.titleKey),loading:`lazy`},null,8,J)]),m[9]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[10]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)]),c.mobile?(f(),o(`div`,Y,[m[12]||=e(`span`,{class:`phone-device__speaker`,"aria-hidden":`true`},null,-1),e(`div`,X,[m[11]||=e(`span`,{class:`phone-device__island`,"aria-hidden":`true`},null,-1),e(`img`,{src:c.mobile,alt:``,loading:`lazy`},null,8,Z)])])):a(``,!0)],2)):a(``,!0),e(`div`,Q,[e(`ul`,ne,[(f(!0),o(s,null,d(c.bulletKeys,t=>(f(),o(`li`,{key:t},[i(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(t)),1)]))),128))]),i(y,{type:`primary`,plain:``,onClick:e=>p.open(c.path)},{default:u(()=>[n(r(p.$t(`intro.button.try`))+` `,1),i(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`onClick`])])],2),e(`div`,{class:`model-grid`,style:ee({"--model-grid-columns":Math.min(c.entries.length,5),"--model-grid-columns-tablet":Math.min(c.entries.length,3),"--model-grid-columns-mobile":Math.min(c.entries.length,2)})},[(f(!0),o(s,null,d(c.entries,t=>(f(),o(`article`,{key:t.name,class:`model-card`},[e(`div`,re,[e(`span`,ie,[e(`img`,{src:t.icon,alt:``,loading:`lazy`},null,8,ae)]),e(`h3`,null,r(t.name),1)]),e(`p`,null,r(p.$t(t.descriptionKey)),1)]))),128))],4)])],10,H))),128)),e(`section`,oe,[e(`div`,se,[e(`div`,ce,[e(`span`,le,r(p.$t(`intro.eyebrow.connector`)),1),e(`h2`,null,r(p.$t(`intro.title.connector`)),1),e(`p`,null,r(p.$t(`intro.subtitle.connector`)),1)]),e(`div`,ue,[e(`div`,de,[e(`div`,fe,[e(`div`,pe,[m[13]||=e(`span`,{class:`macbook-frame__camera`,"aria-hidden":`true`},null,-1),e(`div`,$,[e(`img`,{src:p.connectorShot,alt:p.$t(`intro.title.connector`),loading:`lazy`},null,8,me)]),m[14]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[15]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)])]),e(`div`,he,[e(`ul`,ge,[(f(!0),o(s,null,d(p.connectorBullets,t=>(f(),o(`li`,{key:t},[i(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(t)),1)]))),128))]),i(y,{type:`primary`,plain:``,onClick:m[1]||=e=>p.open(`/console/connectors`)},{default:u(()=>[n(r(p.$t(`intro.button.try`))+` `,1),i(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1})])])])]),e(`section`,_e,[e(`div`,ve,[e(`div`,null,[e(`p`,ye,r(p.$t(`intro.eyebrow.cta`)),1),e(`h2`,null,r(p.$t(`intro.title.cta`)),1),e(`p`,null,r(p.$t(`intro.subtitle.cta`)),1)]),e(`div`,be,[i(y,{type:`primary`,size:`large`,onClick:p.onStart},{default:u(()=>[n(r(p.$t(`common.button.startForFree`)),1)]),_:1},8,[`onClick`])])])])])):(f(),o(`div`,{key:1,class:`intro-loading`,role:`status`,"aria-label":p.$t(`common.status.loading`)},[...m[16]||=[e(`span`,{class:`intro-loading__pulse`},null,-1)]],8,xe))}var Ce=v(E,[[`render`,Se],[`__scopeId`,`data-v-c2643982`]]);export{Ce as default};
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,Gt as t,I as n,Jt as r,L as i,M as a,N as o,T as s,at as c,j as l,mt as u,qt as ee,rt as d,tt as f,z as p}from"./vendor-chart-Dw-P17PN.js";import{t as m}from"./arrow-right-DrnvS7bG.js";import{t as h}from"./check-BncYR7t9.js";import{Qi as g}from"./constants-BHt-rxvE.js";import{M as _,Ma as v,O as y,i as b,r as x}from"./index-CgyjiEUz.js";var S=(e,t)=>({zh:e,en:t}),C={chatDesktop:S(`https://cdn.acedata.cloud/uploads/24b9ad71-e5c0-4550-b950-d52e73d74926`,`https://cdn.acedata.cloud/uploads/850faad3-4acd-4a4f-9f1a-29ca77119274`),chatMobile:S(`https://cdn.acedata.cloud/uploads/4bf02973-6482-4c5b-8174-83740d22ecca`,`https://cdn.acedata.cloud/uploads/1401bef2-4588-429a-9d5e-c3655a6a51a7`),midjourneyDesktop:S(`https://cdn.acedata.cloud/uploads/d5d1566f-893c-4dac-bf3d-3b181b7e8ab3`,`https://cdn.acedata.cloud/uploads/21379382-9aef-4597-8d6f-6bad33375943`),midjourneyMobile:S(`https://cdn.acedata.cloud/uploads/0671efb0-5f62-461c-b3a7-8b8eb08a6c39`,`https://cdn.acedata.cloud/uploads/93be4fb8-24bc-47f1-9fea-2d6504ec17f7`),nanobananaDesktop:S(`https://cdn.acedata.cloud/uploads/089b6deb-1ff1-4cf5-b938-36a2493a40da`,`https://cdn.acedata.cloud/uploads/165db012-430e-455c-844e-cd88bc88f60c`),nanobananaMobile:S(`https://cdn.acedata.cloud/uploads/8154ce9b-f221-4543-86c8-7e4556ee1917`,`https://cdn.acedata.cloud/uploads/6358331d-acf7-4784-b4f0-4f15189f9876`),seedreamDesktop:S(`https://cdn.acedata.cloud/uploads/7e45490e-8b41-48e9-9d31-dfae7072a7fa`,`https://cdn.acedata.cloud/uploads/91c96b92-31ff-4e99-bdd7-5314d1781246`),fluxDesktop:S(`https://cdn.acedata.cloud/uploads/7f7caa8d-5d61-4c03-9b14-14ddc865be5a`,`https://cdn.acedata.cloud/uploads/63e300df-a3c1-43c7-b170-6fd3fdfe15b5`),sunoDesktop:S(`https://cdn.acedata.cloud/uploads/5ab7f19e-2047-4c62-a228-ae4170ca58b0`,`https://cdn.acedata.cloud/uploads/6e962c96-1b2c-4e17-a791-e1c4a7929ba3`),sunoMobile:S(`https://cdn.acedata.cloud/uploads/f3a06507-d4fa-4568-9803-cfacfa39cfd6`,`https://cdn.acedata.cloud/uploads/aff42de2-62fe-43ad-9dd7-ceac814880e5`),fishDesktop:S(`https://cdn.acedata.cloud/uploads/db375091-7ddc-4d36-a4f8-db13fe1df424`,`https://cdn.acedata.cloud/uploads/d50b6bcd-e6a3-4863-a964-c68f259c4ae0`),klingDesktop:S(`https://cdn.acedata.cloud/uploads/fd38b6c8-9794-4414-884c-9ca9619c7da6`,`https://cdn.acedata.cloud/uploads/3531e27b-58d8-4c65-9010-148b7c785560`),klingMobile:S(`https://cdn.acedata.cloud/uploads/3abfa61f-d735-4a1d-b983-8b09a9c9e5f0`,`https://cdn.acedata.cloud/uploads/c3cb4afb-f554-4031-8f8b-c91359906f18`),veoDesktop:S(`https://cdn.acedata.cloud/uploads/e8291d40-e2d1-465e-88b6-3febbbba9a9b`,`https://cdn.acedata.cloud/uploads/efc32760-db07-439d-beff-ceaef735c3b4`),seedanceDesktop:S(`https://cdn.acedata.cloud/uploads/26a91d87-e267-4e39-9bbd-a2c5c8ec0cdc`,`https://cdn.acedata.cloud/uploads/8fd9cdc3-41f8-4d2f-9f32-60d083683307`),maestroDesktop:S(`https://cdn.acedata.cloud/uploads/e20d1a42-7824-4803-b6b6-8d121a7eb713`,`https://cdn.acedata.cloud/uploads/3b6887f8-5be1-4a19-9fcc-45ec6d695af0`),maestroMobile:S(`https://cdn.acedata.cloud/uploads/72648704-4c8e-40b4-9a60-70cbecc76401`,`https://cdn.acedata.cloud/uploads/12879735-e957-4c04-a30a-e6f463435bd7`),digitalHumanDesktop:S(`https://cdn.acedata.cloud/uploads/3a49d5fa-cd7a-4fb6-a6c0-e4f0a6d56d4d`,`https://cdn.acedata.cloud/uploads/b2ce6c5c-56d3-45e7-9d9e-598b5dfd9ae4`),serpDesktop:S(`https://cdn.acedata.cloud/uploads/8ccda980-60e5-4db7-9d99-66628ced5c44`,`https://cdn.acedata.cloud/uploads/94c23b79-4af7-4afd-9deb-1ac760e01950`),webextratorDesktop:S(`https://cdn.acedata.cloud/uploads/e1b19df4-1720-4674-abdd-9db0f7f529b2`,`https://cdn.acedata.cloud/uploads/6c9e4c43-d0bc-4a63-ba9e-4e9fbbd6b245`),codingBridgeDesktop:S(`https://cdn.acedata.cloud/uploads/ef0be118-adfa-4814-b672-a6977915e7f0`,`https://cdn.acedata.cloud/uploads/97d60828-c1c1-4ebb-a219-30bbed1e6353`),connectorsDesktop:S(`https://cdn.acedata.cloud/uploads/5a5ce9af-8a88-44c5-9262-dbf276aa5058`,`https://cdn.acedata.cloud/uploads/fb40fc97-9177-4778-b02a-0f2f1f37ad6c`)},w=[{key:`chat`,featureKeys:[`chatgpt`,`claude`,`gemini`,`grok`,`deepseek`,`kimi`],eyebrowKey:`intro.eyebrow.chat`,titleKey:`intro.title.chat`,siteTitleKey:`intro.title.site.chat`,subtitleKey:`intro.subtitle.chat`,bullets:[{key:`intro.bullet.chat.models`,catalogOnly:!0},{key:`intro.bullet.chat.multimodal`},{key:`intro.bullet.chat.agentic`}],entries:[{name:`ChatGPT`,descriptionKey:`intro.model.chatgpt`,featureKey:`chatgpt`,path:`/chatgpt`},{name:`Claude`,descriptionKey:`intro.model.claude`,featureKey:`claude`,path:`/claude`},{name:`Gemini`,descriptionKey:`intro.model.gemini`,featureKey:`gemini`,path:`/gemini`},{name:`Grok`,descriptionKey:`intro.model.grok`,featureKey:`grok`,path:`/grok`},{name:`DeepSeek`,descriptionKey:`intro.model.deepseek`,featureKey:`deepseek`,path:`/deepseek`},{name:`Kimi`,descriptionKey:`intro.model.kimi`,featureKey:`kimi`,path:`/kimi`},{name:`GLM`,descriptionKey:`intro.model.glm`,featureKey:`chatgpt`,icon:g,path:`/chatgpt`}],path:`/chatgpt`,screenshots:{chatgpt:{desktop:C.chatDesktop,mobile:C.chatMobile}}},{key:`image`,featureKeys:[`midjourney`,`nanobanana`,`openaiimage`,`seedream`,`flux`,`qrart`],eyebrowKey:`intro.eyebrow.image`,titleKey:`intro.title.image`,siteTitleKey:`intro.title.site.image`,subtitleKey:`intro.subtitle.image`,bullets:[{key:`intro.bullet.image.models`,catalogOnly:!0},{key:`intro.bullet.image.editing`,featureKeys:[`nanobanana`,`openaiimage`,`seedream`]},{key:`intro.bullet.image.resolution`,featureKeys:[`nanobanana`,`openaiimage`,`seedream`]}],entries:[{name:`Midjourney`,descriptionKey:`intro.model.midjourney`,featureKey:`midjourney`,path:`/midjourney`},{name:`Nano Banana`,descriptionKey:`intro.model.nanobanana`,featureKey:`nanobanana`,path:`/nanobanana`},{name:`GPT Image`,descriptionKey:`intro.model.gptimage`,featureKey:`openaiimage`,path:`/openaiimage`},{name:`Seedream`,descriptionKey:`intro.model.seedream`,featureKey:`seedream`,path:`/seedream`},{name:`Flux`,descriptionKey:`intro.model.flux`,featureKey:`flux`,path:`/flux`},{name:`QR Art`,descriptionKey:`intro.model.qrart`,featureKey:`qrart`,path:`/qrart`}],path:`/nanobanana`,screenshots:{midjourney:{desktop:C.midjourneyDesktop,mobile:C.midjourneyMobile},nanobanana:{desktop:C.nanobananaDesktop,mobile:C.nanobananaMobile},seedream:{desktop:C.seedreamDesktop},flux:{desktop:C.fluxDesktop}}},{key:`video`,featureKeys:[`kling`,`veo`,`sora`,`seedance`,`hailuo`,`minimax`,`luma`,`wan`,`pixverse`,`grokvideo`,`omni`],eyebrowKey:`intro.eyebrow.video`,titleKey:`intro.title.video`,siteTitleKey:`intro.title.site.video`,subtitleKey:`intro.subtitle.video`,bullets:[{key:`intro.bullet.video.models`,catalogOnly:!0},{key:`intro.bullet.video.control`,featureKeys:[`kling`,`veo`,`seedance`,`luma`]},{key:`intro.bullet.video.quality`,featureKeys:[`kling`,`seedance`,`grokvideo`]}],entries:[{name:`Kling`,descriptionKey:`intro.model.kling`,featureKey:`kling`,path:`/kling`},{name:`Veo`,descriptionKey:`intro.model.veo`,featureKey:`veo`,path:`/veo`},{name:`Sora`,descriptionKey:`intro.model.sora`,featureKey:`sora`,path:`/sora`},{name:`Seedance`,descriptionKey:`intro.model.seedance`,featureKey:`seedance`,path:`/seedance`},{name:`Hailuo`,descriptionKey:`intro.model.hailuo`,featureKey:`hailuo`,path:`/hailuo`},{name:`MiniMax H3`,descriptionKey:`intro.model.minimax`,featureKey:`minimax`,path:`/minimax`},{name:`Luma`,descriptionKey:`intro.model.luma`,featureKey:`luma`,path:`/luma`},{name:`Wan`,descriptionKey:`intro.model.wan`,featureKey:`wan`,path:`/wan`},{name:`Pixverse`,descriptionKey:`intro.model.pixverse`,featureKey:`pixverse`,path:`/pixverse`},{name:`Grok Imagine`,descriptionKey:`intro.model.grokvideo`,featureKey:`grokvideo`,path:`/grokvideo`},{name:`Omni`,descriptionKey:`intro.model.omni`,featureKey:`omni`,path:`/omni`}],path:`/kling`,screenshots:{kling:{desktop:C.klingDesktop,mobile:C.klingMobile},veo:{desktop:C.veoDesktop},seedance:{desktop:C.seedanceDesktop}}},{key:`music`,featureKeys:[`suno`,`producer`,`fish`],eyebrowKey:`intro.eyebrow.music`,titleKey:`intro.title.music`,siteTitleKey:`intro.title.site.music`,subtitleKey:`intro.subtitle.music`,bullets:[{key:`intro.bullet.music.models`},{key:`intro.bullet.music.control`,featureKeys:[`suno`,`producer`]},{key:`intro.bullet.music.voice`,featureKeys:[`fish`]}],entries:[{name:`Suno`,descriptionKey:`intro.model.suno`,featureKey:`suno`,path:`/suno`},{name:`Producer`,descriptionKey:`intro.model.producer`,featureKey:`producer`,path:`/producer`},{name:`Fish Audio`,descriptionKey:`intro.model.fish`,featureKey:`fish`,path:`/fish`}],path:`/suno`,screenshots:{suno:{desktop:C.sunoDesktop,mobile:C.sunoMobile},fish:{desktop:C.fishDesktop}}},{key:`production`,featureKeys:[`maestro`,`digitalhuman`,`poivelle`],eyebrowKey:`intro.eyebrow.production`,titleKey:`intro.title.production`,siteTitleKey:`intro.title.site.production`,subtitleKey:`intro.subtitle.production`,bullets:[{key:`intro.bullet.production.oneline`,featureKeys:[`maestro`]},{key:`intro.bullet.production.styles`,featureKeys:[`maestro`,`digitalhuman`,`poivelle`]},{key:`intro.bullet.production.languages`,featureKeys:[`maestro`,`digitalhuman`]}],entries:[{name:`Maestro`,descriptionKey:`intro.model.maestro`,featureKey:`maestro`,path:`/maestro`},{name:`Digital Human`,descriptionKey:`intro.model.digitalhuman`,featureKey:`digitalhuman`,path:`/digital-human`},{name:`Poivelle`,descriptionKey:`intro.model.poivelle`,featureKey:`poivelle`,path:`/poivelle`}],path:`/maestro`,screenshots:{maestro:{desktop:C.maestroDesktop,mobile:C.maestroMobile},digitalhuman:{desktop:C.digitalHumanDesktop}}},{key:`tools`,featureKeys:[`serp`,`webextrator`,`codingBridge`],eyebrowKey:`intro.eyebrow.tools`,titleKey:`intro.title.tools`,siteTitleKey:`intro.title.site.tools`,subtitleKey:`intro.subtitle.tools`,bullets:[{key:`intro.bullet.tools.search`,featureKeys:[`serp`]},{key:`intro.bullet.tools.extract`,featureKeys:[`webextrator`]},{key:`intro.bullet.tools.coding`,featureKeys:[`codingBridge`]}],entries:[{name:`SERP`,descriptionKey:`intro.model.serp`,featureKey:`serp`,path:`/serp`},{name:`WebExtrator`,descriptionKey:`intro.model.webextrator`,featureKey:`webextrator`,path:`/webextrator`},{name:`Coding Bridge`,descriptionKey:`intro.model.codingbridge`,featureKey:`codingBridge`,path:`/coding-bridge`}],path:`/serp`,screenshots:{serp:{desktop:C.serpDesktop},webextrator:{desktop:C.webextratorDesktop},codingBridge:{desktop:C.codingBridgeDesktop}}}],T=[`intro.bullet.connector.catalog`,`intro.bullet.connector.modes`,`intro.bullet.connector.security`],E=p({name:`ProductHome`,components:{ElButton:v,ConfirmIcon:h,NextIcon:m},data(){return{connectorBullets:T}},computed:{site(){return this.$store.state.site},enabledFeatures(){return this.site?.features??{}},siteLoaded(){return!!this.site?.id},isChineseLocale(){return String(this.$i18n.locale).toLowerCase().startsWith(`zh`)},availableKeys(){return this.siteLoaded?b.filter(e=>this.enabledFeatures[e]?.enabled):[]},heroTitle(){return this.site?.title?.trim()||this.$t(`intro.title.hero`)},heroSubtitle(){return this.site?.description?.trim()||this.$t(`intro.subtitle.hero`)},heroStats(){return[{value:`${this.availableKeys.length}`,labelKey:`intro.stat.capabilities`},{value:`${this.visibleEntryCount}`,labelKey:`intro.stat.products`},{value:`80+`,labelKey:`intro.stat.connectors`}]},visibleEntryCount(){return this.sections.reduce((e,t)=>e+t.entries.length,0)},sections(){let e=new Set(this.availableKeys);return w.map(t=>{let n=t.entries.filter(t=>!t.featureKey||e.has(t.featureKey)),r=this.sectionScreenshot(t.screenshots,e);return{...t,displayTitleKey:this.siteLoaded?t.siteTitleKey:t.titleKey,entries:n.map(e=>({...e,icon:e.icon??(e.featureKey?x[e.featureKey]:void 0)})),subtitle:this.siteLoaded?n.map(e=>e.name).join(` · `):this.$t(t.subtitleKey),bulletKeys:t.bullets.filter(t=>t.catalogOnly&&this.siteLoaded?!1:!t.featureKeys||t.featureKeys.some(t=>e.has(t))).map(e=>e.key),desktop:r?this.pick(r.desktop):void 0,mobile:r?.mobile?this.pick(r.mobile):void 0}}).filter(e=>e.entries.length>0).map(e=>({...e,path:e.entries.some(t=>t.path===e.path)?e.path:e.entries.find(e=>e.path)?.path??e.path}))},firstSectionKey(){return this.sections[0]?.key},heroDesktop(){return this.sections.find(e=>e.key===`chat`)?.desktop??this.sections.find(e=>e.desktop)?.desktop},heroMobile(){return this.sections.find(e=>e.key===`chat`)?.mobile??this.sections.find(e=>e.mobile)?.mobile},connectorShot(){return this.pick(C.connectorsDesktop)}},methods:{pick(e){return this.isChineseLocale?e.zh:e.en},sectionScreenshot(e,t){for(let n of b)if(t.has(n)&&e[n])return e[n]},onStart(){this.$router.push(_())},open(e){this.$router.push(e)},scrollTo(e){let t=document.getElementById(`app`),n=document.getElementById(e);if(!t||!n)return;let r=document.querySelector(`.header`)?.offsetHeight??0;t.scrollTop=n.offsetTop-r}}}),D={key:0,class:`intro`},O={class:`hero`},k={class:`container hero__content`},A={class:`eyebrow`},j={class:`hero__summary`},M={class:`hero__actions`},N={class:`hero__stats`},P={key:0,class:`hero__screens`},F={class:`macbook-frame hero__desktop`,"aria-hidden":`true`},I={class:`macbook-frame__lid`},L={class:`macbook-frame__viewport`},R=[`src`],z={key:0,class:`phone-device hero__mobile`,"aria-hidden":`true`},B={class:`phone-device__screen`},V=[`src`],H=[`id`],U={class:`container`},W={class:`capability__head`},G={class:`eyebrow eyebrow--light`},K={class:`macbook-frame screen-pair__desktop`},q={class:`macbook-frame__lid`},te={class:`macbook-frame__viewport`},J=[`src`,`alt`],Y={key:0,class:`phone-device screen-pair__mobile`},X={class:`phone-device__screen`},Z=[`src`],Q={class:`capability__copy`},ne={class:`feature-points`},re={class:`model-card__heading`},ie={class:`model-card__logo`,"aria-hidden":`true`},ae=[`src`],oe={class:`section connector-section`},se={class:`container`},ce={class:`capability__head`},le={class:`eyebrow eyebrow--light`},ue={class:`capability__body`},de={class:`screen-pair`},fe={class:`macbook-frame screen-pair__desktop`},pe={class:`macbook-frame__lid`},$={class:`macbook-frame__viewport`},me=[`src`,`alt`],he={class:`capability__copy`},ge={class:`feature-points`},_e={class:`final-cta`},ve={class:`container final-cta__content`},ye={class:`story-kicker`},be={class:`final-cta__actions`},xe=[`aria-label`];function Se(p,m,h,g,_,v){let y=c(`el-button`),b=c(`confirm-icon`),x=c(`next-icon`);return p.siteLoaded?(f(),o(`div`,D,[e(`section`,O,[m[7]||=e(`div`,{class:`hero__grid`},null,-1),e(`div`,k,[e(`span`,A,r(p.$t(`intro.badge.hero`)),1),e(`h1`,null,r(p.heroTitle),1),e(`p`,j,r(p.heroSubtitle),1),e(`div`,M,[i(y,{type:`primary`,size:`large`,onClick:p.onStart},{default:u(()=>[n(r(p.$t(`common.button.startForFree`)),1)]),_:1},8,[`onClick`]),p.firstSectionKey?(f(),l(y,{key:0,size:`large`,onClick:m[0]||=e=>p.scrollTo(p.firstSectionKey)},{default:u(()=>[n(r(p.$t(`intro.button.explore`)),1)]),_:1})):a(``,!0)]),e(`dl`,N,[(f(!0),o(s,null,d(p.heroStats,t=>(f(),o(`div`,{key:t.labelKey},[e(`dt`,null,r(t.value),1),e(`dd`,null,r(p.$t(t.labelKey)),1)]))),128))]),p.heroDesktop?(f(),o(`div`,P,[e(`div`,F,[e(`div`,I,[m[2]||=e(`span`,{class:`macbook-frame__camera`},null,-1),e(`div`,L,[e(`img`,{src:p.heroDesktop,alt:``},null,8,R)]),m[3]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[4]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)]),p.heroMobile?(f(),o(`div`,z,[m[6]||=e(`span`,{class:`phone-device__speaker`},null,-1),e(`div`,B,[m[5]||=e(`span`,{class:`phone-device__island`},null,-1),e(`img`,{src:p.heroMobile,alt:``},null,8,V)])])):a(``,!0)])):a(``,!0)])]),(f(!0),o(s,null,d(p.sections,(c,l)=>(f(),o(`section`,{id:c.key,key:c.key,class:t([`section capability`,{"capability--alt":l%2==1}])},[e(`div`,U,[e(`div`,W,[e(`span`,G,r(p.$t(c.eyebrowKey)),1),e(`h2`,null,r(p.$t(c.displayTitleKey)),1),e(`p`,null,r(c.subtitle),1)]),e(`div`,{class:t([`capability__body`,{"capability__body--reverse":l%2==1&&c.desktop,"capability__body--copy-only":!c.desktop}])},[c.desktop?(f(),o(`div`,{key:0,class:t([`screen-pair`,{"screen-pair--with-phone":c.mobile}])},[e(`div`,K,[e(`div`,q,[m[8]||=e(`span`,{class:`macbook-frame__camera`,"aria-hidden":`true`},null,-1),e(`div`,te,[e(`img`,{src:c.desktop,alt:p.$t(c.titleKey),loading:`lazy`},null,8,J)]),m[9]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[10]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)]),c.mobile?(f(),o(`div`,Y,[m[12]||=e(`span`,{class:`phone-device__speaker`,"aria-hidden":`true`},null,-1),e(`div`,X,[m[11]||=e(`span`,{class:`phone-device__island`,"aria-hidden":`true`},null,-1),e(`img`,{src:c.mobile,alt:``,loading:`lazy`},null,8,Z)])])):a(``,!0)],2)):a(``,!0),e(`div`,Q,[e(`ul`,ne,[(f(!0),o(s,null,d(c.bulletKeys,t=>(f(),o(`li`,{key:t},[i(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(t)),1)]))),128))]),i(y,{type:`primary`,plain:``,onClick:e=>p.open(c.path)},{default:u(()=>[n(r(p.$t(`intro.button.try`))+` `,1),i(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`onClick`])])],2),e(`div`,{class:`model-grid`,style:ee({"--model-grid-columns":Math.min(c.entries.length,5),"--model-grid-columns-tablet":Math.min(c.entries.length,3),"--model-grid-columns-mobile":Math.min(c.entries.length,2)})},[(f(!0),o(s,null,d(c.entries,t=>(f(),o(`article`,{key:t.name,class:`model-card`},[e(`div`,re,[e(`span`,ie,[e(`img`,{src:t.icon,alt:``,loading:`lazy`},null,8,ae)]),e(`h3`,null,r(t.name),1)]),e(`p`,null,r(p.$t(t.descriptionKey)),1)]))),128))],4)])],10,H))),128)),e(`section`,oe,[e(`div`,se,[e(`div`,ce,[e(`span`,le,r(p.$t(`intro.eyebrow.connector`)),1),e(`h2`,null,r(p.$t(`intro.title.connector`)),1),e(`p`,null,r(p.$t(`intro.subtitle.connector`)),1)]),e(`div`,ue,[e(`div`,de,[e(`div`,fe,[e(`div`,pe,[m[13]||=e(`span`,{class:`macbook-frame__camera`,"aria-hidden":`true`},null,-1),e(`div`,$,[e(`img`,{src:p.connectorShot,alt:p.$t(`intro.title.connector`),loading:`lazy`},null,8,me)]),m[14]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[15]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)])]),e(`div`,he,[e(`ul`,ge,[(f(!0),o(s,null,d(p.connectorBullets,t=>(f(),o(`li`,{key:t},[i(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(t)),1)]))),128))]),i(y,{type:`primary`,plain:``,onClick:m[1]||=e=>p.open(`/console/connectors`)},{default:u(()=>[n(r(p.$t(`intro.button.try`))+` `,1),i(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1})])])])]),e(`section`,_e,[e(`div`,ve,[e(`div`,null,[e(`p`,ye,r(p.$t(`intro.eyebrow.cta`)),1),e(`h2`,null,r(p.$t(`intro.title.cta`)),1),e(`p`,null,r(p.$t(`intro.subtitle.cta`)),1)]),e(`div`,be,[i(y,{type:`primary`,size:`large`,onClick:p.onStart},{default:u(()=>[n(r(p.$t(`common.button.startForFree`)),1)]),_:1},8,[`onClick`])])])])])):(f(),o(`div`,{key:1,class:`intro-loading`,role:`status`,"aria-label":p.$t(`common.status.loading`)},[...m[16]||=[e(`span`,{class:`intro-loading__pulse`},null,-1)]],8,xe))}var Ce=y(E,[[`render`,Se],[`__scopeId`,`data-v-c2643982`]]);export{Ce as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,it as d,j as f,mt as p,rt as m,tt as h,x as g,z as _}from"./vendor-chart-Dw-P17PN.js";import{r as v,t as y}from"./select-Cnf2vYb_.js";import{t as b}from"./upload-Ga2zshQX.js";import{t as x}from"./tooltip-BTxABu9c.js";import{t as S}from"./alert-BprQRUmf.js";import{h as C,v as w}from"./models-CqVJobW3.js";import{n as T,r as E}from"./radio-BNhFzeBO.js";import{t as D}from"./drawer-BHgjWQtL.js";import{t as O}from"./switch-DEk8VUni.js";import{t as k}from"./clock-BD11izpq.js";import{a as A,i as j,n as M,r as ee,s as N,t as P}from"./pagination-CJyJZAtw.js";import{t as F}from"./info-zysMX1Bn.js";import{t as I}from"./trash-2-BwCwpfRq.js";import{t as te}from"./triangle-alert-B_dh4qI1.js";import{t as ne}from"./upload-BzOXGCPD.js";import{t as L}from"./wand-sparkles-CDrVNjr9.js";import{vi as re}from"./constants-BHt-rxvE.js";import{$r as ie,$t as R,Ar as z,Jt as B,Ma as V,O as H,Oi as U,Qt as W,Si as G,Zr as K,en as q,hi as J,ia as Y,in as ae,jr as X,mi as Z,nn as oe,pn as se,tn as ce,va as Q}from"./index-CgyjiEUz.js";import{t as le}from"./CopyToClipboard-CgR-ErWz.js";import{t as ue}from"./ReportButton-BSorvQYf.js";import{t as de}from"./ImagePreview-B6uigACk.js";import{n as fe}from"./taskDrawerMixin-DyAUhFEq.js";import{t as pe}from"./Consumption-RQBkhx2x.js";import{t as me}from"./vue-plyr-wiIKa-zl.js";import{t as he}from"./ScenarioPaymentMode-DVAjX6bP.js";import{t as ge}from"./ApiCodeButton-BA7ubKjq.js";import{t as _e}from"./BotPlaceholder-CLTFqIYe.js";var ve=_({name:`LayoutPika`,components:{MagicIcon:L,ElDrawer:D,ElButton:V},mixins:[fe]}),ye={class:`main flex flex-row flex-1`},be={class:`config w-[320px] flex-none h-full min-h-0 overflow-hidden flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},xe={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Se(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),_=l(`el-drawer`);return h(),s(`div`,ye,[e(`div`,be,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,xe,[d(t.$slots,`result`,{},void 0,!0)]),u(a(m,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[g,!t.tasksEmpty]]),a(_,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var Ce=H(ve,[[`render`,Se],[`__scopeId`,`data-v-14cc52c3`]]),we=_({name:`IngredientsSelector`,components:{ElSwitch:O,InfoIcon:A},computed:{value:{get(){return this.$store.state.pika?.config?.ingredients},set(e){if(!e){this.$store.commit(`pika/setConfig`,{...this.$store.state.pika?.config,ingredients:e,ingredients_mode:void 0,image_url:void 0});return}this.$store.commit(`pika/setConfig`,{...this.$store.state.pika?.config,ingredients:e,model:`2.0`})}}},mounted(){this.value===void 0&&(this.value=!1)}}),Te={class:`field`},Ee={class:`label`},De={class:`title font-bold`};function Oe(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return h(),s(`div`,Te,[e(`div`,Ee,[e(`h2`,De,i(t.$t(`pika.name.ingredients`)),1),a(d,{content:t.$t(`pika.description.ingredients`),class:`info`},null,8,[`content`])]),a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])}var ke=H(we,[[`render`,Oe],[`__scopeId`,`data-v-606e1d1a`]]),Ae=_({name:`EffectSelector`,components:{ElSelect:v,ElOption:y},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})}}}}),je={class:`field`},Me={class:`title font-bold`},Ne={class:`float-left`};function Pe(t,n,r,o,u,d){let g=l(`el-option`),_=l(`el-select`);return h(),s(`div`,je,[e(`h2`,Me,i(t.$t(`pika.name.effect`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`pika.placeholder.select`),clearable:``},{default:p(()=>[(h(!0),s(c,null,m(t.options,t=>(h(),f(g,{key:t.value,label:t.label,value:t.value},{default:p(()=>[e(`span`,Ne,i(t.label),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Fe=H(Ae,[[`render`,Pe],[`__scopeId`,`data-v-d1c54475`]]),Ie=_({name:`IngredientsModelSelector`,components:{ElRadioButton:T,ElRadioGroup:E},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||=re}}),Le={class:`field`},Re={class:`title font-bold`};function ze(t,n,o,u,d,g){let _=l(`el-radio-button`),v=l(`el-radio-group`);return h(),s(`div`,Le,[e(`h2`,Re,i(t.$t(`pika.name.ingredientsModel`)),1),a(v,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`quality`},{default:p(()=>[(h(!0),s(c,null,m(t.options,e=>(h(),f(_,{key:e.value,label:e.value},{default:p(()=>[r(i(e.label),1)]),_:2},1032,[`label`]))),128))]),_:1},8,[`modelValue`])])}var Be=H(Ie,[[`render`,ze],[`__scopeId`,`data-v-b72865fa`]]),Ve=_({name:`ModelSelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`2.0`,label:`2.0`},{value:`1.5`,label:`1.5`}]}},computed:{value:{get(){return this.$store.state.pika?.config?.model},set(e){this.$store.commit(`pika/setConfig`,{...this.$store.state.pika.config,model:e})}}},mounted(){this.value||=`2.0`}}),He={class:`field`},Ue={class:`title font-bold`};function We(t,n,r,o,u,d){let g=l(`el-option`),_=l(`el-select`);return h(),s(`div`,He,[e(`h2`,Ue,i(t.$t(`pika.name.model`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`pika.placeholder.select`)},{default:p(()=>[(h(!0),s(c,null,m(t.options,e=>(h(),f(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Ge=H(Ve,[[`render`,We],[`__scopeId`,`data-v-7b2e870a`]]),Ke=_({name:`ImageUrlInput`,components:{UploadIcon:ne,ElUpload:b,ElButton:V,InfoIcon:A,ImagePreview:de},mixins:[oe,ce,R,B],data(){return{fileList:[],uploadUrl:Y()+`/api/v1/files/`,suppressWatch:!1}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e.response?.file_url).filter(e=>!!e)},value(){return this.$store.state.pika?.config?.image_url}},watch:{value:{immediate:!0,handler(e){if(this.suppressWatch)return;let t=this.fileList.filter(e=>!e.response?.file_url),n=(e||[]).map(e=>this.fileList.find(t=>t.response?.file_url===e||t.url===e)||{name:e.split(`/`).pop()||e,url:e,status:`success`,percentage:100,response:{file_url:e}});this.fileList=[...n,...t.filter(e=>!n.includes(e))]}}},methods:{onChange(e){!e.url&&e.raw&&(e.url=URL.createObjectURL(e.raw))},onExceed(){w.warning(this.$t(`pika.message.uploadStartImageExceed`))},onError(){w.error(this.$t(`pika.message.uploadStartImageError`))},onRemove(){this.onSetStartImageUrl()},onSetStartImageUrl(){this.suppressWatch=!0,this.$store.commit(`pika/setConfig`,{...this.$store.state.pika?.config,image_url:this.urls}),this.$nextTick(()=>{this.suppressWatch=!1})},onSuccess(){this.onSetStartImageUrl()},onRemovePreview(e){let t=this.fileList.indexOf(e);t>=0&&this.fileList.splice(t,1),e.url?.startsWith(`blob:`)&&URL.revokeObjectURL(e.url),this.onSetStartImageUrl()}}}),qe={class:`field`},Je={class:`label`},Ye={class:`title font-bold`},Xe={key:0,class:`file-list mt-2 flex flex-wrap gap-[10px]`};function Ze(t,n,u,d,g,_){let v=l(`info-icon`),y=l(`upload-icon`),b=l(`el-button`),x=l(`el-upload`),S=l(`image-preview`);return h(),s(`div`,null,[e(`div`,qe,[e(`div`,Je,[e(`h2`,Ye,i(t.$t(`pika.name.imageUrl`)),1),a(v,{content:t.$t(`pika.description.imageUrl`),class:`info`},null,8,[`content`])]),a(x,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,name:`file`,class:`value shrink-0`,limit:3,multiple:!0,"show-file-list":!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"on-exceed":t.onExceed,"on-error":t.onError,"on-change":t.onChange,"on-remove":t.onRemove,"on-success":t.onSuccess,headers:t.headers},{default:p(()=>[a(b,{size:`small`,type:`primary`,round:``},{default:p(()=>[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`pika.button.uploadImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`on-change`,`on-remove`,`on-success`,`headers`])]),t.fileList.length?(h(),s(`div`,Xe,[(h(!0),s(c,null,m(t.fileList,(e,n)=>(h(),f(S,{key:e.uid||e.url||n,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemovePreview(e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))),128))])):o(``,!0)])}var Qe=H(Ke,[[`render`,Ze],[`__scopeId`,`data-v-637337bb`]]),$e=_({name:`PromptInput`,components:{PromptTextarea:j},computed:{prompt:{get(){return this.$store.state.pika?.config?.prompt},set(e){this.$store.commit(`pika/setConfig`,{...this.$store.state.pika?.config,prompt:e})}}},mounted(){this.prompt||=``}});function et(e,t,n,r,i,a){let o=l(`prompt-textarea`);return h(),f(o,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`pika.name.prompt`),info:e.$t(`pika.description.prompt`),placeholder:e.$t(`pika.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var tt=_({name:`PresetPanel`,components:{MagicIcon:L,ImageUrlInput:Qe,ElButton:V,Consumption:pe,PromptInput:H($e,[[`render`,et]]),IngredientsSelector:ke,IngredientsModelSelector:Be,ModelSelector:Ge,EffectSelector:Fe,ScenarioPaymentMode:he},emits:[`generate`],data(){return{quoteTimer:0,quoteRunId:0}},computed:{config(){return this.$store.state.pika?.config},consumption(){return ae(this.config,this.service?.cost)},service(){return this.$store.state.pika?.service},walletMode(){return Z()&&J(`pika`).mode===`wallet`}},watch:{walletMode:{handler(e){e&&this.scheduleQuote()},immediate:!0},config:{handler(){this.walletMode&&this.scheduleQuote()},deep:!0}},beforeUnmount(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1},methods:{scheduleQuote(){window.clearTimeout(this.quoteTimer),this.quoteTimer=window.setTimeout(this.refreshQuote,350)},async refreshQuote(){let e=J(`pika`),t=++this.quoteRunId;e.quoteLoading=!0,e.quoteUsdc=void 0;try{let n=await X.quote(z(this.config));t===this.quoteRunId&&e.mode===`wallet`&&(e.quoteUsdc=n.amountUsdc)}catch(e){console.warn(`x402 quote failed`,e)}finally{t===this.quoteRunId&&(e.quoteLoading=!1)}},onGenerate(){this.$emit(`generate`)}}}),nt={class:`flex flex-col h-full`},rt={class:`flex-1 overflow-y-auto p-5`},it={class:`flex flex-col items-center justify-center px-5 pb-5`};function at(t,n,c,u,d,m){let g=l(`prompt-input`),_=l(`model-selector`),v=l(`ingredients-selector`),y=l(`effect-selector`),b=l(`image-url-input`),x=l(`ingredients-model-selector`),S=l(`scenario-payment-mode`),C=l(`consumption`),w=l(`magic-icon`),T=l(`el-button`);return h(),s(`div`,nt,[e(`div`,rt,[a(g,{class:`mb-4`}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),a(y,{class:`mb-4`}),t.config?.ingredients?(h(),f(b,{key:0,class:`mb-4`})):o(``,!0),t.config?.ingredients?(h(),f(x,{key:1,class:`mb-4`})):o(``,!0)]),e(`div`,it,[a(S,{scenario:`pika`}),t.walletMode?o(``,!0):(h(),f(C,{key:0,value:t.consumption,service:t.service},null,8,[`value`,`service`])),a(T,{type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(w,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`pika.button.generate`)),1)]),_:1},8,[`onClick`])])])}var ot=H(tt,[[`render`,at]]),st=_({name:`VideoPlayer`,components:{VuePlyr:me},props:{modelValue:{type:Object,required:!0}},data(){return{options:{quality:{default:1080,options:[1080]}}}}}),ct=[`data-poster`],lt=[`src`];function ut(t,n,r,i,o,c){let u=l(`vue-plyr`);return h(),s(`div`,null,[a(u,{options:t.options,class:`video`},{default:p(()=>[e(`video`,{controls:``,playsinline:``,preload:`metadata`,"data-poster":t.modelValue?.image_url},[e(`source`,{size:`1080`,src:t.modelValue?.video_url,type:`video/mp4`},null,8,lt)],8,ct)]),_:1},8,[`options`])])}var dt=_({name:`TaskPreview`,components:{DeleteIcon:I,ChannelIcon:N,InfoIcon:F,MagicIcon:L,TimeIcon:k,WarningIcon:te,CopyToClipboard:le,ElAlert:S,VideoPlayer:H(st,[[`render`,ut],[`__scopeId`,`data-v-897d9fe0`]]),ElTooltip:x,ElButton:V,ApiCodeButton:ge,ReportButton:ue},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.pika?.application},config(){return this.$store.state.pika?.config},videos(){let e=[],t=this.modelValue?.request?.action;return Array.isArray(this.modelValue?.response?.data)&&this.modelValue?.response?.data?.forEach(n=>{let r=n;t&&(r.action=t),e.push(r)}),e.length===0&&e.push({}),e}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await Q.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`pika/deleteTask`,{id:e}),w.success(this.$t(`common.message.deleteTaskSuccess`))}catch{w.error(this.$t(`common.message.deleteTaskFailed`))}}},isFailure(e){let t=this.modelValue?.response;return t?.success===!1||!!t?.error||e?.state===`failed`||e?.state===`cancelled`},isWaiting(e){return this.modelValue?.response?this.isFailure(e)||e?.video_url?!1:!e?.state||[`queued`,`pending`,`processing`,`running`].includes(e.state):!0},onDownload(e){console.log(`on download`),window.open(e,`_blank`)},onReload(e){let t=e.target,n=new URL(t.src),r=n.searchParams.get(`retry`);if(!r)n.searchParams.set(`retry`,`1`);else if(parseInt(r)<2)n.searchParams.set(`retry`,(parseInt(r)+1).toString());else return;t.src=n.toString()},onOpenVideo(e){window.open(e,`_blank`)}}}),ft={class:`left`},pt={class:`main`},mt={class:`bot`},ht={class:`datetime`},gt=[`aria-label`],_t={class:`info`},vt={key:0,class:`prompt mt-2`},yt={key:0},bt={key:1},xt={key:0,class:n({content:!0,failed:!0})},St={class:`image-wrapper`},Ct={key:0,class:n({operations:!0,"mt-2":!0})},wt={key:0,class:`description`},Tt={class:`description`},Et={key:1,class:`description`},$={key:1,class:n({content:!0})},Dt={class:`description`},Ot={class:`description`},kt={key:0,class:`description`},At={class:`description`},jt={key:2,class:n({content:!0})},Mt={class:`description`};function Nt(n,u,d,g,_,v){let y=l(`capability-presentation`),b=l(`delete-icon`),x=l(`el-tooltip`),S=l(`VideoPlayer`),C=l(`el-button`),w=l(`api-code-button`),T=l(`report-button`),E=l(`channel-icon`),D=l(`magic-icon`),O=l(`copy-to-clipboard`),k=l(`time-icon`),A=l(`el-alert`),j=l(`warning-icon`),M=l(`info-icon`);return h(!0),s(c,null,m(n.videos,(c,l)=>(h(),s(`div`,{key:l,class:`preview`},[e(`div`,ft,[a(y,{capability:`pika`,part:`avatar`,class:`avatar`})]),e(`div`,pt,[e(`div`,mt,[a(y,{capability:`pika`,part:`name`}),e(`span`,ht,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(x,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:p(()=>[n.modelValue?.id?(h(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:u[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,gt)):o(``,!0)]),_:1},8,[`content`])]),e(`div`,_t,[n.modelValue?.request?.prompt?(h(),s(`p`,vt,[r(i(n.modelValue?.request?.prompt)+` `,1),n.modelValue?.response?o(``,!0):(h(),s(`span`,yt,` - (`+i(n.$t(`pika.status.pending`))+`) `,1)),n.modelValue?.response&&n.isWaiting(c)?(h(),s(`span`,bt,` - (`+i(n.$t(`pika.status.processing`))+`) `,1)):o(``,!0)])):o(``,!0)]),n.modelValue?.response?.success===!0&&c?.video_url?(h(),s(`div`,xt,[e(`div`,St,[a(S,{"model-value":c},null,8,[`model-value`])]),c?(h(),s(`div`,Ct,[a(x,{class:`box-item`,effect:`dark`,content:n.$t(`pika.message.downloadVideo`),placement:`top-start`},{default:p(()=>[c?.video_url?(h(),f(C,{key:0,type:`info`,size:`small`,class:`btn-action`,onClick:e=>n.onDownload(c?.video_url)},{default:p(()=>[r(i(n.$t(`pika.button.download`)),1)]),_:1},8,[`onClick`])):o(``,!0)]),_:2},1032,[`content`]),a(w,{path:`/pika/videos`,body:n.modelValue?.request},null,8,[`body`]),a(T,{service:`pika`,"target-id":n.modelValue?.id,snapshot:{prompt:n.modelValue?.request?.prompt}},null,8,[`target-id`,`snapshot`])])):o(``,!0),a(A,{closable:!1,class:`mt-2 success`},{default:p(()=>[n.modelValue?.request?.model?(h(),s(`p`,wt,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`pika.name.model`))+`: `+i(n.modelValue?.request?.model),1)])):o(``,!0),e(`p`,Tt,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`pika.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(O,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),n.modelValue?.elapsed?(h(),s(`p`,Et,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`pika.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0)]),_:1})])):o(``,!0),n.isFailure(c)?(h(),s(`div`,$,[a(A,{closable:!1,class:`failure`},{template:p(()=>[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`pika.name.failure`)),1)]),default:p(()=>[e(`p`,Dt,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`pika.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(O,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),e(`p`,Ot,[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`pika.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(O,{content:n.modelValue?.response?.error?.message,class:`btn-copy`},null,8,[`content`])]),n.modelValue?.elapsed?(h(),s(`p`,kt,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`pika.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e(`p`,At,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`pika.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(O,{content:n.modelValue?.response?.trace_id,class:`btn-copy`},null,8,[`content`])])]),_:1})])):o(``,!0),n.isWaiting(c)?(h(),s(`div`,jt,[a(A,{closable:!1,class:`info`},{template:p(()=>[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(n.modelValue?.response?`pika.status.processing`:`pika.status.pending`)),1)]),default:p(()=>[e(`p`,Mt,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`pika.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(O,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])])]),_:1})])):o(``,!0)])]))),128)}var Pt=_({name:`RecentPanel`,components:{TaskPreview:H(dt,[[`render`,Nt],[`__scopeId`,`data-v-4c95d941`]]),BotPlaceholder:_e,NoTasks:ee,ScrollList:M},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?.()}}}),Ft={key:0},It={key:2,class:`w-full h-full flex items-center justify-center`};function Lt(e,t,n,r,i,u){let d=l(`bot-placeholder`),g=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return h(),s(c,null,[e.tasks?.items===void 0?(h(),s(`div`,Ft,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(h(),f(_,{key:1,ref:`scrollList`,class:`tasks h-full w-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(h(!0),s(c,null,m(e.tasks?.items,(e,t)=>(h(),f(g,{key:t,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(h(),s(`div`,It,[a(v)])):o(``,!0)],64)}var Rt=_({name:`PikaIndex`,components:{ConfigPanel:ot,Layout:Ce,RecentPanel:H(Pt,[[`render`,Lt]])},mixins:[q],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1,walletTaskIds:[]}},computed:{applicationsLoading(){return this.$store.state.pika?.status?.getApplications===C.Request},tasksLoading(){return this.$store.state.pika?.status?.getTasks===C.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===C.Request},needApply(){return this.$store.state.pika.status.getApplications===C.Success&&!this.application},application(){return this.$store.state.pika.application},applications(){return this.$store.state.pika.applications},tasks(){return this.$store.state.pika.tasks},walletMode(){return Z()&&J(`pika`).mode===`wallet`}},watch:{walletMode:{async handler(e,t){if(!(t===void 0||e===t)){if(this.$store.commit(`pika/setTasks`,void 0),e&&!this.job&&(this.job=window.setInterval(this.onGetTasks,5e3)),!e&&!this.credential?.token){window.clearInterval(this.job),this.job=0,await this.onScrollDown();return}await this.onGetTasks(),await this.onScrollDown()}}},tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job||=window.setInterval(this.onGetTasks,5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await P({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`pika/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`pika/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},onApply(){G.create({application:this.application}).then(({data:e})=>{this.application=e,w.success(this.$t(`application.message.applySuccessfully`))}).catch(e=>{e?.response?.data?.code===`duplication`&&w.error(this.$t(`application.message.alreadyApplied`))})},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`pika/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r,...this.walletMode&&!this.credential?.token?{mode:`x402`,ids:this.walletTaskIds}:{}})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!W(this.uploadTracker,e=>this.$t(e),e=>w.warning(e)))return;let e=z(this.config),t;if(this.walletMode){let n=this.getWalletContext();if(!n){w.warning(this.$t(`common.x402Scenario.connectWalletFirst`));return}t=X.generate(e,{mode:`x402`,x402:{wallet:n,confirm:e=>this.confirmWalletPayment(e),identityToken:this.credential?.token}})}else{if(!se())return;let n=this.credential?.token;if(!n)return;t=X.generate(e,{token:n})}w.info(this.$t(`pika.message.startingTask`)),U(`pika`,t).then(e=>{let t=e?.data?.task_id;this.walletMode&&!this.credential?.token&&t&&!this.walletTaskIds.includes(t)&&this.walletTaskIds.unshift(t),w.success(this.$t(`pika.message.startTaskSuccess`)),this.$store.commit(`pika/setConfig`,{config:void 0})}).catch(e=>{let t=e?.response?.data;e instanceof K||(t?.error?.code===`used_up`?w.error(this.$t(`pika.message.usedUp`)):this.walletMode?w.error(`${this.$t(`common.x402Scenario.paymentFailed`)} ${e?.message||``}`.trim()):w.error(this.$t(`pika.message.startTaskFailed`)))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getWalletContext(){return ie(this.$wallet)},async confirmWalletPayment(e){return Q.confirm(this.$t(`common.x402Scenario.confirmPayment`,{amount:e.amountUsdc}),this.$t(`order.message.x402ConfirmTitle`),{confirmButtonText:this.$t(`order.message.x402WalletPayCta`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`}).then(()=>!0).catch(()=>!1)},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function zt(e,t,n,r,i,o){let s=l(`config-panel`),c=l(`recent-panel`),u=l(`layout`);return h(),f(u,null,{config:p(()=>[a(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:p(()=>[a(c,{ref:`recentPanel`,class:`panel recent`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var Bt=H(Rt,[[`render`,zt],[`__scopeId`,`data-v-80210f6c`]]);export{Bt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,Gt as t,I as n,Jt as r,L as i,M as a,N as o,at as s,ht as c,j as l,mt as u,ot as d,tt as f,z as p}from"./vendor-chart-Dw-P17PN.js";import{n as m,t as h}from"./row-DQNf_Mdc.js";import{i as g,n as _,r as v,t as y}from"./container-VI0MzukK.js";import{n as b,r as x,t as S}from"./dropdown-DwPgFNC_.js";import{i as C,n as w,r as T,t as E}from"./avatar-D77Q9I5Z.js";import{Ma as D,O,Q as k,_n as A,da as j,fn as M,j as N,la as P,pa as F,ra as I,st as L,vt as R}from"./index-CgyjiEUz.js";import{t as z}from"./BottomFooter-CjTWNxxs.js";import{t as B}from"./Logo-GjczKJ_W.js";var V=p({name:`TopHeader`,components:{ElCol:m,Logo:B,ElRow:h,ElDropdown:S,ElDropdownMenu:x,ElMenu:w,ElMenuItem:T,ElDropdownItem:b,ElButton:D,ElSubMenu:C},data(){return{defaultAvatar:E,products:`chat`}},computed:{site(){return this.$store.state?.site},dark(){return this.$store.getters?.dark},active(){return this.$route.matched?.[0]?.path},isMinimalHeader(){return this.$route.name===R},user(){return this.$store.getters?.user},authenticated(){return this.$store.getters?.authenticated},isMainOfficialHost(){return A()},isDesktopChrome(){return P()},isMacChrome(){return P()&&j()}},methods:{openTab(e){if(F()){N.open({url:e}).catch(t=>{console.warn(`Browser.open failed, falling back to window.open`,t),window.open(e,`_blank`)});return}window.open(e,`_blank`)},onSelect(e){e&&this.$router.push(e)},onHome(){this.$router.push({name:R})},onLogin(){this.$store.dispatch(`login`,{redirect:this.$route.fullPath})},onDownload(){this.$router.push({name:L})},onProfile(){let e=I();this.openTab(M(`${e}/user/profile`))},onVerify(){let e=I();this.openTab(M(`${e}/user/verify`))},onConsole(){this.$router.push({name:k})},async onLogout(){this.$store.dispatch(`logout`)}}}),H={key:0,class:`mt-4 pr-10`},U={key:1,class:`float-right`},W=[`src`];function G(p,m,h,g,_,v){let y=s(`logo`),b=s(`el-col`),x=s(`el-menu-item`),S=s(`el-sub-menu`),C=s(`el-menu`),w=s(`el-button`),T=s(`language-selector`),E=s(`dark-selector`),D=s(`el-dropdown-item`),O=s(`el-dropdown-menu`),k=s(`el-dropdown`),A=s(`el-row`),j=d(`t`);return f(),l(A,{class:t([`header`,{"desktop-chrome":p.isDesktopChrome,"is-mac":p.isMacChrome,"minimal-only":p.isMinimalHeader}])},{default:u(()=>[p.isMinimalHeader?(f(),l(b,{key:0,span:24,class:`brand-col`},{default:u(()=>[i(y,{onClick:p.onHome},null,8,[`onClick`])]),_:1})):(f(),l(b,{key:1,md:4,xs:24,class:`brand-col`},{default:u(()=>[i(y,{onClick:p.onHome},null,8,[`onClick`])]),_:1})),p.isMinimalHeader?a(``,!0):(f(),l(b,{key:2,md:16,xs:13},{default:u(()=>[i(C,{"default-active":p.active,mode:`horizontal`,class:`menu`,ellipsis:!0,onSelect:p.onSelect},{default:u(()=>[i(S,{index:p.products},{title:u(()=>[n(r(p.$t(`common.nav.products`)),1)]),default:u(()=>[c(i(x,{index:`/home`},null,512),[[j,`intro.nav.overview`]]),p.site?.features?.chatgpt?.enabled?c((f(),l(x,{key:0,index:`/chat`},null,512)),[[j,`index.title.chat`]]):a(``,!0),p.site?.features?.midjourney?.enabled?c((f(),l(x,{key:1,index:`/midjourney`},null,512)),[[j,`index.title.midjourney`]]):a(``,!0),p.site?.features?.qrart?.enabled?c((f(),l(x,{key:2,index:`/qrart`},null,512)),[[j,`index.title.qrart`]]):a(``,!0),p.site?.features?.suno?.enabled?c((f(),l(x,{key:3,index:`/suno`},null,512)),[[j,`index.title.suno`]]):a(``,!0),p.site?.features?.luma?.enabled?c((f(),l(x,{key:4,index:`/luma`},null,512)),[[j,`index.title.luma`]]):a(``,!0)]),_:1},8,[`index`]),c(i(x,{index:`/business`},null,512),[[j,`index.nav.business`]]),p.isMainOfficialHost?c((f(),l(x,{key:0,onRoute:e=>void 0,onClick:p.onDownload},null,8,[`onClick`])),[[j,`common.nav.mobileApp`]]):a(``,!0),c(i(x,{onRoute:e=>void 0,onClick:m[0]||=e=>p.openTab(`https://platform.acedata.cloud`)},null,512),[[j,`common.nav.apiPlatform`]]),c(i(x,{onRoute:e=>void 0,onClick:m[1]||=e=>p.openTab(`https://platform.acedata.cloud/support`)},null,512),[[j,`common.nav.support`]]),c(i(x,{onRoute:e=>void 0,onClick:m[2]||=e=>p.openTab(`https://platform.acedata.cloud/earning`)},null,512),[[j,`common.nav.referral`]])]),_:1},8,[`default-active`,`onSelect`])]),_:1})),p.isMinimalHeader?a(``,!0):(f(),l(b,{key:3,md:4,xs:11},{default:u(()=>[p.authenticated?(f(),o(`div`,U,[e(`div`,{class:`console`,onClick:m[3]||=(...e)=>p.onConsole&&p.onConsole(...e)},r(p.$t(`common.button.console`)),1),i(k,{trigger:`click`},{dropdown:u(()=>[i(O,null,{default:u(()=>[i(D,{onClick:p.onProfile},{default:u(()=>[n(r(p.$t(`common.button.profile`)),1)]),_:1},8,[`onClick`]),i(D,{onClick:p.onLogout},{default:u(()=>[n(r(p.$t(`common.button.logout`)),1)]),_:1},8,[`onClick`])]),_:1})]),default:u(()=>[e(`img`,{src:p.user?.avatar||p.defaultAvatar,class:`avatar`},null,8,W)]),_:1})])):(f(),o(`div`,H,[i(w,{type:`primary`,class:`float-right`,size:`small`,round:``,onClick:p.onLogin},{default:u(()=>[n(r(p.$t(`common.button.login`)),1)]),_:1},8,[`onClick`]),i(T,{class:`locale float-right mr-4`}),i(E,{class:`float-right mr-4`})]))]),_:1}))]),_:1},8,[`class`])}var K=p({name:`LayoutIndex`,components:{TopHeader:O(V,[[`render`,G]]),BottomFooter:z,ElContainer:y,ElMain:g,ElFooter:_,ElHeader:v}});function q(e,t,n,r,a,o){let c=s(`top-header`),d=s(`el-header`),p=s(`router-view`),m=s(`el-main`),h=s(`bottom-footer`),g=s(`el-footer`),_=s(`el-container`);return f(),l(_,{class:`wrapper min-h-[100vh]`},{default:u(()=>[i(d,{class:`header p-0 h-auto`},{default:u(()=>[i(c)]),_:1}),i(m,{class:`main`},{default:u(()=>[i(p)]),_:1}),i(g,{class:`footer p-0 h-auto`},{default:u(()=>[i(h)]),_:1})]),_:1})}var J=O(K,[[`render`,q]]);export{J as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,it as d,j as f,mt as p,qt as m,rt as h,tt as g,x as _,z as v}from"./vendor-chart-Dw-P17PN.js";import{r as y,t as b}from"./select-Cnf2vYb_.js";import{t as x}from"./upload-Ga2zshQX.js";import{t as S}from"./tooltip-BTxABu9c.js";import{t as C}from"./alert-BprQRUmf.js";import{h as w,v as T}from"./models-CqVJobW3.js";import{n as E,r as D}from"./radio-BNhFzeBO.js";import{t as O}from"./drawer-BHgjWQtL.js";import{t as k}from"./slider-DntXhQ3E.js";import{t as A}from"./switch-DEk8VUni.js";import{t as j}from"./clock-BD11izpq.js";import{t as M}from"./external-link-DPlr_OQI.js";import{a as N,i as P,n as F,r as I,s as ee,t as te}from"./pagination-CJyJZAtw.js";import{t as L}from"./info-zysMX1Bn.js";import{t as R}from"./message-circle-DXDgPie6.js";import{t as ne}from"./sparkles-BEzTYbiu.js";import{t as re}from"./trash-2-BwCwpfRq.js";import{t as ie}from"./triangle-alert-B_dh4qI1.js";import{t as ae}from"./upload-BzOXGCPD.js";import{t as z}from"./wand-sparkles-CDrVNjr9.js";import{Ci as oe,Di as B,Ei as se,Ti as V,wi as H}from"./constants-BHt-rxvE.js";import{$r as U,$t as W,Ba as G,Fr as K,Jt as ce,Ma as q,O as J,Oi as le,Pr as Y,Qt as ue,Si as de,Zr as fe,_a as pe,en as me,hi as X,ia as he,in as ge,mi as Z,nn as _e,pn as ve,tn as ye,va as Q,xa as be}from"./index-CgyjiEUz.js";import{t as xe}from"./CopyToClipboard-CgR-ErWz.js";import{t as Se}from"./Status-C00lRgSw.js";import{t as Ce}from"./ReportButton-BSorvQYf.js";import{t as we}from"./ImagePreview-B6uigACk.js";import{n as Te}from"./taskDrawerMixin-DyAUhFEq.js";import{t as Ee}from"./Consumption-RQBkhx2x.js";import{t as De}from"./ScenarioPaymentMode-DVAjX6bP.js";import{t as Oe}from"./ApiCodeButton-BA7ubKjq.js";import{t as ke}from"./BotPlaceholder-CLTFqIYe.js";import{t as Ae}from"./ImageWrapper-XqGyA-WJ.js";var je=pe(`sprout`,[[`path`,{d:`M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3`,key:`139s4v`}],[`path`,{d:`M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4`,key:`1dlkgp`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),Me=v({name:`LayoutQrart`,components:{MagicIcon:z,ElDrawer:O,ElButton:q},mixins:[Te]}),Ne={class:`main flex flex-row flex-1`},Pe={class:`config w-[320px] flex-none h-full min-h-0 overflow-hidden flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},Fe={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Ie(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),h=l(`el-drawer`);return g(),s(`div`,Ne,[e(`div`,Pe,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,Fe,[d(t.$slots,`result`,{},void 0,!0)]),u(a(m,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[_,!t.tasksEmpty]]),a(h,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var Le=J(Me,[[`render`,Ie],[`__scopeId`,`data-v-b6a1bb95`]]),Re=v({name:`VersionSelector`,components:{ElSelect:y,ElOption:b},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{label:this.$t(`qrart.type.text`),value:`text`},{label:this.$t(`qrart.type.link`),value:`link`},{label:this.$t(`qrart.type.email`),value:`email`},{label:this.$t(`qrart.type.phone`),value:`phone`},{label:this.$t(`qrart.type.sms`),value:`sms`}]}},computed:{value:{get(){return this.$store.state.qrart?.config?.type},set(e){console.debug(`set type`,e),this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,type:e})}}},mounted(){this.value||=(console.debug(`set default type`,B),B)}}),ze={class:`field`},Be={class:`text-sm font-bold title`};function Ve(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,ze,[e(`span`,Be,i(t.$t(`qrart.name.type`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`qrart.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var He=J(Re,[[`render`,Ve],[`__scopeId`,`data-v-b4bd8f04`]]),Ue=v({name:`AspectRatioSelector`,data(){return{options:[{value:`1:1`,label:`1:1`,width:30,height:30},{value:`4:3`,label:`4:3`,width:32,height:24},{value:`3:4`,label:`3:4`,width:24,height:32},{value:`16:9`,label:`16:9`,width:32,height:18},{value:`9:16`,label:`9:16`,width:18,height:32}]}},computed:{active(){return this.options.findIndex(e=>e.value===String(this.value))||0},value:{get(){return this.$store.state.qrart?.config?.aspect_ratio},set(e){console.debug(`set aspect ratio`,e),this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,aspect_ratio:e})}}},mounted(){this.value||=`1:1`}}),We={class:`text-sm font-bold block mb-2`},Ge={class:`items`},Ke=[`onClick`],qe={class:`name`};function Je(t,r,a,o,l,u){return g(),s(`div`,null,[e(`span`,We,i(t.$t(`qrart.name.aspectRatio`)),1),e(`div`,Ge,[(g(!0),s(c,null,h(t.options,(r,a)=>(g(),s(`div`,{key:a,class:n({active:t.active===a,item:!0}),onClick:e=>t.value=r.value},[e(`div`,{class:n([`preview`,r.label])},[e(`div`,{class:`rect`,style:m({width:r.width+`px`,height:r.height+`px`})},null,4)],2),e(`p`,qe,i(r.label),1)],10,Ke))),128))])])}var Ye=J(Ue,[[`render`,Je],[`__scopeId`,`data-v-b7590ecc`]]),Xe=v({name:`QrwSelector`,components:{ElSlider:k,InfoIcon:N},computed:{value:{get(){return this.$store.state.qrart?.config?.qrw||2},set(e){console.debug(`set qrw`,e),this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,qrw:e})}}},mounted(){this.value||=(console.debug(`set default qrw`),2)}}),Ze={class:`field`},Qe={class:`text-sm font-bold title mb-2`};function $e(t,n,r,o,c,u){let d=l(`el-slider`),f=l(`info-icon`);return g(),s(`div`,Ze,[e(`span`,Qe,i(t.$t(`qrart.name.qrw`)),1),a(d,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,min:1.5,max:3,step:.1,class:`value`},null,8,[`modelValue`]),a(f,{content:t.$t(`qrart.description.qrw`),class:`info`},null,8,[`content`])])}var et=J(Xe,[[`render`,$e],[`__scopeId`,`data-v-8410479c`]]),tt=v({name:`StepsSelector`,components:{ElSlider:k,InfoIcon:N},computed:{value:{get(){return this.$store.state.qrart?.config?.steps||20},set(e){console.debug(`set steps`,e),this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,steps:e})}}},mounted(){this.value||=(console.debug(`set default steps`,20),20)}}),nt={class:`field`},rt={class:`text-sm font-bold block mb-2`};function it(t,n,r,o,c,u){let d=l(`el-slider`),f=l(`info-icon`);return g(),s(`div`,nt,[e(`span`,rt,i(t.$t(`qrart.name.steps`)),1),a(d,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,min:10,max:20,step:1,class:`value`},null,8,[`modelValue`]),a(f,{content:t.$t(`qrart.description.steps`),class:`info`},null,8,[`content`])])}var at=J(tt,[[`render`,it],[`__scopeId`,`data-v-0c88983e`]]),ot=v({name:`AdvancedSelector`,components:{ElSwitch:A},computed:{value:{get(){return this.$store.state.qrart?.config?.advanced},set(e){console.debug(`set advanced`,e),this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,advanced:e})}}},mounted(){this.value===void 0&&(this.value=!1)}}),st={class:`field`},ct={class:`title font-bold`};function lt(t,n,r,o,c,u){let d=l(`el-switch`);return g(),s(`div`,st,[e(`span`,ct,i(t.$t(`qrart.name.advanced`)),1),a(d,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])}var ut=J(ot,[[`render`,lt],[`__scopeId`,`data-v-f8ddf849`]]),dt=v({name:`MarkerShapeSelector`,components:{ElSelect:y,ElOption:b},data(){return{options:[{value:`square`,label:this.$t(`qrart.markerShape.square`)},{value:`circle`,label:this.$t(`qrart.markerShape.circle`)},{value:`plus`,label:this.$t(`qrart.markerShape.plus`)},{value:`box`,label:this.$t(`qrart.markerShape.box`)},{value:`octagon`,label:this.$t(`qrart.markerShape.octagon`)},{value:`tiny-plus`,label:this.$t(`qrart.markerShape.tinyPlus`)},{value:`random`,label:this.$t(`qrart.markerShape.random`)}]}},computed:{value:{get(){return this.$store.state.qrart?.config?.marker_shape},set(e){console.debug(`set marker_shape`,e),this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,marker_shape:e})}}},mounted(){this.value||=oe}}),ft={class:`field`},pt={class:`text-sm font-bold block mb-2`};function mt(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,ft,[e(`span`,pt,i(t.$t(`qrart.name.markerShape`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,clearable:``,class:`value`,placeholder:t.$t(`qrart.placeholder.markerShape`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var ht=J(dt,[[`render`,mt],[`__scopeId`,`data-v-de71e0b0`]]),gt=v({name:`SubMarkerSelector`,components:{ElSelect:y,ElOption:b},data(){return{options:[{value:`square`,label:this.$t(`qrart.subMarker.square`)},{value:`circle`,label:this.$t(`qrart.subMarker.circle`)},{value:`plus`,label:this.$t(`qrart.subMarker.plus`)},{value:`box`,label:this.$t(`qrart.subMarker.box`)},{value:`random`,label:this.$t(`qrart.subMarker.random`)}]}},computed:{value:{get(){return this.$store.state.qrart?.config?.sub_marker},set(e){console.debug(`set sub_marker`,e),this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,sub_marker:e})}}},mounted(){this.value||=se}}),_t={class:`field`},vt={class:`text-sm font-bold block mb-2`};function yt(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,_t,[e(`span`,vt,i(t.$t(`qrart.name.subMarker`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,clearable:``,class:`value`,placeholder:t.$t(`qrart.placeholder.subMarker`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var bt=J(gt,[[`render`,yt],[`__scopeId`,`data-v-51a39efa`]]),xt=v({name:`RotateSelector`,components:{ElSelect:y,ElOption:b},data(){return{options:[{value:0,label:0},{value:90,label:90},{value:180,label:180},{value:270,label:270}]}},computed:{value:{get(){return this.$store.state.qrart?.config?.rotate},set(e){console.debug(`set rotate`,e),this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,rotate:e})}}},mounted(){this.value||=0}}),St={class:`field`},Ct={class:`text-sm font-bold block mb-2`};function wt(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,St,[e(`span`,Ct,i(t.$t(`qrart.name.rotate`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,clearable:``,class:`value`,placeholder:t.$t(`qrart.placeholder.rotate`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Tt=J(xt,[[`render`,wt],[`__scopeId`,`data-v-72e35835`]]),Et=v({name:`EclSelector`,components:{ElSelect:y,ElOption:b},data(){return{options:[{value:`L`,label:`L`},{value:`M`,label:`M`},{value:`Q`,label:`Q`},{value:`H`,label:`H`}]}},computed:{value:{get(){return this.$store.state.qrart?.config?.ecl},set(e){console.debug(`set ecl`,e),this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,ecl:e})}}},mounted(){this.value||=`H`}}),Dt={class:`field`},Ot={class:`text-sm font-bold block mb-2`};function kt(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,Dt,[e(`span`,Ot,i(t.$t(`qrart.name.ecl`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,clearable:``,class:`value`,placeholder:t.$t(`qrart.placeholder.ecl`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var At=J(Et,[[`render`,kt],[`__scopeId`,`data-v-b3a5e331`]]),jt=v({name:`MarkerShapeSelector`,components:{ElSelect:y,ElOption:b},data(){return{options:[{value:`center`,label:this.$t(`qrart.position.center`)},{value:`top`,label:this.$t(`qrart.position.top`)},{value:`right`,label:this.$t(`qrart.position.right`)},{value:`bottom`,label:this.$t(`qrart.position.bottom`)},{value:`left`,label:this.$t(`qrart.position.left`)},{value:`top-left`,label:this.$t(`qrart.position.topLeft`)},{value:`top-right`,label:this.$t(`qrart.position.topRight`)},{value:`bottom-left`,label:this.$t(`qrart.position.bottomLeft`)},{value:`bottom-right`,label:this.$t(`qrart.position.bottomRight`)}]}},computed:{value:{get(){return this.$store.state.qrart?.config?.position},set(e){console.debug(`set position`,e),this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,position:e})}}},mounted(){this.value||=V}}),Mt={class:`field`},Nt={class:`title font-bold`};function Pt(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,Mt,[e(`span`,Nt,i(t.$t(`qrart.name.position`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,clearable:``,class:`value`,placeholder:t.$t(`qrart.placeholder.position`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Ft=J(jt,[[`render`,Pt],[`__scopeId`,`data-v-54186505`]]),It=v({name:`PaddingLevelSelector`,components:{ElSelect:y,ElOption:b},data(){return{options:[{value:0,label:0},{value:5,label:5},{value:10,label:10},{value:10,label:10},{value:15,label:15},{value:20,label:20}]}},computed:{value:{get(){return this.$store.state.qrart?.config?.padding_level},set(e){console.debug(`set padding_level`,e),this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,padding_level:e})}}},mounted(){this.value||=5}}),Lt={class:`field`},Rt={class:`text-sm font-bold block mb-2`};function zt(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,Lt,[e(`span`,Rt,i(t.$t(`qrart.name.paddingLevel`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,clearable:``,class:`value`,placeholder:t.$t(`qrart.placeholder.paddingLevel`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Bt=J(It,[[`render`,zt],[`__scopeId`,`data-v-49d801fd`]]),Vt=v({name:`PaddingNoiseSelector`,components:{ElSelect:y,ElOption:b},data(){return{options:[{value:0,label:0},{value:.25,label:.25},{value:.5,label:.5},{value:.75,label:.75},{value:1,label:1}]}},computed:{value:{get(){return this.$store.state.qrart?.config?.padding_noise},set(e){console.debug(`set padding_noise`,e),this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,padding_noise:e})}}},mounted(){this.value||=0}}),Ht={class:`field`},Ut={class:`text-sm font-bold block mb-2`};function Wt(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,Ht,[e(`span`,Ut,i(t.$t(`qrart.name.paddingNoise`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,clearable:``,class:`value`,placeholder:t.$t(`qrart.placeholder.paddingNoise`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Gt=J(Vt,[[`render`,Wt],[`__scopeId`,`data-v-a20833bb`]]),Kt=v({name:`PixelStyleSelector`,components:{ElSelect:y,ElOption:b},data(){return{options:[{value:`square`,label:this.$t(`qrart.pixelStyle.square`)},{value:`rounded`,label:this.$t(`qrart.pixelStyle.rounded`)},{value:`dot`,label:this.$t(`qrart.pixelStyle.dot`)},{value:`squircle`,label:this.$t(`qrart.pixelStyle.squircle`)},{value:`row`,label:this.$t(`qrart.pixelStyle.row`)},{value:`column`,label:this.$t(`qrart.pixelStyle.column`)}]}},computed:{value:{get(){return this.$store.state.qrart?.config?.pixel_style},set(e){console.debug(`set pixel_style`,e),this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,pixel_style:e})}}},mounted(){this.value||=H}}),qt={class:`field`},Jt={class:`text-sm font-bold block mb-2`};function Yt(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,qt,[e(`span`,Jt,i(t.$t(`qrart.name.pixelStyle`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,clearable:``,class:`value`,placeholder:t.$t(`qrart.placeholder.pixelStyle`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Xt=J(Kt,[[`render`,Yt],[`__scopeId`,`data-v-aca7f79f`]]),Zt=v({name:`SeedInput`,components:{ElInput:G},data(){return{}},computed:{value:{get(){return this.$store.state.qrart?.config?.seed},set(e){console.debug(`set seed`,e),this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,seed:e?parseInt(e):void 0})}}},mounted(){this.value||=void 0}}),Qt={class:`field`},$t={class:`text-sm font-bold block mb-2`};function en(t,n,r,o,c,u){let d=l(`el-input`);return g(),s(`div`,Qt,[e(`span`,$t,i(t.$t(`qrart.name.seed`)),1),a(d,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`qrart.placeholder.seed`)},null,8,[`modelValue`,`placeholder`])])}var tn=J(Zt,[[`render`,en],[`__scopeId`,`data-v-d939305d`]]),nn=v({name:`PresetSelector`,components:{ElImage:be},data(){return{options:[{value:`sunset`,label:this.$t(`qrart.preset.sunset`),url:`https://cdn.acedata.cloud/rp1h1s.png`},{value:`floral`,label:this.$t(`qrart.preset.floral`),url:`https://cdn.acedata.cloud/upyikx.png`},{value:`snowflakes`,label:this.$t(`qrart.preset.snowflakes`),url:`https://cdn.acedata.cloud/j447da.png`},{value:`feathers`,label:this.$t(`qrart.preset.feathers`),url:`https://cdn.acedata.cloud/d2ctz9.png`},{value:`raindrops`,label:this.$t(`qrart.preset.raindrops`),url:`https://cdn.acedata.cloud/xv2t3s.png`},{value:`ultra-realism`,label:this.$t(`qrart.preset.ultraRealism`),url:`https://cdn.acedata.cloud/nlor4y.png`},{value:`epic-realms`,label:this.$t(`qrart.preset.epicRealms`),url:`https://cdn.acedata.cloud/wwzkvy.png`},{value:`intricate-studio`,label:this.$t(`qrart.preset.intricateStudio`),url:`https://cdn.acedata.cloud/4kzf5y.png`},{value:`symmetric-masterpiece`,label:this.$t(`qrart.preset.symmetricMasterpiece`),url:`https://cdn.acedata.cloud/ff4ii2.png`},{value:`luminous-highway`,label:this.$t(`qrart.preset.luminousHighway`),url:`https://cdn.acedata.cloud/cliodt.png`},{value:`celestial-journey`,label:this.$t(`qrart.preset.celestialJourney`),url:`https://cdn.acedata.cloud/ejellf.png`},{value:`neon-mech`,label:this.$t(`qrart.preset.neonMech`),url:`https://cdn.acedata.cloud/3z0y6z.png`},{value:`ethereal-low-poly`,label:this.$t(`qrart.preset.etherealLowPoly`),url:`https://cdn.acedata.cloud/36o0mm.png`},{value:`golden-vista`,label:this.$t(`qrart.preset.goldenVista`),url:`https://cdn.acedata.cloud/xa0267.png`},{value:`cinematic-expanse`,label:this.$t(`qrart.preset.cinematicExpanse`),url:`https://cdn.acedata.cloud/krl5qp.png`},{value:`cinematic-warm`,label:this.$t(`qrart.preset.cinematicWarm`),url:`https://cdn.acedata.cloud/e1aahg.png`},{value:`desolate-wilderness`,label:this.$t(`qrart.preset.desolateWilderness`),url:`https://cdn.acedata.cloud/9evqqu.png`},{value:`vibrant-palette`,label:this.$t(`qrart.preset.vibrantPalette`),url:`https://cdn.acedata.cloud/3fvsmz.png`},{value:`enigmatic-journey`,label:this.$t(`qrart.preset.enigmaticJourney`),url:`https://cdn.acedata.cloud/l6kku0.png`},{value:`timeless-cinematic`,label:this.$t(`qrart.preset.timelessCinematic`),url:`https://cdn.acedata.cloud/h5mzyn.png`},{value:`regal-galaxy`,label:this.$t(`qrart.preset.regalGalaxy`),url:`https://cdn.acedata.cloud/czkegd.png`},{value:`illustrious-canvas`,label:this.$t(`qrart.preset.illustriousCanvas`),url:`https://cdn.acedata.cloud/m8hwzh.png`},{value:`expressive-mural`,label:this.$t(`qrart.preset.expressiveMural`),url:`https://cdn.acedata.cloud/g4v1rb.png`},{value:`serene-haze`,label:this.$t(`qrart.preset.sereneHaze`),url:`https://cdn.acedata.cloud/3w3ixr.png`}]}},computed:{value:{get(){return this.$store.state.qrart?.config?.preset},set(e){console.debug(`set qrw`,e),this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,preset:e})}}},mounted(){this.value||=``}}),rn={class:`field`},an={class:`text-sm font-bold block mb-2`},on={class:`pane`},sn=[`onClick`],cn={class:`name`};function ln(t,r,o,u,d,f){let p=l(`el-image`);return g(),s(`div`,rn,[e(`span`,an,i(t.$t(`qrart.name.preset`)),1),e(`div`,on,[(g(!0),s(c,null,h(t.options,(r,o)=>(g(),s(`div`,{key:o,class:n({item:!0,active:t.value===r.value}),onClick:e=>t.value===r.value?t.value=void 0:t.value=r.value},[a(p,{src:r.url,fit:`fill`,class:`preview`},null,8,[`src`]),e(`span`,cn,i(r.label),1)],10,sn))),128))])])}var un=J(nn,[[`render`,ln],[`__scopeId`,`data-v-65c34adf`]]),dn=v({name:`ContentInput`,components:{UploadIcon:ae,ElInput:G,ElUpload:x,ElRadioGroup:D,ElButton:q,ElRadioButton:E,ImagePreview:we},mixins:[_e,ye,W,ce],data(){return{inputWay:`input`,fileList:[],uploadUrl:he()+`/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.qrart?.config?.content},set(e){this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,content:e,content_image_url:void 0})}}},mounted(){this.value||=``,this.onSetContentImageUrl()},methods:{onExceed(){T.warning(this.$t(`qrart.message.uploadDocumentsExceed`))},onError(){T.error(this.$t(`qrart.message.uploadDocumentsError`))},onSetContentImageUrl(){let e=this.urls?.[0];this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,content:void 0,content_image_url:e})},async onSuccess(){this.onSetContentImageUrl()}}}),fn={class:`field`},pn={class:`flex justify-between items-center mb-4`},mn={class:`text-sm font-bold title`},hn={class:`flex items-center`},gn={key:2,class:`description`};function _n(t,n,c,u,d,m){let h=l(`el-radio-button`),_=l(`el-radio-group`),v=l(`el-input`),y=l(`image-preview`),b=l(`upload-icon`),x=l(`el-button`),S=l(`el-upload`);return g(),s(`div`,fn,[e(`div`,pn,[e(`span`,mn,i(t.$t(`qrart.name.content`)),1),e(`div`,hn,[a(_,{modelValue:t.inputWay,"onUpdate:modelValue":n[0]||=e=>t.inputWay=e},{default:p(()=>[a(h,{label:`input`},{default:p(()=>[r(i(t.$t(`qrart.inputWay.input`)),1)]),_:1}),a(h,{label:`upload`},{default:p(()=>[r(i(t.$t(`qrart.inputWay.upload`)),1)]),_:1})]),_:1},8,[`modelValue`])])]),t.inputWay==`input`?(g(),f(v,{key:0,modelValue:t.value,"onUpdate:modelValue":n[1]||=e=>t.value=e,class:`content`,placeholder:t.$t(`qrart.placeholder.content`)},null,8,[`modelValue`,`placeholder`])):o(``,!0),t.inputWay==`upload`?(g(),f(S,{key:1,ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[2]||=e=>t.fileList=e,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,name:`file`,class:`upload upload-wrapper`,limit:1,multiple:!1,"list-type":`picture`,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[a(y,{url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])]),default:p(()=>[a(x,{size:`small`,type:`primary`,round:``},{default:p(()=>[a(b,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`qrart.button.uploadQr`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])):o(``,!0),t.inputWay==`upload`?(g(),s(`p`,gn,i(t.$t(`qrart.message.uploadQr`)),1)):o(``,!0)])}var vn=J(dn,[[`render`,_n],[`__scopeId`,`data-v-0269b0bd`]]),yn=v({name:`PromptInput`,components:{PromptTextarea:P},computed:{value:{get(){return this.$store.state.qrart?.config?.prompt},set(e){this.$store.commit(`qrart/setConfig`,{...this.$store.state.qrart?.config,prompt:e})}}},mounted(){this.value||=``}});function bn(e,t,n,r,i,a){let o=l(`prompt-textarea`);return g(),f(o,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,title:e.$t(`qrart.name.prompt`),placeholder:e.$t(`qrart.placeholder.prompt`)},null,8,[`modelValue`,`title`,`placeholder`])}var xn=J(yn,[[`render`,bn]]),Sn=350,Cn=v({name:`ConfigPanel`,components:{MagicIcon:z,ElButton:q,Consumption:Ee,TypeSelector:He,PositionSelector:Ft,PixelStyleSelector:Xt,PaddingLevelSelector:Bt,SeedInput:tn,AspectRatioSelector:Ye,QrwSelector:et,EclSelector:At,StepsSelector:at,PaddingNoiseSelector:Gt,AdvancedSelector:ut,MarkerShapeSelector:ht,SubMarkerSelector:bt,RotateSelector:Tt,PresetSelector:un,ContentInput:vn,PromptInput:xn,ScenarioPaymentMode:De},emits:[`generate`],data(){return{quoteTimer:0,quoteRunId:0}},computed:{config(){return this.$store.state.qrart?.config},consumption(){return ge(this.config,this.service?.cost)},service(){return this.$store.state.qrart?.service},walletMode(){return Z()&&X(`qrart`).mode===`wallet`}},watch:{walletMode:{handler(e){e&&this.scheduleQuote()},immediate:!0},config:{handler(){this.walletMode&&this.scheduleQuote()},deep:!0}},beforeUnmount(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1},methods:{scheduleQuote(){window.clearTimeout(this.quoteTimer),this.quoteTimer=window.setTimeout(this.refreshQuote,Sn)},async refreshQuote(){let e=X(`qrart`),t=++this.quoteRunId;e.quoteLoading=!0,e.quoteUsdc=void 0;try{let n=await K.quote(Y(this.config));t===this.quoteRunId&&e.mode===`wallet`&&(e.quoteUsdc=n.amountUsdc)}catch(e){console.warn(`x402 quote failed`,e)}finally{t===this.quoteRunId&&(e.quoteLoading=!1)}}}}),wn={class:`flex flex-col h-full`},Tn={class:`flex-1 overflow-y-auto p-5`},En={class:`flex flex-col items-center justify-center px-5 pb-5`};function Dn(t,n,c,u,d,m){let h=l(`type-selector`),_=l(`content-input`),v=l(`prompt-input`),y=l(`aspect-ratio-selector`),b=l(`qrw-selector`),x=l(`preset-selector`),S=l(`position-selector`),C=l(`advanced-selector`),w=l(`steps-selector`),T=l(`seed-input`),E=l(`pixel-style-selector`),D=l(`marker-shape-selector`),O=l(`sub-marker-selector`),k=l(`rotate-selector`),A=l(`ecl-selector`),j=l(`padding-level-selector`),M=l(`padding-noise-selector`),N=l(`scenario-payment-mode`),P=l(`consumption`),F=l(`magic-icon`),I=l(`el-button`);return g(),s(`div`,wn,[e(`div`,Tn,[a(h,{class:`mb-4`}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),a(y,{class:`mb-4`}),a(b,{class:`mb-4`}),a(x,{class:`mb-4`}),a(S,{class:`mb-4`}),a(C,{class:`mb-4`}),t.config?.advanced?(g(),f(w,{key:0,class:`mb-4`})):o(``,!0),t.config?.advanced?(g(),f(T,{key:1,class:`mb-4`})):o(``,!0),t.config?.advanced?(g(),f(E,{key:2,class:`mb-4`})):o(``,!0),t.config?.advanced?(g(),f(D,{key:3,class:`mb-4`})):o(``,!0),t.config?.advanced?(g(),f(O,{key:4,class:`mb-4`})):o(``,!0),t.config?.advanced?(g(),f(k,{key:5,class:`mb-4`})):o(``,!0),t.config?.advanced?(g(),f(A,{key:6,class:`mb-4`})):o(``,!0),t.config?.advanced?(g(),f(j,{key:7,class:`mb-4`})):o(``,!0),t.config?.advanced?(g(),f(M,{key:8,class:`mb-4`})):o(``,!0)]),e(`div`,En,[a(N,{scenario:`qrart`}),t.walletMode?o(``,!0):(g(),f(P,{key:0,value:t.consumption,service:t.service},null,8,[`value`,`service`])),a(I,{type:`primary`,class:`btn w-full`,round:``,onClick:n[0]||=e=>t.$emit(`generate`)},{default:p(()=>[a(F,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`qrart.button.generate`)),1)]),_:1})])])}var On=J(Cn,[[`render`,Dn]]),kn=v({name:`TaskPreview`,components:{ChannelIcon:ee,DeleteIcon:re,ExternalLinkIcon:M,GrowthIcon:je,InfoIcon:L,MagicIcon:z,MessageIcon:R,RewardIcon:ne,TimeIcon:j,WarningIcon:ie,CopyToClipboard:xe,ElAlert:C,ElTooltip:S,ImageWrapper:Ae,ApiCodeButton:Oe,ReportButton:Ce},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.qrart?.application}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await Q.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`qrart/deleteTask`,{id:e}),T.success(this.$t(`common.message.deleteTaskSuccess`))}catch{T.error(this.$t(`common.message.deleteTaskFailed`))}}},onOpenLink(e){window.open(e,`_blank`)},onReload(e){let t=e.target,n=new URL(t.src),r=n.searchParams.get(`retry`);if(!r)n.searchParams.set(`retry`,`1`);else if(parseInt(r)<2)n.searchParams.set(`retry`,(parseInt(r)+1).toString());else return;t.src=n.toString()},onOpenUrl(e){window.open(e,`_blank`)},onDownload(e){let t=document.createElement(`a`);t.href=e,t.download=e.split(`/`).pop(),t.click()}}}),An={class:`preview w-full h-fit text-left flex flex-row mb-[15px]`},jn={class:`left`},Mn={class:`main flex-1 w-[calc(100%-70px)] min-w-0 pt-[10px] pr-[10px] pb-0 pl-[10px]`},Nn={class:`bot flex items-center text-[16px] font-bold text-[var(--el-color-primary)] overflow-hidden whitespace-nowrap`},Pn={class:`datetime text-[12px] font-normal text-[var(--el-text-color-secondary)] ml-[10px] overflow-hidden text-ellipsis`},Fn=[`aria-label`],In={class:`info`},Ln={key:0,class:`prompt mt-2 text-[14px] font-bold text-[var(--el-text-color-regular)] mb-[10px] overflow-hidden text-ellipsis whitespace-nowrap`},Rn={key:0},zn={key:0,class:n({content:!0,failed:!0})},Bn={class:n({operations:!0,"mt-2":!0,"mb-2":!0})},$={class:`description`},Vn={class:`description`},Hn={key:0,class:`description`},Un={key:1,class:`description`},Wn=[`aria-label`,`title`],Gn={key:2,class:`description`},Kn={key:3,class:`description`},qn={key:1,class:n({content:!0})},Jn={class:`description`},Yn={class:`description`},Xn={key:0,class:`description`},Zn={class:`description`},Qn={key:2,class:n({content:!0})},$n={class:`description`};function er(n,c,u,d,m,h){let _=l(`capability-presentation`),v=l(`delete-icon`),y=l(`el-tooltip`),b=l(`image-wrapper`),x=l(`api-code-button`),S=l(`report-button`),C=l(`magic-icon`),w=l(`copy-to-clipboard`),T=l(`reward-icon`),E=l(`message-icon`),D=l(`external-link-icon`),O=l(`growth-icon`),k=l(`time-icon`),A=l(`el-alert`),j=l(`warning-icon`),M=l(`info-icon`),N=l(`channel-icon`);return g(),s(`div`,An,[e(`div`,jn,[a(_,{capability:`qrart`,part:`avatar`,class:`avatar bg-[var(--el-bg-color)] p-[2px] w-[50px] h-[50px] m-[10px] rounded-full`})]),e(`div`,Mn,[e(`div`,Nn,[a(_,{capability:`qrart`,part:`name`}),e(`span`,Pn,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(y,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:p(()=>[n.modelValue?.id?(g(),s(`button`,{key:0,type:`button`,class:`btn-delete ml-auto shrink-0 cursor-pointer border-none bg-transparent p-[4px_6px] leading-none`,"aria-label":n.$t(`common.button.delete`),onClick:c[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(v,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Fn)):o(``,!0)]),_:1},8,[`content`])]),e(`div`,In,[n.modelValue?.request?.prompt?(g(),s(`p`,Ln,[r(i(n.modelValue?.request?.prompt)+` `,1),n.modelValue?.response?o(``,!0):(g(),s(`span`,Rn,` - (`+i(n.$t(`qrart.status.pending`))+`) `,1))])):o(``,!0)]),n.modelValue?.response?.success===!0?(g(),s(`div`,zn,[n.modelValue?.response?.image_url?(g(),f(b,{key:0,src:n.modelValue?.response?.image_url,"raw-src":n.modelValue?.response?.image_url},null,8,[`src`,`raw-src`])):o(``,!0),e(`div`,Bn,[a(x,{path:`/qrart/generate`,body:n.modelValue?.request},null,8,[`body`]),a(S,{service:`qrart`,"target-id":n.modelValue?.id,snapshot:{prompt:n.modelValue?.request?.prompt}},null,8,[`target-id`,`snapshot`])]),a(A,{closable:!1,class:`mt-2 success`},{default:p(()=>[e(`p`,$,[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`qrart.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),e(`p`,Vn,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`qrart.name.type`))+`: `+i(n.$t(`qrart.type.`+n.modelValue?.request?.type))+` `,1),a(w,{content:n.modelValue?.request?.type,class:`btn-copy`},null,8,[`content`])]),n.modelValue?.request?.content?(g(),s(`p`,Hn,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`qrart.name.content`))+`: `+i(n.modelValue?.request?.content)+` `,1),a(w,{content:n.modelValue?.request?.content,class:`btn-copy`},null,8,[`content`])])):o(``,!0),n.modelValue?.request?.content_image_url?(g(),s(`p`,Un,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`qrart.name.contentImageUrl`))+`: `,1),e(`button`,{type:`button`,class:`icon-button mr-1 cursor-pointer`,"aria-label":n.$t(`common.button.view`),title:n.$t(`common.button.view`),onClick:c[1]||=e=>n.onOpenLink(n.modelValue?.request?.content_image_url)},[a(D,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Wn)])):o(``,!0),n.modelValue?.request?.seed||n.modelValue?.response?.seed?(g(),s(`p`,Gn,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`qrart.name.seed`))+`: `+i(n.modelValue?.request?.seed||n.modelValue?.response?.seed)+` `,1),a(w,{content:(n.modelValue?.request?.seed||n.modelValue?.response?.seed).toString(),class:`btn-copy`},null,8,[`content`])])):o(``,!0),n.modelValue?.elapsed?(g(),s(`p`,Kn,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`qrart.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0)]),_:1})])):o(``,!0),n.modelValue?.response?.success===!1?(g(),s(`div`,qn,[a(A,{closable:!1,class:`failure`},{template:p(()=>[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`qrart.name.failure`)),1)]),default:p(()=>[e(`p`,Jn,[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`qrart.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),e(`p`,Yn,[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`qrart.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(w,{content:n.modelValue?.response?.error?.message,class:`btn-copy`},null,8,[`content`])]),n.modelValue?.elapsed?(g(),s(`p`,Xn,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`qrart.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e(`p`,Zn,[a(N,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`qrart.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(w,{content:n.modelValue?.response?.trace_id,class:`btn-copy`},null,8,[`content`])])]),_:1})])):o(``,!0),n.modelValue?.response?o(``,!0):(g(),s(`div`,Qn,[a(A,{closable:!1,class:`info`},{template:p(()=>[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`qrart.name.failure`)),1)]),default:p(()=>[e(`p`,$n,[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`qrart.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])])]),_:1})]))])])}var tr=v({name:`RecentPanel`,components:{TaskPreview:J(kn,[[`render`,er],[`__scopeId`,`data-v-2fec3c35`]]),BotPlaceholder:ke,NoTasks:I,ScrollList:F},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.qrart?.tasks,items:this.$store.state.qrart?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),nr={key:0},rr={key:2,class:`w-full h-full flex items-center justify-center`};function ir(e,t,n,r,i,u){let d=l(`bot-placeholder`),m=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return g(),s(c,null,[e.tasks?.items===void 0?(g(),s(`div`,nr,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(g(),f(_,{key:1,ref:`scrollList`,class:`tasks h-full w-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(g(!0),s(c,null,h(e.tasks?.items,(e,t)=>(g(),f(m,{key:t,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(g(),s(`div`,rr,[a(v)])):o(``,!0)],64)}var ar=v({name:`QrartIndex`,components:{ConfigPanel:On,Layout:Le,ApplicationStatus:Se,RecentPanel:J(tr,[[`render`,ir]])},mixins:[me],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1,walletTaskIds:[]}},computed:{applicationsLoading(){return this.$store.state.qrart?.status?.getApplications===w.Request},tasksLoading(){return this.$store.state.qrart?.status?.getTasks===w.Request||this.fetchingTasks},service(){return this.$store.state.qrart.service},credential(){return this.$store.state.qrart.credential},config(){return this.$store.state.qrart.config},initializing(){return this.$store.state.qrart.status.getApplications===w.Request},needApply(){return this.$store.state.qrart.status.getApplications===w.Success&&!this.application},application(){return this.$store.state.qrart.application},tasks(){return this.$store.state.qrart.tasks},applications(){return this.$store.state.qrart.applications},walletMode(){return Z()&&X(`qrart`).mode===`wallet`}},watch:{walletMode:{async handler(e,t){t===void 0||e===t||(this.$store.commit(`qrart/setTasks`,void 0),await this.onGetTasks(),await this.onScrollDown())}},tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await te({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(`qrart/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplications`),await this.$store.dispatch(`qrart/getApplications`),console.debug(`end onGetApplications`),await this.onGetTasks()},onApply(){de.create({application:this.application}).then(({data:e})=>{this.application=e,T.success(this.$t(`application.message.applySuccessfully`))}).catch(e=>{e?.response?.data?.code===`duplication`&&T.error(this.$t(`application.message.alreadyApplied`))})},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`qrart/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r,...this.walletMode&&!this.credential?.token?{mode:`x402`,ids:this.walletTaskIds}:{}})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!ue(this.uploadTracker,e=>this.$t(e),e=>T.warning(e)))return;let e=Y(this.config),t;if(this.walletMode){let n=this.getWalletContext();if(!n){T.warning(this.$t(`common.x402Scenario.connectWalletFirst`));return}t=K.generate(e,{mode:`x402`,x402:{wallet:n,confirm:e=>this.confirmWalletPayment(e),identityToken:this.credential?.token}})}else{if(!ve())return;let n=this.credential?.token;if(!n)return;t=K.generate(e,{token:n})}T.info(this.$t(`qrart.message.startingTask`)),le(`qrart`,t).then(e=>{let t=e?.data?.task_id;this.walletMode&&!this.credential?.token&&t&&!this.walletTaskIds.includes(t)&&this.walletTaskIds.unshift(t),T.success(this.$t(`qrart.message.startTaskSuccess`))}).catch(e=>{e instanceof fe||((e?.response?.data)?.error?.code===`used_up`?T.error(this.$t(`qrart.message.usedUp`)):this.walletMode?T.error(`${this.$t(`common.x402Scenario.paymentFailed`)} ${e?.message||``}`.trim()):T.error(this.$t(`qrart.message.startTaskFailed`)))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getWalletContext(){return U(this.$wallet)},async confirmWalletPayment(e){return Q.confirm(this.$t(`common.x402Scenario.confirmPayment`,{amount:e.amountUsdc}),this.$t(`order.message.x402ConfirmTitle`),{confirmButtonText:this.$t(`order.message.x402WalletPayCta`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`}).then(()=>!0).catch(()=>!1)},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function or(e,t,n,r,i,o){let s=l(`config-panel`),c=l(`application-status`),u=l(`recent-panel`),d=l(`layout`);return g(),f(d,null,{config:p(()=>[a(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:p(()=>[a(c,{initializing:e.initializing,application:e.application,applications:e.applications,service:e.service,"need-apply":e.needApply,class:`mb-4`,onRefresh:e.onGetApplication,onSelect:t[0]||=t=>e.$store.dispatch(`qrart/setApplication`,t)},null,8,[`initializing`,`application`,`applications`,`service`,`need-apply`,`onRefresh`]),a(u,{ref:`recentPanel`,class:`panel recent`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var sr=J(ar,[[`render`,or],[`__scopeId`,`data-v-82d3b89e`]]);export{sr as default};
|