@templatical/editor 0.51.1 → 0.52.1

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 (380) hide show
  1. package/THIRD_PARTY_NOTICES.md +208 -0
  2. package/dist/{AiAltTextPopover-BZQ95GXL.js → AiAltTextPopover-DawbUywc.js} +16 -17
  3. package/dist/{AiAltTextReview-DoBEudnE.js → AiAltTextReview-9ySsXOTU.js} +25 -26
  4. package/dist/{AiChatPanel-Bs6sES3b.js → AiChatPanel-CupPhmsN.js} +141 -143
  5. package/dist/{AiPanels-CfN7A-ZA.js → AiPanels-DqT4PgQ0.js} +6 -8
  6. package/dist/{AiRewriteMenu-C3ZfDDYy.js → AiRewriteMenu-28agTycW.js} +66 -67
  7. package/dist/BlockIssueBadge-BxpDy3u-.js +33 -0
  8. package/dist/{BlockPreviewCanvas-BXNLLLYi.js → BlockPreviewCanvas-B-4bmJ3t.js} +26 -27
  9. package/dist/{CloudHeaderExtras-CsJMEiyN.js → CloudHeaderExtras-QI82yF54.js} +4 -5
  10. package/dist/{CloudPanels-B4F5m7vy.js → CloudPanels-BKJaLkUN.js} +52 -53
  11. package/dist/{CollaborationNotices-CNuDp7Y2.js → CollaborationNotices-CTw4JThq.js} +12 -13
  12. package/dist/{CollaboratorBar-BtHPiuHq.js → CollaboratorBar-CXQqN3VP.js} +16 -17
  13. package/dist/{CommentsPanel-CyCM-BvT.js → CommentsPanel-DwwFuh1h.js} +3 -5
  14. package/dist/CommentsSidebar-9ZfiC2DO.js +500 -0
  15. package/dist/{CountdownBlock-DR4Xm2-T.js → CountdownBlock-CU2yTWtF.js} +21 -22
  16. package/dist/{CountdownToolbar-CEIMPojJ.js → CountdownToolbar-BqoYzf_6.js} +55 -56
  17. package/dist/IssuesPanel-4ykrf1ax.js +359 -0
  18. package/dist/{LoadingTrack-B0RKQWq3.js → LoadingTrack-DM4g6j7b.js} +3 -4
  19. package/dist/{LogicTagInsertButton-CqfU52CO.js → LogicTagInsertButton-CfscnwCn.js} +243 -250
  20. package/dist/{MediaEditModal-DHtkZ4OU.js → MediaEditModal-Dy08GEwE.js} +449 -452
  21. package/dist/{MediaPanels-CGcOB2pR.js → MediaPanels-BgEp7iCp.js} +3 -5
  22. package/dist/{MergeTagInput-YnEkorTZ.js → MergeTagInput-B9dtUthD.js} +14 -15
  23. package/dist/{MergeTagModeToggle-Dhb1DAcQ.js → MergeTagModeToggle-DxujhYJ4.js} +30 -31
  24. package/dist/{MergeTagTextarea-e4lnwtqZ.js → MergeTagTextarea-CPFEjJZd.js} +12 -13
  25. package/dist/{ParagraphEditor-B6NK0ytw.js → ParagraphEditor-CWXfurGh.js} +233 -236
  26. package/dist/{RestoreVersionDialog-Bq_IGOLJ.js → RestoreVersionDialog-C4s_JYCx.js} +16 -17
  27. package/dist/{RichTextEditorContent-AOM6fylS.js → RichTextEditorContent-o6HmE8GR.js} +40 -40
  28. package/dist/{SaveBlockDialog-C8GngfQx.js → SaveBlockDialog-CWLrly6l.js} +58 -59
  29. package/dist/SavedBlocksBrowserModal-CE8n4EBS.js +359 -0
  30. package/dist/{SavedBlocksPanels-C2s3q0pJ.js → SavedBlocksPanels-BE1N9rNZ.js} +7 -9
  31. package/dist/{SavedBlocksPickBar-BjcTiV87.js → SavedBlocksPickBar-Dwl94xhP.js} +14 -15
  32. package/dist/{TemplateSettings-BVBWpiDU.js → TemplateSettings-CS0f1Ues.js} +75 -76
  33. package/dist/{TestEmailModal-SyhO9bn3.js → TestEmailModal-DBD0X5nV.js} +54 -56
  34. package/dist/{TestEmailPanel-BDd2Rtav.js → TestEmailPanel-DaFjP9QK.js} +3 -5
  35. package/dist/{TitleEditor-pxD53y_l.js → TitleEditor-DSqtle77.js} +78 -79
  36. package/dist/{ToggleSwitch-D51U9cmR.js → ToggleSwitch-JykPyD_8.js} +5 -6
  37. package/dist/{Toolbar-CZSPZYbj.js → Toolbar-BZPFfKrf.js} +977 -985
  38. package/dist/{TplModal-DCzBzicE.js → TplModal-DLMssVlt.js} +16 -17
  39. package/dist/{VersionHistoryMenu-BQeWPT85.js → VersionHistoryMenu-BkbYUs0Q.js} +37 -38
  40. package/dist/{VersionHistoryPanels-BBm7YbRQ.js → VersionHistoryPanels-DP7HaYWv.js} +5 -7
  41. package/dist/{VersionPreviewBanner-DUGF0tUJ.js → VersionPreviewBanner-DECaBwLq.js} +11 -12
  42. package/dist/WrapperBlock-BsJv_Fiw.js +44 -0
  43. package/dist/{_plugin-vue_export-helper-B3ysoDQm.js → _plugin-vue_export-helper-Djzt4Yr7.js} +1 -2
  44. package/dist/{aiErrors-D5UOoYOt.js → aiErrors-C3QEMB0x.js} +3 -5
  45. package/dist/{aiImageContext-BH4Ss1h3.js → aiImageContext-BQ5mQ6B5.js} +2 -3
  46. package/dist/{aiRewritePreview-DLGM05Ge.js → aiRewritePreview-DlMyx6Si.js} +1 -2
  47. package/dist/{blockTypeIcons-NzaYvAI4.js → blockTypeIcons-BHjlPnPf.js} +23 -23
  48. package/dist/bundle-stats.json +6 -6
  49. package/dist/{ca-C7mTzW1r.js → ca-CD-Kt1qz.js} +1 -2
  50. package/dist/{ca-CYQH3J0b.js → ca-Cc6eL0ZS.js} +1 -2
  51. package/dist/cdn/chunks/{AiAltTextPopover-CQu0Q_ZX.js → AiAltTextPopover-SEEjkd-I.js} +24 -25
  52. package/dist/cdn/chunks/{AiAltTextPopover-CQu0Q_ZX.js.map → AiAltTextPopover-SEEjkd-I.js.map} +1 -1
  53. package/dist/cdn/chunks/{AiAltTextReview-CI2HbWfn.js → AiAltTextReview-BGLLSKLm.js} +43 -44
  54. package/dist/cdn/chunks/{AiAltTextReview-CI2HbWfn.js.map → AiAltTextReview-BGLLSKLm.js.map} +1 -1
  55. package/dist/cdn/chunks/{AiChatPanel-BYqn1bKu.js → AiChatPanel-DKDAaBNi.js} +129 -131
  56. package/dist/cdn/chunks/{AiChatPanel-BYqn1bKu.js.map → AiChatPanel-DKDAaBNi.js.map} +1 -1
  57. package/dist/cdn/chunks/{AiPanels-CIFKQv8Y.js → AiPanels-0wBarZSH.js} +5 -7
  58. package/dist/cdn/chunks/{AiPanels-CIFKQv8Y.js.map → AiPanels-0wBarZSH.js.map} +1 -1
  59. package/dist/cdn/chunks/{AiRewriteMenu-Bhh71zcc.js → AiRewriteMenu-qf-cfEpy.js} +52 -53
  60. package/dist/cdn/chunks/AiRewriteMenu-qf-cfEpy.js.map +1 -0
  61. package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js +34 -0
  62. package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js.map +1 -0
  63. package/dist/cdn/chunks/{BlockPreviewCanvas-D0--EQkP.js → BlockPreviewCanvas-DGBh6mqe.js} +22 -23
  64. package/dist/cdn/chunks/{BlockPreviewCanvas-D0--EQkP.js.map → BlockPreviewCanvas-DGBh6mqe.js.map} +1 -1
  65. package/dist/cdn/chunks/{CloudHeaderExtras-DaUU8P8R.js → CloudHeaderExtras-BMNK_F9p.js} +4 -5
  66. package/dist/cdn/chunks/{CloudHeaderExtras-DaUU8P8R.js.map → CloudHeaderExtras-BMNK_F9p.js.map} +1 -1
  67. package/dist/cdn/chunks/{CloudPanels-C3jsxo_f.js → CloudPanels-JMWIoVWh.js} +34 -35
  68. package/dist/cdn/chunks/{CloudPanels-C3jsxo_f.js.map → CloudPanels-JMWIoVWh.js.map} +1 -1
  69. package/dist/cdn/chunks/{CollaborationNotices-DjRI8gvs.js → CollaborationNotices-Bsf1rGW9.js} +13 -14
  70. package/dist/cdn/chunks/{CollaborationNotices-DjRI8gvs.js.map → CollaborationNotices-Bsf1rGW9.js.map} +1 -1
  71. package/dist/cdn/chunks/{CollaboratorBar-Dfzm6A9A.js → CollaboratorBar-CXByAoUz.js} +16 -17
  72. package/dist/cdn/chunks/{CollaboratorBar-Dfzm6A9A.js.map → CollaboratorBar-CXByAoUz.js.map} +1 -1
  73. package/dist/cdn/chunks/{CommentsPanel-CSO79OeX.js → CommentsPanel-DoJnKLXI.js} +4 -6
  74. package/dist/cdn/chunks/{CommentsPanel-CSO79OeX.js.map → CommentsPanel-DoJnKLXI.js.map} +1 -1
  75. package/dist/cdn/chunks/{CommentsSidebar-CCvplq1Z.js → CommentsSidebar-CUtgvdBC.js} +110 -110
  76. package/dist/cdn/chunks/CommentsSidebar-CUtgvdBC.js.map +1 -0
  77. package/dist/cdn/chunks/{CountdownBlock-C6USdwk3.js → CountdownBlock-BqRw147R.js} +19 -20
  78. package/dist/cdn/chunks/{CountdownBlock-C6USdwk3.js.map → CountdownBlock-BqRw147R.js.map} +1 -1
  79. package/dist/cdn/chunks/{CountdownToolbar-Cjud2Tos.js → CountdownToolbar-xobieKoU.js} +28 -29
  80. package/dist/cdn/chunks/{CountdownToolbar-Cjud2Tos.js.map → CountdownToolbar-xobieKoU.js.map} +1 -1
  81. package/dist/cdn/chunks/{IssuesPanel-BaWHPDxZ.js → IssuesPanel-C7LfxaAY.js} +76 -77
  82. package/dist/cdn/chunks/{IssuesPanel-BaWHPDxZ.js.map → IssuesPanel-C7LfxaAY.js.map} +1 -1
  83. package/dist/cdn/chunks/LoadingTrack-CZuLTazv.js +11 -0
  84. package/dist/cdn/chunks/{LoadingTrack-BIcL4NiY.js.map → LoadingTrack-CZuLTazv.js.map} +1 -1
  85. package/dist/cdn/chunks/{LogicTagInsertButton-CsL2JDOG.js → LogicTagInsertButton-BIi05UQu.js} +258 -265
  86. package/dist/cdn/chunks/{LogicTagInsertButton-CsL2JDOG.js.map → LogicTagInsertButton-BIi05UQu.js.map} +1 -1
  87. package/dist/cdn/chunks/{MediaEditModal-BuHCiyMu.js → MediaEditModal-Cpcod6_U.js} +152 -155
  88. package/dist/cdn/chunks/{MediaEditModal-BuHCiyMu.js.map → MediaEditModal-Cpcod6_U.js.map} +1 -1
  89. package/dist/cdn/chunks/{MediaPanels-DAgUf_T1.js → MediaPanels-BIdcW_1f.js} +4 -6
  90. package/dist/cdn/chunks/{MediaPanels-DAgUf_T1.js.map → MediaPanels-BIdcW_1f.js.map} +1 -1
  91. package/dist/cdn/chunks/{MergeTagInput-C8U-7LxL.js → MergeTagInput-BvWg8o5E.js} +35 -36
  92. package/dist/cdn/chunks/{MergeTagInput-C8U-7LxL.js.map → MergeTagInput-BvWg8o5E.js.map} +1 -1
  93. package/dist/cdn/chunks/{MergeTagModeToggle-Mm-p0A52.js → MergeTagModeToggle-BgKEVUtV.js} +28 -29
  94. package/dist/cdn/chunks/{MergeTagModeToggle-Mm-p0A52.js.map → MergeTagModeToggle-BgKEVUtV.js.map} +1 -1
  95. package/dist/cdn/chunks/{MergeTagTextarea-DuLScsWM.js → MergeTagTextarea-tBz8McZf.js} +33 -34
  96. package/dist/cdn/chunks/{MergeTagTextarea-DuLScsWM.js.map → MergeTagTextarea-tBz8McZf.js.map} +1 -1
  97. package/dist/cdn/chunks/{ParagraphEditor-CqSj6Ayz.js → ParagraphEditor-B3Rj_cWF.js} +197 -200
  98. package/dist/cdn/chunks/ParagraphEditor-B3Rj_cWF.js.map +1 -0
  99. package/dist/cdn/chunks/{RestoreVersionDialog-CdA5osuA.js → RestoreVersionDialog-CjOdD2xj.js} +21 -22
  100. package/dist/cdn/chunks/{RestoreVersionDialog-CdA5osuA.js.map → RestoreVersionDialog-CjOdD2xj.js.map} +1 -1
  101. package/dist/cdn/chunks/{RichTextEditorContent-Q1d2xqBT.js → RichTextEditorContent-DNjR_sNN.js} +30 -31
  102. package/dist/cdn/chunks/{RichTextEditorContent-Q1d2xqBT.js.map → RichTextEditorContent-DNjR_sNN.js.map} +1 -1
  103. package/dist/cdn/chunks/{SaveBlockDialog-CijargAy.js → SaveBlockDialog-CUhpawq0.js} +77 -78
  104. package/dist/cdn/chunks/{SaveBlockDialog-CijargAy.js.map → SaveBlockDialog-CUhpawq0.js.map} +1 -1
  105. package/dist/cdn/chunks/SavedBlocksBrowserModal-BPYcRoGa.js +356 -0
  106. package/dist/cdn/chunks/{SavedBlocksBrowserModal-DtOz_X5S.js.map → SavedBlocksBrowserModal-BPYcRoGa.js.map} +1 -1
  107. package/dist/cdn/chunks/{SavedBlocksPanels-BowyED5h.js → SavedBlocksPanels-C6--Bc81.js} +4 -6
  108. package/dist/cdn/chunks/{SavedBlocksPanels-BowyED5h.js.map → SavedBlocksPanels-C6--Bc81.js.map} +1 -1
  109. package/dist/cdn/chunks/{SavedBlocksPickBar-BPRaJBv3.js → SavedBlocksPickBar-DUavxpbU.js} +16 -17
  110. package/dist/cdn/chunks/{SavedBlocksPickBar-BPRaJBv3.js.map → SavedBlocksPickBar-DUavxpbU.js.map} +1 -1
  111. package/dist/cdn/chunks/{TemplateSettings-ByZeBO34.js → TemplateSettings-CKtI-dof.js} +72 -73
  112. package/dist/cdn/chunks/{TemplateSettings-ByZeBO34.js.map → TemplateSettings-CKtI-dof.js.map} +1 -1
  113. package/dist/cdn/chunks/{TestEmailModal-BUVTj3Ic.js → TestEmailModal-CDQTgESD.js} +68 -70
  114. package/dist/cdn/chunks/{TestEmailModal-BUVTj3Ic.js.map → TestEmailModal-CDQTgESD.js.map} +1 -1
  115. package/dist/cdn/chunks/{TestEmailPanel-BxutYoWg.js → TestEmailPanel-CcUpEpAn.js} +4 -6
  116. package/dist/cdn/chunks/{TestEmailPanel-BxutYoWg.js.map → TestEmailPanel-CcUpEpAn.js.map} +1 -1
  117. package/dist/cdn/chunks/{TitleEditor-Ccv6uoTz.js → TitleEditor-Cob7RLyK.js} +71 -72
  118. package/dist/cdn/chunks/TitleEditor-Cob7RLyK.js.map +1 -0
  119. package/dist/cdn/chunks/{ToggleSwitch-Ctdmj621.js → ToggleSwitch-J7Vwhvha.js} +6 -7
  120. package/dist/cdn/chunks/{ToggleSwitch-Ctdmj621.js.map → ToggleSwitch-J7Vwhvha.js.map} +1 -1
  121. package/dist/cdn/chunks/{Toolbar-DoprRgTn.js → Toolbar-CdpsvNOR.js} +977 -985
  122. package/dist/cdn/chunks/{Toolbar-DoprRgTn.js.map → Toolbar-CdpsvNOR.js.map} +1 -1
  123. package/dist/cdn/chunks/TplModal-CFPDgbwQ.js +51 -0
  124. package/dist/cdn/chunks/{TplModal-BXQzmsJX.js.map → TplModal-CFPDgbwQ.js.map} +1 -1
  125. package/dist/cdn/chunks/{VersionHistoryMenu-BF2fNCvq.js → VersionHistoryMenu-BYlLRvRJ.js} +34 -35
  126. package/dist/cdn/chunks/{VersionHistoryMenu-BF2fNCvq.js.map → VersionHistoryMenu-BYlLRvRJ.js.map} +1 -1
  127. package/dist/cdn/chunks/{VersionHistoryPanels-Dal0Uk69.js → VersionHistoryPanels-C6SOVoiT.js} +4 -6
  128. package/dist/cdn/chunks/{VersionHistoryPanels-Dal0Uk69.js.map → VersionHistoryPanels-C6SOVoiT.js.map} +1 -1
  129. package/dist/cdn/chunks/{VersionPreviewBanner-BaGcn-b1.js → VersionPreviewBanner-Dvg0ZfAW.js} +12 -13
  130. package/dist/cdn/chunks/{VersionPreviewBanner-BaGcn-b1.js.map → VersionPreviewBanner-Dvg0ZfAW.js.map} +1 -1
  131. package/dist/cdn/chunks/{WrapperBlock-DkQJtLz0.js → WrapperBlock-C7Md56IT.js} +14 -15
  132. package/dist/cdn/chunks/{WrapperBlock-DkQJtLz0.js.map → WrapperBlock-C7Md56IT.js.map} +1 -1
  133. package/dist/cdn/chunks/{_plugin-vue_export-helper-B3ysoDQm.js → _plugin-vue_export-helper-Djzt4Yr7.js} +1 -2
  134. package/dist/cdn/chunks/{aiErrors-D5UOoYOt.js → aiErrors-C3QEMB0x.js} +4 -6
  135. package/dist/cdn/chunks/{aiErrors-D5UOoYOt.js.map → aiErrors-C3QEMB0x.js.map} +1 -1
  136. package/dist/cdn/chunks/{aiImageContext-BH4Ss1h3.js → aiImageContext-BQ5mQ6B5.js} +3 -4
  137. package/dist/cdn/chunks/{aiImageContext-BH4Ss1h3.js.map → aiImageContext-BQ5mQ6B5.js.map} +1 -1
  138. package/dist/cdn/chunks/{aiRewritePreview-DLGM05Ge.js → aiRewritePreview-DlMyx6Si.js} +2 -3
  139. package/dist/cdn/chunks/{aiRewritePreview-DLGM05Ge.js.map → aiRewritePreview-DlMyx6Si.js.map} +1 -1
  140. package/dist/cdn/chunks/blockTypeIcons-D7FW7Ypo.js +21 -0
  141. package/dist/cdn/chunks/blockTypeIcons-D7FW7Ypo.js.map +1 -0
  142. package/dist/cdn/chunks/{ca-C7mTzW1r.js → ca-CD-Kt1qz.js} +2 -3
  143. package/dist/cdn/chunks/{ca-C7mTzW1r.js.map → ca-CD-Kt1qz.js.map} +1 -1
  144. package/dist/cdn/chunks/{ca-CYQH3J0b.js → ca-Cc6eL0ZS.js} +2 -3
  145. package/dist/cdn/chunks/{ca-CYQH3J0b.js.map → ca-Cc6eL0ZS.js.map} +1 -1
  146. package/dist/cdn/chunks/{createCloudRuntime-DpBWhrv3.js → createCloudRuntime-Cth2JCEh.js} +58 -77
  147. package/dist/cdn/chunks/{createCloudRuntime-DpBWhrv3.js.map → createCloudRuntime-Cth2JCEh.js.map} +1 -1
  148. package/dist/cdn/chunks/{de-DBOTcDj2.js → de-6M4JoHoD.js} +2 -3
  149. package/dist/cdn/chunks/{de-DBOTcDj2.js.map → de-6M4JoHoD.js.map} +1 -1
  150. package/dist/cdn/chunks/{de-DNuYQTmS.js → de-CeFJ6wbM.js} +2 -3
  151. package/dist/cdn/chunks/{de-DNuYQTmS.js.map → de-CeFJ6wbM.js.map} +1 -1
  152. package/dist/cdn/chunks/{de-JvCTMJPy.js → de-DtrXVcuY.js} +2 -3
  153. package/dist/cdn/chunks/{de-JvCTMJPy.js.map → de-DtrXVcuY.js.map} +1 -1
  154. package/dist/cdn/chunks/{dist-Bo8Thh8v.js → dist-8ym3y-pH.js} +44 -45
  155. package/dist/cdn/chunks/{dist-Bo8Thh8v.js.map → dist-8ym3y-pH.js.map} +1 -1
  156. package/dist/{dist-DI4_YSnG.js → cdn/chunks/dist-BMzNabtD.js} +107 -109
  157. package/dist/cdn/chunks/{dist-S-rLGqax.js.map → dist-BMzNabtD.js.map} +1 -1
  158. package/dist/cdn/chunks/dompurify-JVtr5-B1.js +872 -0
  159. package/dist/cdn/chunks/dompurify-JVtr5-B1.js.map +1 -0
  160. package/dist/cdn/chunks/{draggable-DZ0gwUJ6.js → draggable-Du8AUMFT.js} +654 -654
  161. package/dist/cdn/chunks/draggable-Du8AUMFT.js.map +1 -0
  162. package/dist/{editor-modal-Bzhl-PgI.js → cdn/chunks/editor-modal-CyCe560f.js} +893 -979
  163. package/dist/cdn/chunks/{editor-modal-CI6EfeMd.js.map → editor-modal-CyCe560f.js.map} +1 -1
  164. package/dist/cdn/chunks/{emojiData-6m0DBh7O.js → emojiData-CBNuCfum.js} +2 -3
  165. package/dist/cdn/chunks/{emojiData-6m0DBh7O.js.map → emojiData-CBNuCfum.js.map} +1 -1
  166. package/dist/cdn/chunks/{en-CW71OK66.js → en-D14i5nFh.js} +2 -3
  167. package/dist/cdn/chunks/{en-CW71OK66.js.map → en-D14i5nFh.js.map} +1 -1
  168. package/dist/cdn/chunks/{en-CDhWRrF_.js → en-FzUuJ8HW.js} +2 -3
  169. package/dist/cdn/chunks/{en-CDhWRrF_.js.map → en-FzUuJ8HW.js.map} +1 -1
  170. package/dist/cdn/chunks/en-TIqv4ag3.js +1 -0
  171. package/dist/cdn/chunks/{es-CAv-Vldw.js → es-Dw_h7Oll.js} +2 -3
  172. package/dist/cdn/chunks/{es-CAv-Vldw.js.map → es-Dw_h7Oll.js.map} +1 -1
  173. package/dist/cdn/chunks/{es-DdK7zQfi.js → es-zDacbMhs.js} +2 -3
  174. package/dist/cdn/chunks/{es-DdK7zQfi.js.map → es-zDacbMhs.js.map} +1 -1
  175. package/dist/cdn/chunks/{extensions-taJTZlLK.js → extensions-CFF2KWy-.js} +60 -65
  176. package/dist/cdn/chunks/{extensions-taJTZlLK.js.map → extensions-CFF2KWy-.js.map} +1 -1
  177. package/dist/cdn/chunks/{formatAbsoluteDateTime-DMmop3C-.js → formatAbsoluteDateTime-Ck2_zXra.js} +2 -3
  178. package/dist/cdn/chunks/{formatAbsoluteDateTime-DMmop3C-.js.map → formatAbsoluteDateTime-Ck2_zXra.js.map} +1 -1
  179. package/dist/cdn/chunks/{formatRelativeTime-CtUU-QZ8.js → formatRelativeTime-BTD8Ktt-.js} +1 -2
  180. package/dist/cdn/chunks/{formatRelativeTime-CtUU-QZ8.js.map → formatRelativeTime-BTD8Ktt-.js.map} +1 -1
  181. package/dist/cdn/chunks/{fr-DVPtxpR6.js → fr-BJaeKu_8.js} +2 -3
  182. package/dist/cdn/chunks/{fr-DVPtxpR6.js.map → fr-BJaeKu_8.js.map} +1 -1
  183. package/dist/cdn/chunks/{fr-Dz5Bgb7-.js → fr-CSgYtjOd.js} +2 -3
  184. package/dist/cdn/chunks/{fr-Dz5Bgb7-.js.map → fr-CSgYtjOd.js.map} +1 -1
  185. package/dist/cdn/chunks/{htmlparser-CDRsn-gn.js → htmlparser-hu3YnNQU.js} +6 -11
  186. package/dist/cdn/chunks/{htmlparser-CDRsn-gn.js.map → htmlparser-hu3YnNQU.js.map} +1 -1
  187. package/dist/cdn/chunks/{icons-DNX6StSs.js → icons-okSPsLOa.js} +111 -114
  188. package/dist/cdn/chunks/icons-okSPsLOa.js.map +1 -0
  189. package/dist/cdn/chunks/{ja-Di-zJiT8.js → ja-B7H3ID8O.js} +2 -3
  190. package/dist/cdn/chunks/{ja-Di-zJiT8.js.map → ja-B7H3ID8O.js.map} +1 -1
  191. package/dist/cdn/chunks/{ja-dcWzjStz.js → ja-Cu2HdYaK.js} +2 -3
  192. package/dist/cdn/chunks/{ja-dcWzjStz.js.map → ja-Cu2HdYaK.js.map} +1 -1
  193. package/dist/cdn/chunks/{keys-BTpmg2Tt.js → keys-CUj6UA38.js} +3 -4
  194. package/dist/cdn/chunks/{keys-BTpmg2Tt.js.map → keys-CUj6UA38.js.map} +1 -1
  195. package/dist/{liquid.browser-Ct2-EezB.js → cdn/chunks/liquid.browser-rubac0VA.js} +993 -937
  196. package/dist/cdn/chunks/liquid.browser-rubac0VA.js.map +1 -0
  197. package/dist/cdn/chunks/{logger-Tj0RPskW.js → logger-CqQTfJGx.js} +2 -3
  198. package/dist/cdn/chunks/{logger-Tj0RPskW.js.map → logger-CqQTfJGx.js.map} +1 -1
  199. package/dist/cdn/chunks/{nl-CvVuHYFL.js → nl-176ySmc5.js} +2 -3
  200. package/dist/cdn/chunks/{nl-CvVuHYFL.js.map → nl-176ySmc5.js.map} +1 -1
  201. package/dist/cdn/chunks/{nl-LZNqQgE4.js → nl-1Ai2NykB.js} +2 -3
  202. package/dist/cdn/chunks/{nl-LZNqQgE4.js.map → nl-1Ai2NykB.js.map} +1 -1
  203. package/dist/cdn/chunks/{normalizeMergeTagMarkup-DyePIGqu.js → normalizeMergeTagMarkup-C_KlfSW4.js} +3 -4
  204. package/dist/cdn/chunks/{normalizeMergeTagMarkup-DyePIGqu.js.map → normalizeMergeTagMarkup-C_KlfSW4.js.map} +1 -1
  205. package/dist/cdn/chunks/{preRenderCustomBlocks-Dc-QLntG.js → preRenderCustomBlocks-BcXIz7oJ.js} +6 -7
  206. package/dist/cdn/chunks/{preRenderCustomBlocks-Dc-QLntG.js.map → preRenderCustomBlocks-BcXIz7oJ.js.map} +1 -1
  207. package/dist/cdn/chunks/{pt-BR-CHM-ZKvE.js → pt-BR-Bp92Fc6J.js} +2 -3
  208. package/dist/cdn/chunks/{pt-BR-CHM-ZKvE.js.map → pt-BR-Bp92Fc6J.js.map} +1 -1
  209. package/dist/cdn/chunks/{pt-BR-D6P_mNwA.js → pt-BR-CIbp__Z7.js} +2 -3
  210. package/dist/cdn/chunks/{pt-BR-D6P_mNwA.js.map → pt-BR-CIbp__Z7.js.map} +1 -1
  211. package/dist/cdn/chunks/{pt-BR-ZhO4vgyq.js → pt-BR-dDlTwX18.js} +2 -3
  212. package/dist/cdn/chunks/{pt-BR-ZhO4vgyq.js.map → pt-BR-dDlTwX18.js.map} +1 -1
  213. package/dist/cdn/chunks/{pusher-Cs4GGEtd.js → pusher-x9rNqzon.js} +3 -4
  214. package/dist/cdn/chunks/{pusher-Cs4GGEtd.js.map → pusher-x9rNqzon.js.map} +1 -1
  215. package/dist/cdn/chunks/{readableTextColor-f8Kykfnh.js → readableTextColor-BfZUGnVj.js} +2 -3
  216. package/dist/cdn/chunks/{readableTextColor-f8Kykfnh.js.map → readableTextColor-BfZUGnVj.js.map} +1 -1
  217. package/dist/cdn/chunks/{rolldown-runtime-Y_bBpyJl.js → rolldown-runtime-QGRDbDUS.js} +1 -2
  218. package/dist/cdn/chunks/sanitizeHtml-CN85EDrO.js +72 -0
  219. package/dist/cdn/chunks/sanitizeHtml-CN85EDrO.js.map +1 -0
  220. package/dist/cdn/chunks/{socialIcons-BBvsTwCV.js → socialIcons-jsTDmkbb.js} +608 -632
  221. package/dist/cdn/chunks/{socialIcons-BBvsTwCV.js.map → socialIcons-jsTDmkbb.js.map} +1 -1
  222. package/dist/cdn/chunks/src-C7bkofBL.js +647 -0
  223. package/dist/cdn/chunks/src-C7bkofBL.js.map +1 -0
  224. package/dist/cdn/chunks/{src-Bs_yxk3h.js → src-DEd87i_U.js} +502 -537
  225. package/dist/cdn/chunks/src-DEd87i_U.js.map +1 -0
  226. package/dist/cdn/chunks/{src-BNFnxfrA.js → src-DwWrYnUj.js} +188 -171
  227. package/dist/cdn/chunks/src-DwWrYnUj.js.map +1 -0
  228. package/dist/cdn/chunks/{styleConstants-v1dNKgJf.js → styleConstants-B8xVRiwX.js} +2 -3
  229. package/dist/cdn/chunks/{styleConstants-v1dNKgJf.js.map → styleConstants-B8xVRiwX.js.map} +1 -1
  230. package/dist/cdn/chunks/{templateSettingsFields-YCFVBVYh.js → templateSettingsFields-cjlP-jdw.js} +2 -3
  231. package/dist/cdn/chunks/{templateSettingsFields-YCFVBVYh.js.map → templateSettingsFields-cjlP-jdw.js.map} +1 -1
  232. package/dist/cdn/chunks/{tiptap-CtVrAViq.js → tiptap-CbiTlECY.js} +3402 -3278
  233. package/dist/cdn/chunks/tiptap-CbiTlECY.js.map +1 -0
  234. package/dist/cdn/chunks/{useCloudI18n-AVXhzbhQ.js → useCloudI18n-DY8_-ETE.js} +4 -5
  235. package/dist/cdn/chunks/{useCloudI18n-AVXhzbhQ.js.map → useCloudI18n-DY8_-ETE.js.map} +1 -1
  236. package/dist/cdn/chunks/useEditorCore-BrY66C2y.js +2582 -0
  237. package/dist/cdn/chunks/useEditorCore-BrY66C2y.js.map +1 -0
  238. package/dist/cdn/chunks/useEditorRoot-vjZJwKrV.js +9 -0
  239. package/dist/cdn/chunks/{useEditorRoot-CR5GjJD6.js.map → useEditorRoot-vjZJwKrV.js.map} +1 -1
  240. package/dist/cdn/chunks/{useI18n-CbVubQhM.js → useI18n-D8pY4LTq.js} +4 -5
  241. package/dist/cdn/chunks/{useI18n-CbVubQhM.js.map → useI18n-D8pY4LTq.js.map} +1 -1
  242. package/dist/{useLogicTag-DKLZ1T9H.js → cdn/chunks/useLogicTag-DBJDtpKA.js} +6 -5
  243. package/dist/cdn/chunks/{useLogicTag-B49Nc53Y.js.map → useLogicTag-DBJDtpKA.js.map} +1 -1
  244. package/dist/{useMergeTag-Bhdx7AKk.js → cdn/chunks/useMergeTag-B-aG--s1.js} +8 -7
  245. package/dist/cdn/chunks/{useMergeTag-B0KryMj8.js.map → useMergeTag-B-aG--s1.js.map} +1 -1
  246. package/dist/{usePopoverPosition-BZea45XK.js → cdn/chunks/usePopoverPosition-DSMtmu2W.js} +8 -10
  247. package/dist/cdn/chunks/{usePopoverPosition-C829ps5i.js.map → usePopoverPosition-DSMtmu2W.js.map} +1 -1
  248. package/dist/cdn/chunks/{useScrollToBlock-CAwvulog.js → useScrollToBlock-vjQ0fe-L.js} +5 -7
  249. package/dist/cdn/chunks/{useScrollToBlock-CAwvulog.js.map → useScrollToBlock-vjQ0fe-L.js.map} +1 -1
  250. package/dist/cdn/chunks/{withCurrentFont-DFPXeVfG.js → withCurrentFont-hZTvYBHO.js} +3 -4
  251. package/dist/cdn/chunks/{withCurrentFont-DFPXeVfG.js.map → withCurrentFont-hZTvYBHO.js.map} +1 -1
  252. package/dist/cdn/editor.css +1 -1
  253. package/dist/cdn/editor.js +1433 -1454
  254. package/dist/cdn/editor.js.map +1 -1
  255. package/dist/{check-yYsp5Xpk.js → check-BZ8o0eet.js} +1 -2
  256. package/dist/{chevron-down-DTmD06_j.js → chevron-down-DfAAfILv.js} +1 -2
  257. package/dist/{chevron-right-BSeYZOxc.js → chevron-right-Bk4mGdr7.js} +1 -2
  258. package/dist/{chevron-up-BOApwrxi.js → chevron-up-MhUf_azW.js} +1 -2
  259. package/dist/{circle-alert-BMszY8im.js → circle-alert-CShJwVFv.js} +1 -2
  260. package/dist/{clock-HADxnl6-.js → clock-CTfD6OCt.js} +1 -2
  261. package/dist/{createCloudRuntime-DVQI_ReU.js → createCloudRuntime-DCgO4A1r.js} +31 -37
  262. package/dist/{createLucideIcon-0lYYH3EW.js → createLucideIcon-CvhTA2KG.js} +6 -11
  263. package/dist/{de-DBOTcDj2.js → de-6M4JoHoD.js} +1 -2
  264. package/dist/{de-DNuYQTmS.js → de-CeFJ6wbM.js} +1 -2
  265. package/dist/{de-JvCTMJPy.js → de-DtrXVcuY.js} +1 -2
  266. package/dist/{dist-BC-ZEYLd.js → dist-BF5zEHop.js} +2 -3
  267. package/dist/{dist-CyBwSiAa.js → dist-BS5uKktL.js} +2 -3
  268. package/dist/{cdn/chunks/dist-S-rLGqax.js → dist-ByCWA2Tv.js} +101 -101
  269. package/dist/{dist-DtOF3bDW.js → dist-CKi_npZM.js} +378 -343
  270. package/dist/{dist-C7EtxNCb.js → dist-CVy-7PHQ.js} +55 -56
  271. package/dist/{dist-Cr7RPxI9.js → dist-CWSG7Kj0.js} +478 -461
  272. package/dist/{dist-DXyGqIDE.js → dist-Cy8I5scI.js} +2 -3
  273. package/dist/{dist-C_dV9QAx.js → dist-D6cMdrfG.js} +133 -133
  274. package/dist/{dist-DVNjPKsH.js → dist-D6fZec6r.js} +3 -4
  275. package/dist/{dist-CuLwJF7H.js → dist-Dd5MU2Ev.js} +23 -14
  276. package/dist/dist-DyFArF_G.js +4 -0
  277. package/dist/{dist-DBxgrOeo.js → dist-V7W1UhVr.js} +1882 -1792
  278. package/dist/{dist-DPcf6XZ8.js → dist-p3wymUDt.js} +2 -3
  279. package/dist/dist-pA3ooG6N.js +4 -0
  280. package/dist/{dist-3HpYixwF.js → dist-txQLT2sF.js} +173 -161
  281. package/dist/{cdn/chunks/editor-modal-CI6EfeMd.js → editor-modal-zaZHcmlO.js} +915 -859
  282. package/dist/{emojiData-6m0DBh7O.js → emojiData-CBNuCfum.js} +1 -2
  283. package/dist/{en-CW71OK66.js → en-D14i5nFh.js} +1 -2
  284. package/dist/en-Db76vJbY.js +1 -0
  285. package/dist/{en-CDhWRrF_.js → en-FzUuJ8HW.js} +1 -2
  286. package/dist/{es-CAv-Vldw.js → es-Dw_h7Oll.js} +1 -2
  287. package/dist/{es-DdK7zQfi.js → es-zDacbMhs.js} +1 -2
  288. package/dist/{extensions-CdyweA50.js → extensions-fo_c-vqf.js} +82 -91
  289. package/dist/{eye-DWkSvYpj.js → eye-7W4t5e0Q.js} +1 -2
  290. package/dist/{formatAbsoluteDateTime-DMmop3C-.js → formatAbsoluteDateTime-Ck2_zXra.js} +1 -2
  291. package/dist/{formatRelativeTime-CtUU-QZ8.js → formatRelativeTime-BTD8Ktt-.js} +0 -1
  292. package/dist/{fr-DVPtxpR6.js → fr-BJaeKu_8.js} +1 -2
  293. package/dist/{fr-Dz5Bgb7-.js → fr-CSgYtjOd.js} +1 -2
  294. package/dist/{image-DesWjcZ4.js → image-BDiRFzSd.js} +1 -2
  295. package/dist/index.d.ts +6 -6
  296. package/dist/{info-ClWJGoZy.js → info-Cxi3-Kh9.js} +1 -2
  297. package/dist/{ja-Di-zJiT8.js → ja-B7H3ID8O.js} +1 -2
  298. package/dist/{ja-dcWzjStz.js → ja-Cu2HdYaK.js} +1 -2
  299. package/dist/{keys-Zd9KWRD1.js → keys-BgRERHzu.js} +2 -3
  300. package/dist/{link-BqRicFTA.js → link-ju_2Cmir.js} +1 -2
  301. package/dist/{cdn/chunks/liquid.browser-Bbt17cVz.js → liquid.browser-DUXEekoN.js} +991 -939
  302. package/dist/{list-bojQr9bn.js → list-DYZJf0aZ.js} +1 -2
  303. package/dist/{loader-circle-B2B8LbUu.js → loader-circle-BZRD0a4I.js} +1 -2
  304. package/dist/{logger-k9Nbj3Cp.js → logger-BOu7oEtk.js} +1 -2
  305. package/dist/{message-circle-BEuiNsyZ.js → message-circle-DuEw4Zfx.js} +1 -2
  306. package/dist/{nl-CvVuHYFL.js → nl-176ySmc5.js} +1 -2
  307. package/dist/{nl-LZNqQgE4.js → nl-1Ai2NykB.js} +1 -2
  308. package/dist/{normalizeMergeTagMarkup-P6SUBuPv.js → normalizeMergeTagMarkup-CELnOlgK.js} +30 -31
  309. package/dist/{package-DCROB4aM.js → package-CePMr2kK.js} +1 -2
  310. package/dist/{pencil-CEotCKbf.js → pencil-D3aFCL7c.js} +1 -2
  311. package/dist/{preRenderCustomBlocks-D8rr61_z.js → preRenderCustomBlocks--_xc0XK3.js} +4 -5
  312. package/dist/{pt-BR-CHM-ZKvE.js → pt-BR-Bp92Fc6J.js} +1 -2
  313. package/dist/{pt-BR-D6P_mNwA.js → pt-BR-CIbp__Z7.js} +1 -2
  314. package/dist/{pt-BR-ZhO4vgyq.js → pt-BR-dDlTwX18.js} +1 -2
  315. package/dist/{readableTextColor-f8Kykfnh.js → readableTextColor-BfZUGnVj.js} +1 -2
  316. package/dist/{refresh-cw-C6M2mHNC.js → refresh-cw-xnro7_Sk.js} +1 -2
  317. package/dist/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
  318. package/dist/{runtime-dom.esm-bundler-B8WCZWUm.js → runtime-dom.esm-bundler-BURR-bj5.js} +121 -122
  319. package/dist/sanitizeHtml-BzfzpYJY.js +942 -0
  320. package/dist/{search-Cy99zPYf.js → search-CDrstRBv.js} +1 -2
  321. package/dist/{send-BDLJFsf3.js → send-DROkPOaX.js} +1 -2
  322. package/dist/{smartphone-CVvQaNA4.js → smartphone-Bx6u_tjn.js} +1 -2
  323. package/dist/{socialIcons-Dd-jRiVe.js → socialIcons-D7MGsg0d.js} +553 -564
  324. package/dist/{sparkles-Ce0Qz0ox.js → sparkles-CdaTtvoz.js} +1 -2
  325. package/dist/{square-BWlolnXe.js → square-BbCROH_f.js} +1 -2
  326. package/dist/style.css +1 -1
  327. package/dist/{styleConstants-v1dNKgJf.js → styleConstants-B8xVRiwX.js} +1 -2
  328. package/dist/{templateSettingsFields-YCFVBVYh.js → templateSettingsFields-cjlP-jdw.js} +1 -2
  329. package/dist/templatical-editor.js +1231 -1251
  330. package/dist/{text-align-start-D1V5gPTy.js → text-align-start-CGacJ9Vw.js} +1 -2
  331. package/dist/{trash-CZfiUFmw.js → trash-DxCd7zIy.js} +1 -2
  332. package/dist/{triangle-alert-CFDzyFC7.js → triangle-alert-7_oaitpf.js} +1 -2
  333. package/dist/{upload-BJfvdIrD.js → upload-DuFEOi_0.js} +1 -2
  334. package/dist/{useCloudI18n-Dcjua65H.js → useCloudI18n-DEMmUKuO.js} +3 -4
  335. package/dist/{useEditorCore-BTLeAVlM.js → useEditorCore-BSo2sSID.js} +1568 -1573
  336. package/dist/useEditorRoot-BMcoCLBx.js +7 -0
  337. package/dist/{useI18n-BdoY7xDE.js → useI18n-BBrHTdu8.js} +3 -4
  338. package/dist/{cdn/chunks/useLogicTag-B49Nc53Y.js → useLogicTag-ZPC39rfH.js} +4 -7
  339. package/dist/{cdn/chunks/useMergeTag-B0KryMj8.js → useMergeTag-BQ4qqWpQ.js} +6 -9
  340. package/dist/{cdn/chunks/usePopoverPosition-C829ps5i.js → usePopoverPosition-DV1PxL66.js} +6 -12
  341. package/dist/{useScrollToBlock-FmNMALM_.js → useScrollToBlock-BSyAV4pk.js} +4 -6
  342. package/dist/{vue.runtime.esm-bundler-DgFJ6GPG.js → vue.runtime.esm-bundler-CnEeTfhs.js} +1001 -1002
  343. package/dist/{withCurrentFont-BATJHNve.js → withCurrentFont-B22FXAF5.js} +2 -3
  344. package/dist/{x-CZ0Js0hA.js → x-BpfG7v9g.js} +1 -2
  345. package/package.json +26 -24
  346. package/dist/BlockIssueBadge-CKwZ1Vgn.js +0 -34
  347. package/dist/CommentsSidebar-Ca3DyFOX.js +0 -500
  348. package/dist/IssuesPanel-C8nMUccy.js +0 -360
  349. package/dist/SavedBlocksBrowserModal-wnkvxpm_.js +0 -360
  350. package/dist/WrapperBlock-BO619LAb.js +0 -45
  351. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +0 -1
  352. package/dist/cdn/chunks/BlockIssueBadge-DAn2vsMJ.js +0 -35
  353. package/dist/cdn/chunks/BlockIssueBadge-DAn2vsMJ.js.map +0 -1
  354. package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js.map +0 -1
  355. package/dist/cdn/chunks/LoadingTrack-BIcL4NiY.js +0 -12
  356. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +0 -1
  357. package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +0 -357
  358. package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js.map +0 -1
  359. package/dist/cdn/chunks/TplModal-BXQzmsJX.js +0 -52
  360. package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +0 -22
  361. package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js.map +0 -1
  362. package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +0 -1
  363. package/dist/cdn/chunks/en-ifvu6oPv.js +0 -1
  364. package/dist/cdn/chunks/icons-DNX6StSs.js.map +0 -1
  365. package/dist/cdn/chunks/liquid.browser-Bbt17cVz.js.map +0 -1
  366. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +0 -62
  367. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +0 -1
  368. package/dist/cdn/chunks/src-BNFnxfrA.js.map +0 -1
  369. package/dist/cdn/chunks/src-Bs_yxk3h.js.map +0 -1
  370. package/dist/cdn/chunks/src-YGkzYyu0.js +0 -649
  371. package/dist/cdn/chunks/src-YGkzYyu0.js.map +0 -1
  372. package/dist/cdn/chunks/tiptap-CtVrAViq.js.map +0 -1
  373. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +0 -2586
  374. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +0 -1
  375. package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +0 -10
  376. package/dist/dist-BPFcLKTw.js +0 -5
  377. package/dist/dist-D7Yj7E-F.js +0 -5
  378. package/dist/en-DwV15ltA.js +0 -1
  379. package/dist/sanitizeRichTextHtml-DeISfLFr.js +0 -60
  380. package/dist/useEditorRoot-DUy67lJu.js +0 -8
@@ -1,82 +1,10 @@
1
- import { At as e, C as t, F as n, H as r, M as i, Mt as a, N as o, O as s, Q as c, V as l, Y as u, _ as d, a as f, c as p, d as m, f as h, g, it as _, j as v, jt as y, l as b, nt as x, ot as S, q as C, r as w, u as T, v as E, y as D, z as O } from "./vue.runtime.esm-bundler-DgFJ6GPG.js";
2
- import { a as k, c as A, s as j, t as M } from "./runtime-dom.esm-bundler-B8WCZWUm.js";
3
- import { h as N } from "./dist-C7EtxNCb.js";
4
- import { a as P, n as F, o as I, r as ee, s as L, t as R } from "./dist-DI4_YSnG.js";
5
- import { t as z } from "./createLucideIcon-0lYYH3EW.js";
6
- import { t as B } from "./check-yYsp5Xpk.js";
7
- import { t as te } from "./chevron-right-BSeYZOxc.js";
8
- import { n as ne, t as re } from "./upload-BJfvdIrD.js";
9
- import { t as ie } from "./link-BqRicFTA.js";
10
- import { t as V } from "./loader-circle-B2B8LbUu.js";
11
- import { t as ae } from "./list-bojQr9bn.js";
12
- import { t as H } from "./pencil-CEotCKbf.js";
13
- import { n as U, t as W } from "./refresh-cw-C6M2mHNC.js";
14
- import { t as oe } from "./search-Cy99zPYf.js";
15
- import { t as se } from "./trash-CZfiUFmw.js";
16
- import { t as ce } from "./x-CZ0Js0hA.js";
17
- import { t as G } from "./_plugin-vue_export-helper-B3ysoDQm.js";
18
- var K = z({
19
- name: "file",
20
- size: 24,
21
- node: [["path", {
22
- d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
23
- key: "1oefj6"
24
- }], ["path", {
25
- d: "M14 2v5a1 1 0 0 0 1 1h5",
26
- key: "wfsgrz"
27
- }]]
28
- }), q = z({
29
- name: "folder",
30
- size: 24,
31
- node: [["path", {
32
- d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
33
- key: "1kt360"
34
- }]]
35
- }), le = z({
36
- name: "grid-2x2",
37
- size: 24,
38
- node: [
39
- ["path", {
40
- d: "M12 3v18",
41
- key: "108xh3"
42
- }],
43
- ["path", {
44
- d: "M3 12h18",
45
- key: "1i2n21"
46
- }],
47
- ["rect", {
48
- x: "3",
49
- y: "3",
50
- width: "18",
51
- height: "18",
52
- rx: "2",
53
- key: "h1oib"
54
- }]
55
- ],
56
- aliases: ["grid-2-x-2"]
57
- }), J = z({
58
- name: "panel-left",
59
- size: 24,
60
- node: [["rect", {
61
- width: "18",
62
- height: "18",
63
- x: "3",
64
- y: "3",
65
- rx: "2",
66
- key: "afitv7"
67
- }], ["path", {
68
- d: "M9 3v18",
69
- key: "fh3hqa"
70
- }]],
71
- aliases: ["sidebar"]
72
- }), ue = z({
73
- name: "star",
74
- size: 24,
75
- node: [["path", {
76
- d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
77
- key: "r04s7s"
78
- }]]
79
- }), de = Symbol("templaticalMediaLimits"), Y = Symbol("templaticalMediaPopoverTarget"), fe = Symbol("templaticalMediaTranslations"), X = Symbol("templaticalMediaUiTheme"), Z = Symbol("templaticalMediaUiLocale"), pe = { mediaLibrary: {
1
+ import { C as e, D as t, F as n, G as r, I as i, P as a, R as o, S as s, V as c, W as l, Y as u, Z as d, _ as f, at as p, b as m, c as h, dt as g, et as _, f as v, ft as y, g as b, h as x, it as S, j as C, l as w, m as T, n as E, o as D, p as O, st as k, u as A, ut as j, x as M } from "./draggable-Du8AUMFT.js";
2
+ import { h as N } from "./dist-8ym3y-pH.js";
3
+ import { a as P, n as F, o as I, r as L, s as R, t as z } from "./dist-BMzNabtD.js";
4
+ import { Bt as B, Ct as V, G as H, H as ee, J as te, M as ne, R as U, Rt as W, at as G, bt as re, f as ie, kt as ae, lt as oe, ot as se, s as ce, t as le, w as ue, wt as K } from "./icons-okSPsLOa.js";
5
+ import { t as q } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
6
+ // ../media-library/src/keys.ts
7
+ var de = Symbol("templaticalMediaLimits"), J = Symbol("templaticalMediaPopoverTarget"), fe = Symbol("templaticalMediaTranslations"), Y = Symbol("templaticalMediaUiTheme"), X = Symbol("templaticalMediaUiLocale"), pe = { mediaLibrary: {
80
8
  title: "Media Library",
81
9
  searchPlaceholder: "Search files...",
82
10
  allFiles: "All Files",
@@ -169,10 +97,9 @@ var K = z({
169
97
  deleteFolderConfirm: "Confirm delete",
170
98
  storageTooltip: "{used} of {total} used ({remaining} remaining)"
171
99
  } };
172
- //#endregion
173
- //#region ../media-library/src/composables/useI18n.ts
174
- function Q(e) {
175
- let n = e ?? t(fe, null), r = (C(n) ? n.value : n) ?? pe;
100
+ // ../media-library/src/composables/useI18n.ts
101
+ function Z(e) {
102
+ let n = e ?? t(fe, null), r = (u(n) ? n.value : n) ?? pe;
176
103
  function i(e, t) {
177
104
  return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
178
105
  }
@@ -181,26 +108,25 @@ function Q(e) {
181
108
  format: i
182
109
  };
183
110
  }
184
- //#endregion
185
- //#region ../media-library/src/composables/useMediaCategories.ts
111
+ // ../media-library/src/composables/useMediaCategories.ts
186
112
  var me = [
187
113
  "images",
188
114
  "documents",
189
115
  "videos",
190
116
  "audio"
191
117
  ];
192
- function he(e) {
118
+ function Q(e) {
193
119
  let n = e ?? t(de, null);
194
120
  if (!n) throw Error("[Templatical] useMediaCategories() needs media limits in scope. Render it under <MediaLibraryModal> or provide MEDIA_LIMITS_KEY yourself.");
195
- let r = n, i = p(() => !0), a = p(() => r.maxFileSize ?? Infinity), o = p(() => {
121
+ let r = n, i = O(() => !0), a = O(() => r.maxFileSize ?? Infinity), o = O(() => {
196
122
  let e = r.accept;
197
123
  if (e && e.length > 0) return e;
198
124
  let t = r.mimeTypes;
199
125
  return t ? Object.keys(t) : me;
200
- }), s = p(() => {
126
+ }), s = O(() => {
201
127
  let e = r.mimeTypes;
202
128
  return e ? o.value.flatMap((t) => e[t] ?? []) : [];
203
- }), c = p(() => s.value.join(",")), l = p(() => r.mimeTypes !== void 0);
129
+ }), c = O(() => s.value.join(",")), l = O(() => r.mimeTypes !== void 0);
204
130
  function u(e, t) {
205
131
  let n = r.mimeTypes;
206
132
  return !n || (t && t.length > 0 ? t : Object.keys(n)).some((t) => n[t]?.includes(e) ?? !1);
@@ -212,7 +138,7 @@ function he(e) {
212
138
  let t = r.mimeTypes;
213
139
  return t ? t.images?.includes(e) ?? !1 : e.startsWith("image/");
214
140
  }
215
- function m(e) {
141
+ function p(e) {
216
142
  let t = r.mimeTypes;
217
143
  if (!t) return null;
218
144
  for (let [n, r] of Object.entries(t)) if (r?.includes(e)) return n;
@@ -228,13 +154,12 @@ function he(e) {
228
154
  isAcceptedMimeType: u,
229
155
  isAcceptedFile: d,
230
156
  isImageMimeType: f,
231
- getCategoryForMimeType: m
157
+ getCategoryForMimeType: p
232
158
  };
233
159
  }
234
- //#endregion
235
- //#region ../media-library/src/composables/useFocusTrap.ts
236
- var ge = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
237
- function _e(e, t) {
160
+ // ../media-library/src/composables/useFocusTrap.ts
161
+ var he = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
162
+ function ge(e, t) {
238
163
  let n = null, r = null, i = null;
239
164
  function a(e) {
240
165
  if (!e) return document;
@@ -242,7 +167,7 @@ function _e(e, t) {
242
167
  return t && "activeElement" in t ? t : document;
243
168
  }
244
169
  function o() {
245
- return e.value ? Array.from(e.value.querySelectorAll(ge)).filter((e) => e.offsetParent !== null) : [];
170
+ return e.value ? Array.from(e.value.querySelectorAll(he)).filter((e) => e.offsetParent !== null) : [];
246
171
  }
247
172
  function s(t) {
248
173
  if (t.key !== "Tab") return;
@@ -251,35 +176,34 @@ function _e(e, t) {
251
176
  let r = n[0], i = n[n.length - 1], s = a(e.value).activeElement;
252
177
  t.shiftKey ? s === r && (t.preventDefault(), i.focus()) : s === i && (t.preventDefault(), r.focus());
253
178
  }
254
- function c() {
179
+ function l() {
255
180
  let t = r !== null || i !== null;
256
- t && l({ restoreFocus: !1 }), t || (n = a(e.value).activeElement), i = requestAnimationFrame(() => {
181
+ t && u({ restoreFocus: !1 }), t || (n = a(e.value).activeElement), i = requestAnimationFrame(() => {
257
182
  i = null;
258
183
  let t = o();
259
184
  t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
260
185
  }), r = P(e, "keydown", s);
261
186
  }
262
- function l(e = {}) {
187
+ function u(e = {}) {
263
188
  let t = e.restoreFocus !== !1;
264
189
  i !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(i), i = null), r?.(), r = null, t && n && n.focus && (n.focus(), n = null);
265
190
  }
266
- let d = O([t, e], ([e, t]) => {
267
- e && t ? c() : l();
191
+ let f = c([t, e], ([e, t]) => {
192
+ e && t ? l() : u();
268
193
  }, { flush: "post" });
269
- u(() => {
270
- d(), l();
194
+ d(() => {
195
+ f(), u();
271
196
  });
272
197
  }
273
- //#endregion
274
- //#region ../media-library/src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
275
- var ve = {
198
+ // ../media-library/src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
199
+ var _e = {
276
200
  key: 0,
277
201
  class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
278
202
  style: { color: "var(--tpl-text-muted)" }
279
- }, ye = ["onClick"], be = {
203
+ }, ve = ["onClick"], ye = {
280
204
  key: 1,
281
205
  style: { color: "var(--tpl-text)" }
282
- }, xe = /* @__PURE__ */ D({
206
+ }, be = /* @__PURE__ */ e({
283
207
  __name: "MediaBreadcrumb",
284
208
  props: {
285
209
  folders: {},
@@ -287,7 +211,7 @@ var ve = {
287
211
  },
288
212
  emits: ["navigate"],
289
213
  setup(e, { emit: t }) {
290
- let n = e, r = t, { t: i } = Q(), s = p(() => {
214
+ let n = e, r = t, { t: o } = Z(), s = O(() => {
291
215
  if (!n.currentFolderId) return [];
292
216
  let e = [];
293
217
  return c(n.folders, n.currentFolderId, e), e;
@@ -299,27 +223,27 @@ var ve = {
299
223
  }
300
224
  return !1;
301
225
  }
302
- return (e, t) => s.value.length > 0 ? (v(), h("div", ve, [b("button", {
226
+ return (e, t) => s.value.length > 0 ? (a(), f("div", _e, [T("button", {
303
227
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
304
228
  style: { color: "var(--tpl-primary)" },
305
229
  onClick: t[0] ||= (e) => r("navigate", null)
306
- }, a(S(i).mediaLibrary.allFiles), 1), (v(!0), h(w, null, o(s.value, (e, t) => (v(), h(w, { key: e.id }, [d(S(te), {
230
+ }, y(k(o).mediaLibrary.allFiles), 1), (a(!0), f(A, null, i(s.value, (e, t) => (a(), f(A, { key: e.id }, [M(k(W), {
307
231
  size: 12,
308
232
  "stroke-width": 2
309
- }), t < s.value.length - 1 ? (v(), h("button", {
233
+ }), t < s.value.length - 1 ? (a(), f("button", {
310
234
  key: 0,
311
235
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
312
236
  style: { color: "var(--tpl-primary)" },
313
237
  onClick: (t) => r("navigate", e.id)
314
- }, a(e.name), 9, ye)) : (v(), h("span", be, a(e.name), 1))], 64))), 128))])) : m("", !0);
238
+ }, y(e.name), 9, ve)) : (a(), f("span", ye, y(e.name), 1))], 64))), 128))])) : b("", !0);
315
239
  }
316
- }), Se = ["aria-expanded", "aria-label"], Ce = {
240
+ }), xe = ["aria-expanded", "aria-label"], Se = {
317
241
  key: 1,
318
242
  class: "tpl:size-4 tpl:shrink-0"
319
- }, we = {
243
+ }, Ce = {
320
244
  key: 0,
321
245
  class: "tpl:truncate"
322
- }, Te = ["onKeydown"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = ["title", "aria-label"], ke = { key: 0 }, Ae = ["placeholder", "onKeydown"], je = /* @__PURE__ */ D({
246
+ }, we = ["onKeydown"], Te = ["title", "aria-label"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = { key: 0 }, ke = ["placeholder", "onKeydown"], Ae = /* @__PURE__ */ e({
323
247
  __name: "MediaFolderTreeNode",
324
248
  props: {
325
249
  folder: {},
@@ -335,76 +259,76 @@ var ve = {
335
259
  "renameFolder",
336
260
  "deleteFolder"
337
261
  ],
338
- setup(t, { emit: i }) {
339
- let s = t, l = i, { t: u } = Q(), f = c(!1), g = c(!1), _ = c(""), x = c(!1), C = c(""), E = c(!1), D = p(() => s.folder.children.length > 0), O = p(() => s.depth < 4), M = p(() => s.currentFolderId === s.folder.id), N = p(() => s.currentFolderId ? F(s.folder.children, s.currentFolderId) : !1), P = p(() => f.value || N.value);
262
+ setup(e, { emit: t }) {
263
+ let n = e, s = t, { t: c } = Z(), l = _(!1), u = _(!1), d = _(""), p = _(!1), m = _(""), v = _(!1), S = O(() => n.folder.children.length > 0), C = O(() => n.depth < 4), E = O(() => n.currentFolderId === n.folder.id), N = O(() => n.currentFolderId ? F(n.folder.children, n.currentFolderId) : !1), P = O(() => l.value || N.value);
340
264
  function F(e, t) {
341
265
  for (let n of e) if (n.id === t || F(n.children, t)) return !0;
342
266
  return !1;
343
267
  }
344
268
  function I() {
345
- f.value = !f.value;
346
- }
347
- function ee() {
348
- g.value = !0, _.value = s.folder.name;
269
+ l.value = !l.value;
349
270
  }
350
271
  function L() {
351
- let e = _.value.trim();
352
- e && e !== s.folder.name && l("renameFolder", s.folder.id, e), g.value = !1, _.value = "";
272
+ u.value = !0, d.value = n.folder.name;
353
273
  }
354
274
  function R() {
355
- g.value = !1, _.value = "";
275
+ let e = d.value.trim();
276
+ e && e !== n.folder.name && s("renameFolder", n.folder.id, e), u.value = !1, d.value = "";
356
277
  }
357
278
  function z() {
358
- x.value = !0, C.value = "", f.value = !0;
279
+ u.value = !1, d.value = "";
359
280
  }
360
281
  function B() {
361
- C.value.trim() && l("createFolder", C.value.trim(), s.folder.id), x.value = !1, C.value = "";
282
+ p.value = !0, m.value = "", l.value = !0;
283
+ }
284
+ function te() {
285
+ m.value.trim() && s("createFolder", m.value.trim(), n.folder.id), p.value = !1, m.value = "";
362
286
  }
363
287
  function ne() {
364
- x.value = !1, C.value = "";
288
+ p.value = !1, m.value = "";
365
289
  }
366
- function re() {
367
- E.value ? (l("deleteFolder", s.folder.id), E.value = !1) : E.value = !0;
290
+ function U() {
291
+ v.value ? (s("deleteFolder", n.folder.id), v.value = !1) : v.value = !0;
368
292
  }
369
- function ie(e) {
293
+ function G(e) {
370
294
  let t = e.relatedTarget;
371
- t && e.currentTarget.contains(t) || (E.value = !1);
295
+ t && e.currentTarget.contains(t) || (v.value = !1);
372
296
  }
373
- return (i, s) => {
374
- let c = n("MediaFolderTreeNode", !0);
375
- return v(), h("div", null, [b("div", {
297
+ return (t, n) => {
298
+ let l = o("MediaFolderTreeNode", !0);
299
+ return a(), f("div", null, [T("div", {
376
300
  class: "tpl:group tpl:flex tpl:w-full tpl:items-center tpl:gap-1 tpl:py-1.5 tpl:pr-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
377
- style: y({
378
- paddingLeft: `${t.depth * 16 + 8}px`,
379
- backgroundColor: M.value ? "var(--tpl-bg-active)" : "transparent",
380
- color: M.value ? "var(--tpl-primary)" : "var(--tpl-text)"
301
+ style: g({
302
+ paddingLeft: `${e.depth * 16 + 8}px`,
303
+ backgroundColor: E.value ? "var(--tpl-bg-active)" : "transparent",
304
+ color: E.value ? "var(--tpl-primary)" : "var(--tpl-text)"
381
305
  }),
382
- onFocusout: ie
306
+ onFocusout: G
383
307
  }, [
384
- D.value || x.value ? (v(), h("button", {
308
+ S.value || p.value ? (a(), f("button", {
385
309
  key: 0,
386
310
  type: "button",
387
311
  class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
388
312
  "aria-expanded": P.value,
389
- "aria-label": P.value ? S(u).mediaLibrary.collapseFolder : S(u).mediaLibrary.expandFolder,
390
- onClick: A(I, ["stop"])
391
- }, [d(S(te), {
392
- class: e(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
313
+ "aria-label": P.value ? k(c).mediaLibrary.collapseFolder : k(c).mediaLibrary.expandFolder,
314
+ onClick: w(I, ["stop"])
315
+ }, [M(k(W), {
316
+ class: j(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
393
317
  size: 10,
394
318
  "stroke-width": 2
395
- }, null, 8, ["class"])], 8, Se)) : (v(), h("span", Ce)),
396
- b("button", {
319
+ }, null, 8, ["class"])], 8, xe)) : (a(), f("span", Se)),
320
+ T("button", {
397
321
  type: "button",
398
322
  class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
399
- onClick: s[0] ||= (e) => l("navigate", t.folder.id)
400
- }, [d(S(q), {
323
+ onClick: n[0] ||= (t) => s("navigate", e.folder.id)
324
+ }, [M(k(V), {
401
325
  class: "tpl:shrink-0",
402
326
  size: 14,
403
327
  "stroke-width": 1.5
404
- }), g.value ? m("", !0) : (v(), h("span", we, a(t.folder.name), 1))]),
405
- g.value ? r((v(), h("input", {
328
+ }), u.value ? b("", !0) : (a(), f("span", Ce, y(e.folder.name), 1))]),
329
+ u.value ? r((a(), f("input", {
406
330
  key: 2,
407
- "onUpdate:modelValue": s[1] ||= (e) => _.value = e,
331
+ "onUpdate:modelValue": n[1] ||= (e) => d.value = e,
408
332
  type: "text",
409
333
  class: "tpl:min-w-0 tpl:flex-1 tpl:rounded tpl:border tpl:px-1.5 tpl:py-0.5 tpl:text-xs tpl:outline-none",
410
334
  style: {
@@ -413,62 +337,62 @@ var ve = {
413
337
  color: "var(--tpl-text)"
414
338
  },
415
339
  autofocus: "",
416
- onKeydown: [j(L, ["enter"]), j(A(R, ["stop"]), ["escape"])],
417
- onBlur: L,
418
- onClick: s[2] ||= A(() => {}, ["stop"])
419
- }, null, 40, Te)), [[k, _.value]]) : m("", !0),
420
- g.value ? m("", !0) : (v(), h("span", {
340
+ onKeydown: [h(R, ["enter"]), h(w(z, ["stop"]), ["escape"])],
341
+ onBlur: R,
342
+ onClick: n[2] ||= w(() => {}, ["stop"])
343
+ }, null, 40, we)), [[D, d.value]]) : b("", !0),
344
+ u.value ? b("", !0) : (a(), f("span", {
421
345
  key: 3,
422
- class: e(["tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:transition-opacity", M.value || E.value ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100"])
346
+ class: j(["tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:transition-opacity", E.value || v.value ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100"])
423
347
  }, [
424
- O.value && t.canCreateFolder ? (v(), h("button", {
348
+ C.value && e.canCreateFolder ? (a(), f("button", {
425
349
  key: 0,
426
350
  type: "button",
427
351
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
428
- title: S(u).mediaLibrary.addSubfolder,
429
- "aria-label": S(u).mediaLibrary.addSubfolder,
430
- onClick: A(z, ["stop"])
431
- }, [d(S(U), {
352
+ title: k(c).mediaLibrary.addSubfolder,
353
+ "aria-label": k(c).mediaLibrary.addSubfolder,
354
+ onClick: w(B, ["stop"])
355
+ }, [M(k(ee), {
432
356
  size: 12,
433
357
  "stroke-width": 2
434
- })], 8, Ee)) : m("", !0),
435
- t.canRenameFolder ? (v(), h("button", {
358
+ })], 8, Te)) : b("", !0),
359
+ e.canRenameFolder ? (a(), f("button", {
436
360
  key: 1,
437
361
  type: "button",
438
362
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
439
- title: S(u).mediaLibrary.renameFolder,
440
- "aria-label": S(u).mediaLibrary.renameFolder,
441
- onClick: A(ee, ["stop"])
442
- }, [d(S(H), {
363
+ title: k(c).mediaLibrary.renameFolder,
364
+ "aria-label": k(c).mediaLibrary.renameFolder,
365
+ onClick: w(L, ["stop"])
366
+ }, [M(k(H), {
443
367
  size: 12,
444
368
  "stroke-width": 2
445
- })], 8, De)) : m("", !0),
446
- t.canDeleteFolder ? (v(), h("button", {
369
+ })], 8, Ee)) : b("", !0),
370
+ e.canDeleteFolder ? (a(), f("button", {
447
371
  key: 2,
448
372
  type: "button",
449
373
  "data-testid": "media-folder-delete",
450
374
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
451
- title: E.value ? S(u).mediaLibrary.deleteFolderConfirm : S(u).mediaLibrary.deleteFolder,
452
- "aria-label": E.value ? S(u).mediaLibrary.deleteFolderConfirm : S(u).mediaLibrary.deleteFolder,
453
- onClick: A(re, ["stop"])
454
- }, [d(S(se), {
375
+ title: v.value ? k(c).mediaLibrary.deleteFolderConfirm : k(c).mediaLibrary.deleteFolder,
376
+ "aria-label": v.value ? k(c).mediaLibrary.deleteFolderConfirm : k(c).mediaLibrary.deleteFolder,
377
+ onClick: w(U, ["stop"])
378
+ }, [M(k(ie), {
455
379
  size: 12,
456
380
  "stroke-width": 2,
457
381
  style: { color: "var(--tpl-danger)" }
458
- })], 8, Oe)) : m("", !0)
382
+ })], 8, De)) : b("", !0)
459
383
  ], 2))
460
- ], 36), P.value ? (v(), h("div", ke, [(v(!0), h(w, null, o(t.folder.children, (e) => (v(), T(c, {
461
- key: e.id,
462
- folder: e,
463
- "current-folder-id": t.currentFolderId,
464
- depth: t.depth + 1,
465
- "can-create-folder": t.canCreateFolder,
466
- "can-rename-folder": t.canRenameFolder,
467
- "can-delete-folder": t.canDeleteFolder,
468
- onNavigate: s[3] ||= (e) => l("navigate", e),
469
- onCreateFolder: s[4] ||= (e, t) => l("createFolder", e, t),
470
- onRenameFolder: s[5] ||= (e, t) => l("renameFolder", e, t),
471
- onDeleteFolder: s[6] ||= (e) => l("deleteFolder", e)
384
+ ], 36), P.value ? (a(), f("div", Oe, [(a(!0), f(A, null, i(e.folder.children, (t) => (a(), x(l, {
385
+ key: t.id,
386
+ folder: t,
387
+ "current-folder-id": e.currentFolderId,
388
+ depth: e.depth + 1,
389
+ "can-create-folder": e.canCreateFolder,
390
+ "can-rename-folder": e.canRenameFolder,
391
+ "can-delete-folder": e.canDeleteFolder,
392
+ onNavigate: n[3] ||= (e) => s("navigate", e),
393
+ onCreateFolder: n[4] ||= (e, t) => s("createFolder", e, t),
394
+ onRenameFolder: n[5] ||= (e, t) => s("renameFolder", e, t),
395
+ onDeleteFolder: n[6] ||= (e) => s("deleteFolder", e)
472
396
  }, null, 8, [
473
397
  "folder",
474
398
  "current-folder-id",
@@ -476,12 +400,12 @@ var ve = {
476
400
  "can-create-folder",
477
401
  "can-rename-folder",
478
402
  "can-delete-folder"
479
- ]))), 128)), x.value ? (v(), h("div", {
403
+ ]))), 128)), p.value ? (a(), f("div", {
480
404
  key: 0,
481
- style: y({ paddingLeft: `${(t.depth + 1) * 16 + 8}px` }),
405
+ style: g({ paddingLeft: `${(e.depth + 1) * 16 + 8}px` }),
482
406
  class: "tpl:py-1.5 tpl:pr-2"
483
- }, [r(b("input", {
484
- "onUpdate:modelValue": s[7] ||= (e) => C.value = e,
407
+ }, [r(T("input", {
408
+ "onUpdate:modelValue": n[7] ||= (e) => m.value = e,
485
409
  type: "text",
486
410
  class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
487
411
  style: {
@@ -489,20 +413,20 @@ var ve = {
489
413
  "background-color": "var(--tpl-bg)",
490
414
  color: "var(--tpl-text)"
491
415
  },
492
- placeholder: S(u).mediaLibrary.subfolderName,
416
+ placeholder: k(c).mediaLibrary.subfolderName,
493
417
  autofocus: "",
494
- onKeydown: [j(B, ["enter"]), j(A(ne, ["stop"]), ["escape"])],
495
- onBlur: B
496
- }, null, 40, Ae), [[k, C.value]])], 4)) : m("", !0)])) : m("", !0)]);
418
+ onKeydown: [h(te, ["enter"]), h(w(ne, ["stop"]), ["escape"])],
419
+ onBlur: te
420
+ }, null, 40, ke), [[D, m.value]])], 4)) : b("", !0)])) : b("", !0)]);
497
421
  };
498
422
  }
499
- }), Me = {
423
+ }), je = {
500
424
  "data-testid": "media-folder-tree",
501
425
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:overflow-y-auto"
502
- }, Ne = {
426
+ }, Me = {
503
427
  key: 0,
504
428
  class: "tpl:px-3 tpl:py-2"
505
- }, Pe = ["placeholder", "onKeydown"], Fe = /* @__PURE__ */ D({
429
+ }, Ne = ["placeholder", "onKeydown"], Pe = /* @__PURE__ */ e({
506
430
  __name: "MediaFolderTree",
507
431
  props: {
508
432
  folders: {},
@@ -521,29 +445,29 @@ var ve = {
521
445
  "showFrequentlyUsed"
522
446
  ],
523
447
  setup(e, { emit: t }) {
524
- let n = t, { t: i } = Q(), s = c(!1), l = c("");
525
- function u() {
526
- s.value = !0, l.value = "";
448
+ let n = t, { t: o } = Z(), s = _(!1), c = _("");
449
+ function l() {
450
+ s.value = !0, c.value = "";
527
451
  }
528
- function f() {
529
- l.value.trim() && n("createFolder", l.value.trim()), s.value = !1, l.value = "";
452
+ function u() {
453
+ c.value.trim() && n("createFolder", c.value.trim()), s.value = !1, c.value = "";
530
454
  }
531
- function p() {
532
- s.value = !1, l.value = "";
455
+ function d() {
456
+ s.value = !1, c.value = "";
533
457
  }
534
- return (t, c) => (v(), h("div", Me, [
535
- b("button", {
458
+ return (t, p) => (a(), f("div", je, [
459
+ T("button", {
536
460
  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",
537
- style: y({
461
+ style: g({
538
462
  backgroundColor: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-bg-active)" : "transparent",
539
463
  color: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
540
464
  }),
541
- onClick: c[0] ||= (e) => n("navigate", null)
542
- }, [d(S(K), {
465
+ onClick: p[0] ||= (e) => n("navigate", null)
466
+ }, [M(k(K), {
543
467
  size: 14,
544
468
  "stroke-width": 1.5
545
- }), g(" " + a(S(i).mediaLibrary.allFiles), 1)], 4),
546
- (v(!0), h(w, null, o(e.folders, (t) => (v(), T(je, {
469
+ }), m(" " + y(k(o).mediaLibrary.allFiles), 1)], 4),
470
+ (a(!0), f(A, null, i(e.folders, (t) => (a(), x(Ae, {
547
471
  key: t.id,
548
472
  folder: t,
549
473
  "current-folder-id": e.currentFolderId,
@@ -551,10 +475,10 @@ var ve = {
551
475
  "can-create-folder": e.canCreateFolder,
552
476
  "can-rename-folder": e.canRenameFolder,
553
477
  "can-delete-folder": e.canDeleteFolder,
554
- onNavigate: c[1] ||= (e) => n("navigate", e),
555
- onCreateFolder: c[2] ||= (e, t) => n("createFolder", e, t),
556
- onRenameFolder: c[3] ||= (e, t) => n("renameFolder", e, t),
557
- onDeleteFolder: c[4] ||= (e) => n("deleteFolder", e)
478
+ onNavigate: p[1] ||= (e) => n("navigate", e),
479
+ onCreateFolder: p[2] ||= (e, t) => n("createFolder", e, t),
480
+ onRenameFolder: p[3] ||= (e, t) => n("renameFolder", e, t),
481
+ onDeleteFolder: p[4] ||= (e) => n("deleteFolder", e)
558
482
  }, null, 8, [
559
483
  "folder",
560
484
  "current-folder-id",
@@ -562,8 +486,8 @@ var ve = {
562
486
  "can-rename-folder",
563
487
  "can-delete-folder"
564
488
  ]))), 128)),
565
- s.value ? (v(), h("div", Ne, [r(b("input", {
566
- "onUpdate:modelValue": c[5] ||= (e) => l.value = e,
489
+ s.value ? (a(), f("div", Me, [r(T("input", {
490
+ "onUpdate:modelValue": p[5] ||= (e) => c.value = e,
567
491
  type: "text",
568
492
  class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
569
493
  style: {
@@ -571,38 +495,38 @@ var ve = {
571
495
  "background-color": "var(--tpl-bg)",
572
496
  color: "var(--tpl-text)"
573
497
  },
574
- placeholder: S(i).mediaLibrary.folderName,
498
+ placeholder: k(o).mediaLibrary.folderName,
575
499
  autofocus: "",
576
- onKeydown: [j(f, ["enter"]), j(A(p, ["stop"]), ["escape"])],
577
- onBlur: f
578
- }, null, 40, Pe), [[k, l.value]])])) : m("", !0),
579
- !s.value && e.canCreateFolder ? (v(), h("button", {
500
+ onKeydown: [h(u, ["enter"]), h(w(d, ["stop"]), ["escape"])],
501
+ onBlur: u
502
+ }, null, 40, Ne), [[D, c.value]])])) : b("", !0),
503
+ !s.value && e.canCreateFolder ? (a(), f("button", {
580
504
  key: 1,
581
505
  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",
582
506
  style: { color: "var(--tpl-text-muted)" },
583
- onClick: u
584
- }, [d(S(U), {
507
+ onClick: l
508
+ }, [M(k(ee), {
585
509
  size: 14,
586
510
  "stroke-width": 1.5
587
- }), g(" " + a(S(i).mediaLibrary.newFolder), 1)])) : m("", !0),
588
- c[7] ||= b("div", { class: "tpl:flex-1" }, null, -1),
589
- e.hasFrequentlyUsed ? (v(), h("button", {
511
+ }), m(" " + y(k(o).mediaLibrary.newFolder), 1)])) : b("", !0),
512
+ p[7] ||= T("div", { class: "tpl:flex-1" }, null, -1),
513
+ e.hasFrequentlyUsed ? (a(), f("button", {
590
514
  key: 2,
591
515
  "data-testid": "media-frequently-used",
592
516
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:border-t tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
593
- style: y({
517
+ style: g({
594
518
  borderColor: "var(--tpl-border)",
595
519
  backgroundColor: e.viewMode === "frequently-used" ? "var(--tpl-bg-active)" : "transparent",
596
520
  color: e.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
597
521
  }),
598
- onClick: c[6] ||= (e) => n("showFrequentlyUsed")
599
- }, [d(S(ue), {
522
+ onClick: p[6] ||= (e) => n("showFrequentlyUsed")
523
+ }, [M(k(ue), {
600
524
  size: 14,
601
525
  "stroke-width": 1.5
602
- }), g(" " + a(S(i).mediaLibrary.frequentlyUsed), 1)], 4)) : m("", !0)
526
+ }), m(" " + y(k(o).mediaLibrary.frequentlyUsed), 1)], 4)) : b("", !0)
603
527
  ]));
604
528
  }
605
- }), Ie = /* @__PURE__ */ D({
529
+ }), Fe = /* @__PURE__ */ e({
606
530
  __name: "MediaFileIcon",
607
531
  props: { mimeType: {} },
608
532
  setup(e) {
@@ -702,11 +626,11 @@ var ve = {
702
626
  color: "var(--tpl-text-muted)",
703
627
  bgColor: "var(--tpl-bg-hover)",
704
628
  icon: "document"
705
- }, i = p(() => n[t.mimeType] ?? r);
706
- return (e, t) => (v(), h("div", {
629
+ }, i = O(() => n[t.mimeType] ?? r);
630
+ return (e, t) => (a(), f("div", {
707
631
  class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2",
708
- style: y({ backgroundColor: i.value.bgColor })
709
- }, [i.value.icon === "document" ? (v(), h("svg", {
632
+ style: g({ backgroundColor: i.value.bgColor })
633
+ }, [i.value.icon === "document" ? (a(), f("svg", {
710
634
  key: 0,
711
635
  width: "60",
712
636
  height: "60",
@@ -714,23 +638,23 @@ var ve = {
714
638
  fill: "none",
715
639
  stroke: "currentColor",
716
640
  "stroke-width": "1.5",
717
- style: y({ color: i.value.color })
641
+ style: g({ color: i.value.color })
718
642
  }, [...t[0] ||= [
719
- b("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
720
- b("polyline", { points: "14 2 14 8 20 8" }, null, -1),
721
- b("line", {
643
+ T("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
644
+ T("polyline", { points: "14 2 14 8 20 8" }, null, -1),
645
+ T("line", {
722
646
  x1: "8",
723
647
  y1: "13",
724
648
  x2: "16",
725
649
  y2: "13"
726
650
  }, null, -1),
727
- b("line", {
651
+ T("line", {
728
652
  x1: "8",
729
653
  y1: "17",
730
654
  x2: "12",
731
655
  y2: "17"
732
656
  }, null, -1)
733
- ]], 4)) : i.value.icon === "video" ? (v(), h("svg", {
657
+ ]], 4)) : i.value.icon === "video" ? (a(), f("svg", {
734
658
  key: 1,
735
659
  width: "40",
736
660
  height: "40",
@@ -738,18 +662,18 @@ var ve = {
738
662
  fill: "none",
739
663
  stroke: "currentColor",
740
664
  "stroke-width": "1.5",
741
- style: y({ color: i.value.color })
742
- }, [...t[1] ||= [b("rect", {
665
+ style: g({ color: i.value.color })
666
+ }, [...t[1] ||= [T("rect", {
743
667
  x: "2",
744
668
  y: "4",
745
669
  width: "20",
746
670
  height: "16",
747
671
  rx: "2"
748
- }, null, -1), b("polygon", {
672
+ }, null, -1), T("polygon", {
749
673
  points: "10,8 16,12 10,16",
750
674
  fill: "currentColor",
751
675
  stroke: "none"
752
- }, null, -1)]], 4)) : (v(), h("svg", {
676
+ }, null, -1)]], 4)) : (a(), f("svg", {
753
677
  key: 2,
754
678
  width: "40",
755
679
  height: "40",
@@ -757,28 +681,27 @@ var ve = {
757
681
  fill: "none",
758
682
  stroke: "currentColor",
759
683
  "stroke-width": "1.5",
760
- style: y({ color: i.value.color })
684
+ style: g({ color: i.value.color })
761
685
  }, [...t[2] ||= [
762
- b("path", { d: "M9 18V5l12-2v13" }, null, -1),
763
- b("circle", {
686
+ T("path", { d: "M9 18V5l12-2v13" }, null, -1),
687
+ T("circle", {
764
688
  cx: "6",
765
689
  cy: "18",
766
690
  r: "3"
767
691
  }, null, -1),
768
- b("circle", {
692
+ T("circle", {
769
693
  cx: "18",
770
694
  cy: "16",
771
695
  r: "3"
772
696
  }, null, -1)
773
- ]], 4)), b("span", {
697
+ ]], 4)), T("span", {
774
698
  class: "tpl:text-xs tpl:font-bold tpl:tracking-wider",
775
- style: y({ color: i.value.color })
776
- }, a(i.value.label), 5)], 4));
699
+ style: g({ color: i.value.color })
700
+ }, y(i.value.label), 5)], 4));
777
701
  }
778
702
  });
779
- //#endregion
780
- //#region ../media-library/src/utils/formatAbsoluteDate.ts
781
- function Le(e, t, n) {
703
+ // ../media-library/src/utils/formatAbsoluteDate.ts
704
+ function Ie(e, t, n) {
782
705
  let r = new Date(e);
783
706
  if (Number.isNaN(r.getTime())) return "";
784
707
  let i = t?.trim().replace(/_/g, "-") || void 0;
@@ -788,9 +711,8 @@ function Le(e, t, n) {
788
711
  return r.toLocaleDateString(void 0, n);
789
712
  }
790
713
  }
791
- //#endregion
792
- //#region ../media-library/src/utils/formatFileSize.ts
793
- var Re = [
714
+ // ../media-library/src/utils/formatFileSize.ts
715
+ var Le = [
794
716
  "B",
795
717
  "KB",
796
718
  "MB",
@@ -798,39 +720,38 @@ var Re = [
798
720
  ];
799
721
  function $(e) {
800
722
  let t = e, n = 0;
801
- for (; t >= 1024 && n < Re.length - 1;) t /= 1024, n += 1;
802
- return `${Math.round(t * 10) / 10} ${Re[n]}`;
723
+ for (; t >= 1024 && n < Le.length - 1;) t /= 1024, n += 1;
724
+ return `${Math.round(t * 10) / 10} ${Le[n]}`;
803
725
  }
804
- //#endregion
805
- //#region ../media-library/src/components/media/MediaGrid.vue?vue&type=script&setup=true&lang.ts
806
- var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
726
+ // ../media-library/src/components/media/MediaGrid.vue?vue&type=script&setup=true&lang.ts
727
+ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
807
728
  key: 1,
808
729
  class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-16"
809
- }, He = {
730
+ }, Ve = {
810
731
  class: "tpl:text-xs",
811
732
  style: { color: "var(--tpl-text-muted)" }
812
- }, Ue = ["aria-label"], We = [
733
+ }, He = ["aria-label"], Ue = [
813
734
  "data-media-id",
814
735
  "aria-selected",
815
736
  "aria-label",
816
737
  "onClick",
817
738
  "onDblclick",
818
739
  "onKeydown"
819
- ], Ge = { class: "tpl:aspect-square" }, Ke = ["src", "alt"], qe = { class: "tpl:px-2 tpl:py-1.5" }, Je = {
740
+ ], We = { class: "tpl:aspect-square" }, Ge = ["src", "alt"], Ke = { class: "tpl:px-2 tpl:py-1.5" }, qe = {
820
741
  class: "tpl:truncate tpl:text-[10px] tpl:font-medium",
821
742
  style: { color: "var(--tpl-text)" }
822
- }, Ye = {
743
+ }, Je = {
823
744
  class: "tpl:flex tpl:justify-between tpl:text-[10px]",
824
745
  style: { color: "var(--tpl-text-muted)" }
825
- }, Xe = { key: 0 }, Ze = { key: 1 }, Qe = [
746
+ }, Ye = { key: 0 }, Xe = { key: 1 }, Ze = [
826
747
  "title",
827
748
  "aria-label",
828
749
  "onClick"
829
- ], $e = [
750
+ ], Qe = [
830
751
  "title",
831
752
  "aria-label",
832
753
  "onClick"
833
- ], et = {
754
+ ], $e = {
834
755
  key: 0,
835
756
  "aria-hidden": "true",
836
757
  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",
@@ -838,34 +759,34 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
838
759
  "background-color": "var(--tpl-primary)",
839
760
  color: "var(--tpl-on-primary)"
840
761
  }
841
- }, tt = ["aria-label"], nt = [
762
+ }, et = ["aria-label"], tt = [
842
763
  "data-media-id",
843
764
  "aria-selected",
844
765
  "aria-label",
845
766
  "onClick",
846
767
  "onDblclick",
847
768
  "onKeydown"
848
- ], rt = {
769
+ ], nt = {
849
770
  class: "tpl:size-10 tpl:shrink-0 tpl:overflow-hidden tpl:rounded",
850
771
  style: { "background-color": "var(--tpl-bg-hover)" }
851
- }, it = ["src", "alt"], at = {
772
+ }, rt = ["src", "alt"], it = {
852
773
  key: 1,
853
774
  class: "tpl-list-icon tpl:size-full"
854
- }, ot = { class: "tpl:min-w-0 tpl:flex-1" }, st = {
775
+ }, at = { class: "tpl:min-w-0 tpl:flex-1" }, ot = {
855
776
  class: "tpl:truncate tpl:text-xs tpl:font-medium",
856
777
  style: { color: "var(--tpl-text)" }
857
- }, ct = {
778
+ }, st = {
858
779
  class: "tpl:text-[10px]",
859
780
  style: { color: "var(--tpl-text-muted)" }
860
- }, lt = [
781
+ }, ct = [
861
782
  "title",
862
783
  "aria-label",
863
784
  "onClick"
864
- ], ut = [
785
+ ], lt = [
865
786
  "title",
866
787
  "aria-label",
867
788
  "onClick"
868
- ], dt = {
789
+ ], ut = {
869
790
  key: 0,
870
791
  "aria-hidden": "true",
871
792
  class: "tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-full",
@@ -873,10 +794,10 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
873
794
  "background-color": "var(--tpl-primary)",
874
795
  color: "var(--tpl-on-primary)"
875
796
  }
876
- }, ft = {
797
+ }, dt = {
877
798
  key: 4,
878
799
  class: "tpl:flex tpl:justify-center tpl:py-4"
879
- }, pt = /*#__PURE__*/ G(/* @__PURE__ */ D({
800
+ }, ft = /*#__PURE__*/ q(/* @__PURE__ */ e({
880
801
  __name: "MediaGrid",
881
802
  props: {
882
803
  items: {},
@@ -897,166 +818,166 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
897
818
  "replace",
898
819
  "confirm"
899
820
  ],
900
- setup(n, { emit: r }) {
901
- let i = n, s = r, { isAcceptedMimeType: l, isImageMimeType: u } = he();
902
- function f(e) {
821
+ setup(e, { emit: n }) {
822
+ let r = e, o = n, { isAcceptedMimeType: s, isImageMimeType: c } = Q();
823
+ function l(e) {
903
824
  return e.mimeType ?? "";
904
825
  }
905
- function p(e) {
826
+ function u(e) {
906
827
  return e.thumbnailUrl ?? e.url;
907
828
  }
908
- function _(e) {
909
- return !i.accept || i.accept.length === 0 || l(f(e), i.accept);
829
+ function d(e) {
830
+ return !r.accept || r.accept.length === 0 || s(l(e), r.accept);
910
831
  }
911
- function x(e) {
912
- return i.canUpdate === !0 && e.canUpdate !== !1;
832
+ function p(e) {
833
+ return r.canUpdate === !0 && e.canUpdate !== !1;
913
834
  }
914
- function C(e) {
915
- return i.canReplace === !0 && e.canUpdate !== !1;
835
+ function h(e) {
836
+ return r.canReplace === !0 && e.canUpdate !== !1;
916
837
  }
917
- function E(e, t) {
918
- t.metaKey || t.ctrlKey ? s("toggle", e.id) : s("select", e);
838
+ function v(e, t) {
839
+ t.metaKey || t.ctrlKey ? o("toggle", e.id) : o("select", e);
919
840
  }
920
- function D(e) {
921
- _(e) && s("confirm", e);
841
+ function S(e) {
842
+ d(e) && o("confirm", e);
922
843
  }
923
- function O(e, t) {
924
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), s("select", e));
844
+ function C(e, t) {
845
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), o("select", e));
925
846
  }
926
- function k(e) {
927
- return i.selectedIds.has(e.id);
847
+ function E(e) {
848
+ return r.selectedIds.has(e.id);
928
849
  }
929
- function j(e) {
930
- return k(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
850
+ function D(e) {
851
+ return E(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
931
852
  }
932
- let { t: M } = Q(), N = t(Z, null), P = c(null);
933
- L(P, ([{ isIntersecting: e }]) => {
934
- e && i.hasMore && !i.isLoading && s("loadMore");
853
+ let { t: O } = Z(), N = t(X, null), P = _(null);
854
+ R(P, ([{ isIntersecting: e }]) => {
855
+ e && r.hasMore && !r.isLoading && o("loadMore");
935
856
  }, { threshold: .1 });
936
857
  function F(e) {
937
- return Le(e, N?.value, {
858
+ return Ie(e, N?.value, {
938
859
  year: "numeric",
939
860
  month: "short",
940
861
  day: "numeric"
941
862
  });
942
863
  }
943
- return (t, r) => (v(), h("div", ze, [
944
- n.isLoading && n.items.length === 0 ? (v(), h("div", {
864
+ return (t, n) => (a(), f("div", Re, [
865
+ e.isLoading && e.items.length === 0 ? (a(), f("div", {
945
866
  key: 0,
946
867
  role: "status",
947
868
  "aria-busy": "true",
948
- "aria-label": S(M).mediaLibrary.loading,
949
- class: e(n.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
950
- }, [(v(), h(w, null, o(8, (t) => b("div", {
869
+ "aria-label": k(O).mediaLibrary.loading,
870
+ class: j(e.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
871
+ }, [(a(), f(A, null, i(8, (t) => T("div", {
951
872
  key: t,
952
- class: e(["tpl-pulse tpl:rounded-lg", n.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
873
+ class: j(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
953
874
  style: { "background-color": "var(--tpl-bg-hover)" },
954
875
  "aria-hidden": "true"
955
- }, null, 2)), 64))], 10, Be)) : n.items.length === 0 ? (v(), h("div", Ve, [d(S(K), {
876
+ }, null, 2)), 64))], 10, ze)) : e.items.length === 0 ? (a(), f("div", Be, [M(k(K), {
956
877
  class: "tpl:mb-3",
957
878
  size: 40,
958
879
  "stroke-width": 1,
959
880
  style: { color: "var(--tpl-text-dim)" }
960
- }), b("p", He, a(n.searchQuery ? S(M).mediaLibrary.noSearchResults : S(M).mediaLibrary.noFiles), 1)])) : n.layout === "list" ? (v(), h("div", {
881
+ }), T("p", Ve, y(e.searchQuery ? k(O).mediaLibrary.noSearchResults : k(O).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (a(), f("div", {
961
882
  key: 3,
962
883
  role: "listbox",
963
- "aria-label": S(M).mediaLibrary.filesListAriaLabel,
884
+ "aria-label": k(O).mediaLibrary.filesListAriaLabel,
964
885
  "aria-multiselectable": "true",
965
886
  class: "tpl:flex tpl:flex-col tpl:gap-1"
966
- }, [(v(!0), h(w, null, o(n.items, (t) => (v(), h("div", {
967
- key: t.id,
887
+ }, [(a(!0), f(A, null, i(e.items, (e) => (a(), f("div", {
888
+ key: e.id,
968
889
  role: "option",
969
890
  tabindex: "0",
970
891
  "data-testid": "media-library-item",
971
- class: e(["tpl-media-list-item tpl:group tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-150", [!_(t) && !k(t) ? "tpl:opacity-60" : ""]]),
972
- "data-media-id": t.id,
973
- "aria-selected": k(t),
974
- "aria-label": t.filename || t.url,
975
- style: y({ backgroundColor: k(t) ? "var(--tpl-bg-hover)" : "transparent" }),
976
- onClick: (e) => E(t, e),
977
- onDblclick: (e) => D(t),
978
- onKeydown: (e) => O(t, e)
892
+ class: j(["tpl-media-list-item tpl:group tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-150", [!d(e) && !E(e) ? "tpl:opacity-60" : ""]]),
893
+ "data-media-id": e.id,
894
+ "aria-selected": E(e),
895
+ "aria-label": e.filename || e.url,
896
+ style: g({ backgroundColor: E(e) ? "var(--tpl-bg-hover)" : "transparent" }),
897
+ onClick: (t) => v(e, t),
898
+ onDblclick: (t) => S(e),
899
+ onKeydown: (t) => C(e, t)
979
900
  }, [
980
- b("div", rt, [S(u)(f(t)) ? (v(), h("img", {
901
+ T("div", nt, [k(c)(l(e)) ? (a(), f("img", {
981
902
  key: 0,
982
- src: p(t),
983
- alt: t.filename || t.url,
903
+ src: u(e),
904
+ alt: e.filename || e.url,
984
905
  class: "tpl:size-full tpl:object-cover",
985
906
  loading: "lazy"
986
- }, null, 8, it)) : (v(), h("div", at, [d(Ie, { "mime-type": f(t) }, null, 8, ["mime-type"])]))]),
987
- b("div", ot, [b("p", st, a(t.filename || t.url), 1), b("p", ct, [
988
- t.size == null ? m("", !0) : (v(), h(w, { key: 0 }, [g(a(S($)(t.size)), 1)], 64)),
989
- t.createdAt ? (v(), h(w, { key: 1 }, [t.size == null ? m("", !0) : (v(), h(w, { key: 0 }, [g(" · ")], 64)), g(" " + a(F(t.createdAt)), 1)], 64)) : m("", !0),
990
- S(u)(f(t)) && t.width && t.height ? (v(), h(w, { key: 2 }, [g(" · " + a(t.width) + "×" + a(t.height), 1)], 64)) : m("", !0)
907
+ }, null, 8, rt)) : (a(), f("div", it, [M(Fe, { "mime-type": l(e) }, null, 8, ["mime-type"])]))]),
908
+ T("div", at, [T("p", ot, y(e.filename || e.url), 1), T("p", st, [
909
+ e.size == null ? b("", !0) : (a(), f(A, { key: 0 }, [m(y(k($)(e.size)), 1)], 64)),
910
+ e.createdAt ? (a(), f(A, { key: 1 }, [e.size == null ? b("", !0) : (a(), f(A, { key: 0 }, [m(" · ")], 64)), m(" " + y(F(e.createdAt)), 1)], 64)) : b("", !0),
911
+ k(c)(l(e)) && e.width && e.height ? (a(), f(A, { key: 2 }, [m(" · " + y(e.width) + "×" + y(e.height), 1)], 64)) : b("", !0)
991
912
  ])]),
992
- b("div", { class: e(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(t)]) }, [x(t) ? (v(), h("button", {
913
+ T("div", { class: j(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", D(e)]) }, [p(e) ? (a(), f("button", {
993
914
  key: 0,
994
915
  type: "button",
995
916
  "data-testid": "media-edit",
996
917
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
997
918
  style: { color: "var(--tpl-text-muted)" },
998
- title: S(M).mediaLibrary.editFile,
999
- "aria-label": S(M).mediaLibrary.editFile,
1000
- onClick: A((e) => s("edit", t), ["stop"])
1001
- }, [d(S(H), {
919
+ title: k(O).mediaLibrary.editFile,
920
+ "aria-label": k(O).mediaLibrary.editFile,
921
+ onClick: w((t) => o("edit", e), ["stop"])
922
+ }, [M(k(H), {
1002
923
  size: 12,
1003
924
  "stroke-width": 2
1004
- })], 8, lt)) : m("", !0), C(t) ? (v(), h("button", {
925
+ })], 8, ct)) : b("", !0), h(e) ? (a(), f("button", {
1005
926
  key: 1,
1006
927
  type: "button",
1007
928
  "data-testid": "media-replace",
1008
929
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
1009
930
  style: { color: "var(--tpl-text-muted)" },
1010
- title: S(M).mediaLibrary.replaceFile,
1011
- "aria-label": S(M).mediaLibrary.replaceFile,
1012
- onClick: A((e) => s("replace", t), ["stop"])
1013
- }, [d(S(W), {
931
+ title: k(O).mediaLibrary.replaceFile,
932
+ "aria-label": k(O).mediaLibrary.replaceFile,
933
+ onClick: w((t) => o("replace", e), ["stop"])
934
+ }, [M(k(U), {
1014
935
  size: 12,
1015
936
  "stroke-width": 2
1016
- })], 8, ut)) : m("", !0)], 2),
1017
- k(t) ? (v(), h("div", dt, [d(S(B), {
937
+ })], 8, lt)) : b("", !0)], 2),
938
+ E(e) ? (a(), f("div", ut, [M(k(B), {
1018
939
  size: 12,
1019
940
  "stroke-width": 3
1020
- })])) : m("", !0)
1021
- ], 46, nt))), 128))], 8, tt)) : (v(), h("div", {
941
+ })])) : b("", !0)
942
+ ], 46, tt))), 128))], 8, et)) : (a(), f("div", {
1022
943
  key: 2,
1023
944
  role: "listbox",
1024
- "aria-label": S(M).mediaLibrary.filesListAriaLabel,
945
+ "aria-label": k(O).mediaLibrary.filesListAriaLabel,
1025
946
  "aria-multiselectable": "true",
1026
947
  class: "tpl:grid tpl:grid-cols-4 tpl:gap-3"
1027
- }, [(v(!0), h(w, null, o(n.items, (t) => (v(), h("div", {
1028
- key: t.id,
948
+ }, [(a(!0), f(A, null, i(e.items, (e) => (a(), f("div", {
949
+ key: e.id,
1029
950
  role: "option",
1030
951
  tabindex: "0",
1031
952
  "data-testid": "media-library-item",
1032
- class: e(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
953
+ class: j(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
1033
954
  "tpl:cursor-pointer",
1034
- !_(t) && !k(t) ? "tpl:opacity-60" : "",
1035
- k(t) ? "tpl-media-item--selected" : ""
955
+ !d(e) && !E(e) ? "tpl:opacity-60" : "",
956
+ E(e) ? "tpl-media-item--selected" : ""
1036
957
  ]]),
1037
- "data-media-id": t.id,
1038
- "aria-selected": k(t),
1039
- "aria-label": t.filename || t.url,
1040
- style: y({
1041
- borderColor: k(t) ? "var(--tpl-primary)" : "transparent",
1042
- backgroundColor: !_(t) && !k(t) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
958
+ "data-media-id": e.id,
959
+ "aria-selected": E(e),
960
+ "aria-label": e.filename || e.url,
961
+ style: g({
962
+ borderColor: E(e) ? "var(--tpl-primary)" : "transparent",
963
+ backgroundColor: !d(e) && !E(e) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
1043
964
  }),
1044
- onClick: (e) => E(t, e),
1045
- onDblclick: (e) => D(t),
1046
- onKeydown: (e) => O(t, e)
965
+ onClick: (t) => v(e, t),
966
+ onDblclick: (t) => S(e),
967
+ onKeydown: (t) => C(e, t)
1047
968
  }, [
1048
- b("div", Ge, [S(u)(f(t)) ? (v(), h("img", {
969
+ T("div", We, [k(c)(l(e)) ? (a(), f("img", {
1049
970
  key: 0,
1050
- src: p(t),
1051
- alt: t.filename || t.url,
971
+ src: u(e),
972
+ alt: e.filename || e.url,
1052
973
  class: "tpl:size-full tpl:object-cover",
1053
974
  loading: "lazy"
1054
- }, null, 8, Ke)) : (v(), T(Ie, {
975
+ }, null, 8, Ge)) : (a(), x(Fe, {
1055
976
  key: 1,
1056
- "mime-type": f(t)
977
+ "mime-type": l(e)
1057
978
  }, null, 8, ["mime-type"]))]),
1058
- b("div", qe, [b("p", Je, a(t.filename || t.url), 1), b("p", Ye, [t.size == null ? m("", !0) : (v(), h("span", Xe, a(S($)(t.size)), 1)), S(u)(f(t)) && t.width && t.height ? (v(), h("span", Ze, a(t.width) + "×" + a(t.height), 1)) : m("", !0)])]),
1059
- b("div", { class: e(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(t)]) }, [x(t) ? (v(), h("button", {
979
+ T("div", Ke, [T("p", qe, y(e.filename || e.url), 1), T("p", Je, [e.size == null ? b("", !0) : (a(), f("span", Ye, y(k($)(e.size)), 1)), k(c)(l(e)) && e.width && e.height ? (a(), f("span", Xe, y(e.width) + "×" + y(e.height), 1)) : b("", !0)])]),
980
+ T("div", { class: j(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", D(e)]) }, [p(e) ? (a(), f("button", {
1060
981
  key: 0,
1061
982
  type: "button",
1062
983
  "data-testid": "media-edit",
@@ -1065,13 +986,13 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1065
986
  "background-color": "var(--tpl-overlay)",
1066
987
  color: "var(--tpl-on-primary)"
1067
988
  },
1068
- title: S(M).mediaLibrary.editFile,
1069
- "aria-label": S(M).mediaLibrary.editFile,
1070
- onClick: A((e) => s("edit", t), ["stop"])
1071
- }, [d(S(H), {
989
+ title: k(O).mediaLibrary.editFile,
990
+ "aria-label": k(O).mediaLibrary.editFile,
991
+ onClick: w((t) => o("edit", e), ["stop"])
992
+ }, [M(k(H), {
1072
993
  size: 11,
1073
994
  "stroke-width": 2
1074
- })], 8, Qe)) : m("", !0), C(t) ? (v(), h("button", {
995
+ })], 8, Ze)) : b("", !0), h(e) ? (a(), f("button", {
1075
996
  key: 1,
1076
997
  type: "button",
1077
998
  "data-testid": "media-replace",
@@ -1080,51 +1001,51 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1080
1001
  "background-color": "var(--tpl-overlay)",
1081
1002
  color: "var(--tpl-on-primary)"
1082
1003
  },
1083
- title: S(M).mediaLibrary.replaceFile,
1084
- "aria-label": S(M).mediaLibrary.replaceFile,
1085
- onClick: A((e) => s("replace", t), ["stop"])
1086
- }, [d(S(W), {
1004
+ title: k(O).mediaLibrary.replaceFile,
1005
+ "aria-label": k(O).mediaLibrary.replaceFile,
1006
+ onClick: w((t) => o("replace", e), ["stop"])
1007
+ }, [M(k(U), {
1087
1008
  size: 11,
1088
1009
  "stroke-width": 2
1089
- })], 8, $e)) : m("", !0)], 2),
1090
- k(t) ? (v(), h("div", et, [d(S(B), {
1010
+ })], 8, Qe)) : b("", !0)], 2),
1011
+ E(e) ? (a(), f("div", $e, [M(k(B), {
1091
1012
  size: 12,
1092
1013
  "stroke-width": 3
1093
- })])) : m("", !0)
1094
- ], 46, We))), 128))], 8, Ue)),
1095
- b("div", {
1014
+ })])) : b("", !0)
1015
+ ], 46, Ue))), 128))], 8, He)),
1016
+ T("div", {
1096
1017
  ref_key: "sentinelRef",
1097
1018
  ref: P,
1098
1019
  class: "tpl:h-4"
1099
1020
  }, null, 512),
1100
- n.isLoading && n.items.length > 0 ? (v(), h("div", ft, [d(S(V), {
1021
+ e.isLoading && e.items.length > 0 ? (a(), f("div", dt, [M(k(G), {
1101
1022
  class: "tpl-spinner",
1102
1023
  size: 20,
1103
1024
  "stroke-width": 2,
1104
1025
  style: { color: "var(--tpl-primary)" }
1105
- })])) : m("", !0)
1026
+ })])) : b("", !0)
1106
1027
  ]));
1107
1028
  }
1108
- }), [["__scopeId", "data-v-57c35946"]]), mt = ["data-tpl-theme"], ht = {
1029
+ }), [["__scopeId", "data-v-57c35946"]]), pt = ["data-tpl-theme"], mt = {
1109
1030
  id: "tpl-media-import-title",
1110
1031
  class: "tpl:mb-4 tpl:text-sm tpl:font-semibold",
1111
1032
  style: { color: "var(--tpl-text)" }
1112
- }, gt = { class: "tpl:mb-3" }, _t = [
1033
+ }, ht = { class: "tpl:mb-3" }, gt = [
1113
1034
  "aria-label",
1114
1035
  "aria-invalid",
1115
1036
  "aria-describedby",
1116
1037
  "placeholder",
1117
1038
  "disabled"
1118
- ], vt = {
1039
+ ], _t = {
1119
1040
  key: 0,
1120
1041
  id: "tpl-media-import-error",
1121
1042
  role: "alert",
1122
1043
  class: "tpl:mb-3 tpl:text-xs",
1123
1044
  style: { color: "var(--tpl-danger)" }
1124
- }, yt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, bt = ["disabled"], xt = ["disabled"], St = {
1045
+ }, vt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, yt = ["disabled"], bt = ["disabled"], xt = {
1125
1046
  key: 0,
1126
1047
  class: "tpl:flex tpl:items-center tpl:gap-1.5"
1127
- }, Ct = { key: 1 }, wt = /* @__PURE__ */ D({
1048
+ }, St = { key: 1 }, Ct = /* @__PURE__ */ e({
1128
1049
  __name: "MediaImportUrlModal",
1129
1050
  props: {
1130
1051
  visible: { type: Boolean },
@@ -1132,24 +1053,24 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1132
1053
  error: {}
1133
1054
  },
1134
1055
  emits: ["import", "close"],
1135
- setup(n, { emit: i }) {
1136
- let o = n, s = i, { t: u } = Q(), _ = t(X, null), y = t(Y, c(null)), x = c("");
1137
- O(() => o.visible, (e) => {
1138
- e && (x.value = "");
1056
+ setup(e, { emit: n }) {
1057
+ let i = e, o = n, { t: s } = Z(), u = t(Y, null), d = t(J, _(null)), p = _("");
1058
+ c(() => i.visible, (e) => {
1059
+ e && (p.value = "");
1139
1060
  });
1140
- function C() {
1141
- let e = x.value.trim();
1142
- e && !o.isImporting && s("import", e);
1061
+ function h() {
1062
+ let e = p.value.trim();
1063
+ e && !i.isImporting && o("import", e);
1143
1064
  }
1144
- function w() {
1145
- o.isImporting || s("close");
1065
+ function g() {
1066
+ i.isImporting || o("close");
1146
1067
  }
1147
- let E = c(null);
1148
- _e(E, p(() => o.visible));
1149
- function D(e) {
1150
- e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), C()), e.key === "Escape" && w();
1068
+ let S = _(null);
1069
+ ge(S, O(() => i.visible));
1070
+ function C(e) {
1071
+ e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), h()), e.key === "Escape" && g();
1151
1072
  }
1152
- return (t, i) => (v(), T(f, { to: S(y) || "body" }, [d(M, {
1073
+ return (t, n) => (a(), x(v, { to: k(d) || "body" }, [M(E, {
1153
1074
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
1154
1075
  "enter-from-class": "tpl:opacity-0",
1155
1076
  "enter-to-class": "tpl:opacity-100",
@@ -1157,71 +1078,71 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1157
1078
  "leave-from-class": "tpl:opacity-100",
1158
1079
  "leave-to-class": "tpl:opacity-0"
1159
1080
  }, {
1160
- default: l(() => [n.visible ? (v(), h("div", {
1081
+ default: l(() => [e.visible ? (a(), f("div", {
1161
1082
  key: 0,
1162
- "data-tpl-theme": S(_),
1163
- class: e([S(y) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
1083
+ "data-tpl-theme": k(u),
1084
+ class: j([k(d) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
1164
1085
  style: { "background-color": "var(--tpl-overlay)" },
1165
- onClick: A(w, ["self"]),
1166
- onKeydown: D
1167
- }, [b("div", {
1086
+ onClick: w(g, ["self"]),
1087
+ onKeydown: C
1088
+ }, [T("div", {
1168
1089
  ref_key: "dialogRef",
1169
- ref: E,
1090
+ ref: S,
1170
1091
  role: "dialog",
1171
1092
  "aria-modal": "true",
1172
1093
  "aria-labelledby": "tpl-media-import-title",
1173
1094
  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",
1174
1095
  style: { "background-color": "var(--tpl-bg-elevated)" }
1175
1096
  }, [
1176
- b("h3", ht, a(S(u).mediaLibrary.importFromUrl), 1),
1177
- b("div", gt, [r(b("input", {
1178
- "onUpdate:modelValue": i[0] ||= (e) => x.value = e,
1097
+ T("h3", mt, y(k(s).mediaLibrary.importFromUrl), 1),
1098
+ T("div", ht, [r(T("input", {
1099
+ "onUpdate:modelValue": n[0] ||= (e) => p.value = e,
1179
1100
  type: "url",
1180
- "aria-label": S(u).mediaLibrary.importFromUrl,
1181
- "aria-invalid": !!n.error,
1182
- "aria-describedby": n.error ? "tpl-media-import-error" : void 0,
1101
+ "aria-label": k(s).mediaLibrary.importFromUrl,
1102
+ "aria-invalid": !!e.error,
1103
+ "aria-describedby": e.error ? "tpl-media-import-error" : void 0,
1183
1104
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
1184
1105
  style: {
1185
1106
  "border-color": "var(--tpl-border)",
1186
1107
  "background-color": "var(--tpl-bg)",
1187
1108
  color: "var(--tpl-text)"
1188
1109
  },
1189
- placeholder: S(u).mediaLibrary.importUrlPlaceholder,
1190
- disabled: n.isImporting,
1110
+ placeholder: k(s).mediaLibrary.importUrlPlaceholder,
1111
+ disabled: e.isImporting,
1191
1112
  autofocus: ""
1192
- }, null, 8, _t), [[k, x.value]])]),
1193
- n.error ? (v(), h("p", vt, a(n.error), 1)) : m("", !0),
1194
- b("div", yt, [b("button", {
1195
- class: e(["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": n.isImporting }]),
1113
+ }, null, 8, gt), [[D, p.value]])]),
1114
+ e.error ? (a(), f("p", _t, y(e.error), 1)) : b("", !0),
1115
+ T("div", vt, [T("button", {
1116
+ class: j(["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 }]),
1196
1117
  style: {
1197
1118
  "border-color": "var(--tpl-border)",
1198
1119
  color: "var(--tpl-text)",
1199
1120
  "background-color": "var(--tpl-bg)"
1200
1121
  },
1201
- disabled: n.isImporting,
1202
- onClick: w
1203
- }, a(S(u).mediaLibrary.cancel), 11, bt), b("button", {
1122
+ disabled: e.isImporting,
1123
+ onClick: g
1124
+ }, y(k(s).mediaLibrary.cancel), 11, yt), T("button", {
1204
1125
  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",
1205
1126
  style: {
1206
1127
  "background-color": "var(--tpl-primary)",
1207
1128
  color: "var(--tpl-on-primary)"
1208
1129
  },
1209
- disabled: !x.value.trim() || n.isImporting,
1210
- onClick: C
1211
- }, [n.isImporting ? (v(), h("span", St, [d(S(V), {
1130
+ disabled: !p.value.trim() || e.isImporting,
1131
+ onClick: h
1132
+ }, [e.isImporting ? (a(), f("span", xt, [M(k(G), {
1212
1133
  class: "tpl:animate-spin",
1213
1134
  size: 12,
1214
1135
  "stroke-width": 2
1215
- }), g(" " + a(S(u).mediaLibrary.importing), 1)])) : (v(), h("span", Ct, a(S(u).mediaLibrary.import), 1))], 8, xt)])
1216
- ], 512)], 42, mt)) : m("", !0)]),
1136
+ }), m(" " + y(k(s).mediaLibrary.importing), 1)])) : (a(), f("span", St, y(k(s).mediaLibrary.import), 1))], 8, bt)])
1137
+ ], 512)], 42, pt)) : b("", !0)]),
1217
1138
  _: 1
1218
1139
  })], 8, ["to"]));
1219
1140
  }
1220
- }), Tt = { class: "tpl:max-h-56 tpl:overflow-y-auto tpl:py-1" }, Et = ["disabled", "onClick"], Dt = { class: "tpl:truncate" }, Ot = {
1141
+ }), wt = { class: "tpl:max-h-56 tpl:overflow-y-auto tpl:py-1" }, Tt = ["disabled", "onClick"], Et = { class: "tpl:truncate" }, Dt = {
1221
1142
  key: 0,
1222
1143
  class: "tpl:shrink-0",
1223
1144
  style: { color: "var(--tpl-text-dim)" }
1224
- }, kt = /* @__PURE__ */ D({
1145
+ }, Ot = /* @__PURE__ */ e({
1225
1146
  __name: "MediaMovePicker",
1226
1147
  props: {
1227
1148
  folders: {},
@@ -1229,7 +1150,7 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1229
1150
  },
1230
1151
  emits: ["select", "close"],
1231
1152
  setup(e, { emit: t }) {
1232
- let n = t, { t: r } = Q(), i = c(null);
1153
+ let n = t, { t: r } = Z(), o = _(null);
1233
1154
  function s(e, t = 0) {
1234
1155
  let n = [];
1235
1156
  for (let r of e) n.push({
@@ -1239,30 +1160,30 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1239
1160
  }), r.children.length && n.push(...s(r.children, t + 1));
1240
1161
  return n;
1241
1162
  }
1242
- return R(i, () => {
1163
+ return z(o, () => {
1243
1164
  n("close");
1244
- }), (t, c) => (v(), h("div", {
1165
+ }), (t, c) => (a(), f("div", {
1245
1166
  ref_key: "pickerRef",
1246
- ref: i,
1167
+ ref: o,
1247
1168
  "data-testid": "media-move-picker",
1248
1169
  class: "tpl:absolute tpl:bottom-full tpl:left-0 tpl:z-10 tpl:mb-2 tpl:w-56 tpl:overflow-hidden tpl:rounded-lg tpl:border tpl:shadow-lg",
1249
1170
  style: {
1250
1171
  "border-color": "var(--tpl-border)",
1251
1172
  "background-color": "var(--tpl-bg-elevated)"
1252
1173
  }
1253
- }, [b("div", Tt, [e.currentFolderId === null ? m("", !0) : (v(), h("button", {
1174
+ }, [T("div", wt, [e.currentFolderId === null ? b("", !0) : (a(), f("button", {
1254
1175
  key: 0,
1255
1176
  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",
1256
1177
  style: { color: "var(--tpl-text)" },
1257
1178
  onClick: c[0] ||= (e) => n("select", null)
1258
- }, [d(S(K), {
1179
+ }, [M(k(K), {
1259
1180
  class: "tpl:shrink-0",
1260
1181
  size: 14,
1261
1182
  "stroke-width": 1.5
1262
- }), g(" " + a(S(r).mediaLibrary.moveToRoot), 1)])), (v(!0), h(w, null, o(s(e.folders), (t) => (v(), h("button", {
1183
+ }), m(" " + y(k(r).mediaLibrary.moveToRoot), 1)])), (a(!0), f(A, null, i(s(e.folders), (t) => (a(), f("button", {
1263
1184
  key: t.id,
1264
1185
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:py-1.5 tpl:pr-3 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
1265
- style: y({
1186
+ style: g({
1266
1187
  paddingLeft: `${t.depth * 16 + 12}px`,
1267
1188
  color: t.id === e.currentFolderId ? "var(--tpl-text-dim)" : "var(--tpl-text)",
1268
1189
  opacity: t.id === e.currentFolderId ? .5 : 1
@@ -1270,120 +1191,120 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1270
1191
  disabled: t.id === e.currentFolderId,
1271
1192
  onClick: (e) => n("select", t.id)
1272
1193
  }, [
1273
- d(S(q), {
1194
+ M(k(V), {
1274
1195
  class: "tpl:shrink-0",
1275
1196
  size: 14,
1276
1197
  "stroke-width": 1.5
1277
1198
  }),
1278
- b("span", Dt, a(t.name), 1),
1279
- t.id === e.currentFolderId ? (v(), h("span", Ot, a(S(r).mediaLibrary.currentFolder), 1)) : m("", !0)
1280
- ], 12, Et))), 128))])], 512));
1199
+ T("span", Et, y(t.name), 1),
1200
+ t.id === e.currentFolderId ? (a(), f("span", Dt, y(k(r).mediaLibrary.currentFolder), 1)) : b("", !0)
1201
+ ], 12, Tt))), 128))])], 512));
1281
1202
  }
1282
- }), At = { class: "tpl:flex tpl:items-center tpl:gap-3" }, jt = ["src", "alt"], Mt = {
1203
+ }), kt = { class: "tpl:flex tpl:items-center tpl:gap-3" }, At = ["src", "alt"], jt = {
1283
1204
  key: 1,
1284
1205
  class: "tpl:flex tpl:size-10 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:overflow-hidden tpl:rounded",
1285
1206
  style: { border: "1px solid var(--tpl-border)" }
1286
- }, Nt = { class: "tpl:min-w-0 tpl:flex-1" }, Pt = {
1207
+ }, Mt = { class: "tpl:min-w-0 tpl:flex-1" }, Nt = {
1287
1208
  class: "tpl:truncate tpl:text-xs tpl:font-medium",
1288
1209
  style: { color: "var(--tpl-text)" }
1289
- }, Ft = {
1210
+ }, Pt = {
1290
1211
  class: "tpl:mt-0.5 tpl:text-[10px]",
1291
1212
  style: { color: "var(--tpl-text-muted)" }
1292
- }, It = /*#__PURE__*/ G(/* @__PURE__ */ D({
1213
+ }, Ft = /*#__PURE__*/ q(/* @__PURE__ */ e({
1293
1214
  __name: "MediaPreviewPanel",
1294
1215
  props: {
1295
1216
  item: {},
1296
1217
  folders: {}
1297
1218
  },
1298
- setup(n) {
1299
- let r = n, i = t(Z, null), { isImageMimeType: o } = he();
1300
- function s(e, t, n = []) {
1219
+ setup(e) {
1220
+ let n = e, r = t(X, null), { isImageMimeType: i } = Q();
1221
+ function o(e, t, n = []) {
1301
1222
  for (let r of e) {
1302
1223
  let e = [...n, r.name];
1303
1224
  if (r.id === t) return e;
1304
1225
  if (r.children.length) {
1305
- let n = s(r.children, t, e);
1226
+ let n = o(r.children, t, e);
1306
1227
  if (n) return n;
1307
1228
  }
1308
1229
  }
1309
1230
  return null;
1310
1231
  }
1311
- let c = p(() => {
1312
- if (!r.item.folderId || !r.folders) return null;
1313
- let e = s(r.folders, r.item.folderId);
1232
+ let s = O(() => {
1233
+ if (!n.item.folderId || !n.folders) return null;
1234
+ let e = o(n.folders, n.item.folderId);
1314
1235
  return e ? e.join("/") : null;
1315
- }), l = p(() => r.item.mimeType ?? ""), u = p(() => o(l.value));
1316
- function f(e) {
1317
- return Le(e, i?.value, {
1236
+ }), c = O(() => n.item.mimeType ?? ""), l = O(() => i(c.value));
1237
+ function u(e) {
1238
+ return Ie(e, r?.value, {
1318
1239
  year: "numeric",
1319
1240
  month: "short",
1320
1241
  day: "numeric"
1321
1242
  });
1322
1243
  }
1323
- let _ = p(() => r.item.filename || r.item.url);
1324
- return (t, r) => (v(), h("div", At, [u.value ? (v(), h("img", {
1244
+ let d = O(() => n.item.filename || n.item.url);
1245
+ return (t, n) => (a(), f("div", kt, [l.value ? (a(), f("img", {
1325
1246
  key: 0,
1326
- src: n.item.url,
1327
- alt: n.item.alt || _.value,
1247
+ src: e.item.url,
1248
+ alt: e.item.alt || d.value,
1328
1249
  class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
1329
1250
  style: { border: "1px solid var(--tpl-border)" }
1330
- }, null, 8, jt)) : (v(), h("div", Mt, [d(Ie, {
1331
- "mime-type": l.value,
1251
+ }, null, 8, At)) : (a(), f("div", jt, [M(Fe, {
1252
+ "mime-type": c.value,
1332
1253
  class: "tpl-preview-icon"
1333
- }, null, 8, ["mime-type"])])), b("div", Nt, [
1334
- b("p", Pt, a(_.value), 1),
1335
- b("p", Ft, [
1336
- n.item.size == null ? m("", !0) : (v(), h(w, { key: 0 }, [g(a(S($)(n.item.size)), 1)], 64)),
1337
- n.item.createdAt ? (v(), h(w, { key: 1 }, [n.item.size == null ? m("", !0) : (v(), h(w, { key: 0 }, [g(" · ")], 64)), g(" " + a(f(n.item.createdAt)), 1)], 64)) : m("", !0),
1338
- u.value && n.item.width && n.item.height ? (v(), h(w, { key: 2 }, [g(" · " + a(n.item.width) + "×" + a(n.item.height) + "px ", 1)], 64)) : m("", !0),
1339
- c.value ? (v(), h(w, { key: 3 }, [
1340
- r[0] ||= g(" · ", -1),
1341
- d(S(q), {
1254
+ }, null, 8, ["mime-type"])])), T("div", Mt, [
1255
+ T("p", Nt, y(d.value), 1),
1256
+ T("p", Pt, [
1257
+ e.item.size == null ? b("", !0) : (a(), f(A, { key: 0 }, [m(y(k($)(e.item.size)), 1)], 64)),
1258
+ e.item.createdAt ? (a(), f(A, { key: 1 }, [e.item.size == null ? b("", !0) : (a(), f(A, { key: 0 }, [m(" · ")], 64)), m(" " + y(u(e.item.createdAt)), 1)], 64)) : b("", !0),
1259
+ l.value && e.item.width && e.item.height ? (a(), f(A, { key: 2 }, [m(" · " + y(e.item.width) + "×" + y(e.item.height) + "px ", 1)], 64)) : b("", !0),
1260
+ s.value ? (a(), f(A, { key: 3 }, [
1261
+ n[0] ||= m(" · ", -1),
1262
+ M(k(V), {
1342
1263
  class: "tpl:mb-px tpl:inline",
1343
1264
  size: 9,
1344
1265
  "stroke-width": 2
1345
1266
  }),
1346
- g(" " + a(c.value), 1)
1347
- ], 64)) : m("", !0)
1267
+ m(" " + y(s.value), 1)
1268
+ ], 64)) : b("", !0)
1348
1269
  ]),
1349
- u.value ? (v(), h("p", {
1270
+ l.value ? (a(), f("p", {
1350
1271
  key: 0,
1351
- class: e(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !n.item.alt }]),
1272
+ class: j(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !e.item.alt }]),
1352
1273
  style: { color: "var(--tpl-text-dim)" }
1353
- }, a(n.item.alt || "\xA0"), 3)) : m("", !0)
1274
+ }, y(e.item.alt || "\xA0"), 3)) : b("", !0)
1354
1275
  ])]));
1355
1276
  }
1356
- }), [["__scopeId", "data-v-50993988"]]), Lt = ["data-tpl-theme"], Rt = {
1277
+ }), [["__scopeId", "data-v-50993988"]]), It = ["data-tpl-theme"], Lt = {
1357
1278
  id: "tpl-media-replace-title",
1358
1279
  class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
1359
1280
  style: { color: "var(--tpl-text)" }
1360
- }, zt = {
1281
+ }, Rt = {
1361
1282
  class: "tpl:mb-2 tpl:text-xs",
1362
1283
  style: { color: "var(--tpl-text-muted)" }
1363
- }, Bt = {
1284
+ }, zt = {
1364
1285
  key: 0,
1365
1286
  class: "tpl:mb-3 tpl:text-xs",
1366
1287
  style: { color: "var(--tpl-text-muted)" }
1367
- }, Vt = {
1288
+ }, Bt = {
1368
1289
  class: "tpl:mb-3 tpl:rounded tpl:border tpl:p-2",
1369
1290
  style: { "border-color": "var(--tpl-border)" }
1370
- }, Ht = {
1291
+ }, Vt = {
1371
1292
  class: "tpl:truncate tpl:text-xs tpl:font-medium",
1372
1293
  style: { color: "var(--tpl-text)" }
1373
- }, Ut = { class: "tpl:mb-4" }, Wt = {
1294
+ }, Ht = { class: "tpl:mb-4" }, Ut = {
1374
1295
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
1375
1296
  style: { color: "var(--tpl-text-muted)" }
1376
- }, Gt = [
1297
+ }, Wt = [
1377
1298
  "accept",
1378
1299
  "aria-invalid",
1379
1300
  "aria-describedby"
1380
- ], Kt = {
1301
+ ], Gt = {
1381
1302
  key: 1,
1382
1303
  id: "tpl-media-replace-error",
1383
1304
  role: "alert",
1384
1305
  class: "tpl:mb-3 tpl:text-xs",
1385
1306
  style: { color: "var(--tpl-danger)" }
1386
- }, qt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Jt = ["disabled"], Yt = ["disabled"], Xt = /* @__PURE__ */ D({
1307
+ }, Kt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, qt = ["disabled"], Jt = ["disabled"], Yt = /* @__PURE__ */ e({
1387
1308
  __name: "MediaReplaceModal",
1388
1309
  props: {
1389
1310
  visible: { type: Boolean },
@@ -1393,28 +1314,28 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1393
1314
  error: {}
1394
1315
  },
1395
1316
  emits: ["replace", "close"],
1396
- setup(n, { emit: r }) {
1397
- let i = n, o = r, { t: s } = Q(), u = t(X, null), g = t(Y, c(null)), _ = c(null), y = c(null), x = p(() => {
1398
- if (!i.item) return "";
1399
- let e = (i.item.filename ?? "").split(".");
1317
+ setup(e, { emit: n }) {
1318
+ let r = e, i = n, { t: o } = Z(), s = t(Y, null), u = t(J, _(null)), d = _(null), p = _(null), m = O(() => {
1319
+ if (!r.item) return "";
1320
+ let e = (r.item.filename ?? "").split(".");
1400
1321
  return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
1401
- }), C = p(() => x.value ? `.${x.value}` : "*"), w = p(() => (i.usageInfo?.templateCount ?? 0) > 0);
1402
- O(() => i.visible, (e) => {
1403
- e || (y.value = null, _.value && (_.value.value = ""));
1322
+ }), h = O(() => m.value ? `.${m.value}` : "*"), g = O(() => (r.usageInfo?.templateCount ?? 0) > 0);
1323
+ c(() => r.visible, (e) => {
1324
+ e || (p.value = null, d.value && (d.value.value = ""));
1404
1325
  });
1405
- function E(e) {
1326
+ function S(e) {
1406
1327
  let t = e.target;
1407
- t.files && t.files.length > 0 && (y.value = t.files[0]);
1328
+ t.files && t.files.length > 0 && (p.value = t.files[0]);
1408
1329
  }
1409
- function D() {
1410
- y.value && o("replace", y.value);
1330
+ function C() {
1331
+ p.value && i("replace", p.value);
1411
1332
  }
1412
- let k = c(null);
1413
- _e(k, p(() => i.visible && i.item !== null));
1414
- function j(e) {
1415
- e.stopPropagation(), e.key === "Escape" && o("close");
1333
+ let D = _(null);
1334
+ ge(D, O(() => r.visible && r.item !== null));
1335
+ function A(e) {
1336
+ e.stopPropagation(), e.key === "Escape" && i("close");
1416
1337
  }
1417
- return (t, r) => (v(), T(f, { to: S(g) || "body" }, [d(M, {
1338
+ return (t, n) => (a(), x(v, { to: k(u) || "body" }, [M(E, {
1418
1339
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
1419
1340
  "enter-from-class": "tpl:opacity-0",
1420
1341
  "enter-to-class": "tpl:opacity-100",
@@ -1422,68 +1343,67 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1422
1343
  "leave-from-class": "tpl:opacity-100",
1423
1344
  "leave-to-class": "tpl:opacity-0"
1424
1345
  }, {
1425
- default: l(() => [n.visible && n.item ? (v(), h("div", {
1346
+ default: l(() => [e.visible && e.item ? (a(), f("div", {
1426
1347
  key: 0,
1427
- "data-tpl-theme": S(u),
1428
- class: e([S(g) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
1348
+ "data-tpl-theme": k(s),
1349
+ class: j([k(u) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
1429
1350
  style: { "background-color": "var(--tpl-overlay)" },
1430
- onClick: r[1] ||= A((e) => o("close"), ["self"]),
1431
- onKeydown: j
1432
- }, [b("div", {
1351
+ onClick: n[1] ||= w((e) => i("close"), ["self"]),
1352
+ onKeydown: A
1353
+ }, [T("div", {
1433
1354
  ref_key: "dialogRef",
1434
- ref: k,
1355
+ ref: D,
1435
1356
  role: "dialog",
1436
1357
  "aria-modal": "true",
1437
1358
  "aria-labelledby": "tpl-media-replace-title",
1438
1359
  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",
1439
1360
  style: { "background-color": "var(--tpl-bg-elevated)" }
1440
1361
  }, [
1441
- b("h3", Rt, a(S(s).mediaLibrary.replaceWarningTitle), 1),
1442
- b("p", zt, a(S(s).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${x.value}`)), 1),
1443
- w.value ? (v(), h("p", Bt, a(S(s).mediaLibrary.replaceWarningUsageNote.replace("{count}", n.usageInfo.templateCount.toString())), 1)) : m("", !0),
1444
- b("div", Vt, [b("p", Ht, a(n.item.filename), 1)]),
1445
- b("div", Ut, [b("label", Wt, a(S(s).mediaLibrary.replaceSelectFile), 1), b("input", {
1362
+ T("h3", Lt, y(k(o).mediaLibrary.replaceWarningTitle), 1),
1363
+ T("p", Rt, y(k(o).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${m.value}`)), 1),
1364
+ g.value ? (a(), f("p", zt, y(k(o).mediaLibrary.replaceWarningUsageNote.replace("{count}", e.usageInfo.templateCount.toString())), 1)) : b("", !0),
1365
+ T("div", Bt, [T("p", Vt, y(e.item.filename), 1)]),
1366
+ T("div", Ht, [T("label", Ut, y(k(o).mediaLibrary.replaceSelectFile), 1), T("input", {
1446
1367
  ref_key: "fileInputRef",
1447
- ref: _,
1368
+ ref: d,
1448
1369
  type: "file",
1449
- accept: C.value,
1450
- "aria-invalid": !!n.error,
1451
- "aria-describedby": n.error ? "tpl-media-replace-error" : void 0,
1370
+ accept: h.value,
1371
+ "aria-invalid": !!e.error,
1372
+ "aria-describedby": e.error ? "tpl-media-replace-error" : void 0,
1452
1373
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs",
1453
1374
  style: {
1454
1375
  "border-color": "var(--tpl-border)",
1455
1376
  "background-color": "var(--tpl-bg)",
1456
1377
  color: "var(--tpl-text)"
1457
1378
  },
1458
- onChange: E
1459
- }, null, 40, Gt)]),
1460
- n.error ? (v(), h("p", Kt, a(n.error), 1)) : m("", !0),
1461
- b("div", qt, [b("button", {
1379
+ onChange: S
1380
+ }, null, 40, Wt)]),
1381
+ e.error ? (a(), f("p", Gt, y(e.error), 1)) : b("", !0),
1382
+ T("div", Kt, [T("button", {
1462
1383
  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",
1463
1384
  style: {
1464
1385
  "border-color": "var(--tpl-border)",
1465
1386
  color: "var(--tpl-text)",
1466
1387
  "background-color": "var(--tpl-bg)"
1467
1388
  },
1468
- disabled: n.isReplacing,
1469
- onClick: r[0] ||= (e) => o("close")
1470
- }, a(S(s).mediaLibrary.cancel), 9, Jt), b("button", {
1389
+ disabled: e.isReplacing,
1390
+ onClick: n[0] ||= (e) => i("close")
1391
+ }, y(k(o).mediaLibrary.cancel), 9, qt), T("button", {
1471
1392
  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",
1472
1393
  style: {
1473
1394
  "background-color": "var(--tpl-primary)",
1474
1395
  color: "var(--tpl-on-primary)"
1475
1396
  },
1476
- disabled: !y.value || n.isReplacing,
1477
- onClick: D
1478
- }, a(n.isReplacing ? S(s).mediaLibrary.replacing : S(s).mediaLibrary.replace), 9, Yt)])
1479
- ], 512)], 42, Lt)) : m("", !0)]),
1397
+ disabled: !p.value || e.isReplacing,
1398
+ onClick: C
1399
+ }, y(e.isReplacing ? k(o).mediaLibrary.replacing : k(o).mediaLibrary.replace), 9, Jt)])
1400
+ ], 512)], 42, It)) : b("", !0)]),
1480
1401
  _: 1
1481
1402
  })], 8, ["to"]));
1482
1403
  }
1483
1404
  });
1484
- //#endregion
1485
- //#region ../media-library/src/utils/formatList.ts
1486
- function Zt(e, t) {
1405
+ // ../media-library/src/utils/formatList.ts
1406
+ function Xt(e, t) {
1487
1407
  let n = {
1488
1408
  style: "narrow",
1489
1409
  type: "conjunction"
@@ -1495,108 +1415,107 @@ function Zt(e, t) {
1495
1415
  return new Intl.ListFormat(void 0, n).format(e);
1496
1416
  }
1497
1417
  }
1498
- //#endregion
1499
- //#region ../media-library/src/components/media/MediaUploadZone.vue?vue&type=script&setup=true&lang.ts
1500
- var Qt = [
1418
+ // ../media-library/src/components/media/MediaUploadZone.vue?vue&type=script&setup=true&lang.ts
1419
+ var Zt = [
1501
1420
  "aria-label",
1502
1421
  "aria-describedby",
1503
1422
  "aria-busy"
1504
- ], $t = {
1423
+ ], Qt = {
1505
1424
  key: 0,
1506
1425
  class: "tpl:flex tpl:items-center tpl:gap-2"
1507
- }, en = {
1426
+ }, $t = {
1508
1427
  class: "tpl:text-xs",
1509
1428
  style: { color: "var(--tpl-text-muted)" }
1510
- }, tn = {
1429
+ }, en = {
1511
1430
  class: "tpl:text-xs",
1512
1431
  style: { color: "var(--tpl-text-muted)" }
1513
- }, nn = {
1432
+ }, tn = {
1514
1433
  id: "tpl-media-upload-hint",
1515
1434
  "data-testid": "media-upload-hint",
1516
1435
  class: "tpl:mt-1 tpl:text-[10px]",
1517
1436
  style: { color: "var(--tpl-text-dim)" }
1518
- }, rn = {
1437
+ }, nn = {
1519
1438
  key: 0,
1520
1439
  "data-testid": "media-upload-rejected",
1521
1440
  role: "alert",
1522
1441
  class: "tpl:mt-1.5 tpl:text-xs tpl:break-words",
1523
1442
  style: { color: "var(--tpl-danger)" }
1524
- }, an = /* @__PURE__ */ D({
1443
+ }, rn = /* @__PURE__ */ e({
1525
1444
  __name: "MediaUploadZone",
1526
1445
  props: {
1527
1446
  isUploading: { type: Boolean },
1528
1447
  uploadProgress: {}
1529
1448
  },
1530
1449
  emits: ["upload"],
1531
- setup(n, { emit: r }) {
1532
- let i = r, { t: o, format: s } = Q(), l = t(Z, null), { allAcceptedInputString: u, restrictsMimeTypes: f, availableCategories: g, maxFileSize: _, isAcceptedFile: y } = he(), x = {
1450
+ setup(e, { emit: n }) {
1451
+ let r = n, { t: i, format: o } = Z(), s = t(X, null), { allAcceptedInputString: c, restrictsMimeTypes: l, availableCategories: u, maxFileSize: d, isAcceptedFile: p } = Q(), m = {
1533
1452
  images: "filterImages",
1534
1453
  documents: "filterDocuments",
1535
1454
  videos: "filterVideos",
1536
1455
  audio: "filterAudio"
1537
- }, C = p(() => {
1538
- let e = o.mediaLibrary, t = f.value ? Zt(g.value.map((t) => e[x[t]]), l?.value) : o.mediaLibrary.acceptedAnyType;
1539
- return Number.isFinite(_.value) ? s(o.mediaLibrary.acceptedFormatsMaxSize, {
1456
+ }, h = O(() => {
1457
+ let e = i.mediaLibrary, t = l.value ? Xt(u.value.map((t) => e[m[t]]), s?.value) : i.mediaLibrary.acceptedAnyType;
1458
+ return Number.isFinite(d.value) ? o(i.mediaLibrary.acceptedFormatsMaxSize, {
1540
1459
  formats: t,
1541
- size: $(_.value)
1460
+ size: $(d.value)
1542
1461
  }) : t;
1543
- }), T = c([]), E = c();
1544
- function D(e) {
1462
+ }), g = _([]), v = _();
1463
+ function x(e) {
1545
1464
  let t = [], n = [];
1546
- for (let r of Array.from(e)) y(r) ? t.push(r) : n.push(r.name);
1547
- T.value = n, t.length && i("upload", t);
1465
+ for (let r of Array.from(e)) p(r) ? t.push(r) : n.push(r.name);
1466
+ g.value = n, t.length && r("upload", t);
1548
1467
  }
1549
- let { isOverDropZone: O } = ee(E, { onDrop: (e) => {
1550
- e?.length && D(e);
1551
- } }), { open: k, onChange: A } = I({
1552
- accept: u.value,
1468
+ let { isOverDropZone: S } = L(v, { onDrop: (e) => {
1469
+ e?.length && x(e);
1470
+ } }), { open: C, onChange: w } = I({
1471
+ accept: c.value,
1553
1472
  multiple: !0
1554
1473
  });
1555
- return A((e) => {
1556
- e?.length && D(e);
1557
- }), (t, r) => (v(), h(w, null, [b("button", {
1474
+ return w((e) => {
1475
+ e?.length && x(e);
1476
+ }), (t, n) => (a(), f(A, null, [T("button", {
1558
1477
  ref_key: "dropZoneRef",
1559
- ref: E,
1478
+ ref: v,
1560
1479
  type: "button",
1561
1480
  "data-testid": "media-upload-zone",
1562
- class: e(["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", S(O) ? "tpl-upload-zone-active" : ""]),
1563
- "aria-label": S(o).mediaLibrary.dropOrClick,
1564
- "aria-describedby": n.isUploading ? void 0 : "tpl-media-upload-hint",
1565
- "aria-busy": n.isUploading,
1481
+ class: j(["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", k(S) ? "tpl-upload-zone-active" : ""]),
1482
+ "aria-label": k(i).mediaLibrary.dropOrClick,
1483
+ "aria-describedby": e.isUploading ? void 0 : "tpl-media-upload-hint",
1484
+ "aria-busy": e.isUploading,
1566
1485
  style: {
1567
1486
  "border-color": "var(--tpl-border-light)",
1568
1487
  "background-color": "var(--tpl-bg)"
1569
1488
  },
1570
- onClick: r[0] ||= (e) => S(k)()
1571
- }, [n.isUploading ? (v(), h("div", $t, [d(S(V), {
1489
+ onClick: n[0] ||= (e) => k(C)()
1490
+ }, [e.isUploading ? (a(), f("div", Qt, [M(k(G), {
1572
1491
  class: "tpl-spinner",
1573
1492
  size: 20,
1574
1493
  "stroke-width": 2,
1575
1494
  style: { color: "var(--tpl-primary)" }
1576
- }), b("span", en, a(n.uploadProgress && n.uploadProgress.total > 1 ? S(s)(S(o).mediaLibrary.uploadingProgress, {
1577
- current: n.uploadProgress.current,
1578
- total: n.uploadProgress.total
1579
- }) : S(o).mediaLibrary.uploading), 1)])) : (v(), h(w, { key: 1 }, [
1580
- d(S(re), {
1495
+ }), T("span", $t, y(e.uploadProgress && e.uploadProgress.total > 1 ? k(o)(k(i).mediaLibrary.uploadingProgress, {
1496
+ current: e.uploadProgress.current,
1497
+ total: e.uploadProgress.total
1498
+ }) : k(i).mediaLibrary.uploading), 1)])) : (a(), f(A, { key: 1 }, [
1499
+ M(k(ce), {
1581
1500
  class: "tpl:mb-2",
1582
1501
  size: 24,
1583
1502
  "stroke-width": 1.5,
1584
1503
  style: { color: "var(--tpl-text-dim)" }
1585
1504
  }),
1586
- b("p", tn, a(S(o).mediaLibrary.dropOrClick), 1),
1587
- b("p", nn, a(C.value), 1)
1588
- ], 64))], 10, Qt), T.value.length ? (v(), h("p", rn, a(S(s)(S(o).mediaLibrary.uploadRejected, { files: T.value.join(", ") })), 1)) : m("", !0)], 64));
1505
+ T("p", en, y(k(i).mediaLibrary.dropOrClick), 1),
1506
+ T("p", tn, y(h.value), 1)
1507
+ ], 64))], 10, Zt), g.value.length ? (a(), f("p", nn, y(k(o)(k(i).mediaLibrary.uploadRejected, { files: g.value.join(", ") })), 1)) : b("", !0)], 64));
1589
1508
  }
1590
- }), on = ["aria-label"], sn = [
1509
+ }), an = ["aria-label"], on = [
1591
1510
  "width",
1592
1511
  "height",
1593
1512
  "viewBox"
1594
- ], cn = [
1513
+ ], sn = [
1595
1514
  "cx",
1596
1515
  "cy",
1597
1516
  "r",
1598
1517
  "stroke-width"
1599
- ], ln = [
1518
+ ], cn = [
1600
1519
  "cx",
1601
1520
  "cy",
1602
1521
  "r",
@@ -1604,14 +1523,14 @@ var Qt = [
1604
1523
  "stroke",
1605
1524
  "stroke-dasharray",
1606
1525
  "stroke-dashoffset"
1607
- ], un = {
1526
+ ], ln = {
1608
1527
  key: 0,
1609
1528
  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",
1610
1529
  style: {
1611
1530
  "background-color": "var(--tpl-text)",
1612
1531
  color: "var(--tpl-bg-elevated)"
1613
1532
  }
1614
- }, dn = /* @__PURE__ */ D({
1533
+ }, un = /* @__PURE__ */ e({
1615
1534
  __name: "StorageProgressRing",
1616
1535
  props: {
1617
1536
  usedBytes: {},
@@ -1619,44 +1538,44 @@ var Qt = [
1619
1538
  size: {}
1620
1539
  },
1621
1540
  setup(e) {
1622
- let t = e, { t: n, format: r } = Q(), i = c(!1), o = p(() => t.size ?? 24), s = p(() => Math.max(2, o.value / 8)), u = p(() => (o.value - s.value) / 2), f = p(() => 2 * Math.PI * u.value), _ = p(() => t.limitBytes <= 0 ? 0 : Math.min(100, t.usedBytes / t.limitBytes * 100)), y = p(() => f.value - _.value / 100 * f.value), x = p(() => _.value >= 95 ? "var(--tpl-danger)" : _.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)"), S = p(() => $(t.usedBytes)), C = p(() => $(t.limitBytes)), w = p(() => Math.max(0, t.limitBytes - t.usedBytes)), T = p(() => $(w.value)), E = p(() => r(n.mediaLibrary.storageTooltip, {
1623
- used: S.value,
1624
- total: C.value,
1625
- remaining: T.value
1541
+ let t = e, { t: n, format: r } = Z(), i = _(!1), o = O(() => t.size ?? 24), s = O(() => Math.max(2, o.value / 8)), c = O(() => (o.value - s.value) / 2), u = O(() => 2 * Math.PI * c.value), d = O(() => t.limitBytes <= 0 ? 0 : Math.min(100, t.usedBytes / t.limitBytes * 100)), p = O(() => u.value - d.value / 100 * u.value), h = O(() => d.value >= 95 ? "var(--tpl-danger)" : d.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)"), g = O(() => $(t.usedBytes)), v = O(() => $(t.limitBytes)), x = O(() => Math.max(0, t.limitBytes - t.usedBytes)), S = O(() => $(x.value)), C = O(() => r(n.mediaLibrary.storageTooltip, {
1542
+ used: g.value,
1543
+ total: v.value,
1544
+ remaining: S.value
1626
1545
  }));
1627
- return (e, t) => (v(), h("div", {
1546
+ return (e, t) => (a(), f("div", {
1628
1547
  "data-testid": "media-storage-ring",
1629
1548
  class: "tpl:relative tpl:inline-flex tpl:cursor-help tpl:items-center tpl:justify-center",
1630
1549
  tabindex: "0",
1631
- "aria-label": E.value,
1550
+ "aria-label": C.value,
1632
1551
  onMouseenter: t[0] ||= (e) => i.value = !0,
1633
1552
  onMouseleave: t[1] ||= (e) => i.value = !1,
1634
1553
  onFocus: t[2] ||= (e) => i.value = !0,
1635
1554
  onBlur: t[3] ||= (e) => i.value = !1
1636
- }, [(v(), h("svg", {
1555
+ }, [(a(), f("svg", {
1637
1556
  width: o.value,
1638
1557
  height: o.value,
1639
1558
  class: "tpl:-rotate-90",
1640
1559
  viewBox: `0 0 ${o.value} ${o.value}`
1641
- }, [b("circle", {
1560
+ }, [T("circle", {
1642
1561
  cx: o.value / 2,
1643
1562
  cy: o.value / 2,
1644
- r: u.value,
1563
+ r: c.value,
1645
1564
  fill: "none",
1646
1565
  "stroke-width": s.value,
1647
1566
  style: { stroke: "var(--tpl-border)" }
1648
- }, null, 8, cn), b("circle", {
1567
+ }, null, 8, sn), T("circle", {
1649
1568
  cx: o.value / 2,
1650
1569
  cy: o.value / 2,
1651
- r: u.value,
1570
+ r: c.value,
1652
1571
  fill: "none",
1653
1572
  "stroke-width": s.value,
1654
- stroke: x.value,
1573
+ stroke: h.value,
1655
1574
  "stroke-linecap": "round",
1656
- "stroke-dasharray": f.value,
1657
- "stroke-dashoffset": y.value,
1575
+ "stroke-dasharray": u.value,
1576
+ "stroke-dashoffset": p.value,
1658
1577
  class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
1659
- }, null, 8, ln)], 8, sn)), d(M, {
1578
+ }, null, 8, cn)], 8, on)), M(E, {
1660
1579
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
1661
1580
  "enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
1662
1581
  "enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
@@ -1664,17 +1583,16 @@ var Qt = [
1664
1583
  "leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
1665
1584
  "leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
1666
1585
  }, {
1667
- default: l(() => [i.value ? (v(), h("div", un, [g(a(E.value) + " ", 1), t[4] ||= b("div", {
1586
+ default: l(() => [i.value ? (a(), f("div", ln, [m(y(C.value) + " ", 1), t[4] ||= T("div", {
1668
1587
  class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
1669
1588
  style: { "background-color": "var(--tpl-text)" }
1670
- }, null, -1)])) : m("", !0)]),
1589
+ }, null, -1)])) : b("", !0)]),
1671
1590
  _: 1
1672
- })], 40, on));
1591
+ })], 40, an));
1673
1592
  }
1674
1593
  });
1675
- //#endregion
1676
- //#region ../media-library/src/utils/treeFolders.ts
1677
- function fn(e) {
1594
+ // ../media-library/src/utils/treeFolders.ts
1595
+ function dn(e) {
1678
1596
  let t = /* @__PURE__ */ new Map();
1679
1597
  for (let n of e) t.set(n.id, {
1680
1598
  ...n,
@@ -1687,23 +1605,22 @@ function fn(e) {
1687
1605
  }
1688
1606
  return n;
1689
1607
  }
1690
- //#endregion
1691
- //#region ../media-library/src/composables/useMediaLibraryUI.ts
1692
- function pn(e) {
1608
+ // ../media-library/src/composables/useMediaLibraryUI.ts
1609
+ function fn(e) {
1693
1610
  let { library: t, translations: n } = e;
1694
1611
  function r() {
1695
1612
  return "value" in n && typeof n.value == "object" ? n.value : n;
1696
1613
  }
1697
- let i = c("grid"), a = c(!1), o = c(""), s = c(null), l = c(!1), u = c(!1), d = p(() => t.previewItem.value?.url ?? null), f = p(() => t.frequentlyUsedItems.value.length > 0), m = p(() => t.viewMode.value === "frequently-used" ? t.frequentlyUsedItems.value : t.items.value), h = p(() => Object.values(t.deleteUsageInfo.value).some((e) => e.templateCount > 0)), g = p(() => fn(t.folders.value)), _ = {
1614
+ let i = _("grid"), a = _(!1), o = _(""), s = _(null), l = _(!1), u = _(!1), d = O(() => t.previewItem.value?.url ?? null), f = O(() => t.frequentlyUsedItems.value.length > 0), p = O(() => t.viewMode.value === "frequently-used" ? t.frequentlyUsedItems.value : t.items.value), m = O(() => Object.values(t.deleteUsageInfo.value).some((e) => e.templateCount > 0)), h = O(() => dn(t.folders.value)), g = {
1698
1615
  images: () => r().mediaLibrary.filterImages,
1699
1616
  documents: () => r().mediaLibrary.filterDocuments,
1700
1617
  videos: () => r().mediaLibrary.filterVideos,
1701
1618
  audio: () => r().mediaLibrary.filterAudio
1702
1619
  };
1703
1620
  function v(e) {
1704
- return _[e]?.() ?? e;
1621
+ return g[e]?.() ?? e;
1705
1622
  }
1706
- O(a, (e) => {
1623
+ c(a, (e) => {
1707
1624
  e && t.loadFolders();
1708
1625
  });
1709
1626
  let y = N((e) => {
@@ -1749,10 +1666,10 @@ function pn(e) {
1749
1666
  function I(e) {
1750
1667
  t.checkUsageBeforeReplace(e);
1751
1668
  }
1752
- async function ee(e) {
1669
+ async function L(e) {
1753
1670
  await t.replaceFile(e);
1754
1671
  }
1755
- function L() {
1672
+ function R() {
1756
1673
  t.clearSelection(), t.cancelDelete(), t.cancelReplace(), o.value = "", t.searchQuery.value = "", t.categoryFilter.value = null, t.sortOption.value = "newest", t.viewMode.value = "files", s.value = null, l.value = !1;
1757
1674
  }
1758
1675
  return {
@@ -1764,9 +1681,9 @@ function pn(e) {
1764
1681
  showMovePicker: u,
1765
1682
  selectedUrl: d,
1766
1683
  hasFrequentlyUsed: f,
1767
- displayItems: m,
1768
- hasUsedFiles: h,
1769
- folderTree: g,
1684
+ displayItems: p,
1685
+ hasUsedFiles: m,
1686
+ folderTree: h,
1770
1687
  copy: x,
1771
1688
  copied: S,
1772
1689
  getCategoryLabel: v,
@@ -1782,14 +1699,13 @@ function pn(e) {
1782
1699
  handleMoveToFolder: M,
1783
1700
  handleDeleteClick: P,
1784
1701
  handleReplaceItem: I,
1785
- handleReplaceFile: ee,
1786
- resetUI: L
1702
+ handleReplaceFile: L,
1703
+ resetUI: R
1787
1704
  };
1788
1705
  }
1789
- //#endregion
1790
- //#region ../media-library/src/composable.ts
1791
- function mn(e) {
1792
- 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), v = c([]), y = c({}), b = c(!1), x = c([]), S = c(!1), C = c(null), w = c(!1), T = c(null), E = c(!1), D = c(null), O = c(null), k = c(null), A = 0;
1706
+ // ../media-library/src/composable.ts
1707
+ function pn(e) {
1708
+ let { provider: t } = e, n = _([]), r = _([]), i = _(null), a = _("files"), o = _(""), s = _(null), c = _("newest"), l = _(!1), u = _(!1), d = _(!1), f = _(null), m = _(null), h = _(/* @__PURE__ */ new Set()), g = _(null), v = _([]), y = _({}), b = _(!1), x = _([]), S = _(!1), C = _(null), w = _(!1), T = _(null), E = _(!1), D = _(null), O = _(null), k = _(null), A = 0;
1793
1709
  function j(t) {
1794
1710
  try {
1795
1711
  t();
@@ -1801,7 +1717,7 @@ function mn(e) {
1801
1717
  return t.folders === !1 ? null : t.folders;
1802
1718
  }
1803
1719
  function N() {
1804
- return _(e.templateId);
1720
+ return p(e.templateId);
1805
1721
  }
1806
1722
  function P(e) {
1807
1723
  let t = {};
@@ -1811,54 +1727,54 @@ function mn(e) {
1811
1727
  }
1812
1728
  async function F() {
1813
1729
  let r = ++A;
1814
- u.value = !0;
1730
+ l.value = !0;
1815
1731
  let i = P();
1816
1732
  try {
1817
1733
  let e = await t.list(i);
1818
1734
  if (r !== A) return;
1819
- n.value = e.items, p.value = e.nextCursor ?? null, f.value = !!e.nextCursor;
1735
+ n.value = e.items, f.value = e.nextCursor ?? null, d.value = !!e.nextCursor;
1820
1736
  } catch (t) {
1821
1737
  if (r !== A) return;
1822
1738
  e.onError?.(t);
1823
1739
  } finally {
1824
- r === A && (u.value = !1);
1740
+ r === A && (l.value = !1);
1825
1741
  }
1826
1742
  }
1827
1743
  async function I() {
1828
- if (!f.value || !p.value || u.value) return;
1744
+ if (!d.value || !f.value || l.value) return;
1829
1745
  let r = ++A;
1830
- u.value = !0;
1831
- let i = P(p.value);
1746
+ l.value = !0;
1747
+ let i = P(f.value);
1832
1748
  try {
1833
1749
  let e = await t.list(i);
1834
1750
  if (r !== A) return;
1835
- n.value = [...n.value, ...e.items], p.value = e.nextCursor ?? null, f.value = !!e.nextCursor;
1751
+ n.value = [...n.value, ...e.items], f.value = e.nextCursor ?? null, d.value = !!e.nextCursor;
1836
1752
  } catch (t) {
1837
1753
  if (r !== A) return;
1838
1754
  e.onError?.(t);
1839
1755
  } finally {
1840
- r === A && (u.value = !1);
1756
+ r === A && (l.value = !1);
1841
1757
  }
1842
1758
  }
1843
- async function ee(e) {
1844
- o.value = e, await F();
1845
- }
1846
1759
  async function L(e) {
1847
- s.value = e, await F();
1760
+ o.value = e, await F();
1848
1761
  }
1849
1762
  async function R(e) {
1850
- l.value = e, await F();
1763
+ s.value = e, await F();
1851
1764
  }
1852
1765
  async function z(e) {
1766
+ c.value = e, await F();
1767
+ }
1768
+ async function B(e) {
1853
1769
  a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await F();
1854
1770
  }
1855
- async function B() {
1856
- a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await U();
1771
+ async function V() {
1772
+ a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await re();
1857
1773
  }
1858
- async function te(r) {
1774
+ async function H(r) {
1859
1775
  let { create: a } = t;
1860
1776
  if (typeof a != "function") return null;
1861
- d.value = !0;
1777
+ u.value = !0;
1862
1778
  try {
1863
1779
  let e = { file: r };
1864
1780
  i.value != null && (e.folderId = i.value);
@@ -1869,13 +1785,13 @@ function mn(e) {
1869
1785
  } catch (t) {
1870
1786
  return e.onError?.(t), null;
1871
1787
  } finally {
1872
- d.value = !1;
1788
+ u.value = !1;
1873
1789
  }
1874
1790
  }
1875
- async function ne(r) {
1791
+ async function ee(r) {
1876
1792
  let { create: a } = t;
1877
1793
  if (typeof a == "function") {
1878
- d.value = !0, m.value = {
1794
+ u.value = !0, m.value = {
1879
1795
  current: 0,
1880
1796
  total: r.length
1881
1797
  };
@@ -1897,11 +1813,11 @@ function mn(e) {
1897
1813
  }
1898
1814
  }
1899
1815
  } finally {
1900
- d.value = !1, m.value = null;
1816
+ u.value = !1, m.value = null;
1901
1817
  }
1902
1818
  }
1903
1819
  }
1904
- async function re(t) {
1820
+ async function te(t) {
1905
1821
  if (h.value.size === 0) return;
1906
1822
  let { move: r } = M() ?? { move: !1 };
1907
1823
  if (typeof r == "function") try {
@@ -1915,7 +1831,7 @@ function mn(e) {
1915
1831
  e.onError?.(t);
1916
1832
  }
1917
1833
  }
1918
- async function ie(r, i, a) {
1834
+ async function ne(r, i, a) {
1919
1835
  let { update: o } = t;
1920
1836
  if (typeof o != "function") return !1;
1921
1837
  try {
@@ -1927,28 +1843,28 @@ function mn(e) {
1927
1843
  return e.onError?.(t), !1;
1928
1844
  }
1929
1845
  }
1930
- function V(e) {
1846
+ function U(e) {
1931
1847
  let t = /* @__PURE__ */ new Map();
1932
1848
  for (let r of n.value) e.includes(r.id) && t.set(r.id, r);
1933
1849
  for (let n of v.value) e.includes(n.id) && !t.has(n.id) && t.set(n.id, n);
1934
1850
  return [...t.values()];
1935
1851
  }
1936
- function ae(e) {
1852
+ function W(e) {
1937
1853
  n.value = n.value.filter((t) => !e.includes(t.id)), v.value = v.value.filter((t) => !e.includes(t.id)), h.value = /* @__PURE__ */ new Set(), g.value = null;
1938
1854
  }
1939
- async function H() {
1855
+ async function G() {
1940
1856
  if (h.value.size === 0) return;
1941
1857
  let { delete: n } = t;
1942
1858
  if (typeof n != "function") return;
1943
- let r = [...h.value], i = V(r);
1859
+ let r = [...h.value], i = U(r);
1944
1860
  try {
1945
- await n(r), ae(r);
1861
+ await n(r), W(r);
1946
1862
  for (let e of i) j(() => t.onDeleted?.(e));
1947
1863
  } catch (t) {
1948
1864
  e.onError?.(t);
1949
1865
  }
1950
1866
  }
1951
- async function U() {
1867
+ async function re() {
1952
1868
  let { frequentlyUsed: n } = t;
1953
1869
  if (typeof n == "function") try {
1954
1870
  v.value = await n();
@@ -1956,7 +1872,7 @@ function mn(e) {
1956
1872
  e.onError?.(t);
1957
1873
  }
1958
1874
  }
1959
- async function W() {
1875
+ async function ie() {
1960
1876
  if (h.value.size === 0) return !1;
1961
1877
  x.value = [...h.value];
1962
1878
  let { checkUsage: n } = t;
@@ -1970,21 +1886,21 @@ function mn(e) {
1970
1886
  return e.onError?.(t), !1;
1971
1887
  }
1972
1888
  }
1973
- async function oe() {
1889
+ async function ae() {
1974
1890
  let { delete: n } = t;
1975
1891
  if (typeof n != "function" || (b.value = !1, x.value.length === 0)) return;
1976
- let r = x.value, i = V(r);
1892
+ let r = x.value, i = U(r);
1977
1893
  try {
1978
- await n(r), ae(r), x.value = [], y.value = {};
1894
+ await n(r), W(r), x.value = [], y.value = {};
1979
1895
  for (let e of i) j(() => t.onDeleted?.(e));
1980
1896
  } catch (t) {
1981
1897
  e.onError?.(t);
1982
1898
  }
1983
1899
  }
1984
- function se() {
1900
+ function oe() {
1985
1901
  b.value = !1, x.value = [], y.value = {};
1986
1902
  }
1987
- async function ce(r) {
1903
+ async function se(r) {
1988
1904
  let a = t.importFromUrl;
1989
1905
  if (typeof a != "function") return null;
1990
1906
  S.value = !0, C.value = null;
@@ -1997,17 +1913,17 @@ function mn(e) {
1997
1913
  S.value = !1;
1998
1914
  }
1999
1915
  }
2000
- function G(e) {
1916
+ function ce(e) {
2001
1917
  let t = new Set(h.value);
2002
1918
  t.has(e) ? t.delete(e) : t.add(e), h.value = t;
2003
1919
  }
2004
- function K() {
1920
+ function le() {
2005
1921
  h.value = /* @__PURE__ */ new Set(), g.value = null;
2006
1922
  }
2007
- function q(e) {
1923
+ function ue(e) {
2008
1924
  g.value = e, h.value = /* @__PURE__ */ new Set([e.id]);
2009
1925
  }
2010
- async function le() {
1926
+ async function K() {
2011
1927
  let { storage: n } = t;
2012
1928
  if (typeof n != "function") k.value = null;
2013
1929
  else try {
@@ -2016,7 +1932,7 @@ function mn(e) {
2016
1932
  e.onError?.(t);
2017
1933
  }
2018
1934
  }
2019
- async function J() {
1935
+ async function q() {
2020
1936
  let t = M();
2021
1937
  if (t) try {
2022
1938
  r.value = await t.list();
@@ -2024,35 +1940,35 @@ function mn(e) {
2024
1940
  e.onError?.(t);
2025
1941
  }
2026
1942
  }
2027
- async function ue(t, n) {
1943
+ async function de(t, n) {
2028
1944
  let { create: r } = M() ?? { create: !1 };
2029
1945
  if (typeof r != "function") return null;
2030
1946
  try {
2031
1947
  let e = { name: t };
2032
1948
  n !== void 0 && (e.parentId = n);
2033
1949
  let i = await r(e);
2034
- return await J(), i;
1950
+ return await q(), i;
2035
1951
  } catch (t) {
2036
1952
  return e.onError?.(t), null;
2037
1953
  }
2038
1954
  }
2039
- function de(e, t) {
1955
+ function J(e, t) {
2040
1956
  for (let n of e) if (n.id === t) return n;
2041
1957
  return null;
2042
1958
  }
2043
- async function Y(t, n) {
1959
+ async function fe(t, n) {
2044
1960
  let { update: r } = M() ?? { update: !1 };
2045
1961
  if (typeof r == "function") try {
2046
- await r(t, { name: n }), await J();
1962
+ await r(t, { name: n }), await q();
2047
1963
  } catch (t) {
2048
1964
  e.onError?.(t);
2049
1965
  }
2050
1966
  }
2051
- async function fe(t) {
1967
+ async function Y(t) {
2052
1968
  let { delete: n } = M() ?? { delete: !1 };
2053
1969
  if (typeof n == "function") try {
2054
- let e = de(r.value, t)?.parentId ?? null;
2055
- await n(t), i.value === t && (i.value = e), await J(), await F();
1970
+ let e = J(r.value, t)?.parentId ?? null;
1971
+ await n(t), i.value === t && (i.value = e), await q(), await F();
2056
1972
  } catch (t) {
2057
1973
  e.onError?.(t);
2058
1974
  }
@@ -2068,31 +1984,31 @@ function mn(e) {
2068
1984
  e.onError?.(t);
2069
1985
  }
2070
1986
  }
2071
- function Z() {
1987
+ function pe() {
2072
1988
  E.value = !1, D.value = null, O.value = null, T.value = null;
2073
1989
  }
2074
- function pe(e) {
1990
+ function Z(e) {
2075
1991
  n.value = n.value.map((t) => t.id === e.id ? e : t), v.value = v.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), j(() => t.onUpdated?.(e));
2076
1992
  }
2077
- async function Q(n) {
1993
+ async function me(n) {
2078
1994
  let { replace: r } = t;
2079
1995
  if (typeof r != "function" || !D.value) return null;
2080
1996
  w.value = !0, T.value = null;
2081
1997
  try {
2082
1998
  let e = await r(D.value.id, n);
2083
- return pe(e), E.value = !1, D.value = null, O.value = null, e;
1999
+ return Z(e), E.value = !1, D.value = null, O.value = null, e;
2084
2000
  } catch (t) {
2085
2001
  return T.value = t instanceof Error ? t.message : "Replace failed", e.onError?.(t), null;
2086
2002
  } finally {
2087
2003
  w.value = !1;
2088
2004
  }
2089
2005
  }
2090
- async function me(n, r) {
2006
+ async function Q(n, r) {
2091
2007
  let { replace: i } = t;
2092
2008
  if (typeof i != "function") return null;
2093
2009
  try {
2094
2010
  let e = await i(n, r);
2095
- return pe(e), e;
2011
+ return Z(e), e;
2096
2012
  } catch (t) {
2097
2013
  return e.onError?.(t), null;
2098
2014
  }
@@ -2104,11 +2020,11 @@ function mn(e) {
2104
2020
  viewMode: a,
2105
2021
  searchQuery: o,
2106
2022
  categoryFilter: s,
2107
- sortOption: l,
2108
- isLoading: u,
2109
- isUploading: d,
2023
+ sortOption: c,
2024
+ isLoading: l,
2025
+ isUploading: u,
2110
2026
  uploadProgress: m,
2111
- hasMore: f,
2027
+ hasMore: d,
2112
2028
  selectedItems: h,
2113
2029
  previewItem: g,
2114
2030
  frequentlyUsedItems: v,
@@ -2116,122 +2032,121 @@ function mn(e) {
2116
2032
  showDeleteWarning: b,
2117
2033
  loadItems: F,
2118
2034
  loadMore: I,
2119
- search: ee,
2120
- filterByCategory: L,
2121
- sortBy: R,
2122
- navigateToFolder: z,
2123
- showFrequentlyUsed: B,
2124
- uploadFile: te,
2125
- uploadFiles: ne,
2126
- moveSelected: re,
2127
- updateFile: ie,
2128
- deleteSelected: H,
2035
+ search: L,
2036
+ filterByCategory: R,
2037
+ sortBy: z,
2038
+ navigateToFolder: B,
2039
+ showFrequentlyUsed: V,
2040
+ uploadFile: H,
2041
+ uploadFiles: ee,
2042
+ moveSelected: te,
2043
+ updateFile: ne,
2044
+ deleteSelected: G,
2129
2045
  isImportingFromUrl: S,
2130
2046
  importFromUrlError: C,
2131
- importFromUrl: ce,
2132
- toggleSelection: G,
2133
- clearSelection: K,
2134
- selectItem: q,
2135
- loadFolders: J,
2136
- createFolder: ue,
2137
- renameFolder: Y,
2138
- deleteFolder: fe,
2139
- findFolderInTree: de,
2140
- loadFrequentlyUsed: U,
2141
- checkUsageBeforeDelete: W,
2142
- confirmDelete: oe,
2143
- cancelDelete: se,
2047
+ importFromUrl: se,
2048
+ toggleSelection: ce,
2049
+ clearSelection: le,
2050
+ selectItem: ue,
2051
+ loadFolders: q,
2052
+ createFolder: de,
2053
+ renameFolder: fe,
2054
+ deleteFolder: Y,
2055
+ findFolderInTree: J,
2056
+ loadFrequentlyUsed: re,
2057
+ checkUsageBeforeDelete: ie,
2058
+ confirmDelete: ae,
2059
+ cancelDelete: oe,
2144
2060
  isReplacing: w,
2145
2061
  replaceError: T,
2146
2062
  showReplaceWarning: E,
2147
2063
  pendingReplaceItem: D,
2148
2064
  replaceUsageInfo: O,
2149
2065
  checkUsageBeforeReplace: X,
2150
- cancelReplace: Z,
2151
- replaceFile: Q,
2152
- replaceMediaDirectly: me,
2066
+ cancelReplace: pe,
2067
+ replaceFile: me,
2068
+ replaceMediaDirectly: Q,
2153
2069
  storageInfo: k,
2154
- loadStorage: le
2070
+ loadStorage: K
2155
2071
  };
2156
2072
  }
2157
- //#endregion
2158
- //#region ../media-library/src/components/MediaLibraryChrome.vue?vue&type=script&setup=true&lang.ts
2159
- var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl:overflow-hidden" }, gn = {
2073
+ // ../media-library/src/components/MediaLibraryChrome.vue?vue&type=script&setup=true&lang.ts
2074
+ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl:overflow-hidden" }, hn = {
2160
2075
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-3.5",
2161
2076
  style: { "border-color": "var(--tpl-border)" }
2162
- }, _n = {
2077
+ }, gn = {
2163
2078
  id: "tpl-media-library-title",
2164
2079
  class: "tpl:text-sm tpl:font-semibold",
2165
2080
  style: { color: "var(--tpl-text)" }
2166
- }, vn = { class: "tpl:flex tpl:items-center tpl:gap-3" }, yn = { class: "tpl:relative" }, bn = [
2081
+ }, _n = { class: "tpl:flex tpl:items-center tpl:gap-3" }, vn = { class: "tpl:relative" }, yn = [
2167
2082
  "value",
2168
2083
  "disabled",
2169
2084
  "aria-label",
2170
2085
  "placeholder"
2171
- ], xn = ["aria-label"], Sn = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, Cn = {
2086
+ ], bn = ["aria-label"], xn = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, Sn = {
2172
2087
  key: 0,
2173
2088
  class: "tpl:flex tpl:w-48 tpl:shrink-0 tpl:flex-col tpl:border-r",
2174
2089
  style: {
2175
2090
  "border-color": "var(--tpl-border)",
2176
2091
  "background-color": "var(--tpl-bg)"
2177
2092
  }
2178
- }, wn = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, Tn = {
2093
+ }, Cn = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, wn = {
2179
2094
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-4 tpl:py-2.5",
2180
2095
  style: { "border-color": "var(--tpl-border)" }
2181
- }, En = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Dn = [
2096
+ }, Tn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, En = [
2182
2097
  "title",
2183
2098
  "aria-label",
2184
2099
  "aria-pressed"
2185
- ], On = {
2100
+ ], Dn = {
2186
2101
  key: 1,
2187
2102
  class: "tpl:text-xs tpl:font-medium",
2188
2103
  style: { color: "var(--tpl-text)" }
2189
- }, kn = {
2104
+ }, On = {
2190
2105
  class: "tpl:flex tpl:rounded-md tpl:p-0.5",
2191
2106
  style: {
2192
2107
  border: "1px solid var(--tpl-border)",
2193
2108
  "background-color": "var(--tpl-bg)"
2194
2109
  }
2195
- }, An = [
2110
+ }, kn = [
2196
2111
  "title",
2197
2112
  "aria-label",
2198
2113
  "aria-pressed"
2199
- ], jn = [
2114
+ ], An = [
2200
2115
  "title",
2201
2116
  "aria-label",
2202
2117
  "aria-pressed"
2203
- ], Mn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Nn = ["aria-label", "value"], Pn = { value: "" }, Fn = ["value"], In = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, Ln = {
2118
+ ], 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 = {
2204
2119
  key: 0,
2205
2120
  class: "tpl:px-4 tpl:pt-3"
2206
- }, Rn = {
2121
+ }, Ln = {
2207
2122
  class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
2208
2123
  style: {
2209
2124
  "background-color": "var(--tpl-bg-elevated)",
2210
2125
  "box-shadow": "var(--tpl-shadow-xl)"
2211
2126
  }
2212
- }, zn = {
2127
+ }, Rn = {
2213
2128
  id: "tpl-media-delete-title",
2214
2129
  class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
2215
2130
  style: { color: "var(--tpl-text)" }
2216
- }, Bn = {
2131
+ }, zn = {
2217
2132
  key: 0,
2218
2133
  "data-testid": "media-delete-usage",
2219
2134
  class: "tpl:mb-4 tpl:text-xs",
2220
2135
  style: { color: "var(--tpl-text-muted)" }
2221
- }, Vn = {
2136
+ }, Bn = {
2222
2137
  key: 1,
2223
2138
  class: "tpl:mb-4 tpl:max-h-32 tpl:overflow-y-auto tpl:rounded tpl:border tpl:p-2",
2224
2139
  style: { "border-color": "var(--tpl-border)" }
2225
- }, Hn = { class: "tpl:font-medium" }, Un = { style: { color: "var(--tpl-text-muted)" } }, Wn = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Gn = {
2140
+ }, Vn = { class: "tpl:font-medium" }, Hn = { style: { color: "var(--tpl-text-muted)" } }, Un = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Wn = {
2226
2141
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3",
2227
2142
  style: { "border-color": "var(--tpl-border)" }
2228
- }, Kn = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, qn = { class: "tpl:flex tpl:items-center tpl:gap-5" }, Jn = {
2143
+ }, 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 = {
2229
2144
  key: 0,
2230
2145
  class: "tpl:flex tpl:items-center tpl:gap-2"
2231
- }, Yn = {
2146
+ }, Jn = {
2232
2147
  key: 1,
2233
2148
  class: "tpl:relative"
2234
- }, Xn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Zn = ["data-testid", "disabled"], Qn = /* @__PURE__ */ D({
2149
+ }, Yn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Xn = ["data-testid", "disabled"], Zn = /* @__PURE__ */ e({
2235
2150
  __name: "MediaLibraryChrome",
2236
2151
  props: {
2237
2152
  provider: {},
@@ -2248,111 +2163,110 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2248
2163
  "confirm",
2249
2164
  "ready"
2250
2165
  ],
2251
- setup(t, { expose: n, emit: r }) {
2252
- let c = t, u = r, f = E(() => import("./MediaEditModal-DHtkZ4OU.js")), _ = p(() => c.translations), x = p(() => c.confirmTestId ?? "media-confirm"), C = {
2166
+ setup(e, { expose: t, emit: r }) {
2167
+ let o = e, u = r, d = s(() => import("./MediaEditModal-Cpcod6_U.js")), p = O(() => o.translations), h = O(() => o.confirmTestId ?? "media-confirm"), _ = {
2253
2168
  get maxFileSize() {
2254
- return c.provider.maxFileSize;
2169
+ return o.provider.maxFileSize;
2255
2170
  },
2256
2171
  get mimeTypes() {
2257
- return c.provider.mimeTypes;
2172
+ return o.provider.mimeTypes;
2258
2173
  },
2259
2174
  get accept() {
2260
- return c.accept;
2175
+ return o.accept;
2261
2176
  }
2262
2177
  };
2263
- i(de, C);
2264
- let { isAcceptedMimeType: D, availableCategories: k } = he(C), j = mn({
2265
- provider: c.provider,
2266
- templateId: () => c.templateId,
2267
- onError: (e) => c.onError?.(e)
2268
- }), N = pn({
2269
- library: j,
2270
- translations: _
2271
- }), P = p(() => typeof c.provider.create == "function"), F = p(() => c.provider.folders !== !1), I = p(() => typeof c.provider.importFromUrl == "function"), ee = p(() => typeof c.provider.delete == "function"), L = p(() => typeof c.provider.update == "function"), R = p(() => typeof c.provider.replace == "function"), z = p(() => typeof c.provider.frequentlyUsed == "function"), te = p(() => {
2272
- let e = c.provider.folders;
2178
+ n(de, _);
2179
+ let { isAcceptedMimeType: v, availableCategories: S } = Q(_), D = pn({
2180
+ provider: o.provider,
2181
+ templateId: () => o.templateId,
2182
+ onError: (e) => o.onError?.(e)
2183
+ }), N = fn({
2184
+ library: D,
2185
+ translations: p
2186
+ }), P = O(() => typeof o.provider.create == "function"), F = O(() => o.provider.folders !== !1), I = O(() => typeof o.provider.importFromUrl == "function"), L = O(() => typeof o.provider.delete == "function"), R = O(() => typeof o.provider.update == "function"), z = O(() => typeof o.provider.replace == "function"), V = O(() => typeof o.provider.frequentlyUsed == "function"), H = O(() => {
2187
+ let e = o.provider.folders;
2273
2188
  return e !== !1 && typeof e.move == "function";
2274
- }), re = p(() => {
2275
- let e = c.provider.folders;
2189
+ }), ee = O(() => {
2190
+ let e = o.provider.folders;
2276
2191
  return e !== !1 && typeof e.create == "function";
2277
- }), V = p(() => {
2278
- let e = c.provider.folders;
2192
+ }), U = O(() => {
2193
+ let e = o.provider.folders;
2279
2194
  return e !== !1 && typeof e.update == "function";
2280
- }), H = p(() => {
2281
- let e = c.provider.folders;
2195
+ }), W = O(() => {
2196
+ let e = o.provider.folders;
2282
2197
  return e !== !1 && typeof e.delete == "function";
2283
- }), U = p(() => j.isLoading.value && N.displayItems.value.length === 0), W = p(() => {
2284
- let e = j.previewItem.value;
2285
- return e ? !c.accept?.length || D(e.mimeType ?? "", c.accept) : !1;
2286
- }), se = p(() => {
2287
- if (!ee.value) return 0;
2198
+ }), G = O(() => D.isLoading.value && N.displayItems.value.length === 0), ie = O(() => {
2199
+ let e = D.previewItem.value;
2200
+ return e ? !o.accept?.length || v(e.mimeType ?? "", o.accept) : !1;
2201
+ }), ce = O(() => {
2202
+ if (!L.value) return 0;
2288
2203
  let e = 0;
2289
- for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
2204
+ for (let t of D.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
2290
2205
  return e;
2291
- }), G = p(() => N.showImportUrlModal.value || N.editingItem.value !== null || j.showReplaceWarning.value);
2206
+ }), ue = O(() => N.showImportUrlModal.value || N.editingItem.value !== null || D.showReplaceWarning.value);
2292
2207
  function K() {
2293
- return G.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : j.showDeleteWarning.value ? (j.cancelDelete(), !0) : !1;
2208
+ return ue.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : D.showDeleteWarning.value ? (D.cancelDelete(), !0) : !1;
2294
2209
  }
2295
2210
  function q() {
2296
- W.value && j.previewItem.value && u("confirm", j.previewItem.value);
2211
+ ie.value && D.previewItem.value && u("confirm", D.previewItem.value);
2297
2212
  }
2298
- function ue(e) {
2299
- let t = e.target.value;
2300
- j.filterByCategory(t || null);
2213
+ function J(e) {
2214
+ D.filterByCategory(e.target.value || null);
2301
2215
  }
2302
- async function Y() {
2216
+ async function fe() {
2303
2217
  let e = /* @__PURE__ */ new Set();
2304
- for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
2305
- j.selectedItems.value = e, await N.handleDeleteClick();
2218
+ for (let t of D.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
2219
+ D.selectedItems.value = e, await N.handleDeleteClick();
2306
2220
  }
2307
- return O(() => c.accept, (e) => {
2308
- e?.length === 1 && (j.categoryFilter.value = e[0]);
2309
- }, { immediate: !0 }), j.loadItems(), j.loadFrequentlyUsed(), j.loadStorage(), u("ready"), s(() => {
2221
+ return c(() => o.accept, (e) => {
2222
+ e?.length === 1 && (D.categoryFilter.value = e[0]);
2223
+ }, { immediate: !0 }), D.loadItems(), D.loadFrequentlyUsed(), D.loadStorage(), u("ready"), C(() => {
2310
2224
  N.resetUI();
2311
- }), n({
2312
- nestedDialogOpen: G,
2225
+ }), t({
2226
+ nestedDialogOpen: ue,
2313
2227
  handleEscape: K,
2314
- library: j,
2228
+ library: D,
2315
2229
  ui: N
2316
- }), (n, r) => (v(), h("div", hn, [
2317
- b("div", gn, [b("h2", _n, a(_.value.mediaLibrary.title), 1), b("div", vn, [
2318
- S(j).storageInfo.value ? (v(), T(dn, {
2230
+ }), (t, n) => (a(), f("div", mn, [
2231
+ T("div", hn, [T("h2", gn, y(p.value.mediaLibrary.title), 1), T("div", _n, [
2232
+ k(D).storageInfo.value ? (a(), x(un, {
2319
2233
  key: 0,
2320
- "used-bytes": S(j).storageInfo.value.usedBytes,
2321
- "limit-bytes": S(j).storageInfo.value.limitBytes,
2234
+ "used-bytes": k(D).storageInfo.value.usedBytes,
2235
+ "limit-bytes": k(D).storageInfo.value.limitBytes,
2322
2236
  size: 22
2323
- }, null, 8, ["used-bytes", "limit-bytes"])) : m("", !0),
2324
- b("div", yn, [b("input", {
2325
- value: S(N).searchInput.value,
2237
+ }, null, 8, ["used-bytes", "limit-bytes"])) : b("", !0),
2238
+ T("div", vn, [T("input", {
2239
+ value: k(N).searchInput.value,
2326
2240
  type: "search",
2327
- disabled: U.value,
2328
- "aria-label": _.value.mediaLibrary.searchAriaLabel,
2241
+ disabled: G.value,
2242
+ "aria-label": p.value.mediaLibrary.searchAriaLabel,
2329
2243
  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",
2330
2244
  style: {
2331
2245
  "border-color": "var(--tpl-border)",
2332
2246
  "background-color": "var(--tpl-bg)",
2333
2247
  color: "var(--tpl-text)"
2334
2248
  },
2335
- placeholder: _.value.mediaLibrary.searchPlaceholder,
2336
- onInput: r[0] ||= (e) => S(N).handleSearchInput(e.target.value)
2337
- }, null, 40, bn), d(S(oe), {
2249
+ placeholder: p.value.mediaLibrary.searchPlaceholder,
2250
+ onInput: n[0] ||= (e) => k(N).handleSearchInput(e.target.value)
2251
+ }, null, 40, yn), M(k(ne), {
2338
2252
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
2339
2253
  size: 13,
2340
2254
  "stroke-width": 2,
2341
2255
  style: { color: "var(--tpl-text-dim)" }
2342
2256
  })]),
2343
- t.showClose ? (v(), h("button", {
2257
+ e.showClose ? (a(), f("button", {
2344
2258
  key: 1,
2345
2259
  type: "button",
2346
- "aria-label": _.value.mediaLibrary.close,
2260
+ "aria-label": p.value.mediaLibrary.close,
2347
2261
  class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
2348
2262
  style: { color: "var(--tpl-text-muted)" },
2349
- onClick: r[1] ||= (e) => u("close")
2350
- }, [d(S(ce), {
2263
+ onClick: n[1] ||= (e) => u("close")
2264
+ }, [M(k(le), {
2351
2265
  size: 18,
2352
2266
  "stroke-width": 2
2353
- })], 8, xn)) : m("", !0)
2267
+ })], 8, bn)) : b("", !0)
2354
2268
  ])]),
2355
- b("div", Sn, [d(M, {
2269
+ T("div", xn, [M(E, {
2356
2270
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
2357
2271
  "enter-from-class": "tpl:-ml-48 tpl:opacity-0",
2358
2272
  "enter-to-class": "tpl:ml-0 tpl:opacity-100",
@@ -2360,19 +2274,19 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2360
2274
  "leave-from-class": "tpl:ml-0 tpl:opacity-100",
2361
2275
  "leave-to-class": "tpl:-ml-48 tpl:opacity-0"
2362
2276
  }, {
2363
- default: l(() => [F.value && S(N).showSidebar.value ? (v(), h("div", Cn, [d(Fe, {
2364
- folders: S(N).folderTree.value,
2365
- "current-folder-id": S(j).currentFolderId.value,
2366
- "view-mode": S(j).viewMode.value,
2367
- "has-frequently-used": z.value && S(N).hasFrequentlyUsed.value,
2368
- "can-create-folder": re.value,
2369
- "can-rename-folder": V.value,
2370
- "can-delete-folder": H.value,
2371
- onNavigate: S(j).navigateToFolder,
2372
- onCreateFolder: S(N).handleCreateFolder,
2373
- onRenameFolder: S(N).handleRenameFolder,
2374
- onDeleteFolder: S(N).handleDeleteFolder,
2375
- onShowFrequentlyUsed: S(j).showFrequentlyUsed
2277
+ default: l(() => [F.value && k(N).showSidebar.value ? (a(), f("div", Sn, [M(Pe, {
2278
+ folders: k(N).folderTree.value,
2279
+ "current-folder-id": k(D).currentFolderId.value,
2280
+ "view-mode": k(D).viewMode.value,
2281
+ "has-frequently-used": V.value && k(N).hasFrequentlyUsed.value,
2282
+ "can-create-folder": ee.value,
2283
+ "can-rename-folder": U.value,
2284
+ "can-delete-folder": W.value,
2285
+ onNavigate: k(D).navigateToFolder,
2286
+ onCreateFolder: k(N).handleCreateFolder,
2287
+ onRenameFolder: k(N).handleRenameFolder,
2288
+ onDeleteFolder: k(N).handleDeleteFolder,
2289
+ onShowFrequentlyUsed: k(D).showFrequentlyUsed
2376
2290
  }, null, 8, [
2377
2291
  "folders",
2378
2292
  "current-folder-id",
@@ -2386,90 +2300,90 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2386
2300
  "onRenameFolder",
2387
2301
  "onDeleteFolder",
2388
2302
  "onShowFrequentlyUsed"
2389
- ])])) : m("", !0)]),
2303
+ ])])) : b("", !0)]),
2390
2304
  _: 1
2391
- }), b("div", wn, [b("div", Tn, [b("div", En, [
2392
- F.value ? (v(), h("button", {
2305
+ }), T("div", Cn, [T("div", wn, [T("div", Tn, [
2306
+ F.value ? (a(), f("button", {
2393
2307
  key: 0,
2394
2308
  type: "button",
2395
2309
  "data-testid": "media-folder-toggle",
2396
2310
  class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
2397
- style: y({
2398
- color: S(N).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2399
- backgroundColor: S(N).showSidebar.value ? "var(--tpl-bg)" : "transparent",
2400
- border: S(N).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
2311
+ style: g({
2312
+ color: k(N).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2313
+ backgroundColor: k(N).showSidebar.value ? "var(--tpl-bg)" : "transparent",
2314
+ border: k(N).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
2401
2315
  }),
2402
- title: S(N).showSidebar.value ? _.value.mediaLibrary.hideFolders : _.value.mediaLibrary.showFolders,
2403
- "aria-label": S(N).showSidebar.value ? _.value.mediaLibrary.hideFolders : _.value.mediaLibrary.showFolders,
2404
- "aria-pressed": S(N).showSidebar.value,
2405
- onClick: r[2] ||= (e) => S(N).showSidebar.value = !S(N).showSidebar.value
2406
- }, [d(S(J), {
2316
+ title: k(N).showSidebar.value ? p.value.mediaLibrary.hideFolders : p.value.mediaLibrary.showFolders,
2317
+ "aria-label": k(N).showSidebar.value ? p.value.mediaLibrary.hideFolders : p.value.mediaLibrary.showFolders,
2318
+ "aria-pressed": k(N).showSidebar.value,
2319
+ onClick: n[2] ||= (e) => k(N).showSidebar.value = !k(N).showSidebar.value
2320
+ }, [M(k(te), {
2407
2321
  size: 16,
2408
2322
  "stroke-width": 2
2409
- })], 12, Dn)) : m("", !0),
2410
- S(j).viewMode.value === "frequently-used" ? (v(), h("span", On, a(_.value.mediaLibrary.frequentlyUsed), 1)) : (v(), T(xe, {
2323
+ })], 12, En)) : b("", !0),
2324
+ k(D).viewMode.value === "frequently-used" ? (a(), f("span", Dn, y(p.value.mediaLibrary.frequentlyUsed), 1)) : (a(), x(be, {
2411
2325
  key: 2,
2412
- folders: S(N).folderTree.value,
2413
- "current-folder-id": S(j).currentFolderId.value,
2414
- onNavigate: S(j).navigateToFolder
2326
+ folders: k(N).folderTree.value,
2327
+ "current-folder-id": k(D).currentFolderId.value,
2328
+ onNavigate: k(D).navigateToFolder
2415
2329
  }, null, 8, [
2416
2330
  "folders",
2417
2331
  "current-folder-id",
2418
2332
  "onNavigate"
2419
2333
  ])),
2420
- b("div", kn, [b("button", {
2334
+ T("div", On, [T("button", {
2421
2335
  type: "button",
2422
2336
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
2423
- style: y({
2424
- color: S(N).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2425
- backgroundColor: S(N).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
2337
+ style: g({
2338
+ color: k(N).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2339
+ backgroundColor: k(N).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
2426
2340
  }),
2427
- title: _.value.mediaLibrary.viewGrid,
2428
- "aria-label": _.value.mediaLibrary.viewGrid,
2429
- "aria-pressed": S(N).layoutMode.value === "grid",
2430
- onClick: r[3] ||= (e) => S(N).layoutMode.value = "grid"
2431
- }, [d(S(le), {
2341
+ title: p.value.mediaLibrary.viewGrid,
2342
+ "aria-label": p.value.mediaLibrary.viewGrid,
2343
+ "aria-pressed": k(N).layoutMode.value === "grid",
2344
+ onClick: n[3] ||= (e) => k(N).layoutMode.value = "grid"
2345
+ }, [M(k(re), {
2432
2346
  size: 14,
2433
2347
  "stroke-width": 2
2434
- })], 12, An), b("button", {
2348
+ })], 12, kn), T("button", {
2435
2349
  type: "button",
2436
2350
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
2437
- style: y({
2438
- color: S(N).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2439
- backgroundColor: S(N).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
2351
+ style: g({
2352
+ color: k(N).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2353
+ backgroundColor: k(N).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
2440
2354
  }),
2441
- title: _.value.mediaLibrary.viewList,
2442
- "aria-label": _.value.mediaLibrary.viewList,
2443
- "aria-pressed": S(N).layoutMode.value === "list",
2444
- onClick: r[4] ||= (e) => S(N).layoutMode.value = "list"
2445
- }, [d(S(ae), {
2355
+ title: p.value.mediaLibrary.viewList,
2356
+ "aria-label": p.value.mediaLibrary.viewList,
2357
+ "aria-pressed": k(N).layoutMode.value === "list",
2358
+ onClick: n[4] ||= (e) => k(N).layoutMode.value = "list"
2359
+ }, [M(k(se), {
2446
2360
  size: 14,
2447
2361
  "stroke-width": 2
2448
- })], 12, jn)])
2449
- ]), b("div", Mn, [S(k).length > 1 ? (v(), h("select", {
2362
+ })], 12, An)])
2363
+ ]), T("div", jn, [k(S).length > 1 ? (a(), f("select", {
2450
2364
  key: 0,
2451
- "aria-label": _.value.mediaLibrary.filterAriaLabel,
2365
+ "aria-label": p.value.mediaLibrary.filterAriaLabel,
2452
2366
  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",
2453
2367
  style: {
2454
2368
  "border-color": "var(--tpl-border)",
2455
2369
  "background-color": "var(--tpl-bg)",
2456
2370
  color: "var(--tpl-text)"
2457
2371
  },
2458
- value: S(j).categoryFilter.value ?? "",
2459
- onChange: ue
2460
- }, [b("option", Pn, a(_.value.mediaLibrary.filterAll), 1), (v(!0), h(w, null, o(S(k), (e) => (v(), h("option", {
2372
+ value: k(D).categoryFilter.value ?? "",
2373
+ onChange: J
2374
+ }, [T("option", Nn, y(p.value.mediaLibrary.filterAll), 1), (a(!0), f(A, null, i(k(S), (e) => (a(), f("option", {
2461
2375
  key: e,
2462
2376
  value: e
2463
- }, a(S(N).getCategoryLabel(e)), 9, Fn))), 128))], 40, Nn)) : m("", !0)])]), b("div", In, [S(j).viewMode.value === "files" && (P.value || I.value) ? (v(), h("div", Ln, [P.value ? (v(), T(an, {
2377
+ }, y(k(N).getCategoryLabel(e)), 9, Pn))), 128))], 40, Mn)) : b("", !0)])]), T("div", Fn, [k(D).viewMode.value === "files" && (P.value || I.value) ? (a(), f("div", In, [P.value ? (a(), x(rn, {
2464
2378
  key: 0,
2465
- "is-uploading": S(j).isUploading.value,
2466
- "upload-progress": S(j).uploadProgress.value,
2467
- onUpload: S(N).handleUpload
2379
+ "is-uploading": k(D).isUploading.value,
2380
+ "upload-progress": k(D).uploadProgress.value,
2381
+ onUpload: k(N).handleUpload
2468
2382
  }, null, 8, [
2469
2383
  "is-uploading",
2470
2384
  "upload-progress",
2471
2385
  "onUpload"
2472
- ])) : m("", !0), I.value ? (v(), h("button", {
2386
+ ])) : b("", !0), I.value ? (a(), f("button", {
2473
2387
  key: 1,
2474
2388
  "data-testid": "media-import-url",
2475
2389
  class: "tpl:mt-2 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
@@ -2478,25 +2392,25 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2478
2392
  color: "var(--tpl-text-muted)",
2479
2393
  "background-color": "var(--tpl-bg)"
2480
2394
  },
2481
- onClick: r[5] ||= (e) => S(N).showImportUrlModal.value = !0
2482
- }, [d(S(ie), {
2395
+ onClick: n[5] ||= (e) => k(N).showImportUrlModal.value = !0
2396
+ }, [M(k(oe), {
2483
2397
  size: 14,
2484
2398
  "stroke-width": 2
2485
- }), g(" " + a(_.value.mediaLibrary.importFromUrl), 1)])) : m("", !0)])) : m("", !0), d(pt, {
2486
- items: S(N).displayItems.value,
2487
- "selected-ids": S(j).selectedItems.value,
2488
- "is-loading": S(j).isLoading.value,
2489
- "has-more": S(j).viewMode.value === "files" && S(j).hasMore.value,
2490
- accept: t.accept,
2491
- layout: S(N).layoutMode.value,
2492
- "search-query": S(j).searchQuery.value,
2493
- "can-update": L.value,
2494
- "can-replace": R.value,
2495
- onSelect: S(N).handleSelect,
2496
- onToggle: S(j).toggleSelection,
2497
- onLoadMore: S(j).loadMore,
2498
- onEdit: S(N).handleEditItem,
2499
- onReplace: S(N).handleReplaceItem,
2399
+ }), m(" " + y(p.value.mediaLibrary.importFromUrl), 1)])) : b("", !0)])) : b("", !0), M(ft, {
2400
+ items: k(N).displayItems.value,
2401
+ "selected-ids": k(D).selectedItems.value,
2402
+ "is-loading": k(D).isLoading.value,
2403
+ "has-more": k(D).viewMode.value === "files" && k(D).hasMore.value,
2404
+ accept: e.accept,
2405
+ layout: k(N).layoutMode.value,
2406
+ "search-query": k(D).searchQuery.value,
2407
+ "can-update": R.value,
2408
+ "can-replace": z.value,
2409
+ onSelect: k(N).handleSelect,
2410
+ onToggle: k(D).toggleSelection,
2411
+ onLoadMore: k(D).loadMore,
2412
+ onEdit: k(N).handleEditItem,
2413
+ onReplace: k(N).handleReplaceItem,
2500
2414
  onConfirm: q
2501
2415
  }, null, 8, [
2502
2416
  "items",
@@ -2514,38 +2428,38 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2514
2428
  "onEdit",
2515
2429
  "onReplace"
2516
2430
  ])])])]),
2517
- d(wt, {
2518
- visible: S(N).showImportUrlModal.value,
2519
- "is-importing": S(j).isImportingFromUrl.value,
2520
- error: S(j).importFromUrlError.value,
2521
- onImport: S(N).handleImportFromUrl,
2522
- onClose: r[6] ||= (e) => S(N).showImportUrlModal.value = !1
2431
+ M(Ct, {
2432
+ visible: k(N).showImportUrlModal.value,
2433
+ "is-importing": k(D).isImportingFromUrl.value,
2434
+ error: k(D).importFromUrlError.value,
2435
+ onImport: k(N).handleImportFromUrl,
2436
+ onClose: n[6] ||= (e) => k(N).showImportUrlModal.value = !1
2523
2437
  }, null, 8, [
2524
2438
  "visible",
2525
2439
  "is-importing",
2526
2440
  "error",
2527
2441
  "onImport"
2528
2442
  ]),
2529
- S(N).editingItem.value ? (v(), T(S(f), {
2443
+ k(N).editingItem.value ? (a(), x(k(d), {
2530
2444
  key: 0,
2531
2445
  visible: !0,
2532
- item: S(N).editingItem.value,
2533
- save: S(N).handleEditSave,
2534
- "can-crop": R.value && S(N).editingItem.value.canUpdate !== !1,
2535
- onClose: r[7] ||= (e) => S(N).editingItem.value = null
2446
+ item: k(N).editingItem.value,
2447
+ save: k(N).handleEditSave,
2448
+ "can-crop": z.value && k(N).editingItem.value.canUpdate !== !1,
2449
+ onClose: n[7] ||= (e) => k(N).editingItem.value = null
2536
2450
  }, null, 8, [
2537
2451
  "item",
2538
2452
  "save",
2539
2453
  "can-crop"
2540
- ])) : m("", !0),
2541
- d(Xt, {
2542
- visible: S(j).showReplaceWarning.value,
2543
- item: S(j).pendingReplaceItem.value,
2544
- "usage-info": S(j).replaceUsageInfo.value,
2545
- "is-replacing": S(j).isReplacing.value,
2546
- error: S(j).replaceError.value,
2547
- onReplace: S(N).handleReplaceFile,
2548
- onClose: S(j).cancelReplace
2454
+ ])) : b("", !0),
2455
+ M(Yt, {
2456
+ visible: k(D).showReplaceWarning.value,
2457
+ item: k(D).pendingReplaceItem.value,
2458
+ "usage-info": k(D).replaceUsageInfo.value,
2459
+ "is-replacing": k(D).isReplacing.value,
2460
+ error: k(D).replaceError.value,
2461
+ onReplace: k(N).handleReplaceFile,
2462
+ onClose: k(D).cancelReplace
2549
2463
  }, null, 8, [
2550
2464
  "visible",
2551
2465
  "item",
@@ -2555,7 +2469,7 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2555
2469
  "onReplace",
2556
2470
  "onClose"
2557
2471
  ]),
2558
- d(M, {
2472
+ M(E, {
2559
2473
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
2560
2474
  "enter-from-class": "tpl:opacity-0",
2561
2475
  "enter-to-class": "tpl:opacity-100",
@@ -2563,7 +2477,7 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2563
2477
  "leave-from-class": "tpl:opacity-100",
2564
2478
  "leave-to-class": "tpl:opacity-0"
2565
2479
  }, {
2566
- default: l(() => [S(j).showDeleteWarning.value ? (v(), h("div", {
2480
+ default: l(() => [k(D).showDeleteWarning.value ? (a(), f("div", {
2567
2481
  key: 0,
2568
2482
  role: "dialog",
2569
2483
  "aria-modal": "true",
@@ -2574,79 +2488,79 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2574
2488
  "backdrop-filter": "blur(8px)",
2575
2489
  "-webkit-backdrop-filter": "blur(8px)"
2576
2490
  },
2577
- onClick: r[10] ||= A((...e) => S(j).cancelDelete && S(j).cancelDelete(...e), ["self"])
2578
- }, [b("div", Rn, [
2579
- b("h3", zn, a(_.value.mediaLibrary.deleteWarningTitle), 1),
2580
- b("p", {
2581
- class: e(["tpl:text-xs", S(N).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
2491
+ onClick: n[10] ||= w((...e) => k(D).cancelDelete && k(D).cancelDelete(...e), ["self"])
2492
+ }, [T("div", Ln, [
2493
+ T("h3", Rn, y(p.value.mediaLibrary.deleteWarningTitle), 1),
2494
+ T("p", {
2495
+ class: j(["tpl:text-xs", k(N).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
2582
2496
  style: { color: "var(--tpl-text-muted)" }
2583
- }, a(_.value.mediaLibrary.deleteWarningMessage), 3),
2584
- S(N).hasUsedFiles.value ? (v(), h("p", Bn, a(_.value.mediaLibrary.deleteWarningUsageNote), 1)) : m("", !0),
2585
- S(N).hasUsedFiles.value ? (v(), h("div", Vn, [(v(!0), h(w, null, o(S(j).deleteUsageInfo.value, (e, t) => (v(), h("div", {
2497
+ }, y(p.value.mediaLibrary.deleteWarningMessage), 3),
2498
+ k(N).hasUsedFiles.value ? (a(), f("p", zn, y(p.value.mediaLibrary.deleteWarningUsageNote), 1)) : b("", !0),
2499
+ k(N).hasUsedFiles.value ? (a(), f("div", Bn, [(a(!0), f(A, null, i(k(D).deleteUsageInfo.value, (e, t) => (a(), f("div", {
2586
2500
  key: t,
2587
2501
  class: "tpl:text-xs",
2588
2502
  style: { color: "var(--tpl-text)" }
2589
- }, [e.templateCount > 0 ? (v(), h(w, { key: 0 }, [b("span", Hn, a(S(N).displayItems.value.find((e) => e.id === t)?.filename || t), 1), b("span", Un, " - " + a(_.value.mediaLibrary.usedInTemplates.replace("{count}", e.templateCount.toString())), 1)], 64)) : m("", !0)]))), 128))])) : m("", !0),
2590
- b("div", Wn, [b("button", {
2503
+ }, [e.templateCount > 0 ? (a(), f(A, { key: 0 }, [T("span", Vn, y(k(N).displayItems.value.find((e) => e.id === t)?.filename || t), 1), T("span", Hn, " - " + y(p.value.mediaLibrary.usedInTemplates.replace("{count}", e.templateCount.toString())), 1)], 64)) : b("", !0)]))), 128))])) : b("", !0),
2504
+ T("div", Un, [T("button", {
2591
2505
  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",
2592
2506
  style: {
2593
2507
  "border-color": "var(--tpl-border)",
2594
2508
  color: "var(--tpl-text)",
2595
2509
  "background-color": "var(--tpl-bg)"
2596
2510
  },
2597
- onClick: r[8] ||= (...e) => S(j).cancelDelete && S(j).cancelDelete(...e)
2598
- }, a(_.value.mediaLibrary.cancel), 1), b("button", {
2511
+ onClick: n[8] ||= (...e) => k(D).cancelDelete && k(D).cancelDelete(...e)
2512
+ }, y(p.value.mediaLibrary.cancel), 1), T("button", {
2599
2513
  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",
2600
2514
  style: {
2601
2515
  "border-color": "var(--tpl-danger)",
2602
2516
  color: "var(--tpl-danger)",
2603
2517
  "background-color": "var(--tpl-bg)"
2604
2518
  },
2605
- onClick: r[9] ||= (...e) => S(j).confirmDelete && S(j).confirmDelete(...e)
2606
- }, a(S(N).hasUsedFiles.value ? _.value.mediaLibrary.deleteAnyway : _.value.mediaLibrary.confirmDelete), 1)])
2607
- ])])) : m("", !0)]),
2519
+ onClick: n[9] ||= (...e) => k(D).confirmDelete && k(D).confirmDelete(...e)
2520
+ }, y(k(N).hasUsedFiles.value ? p.value.mediaLibrary.deleteAnyway : p.value.mediaLibrary.confirmDelete), 1)])
2521
+ ])])) : b("", !0)]),
2608
2522
  _: 1
2609
2523
  }),
2610
- b("div", Gn, [b("div", Kn, [S(j).previewItem.value ? (v(), T(It, {
2524
+ T("div", Wn, [T("div", Gn, [k(D).previewItem.value ? (a(), x(Ft, {
2611
2525
  key: 0,
2612
- item: S(j).previewItem.value,
2613
- folders: S(N).folderTree.value
2614
- }, null, 8, ["item", "folders"])) : m("", !0)]), b("div", qn, [S(j).selectedItems.value.size > 0 ? (v(), h("div", Jn, [S(j).previewItem.value ? (v(), h("button", {
2526
+ item: k(D).previewItem.value,
2527
+ folders: k(N).folderTree.value
2528
+ }, null, 8, ["item", "folders"])) : b("", !0)]), T("div", Kn, [k(D).selectedItems.value.size > 0 ? (a(), f("div", qn, [k(D).previewItem.value ? (a(), f("button", {
2615
2529
  key: 0,
2616
2530
  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",
2617
- style: y({
2618
- borderColor: S(N).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
2619
- color: S(N).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
2531
+ style: g({
2532
+ borderColor: k(N).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
2533
+ color: k(N).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
2620
2534
  backgroundColor: "var(--tpl-bg)"
2621
2535
  }),
2622
- onClick: r[11] ||= (e) => S(N).copy(S(N).selectedUrl.value)
2623
- }, [S(N).copied.value ? (v(), T(S(B), {
2536
+ onClick: n[11] ||= (e) => k(N).copy(k(N).selectedUrl.value)
2537
+ }, [k(N).copied.value ? (a(), x(k(B), {
2624
2538
  key: 1,
2625
2539
  size: 12,
2626
2540
  "stroke-width": 2
2627
- })) : (v(), T(S(ne), {
2541
+ })) : (a(), x(k(ae), {
2628
2542
  key: 0,
2629
2543
  size: 12,
2630
2544
  "stroke-width": 2
2631
- })), g(" " + a(S(N).copied.value ? _.value.mediaLibrary.copied : _.value.mediaLibrary.copyUrl), 1)], 4)) : m("", !0), te.value ? (v(), h("div", Yn, [b("button", {
2545
+ })), m(" " + y(k(N).copied.value ? p.value.mediaLibrary.copied : p.value.mediaLibrary.copyUrl), 1)], 4)) : b("", !0), H.value ? (a(), f("div", Jn, [T("button", {
2632
2546
  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",
2633
2547
  style: {
2634
2548
  "border-color": "var(--tpl-border)",
2635
2549
  color: "var(--tpl-text)",
2636
2550
  "background-color": "var(--tpl-bg)"
2637
2551
  },
2638
- onClick: r[12] ||= (e) => S(N).showMovePicker.value = !S(N).showMovePicker.value
2639
- }, a(_.value.mediaLibrary.moveSelected), 1), S(N).showMovePicker.value ? (v(), T(kt, {
2552
+ onClick: n[12] ||= (e) => k(N).showMovePicker.value = !k(N).showMovePicker.value
2553
+ }, y(p.value.mediaLibrary.moveSelected), 1), k(N).showMovePicker.value ? (a(), x(Ot, {
2640
2554
  key: 0,
2641
- folders: S(N).folderTree.value,
2642
- "current-folder-id": S(j).currentFolderId.value,
2643
- onSelect: S(N).handleMoveToFolder,
2644
- onClose: r[13] ||= (e) => S(N).showMovePicker.value = !1
2555
+ folders: k(N).folderTree.value,
2556
+ "current-folder-id": k(D).currentFolderId.value,
2557
+ onSelect: k(N).handleMoveToFolder,
2558
+ onClose: n[13] ||= (e) => k(N).showMovePicker.value = !1
2645
2559
  }, null, 8, [
2646
2560
  "folders",
2647
2561
  "current-folder-id",
2648
2562
  "onSelect"
2649
- ])) : m("", !0)])) : m("", !0)])) : m("", !0), b("div", Xn, [se.value > 0 ? (v(), h("button", {
2563
+ ])) : b("", !0)])) : b("", !0)])) : b("", !0), T("div", Yn, [ce.value > 0 ? (a(), f("button", {
2650
2564
  key: 0,
2651
2565
  "data-testid": "media-delete",
2652
2566
  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",
@@ -2655,54 +2569,53 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2655
2569
  color: "var(--tpl-danger)",
2656
2570
  "background-color": "var(--tpl-bg)"
2657
2571
  },
2658
- onClick: Y
2659
- }, a(_.value.mediaLibrary.deleteSelected), 1)) : m("", !0), t.showConfirm ? (v(), h("button", {
2572
+ onClick: fe
2573
+ }, y(p.value.mediaLibrary.deleteSelected), 1)) : b("", !0), e.showConfirm ? (a(), f("button", {
2660
2574
  key: 1,
2661
- "data-testid": x.value,
2575
+ "data-testid": h.value,
2662
2576
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-4 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
2663
2577
  style: {
2664
2578
  "background-color": "var(--tpl-primary)",
2665
2579
  color: "var(--tpl-on-primary)"
2666
2580
  },
2667
- disabled: !W.value,
2581
+ disabled: !ie.value,
2668
2582
  onClick: q
2669
- }, a(t.accept?.length ? _.value.mediaLibrary.selectImage : _.value.mediaLibrary.selectFile), 9, Zn)) : m("", !0)])])])
2583
+ }, y(e.accept?.length ? p.value.mediaLibrary.selectImage : p.value.mediaLibrary.selectFile), 9, Xn)) : b("", !0)])])])
2670
2584
  ]));
2671
2585
  }
2672
- }), $n = /* #__PURE__ */ Object.assign({
2673
- "./locales/ca.ts": () => import("./ca-CYQH3J0b.js"),
2674
- "./locales/de.ts": () => import("./de-JvCTMJPy.js"),
2675
- "./locales/en.ts": () => import("./en-DwV15ltA.js"),
2676
- "./locales/es.ts": () => import("./es-CAv-Vldw.js"),
2677
- "./locales/fr.ts": () => import("./fr-DVPtxpR6.js"),
2678
- "./locales/ja.ts": () => import("./ja-dcWzjStz.js"),
2679
- "./locales/nl.ts": () => import("./nl-LZNqQgE4.js"),
2680
- "./locales/pt-BR.ts": () => import("./pt-BR-D6P_mNwA.js")
2586
+ }), Qn = /* #__PURE__ */ Object.assign({
2587
+ "./locales/ca.ts": () => import("./ca-Cc6eL0ZS.js"),
2588
+ "./locales/de.ts": () => import("./de-DtrXVcuY.js"),
2589
+ "./locales/en.ts": () => import("./en-TIqv4ag3.js"),
2590
+ "./locales/es.ts": () => import("./es-Dw_h7Oll.js"),
2591
+ "./locales/fr.ts": () => import("./fr-BJaeKu_8.js"),
2592
+ "./locales/ja.ts": () => import("./ja-Cu2HdYaK.js"),
2593
+ "./locales/nl.ts": () => import("./nl-1Ai2NykB.js"),
2594
+ "./locales/pt-BR.ts": () => import("./pt-BR-CIbp__Z7.js")
2681
2595
  });
2682
- function er(e) {
2596
+ function $n(e) {
2683
2597
  return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
2684
2598
  }
2685
- var tr = er($n);
2686
- function nr(e) {
2599
+ var er = $n(Qn);
2600
+ function tr(e) {
2687
2601
  return e.trim().replace(/_/g, "-").toLowerCase();
2688
2602
  }
2603
+ function nr(e) {
2604
+ let t = tr(e);
2605
+ return er.find((e) => tr(e) === t);
2606
+ }
2689
2607
  function rr(e) {
2690
- let t = nr(e);
2691
- return tr.find((e) => nr(e) === t);
2608
+ return tr(e).split("-")[0];
2692
2609
  }
2693
2610
  function ir(e) {
2694
- return nr(e).split("-")[0];
2695
- }
2696
- function ar(e) {
2697
- return rr(e) ?? rr(ir(e)) ?? "en";
2611
+ return nr(e) ?? nr(rr(e)) ?? "en";
2698
2612
  }
2699
- async function or(e) {
2700
- let t = $n[`./locales/${ar(e)}.ts`];
2613
+ async function ar(e) {
2614
+ let t = Qn[`./locales/${ir(e)}.ts`];
2701
2615
  return (await t()).default;
2702
2616
  }
2703
- //#endregion
2704
- //#region ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
2705
- var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ D({
2617
+ // ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
2618
+ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ e({
2706
2619
  __name: "MediaLibraryModal",
2707
2620
  props: {
2708
2621
  visible: { type: Boolean },
@@ -2715,25 +2628,25 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ D({
2715
2628
  onError: { type: Function }
2716
2629
  },
2717
2630
  emits: ["close", "select"],
2718
- setup(t, { emit: n }) {
2719
- let r = t, a = n, o = c(null);
2720
- O(() => r.locale, async (e) => {
2721
- o.value = await or(e ?? "en");
2722
- }, { immediate: !0 }), i(fe, o);
2723
- let s = p(() => r.uiTheme);
2724
- i(X, s);
2725
- let u = x(() => r.popoverTarget ?? null);
2726
- i(Y, u), i(Z, x(() => r.locale));
2727
- let g = c(null), _ = c(null);
2728
- _e(g, p(() => r.visible && o.value !== null && !_.value?.nestedDialogOpen));
2729
- function y(e) {
2730
- e.key === "Escape" && (_.value?.handleEscape() ? e.preventDefault() : a("close"));
2631
+ setup(e, { emit: t }) {
2632
+ let r = e, i = t, o = _(null);
2633
+ c(() => r.locale, async (e) => {
2634
+ o.value = await ar(e ?? "en");
2635
+ }, { immediate: !0 }), n(fe, o);
2636
+ let s = O(() => r.uiTheme);
2637
+ n(Y, s);
2638
+ let u = S(() => r.popoverTarget ?? null);
2639
+ n(J, u), n(X, S(() => r.locale));
2640
+ let d = _(null), p = _(null);
2641
+ ge(d, O(() => r.visible && o.value !== null && !p.value?.nestedDialogOpen));
2642
+ function m(e) {
2643
+ e.key === "Escape" && (p.value?.handleEscape() ? e.preventDefault() : i("close"));
2731
2644
  }
2732
- P(document, "keydown", y);
2733
- function S(e) {
2734
- a("select", e), a("close");
2645
+ P(document, "keydown", m);
2646
+ function h(e) {
2647
+ i("select", e), i("close");
2735
2648
  }
2736
- return (n, r) => (v(), T(f, { to: t.popoverTarget || "body" }, [d(M, {
2649
+ return (t, n) => (a(), x(v, { to: e.popoverTarget || "body" }, [M(E, {
2737
2650
  "enter-active-class": "tpl:transition tpl:duration-200",
2738
2651
  "enter-from-class": "tpl:opacity-0",
2739
2652
  "enter-to-class": "tpl:opacity-100",
@@ -2741,20 +2654,20 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ D({
2741
2654
  "leave-from-class": "tpl:opacity-100",
2742
2655
  "leave-to-class": "tpl:opacity-0"
2743
2656
  }, {
2744
- default: l(() => [t.visible && o.value ? (v(), h("div", {
2657
+ default: l(() => [e.visible && o.value ? (a(), f("div", {
2745
2658
  key: 0,
2746
2659
  "data-testid": "media-library-modal",
2747
2660
  "data-tpl-theme": s.value,
2748
- class: e([t.popoverTarget ? void 0 : "tpl", "tpl-media-overlay tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
2661
+ class: j([e.popoverTarget ? void 0 : "tpl", "tpl-media-overlay tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
2749
2662
  style: {
2750
2663
  "background-color": "var(--tpl-overlay)",
2751
2664
  "backdrop-filter": "blur(8px)",
2752
2665
  "-webkit-backdrop-filter": "blur(8px)"
2753
2666
  },
2754
- onClick: r[1] ||= A((e) => a("close"), ["self"])
2755
- }, [b("div", {
2667
+ onClick: n[1] ||= w((e) => i("close"), ["self"])
2668
+ }, [T("div", {
2756
2669
  ref_key: "dialogRef",
2757
- ref: g,
2670
+ ref: d,
2758
2671
  role: "dialog",
2759
2672
  "aria-modal": "true",
2760
2673
  "aria-labelledby": "tpl-media-library-title",
@@ -2769,29 +2682,30 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ D({
2769
2682
  border: "1px solid var(--tpl-border)",
2770
2683
  "box-shadow": "var(--tpl-shadow-xl)"
2771
2684
  }
2772
- }, [d(Qn, {
2685
+ }, [M(Zn, {
2773
2686
  ref_key: "chromeRef",
2774
- ref: _,
2775
- provider: t.provider,
2776
- accept: t.accept,
2777
- "template-id": t.templateId,
2778
- "on-error": t.onError,
2687
+ ref: p,
2688
+ provider: e.provider,
2689
+ accept: e.accept,
2690
+ "template-id": e.templateId,
2691
+ "on-error": e.onError,
2779
2692
  translations: o.value,
2780
2693
  "show-close": "",
2781
2694
  "show-confirm": "",
2782
2695
  "confirm-test-id": "media-confirm",
2783
- onClose: r[0] ||= (e) => a("close"),
2784
- onConfirm: S
2696
+ onClose: n[0] ||= (e) => i("close"),
2697
+ onConfirm: h
2785
2698
  }, null, 8, [
2786
2699
  "provider",
2787
2700
  "accept",
2788
2701
  "template-id",
2789
2702
  "on-error",
2790
2703
  "translations"
2791
- ])], 512)], 10, sr)) : m("", !0)]),
2704
+ ])], 512)], 10, or)) : b("", !0)]),
2792
2705
  _: 1
2793
2706
  })], 8, ["to"]));
2794
2707
  }
2795
2708
  });
2796
- //#endregion
2797
- export { cr as MediaLibraryModal, Y as a, pe as i, he as n, X as o, Q as r, _e as t };
2709
+ export { sr as MediaLibraryModal, J as a, pe as i, Q as n, Y as o, Z as r, ge as t };
2710
+
2711
+ //# sourceMappingURL=editor-modal-CyCe560f.js.map