@acedatacloud/nexior 3.75.0 → 3.77.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.
Files changed (329) hide show
  1. package/dist/assets/{Auth-BVDMU7zJ.js → Auth-BeiunZ9K.js} +1 -1
  2. package/dist/assets/{BotPlaceholder-IhsEr4zv.js → BotPlaceholder-B0SWc4ng.js} +1 -1
  3. package/dist/assets/{Callback-BXlUV61r.js → Callback-CUkGoU4C.js} +1 -1
  4. package/dist/assets/{Console-JFpeCo0y.js → Console-oZp1-0dX.js} +1 -1
  5. package/dist/assets/{Consumption-Beuepw8C.js → Consumption-Dey-54T6.js} +1 -1
  6. package/dist/assets/{Conversation-DSnK-zlw.js → Conversation--FGpkboD.js} +1 -1
  7. package/dist/assets/{CopyToClipboard-CU2QRkly.js → CopyToClipboard-Dnf_rnO8.js} +1 -1
  8. package/dist/assets/{Detail-CQvNCI_G.js → Detail-BcOH5q1M.js} +2 -2
  9. package/dist/assets/{EditArray-n9k7BVEw.js → EditArray-infGJDGW.js} +1 -1
  10. package/dist/assets/{Extra-DZYDTF9g.js → Extra-BN-QE4WD.js} +1 -1
  11. package/dist/assets/{FilePreview-DR_vOrJd.js → FilePreview-2gIWeZCK.js} +1 -1
  12. package/dist/assets/{History-BMitdysS.js → History-Bv1LQshc.js} +1 -1
  13. package/dist/assets/{IconPark.vue_vue_type_script_setup_true_lang-Dst1jO3t.js → IconPark.vue_vue_type_script_setup_true_lang-CsqVbVpN.js} +1 -1
  14. package/dist/assets/{ImagePreview-CPc0rkNC.js → ImagePreview-C0ziQLVP.js} +1 -1
  15. package/dist/assets/{ImageWrapper-BkENnvZx.js → ImageWrapper-BDrSv7aV.js} +1 -1
  16. package/dist/assets/{Index-BIqwWYpi.js → Index-0nJ6O4jF.js} +1 -1
  17. package/dist/assets/{Index-QNt5QVJA.js → Index-2G8_Bul4.js} +1 -1
  18. package/dist/assets/{Index-CvzQifen.js → Index-5L0zEM0A.js} +1 -1
  19. package/dist/assets/{Index-CrvTeHJ2.js → Index-8IxSh6Sq.js} +1 -1
  20. package/dist/assets/{Index-ucfNO5vS.js → Index-B5tv2FmO.js} +1 -1
  21. package/dist/assets/{Index-CPF1ezh4.js → Index-B7ImAMGP.js} +1 -1
  22. package/dist/assets/{Index-Bi6quCVE.js → Index-BHOtTLhI.js} +1 -1
  23. package/dist/assets/{Index-Bvsx71E3.js → Index-BOOEAvfQ.js} +1 -1
  24. package/dist/assets/{Index-C2xKX8g9.js → Index-BfdmgovJ.js} +1 -1
  25. package/dist/assets/{Index-BaUBungQ.js → Index-BzGJWyms.js} +1 -1
  26. package/dist/assets/{Index-BbrQBxLr.js → Index-CJCgLTp_.js} +1 -1
  27. package/dist/assets/{Index-x7sKx_-g.js → Index-CJMNQQQt.js} +1 -1
  28. package/dist/assets/{Index-anw9zQDz.js → Index-CQMKC568.js} +1 -1
  29. package/dist/assets/{Index-CqunhB_C.js → Index-CUIa_6hx.js} +1 -1
  30. package/dist/assets/{Index-D6h1830f.js → Index-CZgNoQdq.js} +1 -1
  31. package/dist/assets/{Index-CWCtTh4_.js → Index-Ca0tIHCs.js} +1 -1
  32. package/dist/assets/{Index-BSEnGxl7.js → Index-Cg3IH6ob.js} +1 -1
  33. package/dist/assets/{Index-Ycpw_FEE.js → Index-ChhSEVrt.js} +1 -1
  34. package/dist/assets/{Index-CdZ9vkqb.js → Index-DhkBa5kx.js} +1 -1
  35. package/dist/assets/{Index-CO7kvPnV.js → Index-DzGheH3u.js} +1 -1
  36. package/dist/assets/{Index-EFpqAz7a.js → Index-RDRn0VBK.js} +1 -1
  37. package/dist/assets/{Index-C_IAzmEl.js → Index-YyFK58Mp.js} +1 -1
  38. package/dist/assets/{Index-Dv_wExu1.js → Index-Yyki6J1W.js} +1 -1
  39. package/dist/assets/{Index-C7Q99Fmh.js → Index-hjHawspi.js} +1 -1
  40. package/dist/assets/{Index-CSK351MB.js → Index-p4Prydst.js} +1 -1
  41. package/dist/assets/{Invitees-BxuG6kQr.js → Invitees-urmT6llj.js} +1 -1
  42. package/dist/assets/{List-LZHKCApS.js → List-CgTbN1hQ.js} +1 -1
  43. package/dist/assets/{List-ysPPRHep.js → List-CkoscM1g.js} +1 -1
  44. package/dist/assets/{List-BUEr_gnC.js → List-D9gRZTuC.js} +1 -1
  45. package/dist/assets/{List-CwMVnaNc.js → List-QZpa9RbL.js} +1 -1
  46. package/dist/assets/{Main-aJNyHUK7.js → Main-BvCIQYuE.js} +1 -1
  47. package/dist/assets/{Navigator-CI0mNoeu.js → Navigator-alXszqmk.js} +1 -1
  48. package/dist/assets/{NoTasks-B_8tJAS4.js → NoTasks-C-drK5Nq.js} +1 -1
  49. package/dist/assets/{NotFound-CrA0fPmy.js → NotFound-BJgrVyIM.js} +1 -1
  50. package/dist/assets/{OAuthCallback-C5GbVmYy.js → OAuthCallback-DSyCGECS.js} +1 -1
  51. package/dist/assets/{Pagination-JjLsL1gO.js → Pagination-BjYbT5MH.js} +1 -1
  52. package/dist/assets/{ScrollList-CNMyW1a-.js → ScrollList-BiqcW1X_.js} +1 -1
  53. package/dist/assets/{Status-BwiAU83d.js → Status-ytVor6oT.js} +1 -1
  54. package/dist/assets/{Subscribe-C6ZyBPDG.js → Subscribe-wsFZgLuk.js} +1 -1
  55. package/dist/assets/{TransportWebHID-CQ69pr7N.js → TransportWebHID-D0TekO_f.js} +1 -1
  56. package/dist/assets/{VideoPlayer-CyC0sOdz.js → VideoPlayer-BkI3uibN.js} +1 -1
  57. package/dist/assets/{_Uint8Array-Da_vqiT3.js → _Uint8Array-C022AZLU.js} +1 -1
  58. package/dist/assets/{_baseClone-Dsb3vjen.js → _baseClone-DxUYLgE-.js} +1 -1
  59. package/dist/assets/{_baseIteratee-C6_w1oWS.js → _baseIteratee-CBwuTd_D.js} +1 -1
  60. package/dist/assets/{_initCloneObject-B7rxZug-.js → _initCloneObject-DjbBqb2a.js} +1 -1
  61. package/dist/assets/{add-Dr4TYbBU.js → add-BcxF2Sdz.js} +1 -1
  62. package/dist/assets/{all-wallets-BortO6et.js → all-wallets-D13-owBx.js} +1 -1
  63. package/dist/assets/{app-store-D34P5zne.js → app-store-Dxeq_Sbs.js} +1 -1
  64. package/dist/assets/{apple-DgpEeXmN.js → apple-BVinVoZ_.js} +1 -1
  65. package/dist/assets/{arrow-bottom-circle-i3qJBV_k.js → arrow-bottom-circle-BlPXKJ9O.js} +1 -1
  66. package/dist/assets/{arrow-bottom-BjIppeTp.js → arrow-bottom-djnryUr_.js} +1 -1
  67. package/dist/assets/{arrow-left-COKkWzT3.js → arrow-left-CdFyT0HD.js} +1 -1
  68. package/dist/assets/{arrow-right-BtmbTuOM.js → arrow-right-BBcptt1N.js} +1 -1
  69. package/dist/assets/{arrow-top-D_DML2V1.js → arrow-top-Cvzx5hbl.js} +1 -1
  70. package/dist/assets/{avatar-4AJ44J6g.js → avatar-p9h-1j7N.js} +1 -1
  71. package/dist/assets/{bank-BlsbOq3Y.js → bank-Mpus-PyJ.js} +1 -1
  72. package/dist/assets/{basic-DocQs29a.js → basic-X1qpHdHj.js} +1 -1
  73. package/dist/assets/{browser-ZeNLva4Y.js → browser-8u1j_5aE.js} +1 -1
  74. package/dist/assets/byok-5Q0TwxTg.js +1 -0
  75. package/dist/assets/byok-87QiPenB.js +1 -0
  76. package/dist/assets/byok-B5r2hTRj.js +1 -0
  77. package/dist/assets/byok-Bb7Lw-Mo.js +1 -0
  78. package/dist/assets/byok-Bh3sY2Ey.js +1 -0
  79. package/dist/assets/byok-BmomtAbW.js +1 -0
  80. package/dist/assets/byok-C2mKkG8c.js +1 -0
  81. package/dist/assets/byok-CO7_Z79z.js +1 -0
  82. package/dist/assets/byok-CZC4iJ4q.js +1 -0
  83. package/dist/assets/byok-CtwxrrKn.js +1 -0
  84. package/dist/assets/byok-Cx86421L.js +1 -0
  85. package/dist/assets/byok-DesLHnrj.js +1 -0
  86. package/dist/assets/byok-DhBIOKUR.js +1 -0
  87. package/dist/assets/byok-NWmnTWsP.js +1 -0
  88. package/dist/assets/byok-QRd0Ma6D.js +1 -0
  89. package/dist/assets/byok-QivoCyxj.js +1 -0
  90. package/dist/assets/byok-Wj8flxiw.js +1 -0
  91. package/dist/assets/{byokCredential-LM4PPMLA.js → byokCredential-Duiie6mJ.js} +1 -1
  92. package/dist/assets/{card-CDccl91u.js → card-BYw5_rWn.js} +1 -1
  93. package/dist/assets/{castArray-sgexmJJM.js → castArray-D4_uUDMy.js} +1 -1
  94. package/dist/assets/{chat-C7lnh45_.js → chat-BC12eA6v.js} +1 -1
  95. package/dist/assets/{checkmark-AKkyu6eV.js → checkmark-CBHTfLfU.js} +1 -1
  96. package/dist/assets/{checkmark-bold-BOe0-_Tp.js → checkmark-bold-DimmaSBn.js} +1 -1
  97. package/dist/assets/{chevron-bottom-GOXhpAMT.js → chevron-bottom-BxlVSgJ4.js} +1 -1
  98. package/dist/assets/{chevron-left-BfIgKINd.js → chevron-left-BHq1ekNr.js} +1 -1
  99. package/dist/assets/{chevron-right-B3a7HK4V.js → chevron-right-BBY0AkOP.js} +1 -1
  100. package/dist/assets/{chevron-top-BU7NTgef.js → chevron-top-COn-Yuih.js} +1 -1
  101. package/dist/assets/{chrome-store-B6IgPaPA.js → chrome-store-9PPRxE8X.js} +1 -1
  102. package/dist/assets/{clock-BSnH9Zey.js → clock-BSurD3uo.js} +1 -1
  103. package/dist/assets/{close-BtnkKx8y.js → close-Bc9LpBoM.js} +1 -1
  104. package/dist/assets/{coinPlaceholder-oT3R1ojC.js → coinPlaceholder-Bx0B_XYR.js} +1 -1
  105. package/dist/assets/{compass-62i_rfoH.js → compass-BN2s-KPF.js} +1 -1
  106. package/dist/assets/console-BMaVS13S.js +1 -0
  107. package/dist/assets/console-BuLyWTE7.js +1 -0
  108. package/dist/assets/console-BuyW_sv_.js +1 -0
  109. package/dist/assets/console-C9AQQuG1.js +1 -0
  110. package/dist/assets/console-CQhme_yO.js +1 -0
  111. package/dist/assets/console-CSD--xh1.js +1 -0
  112. package/dist/assets/console-CSttLY4G.js +1 -0
  113. package/dist/assets/console-CWRYgDzG.js +1 -0
  114. package/dist/assets/console-CmJNJHm2.js +1 -0
  115. package/dist/assets/console-D54DoWtB.js +1 -0
  116. package/dist/assets/console-DQ0YkPhH.js +1 -0
  117. package/dist/assets/console-D_WpvOps.js +1 -0
  118. package/dist/assets/console-Db0-tULl.js +1 -0
  119. package/dist/assets/console-DmCLP7oR.js +1 -0
  120. package/dist/assets/console-bDnzF9xJ.js +1 -0
  121. package/dist/assets/console-ce_HPb0P.js +1 -0
  122. package/dist/assets/console-qS0E0tCN.js +1 -0
  123. package/dist/assets/{copy-DIiIUMV4.js → copy-BSwuNie6.js} +1 -1
  124. package/dist/assets/{cursor-fxL9OU5j.js → cursor-DK9xZHdG.js} +1 -1
  125. package/dist/assets/{cursor-transparent-BzliFkzF.js → cursor-transparent-Fmc1o5dZ.js} +1 -1
  126. package/dist/assets/{debounce-BtB3XX1D.js → debounce-BogYe2lq.js} +1 -1
  127. package/dist/assets/{desktop-l1LQ6WHW.js → desktop-Buctva53.js} +1 -1
  128. package/dist/assets/{disconnect-CqxaNx_L.js → disconnect-DRGpXCv3.js} +1 -1
  129. package/dist/assets/{discord-Ch-AUzCs.js → discord-Di6XmlQe.js} +1 -1
  130. package/dist/assets/{distribution-D9TxQCLE.js → distribution-BtqyudVF.js} +1 -1
  131. package/dist/assets/{dropdown-nUHjEWRr.js → dropdown-bYrQuSlt.js} +1 -1
  132. package/dist/assets/{etherscan-B9fFf-AI.js → etherscan-CbAenBgk.js} +1 -1
  133. package/dist/assets/{exclamation-triangle-B1n7jBys.js → exclamation-triangle-2WioFBiU.js} +1 -1
  134. package/dist/assets/{extension-DvGyfMCw.js → extension-38JTIlvs.js} +1 -1
  135. package/dist/assets/{external-link-BAd4XX26.js → external-link-CJnCJyZf.js} +1 -1
  136. package/dist/assets/{facebook-CaSAzvMl.js → facebook-DOL_lkt1.js} +1 -1
  137. package/dist/assets/{farcaster-Bo12Dm1o.js → farcaster-BAVnV7EZ.js} +1 -1
  138. package/dist/assets/{filters-BjISJiXg.js → filters-BVjc1Qvw.js} +1 -1
  139. package/dist/assets/{flux-4O5pkFPr.js → flux-D3YaNVD0.js} +1 -1
  140. package/dist/assets/{github-BI8CAE6U.js → github-PHKIOUxz.js} +1 -1
  141. package/dist/assets/{google-zQpuoZrM.js → google-BLBuIDt0.js} +1 -1
  142. package/dist/assets/{hailuo-D-sJgJyL.js → hailuo-CpJ73VrP.js} +1 -1
  143. package/dist/assets/{headshots-BcBdqxSM.js → headshots-BY_ITmS_.js} +1 -1
  144. package/dist/assets/{help-circle-D70y2Bg2.js → help-circle-B0b8os1E.js} +1 -1
  145. package/dist/assets/{id-DAcT8LG2.js → id-CW8l_thq.js} +1 -1
  146. package/dist/assets/{image-BsbEq4Id.js → image-CfWR6OVc.js} +1 -1
  147. package/dist/assets/{index-Cw3EBxXH.js → index-16IpuBs_.js} +1 -1
  148. package/dist/assets/{index-CEicbmg3.js → index-5JVzx6Z_.js} +1 -1
  149. package/dist/assets/{index-B746jP2g.js → index-B0iNUGlz.js} +1 -1
  150. package/dist/assets/{index-FqX9ua0G.js → index-BIBeX8VQ.js} +1 -1
  151. package/dist/assets/{index-C1iSHrky.js → index-BO_B_0Kt.js} +3 -3
  152. package/dist/assets/{index-DLBKmIKE.js → index-BQegNhGT.js} +1 -1
  153. package/dist/assets/{index-Bysd3ijL.js → index-BTZGkg0v.js} +1 -1
  154. package/dist/assets/{index-BtJwIQyF.js → index-BVjfEHD3.js} +1 -1
  155. package/dist/assets/{index-BwlI8FGx.js → index-BVxX3bnu.js} +6 -6
  156. package/dist/assets/{index-DQNtbo_T.js → index-BW0NCOmM.js} +1 -1
  157. package/dist/assets/{index-9wx-I1gv.js → index-BY6juPgH.js} +1 -1
  158. package/dist/assets/{index-CnyI-9ke.js → index-BekEPDDr.js} +1 -1
  159. package/dist/assets/{index-DlkJHBCX.js → index-BgC9tT3t.js} +1 -1
  160. package/dist/assets/{index-DACKFQD5.js → index-BhpS9KgS.js} +1 -1
  161. package/dist/assets/{index-5qdWgHXM.js → index-Bmq3v9kQ.js} +1 -1
  162. package/dist/assets/{index-C57GzdVx.js → index-Bo5hehLY.js} +1 -1
  163. package/dist/assets/{index-BqqUL9Tn.js → index-C1LorwYi.js} +1 -1
  164. package/dist/assets/{index-DNJwK1n1.js → index-C1WWbEFA.js} +1 -1
  165. package/dist/assets/{index-DJS_zzBs.js → index-C5AIeS-O.js} +1 -1
  166. package/dist/assets/{index-DB3i_DbK.js → index-C5FwKhtr.js} +1 -1
  167. package/dist/assets/{index-W4oQZqHB.js → index-CDC3LN1p.js} +1 -1
  168. package/dist/assets/{index-roH260pR.js → index-CDCbYA4C.js} +1 -1
  169. package/dist/assets/{index-BTvg_L_n.js → index-CF16UMDY.js} +13 -13
  170. package/dist/assets/{index-B8q3-kNF.js → index-CGb7Rzqr.js} +1 -1
  171. package/dist/assets/{index-vu9HmTZ2.js → index-COS_bYgX.js} +1 -1
  172. package/dist/assets/{index-D1b4Yn1r.js → index-CQxnJBk-.js} +1 -1
  173. package/dist/assets/{index-Dxaf2Ps6.js → index-C_ODmCTa.js} +1 -1
  174. package/dist/assets/{index-By4y0Ea8.js → index-Cjv_kJ6-.js} +1 -1
  175. package/dist/assets/{index-CHsUWop8.js → index-CuimFTZW.js} +1 -1
  176. package/dist/assets/{index-Cn69_ppM.js → index-D371GDZk.js} +1 -1
  177. package/dist/assets/{index-CXtdvASY.js → index-D7xpGUpG.js} +1 -1
  178. package/dist/assets/{index-Bv4Pupd8.js → index-D8g41Fn9.js} +1 -1
  179. package/dist/assets/{index-0W4qCO6a.js → index-DPaUtTur.js} +1 -1
  180. package/dist/assets/{index-DTZYdJGU.js → index-DRLOP5c1.js} +1 -1
  181. package/dist/assets/{index-CscVjjf9.js → index-DUhclzA2.js} +1 -1
  182. package/dist/assets/{index-BAqkNY8N.js → index-DZZ0ykF3.js} +1 -1
  183. package/dist/assets/{index-Cnjk17Rs.js → index-D_VIis5x.js} +1 -1
  184. package/dist/assets/{index-CJFJbQzF.js → index-De6e_g_U.js} +1 -1
  185. package/dist/assets/{index-n2cN5GL-.js → index-DkdA8VHO.js} +1 -1
  186. package/dist/assets/{index-jfvp7-lT.js → index-DkpNKbrX.js} +1 -1
  187. package/dist/assets/{index-2WVcjXan.js → index-DlhkFArf.js} +1 -1
  188. package/dist/assets/{index-XfPFkNIm.js → index-Do9QmzBm.js} +1 -1
  189. package/dist/assets/{index-OwSfCcsZ.js → index-DqkVJjk9.js} +1 -1
  190. package/dist/assets/{index-B19FDZiy.js → index-DrVsetT0.js} +1 -1
  191. package/dist/assets/{index-B-0WiowJ.js → index-DtNWUfHw.js} +1 -1
  192. package/dist/assets/{index-BmL1MyF-.js → index-DuzWhSQs.js} +1 -1
  193. package/dist/assets/{index-BlinnLLp.js → index-DwbPmWDx.js} +1 -1
  194. package/dist/assets/{index-BXyXVF80.js → index-HJENQnqG.js} +1 -1
  195. package/dist/assets/{index-99HWYUxb.js → index-Hf3XJEG9.js} +1 -1
  196. package/dist/assets/{index-BiBBOINV.js → index-PbJCZzRB.js} +1 -1
  197. package/dist/assets/{index-1GgtHP5g.js → index-UgVern9j.js} +1 -1
  198. package/dist/assets/{index-CXPR2QIy.js → index-V1jmZ8Tn.js} +1 -1
  199. package/dist/assets/{index-CwY5STPL.js → index-aEXhXaFc.js} +1 -1
  200. package/dist/assets/{index-BGE3XMjI.js → index-k1IUMxbB.js} +1 -1
  201. package/dist/assets/{index-CzfGQRqg.js → index-nh1EsWx2.js} +1 -1
  202. package/dist/assets/{index-CgOzK-R6.js → index-r1aedjYZ.js} +1 -1
  203. package/dist/assets/{index-Cnf415Z-.js → index-uUc11q69.js} +1 -1
  204. package/dist/assets/{index-DNKZsQnB.js → index-w8ZYD_Ex.js} +1 -1
  205. package/dist/assets/{index-DqzP-ZX_.js → index-wQm_FL2Q.js} +1 -1
  206. package/dist/assets/{index-BGqLjxEX.js → index-wrha931S.js} +1 -1
  207. package/dist/assets/{index-C3K3RvIl.js → index-x0JegZp0.js} +1 -1
  208. package/dist/assets/{index.browser.esm-BUOM0pe_.js → index.browser.esm-Qz2ostcl.js} +1 -1
  209. package/dist/assets/{index.es-Cvem-v2q.js → index.es-BYqNuX1H.js} +1 -1
  210. package/dist/assets/{info-Cf_h-VQJ.js → info-BD9Idhy4.js} +1 -1
  211. package/dist/assets/{info-circle-CnTerd-e.js → info-circle-2DHv1NET.js} +1 -1
  212. package/dist/assets/{isEqual-fp9TwbCC.js → isEqual-cE6stsGF.js} +1 -1
  213. package/dist/assets/{isPlainObject-C1efrjxP.js → isPlainObject-B9Ny1Vcv.js} +1 -1
  214. package/dist/assets/{kling-BvhmZ-mV.js → kling-T66Rglck.js} +1 -1
  215. package/dist/assets/{lightbulb-BF2-lWWP.js → lightbulb-CVD8rV2p.js} +1 -1
  216. package/dist/assets/{luma-Bl_bGzWM.js → luma-by4CfRUJ.js} +1 -1
  217. package/dist/assets/{mail-Cy9Ez5Uf.js → mail-CictP4A2.js} +1 -1
  218. package/dist/assets/{midjourney-dJtTP99n.js → midjourney-B5lXaXIW.js} +1 -1
  219. package/dist/assets/{mobile-DjCMECAC.js → mobile-Dix7HPQj.js} +1 -1
  220. package/dist/assets/{more-BWs0qzFL.js → more-T5q_84OZ.js} +1 -1
  221. package/dist/assets/{nanobanana-DjYZNwPp.js → nanobanana-1UV2rJ0f.js} +1 -1
  222. package/dist/assets/{network-placeholder-CQwFNKQx.js → network-placeholder-Dan7Ywmz.js} +1 -1
  223. package/dist/assets/{nftPlaceholder-B7nDsnkA.js → nftPlaceholder-B58BEu_P.js} +1 -1
  224. package/dist/assets/{off-_H9OypWo.js → off-CDuMtDy_.js} +1 -1
  225. package/dist/assets/{openaiimage-BOfDXi6k.js → openaiimage-D2yryfXb.js} +1 -1
  226. package/dist/assets/{order-g7XgfUHq.js → order-BU1-C4ZG.js} +1 -1
  227. package/dist/assets/{pika-FXVe4OtC.js → pika-hS8f854b.js} +1 -1
  228. package/dist/assets/{pixverse-BvzWkLLY.js → pixverse-ZfmyDvGo.js} +1 -1
  229. package/dist/assets/{play-store-C5xYJOJ-.js → play-store-wc5b2w6h.js} +1 -1
  230. package/dist/assets/{plus-C8ArTLk0.js → plus-po9AJVUF.js} +1 -1
  231. package/dist/assets/{price-BPDhJHTb.js → price-QsvZLfyv.js} +1 -1
  232. package/dist/assets/{producer-CnioodzT.js → producer-DVRxL0p5.js} +1 -1
  233. package/dist/assets/{qr-code--A19SFTN.js → qr-code-Dt833IJn.js} +1 -1
  234. package/dist/assets/{qrart-B6fOXLel.js → qrart-BFgihfzj.js} +1 -1
  235. package/dist/assets/{recycle-horizontal-IHjLzwkN.js → recycle-horizontal-_sZcLPCZ.js} +1 -1
  236. package/dist/assets/{refresh-BuwIqBjA.js → refresh-DlZkDhfP.js} +1 -1
  237. package/dist/assets/{reown-logo-DMSOJA9f.js → reown-logo-Ce-aY93K.js} +1 -1
  238. package/dist/assets/{search-DA6MRiW9.js → search-CSvPFjd6.js} +1 -1
  239. package/dist/assets/{secp256k1-N2qIipFO.js → secp256k1-B6sTIIrm.js} +1 -1
  240. package/dist/assets/{secp256k1-C3mgkRzr.js → secp256k1-CuAvyEtt.js} +1 -1
  241. package/dist/assets/{seedance-BQf3IgJ4.js → seedance-Bf3wwIbZ.js} +1 -1
  242. package/dist/assets/{seedream-C0UjLWbl.js → seedream-Cgc2RR0Y.js} +1 -1
  243. package/dist/assets/{send-DdZfY6cA.js → send-CQDlv3wF.js} +1 -1
  244. package/dist/assets/{service-CJVkCidP.js → service-CHaGU8pS.js} +1 -1
  245. package/dist/assets/{solana-wallets-d5YCaO4R.js → solana-wallets-BIvIJXho.js} +2 -2
  246. package/dist/assets/{solana-wallets-vue-VEVQZFPr.js → solana-wallets-vue-JbobLO4a.js} +1 -1
  247. package/dist/assets/{solanaEmbed.esm-K3d78-C6.js → solanaEmbed.esm-BIh0iPHZ.js} +1 -1
  248. package/dist/assets/{sora-DuM4FFgd.js → sora-DczCBq4j.js} +1 -1
  249. package/dist/assets/{string_decoder-BRoXwm1E.js → string_decoder-Btob0jt_.js} +1 -1
  250. package/dist/assets/subsite-7iAZtcuP.js +1 -0
  251. package/dist/assets/subsite-B0aXA4yJ.js +1 -0
  252. package/dist/assets/subsite-BR5UdzXM.js +1 -0
  253. package/dist/assets/subsite-BSw3am1S.js +1 -0
  254. package/dist/assets/subsite-CG0RFxMp.js +1 -0
  255. package/dist/assets/subsite-CeveCBFQ.js +1 -0
  256. package/dist/assets/subsite-CqmVo7Kv.js +1 -0
  257. package/dist/assets/subsite-Cz6QyDco.js +1 -0
  258. package/dist/assets/subsite-DGPJ_Kdf.js +1 -0
  259. package/dist/assets/subsite-DMvI1S9s.js +1 -0
  260. package/dist/assets/subsite-DU5krCO9.js +1 -0
  261. package/dist/assets/subsite-D_ZT5FwK.js +1 -0
  262. package/dist/assets/subsite-Dwxtl3OT.js +1 -0
  263. package/dist/assets/subsite-h6VAokmR.js +1 -0
  264. package/dist/assets/subsite-l0aBxAb7.js +1 -0
  265. package/dist/assets/subsite-sjY7de2z.js +1 -0
  266. package/dist/assets/subsite-uZ5VN0oy.js +1 -0
  267. package/dist/assets/{suno-Xr1W14Ww.js → suno-BM-3P0Ud.js} +1 -1
  268. package/dist/assets/{swapHorizontal-BfA1R464.js → swapHorizontal-DPZk3rni.js} +1 -1
  269. package/dist/assets/{swapHorizontalBold-DAVj4x-N.js → swapHorizontalBold-F5WC-pg3.js} +1 -1
  270. package/dist/assets/{swapHorizontalMedium-CvEN8oWW.js → swapHorizontalMedium-C59MkOlc.js} +1 -1
  271. package/dist/assets/{swapHorizontalRoundedBold--967_VGm.js → swapHorizontalRoundedBold-DKOeaB-P.js} +1 -1
  272. package/dist/assets/{swapVertical-CDrNKJWm.js → swapVertical-D21L7Dss.js} +1 -1
  273. package/dist/assets/{telegram-CMO8i--N.js → telegram-DOdGXhqO.js} +1 -1
  274. package/dist/assets/{three-dots-xtokknS_.js → three-dots-BnbUF6f9.js} +1 -1
  275. package/dist/assets/{twitch-DqMCtE_b.js → twitch-BNrJNoIW.js} +1 -1
  276. package/dist/assets/{twitterIcon-CKLI6Pga.js → twitterIcon-CIHahBqE.js} +1 -1
  277. package/dist/assets/{typescript-BqvehGHf.js → typescript-CpGNwkU2.js} +1 -1
  278. package/dist/assets/{use-form-item-DGwoVBkX.js → use-form-item-DgeeEPic.js} +1 -1
  279. package/dist/assets/validator-BigKU98Y.js +1 -0
  280. package/dist/assets/{veo-b6Q6DvmW.js → veo-DVhsbsnI.js} +1 -1
  281. package/dist/assets/{verify-BxICN3BP.js → verify-D-JqGR4k.js} +1 -1
  282. package/dist/assets/{verify-filled-Bh_nhymH.js → verify-filled-fF3Mkv92.js} +1 -1
  283. package/dist/assets/{w3m-modal-CNn-hDrM.js → w3m-modal-CkAZRMlA.js} +1 -1
  284. package/dist/assets/{wallet-BGyxX1lz.js → wallet-CpMG2ue-.js} +1 -1
  285. package/dist/assets/{wallet-placeholder-mSwWkMEf.js → wallet-placeholder-ByxeZXY5.js} +1 -1
  286. package/dist/assets/{walletconnect-CKtnpQG0.js → walletconnect-DLtTvDOX.js} +1 -1
  287. package/dist/assets/{wan-Ce_jHAZX.js → wan-qQSKf9So.js} +1 -1
  288. package/dist/assets/{warning-circle-Ddgrc772.js → warning-circle-k-8LrXNV.js} +1 -1
  289. package/dist/assets/{web-B04rv1-e.js → web-Cx92Dc5R.js} +1 -1
  290. package/dist/assets/{web-BmWN-hCk.js → web-Din9goLX.js} +1 -1
  291. package/dist/assets/{x-CjFA9Mm4.js → x-C8MQOOhT.js} +1 -1
  292. package/dist/index.html +1 -1
  293. package/package.json +1 -1
  294. package/dist/assets/byok-B90wX2HN.js +0 -1
  295. package/dist/assets/console-B-w1CIo5.js +0 -1
  296. package/dist/assets/console-B6WpNFZR.js +0 -1
  297. package/dist/assets/console-BSA-nQut.js +0 -1
  298. package/dist/assets/console-BfVdppQq.js +0 -1
  299. package/dist/assets/console-BqANz1qU.js +0 -1
  300. package/dist/assets/console-C0jNAT2v.js +0 -1
  301. package/dist/assets/console-C8SjjSMs.js +0 -1
  302. package/dist/assets/console-CQDVZ5kW.js +0 -1
  303. package/dist/assets/console-CbryeCQt.js +0 -1
  304. package/dist/assets/console-CdExu4-O.js +0 -1
  305. package/dist/assets/console-CkF3DYko.js +0 -1
  306. package/dist/assets/console-D-9NxLjR.js +0 -1
  307. package/dist/assets/console-D5rJzc1E.js +0 -1
  308. package/dist/assets/console-DMlew7iX.js +0 -1
  309. package/dist/assets/console-EbWSW-Fu.js +0 -1
  310. package/dist/assets/console-dlCwwK2t.js +0 -1
  311. package/dist/assets/console-fIqOWY6V.js +0 -1
  312. package/dist/assets/subsite-B_rsxdbH.js +0 -1
  313. package/dist/assets/subsite-Bg34jKwH.js +0 -1
  314. package/dist/assets/subsite-BqQAdffL.js +0 -1
  315. package/dist/assets/subsite-BqvjhUWC.js +0 -1
  316. package/dist/assets/subsite-BrZzjP0L.js +0 -1
  317. package/dist/assets/subsite-CEmCNdr3.js +0 -1
  318. package/dist/assets/subsite-ClztDtip.js +0 -1
  319. package/dist/assets/subsite-CtoUwXuU.js +0 -1
  320. package/dist/assets/subsite-D1uLL9Z-.js +0 -1
  321. package/dist/assets/subsite-DCFrW9d3.js +0 -1
  322. package/dist/assets/subsite-DDmNxlCY.js +0 -1
  323. package/dist/assets/subsite-DHN4PCGP.js +0 -1
  324. package/dist/assets/subsite-DMsootoC.js +0 -1
  325. package/dist/assets/subsite-DYO6t5gV.js +0 -1
  326. package/dist/assets/subsite-DZbeE4G0.js +0 -1
  327. package/dist/assets/subsite-a1Voxkw4.js +0 -1
  328. package/dist/assets/subsite-v6NfIAE5.js +0 -1
  329. package/dist/assets/validator-DSbDxG8s.js +0 -1
@@ -1 +1 @@
1
- import{ao as n,a6 as b,aE as g,aq as f,aF as k}from"./index-BTvg_L_n.js";import{s as S}from"./service-CJVkCidP.js";import{n as w}from"./nanobanana-DjYZNwPp.js";import{m as C}from"./merge-C5jDS2au.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";const I=({commit:t})=>{t("resetAll")},$=async({commit:t,dispatch:s},e)=>{if(console.debug("set application",e),t("setApplication",e),!e){console.debug("application is null, return");return}const a=e?.credentials?.find(i=>i?.host===window.location.origin);a?(console.debug("credential exists, set credential",a),t("setCredential",a)):(console.debug("credential not exists, start to create credential for application",e),await s("createCredential"))},y=async({commit:t},s)=>{console.debug("set applications",s),t("setApplications",s)},E=async({commit:t},s)=>{console.debug("set service",s),t("setService",s)},h=async({commit:t},s)=>{console.debug("set credential",s),t("setCredential",s)},O=async({commit:t,state:s})=>{const e=s.application;if(console.debug("prepare to create credential for application",e),!e){console.error("Application not found");return}console.debug("creating create credential for application",e);const{data:a}=await f.create({application_id:e?.id,host:window.location.origin});return console.debug("created credential success",a),t("setCredential",a),console.debug("end createCredential"),a},x=async({commit:t,state:s})=>{s.status.getService=n.Request;try{const{data:e}=await S.get(g);return s.status.getService=n.Success,t("setService",e),e}catch{s.status.getService=n.Error,t("setService",void 0)}},_=async({commit:t,state:s,rootState:e})=>{console.debug("start to get applications for nanobanana"),s.status.getApplications=n.Request;try{const{data:a}=await b.getAll({user_id:e?.user?.id,service_id:g});return s.status.getApplications=n.Success,t("setApplications",a.items),a.items}catch(a){console.error("get applications failed",a),s.status.getApplications=n.Error,t("setApplications",void 0),t("setApplication",void 0)}},q=({commit:t},s)=>{t("setConfig",s)},N=({commit:t},s)=>{t("setTasks",s)},P=({commit:t},s)=>{t("setTasksItems",s)},R=({commit:t},s)=>{t("setTasksTotal",s)},B=({commit:t},s)=>{t("setTasksActive",s)},D=async({commit:t,state:s,rootState:e},{offset:a,limit:i,createdAtMin:A,createdAtMax:T})=>(s.status.getTasks=n.Request,new Promise((v,r)=>{console.debug("start to get tasks",a,i);const l=s.credential;console.debug("current credential",l);const d=l?.token;if(!d)return s.status.getTasks=n.Error,r("no token");w.tasks({userId:e?.user?.id,offset:a,limit:i,createdAtMin:A,createdAtMax:T,type:"images"},{token:d}).then(o=>{console.debug("get images tasks success",o.data.items);const p=s?.tasks?.items||[];console.debug("existing items",p);const u=o.data.items||[];console.debug("new items",u);const m=C(p,u);t("setTasksItems",m),t("setTasksTotal",o.data.count),s.status.getTasks=n.Success,v(o.data.items)}).catch(o=>(s.status.getTasks=n.Error,r(o)))})),F={createCredential:O,setService:E,getService:x,resetAll:I,setCredential:h,setConfig:q,setApplications:y,setApplication:$,getApplications:_,setTasks:N,setTasksItems:P,setTasksTotal:R,setTasksActive:B,getTasks:D},c={items:void 0,total:void 0,active:void 0},L=t=>{Object.assign(t,k())},V=(t,s)=>{t.service=s},j=(t,s)=>{t.credential=s},z=(t,s)=>{t.application=s},G=(t,s)=>{t.applications=s},H=(t,s)=>{t.config=s},J=(t,s)=>{const e={...t.tasks||c,items:s};t.tasks=e},K=(t,s)=>{const e={...t.tasks||c,total:s};t.tasks=e},M=(t,s)=>{const e={...t.tasks||c,active:s};t.tasks=e},Q=(t,s)=>{t.tasks=s},U={setTasks:Q,setApplication:z,setApplications:G,setConfig:H,setCredential:j,setService:V,setTasksActive:M,setTasksItems:J,setTasksTotal:K,resetAll:L},nt={namespaced:!0,state:k,mutations:U,actions:F};export{nt as default,nt as nanobanana};
1
+ import{ao as n,a6 as b,aE as g,aq as f,aF as k}from"./index-CF16UMDY.js";import{s as S}from"./service-CHaGU8pS.js";import{n as w}from"./nanobanana-1UV2rJ0f.js";import{m as C}from"./merge-C5jDS2au.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";const I=({commit:t})=>{t("resetAll")},$=async({commit:t,dispatch:s},e)=>{if(console.debug("set application",e),t("setApplication",e),!e){console.debug("application is null, return");return}const a=e?.credentials?.find(i=>i?.host===window.location.origin);a?(console.debug("credential exists, set credential",a),t("setCredential",a)):(console.debug("credential not exists, start to create credential for application",e),await s("createCredential"))},y=async({commit:t},s)=>{console.debug("set applications",s),t("setApplications",s)},E=async({commit:t},s)=>{console.debug("set service",s),t("setService",s)},h=async({commit:t},s)=>{console.debug("set credential",s),t("setCredential",s)},O=async({commit:t,state:s})=>{const e=s.application;if(console.debug("prepare to create credential for application",e),!e){console.error("Application not found");return}console.debug("creating create credential for application",e);const{data:a}=await f.create({application_id:e?.id,host:window.location.origin});return console.debug("created credential success",a),t("setCredential",a),console.debug("end createCredential"),a},x=async({commit:t,state:s})=>{s.status.getService=n.Request;try{const{data:e}=await S.get(g);return s.status.getService=n.Success,t("setService",e),e}catch{s.status.getService=n.Error,t("setService",void 0)}},_=async({commit:t,state:s,rootState:e})=>{console.debug("start to get applications for nanobanana"),s.status.getApplications=n.Request;try{const{data:a}=await b.getAll({user_id:e?.user?.id,service_id:g});return s.status.getApplications=n.Success,t("setApplications",a.items),a.items}catch(a){console.error("get applications failed",a),s.status.getApplications=n.Error,t("setApplications",void 0),t("setApplication",void 0)}},q=({commit:t},s)=>{t("setConfig",s)},N=({commit:t},s)=>{t("setTasks",s)},P=({commit:t},s)=>{t("setTasksItems",s)},R=({commit:t},s)=>{t("setTasksTotal",s)},B=({commit:t},s)=>{t("setTasksActive",s)},D=async({commit:t,state:s,rootState:e},{offset:a,limit:i,createdAtMin:A,createdAtMax:T})=>(s.status.getTasks=n.Request,new Promise((v,r)=>{console.debug("start to get tasks",a,i);const l=s.credential;console.debug("current credential",l);const d=l?.token;if(!d)return s.status.getTasks=n.Error,r("no token");w.tasks({userId:e?.user?.id,offset:a,limit:i,createdAtMin:A,createdAtMax:T,type:"images"},{token:d}).then(o=>{console.debug("get images tasks success",o.data.items);const p=s?.tasks?.items||[];console.debug("existing items",p);const u=o.data.items||[];console.debug("new items",u);const m=C(p,u);t("setTasksItems",m),t("setTasksTotal",o.data.count),s.status.getTasks=n.Success,v(o.data.items)}).catch(o=>(s.status.getTasks=n.Error,r(o)))})),F={createCredential:O,setService:E,getService:x,resetAll:I,setCredential:h,setConfig:q,setApplications:y,setApplication:$,getApplications:_,setTasks:N,setTasksItems:P,setTasksTotal:R,setTasksActive:B,getTasks:D},c={items:void 0,total:void 0,active:void 0},L=t=>{Object.assign(t,k())},V=(t,s)=>{t.service=s},j=(t,s)=>{t.credential=s},z=(t,s)=>{t.application=s},G=(t,s)=>{t.applications=s},H=(t,s)=>{t.config=s},J=(t,s)=>{const e={...t.tasks||c,items:s};t.tasks=e},K=(t,s)=>{const e={...t.tasks||c,total:s};t.tasks=e},M=(t,s)=>{const e={...t.tasks||c,active:s};t.tasks=e},Q=(t,s)=>{t.tasks=s},U={setTasks:Q,setApplication:z,setApplications:G,setConfig:H,setCredential:j,setService:V,setTasksActive:M,setTasksItems:J,setTasksTotal:K,resetAll:L},nt={namespaced:!0,state:k,mutations:U,actions:F};export{nt as default,nt as nanobanana};
@@ -1 +1 @@
1
- import{aq as v,ao as i,a6 as T,aU as d}from"./index-BTvg_L_n.js";import{s as f}from"./service-CJVkCidP.js";import{h as b}from"./headshots-BcBdqxSM.js";import{m as S}from"./merge-C5jDS2au.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";const u="3b2ec5fb-cfcb-49f0-9393-6b8617a2d8c4",w=({commit:t})=>{t("resetAll")},C=async({commit:t,dispatch:e},s)=>{if(console.debug("set application",s),t("setApplication",s),!s){console.debug("application is null, return");return}const a=s?.credentials?.find(o=>o?.host===window.location.origin);a?(console.debug("credential exists, set credential",a),t("setCredential",a)):(console.debug("credential not exists, start to create credential for application",s),await e("createCredential"))},h=async({commit:t},e)=>{console.debug("set applications",e),t("setApplications",e)},I=async({commit:t},e)=>{console.debug("set service",e),t("setService",e)},$=async({commit:t},e)=>{console.debug("set credential",e),t("setCredential",e)},y=async({commit:t,state:e})=>{const s=e.application;if(console.debug("prepare to create credential for application",s),!s){console.error("Application not found");return}console.debug("creating create credential for application",s);const{data:a}=await v.create({application_id:s?.id,host:window.location.origin});return console.debug("created credential success",a),t("setCredential",a),console.debug("end createCredential"),a},O=async({commit:t,state:e})=>{e.status.getService=i.Request;try{const{data:s}=await f.get(u);return e.status.getService=i.Success,t("setService",s),s}catch{e.status.getService=i.Error,t("setService",void 0)}},x=async({commit:t,state:e,rootState:s})=>{console.debug("start to get applications for chat"),e.status.getApplications=i.Request;const a=e.application;console.debug("current application",a);try{const{data:o}=await T.getAll({user_id:s?.user?.id,service_id:u});return e.status.getApplications=i.Success,t("setApplications",o.items),o.items}catch(o){console.error("get applications failed",o),e.status.getApplications=i.Error,t("setApplications",void 0),t("setApplication",void 0)}},E=({commit:t},e)=>{t("setConfig",e)},_=({commit:t},e)=>{t("setTasks",e)},P=({commit:t},e)=>{t("setTasksItems",e)},q=({commit:t},e)=>{t("setTasksTotal",e)},R=({commit:t},e)=>{t("setTasksActive",e)},D=async({commit:t,state:e,rootState:s},{offset:a,limit:o,createdAtMin:g,createdAtMax:k})=>new Promise((A,c)=>{console.debug("start to get tasks",a,o);const r=e.credential?.token;if(!r)return c("no token");b.tasks({userId:s?.user?.id,createdAtMin:g,createdAtMax:k},{token:r}).then(n=>{console.debug("get videos tasks success",n.data.items);const l=e?.tasks?.items||[];console.debug("existing items",l);const p=n.data.items||[];console.debug("new items",p);const m=S(l,p);t("setTasksItems",m),t("setTasksTotal",n.data.count),A(n.data.items)}).catch(n=>c(n))}),H={setService:I,getService:O,resetAll:w,setCredential:$,setConfig:E,setApplication:C,setApplications:h,getApplications:x,setTasks:_,setTasksItems:P,setTasksTotal:q,setTasksActive:R,getTasks:D,createCredential:y},L=t=>{Object.assign(t,d())},U=(t,e)=>{t.service=e},V=(t,e)=>{t.credential=e},j=(t,e)=>{t.application=e},z=(t,e)=>{t.applications=e},B=(t,e)=>{t.config=e},F=(t,e)=>{const s={...t.tasks,items:e};t.tasks=s},G=(t,e)=>{const s={...t.tasks,total:e};t.tasks=s},J=(t,e)=>{const s={...t.tasks,active:e};t.tasks=s},K=(t,e)=>{t.tasks=e},M={setTasks:K,setApplication:j,setApplications:z,setConfig:B,setCredential:V,setService:U,setTasksActive:J,setTasksItems:F,setTasksTotal:G,resetAll:L},at={namespaced:!0,state:d,mutations:M,actions:H};export{at as default,at as headshots};
1
+ import{aq as v,ao as i,a6 as T,aU as d}from"./index-CF16UMDY.js";import{s as f}from"./service-CHaGU8pS.js";import{h as b}from"./headshots-BY_ITmS_.js";import{m as S}from"./merge-C5jDS2au.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";const u="3b2ec5fb-cfcb-49f0-9393-6b8617a2d8c4",w=({commit:t})=>{t("resetAll")},C=async({commit:t,dispatch:e},s)=>{if(console.debug("set application",s),t("setApplication",s),!s){console.debug("application is null, return");return}const a=s?.credentials?.find(o=>o?.host===window.location.origin);a?(console.debug("credential exists, set credential",a),t("setCredential",a)):(console.debug("credential not exists, start to create credential for application",s),await e("createCredential"))},h=async({commit:t},e)=>{console.debug("set applications",e),t("setApplications",e)},I=async({commit:t},e)=>{console.debug("set service",e),t("setService",e)},$=async({commit:t},e)=>{console.debug("set credential",e),t("setCredential",e)},y=async({commit:t,state:e})=>{const s=e.application;if(console.debug("prepare to create credential for application",s),!s){console.error("Application not found");return}console.debug("creating create credential for application",s);const{data:a}=await v.create({application_id:s?.id,host:window.location.origin});return console.debug("created credential success",a),t("setCredential",a),console.debug("end createCredential"),a},O=async({commit:t,state:e})=>{e.status.getService=i.Request;try{const{data:s}=await f.get(u);return e.status.getService=i.Success,t("setService",s),s}catch{e.status.getService=i.Error,t("setService",void 0)}},x=async({commit:t,state:e,rootState:s})=>{console.debug("start to get applications for chat"),e.status.getApplications=i.Request;const a=e.application;console.debug("current application",a);try{const{data:o}=await T.getAll({user_id:s?.user?.id,service_id:u});return e.status.getApplications=i.Success,t("setApplications",o.items),o.items}catch(o){console.error("get applications failed",o),e.status.getApplications=i.Error,t("setApplications",void 0),t("setApplication",void 0)}},E=({commit:t},e)=>{t("setConfig",e)},_=({commit:t},e)=>{t("setTasks",e)},P=({commit:t},e)=>{t("setTasksItems",e)},q=({commit:t},e)=>{t("setTasksTotal",e)},R=({commit:t},e)=>{t("setTasksActive",e)},D=async({commit:t,state:e,rootState:s},{offset:a,limit:o,createdAtMin:g,createdAtMax:k})=>new Promise((A,c)=>{console.debug("start to get tasks",a,o);const r=e.credential?.token;if(!r)return c("no token");b.tasks({userId:s?.user?.id,createdAtMin:g,createdAtMax:k},{token:r}).then(n=>{console.debug("get videos tasks success",n.data.items);const l=e?.tasks?.items||[];console.debug("existing items",l);const p=n.data.items||[];console.debug("new items",p);const m=S(l,p);t("setTasksItems",m),t("setTasksTotal",n.data.count),A(n.data.items)}).catch(n=>c(n))}),H={setService:I,getService:O,resetAll:w,setCredential:$,setConfig:E,setApplication:C,setApplications:h,getApplications:x,setTasks:_,setTasksItems:P,setTasksTotal:q,setTasksActive:R,getTasks:D,createCredential:y},L=t=>{Object.assign(t,d())},U=(t,e)=>{t.service=e},V=(t,e)=>{t.credential=e},j=(t,e)=>{t.application=e},z=(t,e)=>{t.applications=e},B=(t,e)=>{t.config=e},F=(t,e)=>{const s={...t.tasks,items:e};t.tasks=s},G=(t,e)=>{const s={...t.tasks,total:e};t.tasks=s},J=(t,e)=>{const s={...t.tasks,active:e};t.tasks=s},K=(t,e)=>{t.tasks=e},M={setTasks:K,setApplication:j,setApplications:z,setConfig:B,setCredential:V,setService:U,setTasksActive:J,setTasksItems:F,setTasksTotal:G,resetAll:L},at={namespaced:!0,state:d,mutations:M,actions:H};export{at as default,at as headshots};
@@ -1 +1 @@
1
- import{aq as A,ao as c,a6 as m,aC as T}from"./index-BTvg_L_n.js";import{S as f}from"./suno-DFuCGH70.js";import{s as b}from"./service-CJVkCidP.js";import{s as l}from"./suno-Xr1W14Ww.js";import{m as w}from"./merge-C5jDS2au.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";const S=({commit:e})=>{e("resetAll")},C=async({commit:e,dispatch:s},t)=>{if(console.debug("set application",t),e("setApplication",t),!t){console.debug("application is null, return");return}const o=t?.credentials?.find(n=>n?.host===window.location.origin);o?(console.debug("credential exists, set credential",o),e("setCredential",o)):(console.debug("credential not exists, start to create credential for application",t),await s("createCredential"))},I=async({commit:e},s)=>{console.debug("set applications",s),e("setApplications",s)},P=async({commit:e},s)=>{console.debug("set service",s),e("setService",s)},y=async({commit:e},s)=>{console.debug("set credential",s),e("setCredential",s)},$=async({commit:e,state:s})=>{const t=s.application;if(console.debug("prepare to create credential for application",t),!t){console.error("Application not found");return}console.debug("creating create credential for application",t);const{data:o}=await A.create({application_id:t?.id,host:window.location.origin});return console.debug("created credential success",o),e("setCredential",o),console.debug("end createCredential"),o},h=async({commit:e,state:s})=>{s.status.getService=c.Request;try{const{data:t}=await b.get(f);return s.status.getService=c.Success,e("setService",t),t}catch{s.status.getService=c.Error,e("setService",void 0)}},_=async({commit:e,state:s,rootState:t})=>{console.debug("start to get applications for chat"),s.status.getApplications=c.Request;const o=s.application;console.debug("current application",o);try{const{data:n}=await m.getAll({user_id:t?.user?.id,service_id:f});return s.status.getApplications=c.Success,e("setApplications",n.items),n.items}catch(n){console.error("get applications failed",n),s.status.getApplications=c.Error,e("setApplications",void 0),e("setApplication",void 0)}},x=({commit:e},s)=>{e("setConfig",s)},O=({commit:e},s)=>{e("setTasks",s)},E=({commit:e},s)=>{e("setTasksItems",s)},q=({commit:e},s)=>{e("setTasksTotal",s)},R=({commit:e},s)=>{e("setTasksActive",s)},D=({commit:e},s)=>{e("setAudio",s)},L=async({commit:e,state:s,rootState:t},{offset:o,limit:n,createdAtMin:a,createdAtMax:i})=>new Promise((k,d)=>{console.debug("start to get tasks",o,n,i,a);const p=s.credential?.token;if(!p)return d("no token");l.tasks({userId:t?.user?.id,createdAtMin:a,createdAtMax:i,type:"audios"},{token:p}).then(r=>{console.debug("get imagine tasks success",r.data.items);const u=s?.tasks?.items||[];console.debug("existing items",u);const g=r.data.items||[];console.debug("new items",g);const v=w(u,g);e("setTasksItems",v),e("setTasksTotal",r.data.count),k(r.data.items)}).catch(r=>d(r))}),F=async({commit:e,state:s,rootState:t})=>{const n=s.credential?.token;if(!n)return[];const a=t?.user?.id;if(!a)return[];try{const{data:i}=await l.personasList({user_id:a},{token:n});return e("setPersonas",i.items||[]),i.items||[]}catch(i){return console.error("get personas failed",i),[]}},N=async({state:e,dispatch:s,rootState:t},o)=>{const a=e.credential?.token;if(!a)return!1;try{return await l.personasDelete({persona_id:o,user_id:t?.user?.id},{token:a}),await s("getPersonas"),!0}catch(i){return console.error("delete persona failed",i),!1}},U={setService:P,getService:h,resetAll:S,setCredential:y,setConfig:x,setApplication:C,setApplications:I,getApplications:_,setTasks:O,setTasksItems:E,setTasksTotal:q,setTasksActive:R,getTasks:L,setAudio:D,getPersonas:F,deletePersona:N,createCredential:$},V=e=>{e.service=void 0,e.application=void 0,e.applications=void 0,e.config=void 0,e.credential=void 0,e.tasks=void 0,e.personas=void 0},z=(e,s)=>{e.applications=s},B=(e,s)=>{e.service=s},G=(e,s)=>{e.credential=s},H=(e,s)=>{e.application=s},J=(e,s)=>{e.config=s},K=(e,s)=>{const t={...e.tasks,items:s};e.tasks=t},Q=(e,s)=>{const t={...e.tasks,total:s};e.tasks=t},W=(e,s)=>{const t={...e.tasks,active:s};e.tasks=t},X=(e,s)=>{e.audio=s},Y=(e,s)=>{e.tasks=s},Z=(e,s)=>{e.personas=s},j=(e,s)=>{if(!s)return;Array.isArray(e.favoritePersonaIds)||(e.favoritePersonaIds=[]);const t=e.favoritePersonaIds.indexOf(s);t>=0?e.favoritePersonaIds.splice(t,1):e.favoritePersonaIds.push(s)},M={setTasks:Y,setApplication:H,setApplications:z,setConfig:J,setCredential:G,setService:B,setTasksActive:W,setTasksItems:K,setTasksTotal:Q,setAudio:X,setPersonas:Z,togglePersonaFavorite:j,resetAll:V},de={namespaced:!0,state:T,mutations:M,actions:U};export{de as default,de as suno};
1
+ import{aq as A,ao as c,a6 as m,aC as T}from"./index-CF16UMDY.js";import{S as f}from"./suno-DFuCGH70.js";import{s as b}from"./service-CHaGU8pS.js";import{s as l}from"./suno-BM-3P0Ud.js";import{m as w}from"./merge-C5jDS2au.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";const S=({commit:e})=>{e("resetAll")},C=async({commit:e,dispatch:s},t)=>{if(console.debug("set application",t),e("setApplication",t),!t){console.debug("application is null, return");return}const o=t?.credentials?.find(n=>n?.host===window.location.origin);o?(console.debug("credential exists, set credential",o),e("setCredential",o)):(console.debug("credential not exists, start to create credential for application",t),await s("createCredential"))},I=async({commit:e},s)=>{console.debug("set applications",s),e("setApplications",s)},P=async({commit:e},s)=>{console.debug("set service",s),e("setService",s)},y=async({commit:e},s)=>{console.debug("set credential",s),e("setCredential",s)},$=async({commit:e,state:s})=>{const t=s.application;if(console.debug("prepare to create credential for application",t),!t){console.error("Application not found");return}console.debug("creating create credential for application",t);const{data:o}=await A.create({application_id:t?.id,host:window.location.origin});return console.debug("created credential success",o),e("setCredential",o),console.debug("end createCredential"),o},h=async({commit:e,state:s})=>{s.status.getService=c.Request;try{const{data:t}=await b.get(f);return s.status.getService=c.Success,e("setService",t),t}catch{s.status.getService=c.Error,e("setService",void 0)}},_=async({commit:e,state:s,rootState:t})=>{console.debug("start to get applications for chat"),s.status.getApplications=c.Request;const o=s.application;console.debug("current application",o);try{const{data:n}=await m.getAll({user_id:t?.user?.id,service_id:f});return s.status.getApplications=c.Success,e("setApplications",n.items),n.items}catch(n){console.error("get applications failed",n),s.status.getApplications=c.Error,e("setApplications",void 0),e("setApplication",void 0)}},x=({commit:e},s)=>{e("setConfig",s)},O=({commit:e},s)=>{e("setTasks",s)},E=({commit:e},s)=>{e("setTasksItems",s)},q=({commit:e},s)=>{e("setTasksTotal",s)},R=({commit:e},s)=>{e("setTasksActive",s)},D=({commit:e},s)=>{e("setAudio",s)},L=async({commit:e,state:s,rootState:t},{offset:o,limit:n,createdAtMin:a,createdAtMax:i})=>new Promise((k,d)=>{console.debug("start to get tasks",o,n,i,a);const p=s.credential?.token;if(!p)return d("no token");l.tasks({userId:t?.user?.id,createdAtMin:a,createdAtMax:i,type:"audios"},{token:p}).then(r=>{console.debug("get imagine tasks success",r.data.items);const u=s?.tasks?.items||[];console.debug("existing items",u);const g=r.data.items||[];console.debug("new items",g);const v=w(u,g);e("setTasksItems",v),e("setTasksTotal",r.data.count),k(r.data.items)}).catch(r=>d(r))}),F=async({commit:e,state:s,rootState:t})=>{const n=s.credential?.token;if(!n)return[];const a=t?.user?.id;if(!a)return[];try{const{data:i}=await l.personasList({user_id:a},{token:n});return e("setPersonas",i.items||[]),i.items||[]}catch(i){return console.error("get personas failed",i),[]}},N=async({state:e,dispatch:s,rootState:t},o)=>{const a=e.credential?.token;if(!a)return!1;try{return await l.personasDelete({persona_id:o,user_id:t?.user?.id},{token:a}),await s("getPersonas"),!0}catch(i){return console.error("delete persona failed",i),!1}},U={setService:P,getService:h,resetAll:S,setCredential:y,setConfig:x,setApplication:C,setApplications:I,getApplications:_,setTasks:O,setTasksItems:E,setTasksTotal:q,setTasksActive:R,getTasks:L,setAudio:D,getPersonas:F,deletePersona:N,createCredential:$},V=e=>{e.service=void 0,e.application=void 0,e.applications=void 0,e.config=void 0,e.credential=void 0,e.tasks=void 0,e.personas=void 0},z=(e,s)=>{e.applications=s},B=(e,s)=>{e.service=s},G=(e,s)=>{e.credential=s},H=(e,s)=>{e.application=s},J=(e,s)=>{e.config=s},K=(e,s)=>{const t={...e.tasks,items:s};e.tasks=t},Q=(e,s)=>{const t={...e.tasks,total:s};e.tasks=t},W=(e,s)=>{const t={...e.tasks,active:s};e.tasks=t},X=(e,s)=>{e.audio=s},Y=(e,s)=>{e.tasks=s},Z=(e,s)=>{e.personas=s},j=(e,s)=>{if(!s)return;Array.isArray(e.favoritePersonaIds)||(e.favoritePersonaIds=[]);const t=e.favoritePersonaIds.indexOf(s);t>=0?e.favoritePersonaIds.splice(t,1):e.favoritePersonaIds.push(s)},M={setTasks:Y,setApplication:H,setApplications:z,setConfig:J,setCredential:G,setService:B,setTasksActive:W,setTasksItems:K,setTasksTotal:Q,setAudio:X,setPersonas:Z,togglePersonaFavorite:j,resetAll:V},de={namespaced:!0,state:T,mutations:M,actions:U};export{de as default,de as suno};
@@ -1 +1 @@
1
- import{d as te,r as Ie,w as de,o as Ae,ah as je,q as B,H as X,G as Te,u as t,U as ve,Q as O,z as be,C as ce,y as ae,x as Z,J as re,af as Je,M as Ve,b as ee,c as V,S as xe,g as me,i as Qe,n as ye,a2 as Me,E as oe,F as qe,R as le,h as Ze,a as De,p as et,O as ge,N as ke}from"./vendor-vue-C5BV5QrY.js";import{u as pe}from"./typescript-BqvehGHf.js";import{E as tt}from"./index-DTZYdJGU.js";import{U as Y,L as F,bC as fe,J as D,M as Se,H as Ne,bh as Pe,I as ue,y as Ce,ae as Ke,z as Ee,O as Xe,P as nt,bO as lt,c8 as at,R as Fe,c9 as rt,bN as ot,a1 as he,T as Oe,Q as we,A as Ye,aN as Q}from"./index-BTvg_L_n.js";import{u as Ue}from"./index-C3K3RvIl.js";import{v as ze}from"./index-D-qg-A9-.js";import{u as We,a as ut}from"./use-form-item-DGwoVBkX.js";import{e as Ge,E as st}from"./index-By4y0Ea8.js";import{d as Re}from"./debounce-BtB3XX1D.js";const it=Ne({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.MAX_SAFE_INTEGER},min:{type:Number,default:Number.MIN_SAFE_INTEGER},modelValue:{type:[Number,null]},readonly:Boolean,disabled:Boolean,size:Pe,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:e=>e===null||F(e)||["min","max"].includes(e),default:null},name:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0},...Ue(["ariaLabel"]),inputmode:{type:ue(String),default:void 0}}),dt={[Se]:(e,l)=>l!==e,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[D]:e=>F(e)||fe(e),[Y]:e=>F(e)||fe(e)},ct=te({name:"ElInputNumber"}),mt=te({...ct,props:it,emits:dt,setup(e,{expose:l,emit:u}){const a=e,{t:f}=Ke(),c=Ee("input-number"),i=ee(),s=Ie({currentValue:a.modelValue,userInput:null}),{formItem:w}=We(),g=V(()=>F(a.modelValue)&&a.modelValue<=a.min),y=V(()=>F(a.modelValue)&&a.modelValue>=a.max),m=V(()=>{const n=A(a.step);return he(a.precision)?Math.max(A(a.modelValue),n):(n>a.precision,a.precision)}),k=V(()=>a.controls&&a.controlsPosition==="right"),$=Xe(),z=nt(),R=V(()=>{if(s.userInput!==null)return s.userInput;let n=s.currentValue;if(fe(n))return"";if(F(n)){if(Number.isNaN(n))return"";he(a.precision)||(n=n.toFixed(a.precision))}return n}),T=(n,r)=>{if(he(r)&&(r=m.value),r===0)return Math.round(n);let d=String(n);const p=d.indexOf(".");if(p===-1||!d.replace(".","").split("")[p+r])return n;const x=d.length;return d.charAt(x-1)==="5"&&(d=`${d.slice(0,Math.max(0,x-1))}6`),Number.parseFloat(Number(d).toFixed(r))},A=n=>{if(fe(n))return 0;const r=n.toString(),d=r.indexOf(".");let p=0;return d!==-1&&(p=r.length-d-1),p},M=(n,r=1)=>F(n)?n>=Number.MAX_SAFE_INTEGER&&r===1||n<=Number.MIN_SAFE_INTEGER&&r===-1?n:T(n+a.step*r):s.currentValue,K=()=>{if(a.readonly||z.value||y.value)return;const n=Number(R.value)||0,r=M(n);C(r),u(D,s.currentValue),S()},P=()=>{if(a.readonly||z.value||g.value)return;const n=Number(R.value)||0,r=M(n,-1);C(r),u(D,s.currentValue),S()},I=(n,r)=>{const{max:d,min:p,step:h,precision:N,stepStrictly:x,valueOnClear:_}=a;d<p&&Oe("InputNumber","min should not be greater than max.");let o=Number(n);if(fe(n)||Number.isNaN(o))return null;if(n===""){if(_===null)return null;o=xe(_)?{min:p,max:d}[_]:_}return x&&(o=T(Math.round(o/h)*h,N),o!==n&&r&&u(Y,o)),he(N)||(o=T(o,N)),(o>d||o<p)&&(o=o>d?d:p,r&&u(Y,o)),o},C=(n,r=!0)=>{var d;const p=s.currentValue,h=I(n);if(!r){u(Y,h);return}p===h&&n||(s.userInput=null,u(Y,h),p!==h&&u(Se,h,p),a.validateEvent&&((d=w?.validate)==null||d.call(w,"change").catch(N=>we())),s.currentValue=h)},G=n=>{s.userInput=n;const r=n===""?null:Number(n);u(D,r),C(r,!1)},ne=n=>{const r=n!==""?Number(n):"";(F(r)&&!Number.isNaN(r)||n==="")&&C(r),S(),s.userInput=null},H=()=>{var n,r;(r=(n=i.value)==null?void 0:n.focus)==null||r.call(n)},U=()=>{var n,r;(r=(n=i.value)==null?void 0:n.blur)==null||r.call(n)},j=n=>{u("focus",n)},v=n=>{var r,d;s.userInput=null,s.currentValue===null&&((r=i.value)!=null&&r.input)&&(i.value.input.value=""),u("blur",n),a.validateEvent&&((d=w?.validate)==null||d.call(w,"blur").catch(p=>we()))},S=()=>{s.currentValue!==a.modelValue&&(s.currentValue=a.modelValue)},L=n=>{document.activeElement===n.target&&n.preventDefault()};return de(()=>a.modelValue,(n,r)=>{const d=I(n,!0);s.userInput===null&&d!==r&&(s.currentValue=d)},{immediate:!0}),Ae(()=>{var n;const{min:r,max:d,modelValue:p}=a,h=(n=i.value)==null?void 0:n.input;if(h.setAttribute("role","spinbutton"),Number.isFinite(d)?h.setAttribute("aria-valuemax",String(d)):h.removeAttribute("aria-valuemax"),Number.isFinite(r)?h.setAttribute("aria-valuemin",String(r)):h.removeAttribute("aria-valuemin"),h.setAttribute("aria-valuenow",s.currentValue||s.currentValue===0?String(s.currentValue):""),h.setAttribute("aria-disabled",String(z.value)),!F(p)&&p!=null){let N=Number(p);Number.isNaN(N)&&(N=null),u(Y,N)}h.addEventListener("wheel",L,{passive:!1})}),je(()=>{var n,r;const d=(n=i.value)==null?void 0:n.input;d?.setAttribute("aria-valuenow",`${(r=s.currentValue)!=null?r:""}`)}),l({focus:H,blur:U}),(n,r)=>(B(),X("div",{class:O([t(c).b(),t(c).m(t($)),t(c).is("disabled",t(z)),t(c).is("without-controls",!n.controls),t(c).is("controls-right",t(k))]),onDragstart:Ve(()=>{},["prevent"])},[n.controls?Te((B(),X("span",{key:0,role:"button","aria-label":t(f)("el.inputNumber.decrease"),class:O([t(c).e("decrease"),t(c).is("disabled",t(g))]),onKeydown:ve(P,["enter"])},[be(n.$slots,"decrease-icon",{},()=>[ce(t(Fe),null,{default:ae(()=>[t(k)?(B(),Z(t(lt),{key:0})):(B(),Z(t(at),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[t(ze),P]]):re("v-if",!0),n.controls?Te((B(),X("span",{key:1,role:"button","aria-label":t(f)("el.inputNumber.increase"),class:O([t(c).e("increase"),t(c).is("disabled",t(y))]),onKeydown:ve(K,["enter"])},[be(n.$slots,"increase-icon",{},()=>[ce(t(Fe),null,{default:ae(()=>[t(k)?(B(),Z(t(rt),{key:0})):(B(),Z(t(ot),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[t(ze),K]]):re("v-if",!0),ce(t(tt),{id:n.id,ref_key:"input",ref:i,type:"number",step:n.step,"model-value":t(R),placeholder:n.placeholder,readonly:n.readonly,disabled:t(z),size:t($),max:n.max,min:n.min,name:n.name,"aria-label":n.ariaLabel,"validate-event":!1,inputmode:n.inputmode,onKeydown:[ve(Ve(K,["prevent"]),["up"]),ve(Ve(P,["prevent"]),["down"])],onBlur:v,onFocus:j,onInput:G,onChange:ne},Je({_:2},[n.$slots.prefix?{name:"prefix",fn:ae(()=>[be(n.$slots,"prefix")])}:void 0,n.$slots.suffix?{name:"suffix",fn:ae(()=>[be(n.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode","onKeydown"])],42,["onDragstart"]))}});var ft=Ce(mt,[["__file","input-number.vue"]]);const vt=Ye(ft),He=Symbol("sliderContextKey"),bt=Ne({modelValue:{type:ue([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:Pe,inputSize:Pe,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:ue(Function),default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:ue(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:Ge,default:"top"},marks:{type:ue(Object)},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},...Ue(["ariaLabel"])}),Be=e=>F(e)||me(e)&&e.every(F),gt={[Y]:Be,[D]:Be,[Se]:Be},ht=Ne({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:Ge,default:"top"}}),Vt={[Y]:e=>F(e)},yt=(e,l,u)=>{const a=ee(),f=ee(!1),c=V(()=>l.value instanceof Function),i=V(()=>c.value&&l.value(e.modelValue)||e.modelValue),s=Re(()=>{u.value&&(f.value=!0)},50),w=Re(()=>{u.value&&(f.value=!1)},50);return{tooltip:a,tooltipVisible:f,formatValue:i,displayTooltip:s,hideTooltip:w}},pt=(e,l,u)=>{const{disabled:a,min:f,max:c,step:i,showTooltip:s,persistent:w,precision:g,sliderSize:y,formatTooltip:m,emitChange:k,resetSize:$,updateDragging:z}=Qe(He),{tooltip:R,tooltipVisible:T,formatValue:A,displayTooltip:M,hideTooltip:K}=yt(e,m,s),P=ee(),I=V(()=>`${(e.modelValue-f.value)/(c.value-f.value)*100}%`),C=V(()=>e.vertical?{bottom:I.value}:{left:I.value}),G=()=>{l.hovering=!0,M()},ne=()=>{l.hovering=!1,l.dragging||K()},H=o=>{a.value||(o.preventDefault(),h(o),window.addEventListener("mousemove",N),window.addEventListener("touchmove",N),window.addEventListener("mouseup",x),window.addEventListener("touchend",x),window.addEventListener("contextmenu",x),P.value.focus())},U=o=>{a.value||(l.newPosition=Number.parseFloat(I.value)+o/(c.value-f.value)*100,_(l.newPosition),k())},j=()=>{U(-i.value)},v=()=>{U(i.value)},S=()=>{U(-i.value*4)},L=()=>{U(i.value*4)},n=()=>{a.value||(_(0),k())},r=()=>{a.value||(_(100),k())},d=o=>{let E=!0;switch(o.code){case Q.left:case Q.down:j();break;case Q.right:case Q.up:v();break;case Q.home:n();break;case Q.end:r();break;case Q.pageDown:S();break;case Q.pageUp:L();break;default:E=!1;break}E&&o.preventDefault()},p=o=>{let E,W;return o.type.startsWith("touch")?(W=o.touches[0].clientY,E=o.touches[0].clientX):(W=o.clientY,E=o.clientX),{clientX:E,clientY:W}},h=o=>{l.dragging=!0,l.isClick=!0;const{clientX:E,clientY:W}=p(o);e.vertical?l.startY=W:l.startX=E,l.startPosition=Number.parseFloat(I.value),l.newPosition=l.startPosition},N=o=>{if(l.dragging){l.isClick=!1,M(),$();let E;const{clientX:W,clientY:J}=p(o);e.vertical?(l.currentY=J,E=(l.startY-l.currentY)/y.value*100):(l.currentX=W,E=(l.currentX-l.startX)/y.value*100),l.newPosition=l.startPosition+E,_(l.newPosition)}},x=()=>{l.dragging&&(setTimeout(()=>{l.dragging=!1,l.hovering||K(),l.isClick||_(l.newPosition),k()},0),window.removeEventListener("mousemove",N),window.removeEventListener("touchmove",N),window.removeEventListener("mouseup",x),window.removeEventListener("touchend",x),window.removeEventListener("contextmenu",x))},_=async o=>{if(o===null||Number.isNaN(+o))return;o<0?o=0:o>100&&(o=100);const E=100/((c.value-f.value)/i.value);let J=Math.round(o/E)*E*(c.value-f.value)*.01+f.value;J=Number.parseFloat(J.toFixed(g.value)),J!==e.modelValue&&u(Y,J),!l.dragging&&e.modelValue!==l.oldValue&&(l.oldValue=e.modelValue),await ye(),l.dragging&&M(),R.value.updatePopper()};return de(()=>l.dragging,o=>{z(o)}),pe(P,"touchstart",H,{passive:!1}),{disabled:a,button:P,tooltip:R,tooltipVisible:T,showTooltip:s,persistent:w,wrapperStyle:C,formatValue:A,handleMouseEnter:G,handleMouseLeave:ne,onButtonDown:H,onKeyDown:d,setPosition:_}},wt=te({name:"ElSliderButton"}),St=te({...wt,props:ht,emits:Vt,setup(e,{expose:l,emit:u}){const a=e,f=Ee("slider"),c=Ie({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:a.modelValue}),i=V(()=>y.value?m.value:!1),{disabled:s,button:w,tooltip:g,showTooltip:y,persistent:m,tooltipVisible:k,wrapperStyle:$,formatValue:z,handleMouseEnter:R,handleMouseLeave:T,onButtonDown:A,onKeyDown:M,setPosition:K}=pt(a,c,u),{hovering:P,dragging:I}=Me(c);return l({onButtonDown:A,onKeyDown:M,setPosition:K,hovering:P,dragging:I}),(C,G)=>(B(),X("div",{ref_key:"button",ref:w,class:O([t(f).e("button-wrapper"),{hover:t(P),dragging:t(I)}]),style:le(t($)),tabindex:t(s)?-1:0,onMouseenter:t(R),onMouseleave:t(T),onMousedown:t(A),onFocus:t(R),onBlur:t(T),onKeydown:t(M)},[ce(t(st),{ref_key:"tooltip",ref:g,visible:t(k),placement:C.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":C.tooltipClass,disabled:!t(y),persistent:t(i)},{content:ae(()=>[oe("span",null,qe(t(z)),1)]),default:ae(()=>[oe("div",{class:O([t(f).e("button"),{hover:t(P),dragging:t(I)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled","persistent"])],46,["tabindex","onMouseenter","onMouseleave","onMousedown","onFocus","onBlur","onKeydown"]))}});var $e=Ce(St,[["__file","button.vue"]]);const Nt=Ne({mark:{type:ue([String,Object]),default:void 0}});var Et=te({name:"ElSliderMarker",props:Nt,setup(e){const l=Ee("slider"),u=V(()=>xe(e.mark)?e.mark:e.mark.label),a=V(()=>xe(e.mark)?void 0:e.mark.style);return()=>Ze("div",{class:l.e("marks-text"),style:a.value},u.value)}});const kt=(e,l,u)=>{const{form:a,formItem:f}=We(),c=De(),i=ee(),s=ee(),w={firstButton:i,secondButton:s},g=V(()=>e.disabled||a?.disabled||!1),y=V(()=>Math.min(l.firstValue,l.secondValue)),m=V(()=>Math.max(l.firstValue,l.secondValue)),k=V(()=>e.range?`${100*(m.value-y.value)/(e.max-e.min)}%`:`${100*(l.firstValue-e.min)/(e.max-e.min)}%`),$=V(()=>e.range?`${100*(y.value-e.min)/(e.max-e.min)}%`:"0%"),z=V(()=>e.vertical?{height:e.height}:{}),R=V(()=>e.vertical?{height:k.value,bottom:$.value}:{width:k.value,left:$.value}),T=()=>{c.value&&(l.sliderSize=c.value[`client${e.vertical?"Height":"Width"}`])},A=v=>{const S=e.min+v*(e.max-e.min)/100;if(!e.range)return i;let L;return Math.abs(y.value-S)<Math.abs(m.value-S)?L=l.firstValue<l.secondValue?"firstButton":"secondButton":L=l.firstValue>l.secondValue?"firstButton":"secondButton",w[L]},M=v=>{const S=A(v);return S.value.setPosition(v),S},K=v=>{l.firstValue=v??e.min,I(e.range?[y.value,m.value]:v??e.min)},P=v=>{l.secondValue=v,e.range&&I([y.value,m.value])},I=v=>{u(Y,v),u(D,v)},C=async()=>{await ye(),u(Se,e.range?[y.value,m.value]:e.modelValue)},G=v=>{var S,L,n,r,d,p;if(g.value||l.dragging)return;T();let h=0;if(e.vertical){const N=(n=(L=(S=v.touches)==null?void 0:S.item(0))==null?void 0:L.clientY)!=null?n:v.clientY;h=(c.value.getBoundingClientRect().bottom-N)/l.sliderSize*100}else{const N=(p=(d=(r=v.touches)==null?void 0:r.item(0))==null?void 0:d.clientX)!=null?p:v.clientX,x=c.value.getBoundingClientRect().left;h=(N-x)/l.sliderSize*100}if(!(h<0||h>100))return M(h)};return{elFormItem:f,slider:c,firstButton:i,secondButton:s,sliderDisabled:g,minValue:y,maxValue:m,runwayStyle:z,barStyle:R,resetSize:T,setPosition:M,emitChange:C,onSliderWrapperPrevent:v=>{var S,L;((S=w.firstButton.value)!=null&&S.dragging||(L=w.secondButton.value)!=null&&L.dragging)&&v.preventDefault()},onSliderClick:v=>{G(v)&&C()},onSliderDown:async v=>{const S=G(v);S&&(await ye(),S.value.onButtonDown(v))},onSliderMarkerDown:v=>{if(g.value||l.dragging)return;M(v)&&C()},setFirstValue:K,setSecondValue:P}},Bt=(e,l,u,a)=>({stops:V(()=>{if(!e.showStops||e.min>e.max)return[];if(e.step===0)return[];const i=(e.max-e.min)/e.step,s=100*e.step/(e.max-e.min),w=Array.from({length:i-1}).map((g,y)=>(y+1)*s);return e.range?w.filter(g=>g<100*(u.value-e.min)/(e.max-e.min)||g>100*(a.value-e.min)/(e.max-e.min)):w.filter(g=>g>100*(l.firstValue-e.min)/(e.max-e.min))}),getStopStyle:i=>e.vertical?{bottom:`${i}%`}:{left:`${i}%`}}),xt=e=>V(()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort((u,a)=>u-a).filter(u=>u<=e.max&&u>=e.min).map(u=>({point:u,position:(u-e.min)*100/(e.max-e.min),mark:e.marks[u]})):[]),Mt=(e,l,u,a,f,c)=>{const i=g=>{f(Y,g),f(D,g)},s=()=>e.range?![u.value,a.value].every((g,y)=>g===l.oldValue[y]):e.modelValue!==l.oldValue,w=()=>{var g,y;e.min>e.max&&Oe("Slider","min should not be greater than max.");const m=e.modelValue;e.range&&me(m)?m[1]<e.min?i([e.min,e.min]):m[0]>e.max?i([e.max,e.max]):m[0]<e.min?i([e.min,m[1]]):m[1]>e.max?i([m[0],e.max]):(l.firstValue=m[0],l.secondValue=m[1],s()&&(e.validateEvent&&((g=c?.validate)==null||g.call(c,"change").catch(k=>we())),l.oldValue=m.slice())):!e.range&&F(m)&&!Number.isNaN(m)&&(m<e.min?i(e.min):m>e.max?i(e.max):(l.firstValue=m,s()&&(e.validateEvent&&((y=c?.validate)==null||y.call(c,"change").catch(k=>we())),l.oldValue=m)))};w(),de(()=>l.dragging,g=>{g||w()}),de(()=>e.modelValue,(g,y)=>{l.dragging||me(g)&&me(y)&&g.every((m,k)=>m===y[k])&&l.firstValue===g[0]&&l.secondValue===g[1]||w()},{deep:!0}),de(()=>[e.min,e.max],()=>{w()})},Pt=(e,l,u)=>{const a=ee();return Ae(async()=>{e.range?(me(e.modelValue)?(l.firstValue=Math.max(e.min,e.modelValue[0]),l.secondValue=Math.min(e.max,e.modelValue[1])):(l.firstValue=e.min,l.secondValue=e.max),l.oldValue=[l.firstValue,l.secondValue]):(!F(e.modelValue)||Number.isNaN(e.modelValue)?l.firstValue=e.min:l.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),l.oldValue=l.firstValue),pe(window,"resize",u),await ye(),u()}),{sliderWrapper:a}},It=te({name:"ElSlider"}),Ct=te({...It,props:bt,emits:gt,setup(e,{expose:l,emit:u}){const a=e,f=Ee("slider"),{t:c}=Ke(),i=Ie({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:s,slider:w,firstButton:g,secondButton:y,sliderDisabled:m,minValue:k,maxValue:$,runwayStyle:z,barStyle:R,resetSize:T,emitChange:A,onSliderWrapperPrevent:M,onSliderClick:K,onSliderDown:P,onSliderMarkerDown:I,setFirstValue:C,setSecondValue:G}=kt(a,i,u),{stops:ne,getStopStyle:H}=Bt(a,i,k,$),{inputId:U,isLabeledByFormItem:j}=ut(a,{formItemContext:s}),v=Xe(),S=V(()=>a.inputSize||v.value),L=V(()=>a.ariaLabel||c("el.slider.defaultLabel",{min:a.min,max:a.max})),n=V(()=>a.range?a.rangeStartLabel||c("el.slider.defaultRangeStartLabel"):L.value),r=V(()=>a.formatValueText?a.formatValueText(o.value):`${o.value}`),d=V(()=>a.rangeEndLabel||c("el.slider.defaultRangeEndLabel")),p=V(()=>a.formatValueText?a.formatValueText(E.value):`${E.value}`),h=V(()=>[f.b(),f.m(v.value),f.is("vertical",a.vertical),{[f.m("with-input")]:a.showInput}]),N=xt(a);Mt(a,i,k,$,u,s);const x=V(()=>{const b=[a.min,a.max,a.step].map(Le=>{const se=`${Le}`.split(".")[1];return se?se.length:0});return Math.max.apply(null,b)}),{sliderWrapper:_}=Pt(a,i,T),{firstValue:o,secondValue:E,sliderSize:W}=Me(i),J=b=>{i.dragging=b};return pe(_,"touchstart",M,{passive:!1}),pe(_,"touchmove",M,{passive:!1}),et(He,{...Me(a),sliderSize:W,disabled:m,precision:x,emitChange:A,resetSize:T,updateDragging:J}),l({onSliderClick:K}),(b,Le)=>{var se,_e;return B(),X("div",{id:b.range?t(U):void 0,ref_key:"sliderWrapper",ref:_,class:O(t(h)),role:b.range?"group":void 0,"aria-label":b.range&&!t(j)?t(L):void 0,"aria-labelledby":b.range&&t(j)?(se=t(s))==null?void 0:se.labelId:void 0},[oe("div",{ref_key:"slider",ref:w,class:O([t(f).e("runway"),{"show-input":b.showInput&&!b.range},t(f).is("disabled",t(m))]),style:le(t(z)),onMousedown:t(P),onTouchstartPassive:t(P)},[oe("div",{class:O(t(f).e("bar")),style:le(t(R))},null,6),ce($e,{id:b.range?void 0:t(U),ref_key:"firstButton",ref:g,"model-value":t(o),vertical:b.vertical,"tooltip-class":b.tooltipClass,placement:b.placement,role:"slider","aria-label":b.range||!t(j)?t(n):void 0,"aria-labelledby":!b.range&&t(j)?(_e=t(s))==null?void 0:_e.labelId:void 0,"aria-valuemin":b.min,"aria-valuemax":b.range?t(E):b.max,"aria-valuenow":t(o),"aria-valuetext":t(r),"aria-orientation":b.vertical?"vertical":"horizontal","aria-disabled":t(m),"onUpdate:modelValue":t(C)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),b.range?(B(),Z($e,{key:0,ref_key:"secondButton",ref:y,"model-value":t(E),vertical:b.vertical,"tooltip-class":b.tooltipClass,placement:b.placement,role:"slider","aria-label":t(d),"aria-valuemin":t(o),"aria-valuemax":b.max,"aria-valuenow":t(E),"aria-valuetext":t(p),"aria-orientation":b.vertical?"vertical":"horizontal","aria-disabled":t(m),"onUpdate:modelValue":t(G)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):re("v-if",!0),b.showStops?(B(),X("div",{key:1},[(B(!0),X(ge,null,ke(t(ne),(q,ie)=>(B(),X("div",{key:ie,class:O(t(f).e("stop")),style:le(t(H)(q))},null,6))),128))])):re("v-if",!0),t(N).length>0?(B(),X(ge,{key:2},[oe("div",null,[(B(!0),X(ge,null,ke(t(N),(q,ie)=>(B(),X("div",{key:ie,style:le(t(H)(q.position)),class:O([t(f).e("stop"),t(f).e("marks-stop")])},null,6))),128))]),oe("div",{class:O(t(f).e("marks"))},[(B(!0),X(ge,null,ke(t(N),(q,ie)=>(B(),Z(t(Et),{key:ie,mark:q.mark,style:le(t(H)(q.position)),onMousedown:Ve(_t=>t(I)(q.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):re("v-if",!0)],46,["onMousedown","onTouchstartPassive"]),b.showInput&&!b.range?(B(),Z(t(vt),{key:0,ref:"input","model-value":t(o),class:O(t(f).e("input")),step:b.step,disabled:t(m),controls:b.showInputControls,min:b.min,max:b.max,precision:t(x),debounce:b.debounce,size:t(S),"onUpdate:modelValue":t(C),onChange:t(A)},null,8,["model-value","class","step","disabled","controls","min","max","precision","debounce","size","onUpdate:modelValue","onChange"])):re("v-if",!0)],10,["id","role","aria-label","aria-labelledby"])}}});var Lt=Ce(Ct,[["__file","slider.vue"]]);const Yt=Ye(Lt);export{vt as E,Yt as a};
1
+ import{d as te,r as Ie,w as de,o as Ae,ah as je,q as B,H as X,G as Te,u as t,U as ve,Q as O,z as be,C as ce,y as ae,x as Z,J as re,af as Je,M as Ve,b as ee,c as V,S as xe,g as me,i as Qe,n as ye,a2 as Me,E as oe,F as qe,R as le,h as Ze,a as De,p as et,O as ge,N as ke}from"./vendor-vue-C5BV5QrY.js";import{u as pe}from"./typescript-CpGNwkU2.js";import{E as tt}from"./index-DRLOP5c1.js";import{U as Y,L as F,bC as fe,J as D,M as Se,H as Ne,bh as Pe,I as ue,y as Ce,ae as Ke,z as Ee,O as Xe,P as nt,bO as lt,c8 as at,R as Fe,c9 as rt,bN as ot,a1 as he,T as Oe,Q as we,A as Ye,aN as Q}from"./index-CF16UMDY.js";import{u as Ue}from"./index-x0JegZp0.js";import{v as ze}from"./index-D-qg-A9-.js";import{u as We,a as ut}from"./use-form-item-DgeeEPic.js";import{e as Ge,E as st}from"./index-Cjv_kJ6-.js";import{d as Re}from"./debounce-BogYe2lq.js";const it=Ne({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.MAX_SAFE_INTEGER},min:{type:Number,default:Number.MIN_SAFE_INTEGER},modelValue:{type:[Number,null]},readonly:Boolean,disabled:Boolean,size:Pe,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:e=>e===null||F(e)||["min","max"].includes(e),default:null},name:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0},...Ue(["ariaLabel"]),inputmode:{type:ue(String),default:void 0}}),dt={[Se]:(e,l)=>l!==e,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[D]:e=>F(e)||fe(e),[Y]:e=>F(e)||fe(e)},ct=te({name:"ElInputNumber"}),mt=te({...ct,props:it,emits:dt,setup(e,{expose:l,emit:u}){const a=e,{t:f}=Ke(),c=Ee("input-number"),i=ee(),s=Ie({currentValue:a.modelValue,userInput:null}),{formItem:w}=We(),g=V(()=>F(a.modelValue)&&a.modelValue<=a.min),y=V(()=>F(a.modelValue)&&a.modelValue>=a.max),m=V(()=>{const n=A(a.step);return he(a.precision)?Math.max(A(a.modelValue),n):(n>a.precision,a.precision)}),k=V(()=>a.controls&&a.controlsPosition==="right"),$=Xe(),z=nt(),R=V(()=>{if(s.userInput!==null)return s.userInput;let n=s.currentValue;if(fe(n))return"";if(F(n)){if(Number.isNaN(n))return"";he(a.precision)||(n=n.toFixed(a.precision))}return n}),T=(n,r)=>{if(he(r)&&(r=m.value),r===0)return Math.round(n);let d=String(n);const p=d.indexOf(".");if(p===-1||!d.replace(".","").split("")[p+r])return n;const x=d.length;return d.charAt(x-1)==="5"&&(d=`${d.slice(0,Math.max(0,x-1))}6`),Number.parseFloat(Number(d).toFixed(r))},A=n=>{if(fe(n))return 0;const r=n.toString(),d=r.indexOf(".");let p=0;return d!==-1&&(p=r.length-d-1),p},M=(n,r=1)=>F(n)?n>=Number.MAX_SAFE_INTEGER&&r===1||n<=Number.MIN_SAFE_INTEGER&&r===-1?n:T(n+a.step*r):s.currentValue,K=()=>{if(a.readonly||z.value||y.value)return;const n=Number(R.value)||0,r=M(n);C(r),u(D,s.currentValue),S()},P=()=>{if(a.readonly||z.value||g.value)return;const n=Number(R.value)||0,r=M(n,-1);C(r),u(D,s.currentValue),S()},I=(n,r)=>{const{max:d,min:p,step:h,precision:N,stepStrictly:x,valueOnClear:_}=a;d<p&&Oe("InputNumber","min should not be greater than max.");let o=Number(n);if(fe(n)||Number.isNaN(o))return null;if(n===""){if(_===null)return null;o=xe(_)?{min:p,max:d}[_]:_}return x&&(o=T(Math.round(o/h)*h,N),o!==n&&r&&u(Y,o)),he(N)||(o=T(o,N)),(o>d||o<p)&&(o=o>d?d:p,r&&u(Y,o)),o},C=(n,r=!0)=>{var d;const p=s.currentValue,h=I(n);if(!r){u(Y,h);return}p===h&&n||(s.userInput=null,u(Y,h),p!==h&&u(Se,h,p),a.validateEvent&&((d=w?.validate)==null||d.call(w,"change").catch(N=>we())),s.currentValue=h)},G=n=>{s.userInput=n;const r=n===""?null:Number(n);u(D,r),C(r,!1)},ne=n=>{const r=n!==""?Number(n):"";(F(r)&&!Number.isNaN(r)||n==="")&&C(r),S(),s.userInput=null},H=()=>{var n,r;(r=(n=i.value)==null?void 0:n.focus)==null||r.call(n)},U=()=>{var n,r;(r=(n=i.value)==null?void 0:n.blur)==null||r.call(n)},j=n=>{u("focus",n)},v=n=>{var r,d;s.userInput=null,s.currentValue===null&&((r=i.value)!=null&&r.input)&&(i.value.input.value=""),u("blur",n),a.validateEvent&&((d=w?.validate)==null||d.call(w,"blur").catch(p=>we()))},S=()=>{s.currentValue!==a.modelValue&&(s.currentValue=a.modelValue)},L=n=>{document.activeElement===n.target&&n.preventDefault()};return de(()=>a.modelValue,(n,r)=>{const d=I(n,!0);s.userInput===null&&d!==r&&(s.currentValue=d)},{immediate:!0}),Ae(()=>{var n;const{min:r,max:d,modelValue:p}=a,h=(n=i.value)==null?void 0:n.input;if(h.setAttribute("role","spinbutton"),Number.isFinite(d)?h.setAttribute("aria-valuemax",String(d)):h.removeAttribute("aria-valuemax"),Number.isFinite(r)?h.setAttribute("aria-valuemin",String(r)):h.removeAttribute("aria-valuemin"),h.setAttribute("aria-valuenow",s.currentValue||s.currentValue===0?String(s.currentValue):""),h.setAttribute("aria-disabled",String(z.value)),!F(p)&&p!=null){let N=Number(p);Number.isNaN(N)&&(N=null),u(Y,N)}h.addEventListener("wheel",L,{passive:!1})}),je(()=>{var n,r;const d=(n=i.value)==null?void 0:n.input;d?.setAttribute("aria-valuenow",`${(r=s.currentValue)!=null?r:""}`)}),l({focus:H,blur:U}),(n,r)=>(B(),X("div",{class:O([t(c).b(),t(c).m(t($)),t(c).is("disabled",t(z)),t(c).is("without-controls",!n.controls),t(c).is("controls-right",t(k))]),onDragstart:Ve(()=>{},["prevent"])},[n.controls?Te((B(),X("span",{key:0,role:"button","aria-label":t(f)("el.inputNumber.decrease"),class:O([t(c).e("decrease"),t(c).is("disabled",t(g))]),onKeydown:ve(P,["enter"])},[be(n.$slots,"decrease-icon",{},()=>[ce(t(Fe),null,{default:ae(()=>[t(k)?(B(),Z(t(lt),{key:0})):(B(),Z(t(at),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[t(ze),P]]):re("v-if",!0),n.controls?Te((B(),X("span",{key:1,role:"button","aria-label":t(f)("el.inputNumber.increase"),class:O([t(c).e("increase"),t(c).is("disabled",t(y))]),onKeydown:ve(K,["enter"])},[be(n.$slots,"increase-icon",{},()=>[ce(t(Fe),null,{default:ae(()=>[t(k)?(B(),Z(t(rt),{key:0})):(B(),Z(t(ot),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[t(ze),K]]):re("v-if",!0),ce(t(tt),{id:n.id,ref_key:"input",ref:i,type:"number",step:n.step,"model-value":t(R),placeholder:n.placeholder,readonly:n.readonly,disabled:t(z),size:t($),max:n.max,min:n.min,name:n.name,"aria-label":n.ariaLabel,"validate-event":!1,inputmode:n.inputmode,onKeydown:[ve(Ve(K,["prevent"]),["up"]),ve(Ve(P,["prevent"]),["down"])],onBlur:v,onFocus:j,onInput:G,onChange:ne},Je({_:2},[n.$slots.prefix?{name:"prefix",fn:ae(()=>[be(n.$slots,"prefix")])}:void 0,n.$slots.suffix?{name:"suffix",fn:ae(()=>[be(n.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode","onKeydown"])],42,["onDragstart"]))}});var ft=Ce(mt,[["__file","input-number.vue"]]);const vt=Ye(ft),He=Symbol("sliderContextKey"),bt=Ne({modelValue:{type:ue([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:Pe,inputSize:Pe,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:ue(Function),default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:ue(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:Ge,default:"top"},marks:{type:ue(Object)},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},...Ue(["ariaLabel"])}),Be=e=>F(e)||me(e)&&e.every(F),gt={[Y]:Be,[D]:Be,[Se]:Be},ht=Ne({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:Ge,default:"top"}}),Vt={[Y]:e=>F(e)},yt=(e,l,u)=>{const a=ee(),f=ee(!1),c=V(()=>l.value instanceof Function),i=V(()=>c.value&&l.value(e.modelValue)||e.modelValue),s=Re(()=>{u.value&&(f.value=!0)},50),w=Re(()=>{u.value&&(f.value=!1)},50);return{tooltip:a,tooltipVisible:f,formatValue:i,displayTooltip:s,hideTooltip:w}},pt=(e,l,u)=>{const{disabled:a,min:f,max:c,step:i,showTooltip:s,persistent:w,precision:g,sliderSize:y,formatTooltip:m,emitChange:k,resetSize:$,updateDragging:z}=Qe(He),{tooltip:R,tooltipVisible:T,formatValue:A,displayTooltip:M,hideTooltip:K}=yt(e,m,s),P=ee(),I=V(()=>`${(e.modelValue-f.value)/(c.value-f.value)*100}%`),C=V(()=>e.vertical?{bottom:I.value}:{left:I.value}),G=()=>{l.hovering=!0,M()},ne=()=>{l.hovering=!1,l.dragging||K()},H=o=>{a.value||(o.preventDefault(),h(o),window.addEventListener("mousemove",N),window.addEventListener("touchmove",N),window.addEventListener("mouseup",x),window.addEventListener("touchend",x),window.addEventListener("contextmenu",x),P.value.focus())},U=o=>{a.value||(l.newPosition=Number.parseFloat(I.value)+o/(c.value-f.value)*100,_(l.newPosition),k())},j=()=>{U(-i.value)},v=()=>{U(i.value)},S=()=>{U(-i.value*4)},L=()=>{U(i.value*4)},n=()=>{a.value||(_(0),k())},r=()=>{a.value||(_(100),k())},d=o=>{let E=!0;switch(o.code){case Q.left:case Q.down:j();break;case Q.right:case Q.up:v();break;case Q.home:n();break;case Q.end:r();break;case Q.pageDown:S();break;case Q.pageUp:L();break;default:E=!1;break}E&&o.preventDefault()},p=o=>{let E,W;return o.type.startsWith("touch")?(W=o.touches[0].clientY,E=o.touches[0].clientX):(W=o.clientY,E=o.clientX),{clientX:E,clientY:W}},h=o=>{l.dragging=!0,l.isClick=!0;const{clientX:E,clientY:W}=p(o);e.vertical?l.startY=W:l.startX=E,l.startPosition=Number.parseFloat(I.value),l.newPosition=l.startPosition},N=o=>{if(l.dragging){l.isClick=!1,M(),$();let E;const{clientX:W,clientY:J}=p(o);e.vertical?(l.currentY=J,E=(l.startY-l.currentY)/y.value*100):(l.currentX=W,E=(l.currentX-l.startX)/y.value*100),l.newPosition=l.startPosition+E,_(l.newPosition)}},x=()=>{l.dragging&&(setTimeout(()=>{l.dragging=!1,l.hovering||K(),l.isClick||_(l.newPosition),k()},0),window.removeEventListener("mousemove",N),window.removeEventListener("touchmove",N),window.removeEventListener("mouseup",x),window.removeEventListener("touchend",x),window.removeEventListener("contextmenu",x))},_=async o=>{if(o===null||Number.isNaN(+o))return;o<0?o=0:o>100&&(o=100);const E=100/((c.value-f.value)/i.value);let J=Math.round(o/E)*E*(c.value-f.value)*.01+f.value;J=Number.parseFloat(J.toFixed(g.value)),J!==e.modelValue&&u(Y,J),!l.dragging&&e.modelValue!==l.oldValue&&(l.oldValue=e.modelValue),await ye(),l.dragging&&M(),R.value.updatePopper()};return de(()=>l.dragging,o=>{z(o)}),pe(P,"touchstart",H,{passive:!1}),{disabled:a,button:P,tooltip:R,tooltipVisible:T,showTooltip:s,persistent:w,wrapperStyle:C,formatValue:A,handleMouseEnter:G,handleMouseLeave:ne,onButtonDown:H,onKeyDown:d,setPosition:_}},wt=te({name:"ElSliderButton"}),St=te({...wt,props:ht,emits:Vt,setup(e,{expose:l,emit:u}){const a=e,f=Ee("slider"),c=Ie({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:a.modelValue}),i=V(()=>y.value?m.value:!1),{disabled:s,button:w,tooltip:g,showTooltip:y,persistent:m,tooltipVisible:k,wrapperStyle:$,formatValue:z,handleMouseEnter:R,handleMouseLeave:T,onButtonDown:A,onKeyDown:M,setPosition:K}=pt(a,c,u),{hovering:P,dragging:I}=Me(c);return l({onButtonDown:A,onKeyDown:M,setPosition:K,hovering:P,dragging:I}),(C,G)=>(B(),X("div",{ref_key:"button",ref:w,class:O([t(f).e("button-wrapper"),{hover:t(P),dragging:t(I)}]),style:le(t($)),tabindex:t(s)?-1:0,onMouseenter:t(R),onMouseleave:t(T),onMousedown:t(A),onFocus:t(R),onBlur:t(T),onKeydown:t(M)},[ce(t(st),{ref_key:"tooltip",ref:g,visible:t(k),placement:C.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":C.tooltipClass,disabled:!t(y),persistent:t(i)},{content:ae(()=>[oe("span",null,qe(t(z)),1)]),default:ae(()=>[oe("div",{class:O([t(f).e("button"),{hover:t(P),dragging:t(I)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled","persistent"])],46,["tabindex","onMouseenter","onMouseleave","onMousedown","onFocus","onBlur","onKeydown"]))}});var $e=Ce(St,[["__file","button.vue"]]);const Nt=Ne({mark:{type:ue([String,Object]),default:void 0}});var Et=te({name:"ElSliderMarker",props:Nt,setup(e){const l=Ee("slider"),u=V(()=>xe(e.mark)?e.mark:e.mark.label),a=V(()=>xe(e.mark)?void 0:e.mark.style);return()=>Ze("div",{class:l.e("marks-text"),style:a.value},u.value)}});const kt=(e,l,u)=>{const{form:a,formItem:f}=We(),c=De(),i=ee(),s=ee(),w={firstButton:i,secondButton:s},g=V(()=>e.disabled||a?.disabled||!1),y=V(()=>Math.min(l.firstValue,l.secondValue)),m=V(()=>Math.max(l.firstValue,l.secondValue)),k=V(()=>e.range?`${100*(m.value-y.value)/(e.max-e.min)}%`:`${100*(l.firstValue-e.min)/(e.max-e.min)}%`),$=V(()=>e.range?`${100*(y.value-e.min)/(e.max-e.min)}%`:"0%"),z=V(()=>e.vertical?{height:e.height}:{}),R=V(()=>e.vertical?{height:k.value,bottom:$.value}:{width:k.value,left:$.value}),T=()=>{c.value&&(l.sliderSize=c.value[`client${e.vertical?"Height":"Width"}`])},A=v=>{const S=e.min+v*(e.max-e.min)/100;if(!e.range)return i;let L;return Math.abs(y.value-S)<Math.abs(m.value-S)?L=l.firstValue<l.secondValue?"firstButton":"secondButton":L=l.firstValue>l.secondValue?"firstButton":"secondButton",w[L]},M=v=>{const S=A(v);return S.value.setPosition(v),S},K=v=>{l.firstValue=v??e.min,I(e.range?[y.value,m.value]:v??e.min)},P=v=>{l.secondValue=v,e.range&&I([y.value,m.value])},I=v=>{u(Y,v),u(D,v)},C=async()=>{await ye(),u(Se,e.range?[y.value,m.value]:e.modelValue)},G=v=>{var S,L,n,r,d,p;if(g.value||l.dragging)return;T();let h=0;if(e.vertical){const N=(n=(L=(S=v.touches)==null?void 0:S.item(0))==null?void 0:L.clientY)!=null?n:v.clientY;h=(c.value.getBoundingClientRect().bottom-N)/l.sliderSize*100}else{const N=(p=(d=(r=v.touches)==null?void 0:r.item(0))==null?void 0:d.clientX)!=null?p:v.clientX,x=c.value.getBoundingClientRect().left;h=(N-x)/l.sliderSize*100}if(!(h<0||h>100))return M(h)};return{elFormItem:f,slider:c,firstButton:i,secondButton:s,sliderDisabled:g,minValue:y,maxValue:m,runwayStyle:z,barStyle:R,resetSize:T,setPosition:M,emitChange:C,onSliderWrapperPrevent:v=>{var S,L;((S=w.firstButton.value)!=null&&S.dragging||(L=w.secondButton.value)!=null&&L.dragging)&&v.preventDefault()},onSliderClick:v=>{G(v)&&C()},onSliderDown:async v=>{const S=G(v);S&&(await ye(),S.value.onButtonDown(v))},onSliderMarkerDown:v=>{if(g.value||l.dragging)return;M(v)&&C()},setFirstValue:K,setSecondValue:P}},Bt=(e,l,u,a)=>({stops:V(()=>{if(!e.showStops||e.min>e.max)return[];if(e.step===0)return[];const i=(e.max-e.min)/e.step,s=100*e.step/(e.max-e.min),w=Array.from({length:i-1}).map((g,y)=>(y+1)*s);return e.range?w.filter(g=>g<100*(u.value-e.min)/(e.max-e.min)||g>100*(a.value-e.min)/(e.max-e.min)):w.filter(g=>g>100*(l.firstValue-e.min)/(e.max-e.min))}),getStopStyle:i=>e.vertical?{bottom:`${i}%`}:{left:`${i}%`}}),xt=e=>V(()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort((u,a)=>u-a).filter(u=>u<=e.max&&u>=e.min).map(u=>({point:u,position:(u-e.min)*100/(e.max-e.min),mark:e.marks[u]})):[]),Mt=(e,l,u,a,f,c)=>{const i=g=>{f(Y,g),f(D,g)},s=()=>e.range?![u.value,a.value].every((g,y)=>g===l.oldValue[y]):e.modelValue!==l.oldValue,w=()=>{var g,y;e.min>e.max&&Oe("Slider","min should not be greater than max.");const m=e.modelValue;e.range&&me(m)?m[1]<e.min?i([e.min,e.min]):m[0]>e.max?i([e.max,e.max]):m[0]<e.min?i([e.min,m[1]]):m[1]>e.max?i([m[0],e.max]):(l.firstValue=m[0],l.secondValue=m[1],s()&&(e.validateEvent&&((g=c?.validate)==null||g.call(c,"change").catch(k=>we())),l.oldValue=m.slice())):!e.range&&F(m)&&!Number.isNaN(m)&&(m<e.min?i(e.min):m>e.max?i(e.max):(l.firstValue=m,s()&&(e.validateEvent&&((y=c?.validate)==null||y.call(c,"change").catch(k=>we())),l.oldValue=m)))};w(),de(()=>l.dragging,g=>{g||w()}),de(()=>e.modelValue,(g,y)=>{l.dragging||me(g)&&me(y)&&g.every((m,k)=>m===y[k])&&l.firstValue===g[0]&&l.secondValue===g[1]||w()},{deep:!0}),de(()=>[e.min,e.max],()=>{w()})},Pt=(e,l,u)=>{const a=ee();return Ae(async()=>{e.range?(me(e.modelValue)?(l.firstValue=Math.max(e.min,e.modelValue[0]),l.secondValue=Math.min(e.max,e.modelValue[1])):(l.firstValue=e.min,l.secondValue=e.max),l.oldValue=[l.firstValue,l.secondValue]):(!F(e.modelValue)||Number.isNaN(e.modelValue)?l.firstValue=e.min:l.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),l.oldValue=l.firstValue),pe(window,"resize",u),await ye(),u()}),{sliderWrapper:a}},It=te({name:"ElSlider"}),Ct=te({...It,props:bt,emits:gt,setup(e,{expose:l,emit:u}){const a=e,f=Ee("slider"),{t:c}=Ke(),i=Ie({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:s,slider:w,firstButton:g,secondButton:y,sliderDisabled:m,minValue:k,maxValue:$,runwayStyle:z,barStyle:R,resetSize:T,emitChange:A,onSliderWrapperPrevent:M,onSliderClick:K,onSliderDown:P,onSliderMarkerDown:I,setFirstValue:C,setSecondValue:G}=kt(a,i,u),{stops:ne,getStopStyle:H}=Bt(a,i,k,$),{inputId:U,isLabeledByFormItem:j}=ut(a,{formItemContext:s}),v=Xe(),S=V(()=>a.inputSize||v.value),L=V(()=>a.ariaLabel||c("el.slider.defaultLabel",{min:a.min,max:a.max})),n=V(()=>a.range?a.rangeStartLabel||c("el.slider.defaultRangeStartLabel"):L.value),r=V(()=>a.formatValueText?a.formatValueText(o.value):`${o.value}`),d=V(()=>a.rangeEndLabel||c("el.slider.defaultRangeEndLabel")),p=V(()=>a.formatValueText?a.formatValueText(E.value):`${E.value}`),h=V(()=>[f.b(),f.m(v.value),f.is("vertical",a.vertical),{[f.m("with-input")]:a.showInput}]),N=xt(a);Mt(a,i,k,$,u,s);const x=V(()=>{const b=[a.min,a.max,a.step].map(Le=>{const se=`${Le}`.split(".")[1];return se?se.length:0});return Math.max.apply(null,b)}),{sliderWrapper:_}=Pt(a,i,T),{firstValue:o,secondValue:E,sliderSize:W}=Me(i),J=b=>{i.dragging=b};return pe(_,"touchstart",M,{passive:!1}),pe(_,"touchmove",M,{passive:!1}),et(He,{...Me(a),sliderSize:W,disabled:m,precision:x,emitChange:A,resetSize:T,updateDragging:J}),l({onSliderClick:K}),(b,Le)=>{var se,_e;return B(),X("div",{id:b.range?t(U):void 0,ref_key:"sliderWrapper",ref:_,class:O(t(h)),role:b.range?"group":void 0,"aria-label":b.range&&!t(j)?t(L):void 0,"aria-labelledby":b.range&&t(j)?(se=t(s))==null?void 0:se.labelId:void 0},[oe("div",{ref_key:"slider",ref:w,class:O([t(f).e("runway"),{"show-input":b.showInput&&!b.range},t(f).is("disabled",t(m))]),style:le(t(z)),onMousedown:t(P),onTouchstartPassive:t(P)},[oe("div",{class:O(t(f).e("bar")),style:le(t(R))},null,6),ce($e,{id:b.range?void 0:t(U),ref_key:"firstButton",ref:g,"model-value":t(o),vertical:b.vertical,"tooltip-class":b.tooltipClass,placement:b.placement,role:"slider","aria-label":b.range||!t(j)?t(n):void 0,"aria-labelledby":!b.range&&t(j)?(_e=t(s))==null?void 0:_e.labelId:void 0,"aria-valuemin":b.min,"aria-valuemax":b.range?t(E):b.max,"aria-valuenow":t(o),"aria-valuetext":t(r),"aria-orientation":b.vertical?"vertical":"horizontal","aria-disabled":t(m),"onUpdate:modelValue":t(C)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),b.range?(B(),Z($e,{key:0,ref_key:"secondButton",ref:y,"model-value":t(E),vertical:b.vertical,"tooltip-class":b.tooltipClass,placement:b.placement,role:"slider","aria-label":t(d),"aria-valuemin":t(o),"aria-valuemax":b.max,"aria-valuenow":t(E),"aria-valuetext":t(p),"aria-orientation":b.vertical?"vertical":"horizontal","aria-disabled":t(m),"onUpdate:modelValue":t(G)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):re("v-if",!0),b.showStops?(B(),X("div",{key:1},[(B(!0),X(ge,null,ke(t(ne),(q,ie)=>(B(),X("div",{key:ie,class:O(t(f).e("stop")),style:le(t(H)(q))},null,6))),128))])):re("v-if",!0),t(N).length>0?(B(),X(ge,{key:2},[oe("div",null,[(B(!0),X(ge,null,ke(t(N),(q,ie)=>(B(),X("div",{key:ie,style:le(t(H)(q.position)),class:O([t(f).e("stop"),t(f).e("marks-stop")])},null,6))),128))]),oe("div",{class:O(t(f).e("marks"))},[(B(!0),X(ge,null,ke(t(N),(q,ie)=>(B(),Z(t(Et),{key:ie,mark:q.mark,style:le(t(H)(q.position)),onMousedown:Ve(_t=>t(I)(q.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):re("v-if",!0)],46,["onMousedown","onTouchstartPassive"]),b.showInput&&!b.range?(B(),Z(t(vt),{key:0,ref:"input","model-value":t(o),class:O(t(f).e("input")),step:b.step,disabled:t(m),controls:b.showInputControls,min:b.min,max:b.max,precision:t(x),debounce:b.debounce,size:t(S),"onUpdate:modelValue":t(C),onChange:t(A)},null,8,["model-value","class","step","disabled","controls","min","max","precision","debounce","size","onUpdate:modelValue","onChange"])):re("v-if",!0)],10,["id","role","aria-label","aria-labelledby"])}}});var Lt=Ce(Ct,[["__file","slider.vue"]]);const Yt=Ye(Lt);export{vt as E,Yt as a};
@@ -1 +1 @@
1
- import{S as w,d as L,c as d,b as S,w as D,o as Y,q as i,H as v,E as T,U as Z,u as a,Q as u,x as c,y as p,V as y,J as r,F as E,C as _,z as F,R as x,M as ee,n as ae,W as O}from"./vendor-vue-C5BV5QrY.js";import{J as N,K as V,L as C,M as P,U as B,H as ie,N as g,I as te,y as ne,O as se,z as oe,P as le,Q as ce,R as m,G as re,S as ue,T as de,A as ve}from"./index-BTvg_L_n.js";import{i as fe}from"./validator-DSbDxG8s.js";import{u as pe}from"./index-C3K3RvIl.js";import{u as me,a as he}from"./use-form-item-DGwoVBkX.js";const ye=ie({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:fe},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:g},activeActionIcon:{type:g},activeIcon:{type:g},inactiveIcon:{type:g},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:te(Function)},id:String,tabindex:{type:[String,Number]},...pe(["ariaLabel"])}),be={[B]:o=>V(o)||w(o)||C(o),[P]:o=>V(o)||w(o)||C(o),[N]:o=>V(o)||w(o)||C(o)},U="ElSwitch",Ie=L({name:U}),ke=L({...Ie,props:ye,emits:be,setup(o,{expose:H,emit:f}){const n=o,{formItem:b}=me(),R=se(),t=oe("switch"),{inputId:G}=he(n,{formItemContext:b}),I=le(d(()=>n.loading)),A=S(n.modelValue!==!1),h=S(),J=S(),Q=d(()=>[t.b(),t.m(R.value),t.is("disabled",I.value),t.is("checked",s.value)]),W=d(()=>[t.e("label"),t.em("label","left"),t.is("active",!s.value)]),$=d(()=>[t.e("label"),t.em("label","right"),t.is("active",s.value)]),q=d(()=>({width:ue(n.width)}));D(()=>n.modelValue,()=>{A.value=!0});const z=d(()=>A.value?n.modelValue:!1),s=d(()=>z.value===n.activeValue);[n.activeValue,n.inactiveValue].includes(z.value)||(f(B,n.inactiveValue),f(P,n.inactiveValue),f(N,n.inactiveValue)),D(s,e=>{var l;h.value.checked=e,n.validateEvent&&((l=b?.validate)==null||l.call(b,"change").catch(X=>ce()))});const k=()=>{const e=s.value?n.inactiveValue:n.activeValue;f(B,e),f(P,e),f(N,e),ae(()=>{h.value.checked=s.value})},K=()=>{if(I.value)return;const{beforeChange:e}=n;if(!e){k();return}const l=e();[O(l),V(l)].includes(!0)||de(U,"beforeChange must return type `Promise<boolean>` or `boolean`"),O(l)?l.then(M=>{M&&k()}).catch(M=>{}):l&&k()},j=()=>{var e,l;(l=(e=h.value)==null?void 0:e.focus)==null||l.call(e)};return Y(()=>{h.value.checked=s.value}),H({focus:j,checked:s}),(e,l)=>(i(),v("div",{class:u(a(Q)),onClick:ee(K,["prevent"])},[T("input",{id:a(G),ref_key:"input",ref:h,class:u(a(t).e("input")),type:"checkbox",role:"switch","aria-checked":a(s),"aria-disabled":a(I),"aria-label":e.ariaLabel,name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:a(I),tabindex:e.tabindex,onChange:k,onKeydown:Z(K,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!e.inlinePrompt&&(e.inactiveIcon||e.inactiveText)?(i(),v("span",{key:0,class:u(a(W))},[e.inactiveIcon?(i(),c(a(m),{key:0},{default:p(()=>[(i(),c(y(e.inactiveIcon)))]),_:1})):r("v-if",!0),!e.inactiveIcon&&e.inactiveText?(i(),v("span",{key:1,"aria-hidden":a(s)},E(e.inactiveText),9,["aria-hidden"])):r("v-if",!0)],2)):r("v-if",!0),T("span",{ref_key:"core",ref:J,class:u(a(t).e("core")),style:x(a(q))},[e.inlinePrompt?(i(),v("div",{key:0,class:u(a(t).e("inner"))},[e.activeIcon||e.inactiveIcon?(i(),c(a(m),{key:0,class:u(a(t).is("icon"))},{default:p(()=>[(i(),c(y(a(s)?e.activeIcon:e.inactiveIcon)))]),_:1},8,["class"])):e.activeText||e.inactiveText?(i(),v("span",{key:1,class:u(a(t).is("text")),"aria-hidden":!a(s)},E(a(s)?e.activeText:e.inactiveText),11,["aria-hidden"])):r("v-if",!0)],2)):r("v-if",!0),T("div",{class:u(a(t).e("action"))},[e.loading?(i(),c(a(m),{key:0,class:u(a(t).is("loading"))},{default:p(()=>[_(a(re))]),_:1},8,["class"])):a(s)?F(e.$slots,"active-action",{key:1},()=>[e.activeActionIcon?(i(),c(a(m),{key:0},{default:p(()=>[(i(),c(y(e.activeActionIcon)))]),_:1})):r("v-if",!0)]):a(s)?r("v-if",!0):F(e.$slots,"inactive-action",{key:2},()=>[e.inactiveActionIcon?(i(),c(a(m),{key:0},{default:p(()=>[(i(),c(y(e.inactiveActionIcon)))]),_:1})):r("v-if",!0)])],2)],6),!e.inlinePrompt&&(e.activeIcon||e.activeText)?(i(),v("span",{key:1,class:u(a($))},[e.activeIcon?(i(),c(a(m),{key:0},{default:p(()=>[(i(),c(y(e.activeIcon)))]),_:1})):r("v-if",!0),!e.activeIcon&&e.activeText?(i(),v("span",{key:1,"aria-hidden":!a(s)},E(e.activeText),9,["aria-hidden"])):r("v-if",!0)],2)):r("v-if",!0)],10,["onClick"]))}});var ge=ne(ke,[["__file","switch.vue"]]);const Ce=ve(ge);export{Ce as E};
1
+ import{S as w,d as L,c as d,b as S,w as D,o as Y,q as i,H as v,E as T,U as Z,u as a,Q as u,x as c,y as p,V as y,J as r,F as E,C as _,z as F,R as x,M as ee,n as ae,W as O}from"./vendor-vue-C5BV5QrY.js";import{J as N,K as V,L as C,M as P,U as B,H as ie,N as g,I as te,y as ne,O as se,z as oe,P as le,Q as ce,R as m,G as re,S as ue,T as de,A as ve}from"./index-CF16UMDY.js";import{i as fe}from"./validator-BigKU98Y.js";import{u as pe}from"./index-x0JegZp0.js";import{u as me,a as he}from"./use-form-item-DgeeEPic.js";const ye=ie({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:fe},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:g},activeActionIcon:{type:g},activeIcon:{type:g},inactiveIcon:{type:g},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:te(Function)},id:String,tabindex:{type:[String,Number]},...pe(["ariaLabel"])}),be={[B]:o=>V(o)||w(o)||C(o),[P]:o=>V(o)||w(o)||C(o),[N]:o=>V(o)||w(o)||C(o)},U="ElSwitch",Ie=L({name:U}),ke=L({...Ie,props:ye,emits:be,setup(o,{expose:H,emit:f}){const n=o,{formItem:b}=me(),R=se(),t=oe("switch"),{inputId:G}=he(n,{formItemContext:b}),I=le(d(()=>n.loading)),A=S(n.modelValue!==!1),h=S(),J=S(),Q=d(()=>[t.b(),t.m(R.value),t.is("disabled",I.value),t.is("checked",s.value)]),W=d(()=>[t.e("label"),t.em("label","left"),t.is("active",!s.value)]),$=d(()=>[t.e("label"),t.em("label","right"),t.is("active",s.value)]),q=d(()=>({width:ue(n.width)}));D(()=>n.modelValue,()=>{A.value=!0});const z=d(()=>A.value?n.modelValue:!1),s=d(()=>z.value===n.activeValue);[n.activeValue,n.inactiveValue].includes(z.value)||(f(B,n.inactiveValue),f(P,n.inactiveValue),f(N,n.inactiveValue)),D(s,e=>{var l;h.value.checked=e,n.validateEvent&&((l=b?.validate)==null||l.call(b,"change").catch(X=>ce()))});const k=()=>{const e=s.value?n.inactiveValue:n.activeValue;f(B,e),f(P,e),f(N,e),ae(()=>{h.value.checked=s.value})},K=()=>{if(I.value)return;const{beforeChange:e}=n;if(!e){k();return}const l=e();[O(l),V(l)].includes(!0)||de(U,"beforeChange must return type `Promise<boolean>` or `boolean`"),O(l)?l.then(M=>{M&&k()}).catch(M=>{}):l&&k()},j=()=>{var e,l;(l=(e=h.value)==null?void 0:e.focus)==null||l.call(e)};return Y(()=>{h.value.checked=s.value}),H({focus:j,checked:s}),(e,l)=>(i(),v("div",{class:u(a(Q)),onClick:ee(K,["prevent"])},[T("input",{id:a(G),ref_key:"input",ref:h,class:u(a(t).e("input")),type:"checkbox",role:"switch","aria-checked":a(s),"aria-disabled":a(I),"aria-label":e.ariaLabel,name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:a(I),tabindex:e.tabindex,onChange:k,onKeydown:Z(K,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!e.inlinePrompt&&(e.inactiveIcon||e.inactiveText)?(i(),v("span",{key:0,class:u(a(W))},[e.inactiveIcon?(i(),c(a(m),{key:0},{default:p(()=>[(i(),c(y(e.inactiveIcon)))]),_:1})):r("v-if",!0),!e.inactiveIcon&&e.inactiveText?(i(),v("span",{key:1,"aria-hidden":a(s)},E(e.inactiveText),9,["aria-hidden"])):r("v-if",!0)],2)):r("v-if",!0),T("span",{ref_key:"core",ref:J,class:u(a(t).e("core")),style:x(a(q))},[e.inlinePrompt?(i(),v("div",{key:0,class:u(a(t).e("inner"))},[e.activeIcon||e.inactiveIcon?(i(),c(a(m),{key:0,class:u(a(t).is("icon"))},{default:p(()=>[(i(),c(y(a(s)?e.activeIcon:e.inactiveIcon)))]),_:1},8,["class"])):e.activeText||e.inactiveText?(i(),v("span",{key:1,class:u(a(t).is("text")),"aria-hidden":!a(s)},E(a(s)?e.activeText:e.inactiveText),11,["aria-hidden"])):r("v-if",!0)],2)):r("v-if",!0),T("div",{class:u(a(t).e("action"))},[e.loading?(i(),c(a(m),{key:0,class:u(a(t).is("loading"))},{default:p(()=>[_(a(re))]),_:1},8,["class"])):a(s)?F(e.$slots,"active-action",{key:1},()=>[e.activeActionIcon?(i(),c(a(m),{key:0},{default:p(()=>[(i(),c(y(e.activeActionIcon)))]),_:1})):r("v-if",!0)]):a(s)?r("v-if",!0):F(e.$slots,"inactive-action",{key:2},()=>[e.inactiveActionIcon?(i(),c(a(m),{key:0},{default:p(()=>[(i(),c(y(e.inactiveActionIcon)))]),_:1})):r("v-if",!0)])],2)],6),!e.inlinePrompt&&(e.activeIcon||e.activeText)?(i(),v("span",{key:1,class:u(a($))},[e.activeIcon?(i(),c(a(m),{key:0},{default:p(()=>[(i(),c(y(e.activeIcon)))]),_:1})):r("v-if",!0),!e.activeIcon&&e.activeText?(i(),v("span",{key:1,"aria-hidden":!a(s)},E(e.activeText),9,["aria-hidden"])):r("v-if",!0)],2)):r("v-if",!0)],10,["onClick"]))}});var ge=ne(ke,[["__file","switch.vue"]]);const Ce=ve(ge);export{Ce as E};
@@ -1 +1 @@
1
- import{ao as o,a6 as f,aI as g,aq as b,aJ as k}from"./index-BTvg_L_n.js";import{s as S}from"./service-CJVkCidP.js";import{s as w}from"./seedream-C0UjLWbl.js";import{m as C}from"./merge-C5jDS2au.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";const I=({commit:t})=>{t("resetAll")},$=async({commit:t,dispatch:e},s)=>{if(console.debug("set application",s),t("setApplication",s),!s){console.debug("application is null, return");return}const a=s?.credentials?.find(n=>n?.host===window.location.origin);a?(console.debug("credential exists, set credential",a),t("setCredential",a)):(console.debug("credential not exists, start to create credential for application",s),await e("createCredential"))},E=async({commit:t},e)=>{console.debug("set applications",e),t("setApplications",e)},y=async({commit:t},e)=>{console.debug("set service",e),t("setService",e)},h=async({commit:t},e)=>{console.debug("set credential",e),t("setCredential",e)},x=async({commit:t,state:e})=>{const s=e.application;if(console.debug("prepare to create credential for application",s),!s){console.error("Application not found");return}console.debug("creating create credential for application",s);const{data:a}=await b.create({application_id:s?.id,host:window.location.origin});return console.debug("created credential success",a),t("setCredential",a),console.debug("end createCredential"),a},O=async({commit:t,state:e})=>{e.status.getService=o.Request;try{const{data:s}=await S.get(g);return e.status.getService=o.Success,t("setService",s),s}catch{e.status.getService=o.Error,t("setService",void 0)}},R=async({commit:t,state:e,rootState:s})=>{console.debug("start to get applications for seedream"),e.status.getApplications=o.Request;try{const{data:a}=await f.getAll({user_id:s?.user?.id,service_id:g});return e.status.getApplications=o.Success,t("setApplications",a.items),a.items}catch(a){console.error("get applications failed",a),e.status.getApplications=o.Error,t("setApplications",void 0),t("setApplication",void 0)}},_=({commit:t},e)=>{t("setConfig",e)},q=({commit:t},e)=>{t("setTasks",e)},P=({commit:t},e)=>{t("setTasksItems",e)},D=({commit:t},e)=>{t("setTasksTotal",e)},J=({commit:t},e)=>{t("setTasksActive",e)},L=async({commit:t,state:e,rootState:s},{offset:a,limit:n,createdAtMin:m,createdAtMax:T})=>(e.status.getTasks=o.Request,new Promise((v,r)=>{console.debug("start to get tasks",a,n);const l=e.credential;console.debug("current credential",l);const d=l?.token;if(!d)return e.status.getTasks=o.Error,r("no token");w.tasks({userId:s?.user?.id,offset:a,limit:n,createdAtMin:m,createdAtMax:T,type:"images"},{token:d}).then(i=>{console.debug("get images tasks success",i.data.items);const p=e?.tasks?.items||[];console.debug("existing items",p);const u=i.data.items||[];console.debug("new items",u);const A=C(p,u);t("setTasksItems",A),t("setTasksTotal",i.data.count),e.status.getTasks=o.Success,v(i.data.items)}).catch(i=>(e.status.getTasks=o.Error,r(i)))})),M={createCredential:x,setService:y,getService:O,resetAll:I,setCredential:h,setConfig:_,setApplications:E,setApplication:$,getApplications:R,setTasks:q,setTasksItems:P,setTasksTotal:D,setTasksActive:J,getTasks:L},c={items:void 0,total:void 0,active:void 0},V=t=>{Object.assign(t,k())},j=(t,e)=>{t.service=e},z=(t,e)=>{t.credential=e},B=(t,e)=>{t.application=e},F=(t,e)=>{t.applications=e},G=(t,e)=>{t.config=e},H=(t,e)=>{const s={...t.tasks||c,items:e};t.tasks=s},K=(t,e)=>{const s={...t.tasks||c,total:e};t.tasks=s},N=(t,e)=>{const s={...t.tasks||c,active:e};t.tasks=s},Q=(t,e)=>{t.tasks=e},U={setTasks:Q,setApplication:B,setApplications:F,setConfig:G,setCredential:z,setService:j,setTasksActive:N,setTasksItems:H,setTasksTotal:K,resetAll:V},ot={namespaced:!0,state:k,mutations:U,actions:M};export{ot as default,ot as seedream};
1
+ import{ao as o,a6 as f,aI as g,aq as b,aJ as k}from"./index-CF16UMDY.js";import{s as S}from"./service-CHaGU8pS.js";import{s as w}from"./seedream-Cgc2RR0Y.js";import{m as C}from"./merge-C5jDS2au.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";const I=({commit:t})=>{t("resetAll")},$=async({commit:t,dispatch:e},s)=>{if(console.debug("set application",s),t("setApplication",s),!s){console.debug("application is null, return");return}const a=s?.credentials?.find(n=>n?.host===window.location.origin);a?(console.debug("credential exists, set credential",a),t("setCredential",a)):(console.debug("credential not exists, start to create credential for application",s),await e("createCredential"))},E=async({commit:t},e)=>{console.debug("set applications",e),t("setApplications",e)},y=async({commit:t},e)=>{console.debug("set service",e),t("setService",e)},h=async({commit:t},e)=>{console.debug("set credential",e),t("setCredential",e)},x=async({commit:t,state:e})=>{const s=e.application;if(console.debug("prepare to create credential for application",s),!s){console.error("Application not found");return}console.debug("creating create credential for application",s);const{data:a}=await b.create({application_id:s?.id,host:window.location.origin});return console.debug("created credential success",a),t("setCredential",a),console.debug("end createCredential"),a},O=async({commit:t,state:e})=>{e.status.getService=o.Request;try{const{data:s}=await S.get(g);return e.status.getService=o.Success,t("setService",s),s}catch{e.status.getService=o.Error,t("setService",void 0)}},R=async({commit:t,state:e,rootState:s})=>{console.debug("start to get applications for seedream"),e.status.getApplications=o.Request;try{const{data:a}=await f.getAll({user_id:s?.user?.id,service_id:g});return e.status.getApplications=o.Success,t("setApplications",a.items),a.items}catch(a){console.error("get applications failed",a),e.status.getApplications=o.Error,t("setApplications",void 0),t("setApplication",void 0)}},_=({commit:t},e)=>{t("setConfig",e)},q=({commit:t},e)=>{t("setTasks",e)},P=({commit:t},e)=>{t("setTasksItems",e)},D=({commit:t},e)=>{t("setTasksTotal",e)},J=({commit:t},e)=>{t("setTasksActive",e)},L=async({commit:t,state:e,rootState:s},{offset:a,limit:n,createdAtMin:m,createdAtMax:T})=>(e.status.getTasks=o.Request,new Promise((v,r)=>{console.debug("start to get tasks",a,n);const l=e.credential;console.debug("current credential",l);const d=l?.token;if(!d)return e.status.getTasks=o.Error,r("no token");w.tasks({userId:s?.user?.id,offset:a,limit:n,createdAtMin:m,createdAtMax:T,type:"images"},{token:d}).then(i=>{console.debug("get images tasks success",i.data.items);const p=e?.tasks?.items||[];console.debug("existing items",p);const u=i.data.items||[];console.debug("new items",u);const A=C(p,u);t("setTasksItems",A),t("setTasksTotal",i.data.count),e.status.getTasks=o.Success,v(i.data.items)}).catch(i=>(e.status.getTasks=o.Error,r(i)))})),M={createCredential:x,setService:y,getService:O,resetAll:I,setCredential:h,setConfig:_,setApplications:E,setApplication:$,getApplications:R,setTasks:q,setTasksItems:P,setTasksTotal:D,setTasksActive:J,getTasks:L},c={items:void 0,total:void 0,active:void 0},V=t=>{Object.assign(t,k())},j=(t,e)=>{t.service=e},z=(t,e)=>{t.credential=e},B=(t,e)=>{t.application=e},F=(t,e)=>{t.applications=e},G=(t,e)=>{t.config=e},H=(t,e)=>{const s={...t.tasks||c,items:e};t.tasks=s},K=(t,e)=>{const s={...t.tasks||c,total:e};t.tasks=s},N=(t,e)=>{const s={...t.tasks||c,active:e};t.tasks=s},Q=(t,e)=>{t.tasks=e},U={setTasks:Q,setApplication:B,setApplications:F,setConfig:G,setCredential:z,setService:j,setTasksActive:N,setTasksItems:H,setTasksTotal:K,resetAll:V},ot={namespaced:!0,state:k,mutations:U,actions:M};export{ot as default,ot as seedream};
@@ -1 +1 @@
1
- import{r as V}from"./index-CxUeIbEw.js";import{P as K,T as j}from"./index.browser.esm-BUOM0pe_.js";import{g as X}from"./vendor-dayjs-Cvgzdobq.js";import{h as H,r as R,k as Y,e as v,m as Q,q as F}from"./signer-Bt6hppoz.js";import"./index-BTvg_L_n.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-vue-router-Bl-Po99g.js";import"./index-CVHPJfCy.js";var c;(function(t){t.PROJECT_APPROVED="PROJECT_APPROVED",t.HANDSHAKE="HANDSHAKE",t.HANDSHAKE_ACK="HANDSHAKE_ACK",t.SIGNED_TRANSACTION="SIGNED_TRANSACTION",t.SIGNED_PARTIAL_TRANSACTION="SIGNED_PARTIAL_TRANSACTION",t.FAILED_TO_SIGN_TRANSACTION="FAILED_TO_SIGN_TRANSACTION",t.TRANSACTION_DENIED="TRANSACTION_DENIED",t.SOLANA_WALLET_ADAPTER_APPROVED="SOLANA_WALLET_ADAPTER_APPROVED",t.SOLANA_WALLET_ADAPTER_DENIED="SOLANA_WALLET_ADAPTER_DENIED",t.POPUP_CLOSED="POPUP_CLOSED",t.TRANSACTION_SIGNATURE_NEEDED="TRANSACTION_SIGNATURE_NEEDED",t.TRANSACTION_SIGNATURE_NEEDED_RESPONSE="TRANSACTION_SIGNATURE_NEEDED_RESPONSE",t.AUTH_LOADED="AUTH_LOADED",t.MESSAGE_SIGNATURE_NEEDED="MESSAGE_SIGNATURE_NEEDED",t.MESSAGE_SIGNATURE_NEEDED_RESPONSE="MESSAGE_SIGNATURE_NEEDED_RESPONSE",t.ONRAMP_FULFILLMENT_COMPLETE="ONRAMP_FULFILLMENT_COMPLETE",t.ONRAMP_REJECTED="ONRAMP_REJECTED"})(c||(c={}));var b;(function(t){t.UNKNOWN="UNKNOWN",t.REACT_SDK="REACT_SDK",t.SOLANA_WALLET_ADAPTER="SOLANA_WALLET_ADAPTER"})(b||(b={}));class Z{constructor(n,e){this.validatedOrigin=n,this.targetWindow=e,this.handlers=new Map}off(n,e){const r=this.handlers.get(n);r?.delete(e)}on(n,e){var r;const s=(r=this.handlers.get(n))!==null&&r!==void 0?r:new Set;s.add(e),this.handlers.set(n,s)}send({event:n,payload:e}){this.targetWindow.postMessage({event:n,payload:e},this.validatedOrigin)}runHandlersForEvent(n,e){const r=this.handlers.get(n);if(r)for(const s of r)s(e)}resetHandlers(){this.handlers.clear()}export(){return{off:this.off.bind(this),on:this.on.bind(this),send:this.send.bind(this),validatedOrigin:this.validatedOrigin}}}const ee="https://fractal.is",ne="https://www.fractal.is",te=400,P=600;function re(t){return t===ne||t===ee}const ie="fractal:approval:popup",oe=["resizable","scrollbars=1","status=1"];function se({left:t=0,scope:n=window,top:e=0,width:r=P,height:s=P,url:l}){return n.open(l,ie,ae({height:s,left:t,top:e,width:r}))}function ae({height:t,left:n,top:e,width:r}){return["popup",`left=${n}`,`top=${e}`,`width=${r}`,`height=${t}`,...oe].join(",")}class le{constructor(n){this.platform=n,this.connection=null,this.popupWindow=null,this.handleMessage=e=>{var r,s;if(!re(e.origin))return;const l=e.origin;if(this.popupWindow){if(e.data.event===c.HANDSHAKE&&!this.connection){if(!this.verifyAndResetNonce((r=e.data.payload)===null||r===void 0?void 0:r.nonce))return;this.popupWindow.postMessage({event:c.HANDSHAKE_ACK,payload:{platform:this.platform}},l),this.connection=new Z(l,this.popupWindow),(s=this.connectionUpdatedCallback)===null||s===void 0||s.call(this,this.connection)}this.connection&&(this.connection.runHandlersForEvent(e.data.event,e.data.payload),e.data.event===c.POPUP_CLOSED&&this.connection&&(this.resetConnection(),this.popupWindow=null))}}}initialize(){return window.addEventListener("message",this.handleMessage),this}tearDown(){return window.removeEventListener("message",this.handleMessage),this.resetConnection(),this}async open({url:n,widthPx:e=te,heightPx:r=P,nonce:s}){var l;if(!((l=this.popupWindow)===null||l===void 0)&&l.closed&&this.resetConnectionAndPopupWindow(),this.popupWindow)return;this.initialize(),s&&(this.nonce=s);const u=window.screenX+(window.innerWidth-e)/2,d=window.screenY+(window.innerHeight-r)/2;this.popupWindow=se({height:r,left:u,top:d,url:typeof n=="string"?n:void 0,width:e}),n instanceof Promise&&this.setUrl(await n)}close(){this.popupWindow&&(this.popupWindow.close(),this.resetConnectionAndPopupWindow())}onConnectionUpdated(n){return this.connectionUpdatedCallback=n,this}getConnection(){return this.connection}setUrl(n){this.popupWindow&&(this.popupWindow.location=n)}resetConnectionAndPopupWindow(){this.resetConnection(),this.popupWindow=null}resetConnection(){var n,e;(n=this.connection)===null||n===void 0||n.resetHandlers(),this.connection=null,(e=this.connectionUpdatedCallback)===null||e===void 0||e.call(this,this.connection)}verifyAndResetNonce(n){if(!this.nonce)return!0;const e=n===this.nonce;return e&&(this.nonce=void 0),e}}V();function m(t){return!(t===null||typeof t!="object")}function ce(t){return!(!m(t)||!("solanaPublicKey"in t)||typeof t.solanaPublicKey!="string")}function de(t){return!m(t)||!("signedB58Transactions"in t)||!Array.isArray(t.signedB58Transactions)?!1:t.signedB58Transactions.every(n=>typeof n=="string")}function he(t){return!m(t)||!("decodedSignature"in t)?!1:typeof t.decodedSignature=="string"}var M,$;function Ae(){if($)return M;$=1;function t(n){if(n.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var s=0;s<n.length;s++){var l=n.charAt(s),u=l.charCodeAt(0);if(e[u]!==255)throw new TypeError(l+" is ambiguous");e[u]=s}var d=n.length,i=n.charAt(0),o=Math.log(d)/Math.log(256),h=Math.log(256)/Math.log(d);function D(a){if(a instanceof Uint8Array||(ArrayBuffer.isView(a)?a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength):Array.isArray(a)&&(a=Uint8Array.from(a))),!(a instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(a.length===0)return"";for(var p=0,N=0,f=0,g=a.length;f!==g&&a[f]===0;)f++,p++;for(var _=(g-f)*h+1>>>0,S=new Uint8Array(_);f!==g;){for(var A=a[f],w=0,T=_-1;(A!==0||w<N)&&T!==-1;T--,w++)A+=256*S[T]>>>0,S[T]=A%d>>>0,A=A/d>>>0;if(A!==0)throw new Error("Non-zero carry");N=w,f++}for(var E=_-N;E!==_&&S[E]===0;)E++;for(var O=i.repeat(p);E<_;++E)O+=n.charAt(S[E]);return O}function G(a){if(typeof a!="string")throw new TypeError("Expected String");if(a.length===0)return new Uint8Array;for(var p=0,N=0,f=0;a[p]===i;)N++,p++;for(var g=(a.length-p)*o+1>>>0,_=new Uint8Array(g);a[p];){var S=a.charCodeAt(p);if(S>255)return;var A=e[S];if(A===255)return;for(var w=0,T=g-1;(A!==0||w<f)&&T!==-1;T--,w++)A+=d*_[T]>>>0,_[T]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");f=w,p++}for(var E=g-f;E!==g&&_[E]===0;)E++;for(var O=new Uint8Array(N+(g-E)),J=N;E!==g;)O[J++]=_[E++];return O}function q(a){var p=G(a);if(p)return p;throw new Error("Non-base"+d+" character")}return{encode:D,decodeUnsafe:G,decode:q}}return M=t,M}var C,x;function Ee(){return x||(x=1,C=Ae()("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")),C}var pe=Ee();const B=X(pe);function I(){return`${U()}${U()}${U()}`}function U(){return(Math.random()+1).toString(36).substring(7)}const L="Unknown Error",W="https://fractal.is",ue=`${W}/wallet-adapter/approve`,fe=`${W}/wallet-adapter/sign`,ge=`${W}/wallet-adapter/sign/message`,k=P,z=850,y="RdxqNYxF";class ve{constructor(){this.popupManager=new le(b.SOLANA_WALLET_ADAPTER),this.publicKey=null,this.connecting=!1}getPublicKey(){return this.publicKey}async connect(){let n,e;const r=window.localStorage.getItem(y);if(r)return this.publicKey=new K(r),Promise.resolve();const s=I();this.popupManager.open({nonce:s,url:`${ue}/${s}`});const l=i=>{if(!ce(i)){e(new v(`Malformed payload when setting up connection. Expected { solanaPublicKey: string } but received ${JSON.stringify(i)}`)),this.popupManager.close();return}try{this.publicKey=new K(i.solanaPublicKey),window.localStorage.setItem(y,i.solanaPublicKey),n()}catch(o){const h=new Q(o instanceof Error?o.message:L,o);e(h)}this.popupManager.close()},u=()=>{e(new v("The user denied the connection.")),this.popupManager.close()},d=()=>{e(new v("The user denied the connection.")),this.popupManager.close()};return this.popupManager.onConnectionUpdated(i=>{i&&(i.on(c.SOLANA_WALLET_ADAPTER_APPROVED,l),i.on(c.SOLANA_WALLET_ADAPTER_DENIED,u),i.on(c.POPUP_CLOSED,d))}),new Promise((i,o)=>{n=i,e=o})}async disconnect(){this.popupManager.tearDown(),this.publicKey=null,window.localStorage.removeItem(y)}async signTransaction(n){try{return this.checkWalletReadiness(),(await this.signTransactions([n]))[0]}catch(e){let r=e;throw e instanceof H||(r=new R(e instanceof Error?e.message:L,e)),r}}async signAllTransactions(n){try{return this.checkWalletReadiness(),await this.signTransactions(n)}catch(e){let r=e;throw e instanceof H||(r=new R(e instanceof Error?e.message:L,e)),r}}async signMessage(n){const e=new TextDecoder().decode(n);let r,s;const l=o=>{if(!he(o)){const D=new F(`Malformed payload when signing message. Expected { decodedSignature: string } but received ${JSON.stringify(o)}`);s(D),this.popupManager.close();return}const h=Uint8Array.from(o.decodedSignature.split(",").map(D=>Number(D)));r(h),this.popupManager.close()},u=()=>{s(new F("The user did not approve the message")),this.popupManager.close()},d=()=>{var o;const h={decodedMessage:e};(o=this.popupManager.getConnection())===null||o===void 0||o.send({event:c.MESSAGE_SIGNATURE_NEEDED,payload:h})},i=I();return this.popupManager.open({heightPx:Math.max(k,Math.floor(window.innerHeight*.8)),nonce:i,url:`${ge}/${i}`,widthPx:Math.min(z,Math.floor(window.innerWidth*.8))}),this.popupManager.onConnectionUpdated(o=>{o&&(o.on(c.MESSAGE_SIGNATURE_NEEDED_RESPONSE,l),o.on(c.TRANSACTION_DENIED,u),o.on(c.POPUP_CLOSED,u),o.on(c.AUTH_LOADED,d))}),new Promise((o,h)=>{r=o,s=h})}async signTransactions(n){let e,r;const s=i=>{if(!de(i)){const h=new R(`Malformed payload when signing transactions. Expected { signedB58Transactions: string[] } but received ${JSON.stringify(i)}`);r(h),this.popupManager.close();return}const o=i.signedB58Transactions.map(h=>j.from(B.decode(h)));e(o),this.popupManager.close()},l=()=>{r(new R("The user did not approve the transaction")),this.popupManager.close()},u=()=>{var i;const o={unsignedB58Transactions:n.map(h=>B.encode(h.serializeMessage()))};(i=this.popupManager.getConnection())===null||i===void 0||i.send({event:c.TRANSACTION_SIGNATURE_NEEDED,payload:o})},d=I();return this.popupManager.open({heightPx:Math.max(k,Math.floor(window.innerHeight*.8)),nonce:d,url:`${fe}/${d}`,widthPx:Math.min(z,Math.floor(window.innerWidth*.8))}),this.popupManager.onConnectionUpdated(i=>{i&&(i.on(c.TRANSACTION_SIGNATURE_NEEDED_RESPONSE,s),i.on(c.TRANSACTION_DENIED,l),i.on(c.POPUP_CLOSED,l),i.on(c.AUTH_LOADED,u))}),new Promise((i,o)=>{e=i,r=o})}checkWalletReadiness(){if(this.publicKey===null)throw new Y("`publicKey` is null. Did you forget to call `.connect()`?")}}export{ve as FractalWalletAdapterImpl};
1
+ import{r as V}from"./index-CxUeIbEw.js";import{P as K,T as j}from"./index.browser.esm-Qz2ostcl.js";import{g as X}from"./vendor-dayjs-Cvgzdobq.js";import{h as H,r as R,k as Y,e as v,m as Q,q as F}from"./signer-Bt6hppoz.js";import"./index-CF16UMDY.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-vue-router-Bl-Po99g.js";import"./index-CVHPJfCy.js";var c;(function(t){t.PROJECT_APPROVED="PROJECT_APPROVED",t.HANDSHAKE="HANDSHAKE",t.HANDSHAKE_ACK="HANDSHAKE_ACK",t.SIGNED_TRANSACTION="SIGNED_TRANSACTION",t.SIGNED_PARTIAL_TRANSACTION="SIGNED_PARTIAL_TRANSACTION",t.FAILED_TO_SIGN_TRANSACTION="FAILED_TO_SIGN_TRANSACTION",t.TRANSACTION_DENIED="TRANSACTION_DENIED",t.SOLANA_WALLET_ADAPTER_APPROVED="SOLANA_WALLET_ADAPTER_APPROVED",t.SOLANA_WALLET_ADAPTER_DENIED="SOLANA_WALLET_ADAPTER_DENIED",t.POPUP_CLOSED="POPUP_CLOSED",t.TRANSACTION_SIGNATURE_NEEDED="TRANSACTION_SIGNATURE_NEEDED",t.TRANSACTION_SIGNATURE_NEEDED_RESPONSE="TRANSACTION_SIGNATURE_NEEDED_RESPONSE",t.AUTH_LOADED="AUTH_LOADED",t.MESSAGE_SIGNATURE_NEEDED="MESSAGE_SIGNATURE_NEEDED",t.MESSAGE_SIGNATURE_NEEDED_RESPONSE="MESSAGE_SIGNATURE_NEEDED_RESPONSE",t.ONRAMP_FULFILLMENT_COMPLETE="ONRAMP_FULFILLMENT_COMPLETE",t.ONRAMP_REJECTED="ONRAMP_REJECTED"})(c||(c={}));var b;(function(t){t.UNKNOWN="UNKNOWN",t.REACT_SDK="REACT_SDK",t.SOLANA_WALLET_ADAPTER="SOLANA_WALLET_ADAPTER"})(b||(b={}));class Z{constructor(n,e){this.validatedOrigin=n,this.targetWindow=e,this.handlers=new Map}off(n,e){const r=this.handlers.get(n);r?.delete(e)}on(n,e){var r;const s=(r=this.handlers.get(n))!==null&&r!==void 0?r:new Set;s.add(e),this.handlers.set(n,s)}send({event:n,payload:e}){this.targetWindow.postMessage({event:n,payload:e},this.validatedOrigin)}runHandlersForEvent(n,e){const r=this.handlers.get(n);if(r)for(const s of r)s(e)}resetHandlers(){this.handlers.clear()}export(){return{off:this.off.bind(this),on:this.on.bind(this),send:this.send.bind(this),validatedOrigin:this.validatedOrigin}}}const ee="https://fractal.is",ne="https://www.fractal.is",te=400,P=600;function re(t){return t===ne||t===ee}const ie="fractal:approval:popup",oe=["resizable","scrollbars=1","status=1"];function se({left:t=0,scope:n=window,top:e=0,width:r=P,height:s=P,url:l}){return n.open(l,ie,ae({height:s,left:t,top:e,width:r}))}function ae({height:t,left:n,top:e,width:r}){return["popup",`left=${n}`,`top=${e}`,`width=${r}`,`height=${t}`,...oe].join(",")}class le{constructor(n){this.platform=n,this.connection=null,this.popupWindow=null,this.handleMessage=e=>{var r,s;if(!re(e.origin))return;const l=e.origin;if(this.popupWindow){if(e.data.event===c.HANDSHAKE&&!this.connection){if(!this.verifyAndResetNonce((r=e.data.payload)===null||r===void 0?void 0:r.nonce))return;this.popupWindow.postMessage({event:c.HANDSHAKE_ACK,payload:{platform:this.platform}},l),this.connection=new Z(l,this.popupWindow),(s=this.connectionUpdatedCallback)===null||s===void 0||s.call(this,this.connection)}this.connection&&(this.connection.runHandlersForEvent(e.data.event,e.data.payload),e.data.event===c.POPUP_CLOSED&&this.connection&&(this.resetConnection(),this.popupWindow=null))}}}initialize(){return window.addEventListener("message",this.handleMessage),this}tearDown(){return window.removeEventListener("message",this.handleMessage),this.resetConnection(),this}async open({url:n,widthPx:e=te,heightPx:r=P,nonce:s}){var l;if(!((l=this.popupWindow)===null||l===void 0)&&l.closed&&this.resetConnectionAndPopupWindow(),this.popupWindow)return;this.initialize(),s&&(this.nonce=s);const u=window.screenX+(window.innerWidth-e)/2,d=window.screenY+(window.innerHeight-r)/2;this.popupWindow=se({height:r,left:u,top:d,url:typeof n=="string"?n:void 0,width:e}),n instanceof Promise&&this.setUrl(await n)}close(){this.popupWindow&&(this.popupWindow.close(),this.resetConnectionAndPopupWindow())}onConnectionUpdated(n){return this.connectionUpdatedCallback=n,this}getConnection(){return this.connection}setUrl(n){this.popupWindow&&(this.popupWindow.location=n)}resetConnectionAndPopupWindow(){this.resetConnection(),this.popupWindow=null}resetConnection(){var n,e;(n=this.connection)===null||n===void 0||n.resetHandlers(),this.connection=null,(e=this.connectionUpdatedCallback)===null||e===void 0||e.call(this,this.connection)}verifyAndResetNonce(n){if(!this.nonce)return!0;const e=n===this.nonce;return e&&(this.nonce=void 0),e}}V();function m(t){return!(t===null||typeof t!="object")}function ce(t){return!(!m(t)||!("solanaPublicKey"in t)||typeof t.solanaPublicKey!="string")}function de(t){return!m(t)||!("signedB58Transactions"in t)||!Array.isArray(t.signedB58Transactions)?!1:t.signedB58Transactions.every(n=>typeof n=="string")}function he(t){return!m(t)||!("decodedSignature"in t)?!1:typeof t.decodedSignature=="string"}var M,$;function Ae(){if($)return M;$=1;function t(n){if(n.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var s=0;s<n.length;s++){var l=n.charAt(s),u=l.charCodeAt(0);if(e[u]!==255)throw new TypeError(l+" is ambiguous");e[u]=s}var d=n.length,i=n.charAt(0),o=Math.log(d)/Math.log(256),h=Math.log(256)/Math.log(d);function D(a){if(a instanceof Uint8Array||(ArrayBuffer.isView(a)?a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength):Array.isArray(a)&&(a=Uint8Array.from(a))),!(a instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(a.length===0)return"";for(var p=0,N=0,f=0,g=a.length;f!==g&&a[f]===0;)f++,p++;for(var _=(g-f)*h+1>>>0,S=new Uint8Array(_);f!==g;){for(var A=a[f],w=0,T=_-1;(A!==0||w<N)&&T!==-1;T--,w++)A+=256*S[T]>>>0,S[T]=A%d>>>0,A=A/d>>>0;if(A!==0)throw new Error("Non-zero carry");N=w,f++}for(var E=_-N;E!==_&&S[E]===0;)E++;for(var O=i.repeat(p);E<_;++E)O+=n.charAt(S[E]);return O}function G(a){if(typeof a!="string")throw new TypeError("Expected String");if(a.length===0)return new Uint8Array;for(var p=0,N=0,f=0;a[p]===i;)N++,p++;for(var g=(a.length-p)*o+1>>>0,_=new Uint8Array(g);a[p];){var S=a.charCodeAt(p);if(S>255)return;var A=e[S];if(A===255)return;for(var w=0,T=g-1;(A!==0||w<f)&&T!==-1;T--,w++)A+=d*_[T]>>>0,_[T]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");f=w,p++}for(var E=g-f;E!==g&&_[E]===0;)E++;for(var O=new Uint8Array(N+(g-E)),J=N;E!==g;)O[J++]=_[E++];return O}function q(a){var p=G(a);if(p)return p;throw new Error("Non-base"+d+" character")}return{encode:D,decodeUnsafe:G,decode:q}}return M=t,M}var C,x;function Ee(){return x||(x=1,C=Ae()("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")),C}var pe=Ee();const B=X(pe);function I(){return`${U()}${U()}${U()}`}function U(){return(Math.random()+1).toString(36).substring(7)}const L="Unknown Error",W="https://fractal.is",ue=`${W}/wallet-adapter/approve`,fe=`${W}/wallet-adapter/sign`,ge=`${W}/wallet-adapter/sign/message`,k=P,z=850,y="RdxqNYxF";class ve{constructor(){this.popupManager=new le(b.SOLANA_WALLET_ADAPTER),this.publicKey=null,this.connecting=!1}getPublicKey(){return this.publicKey}async connect(){let n,e;const r=window.localStorage.getItem(y);if(r)return this.publicKey=new K(r),Promise.resolve();const s=I();this.popupManager.open({nonce:s,url:`${ue}/${s}`});const l=i=>{if(!ce(i)){e(new v(`Malformed payload when setting up connection. Expected { solanaPublicKey: string } but received ${JSON.stringify(i)}`)),this.popupManager.close();return}try{this.publicKey=new K(i.solanaPublicKey),window.localStorage.setItem(y,i.solanaPublicKey),n()}catch(o){const h=new Q(o instanceof Error?o.message:L,o);e(h)}this.popupManager.close()},u=()=>{e(new v("The user denied the connection.")),this.popupManager.close()},d=()=>{e(new v("The user denied the connection.")),this.popupManager.close()};return this.popupManager.onConnectionUpdated(i=>{i&&(i.on(c.SOLANA_WALLET_ADAPTER_APPROVED,l),i.on(c.SOLANA_WALLET_ADAPTER_DENIED,u),i.on(c.POPUP_CLOSED,d))}),new Promise((i,o)=>{n=i,e=o})}async disconnect(){this.popupManager.tearDown(),this.publicKey=null,window.localStorage.removeItem(y)}async signTransaction(n){try{return this.checkWalletReadiness(),(await this.signTransactions([n]))[0]}catch(e){let r=e;throw e instanceof H||(r=new R(e instanceof Error?e.message:L,e)),r}}async signAllTransactions(n){try{return this.checkWalletReadiness(),await this.signTransactions(n)}catch(e){let r=e;throw e instanceof H||(r=new R(e instanceof Error?e.message:L,e)),r}}async signMessage(n){const e=new TextDecoder().decode(n);let r,s;const l=o=>{if(!he(o)){const D=new F(`Malformed payload when signing message. Expected { decodedSignature: string } but received ${JSON.stringify(o)}`);s(D),this.popupManager.close();return}const h=Uint8Array.from(o.decodedSignature.split(",").map(D=>Number(D)));r(h),this.popupManager.close()},u=()=>{s(new F("The user did not approve the message")),this.popupManager.close()},d=()=>{var o;const h={decodedMessage:e};(o=this.popupManager.getConnection())===null||o===void 0||o.send({event:c.MESSAGE_SIGNATURE_NEEDED,payload:h})},i=I();return this.popupManager.open({heightPx:Math.max(k,Math.floor(window.innerHeight*.8)),nonce:i,url:`${ge}/${i}`,widthPx:Math.min(z,Math.floor(window.innerWidth*.8))}),this.popupManager.onConnectionUpdated(o=>{o&&(o.on(c.MESSAGE_SIGNATURE_NEEDED_RESPONSE,l),o.on(c.TRANSACTION_DENIED,u),o.on(c.POPUP_CLOSED,u),o.on(c.AUTH_LOADED,d))}),new Promise((o,h)=>{r=o,s=h})}async signTransactions(n){let e,r;const s=i=>{if(!de(i)){const h=new R(`Malformed payload when signing transactions. Expected { signedB58Transactions: string[] } but received ${JSON.stringify(i)}`);r(h),this.popupManager.close();return}const o=i.signedB58Transactions.map(h=>j.from(B.decode(h)));e(o),this.popupManager.close()},l=()=>{r(new R("The user did not approve the transaction")),this.popupManager.close()},u=()=>{var i;const o={unsignedB58Transactions:n.map(h=>B.encode(h.serializeMessage()))};(i=this.popupManager.getConnection())===null||i===void 0||i.send({event:c.TRANSACTION_SIGNATURE_NEEDED,payload:o})},d=I();return this.popupManager.open({heightPx:Math.max(k,Math.floor(window.innerHeight*.8)),nonce:d,url:`${fe}/${d}`,widthPx:Math.min(z,Math.floor(window.innerWidth*.8))}),this.popupManager.onConnectionUpdated(i=>{i&&(i.on(c.TRANSACTION_SIGNATURE_NEEDED_RESPONSE,s),i.on(c.TRANSACTION_DENIED,l),i.on(c.POPUP_CLOSED,l),i.on(c.AUTH_LOADED,u))}),new Promise((i,o)=>{e=i,r=o})}checkWalletReadiness(){if(this.publicKey===null)throw new Y("`publicKey` is null. Did you forget to call `.connect()`?")}}export{ve as FractalWalletAdapterImpl};
@@ -1 +1 @@
1
- import{ao as i,a6 as g,ap as p,aq as v,ar as d}from"./index-BTvg_L_n.js";import{c as u}from"./chat-C7lnh45_.js";import{s as C}from"./service-CJVkCidP.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";import"./errorCode-Cqj9Td_Z.js";const f=({commit:t})=>{t("resetAll")},A=async({commit:t,dispatch:e},s)=>{if(console.debug("set application",s),t("setApplication",s),console.debug("application is set"),!s){console.debug("application is null, return");return}const o=s?.credentials?.find(n=>n?.host===window.location.origin);o?(console.debug("credential exists, set credential",o),t("setCredential",o)):(console.debug("credential not exists, start to create credential for application",s),await e("createCredential"))},b=async({commit:t},e)=>{console.debug("set applications for chat",e),t("setApplications",e)},h=async({commit:t},e)=>{console.debug("set service for chat",e),t("setService",e)},S=async({commit:t},e)=>{console.debug("set credential",e),t("setCredential",e)},m=async({commit:t,state:e})=>{const s=e.application;if(console.debug("prepare to create credential for application for chat",s),!s){console.error("Application not found");return}console.debug("creating create credential for application for chat",s);const{data:o}=await v.create({application_id:s?.id,host:window.location.origin});return console.debug("created credential success",o),t("setCredential",o),console.debug("end createCredential"),o},w=async({commit:t,state:e})=>{e.status.getService=i.Request;try{const{data:s}=await C.get(p);return e.status.getService=i.Success,t("setService",s),s}catch{e.status.getService=i.Error,t("setService",void 0)}},x=async({commit:t,state:e,rootState:s})=>{console.debug("start to get applications for chat"),e.status.getApplications=i.Request;try{const{data:o}=await g.getAll({user_id:s?.user?.id,service_id:p});return console.debug("get applications success for chat",o),e.status.getApplications=i.Success,t("setApplications",o.items),console.debug("set applications for chat",o.items),o.items}catch(o){console.error("get applications failed for chat",o),e.status.getApplications=i.Error,t("setApplications",void 0),t("setApplication",void 0)}},M=async({commit:t},e)=>{t("setModel",e)},$=async({commit:t},e)=>{t("setModelGroup",e)},G=async({commit:t,state:e},s)=>{console.debug("set conversation",s);const o=e.conversations||[],n=o?.findIndex(r=>r.id===s.id);n>-1?o[n]=s:o?.unshift(s),t("setConversations",o),console.debug("set conversation success",o)},y=async({commit:t},e)=>{console.debug("set conversations",e),t("setConversations",e)},E=async({commit:t,state:e,rootState:s})=>{e.status.getConversations=i.Request;const n=e.credential?.token,r=e.modelGroup?.name;if(!n||!r)return e.status.getConversations=i.Error,t("setConversations",[]),[];try{const{data:c}=await u.getConversations({userId:s.user?.id,modelGroup:r},{token:n});return console.debug("get conversations success",c?.items?.length,"group=",r),e.status.getConversations=i.Success,t("setConversations",c.items),c.items}catch{return e.status.getConversations=i.Error,t("setConversations",[]),[]}},I=async({commit:t,state:e},s)=>{const o=e.credential?.token;if(!(!o||!s))try{const{data:n}=await u.getConversation(s,{token:o}),r=e.conversations||[],c=r.findIndex(a=>a.id===s),l=c>-1?{...r[c],...n}:n;if(c>-1){const a=[...r];a[c]=l,t("setConversations",a)}return l}catch(n){console.error("getConversation failed",s,n);return}},O={resetAll:f,createCredential:m,setModel:M,setModelGroup:$,getService:w,setService:h,setCredential:S,setApplication:A,setApplications:b,getApplications:x,setConversation:G,setConversations:y,getConversations:E,getConversation:I},_=t=>{Object.assign(t,d())},k=(t,e)=>{t.model=e},q=(t,e)=>{t.modelGroup=e},R=(t,e)=>{t.credential=e},j=(t,e)=>{t.application=e},D=(t,e)=>{t.applications=e},H=(t,e)=>{t.service=e},T=(t,e)=>{t.conversations=e},V={setModel:k,setModelGroup:q,setService:H,setCredential:R,setConversations:T,setApplication:j,setApplications:D,resetAll:_},Q={namespaced:!0,state:d,mutations:V,actions:O};export{Q as chat,Q as default};
1
+ import{ao as i,a6 as g,ap as p,aq as v,ar as d}from"./index-CF16UMDY.js";import{c as u}from"./chat-BC12eA6v.js";import{s as C}from"./service-CHaGU8pS.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";import"./errorCode-Cqj9Td_Z.js";const f=({commit:t})=>{t("resetAll")},A=async({commit:t,dispatch:e},s)=>{if(console.debug("set application",s),t("setApplication",s),console.debug("application is set"),!s){console.debug("application is null, return");return}const o=s?.credentials?.find(n=>n?.host===window.location.origin);o?(console.debug("credential exists, set credential",o),t("setCredential",o)):(console.debug("credential not exists, start to create credential for application",s),await e("createCredential"))},b=async({commit:t},e)=>{console.debug("set applications for chat",e),t("setApplications",e)},h=async({commit:t},e)=>{console.debug("set service for chat",e),t("setService",e)},S=async({commit:t},e)=>{console.debug("set credential",e),t("setCredential",e)},m=async({commit:t,state:e})=>{const s=e.application;if(console.debug("prepare to create credential for application for chat",s),!s){console.error("Application not found");return}console.debug("creating create credential for application for chat",s);const{data:o}=await v.create({application_id:s?.id,host:window.location.origin});return console.debug("created credential success",o),t("setCredential",o),console.debug("end createCredential"),o},w=async({commit:t,state:e})=>{e.status.getService=i.Request;try{const{data:s}=await C.get(p);return e.status.getService=i.Success,t("setService",s),s}catch{e.status.getService=i.Error,t("setService",void 0)}},x=async({commit:t,state:e,rootState:s})=>{console.debug("start to get applications for chat"),e.status.getApplications=i.Request;try{const{data:o}=await g.getAll({user_id:s?.user?.id,service_id:p});return console.debug("get applications success for chat",o),e.status.getApplications=i.Success,t("setApplications",o.items),console.debug("set applications for chat",o.items),o.items}catch(o){console.error("get applications failed for chat",o),e.status.getApplications=i.Error,t("setApplications",void 0),t("setApplication",void 0)}},M=async({commit:t},e)=>{t("setModel",e)},$=async({commit:t},e)=>{t("setModelGroup",e)},G=async({commit:t,state:e},s)=>{console.debug("set conversation",s);const o=e.conversations||[],n=o?.findIndex(r=>r.id===s.id);n>-1?o[n]=s:o?.unshift(s),t("setConversations",o),console.debug("set conversation success",o)},y=async({commit:t},e)=>{console.debug("set conversations",e),t("setConversations",e)},E=async({commit:t,state:e,rootState:s})=>{e.status.getConversations=i.Request;const n=e.credential?.token,r=e.modelGroup?.name;if(!n||!r)return e.status.getConversations=i.Error,t("setConversations",[]),[];try{const{data:c}=await u.getConversations({userId:s.user?.id,modelGroup:r},{token:n});return console.debug("get conversations success",c?.items?.length,"group=",r),e.status.getConversations=i.Success,t("setConversations",c.items),c.items}catch{return e.status.getConversations=i.Error,t("setConversations",[]),[]}},I=async({commit:t,state:e},s)=>{const o=e.credential?.token;if(!(!o||!s))try{const{data:n}=await u.getConversation(s,{token:o}),r=e.conversations||[],c=r.findIndex(a=>a.id===s),l=c>-1?{...r[c],...n}:n;if(c>-1){const a=[...r];a[c]=l,t("setConversations",a)}return l}catch(n){console.error("getConversation failed",s,n);return}},O={resetAll:f,createCredential:m,setModel:M,setModelGroup:$,getService:w,setService:h,setCredential:S,setApplication:A,setApplications:b,getApplications:x,setConversation:G,setConversations:y,getConversations:E,getConversation:I},_=t=>{Object.assign(t,d())},k=(t,e)=>{t.model=e},q=(t,e)=>{t.modelGroup=e},R=(t,e)=>{t.credential=e},j=(t,e)=>{t.application=e},D=(t,e)=>{t.applications=e},H=(t,e)=>{t.service=e},T=(t,e)=>{t.conversations=e},V={setModel:k,setModelGroup:q,setService:H,setCredential:R,setConversations:T,setApplication:j,setApplications:D,resetAll:_},Q={namespaced:!0,state:d,mutations:V,actions:O};export{Q as chat,Q as default};
@@ -1 +1 @@
1
- import{d as A,X as N,c as b,q as o,x as q,y as l,C as d,T as M,u as e,G as O,E as k,A as V,M as U,Q as t,H as i,z as u,F as G,J as r,L as J,b as E}from"./vendor-vue-C5BV5QrY.js";import{ab as Q,H as X,ac as j,y as K,ad as W,z as Y,ae as Z,af as _,ag as x,ah as ee,R as ae,$ as se,ai as te,S as oe,A as re}from"./index-BTvg_L_n.js";const le=X({...j,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),de=Q,ie=A({name:"ElDrawer",inheritAttrs:!1}),ne=A({...ie,props:le,emits:de,setup(g,{expose:R}){const n=g,S=N();W({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},b(()=>!!S.title));const f=E(),m=E(),s=Y("drawer"),{t:F}=Z(),{afterEnter:y,afterLeave:h,beforeLeave:L,visible:c,rendered:T,titleId:p,bodyId:w,zIndex:z,onModalClick:B,onOpenAutoFocus:D,onCloseAutoFocus:$,onFocusoutPrevented:P,onCloseRequested:I,handleClose:v}=_(n,f),H=b(()=>n.direction==="rtl"||n.direction==="ltr"),C=b(()=>oe(n.size));return R({handleClose:v,afterEnter:y,afterLeave:h}),(a,fe)=>(o(),q(e(te),{to:a.appendTo,disabled:a.appendTo!=="body"?!1:!a.appendToBody},{default:l(()=>[d(M,{name:e(s).b("fade"),onAfterEnter:e(y),onAfterLeave:e(h),onBeforeLeave:e(L),persisted:""},{default:l(()=>[O(d(e(x),{mask:a.modal,"overlay-class":a.modalClass,"z-index":e(z),onClick:e(B)},{default:l(()=>[d(e(ee),{loop:"",trapped:e(c),"focus-trap-el":f.value,"focus-start-el":m.value,onFocusAfterTrapped:e(D),onFocusAfterReleased:e($),onFocusoutPrevented:e(P),onReleaseRequested:e(I)},{default:l(()=>[k("div",V({ref_key:"drawerRef",ref:f,"aria-modal":"true","aria-label":a.title||void 0,"aria-labelledby":a.title?void 0:e(p),"aria-describedby":e(w)},a.$attrs,{class:[e(s).b(),a.direction,e(c)&&"open"],style:e(H)?"width: "+e(C):"height: "+e(C),role:"dialog",onClick:U(()=>{},["stop"])}),[k("span",{ref_key:"focusStartRef",ref:m,class:t(e(s).e("sr-focus")),tabindex:"-1"},null,2),a.withHeader?(o(),i("header",{key:0,class:t([e(s).e("header"),a.headerClass])},[a.$slots.title?u(a.$slots,"title",{key:1},()=>[r(" DEPRECATED SLOT ")]):u(a.$slots,"header",{key:0,close:e(v),titleId:e(p),titleClass:e(s).e("title")},()=>[a.$slots.title?r("v-if",!0):(o(),i("span",{key:0,id:e(p),role:"heading","aria-level":a.headerAriaLevel,class:t(e(s).e("title"))},G(a.title),11,["id","aria-level"]))]),a.showClose?(o(),i("button",{key:2,"aria-label":e(F)("el.drawer.close"),class:t(e(s).e("close-btn")),type:"button",onClick:e(v)},[d(e(ae),{class:t(e(s).e("close"))},{default:l(()=>[d(e(se))]),_:1},8,["class"])],10,["aria-label","onClick"])):r("v-if",!0)],2)):r("v-if",!0),e(T)?(o(),i("div",{key:1,id:e(w),class:t([e(s).e("body"),a.bodyClass])},[u(a.$slots,"default")],10,["id"])):r("v-if",!0),a.$slots.footer?(o(),i("div",{key:2,class:t([e(s).e("footer"),a.footerClass])},[u(a.$slots,"footer")],2)):r("v-if",!0)],16,["aria-label","aria-labelledby","aria-describedby","onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[J,e(c)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var ue=K(ne,[["__file","drawer.vue"]]);const ve=re(ue);export{ve as E};
1
+ import{d as A,X as N,c as b,q as o,x as q,y as l,C as d,T as M,u as e,G as O,E as k,A as V,M as U,Q as t,H as i,z as u,F as G,J as r,L as J,b as E}from"./vendor-vue-C5BV5QrY.js";import{ab as Q,H as X,ac as j,y as K,ad as W,z as Y,ae as Z,af as _,ag as x,ah as ee,R as ae,$ as se,ai as te,S as oe,A as re}from"./index-CF16UMDY.js";const le=X({...j,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),de=Q,ie=A({name:"ElDrawer",inheritAttrs:!1}),ne=A({...ie,props:le,emits:de,setup(g,{expose:R}){const n=g,S=N();W({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},b(()=>!!S.title));const f=E(),m=E(),s=Y("drawer"),{t:F}=Z(),{afterEnter:y,afterLeave:h,beforeLeave:L,visible:c,rendered:T,titleId:p,bodyId:w,zIndex:z,onModalClick:B,onOpenAutoFocus:D,onCloseAutoFocus:$,onFocusoutPrevented:P,onCloseRequested:I,handleClose:v}=_(n,f),H=b(()=>n.direction==="rtl"||n.direction==="ltr"),C=b(()=>oe(n.size));return R({handleClose:v,afterEnter:y,afterLeave:h}),(a,fe)=>(o(),q(e(te),{to:a.appendTo,disabled:a.appendTo!=="body"?!1:!a.appendToBody},{default:l(()=>[d(M,{name:e(s).b("fade"),onAfterEnter:e(y),onAfterLeave:e(h),onBeforeLeave:e(L),persisted:""},{default:l(()=>[O(d(e(x),{mask:a.modal,"overlay-class":a.modalClass,"z-index":e(z),onClick:e(B)},{default:l(()=>[d(e(ee),{loop:"",trapped:e(c),"focus-trap-el":f.value,"focus-start-el":m.value,onFocusAfterTrapped:e(D),onFocusAfterReleased:e($),onFocusoutPrevented:e(P),onReleaseRequested:e(I)},{default:l(()=>[k("div",V({ref_key:"drawerRef",ref:f,"aria-modal":"true","aria-label":a.title||void 0,"aria-labelledby":a.title?void 0:e(p),"aria-describedby":e(w)},a.$attrs,{class:[e(s).b(),a.direction,e(c)&&"open"],style:e(H)?"width: "+e(C):"height: "+e(C),role:"dialog",onClick:U(()=>{},["stop"])}),[k("span",{ref_key:"focusStartRef",ref:m,class:t(e(s).e("sr-focus")),tabindex:"-1"},null,2),a.withHeader?(o(),i("header",{key:0,class:t([e(s).e("header"),a.headerClass])},[a.$slots.title?u(a.$slots,"title",{key:1},()=>[r(" DEPRECATED SLOT ")]):u(a.$slots,"header",{key:0,close:e(v),titleId:e(p),titleClass:e(s).e("title")},()=>[a.$slots.title?r("v-if",!0):(o(),i("span",{key:0,id:e(p),role:"heading","aria-level":a.headerAriaLevel,class:t(e(s).e("title"))},G(a.title),11,["id","aria-level"]))]),a.showClose?(o(),i("button",{key:2,"aria-label":e(F)("el.drawer.close"),class:t(e(s).e("close-btn")),type:"button",onClick:e(v)},[d(e(ae),{class:t(e(s).e("close"))},{default:l(()=>[d(e(se))]),_:1},8,["class"])],10,["aria-label","onClick"])):r("v-if",!0)],2)):r("v-if",!0),e(T)?(o(),i("div",{key:1,id:e(w),class:t([e(s).e("body"),a.bodyClass])},[u(a.$slots,"default")],10,["id"])):r("v-if",!0),a.$slots.footer?(o(),i("div",{key:2,class:t([e(s).e("footer"),a.footerClass])},[u(a.$slots,"footer")],2)):r("v-if",!0)],16,["aria-label","aria-labelledby","aria-describedby","onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[J,e(c)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var ue=K(ne,[["__file","drawer.vue"]]);const ve=re(ue);export{ve as E};
@@ -1 +1 @@
1
- import{aq as T,ao as o,a6 as f,av as u}from"./index-BTvg_L_n.js";import{p as b,P as g}from"./pika-FXVe4OtC.js";import{s as S}from"./service-CJVkCidP.js";import{m as w}from"./merge-C5jDS2au.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";const C=({commit:t})=>{t("resetAll")},I=async({commit:t,dispatch:e},s)=>{if(console.debug("set application",s),t("setApplication",s),!s){console.debug("application is null, return");return}const a=s?.credentials?.find(i=>i?.host===window.location.origin);a?(console.debug("credential exists, set credential",a),t("setCredential",a)):(console.debug("credential not exists, start to create credential for application",s),await e("createCredential"))},$=async({commit:t},e)=>{console.debug("set applications",e),t("setApplications",e)},h=async({commit:t},e)=>{console.debug("set service",e),t("setService",e)},y=async({commit:t},e)=>{console.debug("set credential",e),t("setCredential",e)},P=async({commit:t,state:e})=>{const s=e.application;if(console.debug("prepare to create credential for application",s),!s){console.error("Application not found");return}console.debug("creating create credential for application",s);const{data:a}=await T.create({application_id:s?.id,host:window.location.origin});return console.debug("created credential success",a),t("setCredential",a),console.debug("end createCredential"),a},x=async({commit:t,state:e})=>{e.status.getService=o.Request;try{const{data:s}=await S.get(g);return e.status.getService=o.Success,t("setService",s),s}catch{e.status.getService=o.Error,t("setService",void 0)}},O=async({commit:t,state:e,rootState:s})=>{console.debug("start to get applications for chat"),e.status.getApplications=o.Request;const a=e.application;console.debug("current application",a);try{const{data:i}=await f.getAll({user_id:s?.user?.id,service_id:g});return e.status.getApplications=o.Success,t("setApplications",i.items),i.items}catch(i){console.error("get applications failed",i),e.status.getApplications=o.Error,t("setApplications",void 0),t("setApplication",void 0)}},_=({commit:t},e)=>{t("setConfig",e)},E=({commit:t},e)=>{t("setTasks",e)},q=({commit:t},e)=>{t("setTasksItems",e)},R=({commit:t},e)=>{t("setTasksTotal",e)},D=({commit:t},e)=>{t("setTasksActive",e)},K=async({commit:t,state:e,rootState:s},{offset:a,limit:i,createdAtMin:k,createdAtMax:A})=>new Promise((v,c)=>{console.debug("start to get tasks",a,i);const r=e.credential;console.debug("current credential",r);const l=r?.token;if(!l)return c("no token");b.tasks({userId:s?.user?.id,createdAtMin:k,createdAtMax:A,type:"videos"},{token:l}).then(n=>{console.debug("get videos tasks success",n.data.items);const p=e?.tasks?.items||[];console.debug("existing items",p);const d=n.data.items||[];console.debug("new items",d);const m=w(p,d);t("setTasksItems",m),t("setTasksTotal",n.data.count),v(n.data.items)}).catch(n=>c(n))}),L={setService:h,getService:x,resetAll:C,setCredential:y,setConfig:_,setApplication:I,setApplications:$,getApplications:O,setTasks:E,setTasksItems:q,setTasksTotal:R,setTasksActive:D,getTasks:K,createCredential:P},V=t=>{Object.assign(t,u())},j=(t,e)=>{t.service=e},z=(t,e)=>{t.credential=e},B=(t,e)=>{t.application=e},F=(t,e)=>{t.applications=e},G=(t,e)=>{t.config=e},H=(t,e)=>{const s={...t.tasks,items:e};t.tasks=s},J=(t,e)=>{const s={...t.tasks,total:e};t.tasks=s},M=(t,e)=>{const s={...t.tasks,active:e};t.tasks=s},N=(t,e)=>{t.tasks=e},Q={setTasks:N,setApplication:B,setApplications:F,setConfig:G,setCredential:z,setService:j,setTasksActive:M,setTasksItems:H,setTasksTotal:J,resetAll:V},at={namespaced:!0,state:u,mutations:Q,actions:L};export{at as default,at as pika};
1
+ import{aq as T,ao as o,a6 as f,av as u}from"./index-CF16UMDY.js";import{p as b,P as g}from"./pika-hS8f854b.js";import{s as S}from"./service-CHaGU8pS.js";import{m as w}from"./merge-C5jDS2au.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";const C=({commit:t})=>{t("resetAll")},I=async({commit:t,dispatch:e},s)=>{if(console.debug("set application",s),t("setApplication",s),!s){console.debug("application is null, return");return}const a=s?.credentials?.find(i=>i?.host===window.location.origin);a?(console.debug("credential exists, set credential",a),t("setCredential",a)):(console.debug("credential not exists, start to create credential for application",s),await e("createCredential"))},$=async({commit:t},e)=>{console.debug("set applications",e),t("setApplications",e)},h=async({commit:t},e)=>{console.debug("set service",e),t("setService",e)},y=async({commit:t},e)=>{console.debug("set credential",e),t("setCredential",e)},P=async({commit:t,state:e})=>{const s=e.application;if(console.debug("prepare to create credential for application",s),!s){console.error("Application not found");return}console.debug("creating create credential for application",s);const{data:a}=await T.create({application_id:s?.id,host:window.location.origin});return console.debug("created credential success",a),t("setCredential",a),console.debug("end createCredential"),a},x=async({commit:t,state:e})=>{e.status.getService=o.Request;try{const{data:s}=await S.get(g);return e.status.getService=o.Success,t("setService",s),s}catch{e.status.getService=o.Error,t("setService",void 0)}},O=async({commit:t,state:e,rootState:s})=>{console.debug("start to get applications for chat"),e.status.getApplications=o.Request;const a=e.application;console.debug("current application",a);try{const{data:i}=await f.getAll({user_id:s?.user?.id,service_id:g});return e.status.getApplications=o.Success,t("setApplications",i.items),i.items}catch(i){console.error("get applications failed",i),e.status.getApplications=o.Error,t("setApplications",void 0),t("setApplication",void 0)}},_=({commit:t},e)=>{t("setConfig",e)},E=({commit:t},e)=>{t("setTasks",e)},q=({commit:t},e)=>{t("setTasksItems",e)},R=({commit:t},e)=>{t("setTasksTotal",e)},D=({commit:t},e)=>{t("setTasksActive",e)},K=async({commit:t,state:e,rootState:s},{offset:a,limit:i,createdAtMin:k,createdAtMax:A})=>new Promise((v,c)=>{console.debug("start to get tasks",a,i);const r=e.credential;console.debug("current credential",r);const l=r?.token;if(!l)return c("no token");b.tasks({userId:s?.user?.id,createdAtMin:k,createdAtMax:A,type:"videos"},{token:l}).then(n=>{console.debug("get videos tasks success",n.data.items);const p=e?.tasks?.items||[];console.debug("existing items",p);const d=n.data.items||[];console.debug("new items",d);const m=w(p,d);t("setTasksItems",m),t("setTasksTotal",n.data.count),v(n.data.items)}).catch(n=>c(n))}),L={setService:h,getService:x,resetAll:C,setCredential:y,setConfig:_,setApplication:I,setApplications:$,getApplications:O,setTasks:E,setTasksItems:q,setTasksTotal:R,setTasksActive:D,getTasks:K,createCredential:P},V=t=>{Object.assign(t,u())},j=(t,e)=>{t.service=e},z=(t,e)=>{t.credential=e},B=(t,e)=>{t.application=e},F=(t,e)=>{t.applications=e},G=(t,e)=>{t.config=e},H=(t,e)=>{const s={...t.tasks,items:e};t.tasks=s},J=(t,e)=>{const s={...t.tasks,total:e};t.tasks=s},M=(t,e)=>{const s={...t.tasks,active:e};t.tasks=s},N=(t,e)=>{t.tasks=e},Q={setTasks:N,setApplication:B,setApplications:F,setConfig:G,setCredential:z,setService:j,setTasksActive:M,setTasksItems:H,setTasksTotal:J,resetAll:V},at={namespaced:!0,state:u,mutations:Q,actions:L};export{at as default,at as pika};
@@ -1 +1 @@
1
- import{aq as T,ao as i,a6 as f,au as u}from"./index-BTvg_L_n.js";import{L as g}from"./luma-CZR6zMIo.js";import{s as b}from"./service-CJVkCidP.js";import{l as S}from"./luma-Bl_bGzWM.js";import{m as w}from"./merge-C5jDS2au.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";const C=({commit:t})=>{t("resetAll")},I=async({commit:t,dispatch:e},s)=>{if(console.debug("set application",s),t("setApplication",s),!s){console.debug("application is null, return");return}const a=s?.credentials?.find(o=>o?.host===window.location.origin);a?(console.debug("credential exists, set credential",a),t("setCredential",a)):(console.debug("credential not exists, start to create credential for application",s),await e("createCredential"))},$=async({commit:t},e)=>{console.debug("set applications",e),t("setApplications",e)},h=async({commit:t},e)=>{console.debug("set service",e),t("setService",e)},y=async({commit:t},e)=>{console.debug("set credential",e),t("setCredential",e)},x=async({commit:t,state:e})=>{const s=e.application;if(console.debug("prepare to create credential for application",s),!s){console.error("Application not found");return}console.debug("creating create credential for application",s);const{data:a}=await T.create({application_id:s?.id,host:window.location.origin});return console.debug("created credential success",a),t("setCredential",a),console.debug("end createCredential"),a},O=async({commit:t,state:e})=>{e.status.getService=i.Request;try{const{data:s}=await b.get(g);return e.status.getService=i.Success,t("setService",s),s}catch{e.status.getService=i.Error,t("setService",void 0)}},_=async({commit:t,state:e,rootState:s})=>{console.debug("start to get applications for chat"),e.status.getApplications=i.Request;const a=e.application;console.debug("current application",a);try{const{data:o}=await f.getAll({user_id:s?.user?.id,service_id:g});return e.status.getApplications=i.Success,console.debug("get applications success",o.items),t("setApplications",o.items),o.items}catch(o){console.error("get applications failed",o),e.status.getApplications=i.Error,t("setApplications",void 0),t("setApplication",void 0)}},E=({commit:t},e)=>{t("setConfig",e)},P=({commit:t},e)=>{t("setTasks",e)},q=({commit:t},e)=>{t("setTasksItems",e)},L=({commit:t},e)=>{t("setTasksTotal",e)},R=({commit:t},e)=>{t("setTasksActive",e)},D=async({commit:t,state:e,rootState:s},{offset:a,limit:o,createdAtMin:k,createdAtMax:m})=>new Promise((A,c)=>{console.debug("start to get tasks",a,o);const r=e.credential;console.debug("current credential",r);const l=r?.token;if(!l)return c("no token");S.tasks({userId:s?.user?.id,createdAtMin:k,createdAtMax:m},{token:l}).then(n=>{console.debug("get luma tasks success",n.data.items);const p=e?.tasks?.items||[];console.debug("existing items",p);const d=n.data.items||[];console.debug("new items",d);const v=w(p,d);t("setTasksItems",v),t("setTasksTotal",n.data.count),A(n.data.items)}).catch(n=>c(n))}),M={setService:h,getService:O,resetAll:C,setCredential:y,setConfig:E,setApplication:I,setApplications:$,getApplications:_,setTasks:P,setTasksItems:q,setTasksTotal:L,setTasksActive:R,getTasks:D,createCredential:x},U=t=>{Object.assign(t,u())},V=(t,e)=>{t.service=e},j=(t,e)=>{t.credential=e},z=(t,e)=>{t.application=e},B=(t,e)=>{t.applications=e},F=(t,e)=>{t.config=e},G=(t,e)=>{const s={...t.tasks,items:e};t.tasks=s},H=(t,e)=>{const s={...t.tasks,total:e};t.tasks=s},J=(t,e)=>{const s={...t.tasks,active:e};t.tasks=s},K=(t,e)=>{t.tasks=e},N={setTasks:K,setApplication:z,setApplications:B,setConfig:F,setCredential:j,setService:V,setTasksActive:J,setTasksItems:G,setTasksTotal:H,resetAll:U},ot={namespaced:!0,state:u,mutations:N,actions:M};export{ot as default,ot as luma};
1
+ import{aq as T,ao as i,a6 as f,au as u}from"./index-CF16UMDY.js";import{L as g}from"./luma-CZR6zMIo.js";import{s as b}from"./service-CHaGU8pS.js";import{l as S}from"./luma-by4CfRUJ.js";import{m as w}from"./merge-C5jDS2au.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";const C=({commit:t})=>{t("resetAll")},I=async({commit:t,dispatch:e},s)=>{if(console.debug("set application",s),t("setApplication",s),!s){console.debug("application is null, return");return}const a=s?.credentials?.find(o=>o?.host===window.location.origin);a?(console.debug("credential exists, set credential",a),t("setCredential",a)):(console.debug("credential not exists, start to create credential for application",s),await e("createCredential"))},$=async({commit:t},e)=>{console.debug("set applications",e),t("setApplications",e)},h=async({commit:t},e)=>{console.debug("set service",e),t("setService",e)},y=async({commit:t},e)=>{console.debug("set credential",e),t("setCredential",e)},x=async({commit:t,state:e})=>{const s=e.application;if(console.debug("prepare to create credential for application",s),!s){console.error("Application not found");return}console.debug("creating create credential for application",s);const{data:a}=await T.create({application_id:s?.id,host:window.location.origin});return console.debug("created credential success",a),t("setCredential",a),console.debug("end createCredential"),a},O=async({commit:t,state:e})=>{e.status.getService=i.Request;try{const{data:s}=await b.get(g);return e.status.getService=i.Success,t("setService",s),s}catch{e.status.getService=i.Error,t("setService",void 0)}},_=async({commit:t,state:e,rootState:s})=>{console.debug("start to get applications for chat"),e.status.getApplications=i.Request;const a=e.application;console.debug("current application",a);try{const{data:o}=await f.getAll({user_id:s?.user?.id,service_id:g});return e.status.getApplications=i.Success,console.debug("get applications success",o.items),t("setApplications",o.items),o.items}catch(o){console.error("get applications failed",o),e.status.getApplications=i.Error,t("setApplications",void 0),t("setApplication",void 0)}},E=({commit:t},e)=>{t("setConfig",e)},P=({commit:t},e)=>{t("setTasks",e)},q=({commit:t},e)=>{t("setTasksItems",e)},L=({commit:t},e)=>{t("setTasksTotal",e)},R=({commit:t},e)=>{t("setTasksActive",e)},D=async({commit:t,state:e,rootState:s},{offset:a,limit:o,createdAtMin:k,createdAtMax:m})=>new Promise((A,c)=>{console.debug("start to get tasks",a,o);const r=e.credential;console.debug("current credential",r);const l=r?.token;if(!l)return c("no token");S.tasks({userId:s?.user?.id,createdAtMin:k,createdAtMax:m},{token:l}).then(n=>{console.debug("get luma tasks success",n.data.items);const p=e?.tasks?.items||[];console.debug("existing items",p);const d=n.data.items||[];console.debug("new items",d);const v=w(p,d);t("setTasksItems",v),t("setTasksTotal",n.data.count),A(n.data.items)}).catch(n=>c(n))}),M={setService:h,getService:O,resetAll:C,setCredential:y,setConfig:E,setApplication:I,setApplications:$,getApplications:_,setTasks:P,setTasksItems:q,setTasksTotal:L,setTasksActive:R,getTasks:D,createCredential:x},U=t=>{Object.assign(t,u())},V=(t,e)=>{t.service=e},j=(t,e)=>{t.credential=e},z=(t,e)=>{t.application=e},B=(t,e)=>{t.applications=e},F=(t,e)=>{t.config=e},G=(t,e)=>{const s={...t.tasks,items:e};t.tasks=s},H=(t,e)=>{const s={...t.tasks,total:e};t.tasks=s},J=(t,e)=>{const s={...t.tasks,active:e};t.tasks=s},K=(t,e)=>{t.tasks=e},N={setTasks:K,setApplication:z,setApplications:B,setConfig:F,setCredential:j,setService:V,setTasksActive:J,setTasksItems:G,setTasksTotal:H,resetAll:U},ot={namespaced:!0,state:u,mutations:N,actions:M};export{ot as default,ot as luma};
@@ -1 +1 @@
1
- import{aq as T,ao as o,a6 as f,aw as u}from"./index-BTvg_L_n.js";import{K as g}from"./kling-CgJOLGWX.js";import{s as b}from"./service-CJVkCidP.js";import{k as w}from"./kling-BvhmZ-mV.js";import{m as S}from"./merge-C5jDS2au.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";const C=({commit:t})=>{t("resetAll")},I=async({commit:t,dispatch:e},s)=>{if(console.debug("set application",s),t("setApplication",s),!s){console.debug("application is null, return");return}const a=s?.credentials?.find(i=>i?.host===window.location.origin);a?(console.debug("credential exists, set credential",a),t("setCredential",a)):(console.debug("credential not exists, start to create credential for application",s),await e("createCredential"))},$=async({commit:t},e)=>{console.debug("set applications",e),t("setApplications",e)},h=async({commit:t},e)=>{console.debug("set service",e),t("setService",e)},y=async({commit:t},e)=>{console.debug("set credential",e),t("setCredential",e)},x=async({commit:t,state:e})=>{const s=e.application;if(console.debug("prepare to create credential for application",s),!s){console.error("Application not found");return}console.debug("creating create credential for application",s);const{data:a}=await T.create({application_id:s?.id,host:window.location.origin});return console.debug("created credential success",a),t("setCredential",a),console.debug("end createCredential"),a},O=async({commit:t,state:e})=>{e.status.getService=o.Request;try{const{data:s}=await b.get(g);return e.status.getService=o.Success,t("setService",s),s}catch{e.status.getService=o.Error,t("setService",void 0)}},_=async({commit:t,state:e,rootState:s})=>{console.debug("start to get applications for chat"),e.status.getApplications=o.Request;const a=e.application;console.debug("current application",a);try{const{data:i}=await f.getAll({user_id:s?.user?.id,service_id:g});return e.status.getApplications=o.Success,t("setApplications",i.items),i.items}catch(i){console.error("get applications failed",i),e.status.getApplications=o.Error,t("setApplications",void 0),t("setApplication",void 0)}},E=({commit:t},e)=>{t("setConfig",e)},P=({commit:t},e)=>{t("setTasks",e)},q=({commit:t},e)=>{t("setTasksItems",e)},R=({commit:t},e)=>{t("setTasksTotal",e)},K=({commit:t},e)=>{t("setTasksActive",e)},L=async({commit:t,state:e,rootState:s},{offset:a,limit:i,createdAtMin:k,createdAtMax:m})=>new Promise((A,c)=>{console.debug("start to get tasks",a,i);const r=e.credential;console.debug("current credential",r);const l=r?.token;if(!l)return c("no token");w.tasks({userId:s?.user?.id,createdAtMin:k,createdAtMax:m,type:"videos"},{token:l}).then(n=>{console.debug("get videos tasks success",n.data.items);const p=e?.tasks?.items||[];console.debug("existing items",p);const d=n.data.items||[];console.debug("new items",d);const v=S(p,d);t("setTasksItems",v),t("setTasksTotal",n.data.count),A(n.data.items)}).catch(n=>c(n))}),D={setService:h,getService:O,resetAll:C,setCredential:y,setConfig:E,setApplication:I,setApplications:$,getApplications:_,setTasks:P,setTasksItems:q,setTasksTotal:R,setTasksActive:K,getTasks:L,createCredential:x},G=t=>{Object.assign(t,u())},N=(t,e)=>{t.service=e},V=(t,e)=>{t.credential=e},j=(t,e)=>{t.application=e},z=(t,e)=>{t.applications=e},B=(t,e)=>{t.config=e},F=(t,e)=>{const s={...t.tasks,items:e};t.tasks=s},H=(t,e)=>{const s={...t.tasks,total:e};t.tasks=s},J=(t,e)=>{const s={...t.tasks,active:e};t.tasks=s},M=(t,e)=>{t.tasks=e},Q={setTasks:M,setApplication:j,setApplications:z,setConfig:B,setCredential:V,setService:N,setTasksActive:J,setTasksItems:F,setTasksTotal:H,resetAll:G},it={namespaced:!0,state:u,mutations:Q,actions:D};export{it as default,it as kling};
1
+ import{aq as T,ao as o,a6 as f,aw as u}from"./index-CF16UMDY.js";import{K as g}from"./kling-CgJOLGWX.js";import{s as b}from"./service-CHaGU8pS.js";import{k as w}from"./kling-T66Rglck.js";import{m as S}from"./merge-C5jDS2au.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";const C=({commit:t})=>{t("resetAll")},I=async({commit:t,dispatch:e},s)=>{if(console.debug("set application",s),t("setApplication",s),!s){console.debug("application is null, return");return}const a=s?.credentials?.find(i=>i?.host===window.location.origin);a?(console.debug("credential exists, set credential",a),t("setCredential",a)):(console.debug("credential not exists, start to create credential for application",s),await e("createCredential"))},$=async({commit:t},e)=>{console.debug("set applications",e),t("setApplications",e)},h=async({commit:t},e)=>{console.debug("set service",e),t("setService",e)},y=async({commit:t},e)=>{console.debug("set credential",e),t("setCredential",e)},x=async({commit:t,state:e})=>{const s=e.application;if(console.debug("prepare to create credential for application",s),!s){console.error("Application not found");return}console.debug("creating create credential for application",s);const{data:a}=await T.create({application_id:s?.id,host:window.location.origin});return console.debug("created credential success",a),t("setCredential",a),console.debug("end createCredential"),a},O=async({commit:t,state:e})=>{e.status.getService=o.Request;try{const{data:s}=await b.get(g);return e.status.getService=o.Success,t("setService",s),s}catch{e.status.getService=o.Error,t("setService",void 0)}},_=async({commit:t,state:e,rootState:s})=>{console.debug("start to get applications for chat"),e.status.getApplications=o.Request;const a=e.application;console.debug("current application",a);try{const{data:i}=await f.getAll({user_id:s?.user?.id,service_id:g});return e.status.getApplications=o.Success,t("setApplications",i.items),i.items}catch(i){console.error("get applications failed",i),e.status.getApplications=o.Error,t("setApplications",void 0),t("setApplication",void 0)}},E=({commit:t},e)=>{t("setConfig",e)},P=({commit:t},e)=>{t("setTasks",e)},q=({commit:t},e)=>{t("setTasksItems",e)},R=({commit:t},e)=>{t("setTasksTotal",e)},K=({commit:t},e)=>{t("setTasksActive",e)},L=async({commit:t,state:e,rootState:s},{offset:a,limit:i,createdAtMin:k,createdAtMax:m})=>new Promise((A,c)=>{console.debug("start to get tasks",a,i);const r=e.credential;console.debug("current credential",r);const l=r?.token;if(!l)return c("no token");w.tasks({userId:s?.user?.id,createdAtMin:k,createdAtMax:m,type:"videos"},{token:l}).then(n=>{console.debug("get videos tasks success",n.data.items);const p=e?.tasks?.items||[];console.debug("existing items",p);const d=n.data.items||[];console.debug("new items",d);const v=S(p,d);t("setTasksItems",v),t("setTasksTotal",n.data.count),A(n.data.items)}).catch(n=>c(n))}),D={setService:h,getService:O,resetAll:C,setCredential:y,setConfig:E,setApplication:I,setApplications:$,getApplications:_,setTasks:P,setTasksItems:q,setTasksTotal:R,setTasksActive:K,getTasks:L,createCredential:x},G=t=>{Object.assign(t,u())},N=(t,e)=>{t.service=e},V=(t,e)=>{t.credential=e},j=(t,e)=>{t.application=e},z=(t,e)=>{t.applications=e},B=(t,e)=>{t.config=e},F=(t,e)=>{const s={...t.tasks,items:e};t.tasks=s},H=(t,e)=>{const s={...t.tasks,total:e};t.tasks=s},J=(t,e)=>{const s={...t.tasks,active:e};t.tasks=s},M=(t,e)=>{t.tasks=e},Q={setTasks:M,setApplication:j,setApplications:z,setConfig:B,setCredential:V,setService:N,setTasksActive:J,setTasksItems:F,setTasksTotal:H,resetAll:G},it={namespaced:!0,state:u,mutations:Q,actions:D};export{it as default,it as kling};
@@ -1 +1 @@
1
- import{B as l,ao as o,a6 as p,aq as u,aV as c}from"./index-BTvg_L_n.js";import{S as a}from"./serp-BcjVM9iR.js";import{s as d}from"./service-CJVkCidP.js";import{a as g}from"./vendor-axios-B8_nURbH.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";class f{async search(e,s){return await g.post("/serp/google",e,{headers:{authorization:`Bearer ${s.token}`,"content-type":"application/json",accept:"application/json"},baseURL:l})}}const A=new f,v=({commit:t})=>{t("resetAll")},S=async({commit:t,dispatch:e},s)=>{if(console.debug("set application",s),t("setApplication",s),!s){console.debug("application is null, return");return}const r=s?.credentials?.find(n=>n?.host===window.location.origin);r?(console.debug("credential exists, set credential",r),t("setCredential",r)):(console.debug("credential not exists, start to create credential for application",s),await e("createCredential"))},b=async({commit:t},e)=>{console.debug("set applications",e),t("setApplications",e)},h=async({commit:t},e)=>{console.debug("set service",e),t("setService",e)},y=async({commit:t},e)=>{console.debug("set credential",e),t("setCredential",e)},C=async({commit:t,state:e})=>{const s=e.application;if(console.debug("prepare to create credential for application",s),!s){console.error("Application not found");return}console.debug("creating create credential for application",s);const{data:r}=await u.create({application_id:s?.id,host:window.location.origin});return console.debug("created credential success",r),t("setCredential",r),console.debug("end createCredential"),r},w=async({commit:t,state:e})=>{e.status.getService=o.Request;try{const{data:s}=await d.get(a);return e.status.getService=o.Success,t("setService",s),s}catch{e.status.getService=o.Error,t("setService",void 0)}},R=async({commit:t,state:e,rootState:s})=>{console.debug("start to get applications for serp"),e.status.getApplications=o.Request;try{const{data:r}=await p.getAll({user_id:s?.user?.id,service_id:a});return e.status.getApplications=o.Success,t("setApplications",r.items),r.items}catch(r){console.error("get applications failed",r),e.status.getApplications=o.Error,t("setApplications",void 0),t("setApplication",void 0)}},q=({commit:t},e)=>{t("setConfig",e)},m=async({commit:t,state:e})=>{const r=e.credential?.token;if(!r){console.error("no token specified");return}const n=e.config;if(!n?.query){console.error("no query specified");return}e.status.search=o.Request;try{const{data:i}=await A.search({query:n.query,type:n.type,number:n.number,page:n.page,country:n.country,language:n.language,range:n.range},{token:r});e.status.search=o.Success,t("setResults",i)}catch(i){console.error("search failed",i),e.status.search=o.Error,t("setResults",void 0)}},E={createCredential:C,setService:h,getService:w,resetAll:v,setCredential:y,setConfig:q,setApplications:b,setApplication:S,getApplications:R,search:m},_=t=>{Object.assign(t,c())},$=(t,e)=>{t.service=e},O=(t,e)=>{t.credential=e},k=(t,e)=>{t.application=e},x=(t,e)=>{t.applications=e},j=(t,e)=>{t.config=e},B=(t,e)=>{t.results=e},I={setApplication:k,setApplications:x,setConfig:j,setCredential:O,setService:$,setResults:B,resetAll:_},G={namespaced:!0,state:c,mutations:I,actions:E};export{G as default,G as serp};
1
+ import{B as l,ao as o,a6 as p,aq as u,aV as c}from"./index-CF16UMDY.js";import{S as a}from"./serp-BcjVM9iR.js";import{s as d}from"./service-CHaGU8pS.js";import{a as g}from"./vendor-axios-B8_nURbH.js";import"./vendor-vue-C5BV5QrY.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Bl-Po99g.js";class f{async search(e,s){return await g.post("/serp/google",e,{headers:{authorization:`Bearer ${s.token}`,"content-type":"application/json",accept:"application/json"},baseURL:l})}}const A=new f,v=({commit:t})=>{t("resetAll")},S=async({commit:t,dispatch:e},s)=>{if(console.debug("set application",s),t("setApplication",s),!s){console.debug("application is null, return");return}const r=s?.credentials?.find(n=>n?.host===window.location.origin);r?(console.debug("credential exists, set credential",r),t("setCredential",r)):(console.debug("credential not exists, start to create credential for application",s),await e("createCredential"))},b=async({commit:t},e)=>{console.debug("set applications",e),t("setApplications",e)},h=async({commit:t},e)=>{console.debug("set service",e),t("setService",e)},y=async({commit:t},e)=>{console.debug("set credential",e),t("setCredential",e)},C=async({commit:t,state:e})=>{const s=e.application;if(console.debug("prepare to create credential for application",s),!s){console.error("Application not found");return}console.debug("creating create credential for application",s);const{data:r}=await u.create({application_id:s?.id,host:window.location.origin});return console.debug("created credential success",r),t("setCredential",r),console.debug("end createCredential"),r},w=async({commit:t,state:e})=>{e.status.getService=o.Request;try{const{data:s}=await d.get(a);return e.status.getService=o.Success,t("setService",s),s}catch{e.status.getService=o.Error,t("setService",void 0)}},R=async({commit:t,state:e,rootState:s})=>{console.debug("start to get applications for serp"),e.status.getApplications=o.Request;try{const{data:r}=await p.getAll({user_id:s?.user?.id,service_id:a});return e.status.getApplications=o.Success,t("setApplications",r.items),r.items}catch(r){console.error("get applications failed",r),e.status.getApplications=o.Error,t("setApplications",void 0),t("setApplication",void 0)}},q=({commit:t},e)=>{t("setConfig",e)},m=async({commit:t,state:e})=>{const r=e.credential?.token;if(!r){console.error("no token specified");return}const n=e.config;if(!n?.query){console.error("no query specified");return}e.status.search=o.Request;try{const{data:i}=await A.search({query:n.query,type:n.type,number:n.number,page:n.page,country:n.country,language:n.language,range:n.range},{token:r});e.status.search=o.Success,t("setResults",i)}catch(i){console.error("search failed",i),e.status.search=o.Error,t("setResults",void 0)}},E={createCredential:C,setService:h,getService:w,resetAll:v,setCredential:y,setConfig:q,setApplications:b,setApplication:S,getApplications:R,search:m},_=t=>{Object.assign(t,c())},$=(t,e)=>{t.service=e},O=(t,e)=>{t.credential=e},k=(t,e)=>{t.application=e},x=(t,e)=>{t.applications=e},j=(t,e)=>{t.config=e},B=(t,e)=>{t.results=e},I={setApplication:k,setApplications:x,setConfig:j,setCredential:O,setService:$,setResults:B,resetAll:_},G={namespaced:!0,state:c,mutations:I,actions:E};export{G as default,G as serp};