@templatical/editor 0.43.0 → 0.43.2

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 (195) hide show
  1. package/dist/{AiChatSidebar-DOCvzGBe.js → AiChatSidebar-DTtMEXNR.js} +7 -7
  2. package/dist/{AiFeatureMenu-xCJeD07B.js → AiFeatureMenu-DFj-_S9b.js} +4 -4
  3. package/dist/{BlockIssueBadge-BJ3A6mqh.js → BlockIssueBadge-CyLmqjLl.js} +2 -2
  4. package/dist/{BlockPreviewCanvas-BQXfqhzu.js → BlockPreviewCanvas-C6F66f3k.js} +2 -2
  5. package/dist/{CloudHeaderExtras-TFmBJ0Ry.js → CloudHeaderExtras-Z4K6OMn0.js} +2 -2
  6. package/dist/{CloudPanels-BnSBbYnw.js → CloudPanels-DOJ2Vske.js} +4 -4
  7. package/dist/{CollaboratorBar-7ry8EdUh.js → CollaboratorBar-BCkl3dKY.js} +2 -2
  8. package/dist/{CommentsPanel-CGEhbjx0.js → CommentsPanel-DPMi6-rb.js} +1 -1
  9. package/dist/{CommentsSidebar-CUpst9ou.js → CommentsSidebar-C1mQcyh3.js} +10 -10
  10. package/dist/{CountdownToolbar-B1a_UIuB.js → CountdownToolbar-DKmzpk__.js} +3 -3
  11. package/dist/{DesignReferenceSidebar-DkAmsBgM.js → DesignReferenceSidebar-CGRzOOb8.js} +5 -5
  12. package/dist/{IssuesPanel-lTpsCV4a.js → IssuesPanel-CsdxjjRm.js} +5 -5
  13. package/dist/{LogicTagInsertButton-B5YymR4U.js → LogicTagInsertButton-BX4jOUQy.js} +3 -3
  14. package/dist/{MediaEditModal-B1X8qtJb.js → MediaEditModal-Bm8uOKBx.js} +270 -230
  15. package/dist/{MediaPanels-DO30L1KS.js → MediaPanels-BNWtEntu.js} +1 -1
  16. package/dist/{MergeTagInput-B0M_-X0K.js → MergeTagInput-Mj8CFfX1.js} +1 -1
  17. package/dist/{MergeTagModeToggle-B-8W1tK7.js → MergeTagModeToggle-CinojvpV.js} +3 -3
  18. package/dist/{ParagraphEditor-DVGeU0Am.js → ParagraphEditor-DdOteRjD.js} +9 -9
  19. package/dist/{RestoreVersionDialog-DOhgYkiA.js → RestoreVersionDialog-B-i0wPjh.js} +3 -3
  20. package/dist/{RichTextEditorContent-AaLAArA0.js → RichTextEditorContent-CDtKOWsh.js} +4 -4
  21. package/dist/{SaveBlockDialog-36MzPD2S.js → SaveBlockDialog-DTcGPDMT.js} +8 -8
  22. package/dist/{SavedBlocksBrowserModal-B5nFKszf.js → SavedBlocksBrowserModal-BA5yXQi0.js} +9 -9
  23. package/dist/{SavedBlocksPanels-BZkbP7eB.js → SavedBlocksPanels-mfSALJqB.js} +1 -1
  24. package/dist/{SavedBlocksPickBar-ChoCMdu7.js → SavedBlocksPickBar-BOjduGI4.js} +2 -2
  25. package/dist/{TemplateScoringPanel-C6ellAcs.js → TemplateScoringPanel-Byz-ajjf.js} +11 -11
  26. package/dist/{TemplateSettings-C_0qK-zs.js → TemplateSettings-Bf5rfsU8.js} +5 -5
  27. package/dist/{TestEmailModal-CKW-VArm.js → TestEmailModal-DJo2yFLh.js} +6 -6
  28. package/dist/{TestEmailPanel-BylYzjyM.js → TestEmailPanel-CXIFWfDm.js} +1 -1
  29. package/dist/{TitleEditor-DoQ286_n.js → TitleEditor-BDtokkQF.js} +6 -6
  30. package/dist/{ToggleSwitch-CtZ6adlX.js → ToggleSwitch-BCYZvP1e.js} +1 -1
  31. package/dist/{Toolbar-B6dG5_IP.js → Toolbar-XOtJ_N58.js} +20 -20
  32. package/dist/{TplModal-DHwQXySQ.js → TplModal-C3mzMXof.js} +1 -1
  33. package/dist/{VersionHistoryMenu-DdspCRSA.js → VersionHistoryMenu-DRoFz15y.js} +5 -5
  34. package/dist/{VersionHistoryPanels-C6QxmRUH.js → VersionHistoryPanels-CeF0JnXI.js} +1 -1
  35. package/dist/{VersionPreviewBanner-XUuLe36h.js → VersionPreviewBanner-DQvIEKUU.js} +1 -1
  36. package/dist/{WrapperBlock-BumDudbj.js → WrapperBlock-DZwp4G7P.js} +1 -1
  37. package/dist/{blockTypeIcons-Sg8SY1NQ.js → blockTypeIcons-CAPoy6X7.js} +2 -2
  38. package/dist/bundle-stats.json +6 -6
  39. package/dist/{ca-BTf1Zbqb.js → ca-CYQH3J0b.js} +6 -2
  40. package/dist/cdn/chunks/{AiChatSidebar-DiG-EQ-E.js → AiChatSidebar-DW1uRkKE.js} +2 -2
  41. package/dist/cdn/chunks/{AiChatSidebar-DiG-EQ-E.js.map → AiChatSidebar-DW1uRkKE.js.map} +1 -1
  42. package/dist/cdn/chunks/{AiFeatureMenu-4TgzmLb3.js → AiFeatureMenu-CHsgD78N.js} +3 -3
  43. package/dist/cdn/chunks/{AiFeatureMenu-4TgzmLb3.js.map → AiFeatureMenu-CHsgD78N.js.map} +1 -1
  44. package/dist/cdn/chunks/{BlockIssueBadge-ChQ0mPf5.js → BlockIssueBadge-CIqu8JnG.js} +2 -2
  45. package/dist/cdn/chunks/{BlockIssueBadge-ChQ0mPf5.js.map → BlockIssueBadge-CIqu8JnG.js.map} +1 -1
  46. package/dist/cdn/chunks/{BlockPreviewCanvas-BpvK3Sh9.js → BlockPreviewCanvas-Dtea66SI.js} +3 -3
  47. package/dist/cdn/chunks/{BlockPreviewCanvas-BpvK3Sh9.js.map → BlockPreviewCanvas-Dtea66SI.js.map} +1 -1
  48. package/dist/cdn/chunks/{CloudHeaderExtras-DqgOaWym.js → CloudHeaderExtras-Kjj78__m.js} +3 -3
  49. package/dist/cdn/chunks/{CloudHeaderExtras-DqgOaWym.js.map → CloudHeaderExtras-Kjj78__m.js.map} +1 -1
  50. package/dist/cdn/chunks/{CloudPanels-INOiwkET.js → CloudPanels-DARXXD0q.js} +4 -4
  51. package/dist/cdn/chunks/{CloudPanels-INOiwkET.js.map → CloudPanels-DARXXD0q.js.map} +1 -1
  52. package/dist/cdn/chunks/{CollaboratorBar-CQ9EpYKQ.js → CollaboratorBar-C7O9mQJ_.js} +3 -3
  53. package/dist/cdn/chunks/{CollaboratorBar-CQ9EpYKQ.js.map → CollaboratorBar-C7O9mQJ_.js.map} +1 -1
  54. package/dist/cdn/chunks/{CommentsPanel-CjhxGMjL.js → CommentsPanel-KH5_JS7_.js} +2 -2
  55. package/dist/cdn/chunks/{CommentsPanel-CjhxGMjL.js.map → CommentsPanel-KH5_JS7_.js.map} +1 -1
  56. package/dist/cdn/chunks/{CommentsSidebar-D9bqMnlt.js → CommentsSidebar-ucrNvgAQ.js} +2 -2
  57. package/dist/cdn/chunks/{CommentsSidebar-D9bqMnlt.js.map → CommentsSidebar-ucrNvgAQ.js.map} +1 -1
  58. package/dist/cdn/chunks/{CountdownToolbar-CIRx5w1U.js → CountdownToolbar-DVInzkj9.js} +4 -4
  59. package/dist/cdn/chunks/{CountdownToolbar-CIRx5w1U.js.map → CountdownToolbar-DVInzkj9.js.map} +1 -1
  60. package/dist/cdn/chunks/{DesignReferenceSidebar-C1-SbE_R.js → DesignReferenceSidebar-pleljkEJ.js} +2 -2
  61. package/dist/cdn/chunks/{DesignReferenceSidebar-C1-SbE_R.js.map → DesignReferenceSidebar-pleljkEJ.js.map} +1 -1
  62. package/dist/cdn/chunks/{IssuesPanel-qKY6UDd-.js → IssuesPanel-CPcQIUni.js} +2 -2
  63. package/dist/cdn/chunks/{IssuesPanel-qKY6UDd-.js.map → IssuesPanel-CPcQIUni.js.map} +1 -1
  64. package/dist/cdn/chunks/{LogicTagInsertButton-CItDS_U1.js → LogicTagInsertButton-DSrW9v0x.js} +2 -2
  65. package/dist/cdn/chunks/{LogicTagInsertButton-CItDS_U1.js.map → LogicTagInsertButton-DSrW9v0x.js.map} +1 -1
  66. package/dist/cdn/chunks/{MediaEditModal-CzUtXkpk.js → MediaEditModal-BHp7euCZ.js} +272 -232
  67. package/dist/cdn/chunks/MediaEditModal-BHp7euCZ.js.map +1 -0
  68. package/dist/cdn/chunks/{MediaPanels-DOLsh7WC.js → MediaPanels-CGIRlO48.js} +2 -2
  69. package/dist/cdn/chunks/{MediaPanels-DOLsh7WC.js.map → MediaPanels-CGIRlO48.js.map} +1 -1
  70. package/dist/cdn/chunks/{MergeTagInput-B33u3nxj.js → MergeTagInput-BSFofWuc.js} +2 -2
  71. package/dist/cdn/chunks/{MergeTagInput-B33u3nxj.js.map → MergeTagInput-BSFofWuc.js.map} +1 -1
  72. package/dist/cdn/chunks/{MergeTagModeToggle-Bz1CH3NT.js → MergeTagModeToggle-D7KlTFZV.js} +2 -2
  73. package/dist/cdn/chunks/{MergeTagModeToggle-Bz1CH3NT.js.map → MergeTagModeToggle-D7KlTFZV.js.map} +1 -1
  74. package/dist/cdn/chunks/{ParagraphEditor-B6A4yQ0A.js → ParagraphEditor-CokXagL1.js} +6 -6
  75. package/dist/cdn/chunks/{ParagraphEditor-B6A4yQ0A.js.map → ParagraphEditor-CokXagL1.js.map} +1 -1
  76. package/dist/cdn/chunks/{RestoreVersionDialog-B9rujl9w.js → RestoreVersionDialog-C-XEncAM.js} +3 -3
  77. package/dist/cdn/chunks/{RestoreVersionDialog-B9rujl9w.js.map → RestoreVersionDialog-C-XEncAM.js.map} +1 -1
  78. package/dist/cdn/chunks/{RichTextEditorContent-dOg1xFqv.js → RichTextEditorContent-DS_2UsJX.js} +4 -4
  79. package/dist/cdn/chunks/{RichTextEditorContent-dOg1xFqv.js.map → RichTextEditorContent-DS_2UsJX.js.map} +1 -1
  80. package/dist/cdn/chunks/{SaveBlockDialog-BNAeb6--.js → SaveBlockDialog-D8OAKF_k.js} +6 -6
  81. package/dist/cdn/chunks/{SaveBlockDialog-BNAeb6--.js.map → SaveBlockDialog-D8OAKF_k.js.map} +1 -1
  82. package/dist/cdn/chunks/{SavedBlocksBrowserModal--FoVqEnT.js → SavedBlocksBrowserModal-B6GN_llD.js} +6 -6
  83. package/dist/cdn/chunks/{SavedBlocksBrowserModal--FoVqEnT.js.map → SavedBlocksBrowserModal-B6GN_llD.js.map} +1 -1
  84. package/dist/cdn/chunks/{SavedBlocksPanels-qKyPnVgk.js → SavedBlocksPanels-hRCREVxS.js} +2 -2
  85. package/dist/cdn/chunks/{SavedBlocksPanels-qKyPnVgk.js.map → SavedBlocksPanels-hRCREVxS.js.map} +1 -1
  86. package/dist/cdn/chunks/{SavedBlocksPickBar-BvLwca4B.js → SavedBlocksPickBar-C5YrK0iB.js} +3 -3
  87. package/dist/cdn/chunks/{SavedBlocksPickBar-BvLwca4B.js.map → SavedBlocksPickBar-C5YrK0iB.js.map} +1 -1
  88. package/dist/cdn/chunks/{TemplateScoringPanel-ebsrVge3.js → TemplateScoringPanel-DXyQjcdU.js} +2 -2
  89. package/dist/cdn/chunks/{TemplateScoringPanel-ebsrVge3.js.map → TemplateScoringPanel-DXyQjcdU.js.map} +1 -1
  90. package/dist/cdn/chunks/{TemplateSettings-BaEVdUTM.js → TemplateSettings-da14bXlk.js} +4 -4
  91. package/dist/cdn/chunks/{TemplateSettings-BaEVdUTM.js.map → TemplateSettings-da14bXlk.js.map} +1 -1
  92. package/dist/cdn/chunks/{TestEmailModal-DpYirvEL.js → TestEmailModal-Dl_cAyj-.js} +6 -6
  93. package/dist/cdn/chunks/{TestEmailModal-DpYirvEL.js.map → TestEmailModal-Dl_cAyj-.js.map} +1 -1
  94. package/dist/cdn/chunks/{TestEmailPanel-PAT70a2g.js → TestEmailPanel-CVZGOKaQ.js} +2 -2
  95. package/dist/cdn/chunks/{TestEmailPanel-PAT70a2g.js.map → TestEmailPanel-CVZGOKaQ.js.map} +1 -1
  96. package/dist/cdn/chunks/{TitleEditor-Dc7YB6Uy.js → TitleEditor-DO8OdG_w.js} +5 -5
  97. package/dist/cdn/chunks/{TitleEditor-Dc7YB6Uy.js.map → TitleEditor-DO8OdG_w.js.map} +1 -1
  98. package/dist/cdn/chunks/{ToggleSwitch-D-8dCEbI.js → ToggleSwitch-D5Wi6Env.js} +2 -2
  99. package/dist/cdn/chunks/{ToggleSwitch-D-8dCEbI.js.map → ToggleSwitch-D5Wi6Env.js.map} +1 -1
  100. package/dist/cdn/chunks/{Toolbar-BDzhrmGV.js → Toolbar-CXDE8xM-.js} +7 -7
  101. package/dist/cdn/chunks/{Toolbar-BDzhrmGV.js.map → Toolbar-CXDE8xM-.js.map} +1 -1
  102. package/dist/cdn/chunks/{TplModal-BbHRUc1Y.js → TplModal-CFi-Psf7.js} +2 -2
  103. package/dist/cdn/chunks/{TplModal-BbHRUc1Y.js.map → TplModal-CFi-Psf7.js.map} +1 -1
  104. package/dist/cdn/chunks/{VersionHistoryMenu-C_bBKOYU.js → VersionHistoryMenu-1bfCr14E.js} +2 -2
  105. package/dist/cdn/chunks/{VersionHistoryMenu-C_bBKOYU.js.map → VersionHistoryMenu-1bfCr14E.js.map} +1 -1
  106. package/dist/cdn/chunks/{VersionHistoryPanels-BoJsPIKa.js → VersionHistoryPanels-DbgbyAdW.js} +2 -2
  107. package/dist/cdn/chunks/{VersionHistoryPanels-BoJsPIKa.js.map → VersionHistoryPanels-DbgbyAdW.js.map} +1 -1
  108. package/dist/cdn/chunks/{VersionPreviewBanner-CKyrcgxJ.js → VersionPreviewBanner-BaOTRIrm.js} +2 -2
  109. package/dist/cdn/chunks/{VersionPreviewBanner-CKyrcgxJ.js.map → VersionPreviewBanner-BaOTRIrm.js.map} +1 -1
  110. package/dist/cdn/chunks/{WrapperBlock-CGg6rBnx.js → WrapperBlock-BYNfYvl3.js} +2 -2
  111. package/dist/cdn/chunks/{WrapperBlock-CGg6rBnx.js.map → WrapperBlock-BYNfYvl3.js.map} +1 -1
  112. package/dist/cdn/chunks/{blockTypeIcons-CdfCfqHE.js → blockTypeIcons-B_IAjnTD.js} +2 -2
  113. package/dist/cdn/chunks/{blockTypeIcons-CdfCfqHE.js.map → blockTypeIcons-B_IAjnTD.js.map} +1 -1
  114. package/dist/cdn/chunks/{ca-BTf1Zbqb.js → ca-CYQH3J0b.js} +7 -3
  115. package/dist/cdn/chunks/ca-CYQH3J0b.js.map +1 -0
  116. package/dist/cdn/chunks/{de-xzrh9PA3.js → de-JvCTMJPy.js} +7 -3
  117. package/dist/cdn/chunks/de-JvCTMJPy.js.map +1 -0
  118. package/dist/cdn/chunks/{editor-modal-CZQArGNj.js → editor-modal-BDOfw3l0.js} +472 -428
  119. package/dist/cdn/chunks/editor-modal-BDOfw3l0.js.map +1 -0
  120. package/dist/cdn/chunks/en-DxpXHoxJ.js +2 -0
  121. package/dist/cdn/chunks/{es-BT4LSpE2.js → es-CAv-Vldw.js} +7 -3
  122. package/dist/cdn/chunks/es-CAv-Vldw.js.map +1 -0
  123. package/dist/cdn/chunks/{extensions-Dy251lPd.js → extensions-1hJBHnGv.js} +2 -2
  124. package/dist/cdn/chunks/{extensions-Dy251lPd.js.map → extensions-1hJBHnGv.js.map} +1 -1
  125. package/dist/{fr-CI7OJoql.js → cdn/chunks/fr-DVPtxpR6.js} +8 -2
  126. package/dist/cdn/chunks/fr-DVPtxpR6.js.map +1 -0
  127. package/dist/cdn/chunks/{icons-CQnjugjy.js → icons-BrAyaJ0T.js} +6 -6
  128. package/dist/cdn/chunks/{icons-CQnjugjy.js.map → icons-BrAyaJ0T.js.map} +1 -1
  129. package/dist/{ja-DhlWUfke.js → cdn/chunks/ja-dcWzjStz.js} +8 -2
  130. package/dist/cdn/chunks/ja-dcWzjStz.js.map +1 -0
  131. package/dist/{nl-D8y5OWGB.js → cdn/chunks/nl-LZNqQgE4.js} +8 -2
  132. package/dist/cdn/chunks/nl-LZNqQgE4.js.map +1 -0
  133. package/dist/cdn/chunks/{pt-BR-DMCbUBvJ.js → pt-BR-D6P_mNwA.js} +7 -3
  134. package/dist/cdn/chunks/pt-BR-D6P_mNwA.js.map +1 -0
  135. package/dist/cdn/chunks/{src-CG5WUNg7.js → src-D5ceT_Y4.js} +2 -2
  136. package/dist/cdn/chunks/{src-CG5WUNg7.js.map → src-D5ceT_Y4.js.map} +1 -1
  137. package/dist/cdn/chunks/{useEditorCore-DoX2RgTl.js → useEditorCore-BTKqlRIg.js} +5 -5
  138. package/dist/cdn/chunks/{useEditorCore-DoX2RgTl.js.map → useEditorCore-BTKqlRIg.js.map} +1 -1
  139. package/dist/cdn/editor.css +1 -1
  140. package/dist/cdn/editor.js +14 -14
  141. package/dist/{check-BMx_TLAS.js → check-CA6fvSIp.js} +1 -1
  142. package/dist/{chevron-down-KZf5mh9_.js → chevron-down-DYGJgpqJ.js} +1 -1
  143. package/dist/{chevron-right-BLZ60Vxw.js → chevron-right-Dm5_X4j6.js} +1 -1
  144. package/dist/{chevron-up-B9ynB8eU.js → chevron-up-Ds9ormyq.js} +1 -1
  145. package/dist/{circle-alert-pjvFFDrF.js → circle-alert-BYXE0olE.js} +1 -1
  146. package/dist/{clock-CiiTBfF3.js → clock-Ch1-h0sb.js} +1 -1
  147. package/dist/{copy-BF0_pQjH.js → copy-DLNyaPza.js} +1 -1
  148. package/dist/{createLucideIcon-C2YOVVWx.js → createLucideIcon-BrPnbRQT.js} +5 -5
  149. package/dist/{de-xzrh9PA3.js → de-JvCTMJPy.js} +6 -2
  150. package/dist/{editor-modal-99FB40dl.js → editor-modal-Cl5GFWTQ.js} +484 -440
  151. package/dist/en-CdCFaV2V.js +2 -0
  152. package/dist/{es-BT4LSpE2.js → es-CAv-Vldw.js} +6 -2
  153. package/dist/{extensions-DqQXxrvP.js → extensions-AKHJ0lax.js} +1 -1
  154. package/dist/{eye-RdXYgrQZ.js → eye-_7xKFxQh.js} +1 -1
  155. package/dist/{cdn/chunks/fr-CI7OJoql.js → fr-DVPtxpR6.js} +6 -4
  156. package/dist/{image-up-BwdoReQt.js → image-up-Ck-xPOGS.js} +1 -1
  157. package/dist/{info-zFMSGrL1.js → info-CBBNLK_i.js} +1 -1
  158. package/dist/{cdn/chunks/ja-DhlWUfke.js → ja-dcWzjStz.js} +6 -4
  159. package/dist/{link-D7orqFBT.js → link-BA_V9Nns.js} +1 -1
  160. package/dist/{list-BGt4Pgxc.js → list-BTujzSSo.js} +1 -1
  161. package/dist/{loader-circle-BVBgkRGz.js → loader-circle-B5OQFRUF.js} +1 -1
  162. package/dist/{message-circle-D8YLsarv.js → message-circle-DWXr27lZ.js} +1 -1
  163. package/dist/{cdn/chunks/nl-D8y5OWGB.js → nl-LZNqQgE4.js} +6 -4
  164. package/dist/{package-CuFvk0L5.js → package-DXW9QTU3.js} +1 -1
  165. package/dist/{pencil-DRYbmZW7.js → pencil-QmONZtjF.js} +1 -1
  166. package/dist/{plus-Dv0b3kh0.js → plus-XxHKE_GT.js} +1 -1
  167. package/dist/{pt-BR-DMCbUBvJ.js → pt-BR-D6P_mNwA.js} +6 -2
  168. package/dist/{refresh-cw-gYTIS5bJ.js → refresh-cw-DhXU8dCo.js} +1 -1
  169. package/dist/{search-D84_Ki_a.js → search-CpFaMrnL.js} +1 -1
  170. package/dist/{send-Cn-8_H_U.js → send-CFK3e6tQ.js} +1 -1
  171. package/dist/{shield-check-BOoVWJtD.js → shield-check-ndwpOTik.js} +1 -1
  172. package/dist/{smartphone-4Ej3PBw5.js → smartphone-DndMh9W6.js} +1 -1
  173. package/dist/{socialIcons-CzRJskEk.js → socialIcons-D43BLoTu.js} +1 -1
  174. package/dist/{sparkles-D3vnNe7O.js → sparkles-c1M5lwAQ.js} +1 -1
  175. package/dist/style.css +1 -1
  176. package/dist/templatical-editor.js +28 -28
  177. package/dist/{text-align-start-Ci2h_Xly.js → text-align-start-DOtBufPq.js} +1 -1
  178. package/dist/{trash-wmi4UKvv.js → trash-DmaPdiUk.js} +1 -1
  179. package/dist/{triangle-alert-DJ0r2wmQ.js → triangle-alert-DqvxsSNL.js} +1 -1
  180. package/dist/{upload-XMde-TXf.js → upload-CO_hogFv.js} +1 -1
  181. package/dist/{useEditorCore-CAhRAya8.js → useEditorCore-0K8joh4X.js} +11 -11
  182. package/dist/{useScrollToBlock-B4F7KCrf.js → useScrollToBlock-BU5A9eS9.js} +1 -1
  183. package/dist/{x-BWrtpVl-.js → x-BCop_VsL.js} +1 -1
  184. package/package.json +8 -8
  185. package/dist/cdn/chunks/MediaEditModal-CzUtXkpk.js.map +0 -1
  186. package/dist/cdn/chunks/ca-BTf1Zbqb.js.map +0 -1
  187. package/dist/cdn/chunks/de-xzrh9PA3.js.map +0 -1
  188. package/dist/cdn/chunks/editor-modal-CZQArGNj.js.map +0 -1
  189. package/dist/cdn/chunks/en-9unxBjV8.js +0 -2
  190. package/dist/cdn/chunks/es-BT4LSpE2.js.map +0 -1
  191. package/dist/cdn/chunks/fr-CI7OJoql.js.map +0 -1
  192. package/dist/cdn/chunks/ja-DhlWUfke.js.map +0 -1
  193. package/dist/cdn/chunks/nl-D8y5OWGB.js.map +0 -1
  194. package/dist/cdn/chunks/pt-BR-DMCbUBvJ.js.map +0 -1
  195. package/dist/en-BvOjRLiw.js +0 -2
@@ -1,10 +1,10 @@
1
1
  import { A as e, B as t, E as n, F as r, H as i, L as a, N as o, P as s, Q as c, S as l, U as u, Y as d, at as f, b as p, c as m, ct as h, d as g, f as _, g as v, h as y, l as b, lt as x, m as S, n as C, nt as w, o as T, p as E, q as D, rt as O, u as k, ut as A, x as j, y as M } from "./draggable-IB4x6w2O.js";
2
2
  import { h as N } from "./dist-BRZhN8qJ.js";
3
3
  import { a as P, n as F, o as I, r as L, s as R, t as z } from "./dist-CXB2_kBa.js";
4
- import { B, Dt as V, Ft as ee, P as te, Rt as H, W as ne, Y as U, _t as re, at as W, bt as G, f as ie, lt as ae, n as oe, ot as se, q as K, s as ce, w as q, xt as J } from "./icons-CQnjugjy.js";
5
- import { t as Y } from "./_plugin-vue_export-helper-B3ysoDQm.js";
4
+ import { B, Dt as ee, Ft as te, P as ne, Rt as V, W as re, Y as ie, _t as ae, at as H, bt as U, f as oe, lt as se, n as ce, ot as le, q as W, s as ue, w as G, xt as K } from "./icons-BrAyaJ0T.js";
5
+ import { t as q } from "./_plugin-vue_export-helper-B3ysoDQm.js";
6
6
  //#region ../media-library/src/keys.ts
7
- var le = Symbol("templaticalMediaLimits"), X = Symbol("templaticalMediaPopoverTarget"), ue = Symbol("templaticalMediaTranslations"), Z = Symbol("templaticalMediaUiTheme"), de = Symbol("templaticalMediaUiLocale"), fe = { mediaLibrary: {
7
+ var de = Symbol("templaticalMediaLimits"), J = Symbol("templaticalMediaPopoverTarget"), fe = Symbol("templaticalMediaTranslations"), Y = Symbol("templaticalMediaUiTheme"), X = Symbol("templaticalMediaUiLocale"), pe = { mediaLibrary: {
8
8
  title: "Media Library",
9
9
  searchPlaceholder: "Search files...",
10
10
  allFiles: "All Files",
@@ -18,7 +18,9 @@ var le = Symbol("templaticalMediaLimits"), X = Symbol("templaticalMediaPopoverTa
18
18
  noFiles: "No files found",
19
19
  noSearchResults: "No files match your search",
20
20
  dropOrClick: "Drop files here or click to upload",
21
- acceptedFormats: "Images, PDF, Video, Audio, Documents (max 10MB)",
21
+ acceptedAnyType: "Any file type",
22
+ acceptedFormatsMaxSize: "{formats} (max {size})",
23
+ uploadRejected: "Not uploaded, type or size not accepted: {files}",
22
24
  uploading: "Uploading...",
23
25
  uploadingProgress: "Uploading {current} of {total}...",
24
26
  selectImage: "Select Image",
@@ -65,12 +67,14 @@ var le = Symbol("templaticalMediaLimits"), X = Symbol("templaticalMediaPopoverTa
65
67
  replaceFile: "Replace File",
66
68
  replaceWarningTitle: "Replace File",
67
69
  replaceWarningMessage: "You are about to replace this file. The replacement must have the same file extension ({extension}).",
68
- replaceWarningUsageNote: "This file is used in {count} template(s). Replacing it will update all references.",
70
+ replaceWarningUsageNote: "This file is used in {count} template(s). Check them after replacing it.",
69
71
  replaceSelectFile: "Select replacement file",
70
72
  replace: "Replace",
71
73
  replacing: "Replacing...",
72
74
  replaceError: "Failed to replace file",
73
75
  saving: "Saving...",
76
+ editSaveError: "Couldn't save your changes. Try again.",
77
+ editCropError: "Couldn't process the edited image. Try again.",
74
78
  cropAspectRatio: "Aspect Ratio",
75
79
  cropFree: "Free",
76
80
  cropSquare: "1:1",
@@ -95,8 +99,8 @@ var le = Symbol("templaticalMediaLimits"), X = Symbol("templaticalMediaPopoverTa
95
99
  } };
96
100
  //#endregion
97
101
  //#region ../media-library/src/composables/useI18n.ts
98
- function Q(e) {
99
- let t = e ?? n(ue, null), r = (D(t) ? t.value : t) ?? fe;
102
+ function Z(e) {
103
+ let t = e ?? n(fe, null), r = (D(t) ? t.value : t) ?? pe;
100
104
  function i(e, t) {
101
105
  return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
102
106
  }
@@ -107,36 +111,36 @@ function Q(e) {
107
111
  }
108
112
  //#endregion
109
113
  //#region ../media-library/src/composables/useMediaCategories.ts
110
- var pe = [
114
+ var me = [
111
115
  "images",
112
116
  "documents",
113
117
  "videos",
114
118
  "audio"
115
119
  ];
116
- function $(e) {
117
- let t = e ?? n(le, null);
120
+ function Q(e) {
121
+ let t = e ?? n(de, null);
118
122
  if (!t) throw Error("[Templatical] useMediaCategories() needs media limits in scope. Render it under <MediaLibraryModal> or provide MEDIA_LIMITS_KEY yourself.");
119
123
  let r = t, i = _(() => !0), a = _(() => r.maxFileSize ?? Infinity), o = _(() => {
120
124
  let e = r.accept;
121
125
  if (e && e.length > 0) return e;
122
126
  let t = r.mimeTypes;
123
- return t ? Object.keys(t) : pe;
127
+ return t ? Object.keys(t) : me;
124
128
  }), s = _(() => {
125
129
  let e = r.mimeTypes;
126
130
  return e ? o.value.flatMap((t) => e[t] ?? []) : [];
127
- }), c = _(() => s.value.join(","));
128
- function l(e, t) {
131
+ }), c = _(() => s.value.join(",")), l = _(() => r.mimeTypes !== void 0);
132
+ function u(e, t) {
129
133
  let n = r.mimeTypes;
130
134
  return !n || (t && t.length > 0 ? t : Object.keys(n)).some((t) => n[t]?.includes(e) ?? !1);
131
135
  }
132
- function u(e) {
133
- return l(e.type) && e.size <= a.value;
134
- }
135
136
  function d(e) {
137
+ return u(e.type) && e.size <= a.value;
138
+ }
139
+ function f(e) {
136
140
  let t = r.mimeTypes;
137
141
  return t ? t.images?.includes(e) ?? !1 : e.startsWith("image/");
138
142
  }
139
- function f(e) {
143
+ function p(e) {
140
144
  let t = r.mimeTypes;
141
145
  if (!t) return null;
142
146
  for (let [n, r] of Object.entries(t)) if (r?.includes(e)) return n;
@@ -146,18 +150,19 @@ function $(e) {
146
150
  isMediaLibraryEnabled: i,
147
151
  allAcceptedMimeTypes: s,
148
152
  allAcceptedInputString: c,
153
+ restrictsMimeTypes: l,
149
154
  maxFileSize: a,
150
155
  availableCategories: o,
151
- isAcceptedMimeType: l,
152
- isAcceptedFile: u,
153
- isImageMimeType: d,
154
- getCategoryForMimeType: f
156
+ isAcceptedMimeType: u,
157
+ isAcceptedFile: d,
158
+ isImageMimeType: f,
159
+ getCategoryForMimeType: p
155
160
  };
156
161
  }
157
162
  //#endregion
158
163
  //#region ../media-library/src/composables/useFocusTrap.ts
159
- var me = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
160
- function he(e, n) {
164
+ var he = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
165
+ function ge(e, n) {
161
166
  let r = null, i = null, a = null;
162
167
  function o(e) {
163
168
  if (!e) return document;
@@ -165,7 +170,7 @@ function he(e, n) {
165
170
  return t && "activeElement" in t ? t : document;
166
171
  }
167
172
  function s() {
168
- return e.value ? Array.from(e.value.querySelectorAll(me)).filter((e) => e.offsetParent !== null) : [];
173
+ return e.value ? Array.from(e.value.querySelectorAll(he)).filter((e) => e.offsetParent !== null) : [];
169
174
  }
170
175
  function c(t) {
171
176
  if (t.key !== "Tab") return;
@@ -195,14 +200,14 @@ function he(e, n) {
195
200
  }
196
201
  //#endregion
197
202
  //#region ../media-library/src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
198
- var ge = {
203
+ var _e = {
199
204
  key: 0,
200
205
  class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
201
206
  style: { color: "var(--tpl-text-muted)" }
202
- }, _e = ["onClick"], ve = {
207
+ }, ve = ["onClick"], ye = {
203
208
  key: 1,
204
209
  style: { color: "var(--tpl-text)" }
205
- }, ye = /* @__PURE__ */ l({
210
+ }, be = /* @__PURE__ */ l({
206
211
  __name: "MediaBreadcrumb",
207
212
  props: {
208
213
  folders: {},
@@ -210,7 +215,7 @@ var ge = {
210
215
  },
211
216
  emits: ["navigate"],
212
217
  setup(e, { emit: t }) {
213
- let n = e, i = t, { t: a } = Q(), s = _(() => {
218
+ let n = e, i = t, { t: a } = Z(), s = _(() => {
214
219
  if (!n.currentFolderId) return [];
215
220
  let e = [];
216
221
  return c(n.folders, n.currentFolderId, e), e;
@@ -222,11 +227,11 @@ var ge = {
222
227
  }
223
228
  return !1;
224
229
  }
225
- return (e, t) => s.value.length > 0 ? (o(), v("div", ge, [E("button", {
230
+ return (e, t) => s.value.length > 0 ? (o(), v("div", _e, [E("button", {
226
231
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
227
232
  style: { color: "var(--tpl-primary)" },
228
233
  onClick: t[0] ||= (e) => i("navigate", null)
229
- }, A(f(a).mediaLibrary.allFiles), 1), (o(!0), v(k, null, r(s.value, (e, t) => (o(), v(k, { key: e.id }, [p(f(ee), {
234
+ }, A(f(a).mediaLibrary.allFiles), 1), (o(!0), v(k, null, r(s.value, (e, t) => (o(), v(k, { key: e.id }, [p(f(te), {
230
235
  size: 12,
231
236
  "stroke-width": 2
232
237
  }), t < s.value.length - 1 ? (o(), v("button", {
@@ -234,15 +239,15 @@ var ge = {
234
239
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
235
240
  style: { color: "var(--tpl-primary)" },
236
241
  onClick: (t) => i("navigate", e.id)
237
- }, A(e.name), 9, _e)) : (o(), v("span", ve, A(e.name), 1))], 64))), 128))])) : y("", !0);
242
+ }, A(e.name), 9, ve)) : (o(), v("span", ye, A(e.name), 1))], 64))), 128))])) : y("", !0);
238
243
  }
239
- }), be = ["aria-expanded", "aria-label"], xe = {
244
+ }), xe = ["aria-expanded", "aria-label"], Se = {
240
245
  key: 1,
241
246
  class: "tpl:size-4 tpl:shrink-0"
242
- }, Se = {
247
+ }, Ce = {
243
248
  key: 0,
244
249
  class: "tpl:truncate"
245
- }, Ce = ["onKeydown"], we = ["title", "aria-label"], Te = ["title", "aria-label"], Ee = ["title", "aria-label"], De = { key: 0 }, Oe = ["placeholder", "onKeydown"], ke = /* @__PURE__ */ l({
250
+ }, we = ["onKeydown"], Te = ["title", "aria-label"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = { key: 0 }, ke = ["placeholder", "onKeydown"], Ae = /* @__PURE__ */ l({
246
251
  __name: "MediaFolderTreeNode",
247
252
  props: {
248
253
  folder: {},
@@ -259,7 +264,7 @@ var ge = {
259
264
  "deleteFolder"
260
265
  ],
261
266
  setup(e, { emit: t }) {
262
- let n = e, i = t, { t: s } = Q(), l = c(!1), d = c(!1), g = c(""), C = c(!1), w = c(""), D = c(!1), O = _(() => n.folder.children.length > 0), j = _(() => n.depth < 4), M = _(() => n.currentFolderId === n.folder.id), N = _(() => n.currentFolderId ? F(n.folder.children, n.currentFolderId) : !1), P = _(() => l.value || N.value);
267
+ let n = e, i = t, { t: s } = Z(), l = c(!1), d = c(!1), g = c(""), C = c(!1), w = c(""), D = c(!1), O = _(() => n.folder.children.length > 0), j = _(() => n.depth < 4), M = _(() => n.currentFolderId === n.folder.id), N = _(() => n.currentFolderId ? F(n.folder.children, n.currentFolderId) : !1), P = _(() => l.value || N.value);
263
268
  function F(e, t) {
264
269
  for (let n of e) if (n.id === t || F(n.children, t)) return !0;
265
270
  return !1;
@@ -280,20 +285,20 @@ var ge = {
280
285
  function B() {
281
286
  C.value = !0, w.value = "", l.value = !0;
282
287
  }
283
- function V() {
288
+ function ee() {
284
289
  w.value.trim() && i("createFolder", w.value.trim(), n.folder.id), C.value = !1, w.value = "";
285
290
  }
286
- function te() {
291
+ function ne() {
287
292
  C.value = !1, w.value = "";
288
293
  }
289
- function H() {
294
+ function V() {
290
295
  if (D.value) {
291
296
  i("deleteFolder", n.folder.id), D.value = !1;
292
297
  return;
293
298
  }
294
299
  D.value = !0;
295
300
  }
296
- function U(e) {
301
+ function ie(e) {
297
302
  let t = e.relatedTarget;
298
303
  t && e.currentTarget.contains(t) || (D.value = !1);
299
304
  }
@@ -306,7 +311,7 @@ var ge = {
306
311
  backgroundColor: M.value ? "var(--tpl-bg-active)" : "transparent",
307
312
  color: M.value ? "var(--tpl-primary)" : "var(--tpl-text)"
308
313
  }),
309
- onFocusout: U
314
+ onFocusout: ie
310
315
  }, [
311
316
  O.value || C.value ? (o(), v("button", {
312
317
  key: 0,
@@ -315,20 +320,20 @@ var ge = {
315
320
  "aria-expanded": P.value,
316
321
  "aria-label": P.value ? f(s).mediaLibrary.collapseFolder : f(s).mediaLibrary.expandFolder,
317
322
  onClick: b(I, ["stop"])
318
- }, [p(f(ee), {
323
+ }, [p(f(te), {
319
324
  class: h(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
320
325
  size: 10,
321
326
  "stroke-width": 2
322
- }, null, 8, ["class"])], 8, be)) : (o(), v("span", xe)),
327
+ }, null, 8, ["class"])], 8, xe)) : (o(), v("span", Se)),
323
328
  E("button", {
324
329
  type: "button",
325
330
  class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
326
331
  onClick: n[0] ||= (t) => i("navigate", e.folder.id)
327
- }, [p(f(G), {
332
+ }, [p(f(U), {
328
333
  class: "tpl:shrink-0",
329
334
  size: 14,
330
335
  "stroke-width": 1.5
331
- }), d.value ? y("", !0) : (o(), v("span", Se, A(e.folder.name), 1))]),
336
+ }), d.value ? y("", !0) : (o(), v("span", Ce, A(e.folder.name), 1))]),
332
337
  d.value ? u((o(), v("input", {
333
338
  key: 2,
334
339
  "onUpdate:modelValue": n[1] ||= (e) => g.value = e,
@@ -343,7 +348,7 @@ var ge = {
343
348
  onKeydown: [m(R, ["enter"]), m(b(z, ["stop"]), ["escape"])],
344
349
  onBlur: R,
345
350
  onClick: n[2] ||= b(() => {}, ["stop"])
346
- }, null, 40, Ce)), [[T, g.value]]) : y("", !0),
351
+ }, null, 40, we)), [[T, g.value]]) : y("", !0),
347
352
  d.value ? y("", !0) : (o(), v("span", {
348
353
  key: 3,
349
354
  class: h(["tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:transition-opacity", M.value || D.value ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100"])
@@ -355,10 +360,10 @@ var ge = {
355
360
  title: f(s).mediaLibrary.addSubfolder,
356
361
  "aria-label": f(s).mediaLibrary.addSubfolder,
357
362
  onClick: b(B, ["stop"])
358
- }, [p(f(ne), {
363
+ }, [p(f(re), {
359
364
  size: 12,
360
365
  "stroke-width": 2
361
- })], 8, we)) : y("", !0),
366
+ })], 8, Te)) : y("", !0),
362
367
  e.canRenameFolder ? (o(), v("button", {
363
368
  key: 1,
364
369
  type: "button",
@@ -366,10 +371,10 @@ var ge = {
366
371
  title: f(s).mediaLibrary.renameFolder,
367
372
  "aria-label": f(s).mediaLibrary.renameFolder,
368
373
  onClick: b(L, ["stop"])
369
- }, [p(f(K), {
374
+ }, [p(f(W), {
370
375
  size: 12,
371
376
  "stroke-width": 2
372
- })], 8, Te)) : y("", !0),
377
+ })], 8, Ee)) : y("", !0),
373
378
  e.canDeleteFolder ? (o(), v("button", {
374
379
  key: 2,
375
380
  type: "button",
@@ -377,14 +382,14 @@ var ge = {
377
382
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
378
383
  title: D.value ? f(s).mediaLibrary.deleteFolderConfirm : f(s).mediaLibrary.deleteFolder,
379
384
  "aria-label": D.value ? f(s).mediaLibrary.deleteFolderConfirm : f(s).mediaLibrary.deleteFolder,
380
- onClick: b(H, ["stop"])
381
- }, [p(f(ie), {
385
+ onClick: b(V, ["stop"])
386
+ }, [p(f(oe), {
382
387
  size: 12,
383
388
  "stroke-width": 2,
384
389
  style: { color: "var(--tpl-danger)" }
385
- })], 8, Ee)) : y("", !0)
390
+ })], 8, De)) : y("", !0)
386
391
  ], 2))
387
- ], 36), P.value ? (o(), v("div", De, [(o(!0), v(k, null, r(e.folder.children, (t) => (o(), S(c, {
392
+ ], 36), P.value ? (o(), v("div", Oe, [(o(!0), v(k, null, r(e.folder.children, (t) => (o(), S(c, {
388
393
  key: t.id,
389
394
  folder: t,
390
395
  "current-folder-id": e.currentFolderId,
@@ -418,18 +423,18 @@ var ge = {
418
423
  },
419
424
  placeholder: f(s).mediaLibrary.subfolderName,
420
425
  autofocus: "",
421
- onKeydown: [m(V, ["enter"]), m(b(te, ["stop"]), ["escape"])],
422
- onBlur: V
423
- }, null, 40, Oe), [[T, w.value]])], 4)) : y("", !0)])) : y("", !0)]);
426
+ onKeydown: [m(ee, ["enter"]), m(b(ne, ["stop"]), ["escape"])],
427
+ onBlur: ee
428
+ }, null, 40, ke), [[T, w.value]])], 4)) : y("", !0)])) : y("", !0)]);
424
429
  };
425
430
  }
426
- }), Ae = {
431
+ }), je = {
427
432
  "data-testid": "media-folder-tree",
428
433
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:overflow-y-auto"
429
- }, je = {
434
+ }, Me = {
430
435
  key: 0,
431
436
  class: "tpl:px-3 tpl:py-2"
432
- }, Me = ["placeholder", "onKeydown"], Ne = /* @__PURE__ */ l({
437
+ }, Ne = ["placeholder", "onKeydown"], Pe = /* @__PURE__ */ l({
433
438
  __name: "MediaFolderTree",
434
439
  props: {
435
440
  folders: {},
@@ -448,7 +453,7 @@ var ge = {
448
453
  "showFrequentlyUsed"
449
454
  ],
450
455
  setup(e, { emit: t }) {
451
- let n = t, { t: i } = Q(), a = c(!1), s = c("");
456
+ let n = t, { t: i } = Z(), a = c(!1), s = c("");
452
457
  function l() {
453
458
  a.value = !0, s.value = "";
454
459
  }
@@ -458,7 +463,7 @@ var ge = {
458
463
  function h() {
459
464
  a.value = !1, s.value = "";
460
465
  }
461
- return (t, c) => (o(), v("div", Ae, [
466
+ return (t, c) => (o(), v("div", je, [
462
467
  E("button", {
463
468
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
464
469
  style: x({
@@ -466,11 +471,11 @@ var ge = {
466
471
  color: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
467
472
  }),
468
473
  onClick: c[0] ||= (e) => n("navigate", null)
469
- }, [p(f(J), {
474
+ }, [p(f(K), {
470
475
  size: 14,
471
476
  "stroke-width": 1.5
472
477
  }), M(" " + A(f(i).mediaLibrary.allFiles), 1)], 4),
473
- (o(!0), v(k, null, r(e.folders, (t) => (o(), S(ke, {
478
+ (o(!0), v(k, null, r(e.folders, (t) => (o(), S(Ae, {
474
479
  key: t.id,
475
480
  folder: t,
476
481
  "current-folder-id": e.currentFolderId,
@@ -489,7 +494,7 @@ var ge = {
489
494
  "can-rename-folder",
490
495
  "can-delete-folder"
491
496
  ]))), 128)),
492
- a.value ? (o(), v("div", je, [u(E("input", {
497
+ a.value ? (o(), v("div", Me, [u(E("input", {
493
498
  "onUpdate:modelValue": c[5] ||= (e) => s.value = e,
494
499
  type: "text",
495
500
  class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
@@ -502,13 +507,13 @@ var ge = {
502
507
  autofocus: "",
503
508
  onKeydown: [m(d, ["enter"]), m(b(h, ["stop"]), ["escape"])],
504
509
  onBlur: d
505
- }, null, 40, Me), [[T, s.value]])])) : y("", !0),
510
+ }, null, 40, Ne), [[T, s.value]])])) : y("", !0),
506
511
  !a.value && e.canCreateFolder ? (o(), v("button", {
507
512
  key: 1,
508
513
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
509
514
  style: { color: "var(--tpl-text-muted)" },
510
515
  onClick: l
511
- }, [p(f(ne), {
516
+ }, [p(f(re), {
512
517
  size: 14,
513
518
  "stroke-width": 1.5
514
519
  }), M(" " + A(f(i).mediaLibrary.newFolder), 1)])) : y("", !0),
@@ -523,13 +528,13 @@ var ge = {
523
528
  color: e.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
524
529
  }),
525
530
  onClick: c[6] ||= (e) => n("showFrequentlyUsed")
526
- }, [p(f(q), {
531
+ }, [p(f(G), {
527
532
  size: 14,
528
533
  "stroke-width": 1.5
529
534
  }), M(" " + A(f(i).mediaLibrary.frequentlyUsed), 1)], 4)) : y("", !0)
530
535
  ]));
531
536
  }
532
- }), Pe = /* @__PURE__ */ l({
537
+ }), Fe = /* @__PURE__ */ l({
533
538
  __name: "MediaFileIcon",
534
539
  props: { mimeType: {} },
535
540
  setup(e) {
@@ -705,7 +710,7 @@ var ge = {
705
710
  });
706
711
  //#endregion
707
712
  //#region ../media-library/src/utils/formatAbsoluteDate.ts
708
- function Fe(e, t, n) {
713
+ function Ie(e, t, n) {
709
714
  let r = new Date(e);
710
715
  if (Number.isNaN(r.getTime())) return "";
711
716
  let i = t?.trim().replace(/_/g, "-") || void 0;
@@ -716,35 +721,48 @@ function Fe(e, t, n) {
716
721
  }
717
722
  }
718
723
  //#endregion
724
+ //#region ../media-library/src/utils/formatFileSize.ts
725
+ var Le = [
726
+ "B",
727
+ "KB",
728
+ "MB",
729
+ "GB"
730
+ ];
731
+ function $(e) {
732
+ let t = e, n = 0;
733
+ for (; t >= 1024 && n < Le.length - 1;) t /= 1024, n += 1;
734
+ return `${Math.round(t * 10) / 10} ${Le[n]}`;
735
+ }
736
+ //#endregion
719
737
  //#region ../media-library/src/components/media/MediaGrid.vue?vue&type=script&setup=true&lang.ts
720
- var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
738
+ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
721
739
  key: 1,
722
740
  class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-16"
723
- }, ze = {
741
+ }, Ve = {
724
742
  class: "tpl:text-xs",
725
743
  style: { color: "var(--tpl-text-muted)" }
726
- }, Be = ["aria-label"], Ve = [
744
+ }, He = ["aria-label"], Ue = [
727
745
  "data-media-id",
728
746
  "aria-selected",
729
747
  "aria-label",
730
748
  "onClick",
731
749
  "onDblclick",
732
750
  "onKeydown"
733
- ], He = { class: "tpl:aspect-square" }, Ue = ["src", "alt"], We = { class: "tpl:px-2 tpl:py-1.5" }, Ge = {
751
+ ], We = { class: "tpl:aspect-square" }, Ge = ["src", "alt"], Ke = { class: "tpl:px-2 tpl:py-1.5" }, qe = {
734
752
  class: "tpl:truncate tpl:text-[10px] tpl:font-medium",
735
753
  style: { color: "var(--tpl-text)" }
736
- }, Ke = {
754
+ }, Je = {
737
755
  class: "tpl:flex tpl:justify-between tpl:text-[10px]",
738
756
  style: { color: "var(--tpl-text-muted)" }
739
- }, qe = { key: 0 }, Je = { key: 1 }, Ye = [
757
+ }, Ye = { key: 0 }, Xe = { key: 1 }, Ze = [
740
758
  "title",
741
759
  "aria-label",
742
760
  "onClick"
743
- ], Xe = [
761
+ ], Qe = [
744
762
  "title",
745
763
  "aria-label",
746
764
  "onClick"
747
- ], Ze = {
765
+ ], $e = {
748
766
  key: 0,
749
767
  "aria-hidden": "true",
750
768
  class: "tpl:absolute tpl:top-1.5 tpl:right-1.5 tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full",
@@ -752,34 +770,34 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
752
770
  "background-color": "var(--tpl-primary)",
753
771
  color: "var(--tpl-on-primary)"
754
772
  }
755
- }, Qe = ["aria-label"], $e = [
773
+ }, et = ["aria-label"], tt = [
756
774
  "data-media-id",
757
775
  "aria-selected",
758
776
  "aria-label",
759
777
  "onClick",
760
778
  "onDblclick",
761
779
  "onKeydown"
762
- ], et = {
780
+ ], nt = {
763
781
  class: "tpl:size-10 tpl:shrink-0 tpl:overflow-hidden tpl:rounded",
764
782
  style: { "background-color": "var(--tpl-bg-hover)" }
765
- }, tt = ["src", "alt"], nt = {
783
+ }, rt = ["src", "alt"], it = {
766
784
  key: 1,
767
785
  class: "tpl-list-icon tpl:size-full"
768
- }, rt = { class: "tpl:min-w-0 tpl:flex-1" }, it = {
786
+ }, at = { class: "tpl:min-w-0 tpl:flex-1" }, ot = {
769
787
  class: "tpl:truncate tpl:text-xs tpl:font-medium",
770
788
  style: { color: "var(--tpl-text)" }
771
- }, at = {
789
+ }, st = {
772
790
  class: "tpl:text-[10px]",
773
791
  style: { color: "var(--tpl-text-muted)" }
774
- }, ot = [
792
+ }, ct = [
775
793
  "title",
776
794
  "aria-label",
777
795
  "onClick"
778
- ], st = [
796
+ ], lt = [
779
797
  "title",
780
798
  "aria-label",
781
799
  "onClick"
782
- ], ct = {
800
+ ], ut = {
783
801
  key: 0,
784
802
  "aria-hidden": "true",
785
803
  class: "tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-full",
@@ -787,10 +805,10 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
787
805
  "background-color": "var(--tpl-primary)",
788
806
  color: "var(--tpl-on-primary)"
789
807
  }
790
- }, lt = {
808
+ }, dt = {
791
809
  key: 4,
792
810
  class: "tpl:flex tpl:justify-center tpl:py-4"
793
- }, ut = /*#__PURE__*/ Y(/* @__PURE__ */ l({
811
+ }, ft = /*#__PURE__*/ q(/* @__PURE__ */ l({
794
812
  __name: "MediaGrid",
795
813
  props: {
796
814
  items: {},
@@ -812,7 +830,7 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
812
830
  "confirm"
813
831
  ],
814
832
  setup(e, { emit: t }) {
815
- let i = e, a = t, { isAcceptedMimeType: s, isImageMimeType: l } = $();
833
+ let i = e, a = t, { isAcceptedMimeType: s, isImageMimeType: l } = Q();
816
834
  function u(e) {
817
835
  return e.mimeType ?? "";
818
836
  }
@@ -847,21 +865,18 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
847
865
  function O(e) {
848
866
  return D(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
849
867
  }
850
- let { t: j } = Q(), N = n(de, null), P = c(null);
868
+ let { t: j } = Z(), N = n(X, null), P = c(null);
851
869
  R(P, ([{ isIntersecting: e }]) => {
852
870
  e && i.hasMore && !i.isLoading && a("loadMore");
853
871
  }, { threshold: .1 });
854
872
  function F(e) {
855
- return e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1048576).toFixed(1)} MB`;
856
- }
857
- function I(e) {
858
- return Fe(e, N?.value, {
873
+ return Ie(e, N?.value, {
859
874
  year: "numeric",
860
875
  month: "short",
861
876
  day: "numeric"
862
877
  });
863
878
  }
864
- return (t, n) => (o(), v("div", Ie, [
879
+ return (t, n) => (o(), v("div", Re, [
865
880
  e.isLoading && e.items.length === 0 ? (o(), v("div", {
866
881
  key: 0,
867
882
  role: "status",
@@ -873,12 +888,12 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
873
888
  class: h(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
874
889
  style: { "background-color": "var(--tpl-bg-hover)" },
875
890
  "aria-hidden": "true"
876
- }, null, 2)), 64))], 10, Le)) : e.items.length === 0 ? (o(), v("div", Re, [p(f(J), {
891
+ }, null, 2)), 64))], 10, ze)) : e.items.length === 0 ? (o(), v("div", Be, [p(f(K), {
877
892
  class: "tpl:mb-3",
878
893
  size: 40,
879
894
  "stroke-width": 1,
880
895
  style: { color: "var(--tpl-text-dim)" }
881
- }), E("p", ze, A(e.searchQuery ? f(j).mediaLibrary.noSearchResults : f(j).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (o(), v("div", {
896
+ }), E("p", Ve, A(e.searchQuery ? f(j).mediaLibrary.noSearchResults : f(j).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (o(), v("div", {
882
897
  key: 3,
883
898
  role: "listbox",
884
899
  "aria-label": f(j).mediaLibrary.filesListAriaLabel,
@@ -898,16 +913,16 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
898
913
  onDblclick: (t) => w(e),
899
914
  onKeydown: (t) => T(e, t)
900
915
  }, [
901
- E("div", et, [f(l)(u(e)) ? (o(), v("img", {
916
+ E("div", nt, [f(l)(u(e)) ? (o(), v("img", {
902
917
  key: 0,
903
918
  src: d(e),
904
919
  alt: e.filename || e.url,
905
920
  class: "tpl:size-full tpl:object-cover",
906
921
  loading: "lazy"
907
- }, null, 8, tt)) : (o(), v("div", nt, [p(Pe, { "mime-type": u(e) }, null, 8, ["mime-type"])]))]),
908
- E("div", rt, [E("p", it, A(e.filename || e.url), 1), E("p", at, [
909
- e.size == null ? y("", !0) : (o(), v(k, { key: 0 }, [M(A(F(e.size)), 1)], 64)),
910
- e.createdAt ? (o(), v(k, { key: 1 }, [e.size == null ? y("", !0) : (o(), v(k, { key: 0 }, [M(" · ")], 64)), M(" " + A(I(e.createdAt)), 1)], 64)) : y("", !0),
922
+ }, null, 8, rt)) : (o(), v("div", it, [p(Fe, { "mime-type": u(e) }, null, 8, ["mime-type"])]))]),
923
+ E("div", at, [E("p", ot, A(e.filename || e.url), 1), E("p", st, [
924
+ e.size == null ? y("", !0) : (o(), v(k, { key: 0 }, [M(A(f($)(e.size)), 1)], 64)),
925
+ e.createdAt ? (o(), v(k, { key: 1 }, [e.size == null ? y("", !0) : (o(), v(k, { key: 0 }, [M(" · ")], 64)), M(" " + A(F(e.createdAt)), 1)], 64)) : y("", !0),
911
926
  f(l)(u(e)) && e.width && e.height ? (o(), v(k, { key: 2 }, [M(" · " + A(e.width) + "×" + A(e.height), 1)], 64)) : y("", !0)
912
927
  ])]),
913
928
  E("div", { class: h(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", O(e)]) }, [g(e) ? (o(), v("button", {
@@ -919,10 +934,10 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
919
934
  title: f(j).mediaLibrary.editFile,
920
935
  "aria-label": f(j).mediaLibrary.editFile,
921
936
  onClick: b((t) => a("edit", e), ["stop"])
922
- }, [p(f(K), {
937
+ }, [p(f(W), {
923
938
  size: 12,
924
939
  "stroke-width": 2
925
- })], 8, ot)) : y("", !0), _(e) ? (o(), v("button", {
940
+ })], 8, ct)) : y("", !0), _(e) ? (o(), v("button", {
926
941
  key: 1,
927
942
  type: "button",
928
943
  "data-testid": "media-replace",
@@ -934,12 +949,12 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
934
949
  }, [p(f(B), {
935
950
  size: 12,
936
951
  "stroke-width": 2
937
- })], 8, st)) : y("", !0)], 2),
938
- D(e) ? (o(), v("div", ct, [p(f(H), {
952
+ })], 8, lt)) : y("", !0)], 2),
953
+ D(e) ? (o(), v("div", ut, [p(f(V), {
939
954
  size: 12,
940
955
  "stroke-width": 3
941
956
  })])) : y("", !0)
942
- ], 46, $e))), 128))], 8, Qe)) : (o(), v("div", {
957
+ ], 46, tt))), 128))], 8, et)) : (o(), v("div", {
943
958
  key: 2,
944
959
  role: "listbox",
945
960
  "aria-label": f(j).mediaLibrary.filesListAriaLabel,
@@ -966,17 +981,17 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
966
981
  onDblclick: (t) => w(e),
967
982
  onKeydown: (t) => T(e, t)
968
983
  }, [
969
- E("div", He, [f(l)(u(e)) ? (o(), v("img", {
984
+ E("div", We, [f(l)(u(e)) ? (o(), v("img", {
970
985
  key: 0,
971
986
  src: d(e),
972
987
  alt: e.filename || e.url,
973
988
  class: "tpl:size-full tpl:object-cover",
974
989
  loading: "lazy"
975
- }, null, 8, Ue)) : (o(), S(Pe, {
990
+ }, null, 8, Ge)) : (o(), S(Fe, {
976
991
  key: 1,
977
992
  "mime-type": u(e)
978
993
  }, null, 8, ["mime-type"]))]),
979
- E("div", We, [E("p", Ge, A(e.filename || e.url), 1), E("p", Ke, [e.size == null ? y("", !0) : (o(), v("span", qe, A(F(e.size)), 1)), f(l)(u(e)) && e.width && e.height ? (o(), v("span", Je, A(e.width) + "×" + A(e.height), 1)) : y("", !0)])]),
994
+ E("div", Ke, [E("p", qe, A(e.filename || e.url), 1), E("p", Je, [e.size == null ? y("", !0) : (o(), v("span", Ye, A(f($)(e.size)), 1)), f(l)(u(e)) && e.width && e.height ? (o(), v("span", Xe, A(e.width) + "×" + A(e.height), 1)) : y("", !0)])]),
980
995
  E("div", { class: h(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", O(e)]) }, [g(e) ? (o(), v("button", {
981
996
  key: 0,
982
997
  type: "button",
@@ -989,10 +1004,10 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
989
1004
  title: f(j).mediaLibrary.editFile,
990
1005
  "aria-label": f(j).mediaLibrary.editFile,
991
1006
  onClick: b((t) => a("edit", e), ["stop"])
992
- }, [p(f(K), {
1007
+ }, [p(f(W), {
993
1008
  size: 11,
994
1009
  "stroke-width": 2
995
- })], 8, Ye)) : y("", !0), _(e) ? (o(), v("button", {
1010
+ })], 8, Ze)) : y("", !0), _(e) ? (o(), v("button", {
996
1011
  key: 1,
997
1012
  type: "button",
998
1013
  "data-testid": "media-replace",
@@ -1007,18 +1022,18 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1007
1022
  }, [p(f(B), {
1008
1023
  size: 11,
1009
1024
  "stroke-width": 2
1010
- })], 8, Xe)) : y("", !0)], 2),
1011
- D(e) ? (o(), v("div", Ze, [p(f(H), {
1025
+ })], 8, Qe)) : y("", !0)], 2),
1026
+ D(e) ? (o(), v("div", $e, [p(f(V), {
1012
1027
  size: 12,
1013
1028
  "stroke-width": 3
1014
1029
  })])) : y("", !0)
1015
- ], 46, Ve))), 128))], 8, Be)),
1030
+ ], 46, Ue))), 128))], 8, He)),
1016
1031
  E("div", {
1017
1032
  ref_key: "sentinelRef",
1018
1033
  ref: P,
1019
1034
  class: "tpl:h-4"
1020
1035
  }, null, 512),
1021
- e.isLoading && e.items.length > 0 ? (o(), v("div", lt, [p(f(W), {
1036
+ e.isLoading && e.items.length > 0 ? (o(), v("div", dt, [p(f(H), {
1022
1037
  class: "tpl-spinner",
1023
1038
  size: 20,
1024
1039
  "stroke-width": 2,
@@ -1026,26 +1041,26 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1026
1041
  })])) : y("", !0)
1027
1042
  ]));
1028
1043
  }
1029
- }), [["__scopeId", "data-v-373617e3"]]), dt = ["data-tpl-theme"], ft = {
1044
+ }), [["__scopeId", "data-v-57c35946"]]), pt = ["data-tpl-theme"], mt = {
1030
1045
  id: "tpl-media-import-title",
1031
1046
  class: "tpl:mb-4 tpl:text-sm tpl:font-semibold",
1032
1047
  style: { color: "var(--tpl-text)" }
1033
- }, pt = { class: "tpl:mb-3" }, mt = [
1048
+ }, ht = { class: "tpl:mb-3" }, gt = [
1034
1049
  "aria-label",
1035
1050
  "aria-invalid",
1036
1051
  "aria-describedby",
1037
1052
  "placeholder",
1038
1053
  "disabled"
1039
- ], ht = {
1054
+ ], _t = {
1040
1055
  key: 0,
1041
1056
  id: "tpl-media-import-error",
1042
1057
  role: "alert",
1043
1058
  class: "tpl:mb-3 tpl:text-xs",
1044
1059
  style: { color: "var(--tpl-danger)" }
1045
- }, gt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, _t = ["disabled"], vt = ["disabled"], yt = {
1060
+ }, vt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, yt = ["disabled"], bt = ["disabled"], xt = {
1046
1061
  key: 0,
1047
1062
  class: "tpl:flex tpl:items-center tpl:gap-1.5"
1048
- }, bt = { key: 1 }, xt = /* @__PURE__ */ l({
1063
+ }, St = { key: 1 }, Ct = /* @__PURE__ */ l({
1049
1064
  __name: "MediaImportUrlModal",
1050
1065
  props: {
1051
1066
  visible: { type: Boolean },
@@ -1054,7 +1069,7 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1054
1069
  },
1055
1070
  emits: ["import", "close"],
1056
1071
  setup(e, { emit: r }) {
1057
- let a = e, s = r, { t: l } = Q(), d = n(Z, null), m = n(X, c(null)), x = c("");
1072
+ let a = e, s = r, { t: l } = Z(), d = n(Y, null), m = n(J, c(null)), x = c("");
1058
1073
  t(() => a.visible, (e) => {
1059
1074
  e && (x.value = "");
1060
1075
  });
@@ -1066,7 +1081,7 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1066
1081
  a.isImporting || s("close");
1067
1082
  }
1068
1083
  let O = c(null);
1069
- he(O, _(() => a.visible));
1084
+ ge(O, _(() => a.visible));
1070
1085
  function k(e) {
1071
1086
  e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), w()), e.key === "Escape" && D();
1072
1087
  }
@@ -1094,8 +1109,8 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1094
1109
  class: "tpl:max-h-[90%] tpl:w-full tpl:max-w-sm tpl:overflow-y-auto tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
1095
1110
  style: { "background-color": "var(--tpl-bg-elevated)" }
1096
1111
  }, [
1097
- E("h3", ft, A(f(l).mediaLibrary.importFromUrl), 1),
1098
- E("div", pt, [u(E("input", {
1112
+ E("h3", mt, A(f(l).mediaLibrary.importFromUrl), 1),
1113
+ E("div", ht, [u(E("input", {
1099
1114
  "onUpdate:modelValue": n[0] ||= (e) => x.value = e,
1100
1115
  type: "url",
1101
1116
  "aria-label": f(l).mediaLibrary.importFromUrl,
@@ -1110,9 +1125,9 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1110
1125
  placeholder: f(l).mediaLibrary.importUrlPlaceholder,
1111
1126
  disabled: e.isImporting,
1112
1127
  autofocus: ""
1113
- }, null, 8, mt), [[T, x.value]])]),
1114
- e.error ? (o(), v("p", ht, A(e.error), 1)) : y("", !0),
1115
- E("div", gt, [E("button", {
1128
+ }, null, 8, gt), [[T, x.value]])]),
1129
+ e.error ? (o(), v("p", _t, A(e.error), 1)) : y("", !0),
1130
+ E("div", vt, [E("button", {
1116
1131
  class: h(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150", { "tpl:cursor-not-allowed tpl:opacity-50": e.isImporting }]),
1117
1132
  style: {
1118
1133
  "border-color": "var(--tpl-border)",
@@ -1121,7 +1136,7 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1121
1136
  },
1122
1137
  disabled: e.isImporting,
1123
1138
  onClick: D
1124
- }, A(f(l).mediaLibrary.cancel), 11, _t), E("button", {
1139
+ }, A(f(l).mediaLibrary.cancel), 11, yt), E("button", {
1125
1140
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
1126
1141
  style: {
1127
1142
  "background-color": "var(--tpl-primary)",
@@ -1129,20 +1144,20 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1129
1144
  },
1130
1145
  disabled: !x.value.trim() || e.isImporting,
1131
1146
  onClick: w
1132
- }, [e.isImporting ? (o(), v("span", yt, [p(f(W), {
1147
+ }, [e.isImporting ? (o(), v("span", xt, [p(f(H), {
1133
1148
  class: "tpl:animate-spin",
1134
1149
  size: 12,
1135
1150
  "stroke-width": 2
1136
- }), M(" " + A(f(l).mediaLibrary.importing), 1)])) : (o(), v("span", bt, A(f(l).mediaLibrary.import), 1))], 8, vt)])
1137
- ], 512)], 42, dt)) : y("", !0)]),
1151
+ }), M(" " + A(f(l).mediaLibrary.importing), 1)])) : (o(), v("span", St, A(f(l).mediaLibrary.import), 1))], 8, bt)])
1152
+ ], 512)], 42, pt)) : y("", !0)]),
1138
1153
  _: 1
1139
1154
  })], 8, ["to"]));
1140
1155
  }
1141
- }), St = { class: "tpl:max-h-56 tpl:overflow-y-auto tpl:py-1" }, Ct = ["disabled", "onClick"], wt = { class: "tpl:truncate" }, Tt = {
1156
+ }), wt = { class: "tpl:max-h-56 tpl:overflow-y-auto tpl:py-1" }, Tt = ["disabled", "onClick"], Et = { class: "tpl:truncate" }, Dt = {
1142
1157
  key: 0,
1143
1158
  class: "tpl:shrink-0",
1144
1159
  style: { color: "var(--tpl-text-dim)" }
1145
- }, Et = /* @__PURE__ */ l({
1160
+ }, Ot = /* @__PURE__ */ l({
1146
1161
  __name: "MediaMovePicker",
1147
1162
  props: {
1148
1163
  folders: {},
@@ -1150,7 +1165,7 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1150
1165
  },
1151
1166
  emits: ["select", "close"],
1152
1167
  setup(e, { emit: t }) {
1153
- let n = t, { t: i } = Q(), a = c(null);
1168
+ let n = t, { t: i } = Z(), a = c(null);
1154
1169
  function s(e, t = 0) {
1155
1170
  let n = [];
1156
1171
  for (let r of e) n.push({
@@ -1171,12 +1186,12 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1171
1186
  "border-color": "var(--tpl-border)",
1172
1187
  "background-color": "var(--tpl-bg-elevated)"
1173
1188
  }
1174
- }, [E("div", St, [e.currentFolderId === null ? y("", !0) : (o(), v("button", {
1189
+ }, [E("div", wt, [e.currentFolderId === null ? y("", !0) : (o(), v("button", {
1175
1190
  key: 0,
1176
1191
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
1177
1192
  style: { color: "var(--tpl-text)" },
1178
1193
  onClick: c[0] ||= (e) => n("select", null)
1179
- }, [p(f(J), {
1194
+ }, [p(f(K), {
1180
1195
  class: "tpl:shrink-0",
1181
1196
  size: 14,
1182
1197
  "stroke-width": 1.5
@@ -1191,33 +1206,33 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1191
1206
  disabled: t.id === e.currentFolderId,
1192
1207
  onClick: (e) => n("select", t.id)
1193
1208
  }, [
1194
- p(f(G), {
1209
+ p(f(U), {
1195
1210
  class: "tpl:shrink-0",
1196
1211
  size: 14,
1197
1212
  "stroke-width": 1.5
1198
1213
  }),
1199
- E("span", wt, A(t.name), 1),
1200
- t.id === e.currentFolderId ? (o(), v("span", Tt, A(f(i).mediaLibrary.currentFolder), 1)) : y("", !0)
1201
- ], 12, Ct))), 128))])], 512));
1214
+ E("span", Et, A(t.name), 1),
1215
+ t.id === e.currentFolderId ? (o(), v("span", Dt, A(f(i).mediaLibrary.currentFolder), 1)) : y("", !0)
1216
+ ], 12, Tt))), 128))])], 512));
1202
1217
  }
1203
- }), Dt = { class: "tpl:flex tpl:items-center tpl:gap-3" }, Ot = ["src", "alt"], kt = {
1218
+ }), kt = { class: "tpl:flex tpl:items-center tpl:gap-3" }, At = ["src", "alt"], jt = {
1204
1219
  key: 1,
1205
1220
  class: "tpl:flex tpl:size-10 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:overflow-hidden tpl:rounded",
1206
1221
  style: { border: "1px solid var(--tpl-border)" }
1207
- }, At = { class: "tpl:min-w-0 tpl:flex-1" }, jt = {
1222
+ }, Mt = { class: "tpl:min-w-0 tpl:flex-1" }, Nt = {
1208
1223
  class: "tpl:truncate tpl:text-xs tpl:font-medium",
1209
1224
  style: { color: "var(--tpl-text)" }
1210
- }, Mt = {
1225
+ }, Pt = {
1211
1226
  class: "tpl:mt-0.5 tpl:text-[10px]",
1212
1227
  style: { color: "var(--tpl-text-muted)" }
1213
- }, Nt = /*#__PURE__*/ Y(/* @__PURE__ */ l({
1228
+ }, Ft = /*#__PURE__*/ q(/* @__PURE__ */ l({
1214
1229
  __name: "MediaPreviewPanel",
1215
1230
  props: {
1216
1231
  item: {},
1217
1232
  folders: {}
1218
1233
  },
1219
1234
  setup(e) {
1220
- let t = e, r = n(de, null), { isImageMimeType: i } = $();
1235
+ let t = e, r = n(X, null), { isImageMimeType: i } = Q();
1221
1236
  function a(e, t, n = []) {
1222
1237
  for (let r of e) {
1223
1238
  let e = [...n, r.name];
@@ -1235,34 +1250,31 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1235
1250
  return e ? e.join("/") : null;
1236
1251
  }), c = _(() => t.item.mimeType ?? ""), l = _(() => i(c.value));
1237
1252
  function u(e) {
1238
- return e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1048576).toFixed(1)} MB`;
1239
- }
1240
- function d(e) {
1241
- return Fe(e, r?.value, {
1253
+ return Ie(e, r?.value, {
1242
1254
  year: "numeric",
1243
1255
  month: "short",
1244
1256
  day: "numeric"
1245
1257
  });
1246
1258
  }
1247
- let m = _(() => t.item.filename || t.item.url);
1248
- return (t, n) => (o(), v("div", Dt, [l.value ? (o(), v("img", {
1259
+ let d = _(() => t.item.filename || t.item.url);
1260
+ return (t, n) => (o(), v("div", kt, [l.value ? (o(), v("img", {
1249
1261
  key: 0,
1250
1262
  src: e.item.url,
1251
- alt: e.item.alt || m.value,
1263
+ alt: e.item.alt || d.value,
1252
1264
  class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
1253
1265
  style: { border: "1px solid var(--tpl-border)" }
1254
- }, null, 8, Ot)) : (o(), v("div", kt, [p(Pe, {
1266
+ }, null, 8, At)) : (o(), v("div", jt, [p(Fe, {
1255
1267
  "mime-type": c.value,
1256
1268
  class: "tpl-preview-icon"
1257
- }, null, 8, ["mime-type"])])), E("div", At, [
1258
- E("p", jt, A(m.value), 1),
1259
- E("p", Mt, [
1260
- e.item.size == null ? y("", !0) : (o(), v(k, { key: 0 }, [M(A(u(e.item.size)), 1)], 64)),
1261
- e.item.createdAt ? (o(), v(k, { key: 1 }, [e.item.size == null ? y("", !0) : (o(), v(k, { key: 0 }, [M(" · ")], 64)), M(" " + A(d(e.item.createdAt)), 1)], 64)) : y("", !0),
1269
+ }, null, 8, ["mime-type"])])), E("div", Mt, [
1270
+ E("p", Nt, A(d.value), 1),
1271
+ E("p", Pt, [
1272
+ e.item.size == null ? y("", !0) : (o(), v(k, { key: 0 }, [M(A(f($)(e.item.size)), 1)], 64)),
1273
+ e.item.createdAt ? (o(), v(k, { key: 1 }, [e.item.size == null ? y("", !0) : (o(), v(k, { key: 0 }, [M(" · ")], 64)), M(" " + A(u(e.item.createdAt)), 1)], 64)) : y("", !0),
1262
1274
  l.value && e.item.width && e.item.height ? (o(), v(k, { key: 2 }, [M(" · " + A(e.item.width) + "×" + A(e.item.height) + "px ", 1)], 64)) : y("", !0),
1263
1275
  s.value ? (o(), v(k, { key: 3 }, [
1264
1276
  n[0] ||= M(" · ", -1),
1265
- p(f(G), {
1277
+ p(f(U), {
1266
1278
  class: "tpl:mb-px tpl:inline",
1267
1279
  size: 9,
1268
1280
  "stroke-width": 2
@@ -1277,37 +1289,37 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1277
1289
  }, A(e.item.alt || "\xA0"), 3)) : y("", !0)
1278
1290
  ])]));
1279
1291
  }
1280
- }), [["__scopeId", "data-v-c3c1707e"]]), Pt = ["data-tpl-theme"], Ft = {
1292
+ }), [["__scopeId", "data-v-50993988"]]), It = ["data-tpl-theme"], Lt = {
1281
1293
  id: "tpl-media-replace-title",
1282
1294
  class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
1283
1295
  style: { color: "var(--tpl-text)" }
1284
- }, It = {
1296
+ }, Rt = {
1285
1297
  class: "tpl:mb-2 tpl:text-xs",
1286
1298
  style: { color: "var(--tpl-text-muted)" }
1287
- }, Lt = {
1299
+ }, zt = {
1288
1300
  key: 0,
1289
1301
  class: "tpl:mb-3 tpl:text-xs",
1290
1302
  style: { color: "var(--tpl-text-muted)" }
1291
- }, Rt = {
1303
+ }, Bt = {
1292
1304
  class: "tpl:mb-3 tpl:rounded tpl:border tpl:p-2",
1293
1305
  style: { "border-color": "var(--tpl-border)" }
1294
- }, zt = {
1306
+ }, Vt = {
1295
1307
  class: "tpl:truncate tpl:text-xs tpl:font-medium",
1296
1308
  style: { color: "var(--tpl-text)" }
1297
- }, Bt = { class: "tpl:mb-4" }, Vt = {
1309
+ }, Ht = { class: "tpl:mb-4" }, Ut = {
1298
1310
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
1299
1311
  style: { color: "var(--tpl-text-muted)" }
1300
- }, Ht = [
1312
+ }, Wt = [
1301
1313
  "accept",
1302
1314
  "aria-invalid",
1303
1315
  "aria-describedby"
1304
- ], Ut = {
1316
+ ], Gt = {
1305
1317
  key: 1,
1306
1318
  id: "tpl-media-replace-error",
1307
1319
  role: "alert",
1308
1320
  class: "tpl:mb-3 tpl:text-xs",
1309
1321
  style: { color: "var(--tpl-danger)" }
1310
- }, Wt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Gt = ["disabled"], Kt = ["disabled"], qt = /* @__PURE__ */ l({
1322
+ }, Kt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, qt = ["disabled"], Jt = ["disabled"], Yt = /* @__PURE__ */ l({
1311
1323
  __name: "MediaReplaceModal",
1312
1324
  props: {
1313
1325
  visible: { type: Boolean },
@@ -1318,7 +1330,7 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1318
1330
  },
1319
1331
  emits: ["replace", "close"],
1320
1332
  setup(e, { emit: r }) {
1321
- let a = e, s = r, { t: l } = Q(), u = n(Z, null), d = n(X, c(null)), m = c(null), x = c(null), w = _(() => {
1333
+ let a = e, s = r, { t: l } = Z(), u = n(Y, null), d = n(J, c(null)), m = c(null), x = c(null), w = _(() => {
1322
1334
  if (!a.item) return "";
1323
1335
  let e = (a.item.filename ?? "").split(".");
1324
1336
  return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
@@ -1334,7 +1346,7 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1334
1346
  x.value && s("replace", x.value);
1335
1347
  }
1336
1348
  let j = c(null);
1337
- he(j, _(() => a.visible && a.item !== null));
1349
+ ge(j, _(() => a.visible && a.item !== null));
1338
1350
  function M(e) {
1339
1351
  e.stopPropagation(), e.key === "Escape" && s("close");
1340
1352
  }
@@ -1362,11 +1374,11 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1362
1374
  class: "tpl:max-h-[90%] tpl:w-full tpl:max-w-sm tpl:overflow-y-auto tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
1363
1375
  style: { "background-color": "var(--tpl-bg-elevated)" }
1364
1376
  }, [
1365
- E("h3", Ft, A(f(l).mediaLibrary.replaceWarningTitle), 1),
1366
- E("p", It, A(f(l).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${w.value}`)), 1),
1367
- D.value ? (o(), v("p", Lt, A(f(l).mediaLibrary.replaceWarningUsageNote.replace("{count}", e.usageInfo.templateCount.toString())), 1)) : y("", !0),
1368
- E("div", Rt, [E("p", zt, A(e.item.filename), 1)]),
1369
- E("div", Bt, [E("label", Vt, A(f(l).mediaLibrary.replaceSelectFile), 1), E("input", {
1377
+ E("h3", Lt, A(f(l).mediaLibrary.replaceWarningTitle), 1),
1378
+ E("p", Rt, A(f(l).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${w.value}`)), 1),
1379
+ D.value ? (o(), v("p", zt, A(f(l).mediaLibrary.replaceWarningUsageNote.replace("{count}", e.usageInfo.templateCount.toString())), 1)) : y("", !0),
1380
+ E("div", Bt, [E("p", Vt, A(e.item.filename), 1)]),
1381
+ E("div", Ht, [E("label", Ut, A(f(l).mediaLibrary.replaceSelectFile), 1), E("input", {
1370
1382
  ref_key: "fileInputRef",
1371
1383
  ref: m,
1372
1384
  type: "file",
@@ -1380,9 +1392,9 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1380
1392
  color: "var(--tpl-text)"
1381
1393
  },
1382
1394
  onChange: O
1383
- }, null, 40, Ht)]),
1384
- e.error ? (o(), v("p", Ut, A(e.error), 1)) : y("", !0),
1385
- E("div", Wt, [E("button", {
1395
+ }, null, 40, Wt)]),
1396
+ e.error ? (o(), v("p", Gt, A(e.error), 1)) : y("", !0),
1397
+ E("div", Kt, [E("button", {
1386
1398
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
1387
1399
  style: {
1388
1400
  "border-color": "var(--tpl-border)",
@@ -1391,7 +1403,7 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1391
1403
  },
1392
1404
  disabled: e.isReplacing,
1393
1405
  onClick: n[0] ||= (e) => s("close")
1394
- }, A(f(l).mediaLibrary.cancel), 9, Gt), E("button", {
1406
+ }, A(f(l).mediaLibrary.cancel), 9, qt), E("button", {
1395
1407
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
1396
1408
  style: {
1397
1409
  "background-color": "var(--tpl-primary)",
@@ -1399,24 +1411,53 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1399
1411
  },
1400
1412
  disabled: !x.value || e.isReplacing,
1401
1413
  onClick: k
1402
- }, A(e.isReplacing ? f(l).mediaLibrary.replacing : f(l).mediaLibrary.replace), 9, Kt)])
1403
- ], 512)], 42, Pt)) : y("", !0)]),
1414
+ }, A(e.isReplacing ? f(l).mediaLibrary.replacing : f(l).mediaLibrary.replace), 9, Jt)])
1415
+ ], 512)], 42, It)) : y("", !0)]),
1404
1416
  _: 1
1405
1417
  })], 8, ["to"]));
1406
1418
  }
1407
- }), Jt = ["aria-label", "aria-busy"], Yt = {
1419
+ });
1420
+ //#endregion
1421
+ //#region ../media-library/src/utils/formatList.ts
1422
+ function Xt(e, t) {
1423
+ let n = {
1424
+ style: "narrow",
1425
+ type: "conjunction"
1426
+ };
1427
+ try {
1428
+ return new Intl.ListFormat(t, n).format(e);
1429
+ } catch (t) {
1430
+ if (!(t instanceof RangeError)) throw t;
1431
+ return new Intl.ListFormat(void 0, n).format(e);
1432
+ }
1433
+ }
1434
+ //#endregion
1435
+ //#region ../media-library/src/components/media/MediaUploadZone.vue?vue&type=script&setup=true&lang.ts
1436
+ var Zt = [
1437
+ "aria-label",
1438
+ "aria-describedby",
1439
+ "aria-busy"
1440
+ ], Qt = {
1408
1441
  key: 0,
1409
1442
  class: "tpl:flex tpl:items-center tpl:gap-2"
1410
- }, Xt = {
1443
+ }, $t = {
1411
1444
  class: "tpl:text-xs",
1412
1445
  style: { color: "var(--tpl-text-muted)" }
1413
- }, Zt = {
1446
+ }, en = {
1414
1447
  class: "tpl:text-xs",
1415
1448
  style: { color: "var(--tpl-text-muted)" }
1416
- }, Qt = {
1449
+ }, tn = {
1450
+ id: "tpl-media-upload-hint",
1451
+ "data-testid": "media-upload-hint",
1417
1452
  class: "tpl:mt-1 tpl:text-[10px]",
1418
1453
  style: { color: "var(--tpl-text-dim)" }
1419
- }, $t = /* @__PURE__ */ l({
1454
+ }, nn = {
1455
+ key: 0,
1456
+ "data-testid": "media-upload-rejected",
1457
+ role: "alert",
1458
+ class: "tpl:mt-1.5 tpl:text-xs tpl:break-words",
1459
+ style: { color: "var(--tpl-danger)" }
1460
+ }, rn = /* @__PURE__ */ l({
1420
1461
  __name: "MediaUploadZone",
1421
1462
  props: {
1422
1463
  isUploading: { type: Boolean },
@@ -1424,66 +1465,74 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1424
1465
  },
1425
1466
  emits: ["upload"],
1426
1467
  setup(e, { emit: t }) {
1427
- let n = t, { t: r, format: i } = Q(), { allAcceptedInputString: a, isAcceptedFile: s } = $(), l = c();
1428
- function u(e) {
1429
- let t = [];
1430
- for (let n of Array.from(e)) s(n) && t.push(n);
1431
- return t;
1432
- }
1433
- function d(e) {
1434
- let t = u(e);
1435
- t.length && n("upload", t);
1436
- }
1437
- let { isOverDropZone: m } = L(l, { onDrop: (e) => {
1438
- e?.length && d(e);
1439
- } }), { open: g, onChange: _ } = I({
1440
- accept: a.value,
1468
+ let r = t, { t: i, format: a } = Z(), s = n(X, null), { allAcceptedInputString: l, restrictsMimeTypes: u, availableCategories: d, maxFileSize: m, isAcceptedFile: g } = Q(), b = {
1469
+ images: "filterImages",
1470
+ documents: "filterDocuments",
1471
+ videos: "filterVideos",
1472
+ audio: "filterAudio"
1473
+ }, x = _(() => {
1474
+ let e = i.mediaLibrary, t = u.value ? Xt(d.value.map((t) => e[b[t]]), s?.value) : i.mediaLibrary.acceptedAnyType;
1475
+ return Number.isFinite(m.value) ? a(i.mediaLibrary.acceptedFormatsMaxSize, {
1476
+ formats: t,
1477
+ size: $(m.value)
1478
+ }) : t;
1479
+ }), S = c([]), C = c();
1480
+ function w(e) {
1481
+ let t = [], n = [];
1482
+ for (let r of Array.from(e)) g(r) ? t.push(r) : n.push(r.name);
1483
+ S.value = n, t.length && r("upload", t);
1484
+ }
1485
+ let { isOverDropZone: T } = L(C, { onDrop: (e) => {
1486
+ e?.length && w(e);
1487
+ } }), { open: D, onChange: O } = I({
1488
+ accept: l.value,
1441
1489
  multiple: !0
1442
1490
  });
1443
- return _((e) => {
1444
- e?.length && d(e);
1445
- }), (t, n) => (o(), v("button", {
1491
+ return O((e) => {
1492
+ e?.length && w(e);
1493
+ }), (t, n) => (o(), v(k, null, [E("button", {
1446
1494
  ref_key: "dropZoneRef",
1447
- ref: l,
1495
+ ref: C,
1448
1496
  type: "button",
1449
1497
  "data-testid": "media-upload-zone",
1450
- class: h(["tpl-upload-zone tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-lg tpl:border-2 tpl:border-dashed tpl:p-5 tpl:text-center tpl:transition-all tpl:duration-150", f(m) ? "tpl-upload-zone-active" : ""]),
1451
- "aria-label": f(r).mediaLibrary.dropOrClick,
1498
+ class: h(["tpl-upload-zone tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-lg tpl:border-2 tpl:border-dashed tpl:p-5 tpl:text-center tpl:transition-all tpl:duration-150", f(T) ? "tpl-upload-zone-active" : ""]),
1499
+ "aria-label": f(i).mediaLibrary.dropOrClick,
1500
+ "aria-describedby": e.isUploading ? void 0 : "tpl-media-upload-hint",
1452
1501
  "aria-busy": e.isUploading,
1453
1502
  style: {
1454
1503
  "border-color": "var(--tpl-border-light)",
1455
1504
  "background-color": "var(--tpl-bg)"
1456
1505
  },
1457
- onClick: n[0] ||= (e) => f(g)()
1458
- }, [e.isUploading ? (o(), v("div", Yt, [p(f(W), {
1506
+ onClick: n[0] ||= (e) => f(D)()
1507
+ }, [e.isUploading ? (o(), v("div", Qt, [p(f(H), {
1459
1508
  class: "tpl-spinner",
1460
1509
  size: 20,
1461
1510
  "stroke-width": 2,
1462
1511
  style: { color: "var(--tpl-primary)" }
1463
- }), E("span", Xt, A(e.uploadProgress && e.uploadProgress.total > 1 ? f(i)(f(r).mediaLibrary.uploadingProgress, {
1512
+ }), E("span", $t, A(e.uploadProgress && e.uploadProgress.total > 1 ? f(a)(f(i).mediaLibrary.uploadingProgress, {
1464
1513
  current: e.uploadProgress.current,
1465
1514
  total: e.uploadProgress.total
1466
- }) : f(r).mediaLibrary.uploading), 1)])) : (o(), v(k, { key: 1 }, [
1467
- p(f(ce), {
1515
+ }) : f(i).mediaLibrary.uploading), 1)])) : (o(), v(k, { key: 1 }, [
1516
+ p(f(ue), {
1468
1517
  class: "tpl:mb-2",
1469
1518
  size: 24,
1470
1519
  "stroke-width": 1.5,
1471
1520
  style: { color: "var(--tpl-text-dim)" }
1472
1521
  }),
1473
- E("p", Zt, A(f(r).mediaLibrary.dropOrClick), 1),
1474
- E("p", Qt, A(f(r).mediaLibrary.acceptedFormats), 1)
1475
- ], 64))], 10, Jt));
1522
+ E("p", en, A(f(i).mediaLibrary.dropOrClick), 1),
1523
+ E("p", tn, A(x.value), 1)
1524
+ ], 64))], 10, Zt), S.value.length ? (o(), v("p", nn, A(f(a)(f(i).mediaLibrary.uploadRejected, { files: S.value.join(", ") })), 1)) : y("", !0)], 64));
1476
1525
  }
1477
- }), en = ["aria-label"], tn = [
1526
+ }), an = ["aria-label"], on = [
1478
1527
  "width",
1479
1528
  "height",
1480
1529
  "viewBox"
1481
- ], nn = [
1530
+ ], sn = [
1482
1531
  "cx",
1483
1532
  "cy",
1484
1533
  "r",
1485
1534
  "stroke-width"
1486
- ], rn = [
1535
+ ], cn = [
1487
1536
  "cx",
1488
1537
  "cy",
1489
1538
  "r",
@@ -1491,14 +1540,14 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1491
1540
  "stroke",
1492
1541
  "stroke-dasharray",
1493
1542
  "stroke-dashoffset"
1494
- ], an = {
1543
+ ], ln = {
1495
1544
  key: 0,
1496
1545
  class: "tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:-translate-x-1/2 tpl:rounded-md tpl:px-2.5 tpl:py-1.5 tpl:text-xs tpl:whitespace-nowrap tpl:shadow-lg",
1497
1546
  style: {
1498
1547
  "background-color": "var(--tpl-text)",
1499
1548
  color: "var(--tpl-bg-elevated)"
1500
1549
  }
1501
- }, on = /* @__PURE__ */ l({
1550
+ }, un = /* @__PURE__ */ l({
1502
1551
  __name: "StorageProgressRing",
1503
1552
  props: {
1504
1553
  usedBytes: {},
@@ -1506,27 +1555,16 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1506
1555
  size: {}
1507
1556
  },
1508
1557
  setup(e) {
1509
- let t = e, { t: n, format: r } = Q(), a = c(!1), s = _(() => t.size ?? 24), l = _(() => Math.max(2, s.value / 8)), u = _(() => (s.value - l.value) / 2), d = _(() => 2 * Math.PI * u.value), f = _(() => t.limitBytes <= 0 ? 0 : Math.min(100, t.usedBytes / t.limitBytes * 100)), m = _(() => d.value - f.value / 100 * d.value), h = _(() => f.value >= 95 ? "var(--tpl-danger)" : f.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)");
1510
- function g(e) {
1511
- if (e === 0) return "0 B";
1512
- let t = 1024, n = [
1513
- "B",
1514
- "KB",
1515
- "MB",
1516
- "GB"
1517
- ], r = Math.floor(Math.log(e) / Math.log(t));
1518
- return `${(e / t ** r).toFixed(+(r >= 2))} ${n[r]}`;
1519
- }
1520
- let b = _(() => g(t.usedBytes)), x = _(() => g(t.limitBytes)), S = _(() => Math.max(0, t.limitBytes - t.usedBytes)), w = _(() => g(S.value)), T = _(() => r(n.mediaLibrary.storageTooltip, {
1521
- used: b.value,
1522
- total: x.value,
1523
- remaining: w.value
1558
+ let t = e, { t: n, format: r } = Z(), a = c(!1), s = _(() => t.size ?? 24), l = _(() => Math.max(2, s.value / 8)), u = _(() => (s.value - l.value) / 2), d = _(() => 2 * Math.PI * u.value), f = _(() => t.limitBytes <= 0 ? 0 : Math.min(100, t.usedBytes / t.limitBytes * 100)), m = _(() => d.value - f.value / 100 * d.value), h = _(() => f.value >= 95 ? "var(--tpl-danger)" : f.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)"), g = _(() => $(t.usedBytes)), b = _(() => $(t.limitBytes)), x = _(() => Math.max(0, t.limitBytes - t.usedBytes)), S = _(() => $(x.value)), w = _(() => r(n.mediaLibrary.storageTooltip, {
1559
+ used: g.value,
1560
+ total: b.value,
1561
+ remaining: S.value
1524
1562
  }));
1525
1563
  return (e, t) => (o(), v("div", {
1526
1564
  "data-testid": "media-storage-ring",
1527
1565
  class: "tpl:relative tpl:inline-flex tpl:cursor-help tpl:items-center tpl:justify-center",
1528
1566
  tabindex: "0",
1529
- "aria-label": T.value,
1567
+ "aria-label": w.value,
1530
1568
  onMouseenter: t[0] ||= (e) => a.value = !0,
1531
1569
  onMouseleave: t[1] ||= (e) => a.value = !1,
1532
1570
  onFocus: t[2] ||= (e) => a.value = !0,
@@ -1543,7 +1581,7 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1543
1581
  fill: "none",
1544
1582
  "stroke-width": l.value,
1545
1583
  style: { stroke: "var(--tpl-border)" }
1546
- }, null, 8, nn), E("circle", {
1584
+ }, null, 8, sn), E("circle", {
1547
1585
  cx: s.value / 2,
1548
1586
  cy: s.value / 2,
1549
1587
  r: u.value,
@@ -1554,7 +1592,7 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1554
1592
  "stroke-dasharray": d.value,
1555
1593
  "stroke-dashoffset": m.value,
1556
1594
  class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
1557
- }, null, 8, rn)], 8, tn)), p(C, {
1595
+ }, null, 8, cn)], 8, on)), p(C, {
1558
1596
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
1559
1597
  "enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
1560
1598
  "enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
@@ -1562,17 +1600,17 @@ var Ie = { class: "tpl:p-4" }, Le = ["aria-label"], Re = {
1562
1600
  "leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
1563
1601
  "leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
1564
1602
  }, {
1565
- default: i(() => [a.value ? (o(), v("div", an, [M(A(T.value) + " ", 1), t[4] ||= E("div", {
1603
+ default: i(() => [a.value ? (o(), v("div", ln, [M(A(w.value) + " ", 1), t[4] ||= E("div", {
1566
1604
  class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
1567
1605
  style: { "background-color": "var(--tpl-text)" }
1568
1606
  }, null, -1)])) : y("", !0)]),
1569
1607
  _: 1
1570
- })], 40, en));
1608
+ })], 40, an));
1571
1609
  }
1572
1610
  });
1573
1611
  //#endregion
1574
1612
  //#region ../media-library/src/utils/treeFolders.ts
1575
- function sn(e) {
1613
+ function dn(e) {
1576
1614
  let t = /* @__PURE__ */ new Map();
1577
1615
  for (let n of e) t.set(n.id, {
1578
1616
  ...n,
@@ -1587,12 +1625,12 @@ function sn(e) {
1587
1625
  }
1588
1626
  //#endregion
1589
1627
  //#region ../media-library/src/composables/useMediaLibraryUI.ts
1590
- function cn(e) {
1628
+ function fn(e) {
1591
1629
  let { library: n, translations: r } = e;
1592
1630
  function i() {
1593
1631
  return "value" in r && typeof r.value == "object" ? r.value : r;
1594
1632
  }
1595
- let a = c("grid"), o = c(!1), s = c(""), l = c(null), u = c(!1), d = c(!1), f = _(() => n.previewItem.value?.url ?? null), p = _(() => n.frequentlyUsedItems.value.length > 0), m = _(() => n.viewMode.value === "frequently-used" ? n.frequentlyUsedItems.value : n.items.value), h = _(() => Object.values(n.deleteUsageInfo.value).some((e) => e.templateCount > 0)), g = _(() => sn(n.folders.value)), v = {
1633
+ let a = c("grid"), o = c(!1), s = c(""), l = c(null), u = c(!1), d = c(!1), f = _(() => n.previewItem.value?.url ?? null), p = _(() => n.frequentlyUsedItems.value.length > 0), m = _(() => n.viewMode.value === "frequently-used" ? n.frequentlyUsedItems.value : n.items.value), h = _(() => Object.values(n.deleteUsageInfo.value).some((e) => e.templateCount > 0)), g = _(() => dn(n.folders.value)), v = {
1596
1634
  images: () => i().mediaLibrary.filterImages,
1597
1635
  documents: () => i().mediaLibrary.filterDocuments,
1598
1636
  videos: () => i().mediaLibrary.filterVideos,
@@ -1633,7 +1671,7 @@ function cn(e) {
1633
1671
  l.value = e;
1634
1672
  }
1635
1673
  async function A(e, t, r, i) {
1636
- i && await n.replaceMediaDirectly(e, i.file), await n.updateFile(e, t, r), l.value = null;
1674
+ return i && !await n.replaceMediaDirectly(e, i.file) ? "failed" : await n.updateFile(e, t, r) ? (l.value = null, "saved") : i ? "replaced" : "failed";
1637
1675
  }
1638
1676
  async function j(e) {
1639
1677
  await n.importFromUrl(e) && (u.value = !1);
@@ -1686,7 +1724,7 @@ function cn(e) {
1686
1724
  }
1687
1725
  //#endregion
1688
1726
  //#region ../media-library/src/composable.ts
1689
- function ln(e) {
1727
+ function pn(e) {
1690
1728
  let { provider: t } = e, n = c([]), r = c([]), i = c(null), a = c("files"), o = c(""), s = c(null), l = c("newest"), u = c(!1), d = c(!1), f = c(!1), p = c(null), m = c(null), h = c(/* @__PURE__ */ new Set()), g = c(null), _ = c([]), v = c({}), y = c(!1), b = c([]), x = c(!1), S = c(null), C = c(!1), w = c(null), T = c(!1), E = c(null), D = c(null), k = c(null), A = 0;
1691
1729
  function j(t) {
1692
1730
  try {
@@ -1750,10 +1788,10 @@ function ln(e) {
1750
1788
  async function B(e) {
1751
1789
  a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await F();
1752
1790
  }
1753
- async function V() {
1754
- a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await G();
1791
+ async function ee() {
1792
+ a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await U();
1755
1793
  }
1756
- async function ee(r) {
1794
+ async function te(r) {
1757
1795
  let { create: a } = t;
1758
1796
  if (typeof a != "function") return null;
1759
1797
  d.value = !0;
@@ -1770,7 +1808,7 @@ function ln(e) {
1770
1808
  d.value = !1;
1771
1809
  }
1772
1810
  }
1773
- async function te(r) {
1811
+ async function ne(r) {
1774
1812
  let { create: a } = t;
1775
1813
  if (typeof a == "function") {
1776
1814
  d.value = !0, m.value = {
@@ -1799,7 +1837,7 @@ function ln(e) {
1799
1837
  }
1800
1838
  }
1801
1839
  }
1802
- async function H(t) {
1840
+ async function V(t) {
1803
1841
  if (h.value.size === 0) return;
1804
1842
  let { move: r } = M() ?? { move: !1 };
1805
1843
  if (typeof r == "function") try {
@@ -1813,39 +1851,40 @@ function ln(e) {
1813
1851
  e.onError?.(t);
1814
1852
  }
1815
1853
  }
1816
- async function ne(r, i, a) {
1854
+ async function re(r, i, a) {
1817
1855
  let { update: o } = t;
1818
- if (typeof o == "function") try {
1856
+ if (typeof o != "function") return !1;
1857
+ try {
1819
1858
  let e = { filename: i };
1820
1859
  a !== void 0 && (e.alt = a);
1821
1860
  let s = await o(r, e);
1822
- n.value = n.value.map((e) => e.id === r ? s : e), g.value?.id === r && (g.value = s), j(() => t.onUpdated?.(s));
1861
+ return n.value = n.value.map((e) => e.id === r ? s : e), g.value?.id === r && (g.value = s), j(() => t.onUpdated?.(s)), !0;
1823
1862
  } catch (t) {
1824
- e.onError?.(t);
1863
+ return e.onError?.(t), !1;
1825
1864
  }
1826
1865
  }
1827
- function U(e) {
1866
+ function ie(e) {
1828
1867
  let t = /* @__PURE__ */ new Map();
1829
1868
  for (let r of n.value) e.includes(r.id) && t.set(r.id, r);
1830
1869
  for (let n of _.value) e.includes(n.id) && !t.has(n.id) && t.set(n.id, n);
1831
1870
  return [...t.values()];
1832
1871
  }
1833
- function re(e) {
1872
+ function ae(e) {
1834
1873
  n.value = n.value.filter((t) => !e.includes(t.id)), _.value = _.value.filter((t) => !e.includes(t.id)), h.value = /* @__PURE__ */ new Set(), g.value = null;
1835
1874
  }
1836
- async function W() {
1875
+ async function H() {
1837
1876
  if (h.value.size === 0) return;
1838
1877
  let { delete: n } = t;
1839
1878
  if (typeof n != "function") return;
1840
- let r = [...h.value], i = U(r);
1879
+ let r = [...h.value], i = ie(r);
1841
1880
  try {
1842
- await n(r), re(r);
1881
+ await n(r), ae(r);
1843
1882
  for (let e of i) j(() => t.onDeleted?.(e));
1844
1883
  } catch (t) {
1845
1884
  e.onError?.(t);
1846
1885
  }
1847
1886
  }
1848
- async function G() {
1887
+ async function U() {
1849
1888
  let { frequentlyUsed: n } = t;
1850
1889
  if (typeof n == "function") try {
1851
1890
  _.value = await n();
@@ -1853,7 +1892,7 @@ function ln(e) {
1853
1892
  e.onError?.(t);
1854
1893
  }
1855
1894
  }
1856
- async function ie() {
1895
+ async function oe() {
1857
1896
  if (h.value.size === 0) return !1;
1858
1897
  b.value = [...h.value];
1859
1898
  let { checkUsage: n } = t;
@@ -1867,21 +1906,21 @@ function ln(e) {
1867
1906
  return e.onError?.(t), !1;
1868
1907
  }
1869
1908
  }
1870
- async function ae() {
1909
+ async function se() {
1871
1910
  let { delete: n } = t;
1872
1911
  if (typeof n != "function" || (y.value = !1, b.value.length === 0)) return;
1873
- let r = b.value, i = U(r);
1912
+ let r = b.value, i = ie(r);
1874
1913
  try {
1875
- await n(r), re(r), b.value = [], v.value = {};
1914
+ await n(r), ae(r), b.value = [], v.value = {};
1876
1915
  for (let e of i) j(() => t.onDeleted?.(e));
1877
1916
  } catch (t) {
1878
1917
  e.onError?.(t);
1879
1918
  }
1880
1919
  }
1881
- function oe() {
1920
+ function ce() {
1882
1921
  y.value = !1, b.value = [], v.value = {};
1883
1922
  }
1884
- async function se(r) {
1923
+ async function le(r) {
1885
1924
  let a = t.importFromUrl;
1886
1925
  if (typeof a != "function") return null;
1887
1926
  x.value = !0, S.value = null;
@@ -1894,17 +1933,17 @@ function ln(e) {
1894
1933
  x.value = !1;
1895
1934
  }
1896
1935
  }
1897
- function K(e) {
1936
+ function W(e) {
1898
1937
  let t = new Set(h.value);
1899
1938
  t.has(e) ? t.delete(e) : t.add(e), h.value = t;
1900
1939
  }
1901
- function ce() {
1940
+ function ue() {
1902
1941
  h.value = /* @__PURE__ */ new Set(), g.value = null;
1903
1942
  }
1904
- function q(e) {
1943
+ function G(e) {
1905
1944
  g.value = e, h.value = /* @__PURE__ */ new Set([e.id]);
1906
1945
  }
1907
- async function J() {
1946
+ async function K() {
1908
1947
  let { storage: n } = t;
1909
1948
  if (typeof n != "function") {
1910
1949
  k.value = null;
@@ -1916,7 +1955,7 @@ function ln(e) {
1916
1955
  e.onError?.(t);
1917
1956
  }
1918
1957
  }
1919
- async function Y() {
1958
+ async function q() {
1920
1959
  let t = M();
1921
1960
  if (t) try {
1922
1961
  r.value = await t.list();
@@ -1924,40 +1963,40 @@ function ln(e) {
1924
1963
  e.onError?.(t);
1925
1964
  }
1926
1965
  }
1927
- async function le(t, n) {
1966
+ async function de(t, n) {
1928
1967
  let { create: r } = M() ?? { create: !1 };
1929
1968
  if (typeof r != "function") return null;
1930
1969
  try {
1931
1970
  let e = { name: t };
1932
1971
  n !== void 0 && (e.parentId = n);
1933
1972
  let i = await r(e);
1934
- return await Y(), i;
1973
+ return await q(), i;
1935
1974
  } catch (t) {
1936
1975
  return e.onError?.(t), null;
1937
1976
  }
1938
1977
  }
1939
- function X(e, t) {
1978
+ function J(e, t) {
1940
1979
  for (let n of e) if (n.id === t) return n;
1941
1980
  return null;
1942
1981
  }
1943
- async function ue(t, n) {
1982
+ async function fe(t, n) {
1944
1983
  let { update: r } = M() ?? { update: !1 };
1945
1984
  if (typeof r == "function") try {
1946
- await r(t, { name: n }), await Y();
1985
+ await r(t, { name: n }), await q();
1947
1986
  } catch (t) {
1948
1987
  e.onError?.(t);
1949
1988
  }
1950
1989
  }
1951
- async function Z(t) {
1990
+ async function Y(t) {
1952
1991
  let { delete: n } = M() ?? { delete: !1 };
1953
1992
  if (typeof n == "function") try {
1954
- let e = X(r.value, t)?.parentId ?? null;
1955
- await n(t), i.value === t && (i.value = e), await Y(), await F();
1993
+ let e = J(r.value, t)?.parentId ?? null;
1994
+ await n(t), i.value === t && (i.value = e), await q(), await F();
1956
1995
  } catch (t) {
1957
1996
  e.onError?.(t);
1958
1997
  }
1959
1998
  }
1960
- async function de(n) {
1999
+ async function X(n) {
1961
2000
  E.value = n, w.value = null;
1962
2001
  let { checkUsage: r } = t;
1963
2002
  if (typeof r != "function") {
@@ -1971,31 +2010,31 @@ function ln(e) {
1971
2010
  e.onError?.(t);
1972
2011
  }
1973
2012
  }
1974
- function fe() {
2013
+ function pe() {
1975
2014
  T.value = !1, E.value = null, D.value = null, w.value = null;
1976
2015
  }
1977
- function Q(e) {
2016
+ function Z(e) {
1978
2017
  n.value = n.value.map((t) => t.id === e.id ? e : t), _.value = _.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), j(() => t.onUpdated?.(e));
1979
2018
  }
1980
- async function pe(n) {
2019
+ async function me(n) {
1981
2020
  let { replace: r } = t;
1982
2021
  if (typeof r != "function" || !E.value) return null;
1983
2022
  C.value = !0, w.value = null;
1984
2023
  try {
1985
2024
  let e = await r(E.value.id, n);
1986
- return Q(e), T.value = !1, E.value = null, D.value = null, e;
2025
+ return Z(e), T.value = !1, E.value = null, D.value = null, e;
1987
2026
  } catch (t) {
1988
2027
  return w.value = t instanceof Error ? t.message : "Replace failed", e.onError?.(t), null;
1989
2028
  } finally {
1990
2029
  C.value = !1;
1991
2030
  }
1992
2031
  }
1993
- async function $(n, r) {
2032
+ async function Q(n, r) {
1994
2033
  let { replace: i } = t;
1995
2034
  if (typeof i != "function") return null;
1996
2035
  try {
1997
2036
  let e = await i(n, r);
1998
- return Q(e), e;
2037
+ return Z(e), e;
1999
2038
  } catch (t) {
2000
2039
  return e.onError?.(t), null;
2001
2040
  }
@@ -2023,118 +2062,118 @@ function ln(e) {
2023
2062
  filterByCategory: R,
2024
2063
  sortBy: z,
2025
2064
  navigateToFolder: B,
2026
- showFrequentlyUsed: V,
2027
- uploadFile: ee,
2028
- uploadFiles: te,
2029
- moveSelected: H,
2030
- updateFile: ne,
2031
- deleteSelected: W,
2065
+ showFrequentlyUsed: ee,
2066
+ uploadFile: te,
2067
+ uploadFiles: ne,
2068
+ moveSelected: V,
2069
+ updateFile: re,
2070
+ deleteSelected: H,
2032
2071
  isImportingFromUrl: x,
2033
2072
  importFromUrlError: S,
2034
- importFromUrl: se,
2035
- toggleSelection: K,
2036
- clearSelection: ce,
2037
- selectItem: q,
2038
- loadFolders: Y,
2039
- createFolder: le,
2040
- renameFolder: ue,
2041
- deleteFolder: Z,
2042
- findFolderInTree: X,
2043
- loadFrequentlyUsed: G,
2044
- checkUsageBeforeDelete: ie,
2045
- confirmDelete: ae,
2046
- cancelDelete: oe,
2073
+ importFromUrl: le,
2074
+ toggleSelection: W,
2075
+ clearSelection: ue,
2076
+ selectItem: G,
2077
+ loadFolders: q,
2078
+ createFolder: de,
2079
+ renameFolder: fe,
2080
+ deleteFolder: Y,
2081
+ findFolderInTree: J,
2082
+ loadFrequentlyUsed: U,
2083
+ checkUsageBeforeDelete: oe,
2084
+ confirmDelete: se,
2085
+ cancelDelete: ce,
2047
2086
  isReplacing: C,
2048
2087
  replaceError: w,
2049
2088
  showReplaceWarning: T,
2050
2089
  pendingReplaceItem: E,
2051
2090
  replaceUsageInfo: D,
2052
- checkUsageBeforeReplace: de,
2053
- cancelReplace: fe,
2054
- replaceFile: pe,
2055
- replaceMediaDirectly: $,
2091
+ checkUsageBeforeReplace: X,
2092
+ cancelReplace: pe,
2093
+ replaceFile: me,
2094
+ replaceMediaDirectly: Q,
2056
2095
  storageInfo: k,
2057
- loadStorage: J
2096
+ loadStorage: K
2058
2097
  };
2059
2098
  }
2060
2099
  //#endregion
2061
2100
  //#region ../media-library/src/components/MediaLibraryChrome.vue?vue&type=script&setup=true&lang.ts
2062
- var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl:overflow-hidden" }, dn = {
2101
+ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl:overflow-hidden" }, hn = {
2063
2102
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-3.5",
2064
2103
  style: { "border-color": "var(--tpl-border)" }
2065
- }, fn = {
2104
+ }, gn = {
2066
2105
  id: "tpl-media-library-title",
2067
2106
  class: "tpl:text-sm tpl:font-semibold",
2068
2107
  style: { color: "var(--tpl-text)" }
2069
- }, pn = { class: "tpl:flex tpl:items-center tpl:gap-3" }, mn = { class: "tpl:relative" }, hn = [
2108
+ }, _n = { class: "tpl:flex tpl:items-center tpl:gap-3" }, vn = { class: "tpl:relative" }, yn = [
2070
2109
  "value",
2071
2110
  "disabled",
2072
2111
  "aria-label",
2073
2112
  "placeholder"
2074
- ], gn = ["aria-label"], _n = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, vn = {
2113
+ ], bn = ["aria-label"], xn = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, Sn = {
2075
2114
  key: 0,
2076
2115
  class: "tpl:flex tpl:w-48 tpl:shrink-0 tpl:flex-col tpl:border-r",
2077
2116
  style: {
2078
2117
  "border-color": "var(--tpl-border)",
2079
2118
  "background-color": "var(--tpl-bg)"
2080
2119
  }
2081
- }, yn = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, bn = {
2120
+ }, Cn = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, wn = {
2082
2121
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-4 tpl:py-2.5",
2083
2122
  style: { "border-color": "var(--tpl-border)" }
2084
- }, xn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Sn = [
2123
+ }, Tn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, En = [
2085
2124
  "title",
2086
2125
  "aria-label",
2087
2126
  "aria-pressed"
2088
- ], Cn = {
2127
+ ], Dn = {
2089
2128
  key: 1,
2090
2129
  class: "tpl:text-xs tpl:font-medium",
2091
2130
  style: { color: "var(--tpl-text)" }
2092
- }, wn = {
2131
+ }, On = {
2093
2132
  class: "tpl:flex tpl:rounded-md tpl:p-0.5",
2094
2133
  style: {
2095
2134
  border: "1px solid var(--tpl-border)",
2096
2135
  "background-color": "var(--tpl-bg)"
2097
2136
  }
2098
- }, Tn = [
2137
+ }, kn = [
2099
2138
  "title",
2100
2139
  "aria-label",
2101
2140
  "aria-pressed"
2102
- ], En = [
2141
+ ], An = [
2103
2142
  "title",
2104
2143
  "aria-label",
2105
2144
  "aria-pressed"
2106
- ], Dn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, On = ["aria-label", "value"], kn = { value: "" }, An = ["value"], jn = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, Mn = {
2145
+ ], jn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Mn = ["aria-label", "value"], Nn = { value: "" }, Pn = ["value"], Fn = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, In = {
2107
2146
  key: 0,
2108
2147
  class: "tpl:px-4 tpl:pt-3"
2109
- }, Nn = {
2148
+ }, Ln = {
2110
2149
  class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
2111
2150
  style: {
2112
2151
  "background-color": "var(--tpl-bg-elevated)",
2113
2152
  "box-shadow": "var(--tpl-shadow-xl)"
2114
2153
  }
2115
- }, Pn = {
2154
+ }, Rn = {
2116
2155
  id: "tpl-media-delete-title",
2117
2156
  class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
2118
2157
  style: { color: "var(--tpl-text)" }
2119
- }, Fn = {
2158
+ }, zn = {
2120
2159
  key: 0,
2121
2160
  "data-testid": "media-delete-usage",
2122
2161
  class: "tpl:mb-4 tpl:text-xs",
2123
2162
  style: { color: "var(--tpl-text-muted)" }
2124
- }, In = {
2163
+ }, Bn = {
2125
2164
  key: 1,
2126
2165
  class: "tpl:mb-4 tpl:max-h-32 tpl:overflow-y-auto tpl:rounded tpl:border tpl:p-2",
2127
2166
  style: { "border-color": "var(--tpl-border)" }
2128
- }, Ln = { class: "tpl:font-medium" }, Rn = { style: { color: "var(--tpl-text-muted)" } }, zn = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Bn = {
2167
+ }, Vn = { class: "tpl:font-medium" }, Hn = { style: { color: "var(--tpl-text-muted)" } }, Un = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Wn = {
2129
2168
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3",
2130
2169
  style: { "border-color": "var(--tpl-border)" }
2131
- }, Vn = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, Hn = { class: "tpl:flex tpl:items-center tpl:gap-5" }, Un = {
2170
+ }, Gn = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, Kn = { class: "tpl:flex tpl:items-center tpl:gap-5" }, qn = {
2132
2171
  key: 0,
2133
2172
  class: "tpl:flex tpl:items-center tpl:gap-2"
2134
- }, Wn = {
2173
+ }, Jn = {
2135
2174
  key: 1,
2136
2175
  class: "tpl:relative"
2137
- }, Gn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Kn = ["data-testid", "disabled"], qn = /* @__PURE__ */ l({
2176
+ }, Yn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Xn = ["data-testid", "disabled"], Zn = /* @__PURE__ */ l({
2138
2177
  __name: "MediaLibraryChrome",
2139
2178
  props: {
2140
2179
  provider: {},
@@ -2152,7 +2191,7 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2152
2191
  "ready"
2153
2192
  ],
2154
2193
  setup(n, { expose: a, emit: c }) {
2155
- let l = n, u = c, d = j(() => import("./MediaEditModal-CzUtXkpk.js")), m = _(() => l.translations), g = _(() => l.confirmTestId ?? "media-confirm"), w = {
2194
+ let l = n, u = c, d = j(() => import("./MediaEditModal-BHp7euCZ.js")), m = _(() => l.translations), g = _(() => l.confirmTestId ?? "media-confirm"), w = {
2156
2195
  get maxFileSize() {
2157
2196
  return l.provider.maxFileSize;
2158
2197
  },
@@ -2163,45 +2202,45 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2163
2202
  return l.accept;
2164
2203
  }
2165
2204
  };
2166
- s(le, w);
2167
- let { isAcceptedMimeType: T, availableCategories: D } = $(w), O = ln({
2205
+ s(de, w);
2206
+ let { isAcceptedMimeType: T, availableCategories: D } = Q(w), O = pn({
2168
2207
  provider: l.provider,
2169
2208
  templateId: () => l.templateId,
2170
2209
  onError: (e) => l.onError?.(e)
2171
- }), N = cn({
2210
+ }), N = fn({
2172
2211
  library: O,
2173
2212
  translations: m
2174
- }), P = _(() => typeof l.provider.create == "function"), F = _(() => l.provider.folders !== !1), I = _(() => typeof l.provider.importFromUrl == "function"), L = _(() => typeof l.provider.delete == "function"), R = _(() => typeof l.provider.update == "function"), z = _(() => typeof l.provider.replace == "function"), B = _(() => typeof l.provider.frequentlyUsed == "function"), ee = _(() => {
2213
+ }), P = _(() => typeof l.provider.create == "function"), F = _(() => l.provider.folders !== !1), I = _(() => typeof l.provider.importFromUrl == "function"), L = _(() => typeof l.provider.delete == "function"), R = _(() => typeof l.provider.update == "function"), z = _(() => typeof l.provider.replace == "function"), B = _(() => typeof l.provider.frequentlyUsed == "function"), te = _(() => {
2175
2214
  let e = l.provider.folders;
2176
2215
  return e !== !1 && typeof e.move == "function";
2177
- }), ne = _(() => {
2216
+ }), re = _(() => {
2178
2217
  let e = l.provider.folders;
2179
2218
  return e !== !1 && typeof e.create == "function";
2180
- }), W = _(() => {
2219
+ }), H = _(() => {
2181
2220
  let e = l.provider.folders;
2182
2221
  return e !== !1 && typeof e.update == "function";
2183
- }), G = _(() => {
2222
+ }), U = _(() => {
2184
2223
  let e = l.provider.folders;
2185
2224
  return e !== !1 && typeof e.delete == "function";
2186
- }), ie = _(() => O.isLoading.value && N.displayItems.value.length === 0), K = _(() => {
2225
+ }), oe = _(() => O.isLoading.value && N.displayItems.value.length === 0), W = _(() => {
2187
2226
  let e = O.previewItem.value;
2188
2227
  return e ? !l.accept?.length || T(e.mimeType ?? "", l.accept) : !1;
2189
- }), ce = _(() => {
2228
+ }), ue = _(() => {
2190
2229
  if (!L.value) return 0;
2191
2230
  let e = 0;
2192
2231
  for (let t of O.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
2193
2232
  return e;
2194
- }), q = _(() => N.showImportUrlModal.value || N.editingItem.value !== null || O.showReplaceWarning.value);
2195
- function J() {
2196
- return q.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : O.showDeleteWarning.value ? (O.cancelDelete(), !0) : !1;
2233
+ }), G = _(() => N.showImportUrlModal.value || N.editingItem.value !== null || O.showReplaceWarning.value);
2234
+ function K() {
2235
+ return G.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : O.showDeleteWarning.value ? (O.cancelDelete(), !0) : !1;
2197
2236
  }
2198
- function Y() {
2199
- K.value && O.previewItem.value && u("confirm", O.previewItem.value);
2237
+ function q() {
2238
+ W.value && O.previewItem.value && u("confirm", O.previewItem.value);
2200
2239
  }
2201
- function X(e) {
2240
+ function J(e) {
2202
2241
  O.filterByCategory(e.target.value || null);
2203
2242
  }
2204
- async function ue() {
2243
+ async function fe() {
2205
2244
  let e = /* @__PURE__ */ new Set();
2206
2245
  for (let t of O.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
2207
2246
  O.selectedItems.value = e, await N.handleDeleteClick();
@@ -2211,22 +2250,22 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2211
2250
  }, { immediate: !0 }), O.loadItems(), O.loadFrequentlyUsed(), O.loadStorage(), u("ready"), e(() => {
2212
2251
  N.resetUI();
2213
2252
  }), a({
2214
- nestedDialogOpen: q,
2215
- handleEscape: J,
2253
+ nestedDialogOpen: G,
2254
+ handleEscape: K,
2216
2255
  library: O,
2217
2256
  ui: N
2218
- }), (e, t) => (o(), v("div", un, [
2219
- E("div", dn, [E("h2", fn, A(m.value.mediaLibrary.title), 1), E("div", pn, [
2220
- f(O).storageInfo.value ? (o(), S(on, {
2257
+ }), (e, t) => (o(), v("div", mn, [
2258
+ E("div", hn, [E("h2", gn, A(m.value.mediaLibrary.title), 1), E("div", _n, [
2259
+ f(O).storageInfo.value ? (o(), S(un, {
2221
2260
  key: 0,
2222
2261
  "used-bytes": f(O).storageInfo.value.usedBytes,
2223
2262
  "limit-bytes": f(O).storageInfo.value.limitBytes,
2224
2263
  size: 22
2225
2264
  }, null, 8, ["used-bytes", "limit-bytes"])) : y("", !0),
2226
- E("div", mn, [E("input", {
2265
+ E("div", vn, [E("input", {
2227
2266
  value: f(N).searchInput.value,
2228
2267
  type: "search",
2229
- disabled: ie.value,
2268
+ disabled: oe.value,
2230
2269
  "aria-label": m.value.mediaLibrary.searchAriaLabel,
2231
2270
  class: "tpl:w-52 tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-xs tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:outline-none tpl:focus:shadow-[var(--tpl-ring)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
2232
2271
  style: {
@@ -2236,7 +2275,7 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2236
2275
  },
2237
2276
  placeholder: m.value.mediaLibrary.searchPlaceholder,
2238
2277
  onInput: t[0] ||= (e) => f(N).handleSearchInput(e.target.value)
2239
- }, null, 40, hn), p(f(te), {
2278
+ }, null, 40, yn), p(f(ne), {
2240
2279
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
2241
2280
  size: 13,
2242
2281
  "stroke-width": 2,
@@ -2249,12 +2288,12 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2249
2288
  class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
2250
2289
  style: { color: "var(--tpl-text-muted)" },
2251
2290
  onClick: t[1] ||= (e) => u("close")
2252
- }, [p(f(oe), {
2291
+ }, [p(f(ce), {
2253
2292
  size: 18,
2254
2293
  "stroke-width": 2
2255
- })], 8, gn)) : y("", !0)
2294
+ })], 8, bn)) : y("", !0)
2256
2295
  ])]),
2257
- E("div", _n, [p(C, {
2296
+ E("div", xn, [p(C, {
2258
2297
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
2259
2298
  "enter-from-class": "tpl:-ml-48 tpl:opacity-0",
2260
2299
  "enter-to-class": "tpl:ml-0 tpl:opacity-100",
@@ -2262,14 +2301,14 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2262
2301
  "leave-from-class": "tpl:ml-0 tpl:opacity-100",
2263
2302
  "leave-to-class": "tpl:-ml-48 tpl:opacity-0"
2264
2303
  }, {
2265
- default: i(() => [F.value && f(N).showSidebar.value ? (o(), v("div", vn, [p(Ne, {
2304
+ default: i(() => [F.value && f(N).showSidebar.value ? (o(), v("div", Sn, [p(Pe, {
2266
2305
  folders: f(N).folderTree.value,
2267
2306
  "current-folder-id": f(O).currentFolderId.value,
2268
2307
  "view-mode": f(O).viewMode.value,
2269
2308
  "has-frequently-used": B.value && f(N).hasFrequentlyUsed.value,
2270
- "can-create-folder": ne.value,
2271
- "can-rename-folder": W.value,
2272
- "can-delete-folder": G.value,
2309
+ "can-create-folder": re.value,
2310
+ "can-rename-folder": H.value,
2311
+ "can-delete-folder": U.value,
2273
2312
  onNavigate: f(O).navigateToFolder,
2274
2313
  onCreateFolder: f(N).handleCreateFolder,
2275
2314
  onRenameFolder: f(N).handleRenameFolder,
@@ -2290,7 +2329,7 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2290
2329
  "onShowFrequentlyUsed"
2291
2330
  ])])) : y("", !0)]),
2292
2331
  _: 1
2293
- }), E("div", yn, [E("div", bn, [E("div", xn, [
2332
+ }), E("div", Cn, [E("div", wn, [E("div", Tn, [
2294
2333
  F.value ? (o(), v("button", {
2295
2334
  key: 0,
2296
2335
  type: "button",
@@ -2305,11 +2344,11 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2305
2344
  "aria-label": f(N).showSidebar.value ? m.value.mediaLibrary.hideFolders : m.value.mediaLibrary.showFolders,
2306
2345
  "aria-pressed": f(N).showSidebar.value,
2307
2346
  onClick: t[2] ||= (e) => f(N).showSidebar.value = !f(N).showSidebar.value
2308
- }, [p(f(U), {
2347
+ }, [p(f(ie), {
2309
2348
  size: 16,
2310
2349
  "stroke-width": 2
2311
- })], 12, Sn)) : y("", !0),
2312
- f(O).viewMode.value === "frequently-used" ? (o(), v("span", Cn, A(m.value.mediaLibrary.frequentlyUsed), 1)) : (o(), S(ye, {
2350
+ })], 12, En)) : y("", !0),
2351
+ f(O).viewMode.value === "frequently-used" ? (o(), v("span", Dn, A(m.value.mediaLibrary.frequentlyUsed), 1)) : (o(), S(be, {
2313
2352
  key: 2,
2314
2353
  folders: f(N).folderTree.value,
2315
2354
  "current-folder-id": f(O).currentFolderId.value,
@@ -2319,7 +2358,7 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2319
2358
  "current-folder-id",
2320
2359
  "onNavigate"
2321
2360
  ])),
2322
- E("div", wn, [E("button", {
2361
+ E("div", On, [E("button", {
2323
2362
  type: "button",
2324
2363
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
2325
2364
  style: x({
@@ -2330,10 +2369,10 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2330
2369
  "aria-label": m.value.mediaLibrary.viewGrid,
2331
2370
  "aria-pressed": f(N).layoutMode.value === "grid",
2332
2371
  onClick: t[3] ||= (e) => f(N).layoutMode.value = "grid"
2333
- }, [p(f(re), {
2372
+ }, [p(f(ae), {
2334
2373
  size: 14,
2335
2374
  "stroke-width": 2
2336
- })], 12, Tn), E("button", {
2375
+ })], 12, kn), E("button", {
2337
2376
  type: "button",
2338
2377
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
2339
2378
  style: x({
@@ -2344,11 +2383,11 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2344
2383
  "aria-label": m.value.mediaLibrary.viewList,
2345
2384
  "aria-pressed": f(N).layoutMode.value === "list",
2346
2385
  onClick: t[4] ||= (e) => f(N).layoutMode.value = "list"
2347
- }, [p(f(se), {
2386
+ }, [p(f(le), {
2348
2387
  size: 14,
2349
2388
  "stroke-width": 2
2350
- })], 12, En)])
2351
- ]), E("div", Dn, [f(D).length > 1 ? (o(), v("select", {
2389
+ })], 12, An)])
2390
+ ]), E("div", jn, [f(D).length > 1 ? (o(), v("select", {
2352
2391
  key: 0,
2353
2392
  "aria-label": m.value.mediaLibrary.filterAriaLabel,
2354
2393
  class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
@@ -2358,11 +2397,11 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2358
2397
  color: "var(--tpl-text)"
2359
2398
  },
2360
2399
  value: f(O).categoryFilter.value ?? "",
2361
- onChange: X
2362
- }, [E("option", kn, A(m.value.mediaLibrary.filterAll), 1), (o(!0), v(k, null, r(f(D), (e) => (o(), v("option", {
2400
+ onChange: J
2401
+ }, [E("option", Nn, A(m.value.mediaLibrary.filterAll), 1), (o(!0), v(k, null, r(f(D), (e) => (o(), v("option", {
2363
2402
  key: e,
2364
2403
  value: e
2365
- }, A(f(N).getCategoryLabel(e)), 9, An))), 128))], 40, On)) : y("", !0)])]), E("div", jn, [f(O).viewMode.value === "files" && (P.value || I.value) ? (o(), v("div", Mn, [P.value ? (o(), S($t, {
2404
+ }, A(f(N).getCategoryLabel(e)), 9, Pn))), 128))], 40, Mn)) : y("", !0)])]), E("div", Fn, [f(O).viewMode.value === "files" && (P.value || I.value) ? (o(), v("div", In, [P.value ? (o(), S(rn, {
2366
2405
  key: 0,
2367
2406
  "is-uploading": f(O).isUploading.value,
2368
2407
  "upload-progress": f(O).uploadProgress.value,
@@ -2381,10 +2420,10 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2381
2420
  "background-color": "var(--tpl-bg)"
2382
2421
  },
2383
2422
  onClick: t[5] ||= (e) => f(N).showImportUrlModal.value = !0
2384
- }, [p(f(ae), {
2423
+ }, [p(f(se), {
2385
2424
  size: 14,
2386
2425
  "stroke-width": 2
2387
- }), M(" " + A(m.value.mediaLibrary.importFromUrl), 1)])) : y("", !0)])) : y("", !0), p(ut, {
2426
+ }), M(" " + A(m.value.mediaLibrary.importFromUrl), 1)])) : y("", !0)])) : y("", !0), p(ft, {
2388
2427
  items: f(N).displayItems.value,
2389
2428
  "selected-ids": f(O).selectedItems.value,
2390
2429
  "is-loading": f(O).isLoading.value,
@@ -2399,7 +2438,7 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2399
2438
  onLoadMore: f(O).loadMore,
2400
2439
  onEdit: f(N).handleEditItem,
2401
2440
  onReplace: f(N).handleReplaceItem,
2402
- onConfirm: Y
2441
+ onConfirm: q
2403
2442
  }, null, 8, [
2404
2443
  "items",
2405
2444
  "selected-ids",
@@ -2416,7 +2455,7 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2416
2455
  "onEdit",
2417
2456
  "onReplace"
2418
2457
  ])])])]),
2419
- p(xt, {
2458
+ p(Ct, {
2420
2459
  visible: f(N).showImportUrlModal.value,
2421
2460
  "is-importing": f(O).isImportingFromUrl.value,
2422
2461
  error: f(O).importFromUrlError.value,
@@ -2432,10 +2471,15 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2432
2471
  key: 0,
2433
2472
  visible: !0,
2434
2473
  item: f(N).editingItem.value,
2435
- onSave: f(N).handleEditSave,
2474
+ save: f(N).handleEditSave,
2475
+ "can-crop": z.value && f(N).editingItem.value.canUpdate !== !1,
2436
2476
  onClose: t[7] ||= (e) => f(N).editingItem.value = null
2437
- }, null, 8, ["item", "onSave"])) : y("", !0),
2438
- p(qt, {
2477
+ }, null, 8, [
2478
+ "item",
2479
+ "save",
2480
+ "can-crop"
2481
+ ])) : y("", !0),
2482
+ p(Yt, {
2439
2483
  visible: f(O).showReplaceWarning.value,
2440
2484
  item: f(O).pendingReplaceItem.value,
2441
2485
  "usage-info": f(O).replaceUsageInfo.value,
@@ -2472,19 +2516,19 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2472
2516
  "-webkit-backdrop-filter": "blur(8px)"
2473
2517
  },
2474
2518
  onClick: t[10] ||= b((...e) => f(O).cancelDelete && f(O).cancelDelete(...e), ["self"])
2475
- }, [E("div", Nn, [
2476
- E("h3", Pn, A(m.value.mediaLibrary.deleteWarningTitle), 1),
2519
+ }, [E("div", Ln, [
2520
+ E("h3", Rn, A(m.value.mediaLibrary.deleteWarningTitle), 1),
2477
2521
  E("p", {
2478
2522
  class: h(["tpl:text-xs", f(N).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
2479
2523
  style: { color: "var(--tpl-text-muted)" }
2480
2524
  }, A(m.value.mediaLibrary.deleteWarningMessage), 3),
2481
- f(N).hasUsedFiles.value ? (o(), v("p", Fn, A(m.value.mediaLibrary.deleteWarningUsageNote), 1)) : y("", !0),
2482
- f(N).hasUsedFiles.value ? (o(), v("div", In, [(o(!0), v(k, null, r(f(O).deleteUsageInfo.value, (e, t) => (o(), v("div", {
2525
+ f(N).hasUsedFiles.value ? (o(), v("p", zn, A(m.value.mediaLibrary.deleteWarningUsageNote), 1)) : y("", !0),
2526
+ f(N).hasUsedFiles.value ? (o(), v("div", Bn, [(o(!0), v(k, null, r(f(O).deleteUsageInfo.value, (e, t) => (o(), v("div", {
2483
2527
  key: t,
2484
2528
  class: "tpl:text-xs",
2485
2529
  style: { color: "var(--tpl-text)" }
2486
- }, [e.templateCount > 0 ? (o(), v(k, { key: 0 }, [E("span", Ln, A(f(N).displayItems.value.find((e) => e.id === t)?.filename || t), 1), E("span", Rn, " - " + A(m.value.mediaLibrary.usedInTemplates.replace("{count}", e.templateCount.toString())), 1)], 64)) : y("", !0)]))), 128))])) : y("", !0),
2487
- E("div", zn, [E("button", {
2530
+ }, [e.templateCount > 0 ? (o(), v(k, { key: 0 }, [E("span", Vn, A(f(N).displayItems.value.find((e) => e.id === t)?.filename || t), 1), E("span", Hn, " - " + A(m.value.mediaLibrary.usedInTemplates.replace("{count}", e.templateCount.toString())), 1)], 64)) : y("", !0)]))), 128))])) : y("", !0),
2531
+ E("div", Un, [E("button", {
2488
2532
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
2489
2533
  style: {
2490
2534
  "border-color": "var(--tpl-border)",
@@ -2504,11 +2548,11 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2504
2548
  ])])) : y("", !0)]),
2505
2549
  _: 1
2506
2550
  }),
2507
- E("div", Bn, [E("div", Vn, [f(O).previewItem.value ? (o(), S(Nt, {
2551
+ E("div", Wn, [E("div", Gn, [f(O).previewItem.value ? (o(), S(Ft, {
2508
2552
  key: 0,
2509
2553
  item: f(O).previewItem.value,
2510
2554
  folders: f(N).folderTree.value
2511
- }, null, 8, ["item", "folders"])) : y("", !0)]), E("div", Hn, [f(O).selectedItems.value.size > 0 ? (o(), v("div", Un, [f(O).previewItem.value ? (o(), v("button", {
2555
+ }, null, 8, ["item", "folders"])) : y("", !0)]), E("div", Kn, [f(O).selectedItems.value.size > 0 ? (o(), v("div", qn, [f(O).previewItem.value ? (o(), v("button", {
2512
2556
  key: 0,
2513
2557
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
2514
2558
  style: x({
@@ -2517,15 +2561,15 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2517
2561
  backgroundColor: "var(--tpl-bg)"
2518
2562
  }),
2519
2563
  onClick: t[11] ||= (e) => f(N).copy(f(N).selectedUrl.value)
2520
- }, [f(N).copied.value ? (o(), S(f(H), {
2564
+ }, [f(N).copied.value ? (o(), S(f(V), {
2521
2565
  key: 1,
2522
2566
  size: 12,
2523
2567
  "stroke-width": 2
2524
- })) : (o(), S(f(V), {
2568
+ })) : (o(), S(f(ee), {
2525
2569
  key: 0,
2526
2570
  size: 12,
2527
2571
  "stroke-width": 2
2528
- })), M(" " + A(f(N).copied.value ? m.value.mediaLibrary.copied : m.value.mediaLibrary.copyUrl), 1)], 4)) : y("", !0), ee.value ? (o(), v("div", Wn, [E("button", {
2572
+ })), M(" " + A(f(N).copied.value ? m.value.mediaLibrary.copied : m.value.mediaLibrary.copyUrl), 1)], 4)) : y("", !0), te.value ? (o(), v("div", Jn, [E("button", {
2529
2573
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
2530
2574
  style: {
2531
2575
  "border-color": "var(--tpl-border)",
@@ -2533,7 +2577,7 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2533
2577
  "background-color": "var(--tpl-bg)"
2534
2578
  },
2535
2579
  onClick: t[12] ||= (e) => f(N).showMovePicker.value = !f(N).showMovePicker.value
2536
- }, A(m.value.mediaLibrary.moveSelected), 1), f(N).showMovePicker.value ? (o(), S(Et, {
2580
+ }, A(m.value.mediaLibrary.moveSelected), 1), f(N).showMovePicker.value ? (o(), S(Ot, {
2537
2581
  key: 0,
2538
2582
  folders: f(N).folderTree.value,
2539
2583
  "current-folder-id": f(O).currentFolderId.value,
@@ -2543,7 +2587,7 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2543
2587
  "folders",
2544
2588
  "current-folder-id",
2545
2589
  "onSelect"
2546
- ])) : y("", !0)])) : y("", !0)])) : y("", !0), E("div", Gn, [ce.value > 0 ? (o(), v("button", {
2590
+ ])) : y("", !0)])) : y("", !0)])) : y("", !0), E("div", Yn, [ue.value > 0 ? (o(), v("button", {
2547
2591
  key: 0,
2548
2592
  "data-testid": "media-delete",
2549
2593
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
@@ -2552,7 +2596,7 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2552
2596
  color: "var(--tpl-danger)",
2553
2597
  "background-color": "var(--tpl-bg)"
2554
2598
  },
2555
- onClick: ue
2599
+ onClick: fe
2556
2600
  }, A(m.value.mediaLibrary.deleteSelected), 1)) : y("", !0), n.showConfirm ? (o(), v("button", {
2557
2601
  key: 1,
2558
2602
  "data-testid": g.value,
@@ -2561,45 +2605,45 @@ var un = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2561
2605
  "background-color": "var(--tpl-primary)",
2562
2606
  color: "var(--tpl-on-primary)"
2563
2607
  },
2564
- disabled: !K.value,
2565
- onClick: Y
2566
- }, A(n.accept?.length ? m.value.mediaLibrary.selectImage : m.value.mediaLibrary.selectFile), 9, Kn)) : y("", !0)])])])
2608
+ disabled: !W.value,
2609
+ onClick: q
2610
+ }, A(n.accept?.length ? m.value.mediaLibrary.selectImage : m.value.mediaLibrary.selectFile), 9, Xn)) : y("", !0)])])])
2567
2611
  ]));
2568
2612
  }
2569
- }), Jn = /* #__PURE__ */ Object.assign({
2570
- "./locales/ca.ts": () => import("./ca-BTf1Zbqb.js"),
2571
- "./locales/de.ts": () => import("./de-xzrh9PA3.js"),
2572
- "./locales/en.ts": () => import("./en-9unxBjV8.js"),
2573
- "./locales/es.ts": () => import("./es-BT4LSpE2.js"),
2574
- "./locales/fr.ts": () => import("./fr-CI7OJoql.js"),
2575
- "./locales/ja.ts": () => import("./ja-DhlWUfke.js"),
2576
- "./locales/nl.ts": () => import("./nl-D8y5OWGB.js"),
2577
- "./locales/pt-BR.ts": () => import("./pt-BR-DMCbUBvJ.js")
2613
+ }), Qn = /* #__PURE__ */ Object.assign({
2614
+ "./locales/ca.ts": () => import("./ca-CYQH3J0b.js"),
2615
+ "./locales/de.ts": () => import("./de-JvCTMJPy.js"),
2616
+ "./locales/en.ts": () => import("./en-DxpXHoxJ.js"),
2617
+ "./locales/es.ts": () => import("./es-CAv-Vldw.js"),
2618
+ "./locales/fr.ts": () => import("./fr-DVPtxpR6.js"),
2619
+ "./locales/ja.ts": () => import("./ja-dcWzjStz.js"),
2620
+ "./locales/nl.ts": () => import("./nl-LZNqQgE4.js"),
2621
+ "./locales/pt-BR.ts": () => import("./pt-BR-D6P_mNwA.js")
2578
2622
  });
2579
- function Yn(e) {
2623
+ function $n(e) {
2580
2624
  return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
2581
2625
  }
2582
- var Xn = Yn(Jn);
2583
- function Zn(e) {
2626
+ var er = $n(Qn);
2627
+ function tr(e) {
2584
2628
  return e.trim().replace(/_/g, "-").toLowerCase();
2585
2629
  }
2586
- function Qn(e) {
2587
- let t = Zn(e);
2588
- return Xn.find((e) => Zn(e) === t);
2630
+ function nr(e) {
2631
+ let t = tr(e);
2632
+ return er.find((e) => tr(e) === t);
2589
2633
  }
2590
- function $n(e) {
2591
- return Zn(e).split("-")[0];
2634
+ function rr(e) {
2635
+ return tr(e).split("-")[0];
2592
2636
  }
2593
- function er(e) {
2594
- return Qn(e) ?? Qn($n(e)) ?? "en";
2637
+ function ir(e) {
2638
+ return nr(e) ?? nr(rr(e)) ?? "en";
2595
2639
  }
2596
- async function tr(e) {
2597
- let t = Jn[`./locales/${er(e)}.ts`];
2640
+ async function ar(e) {
2641
+ let t = Qn[`./locales/${ir(e)}.ts`];
2598
2642
  return (await t()).default;
2599
2643
  }
2600
2644
  //#endregion
2601
2645
  //#region ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
2602
- var nr = ["data-tpl-theme"], rr = /* @__PURE__ */ l({
2646
+ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ l({
2603
2647
  __name: "MediaLibraryModal",
2604
2648
  props: {
2605
2649
  visible: { type: Boolean },
@@ -2615,14 +2659,14 @@ var nr = ["data-tpl-theme"], rr = /* @__PURE__ */ l({
2615
2659
  setup(e, { emit: n }) {
2616
2660
  let r = e, a = n, l = c(null);
2617
2661
  t(() => r.locale, async (e) => {
2618
- l.value = await tr(e ?? "en");
2619
- }, { immediate: !0 }), s(ue, l);
2662
+ l.value = await ar(e ?? "en");
2663
+ }, { immediate: !0 }), s(fe, l);
2620
2664
  let u = _(() => r.uiTheme);
2621
- s(Z, u);
2665
+ s(Y, u);
2622
2666
  let d = w(() => r.popoverTarget ?? null);
2623
- s(X, d), s(de, w(() => r.locale));
2667
+ s(J, d), s(X, w(() => r.locale));
2624
2668
  let f = c(null), m = c(null);
2625
- he(f, _(() => r.visible && l.value !== null && !m.value?.nestedDialogOpen));
2669
+ ge(f, _(() => r.visible && l.value !== null && !m.value?.nestedDialogOpen));
2626
2670
  function x(e) {
2627
2671
  if (e.key === "Escape") {
2628
2672
  if (m.value?.handleEscape()) {
@@ -2672,7 +2716,7 @@ var nr = ["data-tpl-theme"], rr = /* @__PURE__ */ l({
2672
2716
  border: "1px solid var(--tpl-border)",
2673
2717
  "box-shadow": "var(--tpl-shadow-xl)"
2674
2718
  }
2675
- }, [p(qn, {
2719
+ }, [p(Zn, {
2676
2720
  ref_key: "chromeRef",
2677
2721
  ref: m,
2678
2722
  provider: e.provider,
@@ -2691,12 +2735,12 @@ var nr = ["data-tpl-theme"], rr = /* @__PURE__ */ l({
2691
2735
  "template-id",
2692
2736
  "on-error",
2693
2737
  "translations"
2694
- ])], 512)], 10, nr)) : y("", !0)]),
2738
+ ])], 512)], 10, or)) : y("", !0)]),
2695
2739
  _: 1
2696
2740
  })], 8, ["to"]));
2697
2741
  }
2698
2742
  });
2699
2743
  //#endregion
2700
- export { rr as MediaLibraryModal, X as a, fe as i, $ as n, Z as o, Q as r, he as t };
2744
+ export { sr as MediaLibraryModal, J as a, pe as i, Q as n, Y as o, Z as r, ge as t };
2701
2745
 
2702
- //# sourceMappingURL=editor-modal-CZQArGNj.js.map
2746
+ //# sourceMappingURL=editor-modal-BDOfw3l0.js.map