@templatical/editor 0.49.0 → 0.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/README.md +4 -2
  2. package/dist/AiAltTextPopover-BZQ95GXL.js +106 -0
  3. package/dist/AiAltTextReview-DoBEudnE.js +206 -0
  4. package/dist/AiChatPanel-Bs6sES3b.js +550 -0
  5. package/dist/AiHeaderMenu-BEaTazx4.js +36 -0
  6. package/dist/AiPanels-CfN7A-ZA.js +33 -0
  7. package/dist/AiRewriteMenu-C3ZfDDYy.js +276 -0
  8. package/dist/{BlockIssueBadge-BdpJwim0.js → BlockIssueBadge-CKwZ1Vgn.js} +11 -11
  9. package/dist/{BlockPreviewCanvas-D_sowkf0.js → BlockPreviewCanvas-BXNLLLYi.js} +33 -33
  10. package/dist/CloudHeaderExtras-CsJMEiyN.js +23 -0
  11. package/dist/{CloudPanels-1hwFiJ0G.js → CloudPanels-B4F5m7vy.js} +66 -85
  12. package/dist/{CollaborationNotices-BWpKzueF.js → CollaborationNotices-CNuDp7Y2.js} +19 -16
  13. package/dist/{CollaboratorBar-D87phJsw.js → CollaboratorBar-BtHPiuHq.js} +22 -22
  14. package/dist/{CommentsPanel-BUvUzO3T.js → CommentsPanel-CyCM-BvT.js} +4 -4
  15. package/dist/CommentsSidebar-Ca3DyFOX.js +500 -0
  16. package/dist/{cdn/chunks/CountdownBlock-DB4JNdqh.js → CountdownBlock-DR4Xm2-T.js} +24 -26
  17. package/dist/{CountdownToolbar-CLMIwfK7.js → CountdownToolbar-CEIMPojJ.js} +55 -55
  18. package/dist/IssuesPanel-C8nMUccy.js +360 -0
  19. package/dist/{LoadingTrack-BXOptf5g.js → LoadingTrack-B0RKQWq3.js} +2 -2
  20. package/dist/{LogicTagInsertButton-CR5E4jSG.js → LogicTagInsertButton-CqfU52CO.js} +273 -268
  21. package/dist/{cdn/chunks/MediaEditModal-DD0SZ-S3.js → MediaEditModal-DHtkZ4OU.js} +202 -186
  22. package/dist/{MediaPanels-BVXDkqtH.js → MediaPanels-CGcOB2pR.js} +4 -4
  23. package/dist/{MergeTagInput-BEw_r0PJ.js → MergeTagInput-YnEkorTZ.js} +25 -25
  24. package/dist/{MergeTagModeToggle-CJTpFmVd.js → MergeTagModeToggle-Dhb1DAcQ.js} +40 -40
  25. package/dist/MergeTagTextarea-e4lnwtqZ.js +70 -0
  26. package/dist/ParagraphEditor-B6NK0ytw.js +799 -0
  27. package/dist/{RestoreVersionDialog-BaDpy3cL.js → RestoreVersionDialog-Bq_IGOLJ.js} +21 -21
  28. package/dist/{RichTextEditorContent-CsvniFlI.js → RichTextEditorContent-AOM6fylS.js} +48 -48
  29. package/dist/{SaveBlockDialog-DzWURF_e.js → SaveBlockDialog-C8GngfQx.js} +87 -87
  30. package/dist/{cdn/chunks/SavedBlocksBrowserModal-BMtyUrUP.js → SavedBlocksBrowserModal-wnkvxpm_.js} +102 -99
  31. package/dist/{SavedBlocksPanels-B3Af8ns2.js → SavedBlocksPanels-C2s3q0pJ.js} +9 -9
  32. package/dist/{SavedBlocksPickBar-Dj11-Lqp.js → SavedBlocksPickBar-BjcTiV87.js} +13 -13
  33. package/dist/TemplateSettings-BVBWpiDU.js +237 -0
  34. package/dist/{TestEmailModal-BeRYV3eg.js → TestEmailModal-SyhO9bn3.js} +57 -57
  35. package/dist/{TestEmailPanel-B8c3fQi2.js → TestEmailPanel-BDd2Rtav.js} +4 -4
  36. package/dist/{TitleEditor-CvpNUoAp.js → TitleEditor-pxD53y_l.js} +75 -75
  37. package/dist/ToggleSwitch-D51U9cmR.js +37 -0
  38. package/dist/{Toolbar-BadDSkkF.js → Toolbar-CZSPZYbj.js} +1138 -1138
  39. package/dist/{TplModal-BZgi9Tes.js → TplModal-DCzBzicE.js} +19 -19
  40. package/dist/{VersionHistoryMenu-BRlcQ8wX.js → VersionHistoryMenu-BQeWPT85.js} +35 -35
  41. package/dist/{VersionHistoryPanels-DGkllN3a.js → VersionHistoryPanels-BBm7YbRQ.js} +5 -5
  42. package/dist/{VersionPreviewBanner-F-811aps.js → VersionPreviewBanner-DUGF0tUJ.js} +9 -9
  43. package/dist/WrapperBlock-BO619LAb.js +45 -0
  44. package/dist/aiErrors-D5UOoYOt.js +41 -0
  45. package/dist/aiImageContext-BH4Ss1h3.js +48 -0
  46. package/dist/aiRewritePreview-DLGM05Ge.js +44 -0
  47. package/dist/{blockTypeIcons-CayLluou.js → blockTypeIcons-NzaYvAI4.js} +15 -14
  48. package/dist/bundle-stats.json +8 -8
  49. package/dist/{cdn/chunks/ca-DSJwJ5ov.js → ca-C7mTzW1r.js} +130 -13
  50. package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js +107 -0
  51. package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js.map +1 -0
  52. package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js +207 -0
  53. package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js.map +1 -0
  54. package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js +476 -0
  55. package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js.map +1 -0
  56. package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js +37 -0
  57. package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js.map +1 -0
  58. package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js +34 -0
  59. package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js.map +1 -0
  60. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js +208 -0
  61. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +1 -0
  62. package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js → BlockIssueBadge-DAn2vsMJ.js} +13 -13
  63. package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js.map → BlockIssueBadge-DAn2vsMJ.js.map} +1 -1
  64. package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js → BlockPreviewCanvas-D0--EQkP.js} +38 -38
  65. package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js.map → BlockPreviewCanvas-D0--EQkP.js.map} +1 -1
  66. package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js +25 -0
  67. package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js.map +1 -0
  68. package/dist/cdn/chunks/{CloudPanels-XufhBZYF.js → CloudPanels-C3jsxo_f.js} +52 -71
  69. package/dist/cdn/chunks/CloudPanels-C3jsxo_f.js.map +1 -0
  70. package/dist/cdn/chunks/{CollaborationNotices-CBvKEj1Q.js → CollaborationNotices-DjRI8gvs.js} +23 -20
  71. package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js.map +1 -0
  72. package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js → CollaboratorBar-Dfzm6A9A.js} +20 -20
  73. package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js.map → CollaboratorBar-Dfzm6A9A.js.map} +1 -1
  74. package/dist/cdn/chunks/CommentsPanel-CSO79OeX.js +20 -0
  75. package/dist/cdn/chunks/{CommentsPanel-R8YLLO3v.js.map → CommentsPanel-CSO79OeX.js.map} +1 -1
  76. package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js +470 -0
  77. package/dist/cdn/chunks/{CommentsSidebar-96NZHVq3.js.map → CommentsSidebar-CCvplq1Z.js.map} +1 -1
  78. package/dist/{CountdownBlock-DPQXWRvU.js → cdn/chunks/CountdownBlock-C6USdwk3.js} +19 -17
  79. package/dist/cdn/chunks/{CountdownBlock-DB4JNdqh.js.map → CountdownBlock-C6USdwk3.js.map} +1 -1
  80. package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js → CountdownToolbar-Cjud2Tos.js} +70 -70
  81. package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js.map → CountdownToolbar-Cjud2Tos.js.map} +1 -1
  82. package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js +340 -0
  83. package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js.map +1 -0
  84. package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js → LoadingTrack-BIcL4NiY.js} +2 -2
  85. package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js.map → LoadingTrack-BIcL4NiY.js.map} +1 -1
  86. package/dist/cdn/chunks/{LogicTagInsertButton-BJ2t2vxC.js → LogicTagInsertButton-CsL2JDOG.js} +367 -362
  87. package/dist/cdn/chunks/LogicTagInsertButton-CsL2JDOG.js.map +1 -0
  88. package/dist/{MediaEditModal-C_wxoUMG.js → cdn/chunks/MediaEditModal-BuHCiyMu.js} +544 -560
  89. package/dist/cdn/chunks/MediaEditModal-BuHCiyMu.js.map +1 -0
  90. package/dist/cdn/chunks/MediaPanels-DAgUf_T1.js +45 -0
  91. package/dist/cdn/chunks/{MediaPanels-CkdJ_kGp.js.map → MediaPanels-DAgUf_T1.js.map} +1 -1
  92. package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js → MergeTagInput-C8U-7LxL.js} +33 -33
  93. package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js.map → MergeTagInput-C8U-7LxL.js.map} +1 -1
  94. package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js → MergeTagModeToggle-Mm-p0A52.js} +41 -41
  95. package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js.map → MergeTagModeToggle-Mm-p0A52.js.map} +1 -1
  96. package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js +72 -0
  97. package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js.map +1 -0
  98. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js +634 -0
  99. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +1 -0
  100. package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js → RestoreVersionDialog-CdA5osuA.js} +25 -25
  101. package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js.map → RestoreVersionDialog-CdA5osuA.js.map} +1 -1
  102. package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js → RichTextEditorContent-Q1d2xqBT.js} +46 -46
  103. package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js.map → RichTextEditorContent-Q1d2xqBT.js.map} +1 -1
  104. package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js → SaveBlockDialog-CijargAy.js} +77 -77
  105. package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js.map → SaveBlockDialog-CijargAy.js.map} +1 -1
  106. package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +357 -0
  107. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BMtyUrUP.js.map → SavedBlocksBrowserModal-DtOz_X5S.js.map} +1 -1
  108. package/dist/cdn/chunks/SavedBlocksPanels-BowyED5h.js +38 -0
  109. package/dist/cdn/chunks/{SavedBlocksPanels-s_gxi1im.js.map → SavedBlocksPanels-BowyED5h.js.map} +1 -1
  110. package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js → SavedBlocksPickBar-BPRaJBv3.js} +18 -18
  111. package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js.map → SavedBlocksPickBar-BPRaJBv3.js.map} +1 -1
  112. package/dist/cdn/chunks/TemplateSettings-ByZeBO34.js +209 -0
  113. package/dist/cdn/chunks/{TemplateSettings-CtrzzQWl.js.map → TemplateSettings-ByZeBO34.js.map} +1 -1
  114. package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js → TestEmailModal-BUVTj3Ic.js} +54 -54
  115. package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js.map → TestEmailModal-BUVTj3Ic.js.map} +1 -1
  116. package/dist/cdn/chunks/TestEmailPanel-BxutYoWg.js +35 -0
  117. package/dist/cdn/chunks/{TestEmailPanel-DERaCdpG.js.map → TestEmailPanel-BxutYoWg.js.map} +1 -1
  118. package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js +199 -0
  119. package/dist/cdn/chunks/{TitleEditor-CEgxjtUX.js.map → TitleEditor-Ccv6uoTz.js.map} +1 -1
  120. package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js +39 -0
  121. package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js.map +1 -0
  122. package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js → Toolbar-DoprRgTn.js} +986 -987
  123. package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js.map → Toolbar-DoprRgTn.js.map} +1 -1
  124. package/dist/cdn/chunks/{TplModal-DDrbWJcE.js → TplModal-BXQzmsJX.js} +21 -21
  125. package/dist/cdn/chunks/{TplModal-DDrbWJcE.js.map → TplModal-BXQzmsJX.js.map} +1 -1
  126. package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js → VersionHistoryMenu-BF2fNCvq.js} +41 -41
  127. package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js.map → VersionHistoryMenu-BF2fNCvq.js.map} +1 -1
  128. package/dist/cdn/chunks/VersionHistoryPanels-Dal0Uk69.js +48 -0
  129. package/dist/cdn/chunks/{VersionHistoryPanels-DVOV8QLv.js.map → VersionHistoryPanels-Dal0Uk69.js.map} +1 -1
  130. package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js → VersionPreviewBanner-BaGcn-b1.js} +12 -12
  131. package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js.map → VersionPreviewBanner-BaGcn-b1.js.map} +1 -1
  132. package/dist/cdn/chunks/WrapperBlock-DkQJtLz0.js +47 -0
  133. package/dist/cdn/chunks/{WrapperBlock-CFuP4R0c.js.map → WrapperBlock-DkQJtLz0.js.map} +1 -1
  134. package/dist/cdn/chunks/aiErrors-D5UOoYOt.js +43 -0
  135. package/dist/cdn/chunks/aiErrors-D5UOoYOt.js.map +1 -0
  136. package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js +50 -0
  137. package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js.map +1 -0
  138. package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js +46 -0
  139. package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js.map +1 -0
  140. package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +22 -0
  141. package/dist/cdn/chunks/{blockTypeIcons-BnAd8qsP.js.map → blockTypeIcons-ikZAmd6U.js.map} +1 -1
  142. package/dist/{ca-DSJwJ5ov.js → cdn/chunks/ca-C7mTzW1r.js} +132 -11
  143. package/dist/cdn/chunks/ca-C7mTzW1r.js.map +1 -0
  144. package/dist/cdn/chunks/{cloud-CI_fgDyy.js → createCloudRuntime-DpBWhrv3.js} +489 -593
  145. package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js.map +1 -0
  146. package/dist/cdn/chunks/de-DBOTcDj2.js +22 -0
  147. package/dist/cdn/chunks/de-DBOTcDj2.js.map +1 -0
  148. package/dist/{de-CBE6O79z.js → cdn/chunks/de-DNuYQTmS.js} +132 -11
  149. package/dist/cdn/chunks/de-DNuYQTmS.js.map +1 -0
  150. package/dist/{dist-Bv_GBr2l.js → cdn/chunks/dist-Bo8Thh8v.js} +60 -58
  151. package/dist/cdn/chunks/{dist-Doy3r07H.js.map → dist-Bo8Thh8v.js.map} +1 -1
  152. package/dist/cdn/chunks/dist-S-rLGqax.js +406 -0
  153. package/dist/cdn/chunks/{dist-DdwjXLme.js.map → dist-S-rLGqax.js.map} +1 -1
  154. package/dist/cdn/chunks/{draggable-akeQH_JP.js → draggable-DZ0gwUJ6.js} +1822 -1728
  155. package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +1 -0
  156. package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js → editor-modal-CI6EfeMd.js} +884 -884
  157. package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js.map → editor-modal-CI6EfeMd.js.map} +1 -1
  158. package/dist/cdn/chunks/en-CDhWRrF_.js +22 -0
  159. package/dist/cdn/chunks/en-CDhWRrF_.js.map +1 -0
  160. package/dist/{en-CDexnk0p.js → cdn/chunks/en-CW71OK66.js} +132 -11
  161. package/dist/cdn/chunks/en-CW71OK66.js.map +1 -0
  162. package/dist/cdn/chunks/en-ifvu6oPv.js +1 -0
  163. package/dist/{es-BE42B6uN.js → cdn/chunks/es-DdK7zQfi.js} +132 -11
  164. package/dist/cdn/chunks/es-DdK7zQfi.js.map +1 -0
  165. package/dist/cdn/chunks/{extensions-koOuDeZS.js → extensions-taJTZlLK.js} +59 -59
  166. package/dist/cdn/chunks/{extensions-koOuDeZS.js.map → extensions-taJTZlLK.js.map} +1 -1
  167. package/dist/{fr-DlJFPDQR.js → cdn/chunks/fr-Dz5Bgb7-.js} +132 -11
  168. package/dist/cdn/chunks/fr-Dz5Bgb7-.js.map +1 -0
  169. package/dist/cdn/chunks/{icons-CjlNV8xD.js → icons-DNX6StSs.js} +178 -145
  170. package/dist/cdn/chunks/icons-DNX6StSs.js.map +1 -0
  171. package/dist/{ja-CUT8gkNI.js → cdn/chunks/ja-Di-zJiT8.js} +132 -11
  172. package/dist/cdn/chunks/ja-Di-zJiT8.js.map +1 -0
  173. package/dist/cdn/chunks/keys-BTpmg2Tt.js +12 -0
  174. package/dist/cdn/chunks/keys-BTpmg2Tt.js.map +1 -0
  175. package/dist/{logger-BBlvSn6q.js → cdn/chunks/logger-Tj0RPskW.js} +7 -1
  176. package/dist/cdn/chunks/logger-Tj0RPskW.js.map +1 -0
  177. package/dist/{nl-bXWqqRyS.js → cdn/chunks/nl-CvVuHYFL.js} +132 -11
  178. package/dist/cdn/chunks/{nl-bXWqqRyS.js.map → nl-CvVuHYFL.js.map} +1 -1
  179. package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js +199 -0
  180. package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js.map +1 -0
  181. package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js → preRenderCustomBlocks-Dc-QLntG.js} +4 -4
  182. package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js.map → preRenderCustomBlocks-Dc-QLntG.js.map} +1 -1
  183. package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js +22 -0
  184. package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js.map +1 -0
  185. package/dist/{pt-BR-2_H4-wlb.js → cdn/chunks/pt-BR-ZhO4vgyq.js} +132 -11
  186. package/dist/cdn/chunks/pt-BR-ZhO4vgyq.js.map +1 -0
  187. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +62 -0
  188. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +1 -0
  189. package/dist/cdn/chunks/socialIcons-BBvsTwCV.js +2032 -0
  190. package/dist/cdn/chunks/socialIcons-BBvsTwCV.js.map +1 -0
  191. package/dist/{dist-DBG3nh3k.js → cdn/chunks/src-BNFnxfrA.js} +552 -350
  192. package/dist/cdn/chunks/src-BNFnxfrA.js.map +1 -0
  193. package/dist/cdn/chunks/src-Bs_yxk3h.js +4392 -0
  194. package/dist/cdn/chunks/src-Bs_yxk3h.js.map +1 -0
  195. package/dist/cdn/chunks/{src-B77z1iw4.js → src-K6fw_35b.js} +113 -113
  196. package/dist/cdn/chunks/{src-B77z1iw4.js.map → src-K6fw_35b.js.map} +1 -1
  197. package/dist/cdn/chunks/{tiptap-B1RfWFzB.js → tiptap-CtVrAViq.js} +43 -43
  198. package/dist/cdn/chunks/{tiptap-B1RfWFzB.js.map → tiptap-CtVrAViq.js.map} +1 -1
  199. package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js → useCloudI18n-AVXhzbhQ.js} +4 -4
  200. package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js.map → useCloudI18n-AVXhzbhQ.js.map} +1 -1
  201. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +2586 -0
  202. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +1 -0
  203. package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +10 -0
  204. package/dist/cdn/chunks/{useEditorRoot-5SBqm90x.js.map → useEditorRoot-CR5GjJD6.js.map} +1 -1
  205. package/dist/cdn/chunks/{useI18n-DEqtEgOs.js → useI18n-CbVubQhM.js} +3 -3
  206. package/dist/cdn/chunks/{useI18n-DEqtEgOs.js.map → useI18n-CbVubQhM.js.map} +1 -1
  207. package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js → useLogicTag-B49Nc53Y.js} +5 -5
  208. package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js.map → useLogicTag-B49Nc53Y.js.map} +1 -1
  209. package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js → useMergeTag-B0KryMj8.js} +5 -5
  210. package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js.map → useMergeTag-B0KryMj8.js.map} +1 -1
  211. package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js → usePopoverPosition-C829ps5i.js} +4 -4
  212. package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js.map → usePopoverPosition-C829ps5i.js.map} +1 -1
  213. package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js +51 -0
  214. package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js.map +1 -0
  215. package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js → withCurrentFont-DFPXeVfG.js} +2 -2
  216. package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js.map → withCurrentFont-DFPXeVfG.js.map} +1 -1
  217. package/dist/cdn/editor.css +1 -1
  218. package/dist/cdn/editor.js +2151 -1480
  219. package/dist/cdn/editor.js.map +1 -1
  220. package/dist/{check-DQQzkmIC.js → check-yYsp5Xpk.js} +1 -1
  221. package/dist/{chevron-down-CIF4bdon.js → chevron-down-DTmD06_j.js} +1 -1
  222. package/dist/{chevron-right-Cg7Xu-ev.js → chevron-right-BSeYZOxc.js} +1 -1
  223. package/dist/{chevron-up-Csu7ISD-.js → chevron-up-BOApwrxi.js} +1 -1
  224. package/dist/{circle-alert-YUvIJAgY.js → circle-alert-BMszY8im.js} +1 -1
  225. package/dist/{clock-CnSIGKQW.js → clock-HADxnl6-.js} +1 -1
  226. package/dist/{cloud-YUYDtdHt.js → createCloudRuntime-DVQI_ReU.js} +474 -570
  227. package/dist/{createLucideIcon-BcP1sjdp.js → createLucideIcon-0lYYH3EW.js} +6 -6
  228. package/dist/de-DBOTcDj2.js +20 -0
  229. package/dist/{cdn/chunks/de-CBE6O79z.js → de-DNuYQTmS.js} +130 -13
  230. package/dist/{cdn/chunks/dist-Doy3r07H.js → dist-C7EtxNCb.js} +49 -51
  231. package/dist/{dist-CNqjHA8e.js → dist-C_dV9QAx.js} +130 -130
  232. package/dist/{cdn/chunks/dist-DdwjXLme.js → dist-DI4_YSnG.js} +111 -110
  233. package/dist/{cdn/chunks/src-CvLTYGdO.js → dist-DtOF3bDW.js} +446 -393
  234. package/dist/{editor-modal--7_9A6j-.js → editor-modal-Bzhl-PgI.js} +832 -834
  235. package/dist/en-CDhWRrF_.js +20 -0
  236. package/dist/{cdn/chunks/en-CDexnk0p.js → en-CW71OK66.js} +130 -13
  237. package/dist/en-DwV15ltA.js +1 -0
  238. package/dist/{cdn/chunks/es-BE42B6uN.js → es-DdK7zQfi.js} +130 -13
  239. package/dist/{extensions-zwsZlWjH.js → extensions-CdyweA50.js} +57 -57
  240. package/dist/{eye-B1bua-ck.js → eye-DWkSvYpj.js} +1 -1
  241. package/dist/{cdn/chunks/fr-DlJFPDQR.js → fr-Dz5Bgb7-.js} +130 -13
  242. package/dist/image-DesWjcZ4.js +28 -0
  243. package/dist/index.d.ts +361 -24
  244. package/dist/{info-x26nGOo2.js → info-ClWJGoZy.js} +1 -1
  245. package/dist/{cdn/chunks/ja-CUT8gkNI.js → ja-Di-zJiT8.js} +130 -13
  246. package/dist/keys-Zd9KWRD1.js +10 -0
  247. package/dist/{link-CezhndyR.js → link-BqRicFTA.js} +1 -1
  248. package/dist/{list-DQqdptI0.js → list-bojQr9bn.js} +1 -1
  249. package/dist/{loader-circle-DCEeoYoi.js → loader-circle-B2B8LbUu.js} +1 -1
  250. package/dist/{cdn/chunks/logger-ByvdoAwq.js → logger-k9Nbj3Cp.js} +5 -3
  251. package/dist/{message-circle-BLGzfv_7.js → message-circle-BEuiNsyZ.js} +1 -1
  252. package/dist/{cdn/chunks/nl-bXWqqRyS.js → nl-CvVuHYFL.js} +130 -13
  253. package/dist/normalizeMergeTagMarkup-P6SUBuPv.js +197 -0
  254. package/dist/{package-D_kEQCMU.js → package-DCROB4aM.js} +1 -1
  255. package/dist/{pencil-Dct8zGLy.js → pencil-CEotCKbf.js} +1 -1
  256. package/dist/{preRenderCustomBlocks-CtKJecE-.js → preRenderCustomBlocks-D8rr61_z.js} +4 -4
  257. package/dist/pt-BR-CHM-ZKvE.js +20 -0
  258. package/dist/{cdn/chunks/pt-BR-2_H4-wlb.js → pt-BR-ZhO4vgyq.js} +130 -13
  259. package/dist/{refresh-cw-tGMRDxr8.js → refresh-cw-C6M2mHNC.js} +12 -2
  260. package/dist/{runtime-dom.esm-bundler-DYn1z2Xf.js → runtime-dom.esm-bundler-B8WCZWUm.js} +134 -134
  261. package/dist/sanitizeRichTextHtml-DeISfLFr.js +60 -0
  262. package/dist/{search-Bm2cCQpe.js → search-Cy99zPYf.js} +1 -1
  263. package/dist/{send-sVLaKZ7f.js → send-BDLJFsf3.js} +1 -1
  264. package/dist/{smartphone-B2W81p02.js → smartphone-CVvQaNA4.js} +1 -1
  265. package/dist/{cdn/chunks/socialIcons-CkZSYpoG.js → socialIcons-Dd-jRiVe.js} +688 -693
  266. package/dist/{sparkles-a1qkBZ8X.js → sparkles-Ce0Qz0ox.js} +1 -1
  267. package/dist/square-BWlolnXe.js +15 -0
  268. package/dist/style.css +1 -1
  269. package/dist/templatical-editor.js +2114 -1422
  270. package/dist/{text-align-start-CTuwQ5YW.js → text-align-start-D1V5gPTy.js} +1 -1
  271. package/dist/{trash-I3D2peFQ.js → trash-CZfiUFmw.js} +1 -1
  272. package/dist/{triangle-alert-CenxmLRE.js → triangle-alert-CFDzyFC7.js} +1 -1
  273. package/dist/upload-BJfvdIrD.js +36 -0
  274. package/dist/{useCloudI18n-CGVEZV3o.js → useCloudI18n-Dcjua65H.js} +5 -5
  275. package/dist/{useEditorCore-DRbMRe8F.js → useEditorCore-BTLeAVlM.js} +1463 -1499
  276. package/dist/{useEditorRoot-BVm2-1N8.js → useEditorRoot-DUy67lJu.js} +2 -2
  277. package/dist/{useI18n-CSh4gO5c.js → useI18n-BdoY7xDE.js} +4 -4
  278. package/dist/{useLogicTag-zcI6BWIf.js → useLogicTag-DKLZ1T9H.js} +3 -3
  279. package/dist/{useMergeTag-C-iBLlp0.js → useMergeTag-Bhdx7AKk.js} +3 -3
  280. package/dist/{usePopoverPosition-CMcsMBtK.js → usePopoverPosition-BZea45XK.js} +2 -2
  281. package/dist/useScrollToBlock-FmNMALM_.js +74 -0
  282. package/dist/{vue.runtime.esm-bundler-DV0Wx4r_.js → vue.runtime.esm-bundler-DgFJ6GPG.js} +1428 -1332
  283. package/dist/{withCurrentFont-D62njRLu.js → withCurrentFont-BATJHNve.js} +1 -1
  284. package/dist/{x-KFQ4S-Kz.js → x-CZ0Js0hA.js} +1 -1
  285. package/package.json +14 -12
  286. package/dist/AiChatSidebar-CdjTb9ej.js +0 -230
  287. package/dist/AiFeatureMenu-DKm7VYCs.js +0 -57
  288. package/dist/CloudHeaderExtras-CI8RR9hG.js +0 -55
  289. package/dist/CommentsSidebar-J65znlrH.js +0 -500
  290. package/dist/DesignReferenceSidebar-BTwCFgz8.js +0 -279
  291. package/dist/IssuesPanel-DeeVsfG7.js +0 -117
  292. package/dist/ParagraphEditor-zLV44z-R.js +0 -797
  293. package/dist/SavedBlocksBrowserModal-B8DCFW7t.js +0 -360
  294. package/dist/TemplateScoringPanel-Ba9sgvjS.js +0 -273
  295. package/dist/TemplateSettings-Cu5X9DgA.js +0 -246
  296. package/dist/ToggleSwitch-DHweVJOr.js +0 -102
  297. package/dist/WrapperBlock-DiiaxpMb.js +0 -45
  298. package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js +0 -205
  299. package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js.map +0 -1
  300. package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js +0 -57
  301. package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js.map +0 -1
  302. package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js +0 -56
  303. package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +0 -1
  304. package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +0 -1
  305. package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +0 -1
  306. package/dist/cdn/chunks/CommentsPanel-R8YLLO3v.js +0 -20
  307. package/dist/cdn/chunks/CommentsSidebar-96NZHVq3.js +0 -470
  308. package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js +0 -229
  309. package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js.map +0 -1
  310. package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js +0 -100
  311. package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js.map +0 -1
  312. package/dist/cdn/chunks/LogicTagInsertButton-BJ2t2vxC.js.map +0 -1
  313. package/dist/cdn/chunks/MediaEditModal-DD0SZ-S3.js.map +0 -1
  314. package/dist/cdn/chunks/MediaPanels-CkdJ_kGp.js +0 -45
  315. package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js +0 -632
  316. package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js.map +0 -1
  317. package/dist/cdn/chunks/SavedBlocksPanels-s_gxi1im.js +0 -38
  318. package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js +0 -237
  319. package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js.map +0 -1
  320. package/dist/cdn/chunks/TemplateSettings-CtrzzQWl.js +0 -208
  321. package/dist/cdn/chunks/TestEmailPanel-DERaCdpG.js +0 -35
  322. package/dist/cdn/chunks/TitleEditor-CEgxjtUX.js +0 -199
  323. package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js +0 -104
  324. package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js.map +0 -1
  325. package/dist/cdn/chunks/VersionHistoryPanels-DVOV8QLv.js +0 -48
  326. package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js +0 -47
  327. package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js +0 -22
  328. package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +0 -1
  329. package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +0 -1
  330. package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js +0 -358
  331. package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +0 -1
  332. package/dist/cdn/chunks/de-CBE6O79z.js.map +0 -1
  333. package/dist/cdn/chunks/de-D_atmUVB.js +0 -89
  334. package/dist/cdn/chunks/de-D_atmUVB.js.map +0 -1
  335. package/dist/cdn/chunks/draggable-akeQH_JP.js.map +0 -1
  336. package/dist/cdn/chunks/en-CDexnk0p.js.map +0 -1
  337. package/dist/cdn/chunks/en-DhJLnaBx.js +0 -89
  338. package/dist/cdn/chunks/en-DhJLnaBx.js.map +0 -1
  339. package/dist/cdn/chunks/en-Ve-PWSXu.js +0 -1
  340. package/dist/cdn/chunks/es-BE42B6uN.js.map +0 -1
  341. package/dist/cdn/chunks/fr-DlJFPDQR.js.map +0 -1
  342. package/dist/cdn/chunks/icons-CjlNV8xD.js.map +0 -1
  343. package/dist/cdn/chunks/ja-CUT8gkNI.js.map +0 -1
  344. package/dist/cdn/chunks/keys-UAWhQ3zW.js +0 -12
  345. package/dist/cdn/chunks/keys-UAWhQ3zW.js.map +0 -1
  346. package/dist/cdn/chunks/logger-ByvdoAwq.js.map +0 -1
  347. package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +0 -1
  348. package/dist/cdn/chunks/pt-BR-BphMoUTw.js +0 -89
  349. package/dist/cdn/chunks/pt-BR-BphMoUTw.js.map +0 -1
  350. package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +0 -1
  351. package/dist/cdn/chunks/src-B1e5SSYP.js +0 -1272
  352. package/dist/cdn/chunks/src-B1e5SSYP.js.map +0 -1
  353. package/dist/cdn/chunks/src-CvLTYGdO.js.map +0 -1
  354. package/dist/cdn/chunks/timeouts-o5Y9BuqI.js +0 -6
  355. package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +0 -1
  356. package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js +0 -12
  357. package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js.map +0 -1
  358. package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js +0 -2623
  359. package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +0 -1
  360. package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +0 -10
  361. package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js +0 -21
  362. package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js.map +0 -1
  363. package/dist/copy-CUC43md_.js +0 -19
  364. package/dist/createCloudRuntime-BMDRjL0k.js +0 -356
  365. package/dist/de-D_atmUVB.js +0 -87
  366. package/dist/dist-CCqn-RqE.js +0 -407
  367. package/dist/en-BHCMzqib.js +0 -1
  368. package/dist/en-DhJLnaBx.js +0 -87
  369. package/dist/image-up-BqiO7KCO.js +0 -27
  370. package/dist/keys-BymCnLHD.js +0 -10
  371. package/dist/plus-BDd0gTEm.js +0 -14
  372. package/dist/pt-BR-BphMoUTw.js +0 -87
  373. package/dist/shield-check-YhsbXfQc.js +0 -14
  374. package/dist/socialIcons-Bwv-49EB.js +0 -2167
  375. package/dist/timeouts-o5Y9BuqI.js +0 -4
  376. package/dist/upload-uU2cK0Ce.js +0 -21
  377. package/dist/useAliveFlag-BjP0Gxza.js +0 -10
  378. package/dist/useScrollToBlock-CdCQK9QQ.js +0 -47
@@ -1,23 +1,21 @@
1
- import { A as e, At as t, B as n, D as r, J as i, K as a, M as o, P as s, R as c, S as l, V as u, Z as d, _ as f, at as p, c as m, d as h, g, h as _, i as v, j as y, jt as b, kt as x, l as S, r as C, rt as w, s as T, tt as E, u as D, v as O } from "./vue.runtime.esm-bundler-DV0Wx4r_.js";
2
- import { a as k, c as A, s as j, t as M } from "./runtime-dom.esm-bundler-DYn1z2Xf.js";
3
- import { h as N } from "./dist-Bv_GBr2l.js";
4
- import { a as P, n as F, o as I, r as L, s as R, t as ee } from "./dist-CCqn-RqE.js";
5
- import { t as z } from "./createLucideIcon-BcP1sjdp.js";
6
- import { t as B } from "./check-DQQzkmIC.js";
7
- import { t as te } from "./chevron-right-Cg7Xu-ev.js";
8
- import { t as ne } from "./copy-CUC43md_.js";
9
- import { t as re } from "./link-CezhndyR.js";
10
- import { t as ie } from "./list-DQqdptI0.js";
11
- import { t as V } from "./loader-circle-DCEeoYoi.js";
12
- import { t as H } from "./pencil-Dct8zGLy.js";
13
- import { t as ae } from "./plus-BDd0gTEm.js";
14
- import { t as U } from "./refresh-cw-tGMRDxr8.js";
15
- import { t as oe } from "./search-Bm2cCQpe.js";
16
- import { t as se } from "./trash-I3D2peFQ.js";
17
- import { t as ce } from "./upload-uU2cK0Ce.js";
18
- import { t as le } from "./x-KFQ4S-Kz.js";
19
- import { t as W } from "./_plugin-vue_export-helper-B3ysoDQm.js";
20
- var G = z({
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({
21
19
  name: "file",
22
20
  size: 24,
23
21
  node: [["path", {
@@ -27,14 +25,14 @@ var G = z({
27
25
  d: "M14 2v5a1 1 0 0 0 1 1h5",
28
26
  key: "wfsgrz"
29
27
  }]]
30
- }), K = z({
28
+ }), q = z({
31
29
  name: "folder",
32
30
  size: 24,
33
31
  node: [["path", {
34
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",
35
33
  key: "1kt360"
36
34
  }]]
37
- }), ue = z({
35
+ }), le = z({
38
36
  name: "grid-2x2",
39
37
  size: 24,
40
38
  node: [
@@ -56,7 +54,7 @@ var G = z({
56
54
  }]
57
55
  ],
58
56
  aliases: ["grid-2-x-2"]
59
- }), q = z({
57
+ }), J = z({
60
58
  name: "panel-left",
61
59
  size: 24,
62
60
  node: [["rect", {
@@ -71,14 +69,14 @@ var G = z({
71
69
  key: "fh3hqa"
72
70
  }]],
73
71
  aliases: ["sidebar"]
74
- }), de = z({
72
+ }), ue = z({
75
73
  name: "star",
76
74
  size: 24,
77
75
  node: [["path", {
78
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",
79
77
  key: "r04s7s"
80
78
  }]]
81
- }), fe = Symbol("templaticalMediaLimits"), J = Symbol("templaticalMediaPopoverTarget"), pe = Symbol("templaticalMediaTranslations"), Y = Symbol("templaticalMediaUiTheme"), X = Symbol("templaticalMediaUiLocale"), me = { mediaLibrary: {
79
+ }), de = Symbol("templaticalMediaLimits"), Y = Symbol("templaticalMediaPopoverTarget"), fe = Symbol("templaticalMediaTranslations"), X = Symbol("templaticalMediaUiTheme"), Z = Symbol("templaticalMediaUiLocale"), pe = { mediaLibrary: {
82
80
  title: "Media Library",
83
81
  searchPlaceholder: "Search files...",
84
82
  allFiles: "All Files",
@@ -173,103 +171,103 @@ var G = z({
173
171
  } };
174
172
  //#endregion
175
173
  //#region ../media-library/src/composables/useI18n.ts
176
- function Z(e) {
177
- let t = e ?? l(pe, null), n = (a(t) ? t.value : t) ?? me;
178
- function r(e, t) {
174
+ function Q(e) {
175
+ let n = e ?? t(fe, null), r = (C(n) ? n.value : n) ?? pe;
176
+ function i(e, t) {
179
177
  return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
180
178
  }
181
179
  return {
182
- t: n,
183
- format: r
180
+ t: r,
181
+ format: i
184
182
  };
185
183
  }
186
184
  //#endregion
187
185
  //#region ../media-library/src/composables/useMediaCategories.ts
188
- var he = [
186
+ var me = [
189
187
  "images",
190
188
  "documents",
191
189
  "videos",
192
190
  "audio"
193
191
  ];
194
- function Q(e) {
195
- let t = e ?? l(fe, null);
196
- if (!t) throw Error("[Templatical] useMediaCategories() needs media limits in scope. Render it under <MediaLibraryModal> or provide MEDIA_LIMITS_KEY yourself.");
197
- let n = t, r = T(() => !0), i = T(() => n.maxFileSize ?? Infinity), a = T(() => {
198
- let e = n.accept;
192
+ function he(e) {
193
+ let n = e ?? t(de, null);
194
+ 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(() => {
196
+ let e = r.accept;
199
197
  if (e && e.length > 0) return e;
200
- let t = n.mimeTypes;
201
- return t ? Object.keys(t) : he;
202
- }), o = T(() => {
203
- let e = n.mimeTypes;
204
- return e ? a.value.flatMap((t) => e[t] ?? []) : [];
205
- }), s = T(() => o.value.join(",")), c = T(() => n.mimeTypes !== void 0);
198
+ let t = r.mimeTypes;
199
+ return t ? Object.keys(t) : me;
200
+ }), s = p(() => {
201
+ let e = r.mimeTypes;
202
+ return e ? o.value.flatMap((t) => e[t] ?? []) : [];
203
+ }), c = p(() => s.value.join(",")), l = p(() => r.mimeTypes !== void 0);
206
204
  function u(e, t) {
207
- let r = n.mimeTypes;
208
- return !r || (t && t.length > 0 ? t : Object.keys(r)).some((t) => r[t]?.includes(e) ?? !1);
205
+ let n = r.mimeTypes;
206
+ return !n || (t && t.length > 0 ? t : Object.keys(n)).some((t) => n[t]?.includes(e) ?? !1);
209
207
  }
210
208
  function d(e) {
211
- return u(e.type) && e.size <= i.value;
209
+ return u(e.type) && e.size <= a.value;
212
210
  }
213
211
  function f(e) {
214
- let t = n.mimeTypes;
212
+ let t = r.mimeTypes;
215
213
  return t ? t.images?.includes(e) ?? !1 : e.startsWith("image/");
216
214
  }
217
- function p(e) {
218
- let t = n.mimeTypes;
215
+ function m(e) {
216
+ let t = r.mimeTypes;
219
217
  if (!t) return null;
220
218
  for (let [n, r] of Object.entries(t)) if (r?.includes(e)) return n;
221
219
  return null;
222
220
  }
223
221
  return {
224
- isMediaLibraryEnabled: r,
225
- allAcceptedMimeTypes: o,
226
- allAcceptedInputString: s,
227
- restrictsMimeTypes: c,
228
- maxFileSize: i,
229
- availableCategories: a,
222
+ isMediaLibraryEnabled: i,
223
+ allAcceptedMimeTypes: s,
224
+ allAcceptedInputString: c,
225
+ restrictsMimeTypes: l,
226
+ maxFileSize: a,
227
+ availableCategories: o,
230
228
  isAcceptedMimeType: u,
231
229
  isAcceptedFile: d,
232
230
  isImageMimeType: f,
233
- getCategoryForMimeType: p
231
+ getCategoryForMimeType: m
234
232
  };
235
233
  }
236
234
  //#endregion
237
235
  //#region ../media-library/src/composables/useFocusTrap.ts
238
236
  var ge = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
239
237
  function _e(e, t) {
240
- let n = null, r = null, a = null;
241
- function o(e) {
238
+ let n = null, r = null, i = null;
239
+ function a(e) {
242
240
  if (!e) return document;
243
241
  let t = e.getRootNode();
244
242
  return t && "activeElement" in t ? t : document;
245
243
  }
246
- function s() {
244
+ function o() {
247
245
  return e.value ? Array.from(e.value.querySelectorAll(ge)).filter((e) => e.offsetParent !== null) : [];
248
246
  }
249
- function l(t) {
247
+ function s(t) {
250
248
  if (t.key !== "Tab") return;
251
- let n = s();
249
+ let n = o();
252
250
  if (n.length === 0) return;
253
- let r = n[0], i = n[n.length - 1], a = o(e.value).activeElement;
254
- t.shiftKey ? a === r && (t.preventDefault(), i.focus()) : a === i && (t.preventDefault(), r.focus());
255
- }
256
- function u() {
257
- let t = r !== null || a !== null;
258
- t && d({ restoreFocus: !1 }), t || (n = o(e.value).activeElement), a = requestAnimationFrame(() => {
259
- a = null;
260
- let t = s();
251
+ let r = n[0], i = n[n.length - 1], s = a(e.value).activeElement;
252
+ t.shiftKey ? s === r && (t.preventDefault(), i.focus()) : s === i && (t.preventDefault(), r.focus());
253
+ }
254
+ function c() {
255
+ let t = r !== null || i !== null;
256
+ t && l({ restoreFocus: !1 }), t || (n = a(e.value).activeElement), i = requestAnimationFrame(() => {
257
+ i = null;
258
+ let t = o();
261
259
  t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
262
- }), r = P(e, "keydown", l);
260
+ }), r = P(e, "keydown", s);
263
261
  }
264
- function d(e = {}) {
262
+ function l(e = {}) {
265
263
  let t = e.restoreFocus !== !1;
266
- a !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(a), a = null), r?.(), r = null, t && n && n.focus && (n.focus(), n = null);
264
+ i !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(i), i = null), r?.(), r = null, t && n && n.focus && (n.focus(), n = null);
267
265
  }
268
- let f = c([t, e], ([e, t]) => {
269
- e && t ? u() : d();
266
+ let d = O([t, e], ([e, t]) => {
267
+ e && t ? c() : l();
270
268
  }, { flush: "post" });
271
- i(() => {
272
- f(), d();
269
+ u(() => {
270
+ d(), l();
273
271
  });
274
272
  }
275
273
  //#endregion
@@ -281,18 +279,18 @@ var ve = {
281
279
  }, ye = ["onClick"], be = {
282
280
  key: 1,
283
281
  style: { color: "var(--tpl-text)" }
284
- }, xe = /* @__PURE__ */ O({
282
+ }, xe = /* @__PURE__ */ D({
285
283
  __name: "MediaBreadcrumb",
286
284
  props: {
287
285
  folders: {},
288
286
  currentFolderId: {}
289
287
  },
290
288
  emits: ["navigate"],
291
- setup(t, { emit: n }) {
292
- let r = t, i = n, { t: a } = Z(), s = T(() => {
293
- if (!r.currentFolderId) return [];
289
+ setup(e, { emit: t }) {
290
+ let n = e, r = t, { t: i } = Q(), s = p(() => {
291
+ if (!n.currentFolderId) return [];
294
292
  let e = [];
295
- return c(r.folders, r.currentFolderId, e), e;
293
+ return c(n.folders, n.currentFolderId, e), e;
296
294
  });
297
295
  function c(e, t, n) {
298
296
  for (let r of e) {
@@ -301,19 +299,19 @@ var ve = {
301
299
  }
302
300
  return !1;
303
301
  }
304
- return (t, n) => s.value.length > 0 ? (e(), h("div", ve, [m("button", {
302
+ return (e, t) => s.value.length > 0 ? (v(), h("div", ve, [b("button", {
305
303
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
306
304
  style: { color: "var(--tpl-primary)" },
307
- onClick: n[0] ||= (e) => i("navigate", null)
308
- }, b(p(a).mediaLibrary.allFiles), 1), (e(!0), h(C, null, o(s.value, (t, n) => (e(), h(C, { key: t.id }, [g(p(te), {
305
+ 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), {
309
307
  size: 12,
310
308
  "stroke-width": 2
311
- }), n < s.value.length - 1 ? (e(), h("button", {
309
+ }), t < s.value.length - 1 ? (v(), h("button", {
312
310
  key: 0,
313
311
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
314
312
  style: { color: "var(--tpl-primary)" },
315
- onClick: (e) => i("navigate", t.id)
316
- }, b(t.name), 9, ye)) : (e(), h("span", be, b(t.name), 1))], 64))), 128))])) : D("", !0);
313
+ onClick: (t) => r("navigate", e.id)
314
+ }, a(e.name), 9, ye)) : (v(), h("span", be, a(e.name), 1))], 64))), 128))])) : m("", !0);
317
315
  }
318
316
  }), Se = ["aria-expanded", "aria-label"], Ce = {
319
317
  key: 1,
@@ -321,7 +319,7 @@ var ve = {
321
319
  }, we = {
322
320
  key: 0,
323
321
  class: "tpl:truncate"
324
- }, Te = ["onKeydown"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = ["title", "aria-label"], ke = { key: 0 }, Ae = ["placeholder", "onKeydown"], je = /* @__PURE__ */ O({
322
+ }, Te = ["onKeydown"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = ["title", "aria-label"], ke = { key: 0 }, Ae = ["placeholder", "onKeydown"], je = /* @__PURE__ */ D({
325
323
  __name: "MediaFolderTreeNode",
326
324
  props: {
327
325
  folder: {},
@@ -337,76 +335,76 @@ var ve = {
337
335
  "renameFolder",
338
336
  "deleteFolder"
339
337
  ],
340
- setup(n, { emit: r }) {
341
- let i = n, a = r, { t: c } = Z(), l = d(!1), f = d(!1), _ = d(""), v = d(!1), y = d(""), w = d(!1), E = T(() => i.folder.children.length > 0), O = T(() => i.depth < 4), M = T(() => i.currentFolderId === i.folder.id), N = T(() => i.currentFolderId ? F(i.folder.children, i.currentFolderId) : !1), P = T(() => l.value || N.value);
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);
342
340
  function F(e, t) {
343
341
  for (let n of e) if (n.id === t || F(n.children, t)) return !0;
344
342
  return !1;
345
343
  }
346
344
  function I() {
347
- l.value = !l.value;
345
+ f.value = !f.value;
348
346
  }
349
- function L() {
350
- f.value = !0, _.value = i.folder.name;
347
+ function ee() {
348
+ g.value = !0, _.value = s.folder.name;
351
349
  }
352
- function R() {
350
+ function L() {
353
351
  let e = _.value.trim();
354
- e && e !== i.folder.name && a("renameFolder", i.folder.id, e), f.value = !1, _.value = "";
352
+ e && e !== s.folder.name && l("renameFolder", s.folder.id, e), g.value = !1, _.value = "";
355
353
  }
356
- function ee() {
357
- f.value = !1, _.value = "";
354
+ function R() {
355
+ g.value = !1, _.value = "";
358
356
  }
359
357
  function z() {
360
- v.value = !0, y.value = "", l.value = !0;
358
+ x.value = !0, C.value = "", f.value = !0;
361
359
  }
362
360
  function B() {
363
- y.value.trim() && a("createFolder", y.value.trim(), i.folder.id), v.value = !1, y.value = "";
361
+ C.value.trim() && l("createFolder", C.value.trim(), s.folder.id), x.value = !1, C.value = "";
364
362
  }
365
363
  function ne() {
366
- v.value = !1, y.value = "";
364
+ x.value = !1, C.value = "";
367
365
  }
368
366
  function re() {
369
- w.value ? (a("deleteFolder", i.folder.id), w.value = !1) : w.value = !0;
367
+ E.value ? (l("deleteFolder", s.folder.id), E.value = !1) : E.value = !0;
370
368
  }
371
369
  function ie(e) {
372
370
  let t = e.relatedTarget;
373
- t && e.currentTarget.contains(t) || (w.value = !1);
371
+ t && e.currentTarget.contains(t) || (E.value = !1);
374
372
  }
375
- return (r, i) => {
376
- let l = s("MediaFolderTreeNode", !0);
377
- return e(), h("div", null, [m("div", {
373
+ return (i, s) => {
374
+ let c = n("MediaFolderTreeNode", !0);
375
+ return v(), h("div", null, [b("div", {
378
376
  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",
379
- style: t({
380
- paddingLeft: `${n.depth * 16 + 8}px`,
377
+ style: y({
378
+ paddingLeft: `${t.depth * 16 + 8}px`,
381
379
  backgroundColor: M.value ? "var(--tpl-bg-active)" : "transparent",
382
380
  color: M.value ? "var(--tpl-primary)" : "var(--tpl-text)"
383
381
  }),
384
382
  onFocusout: ie
385
383
  }, [
386
- E.value || v.value ? (e(), h("button", {
384
+ D.value || x.value ? (v(), h("button", {
387
385
  key: 0,
388
386
  type: "button",
389
387
  class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
390
388
  "aria-expanded": P.value,
391
- "aria-label": P.value ? p(c).mediaLibrary.collapseFolder : p(c).mediaLibrary.expandFolder,
389
+ "aria-label": P.value ? S(u).mediaLibrary.collapseFolder : S(u).mediaLibrary.expandFolder,
392
390
  onClick: A(I, ["stop"])
393
- }, [g(p(te), {
394
- class: x(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
391
+ }, [d(S(te), {
392
+ class: e(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
395
393
  size: 10,
396
394
  "stroke-width": 2
397
- }, null, 8, ["class"])], 8, Se)) : (e(), h("span", Ce)),
398
- m("button", {
395
+ }, null, 8, ["class"])], 8, Se)) : (v(), h("span", Ce)),
396
+ b("button", {
399
397
  type: "button",
400
398
  class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
401
- onClick: i[0] ||= (e) => a("navigate", n.folder.id)
402
- }, [g(p(K), {
399
+ onClick: s[0] ||= (e) => l("navigate", t.folder.id)
400
+ }, [d(S(q), {
403
401
  class: "tpl:shrink-0",
404
402
  size: 14,
405
403
  "stroke-width": 1.5
406
- }), f.value ? D("", !0) : (e(), h("span", we, b(n.folder.name), 1))]),
407
- f.value ? u((e(), h("input", {
404
+ }), g.value ? m("", !0) : (v(), h("span", we, a(t.folder.name), 1))]),
405
+ g.value ? r((v(), h("input", {
408
406
  key: 2,
409
- "onUpdate:modelValue": i[1] ||= (e) => _.value = e,
407
+ "onUpdate:modelValue": s[1] ||= (e) => _.value = e,
410
408
  type: "text",
411
409
  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",
412
410
  style: {
@@ -415,62 +413,62 @@ var ve = {
415
413
  color: "var(--tpl-text)"
416
414
  },
417
415
  autofocus: "",
418
- onKeydown: [j(R, ["enter"]), j(A(ee, ["stop"]), ["escape"])],
419
- onBlur: R,
420
- onClick: i[2] ||= A(() => {}, ["stop"])
421
- }, null, 40, Te)), [[k, _.value]]) : D("", !0),
422
- f.value ? D("", !0) : (e(), h("span", {
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", {
423
421
  key: 3,
424
- class: x(["tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:transition-opacity", M.value || w.value ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100"])
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"])
425
423
  }, [
426
- O.value && n.canCreateFolder ? (e(), h("button", {
424
+ O.value && t.canCreateFolder ? (v(), h("button", {
427
425
  key: 0,
428
426
  type: "button",
429
427
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
430
- title: p(c).mediaLibrary.addSubfolder,
431
- "aria-label": p(c).mediaLibrary.addSubfolder,
428
+ title: S(u).mediaLibrary.addSubfolder,
429
+ "aria-label": S(u).mediaLibrary.addSubfolder,
432
430
  onClick: A(z, ["stop"])
433
- }, [g(p(ae), {
431
+ }, [d(S(U), {
434
432
  size: 12,
435
433
  "stroke-width": 2
436
- })], 8, Ee)) : D("", !0),
437
- n.canRenameFolder ? (e(), h("button", {
434
+ })], 8, Ee)) : m("", !0),
435
+ t.canRenameFolder ? (v(), h("button", {
438
436
  key: 1,
439
437
  type: "button",
440
438
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
441
- title: p(c).mediaLibrary.renameFolder,
442
- "aria-label": p(c).mediaLibrary.renameFolder,
443
- onClick: A(L, ["stop"])
444
- }, [g(p(H), {
439
+ title: S(u).mediaLibrary.renameFolder,
440
+ "aria-label": S(u).mediaLibrary.renameFolder,
441
+ onClick: A(ee, ["stop"])
442
+ }, [d(S(H), {
445
443
  size: 12,
446
444
  "stroke-width": 2
447
- })], 8, De)) : D("", !0),
448
- n.canDeleteFolder ? (e(), h("button", {
445
+ })], 8, De)) : m("", !0),
446
+ t.canDeleteFolder ? (v(), h("button", {
449
447
  key: 2,
450
448
  type: "button",
451
449
  "data-testid": "media-folder-delete",
452
450
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
453
- title: w.value ? p(c).mediaLibrary.deleteFolderConfirm : p(c).mediaLibrary.deleteFolder,
454
- "aria-label": w.value ? p(c).mediaLibrary.deleteFolderConfirm : p(c).mediaLibrary.deleteFolder,
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,
455
453
  onClick: A(re, ["stop"])
456
- }, [g(p(se), {
454
+ }, [d(S(se), {
457
455
  size: 12,
458
456
  "stroke-width": 2,
459
457
  style: { color: "var(--tpl-danger)" }
460
- })], 8, Oe)) : D("", !0)
458
+ })], 8, Oe)) : m("", !0)
461
459
  ], 2))
462
- ], 36), P.value ? (e(), h("div", ke, [(e(!0), h(C, null, o(n.folder.children, (t) => (e(), S(l, {
463
- key: t.id,
464
- folder: t,
465
- "current-folder-id": n.currentFolderId,
466
- depth: n.depth + 1,
467
- "can-create-folder": n.canCreateFolder,
468
- "can-rename-folder": n.canRenameFolder,
469
- "can-delete-folder": n.canDeleteFolder,
470
- onNavigate: i[3] ||= (e) => a("navigate", e),
471
- onCreateFolder: i[4] ||= (e, t) => a("createFolder", e, t),
472
- onRenameFolder: i[5] ||= (e, t) => a("renameFolder", e, t),
473
- onDeleteFolder: i[6] ||= (e) => a("deleteFolder", e)
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)
474
472
  }, null, 8, [
475
473
  "folder",
476
474
  "current-folder-id",
@@ -478,12 +476,12 @@ var ve = {
478
476
  "can-create-folder",
479
477
  "can-rename-folder",
480
478
  "can-delete-folder"
481
- ]))), 128)), v.value ? (e(), h("div", {
479
+ ]))), 128)), x.value ? (v(), h("div", {
482
480
  key: 0,
483
- style: t({ paddingLeft: `${(n.depth + 1) * 16 + 8}px` }),
481
+ style: y({ paddingLeft: `${(t.depth + 1) * 16 + 8}px` }),
484
482
  class: "tpl:py-1.5 tpl:pr-2"
485
- }, [u(m("input", {
486
- "onUpdate:modelValue": i[7] ||= (e) => y.value = e,
483
+ }, [r(b("input", {
484
+ "onUpdate:modelValue": s[7] ||= (e) => C.value = e,
487
485
  type: "text",
488
486
  class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
489
487
  style: {
@@ -491,11 +489,11 @@ var ve = {
491
489
  "background-color": "var(--tpl-bg)",
492
490
  color: "var(--tpl-text)"
493
491
  },
494
- placeholder: p(c).mediaLibrary.subfolderName,
492
+ placeholder: S(u).mediaLibrary.subfolderName,
495
493
  autofocus: "",
496
494
  onKeydown: [j(B, ["enter"]), j(A(ne, ["stop"]), ["escape"])],
497
495
  onBlur: B
498
- }, null, 40, Ae), [[k, y.value]])], 4)) : D("", !0)])) : D("", !0)]);
496
+ }, null, 40, Ae), [[k, C.value]])], 4)) : m("", !0)])) : m("", !0)]);
499
497
  };
500
498
  }
501
499
  }), Me = {
@@ -504,7 +502,7 @@ var ve = {
504
502
  }, Ne = {
505
503
  key: 0,
506
504
  class: "tpl:px-3 tpl:py-2"
507
- }, Pe = ["placeholder", "onKeydown"], Fe = /* @__PURE__ */ O({
505
+ }, Pe = ["placeholder", "onKeydown"], Fe = /* @__PURE__ */ D({
508
506
  __name: "MediaFolderTree",
509
507
  props: {
510
508
  folders: {},
@@ -522,41 +520,41 @@ var ve = {
522
520
  "deleteFolder",
523
521
  "showFrequentlyUsed"
524
522
  ],
525
- setup(n, { emit: r }) {
526
- let i = r, { t: a } = Z(), s = d(!1), c = d("");
527
- function l() {
528
- s.value = !0, c.value = "";
523
+ 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 = "";
529
527
  }
530
528
  function f() {
531
- c.value.trim() && i("createFolder", c.value.trim()), s.value = !1, c.value = "";
529
+ l.value.trim() && n("createFolder", l.value.trim()), s.value = !1, l.value = "";
532
530
  }
533
- function v() {
534
- s.value = !1, c.value = "";
531
+ function p() {
532
+ s.value = !1, l.value = "";
535
533
  }
536
- return (r, d) => (e(), h("div", Me, [
537
- m("button", {
534
+ return (t, c) => (v(), h("div", Me, [
535
+ b("button", {
538
536
  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",
539
- style: t({
540
- backgroundColor: n.viewMode === "files" && n.currentFolderId === null ? "var(--tpl-bg-active)" : "transparent",
541
- color: n.viewMode === "files" && n.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
537
+ style: y({
538
+ backgroundColor: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-bg-active)" : "transparent",
539
+ color: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
542
540
  }),
543
- onClick: d[0] ||= (e) => i("navigate", null)
544
- }, [g(p(G), {
541
+ onClick: c[0] ||= (e) => n("navigate", null)
542
+ }, [d(S(K), {
545
543
  size: 14,
546
544
  "stroke-width": 1.5
547
- }), _(" " + b(p(a).mediaLibrary.allFiles), 1)], 4),
548
- (e(!0), h(C, null, o(n.folders, (t) => (e(), S(je, {
545
+ }), g(" " + a(S(i).mediaLibrary.allFiles), 1)], 4),
546
+ (v(!0), h(w, null, o(e.folders, (t) => (v(), T(je, {
549
547
  key: t.id,
550
548
  folder: t,
551
- "current-folder-id": n.currentFolderId,
549
+ "current-folder-id": e.currentFolderId,
552
550
  depth: 0,
553
- "can-create-folder": n.canCreateFolder,
554
- "can-rename-folder": n.canRenameFolder,
555
- "can-delete-folder": n.canDeleteFolder,
556
- onNavigate: d[1] ||= (e) => i("navigate", e),
557
- onCreateFolder: d[2] ||= (e, t) => i("createFolder", e, t),
558
- onRenameFolder: d[3] ||= (e, t) => i("renameFolder", e, t),
559
- onDeleteFolder: d[4] ||= (e) => i("deleteFolder", e)
551
+ "can-create-folder": e.canCreateFolder,
552
+ "can-rename-folder": e.canRenameFolder,
553
+ "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)
560
558
  }, null, 8, [
561
559
  "folder",
562
560
  "current-folder-id",
@@ -564,8 +562,8 @@ var ve = {
564
562
  "can-rename-folder",
565
563
  "can-delete-folder"
566
564
  ]))), 128)),
567
- s.value ? (e(), h("div", Ne, [u(m("input", {
568
- "onUpdate:modelValue": d[5] ||= (e) => c.value = e,
565
+ s.value ? (v(), h("div", Ne, [r(b("input", {
566
+ "onUpdate:modelValue": c[5] ||= (e) => l.value = e,
569
567
  type: "text",
570
568
  class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
571
569
  style: {
@@ -573,42 +571,42 @@ var ve = {
573
571
  "background-color": "var(--tpl-bg)",
574
572
  color: "var(--tpl-text)"
575
573
  },
576
- placeholder: p(a).mediaLibrary.folderName,
574
+ placeholder: S(i).mediaLibrary.folderName,
577
575
  autofocus: "",
578
- onKeydown: [j(f, ["enter"]), j(A(v, ["stop"]), ["escape"])],
576
+ onKeydown: [j(f, ["enter"]), j(A(p, ["stop"]), ["escape"])],
579
577
  onBlur: f
580
- }, null, 40, Pe), [[k, c.value]])])) : D("", !0),
581
- !s.value && n.canCreateFolder ? (e(), h("button", {
578
+ }, null, 40, Pe), [[k, l.value]])])) : m("", !0),
579
+ !s.value && e.canCreateFolder ? (v(), h("button", {
582
580
  key: 1,
583
581
  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",
584
582
  style: { color: "var(--tpl-text-muted)" },
585
- onClick: l
586
- }, [g(p(ae), {
583
+ onClick: u
584
+ }, [d(S(U), {
587
585
  size: 14,
588
586
  "stroke-width": 1.5
589
- }), _(" " + b(p(a).mediaLibrary.newFolder), 1)])) : D("", !0),
590
- d[7] ||= m("div", { class: "tpl:flex-1" }, null, -1),
591
- n.hasFrequentlyUsed ? (e(), h("button", {
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", {
592
590
  key: 2,
593
591
  "data-testid": "media-frequently-used",
594
592
  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",
595
- style: t({
593
+ style: y({
596
594
  borderColor: "var(--tpl-border)",
597
- backgroundColor: n.viewMode === "frequently-used" ? "var(--tpl-bg-active)" : "transparent",
598
- color: n.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
595
+ backgroundColor: e.viewMode === "frequently-used" ? "var(--tpl-bg-active)" : "transparent",
596
+ color: e.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
599
597
  }),
600
- onClick: d[6] ||= (e) => i("showFrequentlyUsed")
601
- }, [g(p(de), {
598
+ onClick: c[6] ||= (e) => n("showFrequentlyUsed")
599
+ }, [d(S(ue), {
602
600
  size: 14,
603
601
  "stroke-width": 1.5
604
- }), _(" " + b(p(a).mediaLibrary.frequentlyUsed), 1)], 4)) : D("", !0)
602
+ }), g(" " + a(S(i).mediaLibrary.frequentlyUsed), 1)], 4)) : m("", !0)
605
603
  ]));
606
604
  }
607
- }), Ie = /* @__PURE__ */ O({
605
+ }), Ie = /* @__PURE__ */ D({
608
606
  __name: "MediaFileIcon",
609
607
  props: { mimeType: {} },
610
- setup(n) {
611
- let r = n, i = {
608
+ setup(e) {
609
+ let t = e, n = {
612
610
  "application/pdf": {
613
611
  label: "PDF",
614
612
  color: "var(--tpl-danger)",
@@ -699,16 +697,16 @@ var ve = {
699
697
  bgColor: "var(--tpl-secondary-light)",
700
698
  icon: "audio"
701
699
  }
702
- }, a = {
700
+ }, r = {
703
701
  label: "FILE",
704
702
  color: "var(--tpl-text-muted)",
705
703
  bgColor: "var(--tpl-bg-hover)",
706
704
  icon: "document"
707
- }, o = T(() => i[r.mimeType] ?? a);
708
- return (n, r) => (e(), h("div", {
705
+ }, i = p(() => n[t.mimeType] ?? r);
706
+ return (e, t) => (v(), h("div", {
709
707
  class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2",
710
- style: t({ backgroundColor: o.value.bgColor })
711
- }, [o.value.icon === "document" ? (e(), h("svg", {
708
+ style: y({ backgroundColor: i.value.bgColor })
709
+ }, [i.value.icon === "document" ? (v(), h("svg", {
712
710
  key: 0,
713
711
  width: "60",
714
712
  height: "60",
@@ -716,23 +714,23 @@ var ve = {
716
714
  fill: "none",
717
715
  stroke: "currentColor",
718
716
  "stroke-width": "1.5",
719
- style: t({ color: o.value.color })
720
- }, [...r[0] ||= [
721
- m("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
722
- m("polyline", { points: "14 2 14 8 20 8" }, null, -1),
723
- m("line", {
717
+ style: y({ color: i.value.color })
718
+ }, [...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", {
724
722
  x1: "8",
725
723
  y1: "13",
726
724
  x2: "16",
727
725
  y2: "13"
728
726
  }, null, -1),
729
- m("line", {
727
+ b("line", {
730
728
  x1: "8",
731
729
  y1: "17",
732
730
  x2: "12",
733
731
  y2: "17"
734
732
  }, null, -1)
735
- ]], 4)) : o.value.icon === "video" ? (e(), h("svg", {
733
+ ]], 4)) : i.value.icon === "video" ? (v(), h("svg", {
736
734
  key: 1,
737
735
  width: "40",
738
736
  height: "40",
@@ -740,18 +738,18 @@ var ve = {
740
738
  fill: "none",
741
739
  stroke: "currentColor",
742
740
  "stroke-width": "1.5",
743
- style: t({ color: o.value.color })
744
- }, [...r[1] ||= [m("rect", {
741
+ style: y({ color: i.value.color })
742
+ }, [...t[1] ||= [b("rect", {
745
743
  x: "2",
746
744
  y: "4",
747
745
  width: "20",
748
746
  height: "16",
749
747
  rx: "2"
750
- }, null, -1), m("polygon", {
748
+ }, null, -1), b("polygon", {
751
749
  points: "10,8 16,12 10,16",
752
750
  fill: "currentColor",
753
751
  stroke: "none"
754
- }, null, -1)]], 4)) : (e(), h("svg", {
752
+ }, null, -1)]], 4)) : (v(), h("svg", {
755
753
  key: 2,
756
754
  width: "40",
757
755
  height: "40",
@@ -759,23 +757,23 @@ var ve = {
759
757
  fill: "none",
760
758
  stroke: "currentColor",
761
759
  "stroke-width": "1.5",
762
- style: t({ color: o.value.color })
763
- }, [...r[2] ||= [
764
- m("path", { d: "M9 18V5l12-2v13" }, null, -1),
765
- m("circle", {
760
+ style: y({ color: i.value.color })
761
+ }, [...t[2] ||= [
762
+ b("path", { d: "M9 18V5l12-2v13" }, null, -1),
763
+ b("circle", {
766
764
  cx: "6",
767
765
  cy: "18",
768
766
  r: "3"
769
767
  }, null, -1),
770
- m("circle", {
768
+ b("circle", {
771
769
  cx: "18",
772
770
  cy: "16",
773
771
  r: "3"
774
772
  }, null, -1)
775
- ]], 4)), m("span", {
773
+ ]], 4)), b("span", {
776
774
  class: "tpl:text-xs tpl:font-bold tpl:tracking-wider",
777
- style: t({ color: o.value.color })
778
- }, b(o.value.label), 5)], 4));
775
+ style: y({ color: i.value.color })
776
+ }, a(i.value.label), 5)], 4));
779
777
  }
780
778
  });
781
779
  //#endregion
@@ -878,7 +876,7 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
878
876
  }, ft = {
879
877
  key: 4,
880
878
  class: "tpl:flex tpl:justify-center tpl:py-4"
881
- }, pt = /*#__PURE__*/ W(/* @__PURE__ */ O({
879
+ }, pt = /*#__PURE__*/ G(/* @__PURE__ */ D({
882
880
  __name: "MediaGrid",
883
881
  props: {
884
882
  items: {},
@@ -900,30 +898,30 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
900
898
  "confirm"
901
899
  ],
902
900
  setup(n, { emit: r }) {
903
- let i = n, a = r, { isAcceptedMimeType: s, isImageMimeType: c } = Q();
904
- function u(e) {
901
+ let i = n, s = r, { isAcceptedMimeType: l, isImageMimeType: u } = he();
902
+ function f(e) {
905
903
  return e.mimeType ?? "";
906
904
  }
907
- function f(e) {
905
+ function p(e) {
908
906
  return e.thumbnailUrl ?? e.url;
909
907
  }
910
- function v(e) {
911
- return !i.accept || i.accept.length === 0 || s(u(e), i.accept);
908
+ function _(e) {
909
+ return !i.accept || i.accept.length === 0 || l(f(e), i.accept);
912
910
  }
913
- function y(e) {
911
+ function x(e) {
914
912
  return i.canUpdate === !0 && e.canUpdate !== !1;
915
913
  }
916
- function w(e) {
914
+ function C(e) {
917
915
  return i.canReplace === !0 && e.canUpdate !== !1;
918
916
  }
919
- function T(e, t) {
920
- t.metaKey || t.ctrlKey ? a("toggle", e.id) : a("select", e);
917
+ function E(e, t) {
918
+ t.metaKey || t.ctrlKey ? s("toggle", e.id) : s("select", e);
921
919
  }
922
- function E(e) {
923
- v(e) && a("confirm", e);
920
+ function D(e) {
921
+ _(e) && s("confirm", e);
924
922
  }
925
923
  function O(e, t) {
926
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), a("select", e));
924
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), s("select", e));
927
925
  }
928
926
  function k(e) {
929
927
  return i.selectedIds.has(e.id);
@@ -931,9 +929,9 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
931
929
  function j(e) {
932
930
  return k(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
933
931
  }
934
- let { t: M } = Z(), N = l(X, null), P = d(null);
935
- R(P, ([{ isIntersecting: e }]) => {
936
- e && i.hasMore && !i.isLoading && a("loadMore");
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");
937
935
  }, { threshold: .1 });
938
936
  function F(e) {
939
937
  return Le(e, N?.value, {
@@ -942,123 +940,123 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
942
940
  day: "numeric"
943
941
  });
944
942
  }
945
- return (r, i) => (e(), h("div", ze, [
946
- n.isLoading && n.items.length === 0 ? (e(), h("div", {
943
+ return (t, r) => (v(), h("div", ze, [
944
+ n.isLoading && n.items.length === 0 ? (v(), h("div", {
947
945
  key: 0,
948
946
  role: "status",
949
947
  "aria-busy": "true",
950
- "aria-label": p(M).mediaLibrary.loading,
951
- class: x(n.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
952
- }, [(e(), h(C, null, o(8, (e) => m("div", {
953
- key: e,
954
- class: x(["tpl-pulse tpl:rounded-lg", n.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
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", {
951
+ key: t,
952
+ class: e(["tpl-pulse tpl:rounded-lg", n.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
955
953
  style: { "background-color": "var(--tpl-bg-hover)" },
956
954
  "aria-hidden": "true"
957
- }, null, 2)), 64))], 10, Be)) : n.items.length === 0 ? (e(), h("div", Ve, [g(p(G), {
955
+ }, null, 2)), 64))], 10, Be)) : n.items.length === 0 ? (v(), h("div", Ve, [d(S(K), {
958
956
  class: "tpl:mb-3",
959
957
  size: 40,
960
958
  "stroke-width": 1,
961
959
  style: { color: "var(--tpl-text-dim)" }
962
- }), m("p", He, b(n.searchQuery ? p(M).mediaLibrary.noSearchResults : p(M).mediaLibrary.noFiles), 1)])) : n.layout === "list" ? (e(), h("div", {
960
+ }), b("p", He, a(n.searchQuery ? S(M).mediaLibrary.noSearchResults : S(M).mediaLibrary.noFiles), 1)])) : n.layout === "list" ? (v(), h("div", {
963
961
  key: 3,
964
962
  role: "listbox",
965
- "aria-label": p(M).mediaLibrary.filesListAriaLabel,
963
+ "aria-label": S(M).mediaLibrary.filesListAriaLabel,
966
964
  "aria-multiselectable": "true",
967
965
  class: "tpl:flex tpl:flex-col tpl:gap-1"
968
- }, [(e(!0), h(C, null, o(n.items, (n) => (e(), h("div", {
969
- key: n.id,
966
+ }, [(v(!0), h(w, null, o(n.items, (t) => (v(), h("div", {
967
+ key: t.id,
970
968
  role: "option",
971
969
  tabindex: "0",
972
970
  "data-testid": "media-library-item",
973
- class: x(["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", [!v(n) && !k(n) ? "tpl:opacity-60" : ""]]),
974
- "data-media-id": n.id,
975
- "aria-selected": k(n),
976
- "aria-label": n.filename || n.url,
977
- style: t({ backgroundColor: k(n) ? "var(--tpl-bg-hover)" : "transparent" }),
978
- onClick: (e) => T(n, e),
979
- onDblclick: (e) => E(n),
980
- onKeydown: (e) => O(n, e)
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)
981
979
  }, [
982
- m("div", rt, [p(c)(u(n)) ? (e(), h("img", {
980
+ b("div", rt, [S(u)(f(t)) ? (v(), h("img", {
983
981
  key: 0,
984
- src: f(n),
985
- alt: n.filename || n.url,
982
+ src: p(t),
983
+ alt: t.filename || t.url,
986
984
  class: "tpl:size-full tpl:object-cover",
987
985
  loading: "lazy"
988
- }, null, 8, it)) : (e(), h("div", at, [g(Ie, { "mime-type": u(n) }, null, 8, ["mime-type"])]))]),
989
- m("div", ot, [m("p", st, b(n.filename || n.url), 1), m("p", ct, [
990
- n.size == null ? D("", !0) : (e(), h(C, { key: 0 }, [_(b(p($)(n.size)), 1)], 64)),
991
- n.createdAt ? (e(), h(C, { key: 1 }, [n.size == null ? D("", !0) : (e(), h(C, { key: 0 }, [_(" · ")], 64)), _(" " + b(F(n.createdAt)), 1)], 64)) : D("", !0),
992
- p(c)(u(n)) && n.width && n.height ? (e(), h(C, { key: 2 }, [_(" · " + b(n.width) + "×" + b(n.height), 1)], 64)) : D("", !0)
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)
993
991
  ])]),
994
- m("div", { class: x(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(n)]) }, [y(n) ? (e(), h("button", {
992
+ b("div", { class: e(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(t)]) }, [x(t) ? (v(), h("button", {
995
993
  key: 0,
996
994
  type: "button",
997
995
  "data-testid": "media-edit",
998
996
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
999
997
  style: { color: "var(--tpl-text-muted)" },
1000
- title: p(M).mediaLibrary.editFile,
1001
- "aria-label": p(M).mediaLibrary.editFile,
1002
- onClick: A((e) => a("edit", n), ["stop"])
1003
- }, [g(p(H), {
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), {
1004
1002
  size: 12,
1005
1003
  "stroke-width": 2
1006
- })], 8, lt)) : D("", !0), w(n) ? (e(), h("button", {
1004
+ })], 8, lt)) : m("", !0), C(t) ? (v(), h("button", {
1007
1005
  key: 1,
1008
1006
  type: "button",
1009
1007
  "data-testid": "media-replace",
1010
1008
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
1011
1009
  style: { color: "var(--tpl-text-muted)" },
1012
- title: p(M).mediaLibrary.replaceFile,
1013
- "aria-label": p(M).mediaLibrary.replaceFile,
1014
- onClick: A((e) => a("replace", n), ["stop"])
1015
- }, [g(p(U), {
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), {
1016
1014
  size: 12,
1017
1015
  "stroke-width": 2
1018
- })], 8, ut)) : D("", !0)], 2),
1019
- k(n) ? (e(), h("div", dt, [g(p(B), {
1016
+ })], 8, ut)) : m("", !0)], 2),
1017
+ k(t) ? (v(), h("div", dt, [d(S(B), {
1020
1018
  size: 12,
1021
1019
  "stroke-width": 3
1022
- })])) : D("", !0)
1023
- ], 46, nt))), 128))], 8, tt)) : (e(), h("div", {
1020
+ })])) : m("", !0)
1021
+ ], 46, nt))), 128))], 8, tt)) : (v(), h("div", {
1024
1022
  key: 2,
1025
1023
  role: "listbox",
1026
- "aria-label": p(M).mediaLibrary.filesListAriaLabel,
1024
+ "aria-label": S(M).mediaLibrary.filesListAriaLabel,
1027
1025
  "aria-multiselectable": "true",
1028
1026
  class: "tpl:grid tpl:grid-cols-4 tpl:gap-3"
1029
- }, [(e(!0), h(C, null, o(n.items, (n) => (e(), h("div", {
1030
- key: n.id,
1027
+ }, [(v(!0), h(w, null, o(n.items, (t) => (v(), h("div", {
1028
+ key: t.id,
1031
1029
  role: "option",
1032
1030
  tabindex: "0",
1033
1031
  "data-testid": "media-library-item",
1034
- class: x(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
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", [
1035
1033
  "tpl:cursor-pointer",
1036
- !v(n) && !k(n) ? "tpl:opacity-60" : "",
1037
- k(n) ? "tpl-media-item--selected" : ""
1034
+ !_(t) && !k(t) ? "tpl:opacity-60" : "",
1035
+ k(t) ? "tpl-media-item--selected" : ""
1038
1036
  ]]),
1039
- "data-media-id": n.id,
1040
- "aria-selected": k(n),
1041
- "aria-label": n.filename || n.url,
1042
- style: t({
1043
- borderColor: k(n) ? "var(--tpl-primary)" : "transparent",
1044
- backgroundColor: !v(n) && !k(n) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
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)"
1045
1043
  }),
1046
- onClick: (e) => T(n, e),
1047
- onDblclick: (e) => E(n),
1048
- onKeydown: (e) => O(n, e)
1044
+ onClick: (e) => E(t, e),
1045
+ onDblclick: (e) => D(t),
1046
+ onKeydown: (e) => O(t, e)
1049
1047
  }, [
1050
- m("div", Ge, [p(c)(u(n)) ? (e(), h("img", {
1048
+ b("div", Ge, [S(u)(f(t)) ? (v(), h("img", {
1051
1049
  key: 0,
1052
- src: f(n),
1053
- alt: n.filename || n.url,
1050
+ src: p(t),
1051
+ alt: t.filename || t.url,
1054
1052
  class: "tpl:size-full tpl:object-cover",
1055
1053
  loading: "lazy"
1056
- }, null, 8, Ke)) : (e(), S(Ie, {
1054
+ }, null, 8, Ke)) : (v(), T(Ie, {
1057
1055
  key: 1,
1058
- "mime-type": u(n)
1056
+ "mime-type": f(t)
1059
1057
  }, null, 8, ["mime-type"]))]),
1060
- m("div", qe, [m("p", Je, b(n.filename || n.url), 1), m("p", Ye, [n.size == null ? D("", !0) : (e(), h("span", Xe, b(p($)(n.size)), 1)), p(c)(u(n)) && n.width && n.height ? (e(), h("span", Ze, b(n.width) + "×" + b(n.height), 1)) : D("", !0)])]),
1061
- m("div", { class: x(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(n)]) }, [y(n) ? (e(), h("button", {
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", {
1062
1060
  key: 0,
1063
1061
  type: "button",
1064
1062
  "data-testid": "media-edit",
@@ -1067,13 +1065,13 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1067
1065
  "background-color": "var(--tpl-overlay)",
1068
1066
  color: "var(--tpl-on-primary)"
1069
1067
  },
1070
- title: p(M).mediaLibrary.editFile,
1071
- "aria-label": p(M).mediaLibrary.editFile,
1072
- onClick: A((e) => a("edit", n), ["stop"])
1073
- }, [g(p(H), {
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), {
1074
1072
  size: 11,
1075
1073
  "stroke-width": 2
1076
- })], 8, Qe)) : D("", !0), w(n) ? (e(), h("button", {
1074
+ })], 8, Qe)) : m("", !0), C(t) ? (v(), h("button", {
1077
1075
  key: 1,
1078
1076
  type: "button",
1079
1077
  "data-testid": "media-replace",
@@ -1082,29 +1080,29 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1082
1080
  "background-color": "var(--tpl-overlay)",
1083
1081
  color: "var(--tpl-on-primary)"
1084
1082
  },
1085
- title: p(M).mediaLibrary.replaceFile,
1086
- "aria-label": p(M).mediaLibrary.replaceFile,
1087
- onClick: A((e) => a("replace", n), ["stop"])
1088
- }, [g(p(U), {
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), {
1089
1087
  size: 11,
1090
1088
  "stroke-width": 2
1091
- })], 8, $e)) : D("", !0)], 2),
1092
- k(n) ? (e(), h("div", et, [g(p(B), {
1089
+ })], 8, $e)) : m("", !0)], 2),
1090
+ k(t) ? (v(), h("div", et, [d(S(B), {
1093
1091
  size: 12,
1094
1092
  "stroke-width": 3
1095
- })])) : D("", !0)
1093
+ })])) : m("", !0)
1096
1094
  ], 46, We))), 128))], 8, Ue)),
1097
- m("div", {
1095
+ b("div", {
1098
1096
  ref_key: "sentinelRef",
1099
1097
  ref: P,
1100
1098
  class: "tpl:h-4"
1101
1099
  }, null, 512),
1102
- n.isLoading && n.items.length > 0 ? (e(), h("div", ft, [g(p(V), {
1100
+ n.isLoading && n.items.length > 0 ? (v(), h("div", ft, [d(S(V), {
1103
1101
  class: "tpl-spinner",
1104
1102
  size: 20,
1105
1103
  "stroke-width": 2,
1106
1104
  style: { color: "var(--tpl-primary)" }
1107
- })])) : D("", !0)
1105
+ })])) : m("", !0)
1108
1106
  ]));
1109
1107
  }
1110
1108
  }), [["__scopeId", "data-v-57c35946"]]), mt = ["data-tpl-theme"], ht = {
@@ -1126,7 +1124,7 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1126
1124
  }, yt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, bt = ["disabled"], xt = ["disabled"], St = {
1127
1125
  key: 0,
1128
1126
  class: "tpl:flex tpl:items-center tpl:gap-1.5"
1129
- }, Ct = { key: 1 }, wt = /* @__PURE__ */ O({
1127
+ }, Ct = { key: 1 }, wt = /* @__PURE__ */ D({
1130
1128
  __name: "MediaImportUrlModal",
1131
1129
  props: {
1132
1130
  visible: { type: Boolean },
@@ -1134,24 +1132,24 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1134
1132
  error: {}
1135
1133
  },
1136
1134
  emits: ["import", "close"],
1137
- setup(t, { emit: r }) {
1138
- let i = t, a = r, { t: o } = Z(), s = l(Y, null), f = l(J, d(null)), y = d("");
1139
- c(() => i.visible, (e) => {
1140
- e && (y.value = "");
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 = "");
1141
1139
  });
1142
1140
  function C() {
1143
- let e = y.value.trim();
1144
- e && !i.isImporting && a("import", e);
1141
+ let e = x.value.trim();
1142
+ e && !o.isImporting && s("import", e);
1145
1143
  }
1146
1144
  function w() {
1147
- i.isImporting || a("close");
1145
+ o.isImporting || s("close");
1148
1146
  }
1149
- let E = d(null);
1150
- _e(E, T(() => i.visible));
1151
- function O(e) {
1147
+ let E = c(null);
1148
+ _e(E, p(() => o.visible));
1149
+ function D(e) {
1152
1150
  e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), C()), e.key === "Escape" && w();
1153
1151
  }
1154
- return (r, i) => (e(), S(v, { to: p(f) || "body" }, [g(M, {
1152
+ return (t, i) => (v(), T(f, { to: S(y) || "body" }, [d(M, {
1155
1153
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
1156
1154
  "enter-from-class": "tpl:opacity-0",
1157
1155
  "enter-to-class": "tpl:opacity-100",
@@ -1159,14 +1157,14 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1159
1157
  "leave-from-class": "tpl:opacity-100",
1160
1158
  "leave-to-class": "tpl:opacity-0"
1161
1159
  }, {
1162
- default: n(() => [t.visible ? (e(), h("div", {
1160
+ default: l(() => [n.visible ? (v(), h("div", {
1163
1161
  key: 0,
1164
- "data-tpl-theme": p(s),
1165
- class: x([p(f) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
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"]),
1166
1164
  style: { "background-color": "var(--tpl-overlay)" },
1167
1165
  onClick: A(w, ["self"]),
1168
- onKeydown: O
1169
- }, [m("div", {
1166
+ onKeydown: D
1167
+ }, [b("div", {
1170
1168
  ref_key: "dialogRef",
1171
1169
  ref: E,
1172
1170
  role: "dialog",
@@ -1175,47 +1173,47 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1175
1173
  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",
1176
1174
  style: { "background-color": "var(--tpl-bg-elevated)" }
1177
1175
  }, [
1178
- m("h3", ht, b(p(o).mediaLibrary.importFromUrl), 1),
1179
- m("div", gt, [u(m("input", {
1180
- "onUpdate:modelValue": i[0] ||= (e) => y.value = e,
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,
1181
1179
  type: "url",
1182
- "aria-label": p(o).mediaLibrary.importFromUrl,
1183
- "aria-invalid": !!t.error,
1184
- "aria-describedby": t.error ? "tpl-media-import-error" : void 0,
1180
+ "aria-label": S(u).mediaLibrary.importFromUrl,
1181
+ "aria-invalid": !!n.error,
1182
+ "aria-describedby": n.error ? "tpl-media-import-error" : void 0,
1185
1183
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
1186
1184
  style: {
1187
1185
  "border-color": "var(--tpl-border)",
1188
1186
  "background-color": "var(--tpl-bg)",
1189
1187
  color: "var(--tpl-text)"
1190
1188
  },
1191
- placeholder: p(o).mediaLibrary.importUrlPlaceholder,
1192
- disabled: t.isImporting,
1189
+ placeholder: S(u).mediaLibrary.importUrlPlaceholder,
1190
+ disabled: n.isImporting,
1193
1191
  autofocus: ""
1194
- }, null, 8, _t), [[k, y.value]])]),
1195
- t.error ? (e(), h("p", vt, b(t.error), 1)) : D("", !0),
1196
- m("div", yt, [m("button", {
1197
- class: x(["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": t.isImporting }]),
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 }]),
1198
1196
  style: {
1199
1197
  "border-color": "var(--tpl-border)",
1200
1198
  color: "var(--tpl-text)",
1201
1199
  "background-color": "var(--tpl-bg)"
1202
1200
  },
1203
- disabled: t.isImporting,
1201
+ disabled: n.isImporting,
1204
1202
  onClick: w
1205
- }, b(p(o).mediaLibrary.cancel), 11, bt), m("button", {
1203
+ }, a(S(u).mediaLibrary.cancel), 11, bt), b("button", {
1206
1204
  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",
1207
1205
  style: {
1208
1206
  "background-color": "var(--tpl-primary)",
1209
1207
  color: "var(--tpl-on-primary)"
1210
1208
  },
1211
- disabled: !y.value.trim() || t.isImporting,
1209
+ disabled: !x.value.trim() || n.isImporting,
1212
1210
  onClick: C
1213
- }, [t.isImporting ? (e(), h("span", St, [g(p(V), {
1211
+ }, [n.isImporting ? (v(), h("span", St, [d(S(V), {
1214
1212
  class: "tpl:animate-spin",
1215
1213
  size: 12,
1216
1214
  "stroke-width": 2
1217
- }), _(" " + b(p(o).mediaLibrary.importing), 1)])) : (e(), h("span", Ct, b(p(o).mediaLibrary.import), 1))], 8, xt)])
1218
- ], 512)], 42, mt)) : D("", !0)]),
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)]),
1219
1217
  _: 1
1220
1218
  })], 8, ["to"]));
1221
1219
  }
@@ -1223,62 +1221,62 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1223
1221
  key: 0,
1224
1222
  class: "tpl:shrink-0",
1225
1223
  style: { color: "var(--tpl-text-dim)" }
1226
- }, kt = /* @__PURE__ */ O({
1224
+ }, kt = /* @__PURE__ */ D({
1227
1225
  __name: "MediaMovePicker",
1228
1226
  props: {
1229
1227
  folders: {},
1230
1228
  currentFolderId: {}
1231
1229
  },
1232
1230
  emits: ["select", "close"],
1233
- setup(n, { emit: r }) {
1234
- let i = r, { t: a } = Z(), s = d(null);
1235
- function c(e, t = 0) {
1231
+ setup(e, { emit: t }) {
1232
+ let n = t, { t: r } = Q(), i = c(null);
1233
+ function s(e, t = 0) {
1236
1234
  let n = [];
1237
1235
  for (let r of e) n.push({
1238
1236
  id: r.id,
1239
1237
  name: r.name,
1240
1238
  depth: t
1241
- }), r.children.length && n.push(...c(r.children, t + 1));
1239
+ }), r.children.length && n.push(...s(r.children, t + 1));
1242
1240
  return n;
1243
1241
  }
1244
- return ee(s, () => {
1245
- i("close");
1246
- }), (r, l) => (e(), h("div", {
1242
+ return R(i, () => {
1243
+ n("close");
1244
+ }), (t, c) => (v(), h("div", {
1247
1245
  ref_key: "pickerRef",
1248
- ref: s,
1246
+ ref: i,
1249
1247
  "data-testid": "media-move-picker",
1250
1248
  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",
1251
1249
  style: {
1252
1250
  "border-color": "var(--tpl-border)",
1253
1251
  "background-color": "var(--tpl-bg-elevated)"
1254
1252
  }
1255
- }, [m("div", Tt, [n.currentFolderId === null ? D("", !0) : (e(), h("button", {
1253
+ }, [b("div", Tt, [e.currentFolderId === null ? m("", !0) : (v(), h("button", {
1256
1254
  key: 0,
1257
1255
  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",
1258
1256
  style: { color: "var(--tpl-text)" },
1259
- onClick: l[0] ||= (e) => i("select", null)
1260
- }, [g(p(G), {
1257
+ onClick: c[0] ||= (e) => n("select", null)
1258
+ }, [d(S(K), {
1261
1259
  class: "tpl:shrink-0",
1262
1260
  size: 14,
1263
1261
  "stroke-width": 1.5
1264
- }), _(" " + b(p(a).mediaLibrary.moveToRoot), 1)])), (e(!0), h(C, null, o(c(n.folders), (r) => (e(), h("button", {
1265
- key: r.id,
1262
+ }), g(" " + a(S(r).mediaLibrary.moveToRoot), 1)])), (v(!0), h(w, null, o(s(e.folders), (t) => (v(), h("button", {
1263
+ key: t.id,
1266
1264
  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",
1267
- style: t({
1268
- paddingLeft: `${r.depth * 16 + 12}px`,
1269
- color: r.id === n.currentFolderId ? "var(--tpl-text-dim)" : "var(--tpl-text)",
1270
- opacity: r.id === n.currentFolderId ? .5 : 1
1265
+ style: y({
1266
+ paddingLeft: `${t.depth * 16 + 12}px`,
1267
+ color: t.id === e.currentFolderId ? "var(--tpl-text-dim)" : "var(--tpl-text)",
1268
+ opacity: t.id === e.currentFolderId ? .5 : 1
1271
1269
  }),
1272
- disabled: r.id === n.currentFolderId,
1273
- onClick: (e) => i("select", r.id)
1270
+ disabled: t.id === e.currentFolderId,
1271
+ onClick: (e) => n("select", t.id)
1274
1272
  }, [
1275
- g(p(K), {
1273
+ d(S(q), {
1276
1274
  class: "tpl:shrink-0",
1277
1275
  size: 14,
1278
1276
  "stroke-width": 1.5
1279
1277
  }),
1280
- m("span", Dt, b(r.name), 1),
1281
- r.id === n.currentFolderId ? (e(), h("span", Ot, b(p(a).mediaLibrary.currentFolder), 1)) : D("", !0)
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)
1282
1280
  ], 12, Et))), 128))])], 512));
1283
1281
  }
1284
1282
  }), At = { class: "tpl:flex tpl:items-center tpl:gap-3" }, jt = ["src", "alt"], Mt = {
@@ -1291,68 +1289,68 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1291
1289
  }, Ft = {
1292
1290
  class: "tpl:mt-0.5 tpl:text-[10px]",
1293
1291
  style: { color: "var(--tpl-text-muted)" }
1294
- }, It = /*#__PURE__*/ W(/* @__PURE__ */ O({
1292
+ }, It = /*#__PURE__*/ G(/* @__PURE__ */ D({
1295
1293
  __name: "MediaPreviewPanel",
1296
1294
  props: {
1297
1295
  item: {},
1298
1296
  folders: {}
1299
1297
  },
1300
- setup(t) {
1301
- let n = t, r = l(X, null), { isImageMimeType: i } = Q();
1302
- function a(e, t, n = []) {
1298
+ setup(n) {
1299
+ let r = n, i = t(Z, null), { isImageMimeType: o } = he();
1300
+ function s(e, t, n = []) {
1303
1301
  for (let r of e) {
1304
1302
  let e = [...n, r.name];
1305
1303
  if (r.id === t) return e;
1306
1304
  if (r.children.length) {
1307
- let n = a(r.children, t, e);
1305
+ let n = s(r.children, t, e);
1308
1306
  if (n) return n;
1309
1307
  }
1310
1308
  }
1311
1309
  return null;
1312
1310
  }
1313
- let o = T(() => {
1314
- if (!n.item.folderId || !n.folders) return null;
1315
- let e = a(n.folders, n.item.folderId);
1311
+ let c = p(() => {
1312
+ if (!r.item.folderId || !r.folders) return null;
1313
+ let e = s(r.folders, r.item.folderId);
1316
1314
  return e ? e.join("/") : null;
1317
- }), s = T(() => n.item.mimeType ?? ""), c = T(() => i(s.value));
1318
- function u(e) {
1319
- return Le(e, r?.value, {
1315
+ }), l = p(() => r.item.mimeType ?? ""), u = p(() => o(l.value));
1316
+ function f(e) {
1317
+ return Le(e, i?.value, {
1320
1318
  year: "numeric",
1321
1319
  month: "short",
1322
1320
  day: "numeric"
1323
1321
  });
1324
1322
  }
1325
- let d = T(() => n.item.filename || n.item.url);
1326
- return (n, r) => (e(), h("div", At, [c.value ? (e(), h("img", {
1323
+ let _ = p(() => r.item.filename || r.item.url);
1324
+ return (t, r) => (v(), h("div", At, [u.value ? (v(), h("img", {
1327
1325
  key: 0,
1328
- src: t.item.url,
1329
- alt: t.item.alt || d.value,
1326
+ src: n.item.url,
1327
+ alt: n.item.alt || _.value,
1330
1328
  class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
1331
1329
  style: { border: "1px solid var(--tpl-border)" }
1332
- }, null, 8, jt)) : (e(), h("div", Mt, [g(Ie, {
1333
- "mime-type": s.value,
1330
+ }, null, 8, jt)) : (v(), h("div", Mt, [d(Ie, {
1331
+ "mime-type": l.value,
1334
1332
  class: "tpl-preview-icon"
1335
- }, null, 8, ["mime-type"])])), m("div", Nt, [
1336
- m("p", Pt, b(d.value), 1),
1337
- m("p", Ft, [
1338
- t.item.size == null ? D("", !0) : (e(), h(C, { key: 0 }, [_(b(p($)(t.item.size)), 1)], 64)),
1339
- t.item.createdAt ? (e(), h(C, { key: 1 }, [t.item.size == null ? D("", !0) : (e(), h(C, { key: 0 }, [_(" · ")], 64)), _(" " + b(u(t.item.createdAt)), 1)], 64)) : D("", !0),
1340
- c.value && t.item.width && t.item.height ? (e(), h(C, { key: 2 }, [_(" · " + b(t.item.width) + "×" + b(t.item.height) + "px ", 1)], 64)) : D("", !0),
1341
- o.value ? (e(), h(C, { key: 3 }, [
1342
- r[0] ||= _(" · ", -1),
1343
- g(p(K), {
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), {
1344
1342
  class: "tpl:mb-px tpl:inline",
1345
1343
  size: 9,
1346
1344
  "stroke-width": 2
1347
1345
  }),
1348
- _(" " + b(o.value), 1)
1349
- ], 64)) : D("", !0)
1346
+ g(" " + a(c.value), 1)
1347
+ ], 64)) : m("", !0)
1350
1348
  ]),
1351
- c.value ? (e(), h("p", {
1349
+ u.value ? (v(), h("p", {
1352
1350
  key: 0,
1353
- class: x(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !t.item.alt }]),
1351
+ class: e(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !n.item.alt }]),
1354
1352
  style: { color: "var(--tpl-text-dim)" }
1355
- }, b(t.item.alt || "\xA0"), 3)) : D("", !0)
1353
+ }, a(n.item.alt || "\xA0"), 3)) : m("", !0)
1356
1354
  ])]));
1357
1355
  }
1358
1356
  }), [["__scopeId", "data-v-50993988"]]), Lt = ["data-tpl-theme"], Rt = {
@@ -1385,7 +1383,7 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1385
1383
  role: "alert",
1386
1384
  class: "tpl:mb-3 tpl:text-xs",
1387
1385
  style: { color: "var(--tpl-danger)" }
1388
- }, qt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Jt = ["disabled"], Yt = ["disabled"], Xt = /* @__PURE__ */ O({
1386
+ }, qt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Jt = ["disabled"], Yt = ["disabled"], Xt = /* @__PURE__ */ D({
1389
1387
  __name: "MediaReplaceModal",
1390
1388
  props: {
1391
1389
  visible: { type: Boolean },
@@ -1395,28 +1393,28 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1395
1393
  error: {}
1396
1394
  },
1397
1395
  emits: ["replace", "close"],
1398
- setup(t, { emit: r }) {
1399
- let i = t, a = r, { t: o } = Z(), s = l(Y, null), u = l(J, d(null)), f = d(null), _ = d(null), y = T(() => {
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(() => {
1400
1398
  if (!i.item) return "";
1401
1399
  let e = (i.item.filename ?? "").split(".");
1402
1400
  return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
1403
- }), C = T(() => y.value ? `.${y.value}` : "*"), w = T(() => (i.usageInfo?.templateCount ?? 0) > 0);
1404
- c(() => i.visible, (e) => {
1405
- e || (_.value = null, f.value && (f.value.value = ""));
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 = ""));
1406
1404
  });
1407
1405
  function E(e) {
1408
1406
  let t = e.target;
1409
- t.files && t.files.length > 0 && (_.value = t.files[0]);
1407
+ t.files && t.files.length > 0 && (y.value = t.files[0]);
1410
1408
  }
1411
- function O() {
1412
- _.value && a("replace", _.value);
1409
+ function D() {
1410
+ y.value && o("replace", y.value);
1413
1411
  }
1414
- let k = d(null);
1415
- _e(k, T(() => i.visible && i.item !== null));
1412
+ let k = c(null);
1413
+ _e(k, p(() => i.visible && i.item !== null));
1416
1414
  function j(e) {
1417
- e.stopPropagation(), e.key === "Escape" && a("close");
1415
+ e.stopPropagation(), e.key === "Escape" && o("close");
1418
1416
  }
1419
- return (r, i) => (e(), S(v, { to: p(u) || "body" }, [g(M, {
1417
+ return (t, r) => (v(), T(f, { to: S(g) || "body" }, [d(M, {
1420
1418
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
1421
1419
  "enter-from-class": "tpl:opacity-0",
1422
1420
  "enter-to-class": "tpl:opacity-100",
@@ -1424,14 +1422,14 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1424
1422
  "leave-from-class": "tpl:opacity-100",
1425
1423
  "leave-to-class": "tpl:opacity-0"
1426
1424
  }, {
1427
- default: n(() => [t.visible && t.item ? (e(), h("div", {
1425
+ default: l(() => [n.visible && n.item ? (v(), h("div", {
1428
1426
  key: 0,
1429
- "data-tpl-theme": p(s),
1430
- class: x([p(u) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
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"]),
1431
1429
  style: { "background-color": "var(--tpl-overlay)" },
1432
- onClick: i[1] ||= A((e) => a("close"), ["self"]),
1430
+ onClick: r[1] ||= A((e) => o("close"), ["self"]),
1433
1431
  onKeydown: j
1434
- }, [m("div", {
1432
+ }, [b("div", {
1435
1433
  ref_key: "dialogRef",
1436
1434
  ref: k,
1437
1435
  role: "dialog",
@@ -1440,17 +1438,17 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1440
1438
  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",
1441
1439
  style: { "background-color": "var(--tpl-bg-elevated)" }
1442
1440
  }, [
1443
- m("h3", Rt, b(p(o).mediaLibrary.replaceWarningTitle), 1),
1444
- m("p", zt, b(p(o).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${y.value}`)), 1),
1445
- w.value ? (e(), h("p", Bt, b(p(o).mediaLibrary.replaceWarningUsageNote.replace("{count}", t.usageInfo.templateCount.toString())), 1)) : D("", !0),
1446
- m("div", Vt, [m("p", Ht, b(t.item.filename), 1)]),
1447
- m("div", Ut, [m("label", Wt, b(p(o).mediaLibrary.replaceSelectFile), 1), m("input", {
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", {
1448
1446
  ref_key: "fileInputRef",
1449
- ref: f,
1447
+ ref: _,
1450
1448
  type: "file",
1451
1449
  accept: C.value,
1452
- "aria-invalid": !!t.error,
1453
- "aria-describedby": t.error ? "tpl-media-replace-error" : void 0,
1450
+ "aria-invalid": !!n.error,
1451
+ "aria-describedby": n.error ? "tpl-media-replace-error" : void 0,
1454
1452
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs",
1455
1453
  style: {
1456
1454
  "border-color": "var(--tpl-border)",
@@ -1459,26 +1457,26 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
1459
1457
  },
1460
1458
  onChange: E
1461
1459
  }, null, 40, Gt)]),
1462
- t.error ? (e(), h("p", Kt, b(t.error), 1)) : D("", !0),
1463
- m("div", qt, [m("button", {
1460
+ n.error ? (v(), h("p", Kt, a(n.error), 1)) : m("", !0),
1461
+ b("div", qt, [b("button", {
1464
1462
  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",
1465
1463
  style: {
1466
1464
  "border-color": "var(--tpl-border)",
1467
1465
  color: "var(--tpl-text)",
1468
1466
  "background-color": "var(--tpl-bg)"
1469
1467
  },
1470
- disabled: t.isReplacing,
1471
- onClick: i[0] ||= (e) => a("close")
1472
- }, b(p(o).mediaLibrary.cancel), 9, Jt), m("button", {
1468
+ disabled: n.isReplacing,
1469
+ onClick: r[0] ||= (e) => o("close")
1470
+ }, a(S(s).mediaLibrary.cancel), 9, Jt), b("button", {
1473
1471
  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",
1474
1472
  style: {
1475
1473
  "background-color": "var(--tpl-primary)",
1476
1474
  color: "var(--tpl-on-primary)"
1477
1475
  },
1478
- disabled: !_.value || t.isReplacing,
1479
- onClick: O
1480
- }, b(t.isReplacing ? p(o).mediaLibrary.replacing : p(o).mediaLibrary.replace), 9, Yt)])
1481
- ], 512)], 42, Lt)) : D("", !0)]),
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)]),
1482
1480
  _: 1
1483
1481
  })], 8, ["to"]));
1484
1482
  }
@@ -1523,71 +1521,71 @@ var Qt = [
1523
1521
  role: "alert",
1524
1522
  class: "tpl:mt-1.5 tpl:text-xs tpl:break-words",
1525
1523
  style: { color: "var(--tpl-danger)" }
1526
- }, an = /* @__PURE__ */ O({
1524
+ }, an = /* @__PURE__ */ D({
1527
1525
  __name: "MediaUploadZone",
1528
1526
  props: {
1529
1527
  isUploading: { type: Boolean },
1530
1528
  uploadProgress: {}
1531
1529
  },
1532
1530
  emits: ["upload"],
1533
- setup(t, { emit: n }) {
1534
- let r = n, { t: i, format: a } = Z(), o = l(X, null), { allAcceptedInputString: s, restrictsMimeTypes: c, availableCategories: u, maxFileSize: f, isAcceptedFile: _ } = Q(), v = {
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 = {
1535
1533
  images: "filterImages",
1536
1534
  documents: "filterDocuments",
1537
1535
  videos: "filterVideos",
1538
1536
  audio: "filterAudio"
1539
- }, y = T(() => {
1540
- let e = i.mediaLibrary, t = c.value ? Zt(u.value.map((t) => e[v[t]]), o?.value) : i.mediaLibrary.acceptedAnyType;
1541
- return Number.isFinite(f.value) ? a(i.mediaLibrary.acceptedFormatsMaxSize, {
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, {
1542
1540
  formats: t,
1543
- size: $(f.value)
1541
+ size: $(_.value)
1544
1542
  }) : t;
1545
- }), S = d([]), w = d();
1546
- function E(e) {
1543
+ }), T = c([]), E = c();
1544
+ function D(e) {
1547
1545
  let t = [], n = [];
1548
- for (let r of Array.from(e)) _(r) ? t.push(r) : n.push(r.name);
1549
- S.value = n, t.length && r("upload", t);
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);
1550
1548
  }
1551
- let { isOverDropZone: O } = L(w, { onDrop: (e) => {
1552
- e?.length && E(e);
1549
+ let { isOverDropZone: O } = ee(E, { onDrop: (e) => {
1550
+ e?.length && D(e);
1553
1551
  } }), { open: k, onChange: A } = I({
1554
- accept: s.value,
1552
+ accept: u.value,
1555
1553
  multiple: !0
1556
1554
  });
1557
1555
  return A((e) => {
1558
- e?.length && E(e);
1559
- }), (n, r) => (e(), h(C, null, [m("button", {
1556
+ e?.length && D(e);
1557
+ }), (t, r) => (v(), h(w, null, [b("button", {
1560
1558
  ref_key: "dropZoneRef",
1561
- ref: w,
1559
+ ref: E,
1562
1560
  type: "button",
1563
1561
  "data-testid": "media-upload-zone",
1564
- class: x(["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", p(O) ? "tpl-upload-zone-active" : ""]),
1565
- "aria-label": p(i).mediaLibrary.dropOrClick,
1566
- "aria-describedby": t.isUploading ? void 0 : "tpl-media-upload-hint",
1567
- "aria-busy": t.isUploading,
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,
1568
1566
  style: {
1569
1567
  "border-color": "var(--tpl-border-light)",
1570
1568
  "background-color": "var(--tpl-bg)"
1571
1569
  },
1572
- onClick: r[0] ||= (e) => p(k)()
1573
- }, [t.isUploading ? (e(), h("div", $t, [g(p(V), {
1570
+ onClick: r[0] ||= (e) => S(k)()
1571
+ }, [n.isUploading ? (v(), h("div", $t, [d(S(V), {
1574
1572
  class: "tpl-spinner",
1575
1573
  size: 20,
1576
1574
  "stroke-width": 2,
1577
1575
  style: { color: "var(--tpl-primary)" }
1578
- }), m("span", en, b(t.uploadProgress && t.uploadProgress.total > 1 ? p(a)(p(i).mediaLibrary.uploadingProgress, {
1579
- current: t.uploadProgress.current,
1580
- total: t.uploadProgress.total
1581
- }) : p(i).mediaLibrary.uploading), 1)])) : (e(), h(C, { key: 1 }, [
1582
- g(p(ce), {
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), {
1583
1581
  class: "tpl:mb-2",
1584
1582
  size: 24,
1585
1583
  "stroke-width": 1.5,
1586
1584
  style: { color: "var(--tpl-text-dim)" }
1587
1585
  }),
1588
- m("p", tn, b(p(i).mediaLibrary.dropOrClick), 1),
1589
- m("p", nn, b(y.value), 1)
1590
- ], 64))], 10, Qt), S.value.length ? (e(), h("p", rn, b(p(a)(p(i).mediaLibrary.uploadRejected, { files: S.value.join(", ") })), 1)) : D("", !0)], 64));
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));
1591
1589
  }
1592
1590
  }), on = ["aria-label"], sn = [
1593
1591
  "width",
@@ -1613,52 +1611,52 @@ var Qt = [
1613
1611
  "background-color": "var(--tpl-text)",
1614
1612
  color: "var(--tpl-bg-elevated)"
1615
1613
  }
1616
- }, dn = /* @__PURE__ */ O({
1614
+ }, dn = /* @__PURE__ */ D({
1617
1615
  __name: "StorageProgressRing",
1618
1616
  props: {
1619
1617
  usedBytes: {},
1620
1618
  limitBytes: {},
1621
1619
  size: {}
1622
1620
  },
1623
- setup(t) {
1624
- let r = t, { t: i, format: a } = Z(), o = d(!1), s = T(() => r.size ?? 24), c = T(() => Math.max(2, s.value / 8)), l = T(() => (s.value - c.value) / 2), u = T(() => 2 * Math.PI * l.value), f = T(() => r.limitBytes <= 0 ? 0 : Math.min(100, r.usedBytes / r.limitBytes * 100)), p = T(() => u.value - f.value / 100 * u.value), v = T(() => f.value >= 95 ? "var(--tpl-danger)" : f.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)"), y = T(() => $(r.usedBytes)), x = T(() => $(r.limitBytes)), S = T(() => Math.max(0, r.limitBytes - r.usedBytes)), C = T(() => $(S.value)), w = T(() => a(i.mediaLibrary.storageTooltip, {
1625
- used: y.value,
1626
- total: x.value,
1627
- remaining: C.value
1621
+ 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
1628
1626
  }));
1629
- return (t, r) => (e(), h("div", {
1627
+ return (e, t) => (v(), h("div", {
1630
1628
  "data-testid": "media-storage-ring",
1631
1629
  class: "tpl:relative tpl:inline-flex tpl:cursor-help tpl:items-center tpl:justify-center",
1632
1630
  tabindex: "0",
1633
- "aria-label": w.value,
1634
- onMouseenter: r[0] ||= (e) => o.value = !0,
1635
- onMouseleave: r[1] ||= (e) => o.value = !1,
1636
- onFocus: r[2] ||= (e) => o.value = !0,
1637
- onBlur: r[3] ||= (e) => o.value = !1
1638
- }, [(e(), h("svg", {
1639
- width: s.value,
1640
- height: s.value,
1631
+ "aria-label": E.value,
1632
+ onMouseenter: t[0] ||= (e) => i.value = !0,
1633
+ onMouseleave: t[1] ||= (e) => i.value = !1,
1634
+ onFocus: t[2] ||= (e) => i.value = !0,
1635
+ onBlur: t[3] ||= (e) => i.value = !1
1636
+ }, [(v(), h("svg", {
1637
+ width: o.value,
1638
+ height: o.value,
1641
1639
  class: "tpl:-rotate-90",
1642
- viewBox: `0 0 ${s.value} ${s.value}`
1643
- }, [m("circle", {
1644
- cx: s.value / 2,
1645
- cy: s.value / 2,
1646
- r: l.value,
1640
+ viewBox: `0 0 ${o.value} ${o.value}`
1641
+ }, [b("circle", {
1642
+ cx: o.value / 2,
1643
+ cy: o.value / 2,
1644
+ r: u.value,
1647
1645
  fill: "none",
1648
- "stroke-width": c.value,
1646
+ "stroke-width": s.value,
1649
1647
  style: { stroke: "var(--tpl-border)" }
1650
- }, null, 8, cn), m("circle", {
1651
- cx: s.value / 2,
1652
- cy: s.value / 2,
1653
- r: l.value,
1648
+ }, null, 8, cn), b("circle", {
1649
+ cx: o.value / 2,
1650
+ cy: o.value / 2,
1651
+ r: u.value,
1654
1652
  fill: "none",
1655
- "stroke-width": c.value,
1656
- stroke: v.value,
1653
+ "stroke-width": s.value,
1654
+ stroke: x.value,
1657
1655
  "stroke-linecap": "round",
1658
- "stroke-dasharray": u.value,
1659
- "stroke-dashoffset": p.value,
1656
+ "stroke-dasharray": f.value,
1657
+ "stroke-dashoffset": y.value,
1660
1658
  class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
1661
- }, null, 8, ln)], 8, sn)), g(M, {
1659
+ }, null, 8, ln)], 8, sn)), d(M, {
1662
1660
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
1663
1661
  "enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
1664
1662
  "enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
@@ -1666,10 +1664,10 @@ var Qt = [
1666
1664
  "leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
1667
1665
  "leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
1668
1666
  }, {
1669
- default: n(() => [o.value ? (e(), h("div", un, [_(b(w.value) + " ", 1), r[4] ||= m("div", {
1667
+ default: l(() => [i.value ? (v(), h("div", un, [g(a(E.value) + " ", 1), t[4] ||= b("div", {
1670
1668
  class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
1671
1669
  style: { "background-color": "var(--tpl-text)" }
1672
- }, null, -1)])) : D("", !0)]),
1670
+ }, null, -1)])) : m("", !0)]),
1673
1671
  _: 1
1674
1672
  })], 40, on));
1675
1673
  }
@@ -1696,7 +1694,7 @@ function pn(e) {
1696
1694
  function r() {
1697
1695
  return "value" in n && typeof n.value == "object" ? n.value : n;
1698
1696
  }
1699
- let i = d("grid"), a = d(!1), o = d(""), s = d(null), l = d(!1), u = d(!1), f = T(() => t.previewItem.value?.url ?? null), p = T(() => t.frequentlyUsedItems.value.length > 0), m = T(() => t.viewMode.value === "frequently-used" ? t.frequentlyUsedItems.value : t.items.value), h = T(() => Object.values(t.deleteUsageInfo.value).some((e) => e.templateCount > 0)), g = T(() => fn(t.folders.value)), _ = {
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)), _ = {
1700
1698
  images: () => r().mediaLibrary.filterImages,
1701
1699
  documents: () => r().mediaLibrary.filterDocuments,
1702
1700
  videos: () => r().mediaLibrary.filterVideos,
@@ -1705,7 +1703,7 @@ function pn(e) {
1705
1703
  function v(e) {
1706
1704
  return _[e]?.() ?? e;
1707
1705
  }
1708
- c(a, (e) => {
1706
+ O(a, (e) => {
1709
1707
  e && t.loadFolders();
1710
1708
  });
1711
1709
  let y = N((e) => {
@@ -1724,13 +1722,13 @@ function pn(e) {
1724
1722
  function w(e) {
1725
1723
  t.selectItem(e);
1726
1724
  }
1727
- async function E(e, n) {
1725
+ async function T(e, n) {
1728
1726
  await t.createFolder(e, n);
1729
1727
  }
1730
- async function D(e, n) {
1728
+ async function E(e, n) {
1731
1729
  await t.renameFolder(e, n);
1732
1730
  }
1733
- async function O(e) {
1731
+ async function D(e) {
1734
1732
  await t.deleteFolder(e);
1735
1733
  }
1736
1734
  function k(e) {
@@ -1751,10 +1749,10 @@ function pn(e) {
1751
1749
  function I(e) {
1752
1750
  t.checkUsageBeforeReplace(e);
1753
1751
  }
1754
- async function L(e) {
1752
+ async function ee(e) {
1755
1753
  await t.replaceFile(e);
1756
1754
  }
1757
- function R() {
1755
+ function L() {
1758
1756
  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;
1759
1757
  }
1760
1758
  return {
@@ -1764,8 +1762,8 @@ function pn(e) {
1764
1762
  editingItem: s,
1765
1763
  showImportUrlModal: l,
1766
1764
  showMovePicker: u,
1767
- selectedUrl: f,
1768
- hasFrequentlyUsed: p,
1765
+ selectedUrl: d,
1766
+ hasFrequentlyUsed: f,
1769
1767
  displayItems: m,
1770
1768
  hasUsedFiles: h,
1771
1769
  folderTree: g,
@@ -1775,23 +1773,23 @@ function pn(e) {
1775
1773
  handleSearchInput: b,
1776
1774
  handleUpload: C,
1777
1775
  handleSelect: w,
1778
- handleCreateFolder: E,
1779
- handleRenameFolder: D,
1780
- handleDeleteFolder: O,
1776
+ handleCreateFolder: T,
1777
+ handleRenameFolder: E,
1778
+ handleDeleteFolder: D,
1781
1779
  handleEditItem: k,
1782
1780
  handleEditSave: A,
1783
1781
  handleImportFromUrl: j,
1784
1782
  handleMoveToFolder: M,
1785
1783
  handleDeleteClick: P,
1786
1784
  handleReplaceItem: I,
1787
- handleReplaceFile: L,
1788
- resetUI: R
1785
+ handleReplaceFile: ee,
1786
+ resetUI: L
1789
1787
  };
1790
1788
  }
1791
1789
  //#endregion
1792
1790
  //#region ../media-library/src/composable.ts
1793
1791
  function mn(e) {
1794
- let { provider: t } = e, n = d([]), r = d([]), i = d(null), a = d("files"), o = d(""), s = d(null), c = d("newest"), l = d(!1), u = d(!1), f = d(!1), p = d(null), m = d(null), h = d(/* @__PURE__ */ new Set()), g = d(null), _ = d([]), v = d({}), y = d(!1), b = d([]), x = d(!1), S = d(null), C = d(!1), T = d(null), E = d(!1), D = d(null), O = d(null), k = d(null), A = 0;
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;
1795
1793
  function j(t) {
1796
1794
  try {
1797
1795
  t();
@@ -1803,7 +1801,7 @@ function mn(e) {
1803
1801
  return t.folders === !1 ? null : t.folders;
1804
1802
  }
1805
1803
  function N() {
1806
- return w(e.templateId);
1804
+ return _(e.templateId);
1807
1805
  }
1808
1806
  function P(e) {
1809
1807
  let t = {};
@@ -1813,7 +1811,7 @@ function mn(e) {
1813
1811
  }
1814
1812
  async function F() {
1815
1813
  let r = ++A;
1816
- l.value = !0;
1814
+ u.value = !0;
1817
1815
  let i = P();
1818
1816
  try {
1819
1817
  let e = await t.list(i);
@@ -1823,13 +1821,13 @@ function mn(e) {
1823
1821
  if (r !== A) return;
1824
1822
  e.onError?.(t);
1825
1823
  } finally {
1826
- r === A && (l.value = !1);
1824
+ r === A && (u.value = !1);
1827
1825
  }
1828
1826
  }
1829
1827
  async function I() {
1830
- if (!f.value || !p.value || l.value) return;
1828
+ if (!f.value || !p.value || u.value) return;
1831
1829
  let r = ++A;
1832
- l.value = !0;
1830
+ u.value = !0;
1833
1831
  let i = P(p.value);
1834
1832
  try {
1835
1833
  let e = await t.list(i);
@@ -1839,17 +1837,17 @@ function mn(e) {
1839
1837
  if (r !== A) return;
1840
1838
  e.onError?.(t);
1841
1839
  } finally {
1842
- r === A && (l.value = !1);
1840
+ r === A && (u.value = !1);
1843
1841
  }
1844
1842
  }
1845
- async function L(e) {
1843
+ async function ee(e) {
1846
1844
  o.value = e, await F();
1847
1845
  }
1848
- async function R(e) {
1846
+ async function L(e) {
1849
1847
  s.value = e, await F();
1850
1848
  }
1851
- async function ee(e) {
1852
- c.value = e, await F();
1849
+ async function R(e) {
1850
+ l.value = e, await F();
1853
1851
  }
1854
1852
  async function z(e) {
1855
1853
  a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await F();
@@ -1860,7 +1858,7 @@ function mn(e) {
1860
1858
  async function te(r) {
1861
1859
  let { create: a } = t;
1862
1860
  if (typeof a != "function") return null;
1863
- u.value = !0;
1861
+ d.value = !0;
1864
1862
  try {
1865
1863
  let e = { file: r };
1866
1864
  i.value != null && (e.folderId = i.value);
@@ -1871,13 +1869,13 @@ function mn(e) {
1871
1869
  } catch (t) {
1872
1870
  return e.onError?.(t), null;
1873
1871
  } finally {
1874
- u.value = !1;
1872
+ d.value = !1;
1875
1873
  }
1876
1874
  }
1877
1875
  async function ne(r) {
1878
1876
  let { create: a } = t;
1879
1877
  if (typeof a == "function") {
1880
- u.value = !0, m.value = {
1878
+ d.value = !0, m.value = {
1881
1879
  current: 0,
1882
1880
  total: r.length
1883
1881
  };
@@ -1899,7 +1897,7 @@ function mn(e) {
1899
1897
  }
1900
1898
  }
1901
1899
  } finally {
1902
- u.value = !1, m.value = null;
1900
+ d.value = !1, m.value = null;
1903
1901
  }
1904
1902
  }
1905
1903
  }
@@ -1932,19 +1930,19 @@ function mn(e) {
1932
1930
  function V(e) {
1933
1931
  let t = /* @__PURE__ */ new Map();
1934
1932
  for (let r of n.value) e.includes(r.id) && t.set(r.id, r);
1935
- for (let n of _.value) e.includes(n.id) && !t.has(n.id) && t.set(n.id, n);
1933
+ for (let n of v.value) e.includes(n.id) && !t.has(n.id) && t.set(n.id, n);
1936
1934
  return [...t.values()];
1937
1935
  }
1938
- function H(e) {
1939
- n.value = n.value.filter((t) => !e.includes(t.id)), _.value = _.value.filter((t) => !e.includes(t.id)), h.value = /* @__PURE__ */ new Set(), g.value = null;
1936
+ function ae(e) {
1937
+ 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;
1940
1938
  }
1941
- async function ae() {
1939
+ async function H() {
1942
1940
  if (h.value.size === 0) return;
1943
1941
  let { delete: n } = t;
1944
1942
  if (typeof n != "function") return;
1945
1943
  let r = [...h.value], i = V(r);
1946
1944
  try {
1947
- await n(r), H(r);
1945
+ await n(r), ae(r);
1948
1946
  for (let e of i) j(() => t.onDeleted?.(e));
1949
1947
  } catch (t) {
1950
1948
  e.onError?.(t);
@@ -1953,63 +1951,63 @@ function mn(e) {
1953
1951
  async function U() {
1954
1952
  let { frequentlyUsed: n } = t;
1955
1953
  if (typeof n == "function") try {
1956
- _.value = await n();
1954
+ v.value = await n();
1957
1955
  } catch (t) {
1958
1956
  e.onError?.(t);
1959
1957
  }
1960
1958
  }
1961
- async function oe() {
1959
+ async function W() {
1962
1960
  if (h.value.size === 0) return !1;
1963
- b.value = [...h.value];
1961
+ x.value = [...h.value];
1964
1962
  let { checkUsage: n } = t;
1965
- if (typeof n != "function") return v.value = {}, y.value = !0, !1;
1963
+ if (typeof n != "function") return y.value = {}, b.value = !0, !1;
1966
1964
  try {
1967
- let e = await n(b.value);
1968
- v.value = e;
1965
+ let e = await n(x.value);
1966
+ y.value = e;
1969
1967
  let t = Object.values(e).some((e) => e.templateCount > 0);
1970
- return y.value = !0, t;
1968
+ return b.value = !0, t;
1971
1969
  } catch (t) {
1972
1970
  return e.onError?.(t), !1;
1973
1971
  }
1974
1972
  }
1975
- async function se() {
1973
+ async function oe() {
1976
1974
  let { delete: n } = t;
1977
- if (typeof n != "function" || (y.value = !1, b.value.length === 0)) return;
1978
- let r = b.value, i = V(r);
1975
+ if (typeof n != "function" || (b.value = !1, x.value.length === 0)) return;
1976
+ let r = x.value, i = V(r);
1979
1977
  try {
1980
- await n(r), H(r), b.value = [], v.value = {};
1978
+ await n(r), ae(r), x.value = [], y.value = {};
1981
1979
  for (let e of i) j(() => t.onDeleted?.(e));
1982
1980
  } catch (t) {
1983
1981
  e.onError?.(t);
1984
1982
  }
1985
1983
  }
1986
- function ce() {
1987
- y.value = !1, b.value = [], v.value = {};
1984
+ function se() {
1985
+ b.value = !1, x.value = [], y.value = {};
1988
1986
  }
1989
- async function le(r) {
1987
+ async function ce(r) {
1990
1988
  let a = t.importFromUrl;
1991
1989
  if (typeof a != "function") return null;
1992
- x.value = !0, S.value = null;
1990
+ S.value = !0, C.value = null;
1993
1991
  try {
1994
1992
  let e = await a(r, i.value, N());
1995
1993
  return n.value = [e, ...n.value], j(() => t.onCreated?.(e)), e;
1996
1994
  } catch (t) {
1997
- return S.value = t instanceof Error ? t.message : "Import failed", e.onError?.(t), null;
1995
+ return C.value = t instanceof Error ? t.message : "Import failed", e.onError?.(t), null;
1998
1996
  } finally {
1999
- x.value = !1;
1997
+ S.value = !1;
2000
1998
  }
2001
1999
  }
2002
- function W(e) {
2000
+ function G(e) {
2003
2001
  let t = new Set(h.value);
2004
2002
  t.has(e) ? t.delete(e) : t.add(e), h.value = t;
2005
2003
  }
2006
- function G() {
2004
+ function K() {
2007
2005
  h.value = /* @__PURE__ */ new Set(), g.value = null;
2008
2006
  }
2009
- function K(e) {
2007
+ function q(e) {
2010
2008
  g.value = e, h.value = /* @__PURE__ */ new Set([e.id]);
2011
2009
  }
2012
- async function ue() {
2010
+ async function le() {
2013
2011
  let { storage: n } = t;
2014
2012
  if (typeof n != "function") k.value = null;
2015
2013
  else try {
@@ -2018,7 +2016,7 @@ function mn(e) {
2018
2016
  e.onError?.(t);
2019
2017
  }
2020
2018
  }
2021
- async function q() {
2019
+ async function J() {
2022
2020
  let t = M();
2023
2021
  if (t) try {
2024
2022
  r.value = await t.list();
@@ -2026,40 +2024,40 @@ function mn(e) {
2026
2024
  e.onError?.(t);
2027
2025
  }
2028
2026
  }
2029
- async function de(t, n) {
2027
+ async function ue(t, n) {
2030
2028
  let { create: r } = M() ?? { create: !1 };
2031
2029
  if (typeof r != "function") return null;
2032
2030
  try {
2033
2031
  let e = { name: t };
2034
2032
  n !== void 0 && (e.parentId = n);
2035
2033
  let i = await r(e);
2036
- return await q(), i;
2034
+ return await J(), i;
2037
2035
  } catch (t) {
2038
2036
  return e.onError?.(t), null;
2039
2037
  }
2040
2038
  }
2041
- function fe(e, t) {
2039
+ function de(e, t) {
2042
2040
  for (let n of e) if (n.id === t) return n;
2043
2041
  return null;
2044
2042
  }
2045
- async function J(t, n) {
2043
+ async function Y(t, n) {
2046
2044
  let { update: r } = M() ?? { update: !1 };
2047
2045
  if (typeof r == "function") try {
2048
- await r(t, { name: n }), await q();
2046
+ await r(t, { name: n }), await J();
2049
2047
  } catch (t) {
2050
2048
  e.onError?.(t);
2051
2049
  }
2052
2050
  }
2053
- async function pe(t) {
2051
+ async function fe(t) {
2054
2052
  let { delete: n } = M() ?? { delete: !1 };
2055
2053
  if (typeof n == "function") try {
2056
- let e = fe(r.value, t)?.parentId ?? null;
2057
- await n(t), i.value === t && (i.value = e), await q(), await F();
2054
+ let e = de(r.value, t)?.parentId ?? null;
2055
+ await n(t), i.value === t && (i.value = e), await J(), await F();
2058
2056
  } catch (t) {
2059
2057
  e.onError?.(t);
2060
2058
  }
2061
2059
  }
2062
- async function Y(n) {
2060
+ async function X(n) {
2063
2061
  D.value = n, T.value = null;
2064
2062
  let { checkUsage: r } = t;
2065
2063
  if (typeof r != "function") O.value = null, E.value = !0;
@@ -2070,31 +2068,31 @@ function mn(e) {
2070
2068
  e.onError?.(t);
2071
2069
  }
2072
2070
  }
2073
- function X() {
2071
+ function Z() {
2074
2072
  E.value = !1, D.value = null, O.value = null, T.value = null;
2075
2073
  }
2076
- function me(e) {
2077
- n.value = n.value.map((t) => t.id === e.id ? e : t), _.value = _.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), j(() => t.onUpdated?.(e));
2074
+ function pe(e) {
2075
+ 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));
2078
2076
  }
2079
- async function Z(n) {
2077
+ async function Q(n) {
2080
2078
  let { replace: r } = t;
2081
2079
  if (typeof r != "function" || !D.value) return null;
2082
- C.value = !0, T.value = null;
2080
+ w.value = !0, T.value = null;
2083
2081
  try {
2084
2082
  let e = await r(D.value.id, n);
2085
- return me(e), E.value = !1, D.value = null, O.value = null, e;
2083
+ return pe(e), E.value = !1, D.value = null, O.value = null, e;
2086
2084
  } catch (t) {
2087
2085
  return T.value = t instanceof Error ? t.message : "Replace failed", e.onError?.(t), null;
2088
2086
  } finally {
2089
- C.value = !1;
2087
+ w.value = !1;
2090
2088
  }
2091
2089
  }
2092
- async function he(n, r) {
2090
+ async function me(n, r) {
2093
2091
  let { replace: i } = t;
2094
2092
  if (typeof i != "function") return null;
2095
2093
  try {
2096
2094
  let e = await i(n, r);
2097
- return me(e), e;
2095
+ return pe(e), e;
2098
2096
  } catch (t) {
2099
2097
  return e.onError?.(t), null;
2100
2098
  }
@@ -2106,54 +2104,54 @@ function mn(e) {
2106
2104
  viewMode: a,
2107
2105
  searchQuery: o,
2108
2106
  categoryFilter: s,
2109
- sortOption: c,
2110
- isLoading: l,
2111
- isUploading: u,
2107
+ sortOption: l,
2108
+ isLoading: u,
2109
+ isUploading: d,
2112
2110
  uploadProgress: m,
2113
2111
  hasMore: f,
2114
2112
  selectedItems: h,
2115
2113
  previewItem: g,
2116
- frequentlyUsedItems: _,
2117
- deleteUsageInfo: v,
2118
- showDeleteWarning: y,
2114
+ frequentlyUsedItems: v,
2115
+ deleteUsageInfo: y,
2116
+ showDeleteWarning: b,
2119
2117
  loadItems: F,
2120
2118
  loadMore: I,
2121
- search: L,
2122
- filterByCategory: R,
2123
- sortBy: ee,
2119
+ search: ee,
2120
+ filterByCategory: L,
2121
+ sortBy: R,
2124
2122
  navigateToFolder: z,
2125
2123
  showFrequentlyUsed: B,
2126
2124
  uploadFile: te,
2127
2125
  uploadFiles: ne,
2128
2126
  moveSelected: re,
2129
2127
  updateFile: ie,
2130
- deleteSelected: ae,
2131
- isImportingFromUrl: x,
2132
- importFromUrlError: S,
2133
- importFromUrl: le,
2134
- toggleSelection: W,
2135
- clearSelection: G,
2136
- selectItem: K,
2137
- loadFolders: q,
2138
- createFolder: de,
2139
- renameFolder: J,
2140
- deleteFolder: pe,
2141
- findFolderInTree: fe,
2128
+ deleteSelected: H,
2129
+ isImportingFromUrl: S,
2130
+ 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,
2142
2140
  loadFrequentlyUsed: U,
2143
- checkUsageBeforeDelete: oe,
2144
- confirmDelete: se,
2145
- cancelDelete: ce,
2146
- isReplacing: C,
2141
+ checkUsageBeforeDelete: W,
2142
+ confirmDelete: oe,
2143
+ cancelDelete: se,
2144
+ isReplacing: w,
2147
2145
  replaceError: T,
2148
2146
  showReplaceWarning: E,
2149
2147
  pendingReplaceItem: D,
2150
2148
  replaceUsageInfo: O,
2151
- checkUsageBeforeReplace: Y,
2152
- cancelReplace: X,
2153
- replaceFile: Z,
2154
- replaceMediaDirectly: he,
2149
+ checkUsageBeforeReplace: X,
2150
+ cancelReplace: Z,
2151
+ replaceFile: Q,
2152
+ replaceMediaDirectly: me,
2155
2153
  storageInfo: k,
2156
- loadStorage: ue
2154
+ loadStorage: le
2157
2155
  };
2158
2156
  }
2159
2157
  //#endregion
@@ -2233,7 +2231,7 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2233
2231
  }, Yn = {
2234
2232
  key: 1,
2235
2233
  class: "tpl:relative"
2236
- }, Xn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Zn = ["data-testid", "disabled"], Qn = /* @__PURE__ */ O({
2234
+ }, Xn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Zn = ["data-testid", "disabled"], Qn = /* @__PURE__ */ D({
2237
2235
  __name: "MediaLibraryChrome",
2238
2236
  props: {
2239
2237
  provider: {},
@@ -2250,111 +2248,111 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2250
2248
  "confirm",
2251
2249
  "ready"
2252
2250
  ],
2253
- setup(i, { expose: a, emit: s }) {
2254
- let l = i, u = s, d = f(() => import("./MediaEditModal-C_wxoUMG.js")), v = T(() => l.translations), w = T(() => l.confirmTestId ?? "media-confirm"), E = {
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 = {
2255
2253
  get maxFileSize() {
2256
- return l.provider.maxFileSize;
2254
+ return c.provider.maxFileSize;
2257
2255
  },
2258
2256
  get mimeTypes() {
2259
- return l.provider.mimeTypes;
2257
+ return c.provider.mimeTypes;
2260
2258
  },
2261
2259
  get accept() {
2262
- return l.accept;
2260
+ return c.accept;
2263
2261
  }
2264
2262
  };
2265
- y(fe, E);
2266
- let { isAcceptedMimeType: O, availableCategories: k } = Q(E), j = mn({
2267
- provider: l.provider,
2268
- templateId: () => l.templateId,
2269
- onError: (e) => l.onError?.(e)
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)
2270
2268
  }), N = pn({
2271
2269
  library: j,
2272
- translations: v
2273
- }), P = T(() => typeof l.provider.create == "function"), F = T(() => l.provider.folders !== !1), I = T(() => typeof l.provider.importFromUrl == "function"), L = T(() => typeof l.provider.delete == "function"), R = T(() => typeof l.provider.update == "function"), ee = T(() => typeof l.provider.replace == "function"), z = T(() => typeof l.provider.frequentlyUsed == "function"), te = T(() => {
2274
- let e = l.provider.folders;
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;
2275
2273
  return e !== !1 && typeof e.move == "function";
2276
- }), V = T(() => {
2277
- let e = l.provider.folders;
2274
+ }), re = p(() => {
2275
+ let e = c.provider.folders;
2278
2276
  return e !== !1 && typeof e.create == "function";
2279
- }), H = T(() => {
2280
- let e = l.provider.folders;
2277
+ }), V = p(() => {
2278
+ let e = c.provider.folders;
2281
2279
  return e !== !1 && typeof e.update == "function";
2282
- }), ae = T(() => {
2283
- let e = l.provider.folders;
2280
+ }), H = p(() => {
2281
+ let e = c.provider.folders;
2284
2282
  return e !== !1 && typeof e.delete == "function";
2285
- }), U = T(() => j.isLoading.value && N.displayItems.value.length === 0), se = T(() => {
2283
+ }), U = p(() => j.isLoading.value && N.displayItems.value.length === 0), W = p(() => {
2286
2284
  let e = j.previewItem.value;
2287
- return e ? !l.accept?.length || O(e.mimeType ?? "", l.accept) : !1;
2288
- }), ce = T(() => {
2289
- if (!L.value) return 0;
2285
+ return e ? !c.accept?.length || D(e.mimeType ?? "", c.accept) : !1;
2286
+ }), se = p(() => {
2287
+ if (!ee.value) return 0;
2290
2288
  let e = 0;
2291
2289
  for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
2292
2290
  return e;
2293
- }), W = T(() => N.showImportUrlModal.value || N.editingItem.value !== null || j.showReplaceWarning.value);
2294
- function G() {
2295
- return W.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : j.showDeleteWarning.value ? (j.cancelDelete(), !0) : !1;
2296
- }
2291
+ }), G = p(() => N.showImportUrlModal.value || N.editingItem.value !== null || j.showReplaceWarning.value);
2297
2292
  function K() {
2298
- se.value && j.previewItem.value && u("confirm", j.previewItem.value);
2293
+ return G.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : j.showDeleteWarning.value ? (j.cancelDelete(), !0) : !1;
2294
+ }
2295
+ function q() {
2296
+ W.value && j.previewItem.value && u("confirm", j.previewItem.value);
2299
2297
  }
2300
- function de(e) {
2298
+ function ue(e) {
2301
2299
  let t = e.target.value;
2302
2300
  j.filterByCategory(t || null);
2303
2301
  }
2304
- async function J() {
2302
+ async function Y() {
2305
2303
  let e = /* @__PURE__ */ new Set();
2306
2304
  for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
2307
2305
  j.selectedItems.value = e, await N.handleDeleteClick();
2308
2306
  }
2309
- return c(() => l.accept, (e) => {
2307
+ return O(() => c.accept, (e) => {
2310
2308
  e?.length === 1 && (j.categoryFilter.value = e[0]);
2311
- }, { immediate: !0 }), j.loadItems(), j.loadFrequentlyUsed(), j.loadStorage(), u("ready"), r(() => {
2309
+ }, { immediate: !0 }), j.loadItems(), j.loadFrequentlyUsed(), j.loadStorage(), u("ready"), s(() => {
2312
2310
  N.resetUI();
2313
- }), a({
2314
- nestedDialogOpen: W,
2315
- handleEscape: G,
2311
+ }), n({
2312
+ nestedDialogOpen: G,
2313
+ handleEscape: K,
2316
2314
  library: j,
2317
2315
  ui: N
2318
- }), (r, a) => (e(), h("div", hn, [
2319
- m("div", gn, [m("h2", _n, b(v.value.mediaLibrary.title), 1), m("div", vn, [
2320
- p(j).storageInfo.value ? (e(), S(dn, {
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, {
2321
2319
  key: 0,
2322
- "used-bytes": p(j).storageInfo.value.usedBytes,
2323
- "limit-bytes": p(j).storageInfo.value.limitBytes,
2320
+ "used-bytes": S(j).storageInfo.value.usedBytes,
2321
+ "limit-bytes": S(j).storageInfo.value.limitBytes,
2324
2322
  size: 22
2325
- }, null, 8, ["used-bytes", "limit-bytes"])) : D("", !0),
2326
- m("div", yn, [m("input", {
2327
- value: p(N).searchInput.value,
2323
+ }, null, 8, ["used-bytes", "limit-bytes"])) : m("", !0),
2324
+ b("div", yn, [b("input", {
2325
+ value: S(N).searchInput.value,
2328
2326
  type: "search",
2329
2327
  disabled: U.value,
2330
- "aria-label": v.value.mediaLibrary.searchAriaLabel,
2328
+ "aria-label": _.value.mediaLibrary.searchAriaLabel,
2331
2329
  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",
2332
2330
  style: {
2333
2331
  "border-color": "var(--tpl-border)",
2334
2332
  "background-color": "var(--tpl-bg)",
2335
2333
  color: "var(--tpl-text)"
2336
2334
  },
2337
- placeholder: v.value.mediaLibrary.searchPlaceholder,
2338
- onInput: a[0] ||= (e) => p(N).handleSearchInput(e.target.value)
2339
- }, null, 40, bn), g(p(oe), {
2335
+ placeholder: _.value.mediaLibrary.searchPlaceholder,
2336
+ onInput: r[0] ||= (e) => S(N).handleSearchInput(e.target.value)
2337
+ }, null, 40, bn), d(S(oe), {
2340
2338
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
2341
2339
  size: 13,
2342
2340
  "stroke-width": 2,
2343
2341
  style: { color: "var(--tpl-text-dim)" }
2344
2342
  })]),
2345
- i.showClose ? (e(), h("button", {
2343
+ t.showClose ? (v(), h("button", {
2346
2344
  key: 1,
2347
2345
  type: "button",
2348
- "aria-label": v.value.mediaLibrary.close,
2346
+ "aria-label": _.value.mediaLibrary.close,
2349
2347
  class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
2350
2348
  style: { color: "var(--tpl-text-muted)" },
2351
- onClick: a[1] ||= (e) => u("close")
2352
- }, [g(p(le), {
2349
+ onClick: r[1] ||= (e) => u("close")
2350
+ }, [d(S(ce), {
2353
2351
  size: 18,
2354
2352
  "stroke-width": 2
2355
- })], 8, xn)) : D("", !0)
2353
+ })], 8, xn)) : m("", !0)
2356
2354
  ])]),
2357
- m("div", Sn, [g(M, {
2355
+ b("div", Sn, [d(M, {
2358
2356
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
2359
2357
  "enter-from-class": "tpl:-ml-48 tpl:opacity-0",
2360
2358
  "enter-to-class": "tpl:ml-0 tpl:opacity-100",
@@ -2362,19 +2360,19 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2362
2360
  "leave-from-class": "tpl:ml-0 tpl:opacity-100",
2363
2361
  "leave-to-class": "tpl:-ml-48 tpl:opacity-0"
2364
2362
  }, {
2365
- default: n(() => [F.value && p(N).showSidebar.value ? (e(), h("div", Cn, [g(Fe, {
2366
- folders: p(N).folderTree.value,
2367
- "current-folder-id": p(j).currentFolderId.value,
2368
- "view-mode": p(j).viewMode.value,
2369
- "has-frequently-used": z.value && p(N).hasFrequentlyUsed.value,
2370
- "can-create-folder": V.value,
2371
- "can-rename-folder": H.value,
2372
- "can-delete-folder": ae.value,
2373
- onNavigate: p(j).navigateToFolder,
2374
- onCreateFolder: p(N).handleCreateFolder,
2375
- onRenameFolder: p(N).handleRenameFolder,
2376
- onDeleteFolder: p(N).handleDeleteFolder,
2377
- onShowFrequentlyUsed: p(j).showFrequentlyUsed
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
2378
2376
  }, null, 8, [
2379
2377
  "folders",
2380
2378
  "current-folder-id",
@@ -2388,90 +2386,90 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2388
2386
  "onRenameFolder",
2389
2387
  "onDeleteFolder",
2390
2388
  "onShowFrequentlyUsed"
2391
- ])])) : D("", !0)]),
2389
+ ])])) : m("", !0)]),
2392
2390
  _: 1
2393
- }), m("div", wn, [m("div", Tn, [m("div", En, [
2394
- F.value ? (e(), h("button", {
2391
+ }), b("div", wn, [b("div", Tn, [b("div", En, [
2392
+ F.value ? (v(), h("button", {
2395
2393
  key: 0,
2396
2394
  type: "button",
2397
2395
  "data-testid": "media-folder-toggle",
2398
2396
  class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
2399
- style: t({
2400
- color: p(N).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2401
- backgroundColor: p(N).showSidebar.value ? "var(--tpl-bg)" : "transparent",
2402
- border: p(N).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
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"
2403
2401
  }),
2404
- title: p(N).showSidebar.value ? v.value.mediaLibrary.hideFolders : v.value.mediaLibrary.showFolders,
2405
- "aria-label": p(N).showSidebar.value ? v.value.mediaLibrary.hideFolders : v.value.mediaLibrary.showFolders,
2406
- "aria-pressed": p(N).showSidebar.value,
2407
- onClick: a[2] ||= (e) => p(N).showSidebar.value = !p(N).showSidebar.value
2408
- }, [g(p(q), {
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), {
2409
2407
  size: 16,
2410
2408
  "stroke-width": 2
2411
- })], 12, Dn)) : D("", !0),
2412
- p(j).viewMode.value === "frequently-used" ? (e(), h("span", On, b(v.value.mediaLibrary.frequentlyUsed), 1)) : (e(), S(xe, {
2409
+ })], 12, Dn)) : m("", !0),
2410
+ S(j).viewMode.value === "frequently-used" ? (v(), h("span", On, a(_.value.mediaLibrary.frequentlyUsed), 1)) : (v(), T(xe, {
2413
2411
  key: 2,
2414
- folders: p(N).folderTree.value,
2415
- "current-folder-id": p(j).currentFolderId.value,
2416
- onNavigate: p(j).navigateToFolder
2412
+ folders: S(N).folderTree.value,
2413
+ "current-folder-id": S(j).currentFolderId.value,
2414
+ onNavigate: S(j).navigateToFolder
2417
2415
  }, null, 8, [
2418
2416
  "folders",
2419
2417
  "current-folder-id",
2420
2418
  "onNavigate"
2421
2419
  ])),
2422
- m("div", kn, [m("button", {
2420
+ b("div", kn, [b("button", {
2423
2421
  type: "button",
2424
2422
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
2425
- style: t({
2426
- color: p(N).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2427
- backgroundColor: p(N).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
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"
2428
2426
  }),
2429
- title: v.value.mediaLibrary.viewGrid,
2430
- "aria-label": v.value.mediaLibrary.viewGrid,
2431
- "aria-pressed": p(N).layoutMode.value === "grid",
2432
- onClick: a[3] ||= (e) => p(N).layoutMode.value = "grid"
2433
- }, [g(p(ue), {
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), {
2434
2432
  size: 14,
2435
2433
  "stroke-width": 2
2436
- })], 12, An), m("button", {
2434
+ })], 12, An), b("button", {
2437
2435
  type: "button",
2438
2436
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
2439
- style: t({
2440
- color: p(N).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2441
- backgroundColor: p(N).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
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"
2442
2440
  }),
2443
- title: v.value.mediaLibrary.viewList,
2444
- "aria-label": v.value.mediaLibrary.viewList,
2445
- "aria-pressed": p(N).layoutMode.value === "list",
2446
- onClick: a[4] ||= (e) => p(N).layoutMode.value = "list"
2447
- }, [g(p(ie), {
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), {
2448
2446
  size: 14,
2449
2447
  "stroke-width": 2
2450
2448
  })], 12, jn)])
2451
- ]), m("div", Mn, [p(k).length > 1 ? (e(), h("select", {
2449
+ ]), b("div", Mn, [S(k).length > 1 ? (v(), h("select", {
2452
2450
  key: 0,
2453
- "aria-label": v.value.mediaLibrary.filterAriaLabel,
2451
+ "aria-label": _.value.mediaLibrary.filterAriaLabel,
2454
2452
  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",
2455
2453
  style: {
2456
2454
  "border-color": "var(--tpl-border)",
2457
2455
  "background-color": "var(--tpl-bg)",
2458
2456
  color: "var(--tpl-text)"
2459
2457
  },
2460
- value: p(j).categoryFilter.value ?? "",
2461
- onChange: de
2462
- }, [m("option", Pn, b(v.value.mediaLibrary.filterAll), 1), (e(!0), h(C, null, o(p(k), (t) => (e(), h("option", {
2463
- key: t,
2464
- value: t
2465
- }, b(p(N).getCategoryLabel(t)), 9, Fn))), 128))], 40, Nn)) : D("", !0)])]), m("div", In, [p(j).viewMode.value === "files" && (P.value || I.value) ? (e(), h("div", Ln, [P.value ? (e(), S(an, {
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", {
2461
+ key: e,
2462
+ 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, {
2466
2464
  key: 0,
2467
- "is-uploading": p(j).isUploading.value,
2468
- "upload-progress": p(j).uploadProgress.value,
2469
- onUpload: p(N).handleUpload
2465
+ "is-uploading": S(j).isUploading.value,
2466
+ "upload-progress": S(j).uploadProgress.value,
2467
+ onUpload: S(N).handleUpload
2470
2468
  }, null, 8, [
2471
2469
  "is-uploading",
2472
2470
  "upload-progress",
2473
2471
  "onUpload"
2474
- ])) : D("", !0), I.value ? (e(), h("button", {
2472
+ ])) : m("", !0), I.value ? (v(), h("button", {
2475
2473
  key: 1,
2476
2474
  "data-testid": "media-import-url",
2477
2475
  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",
@@ -2480,26 +2478,26 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2480
2478
  color: "var(--tpl-text-muted)",
2481
2479
  "background-color": "var(--tpl-bg)"
2482
2480
  },
2483
- onClick: a[5] ||= (e) => p(N).showImportUrlModal.value = !0
2484
- }, [g(p(re), {
2481
+ onClick: r[5] ||= (e) => S(N).showImportUrlModal.value = !0
2482
+ }, [d(S(ie), {
2485
2483
  size: 14,
2486
2484
  "stroke-width": 2
2487
- }), _(" " + b(v.value.mediaLibrary.importFromUrl), 1)])) : D("", !0)])) : D("", !0), g(pt, {
2488
- items: p(N).displayItems.value,
2489
- "selected-ids": p(j).selectedItems.value,
2490
- "is-loading": p(j).isLoading.value,
2491
- "has-more": p(j).viewMode.value === "files" && p(j).hasMore.value,
2492
- accept: i.accept,
2493
- layout: p(N).layoutMode.value,
2494
- "search-query": p(j).searchQuery.value,
2495
- "can-update": R.value,
2496
- "can-replace": ee.value,
2497
- onSelect: p(N).handleSelect,
2498
- onToggle: p(j).toggleSelection,
2499
- onLoadMore: p(j).loadMore,
2500
- onEdit: p(N).handleEditItem,
2501
- onReplace: p(N).handleReplaceItem,
2502
- onConfirm: K
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,
2500
+ onConfirm: q
2503
2501
  }, null, 8, [
2504
2502
  "items",
2505
2503
  "selected-ids",
@@ -2516,38 +2514,38 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2516
2514
  "onEdit",
2517
2515
  "onReplace"
2518
2516
  ])])])]),
2519
- g(wt, {
2520
- visible: p(N).showImportUrlModal.value,
2521
- "is-importing": p(j).isImportingFromUrl.value,
2522
- error: p(j).importFromUrlError.value,
2523
- onImport: p(N).handleImportFromUrl,
2524
- onClose: a[6] ||= (e) => p(N).showImportUrlModal.value = !1
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
2525
2523
  }, null, 8, [
2526
2524
  "visible",
2527
2525
  "is-importing",
2528
2526
  "error",
2529
2527
  "onImport"
2530
2528
  ]),
2531
- p(N).editingItem.value ? (e(), S(p(d), {
2529
+ S(N).editingItem.value ? (v(), T(S(f), {
2532
2530
  key: 0,
2533
2531
  visible: !0,
2534
- item: p(N).editingItem.value,
2535
- save: p(N).handleEditSave,
2536
- "can-crop": ee.value && p(N).editingItem.value.canUpdate !== !1,
2537
- onClose: a[7] ||= (e) => p(N).editingItem.value = null
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
2538
2536
  }, null, 8, [
2539
2537
  "item",
2540
2538
  "save",
2541
2539
  "can-crop"
2542
- ])) : D("", !0),
2543
- g(Xt, {
2544
- visible: p(j).showReplaceWarning.value,
2545
- item: p(j).pendingReplaceItem.value,
2546
- "usage-info": p(j).replaceUsageInfo.value,
2547
- "is-replacing": p(j).isReplacing.value,
2548
- error: p(j).replaceError.value,
2549
- onReplace: p(N).handleReplaceFile,
2550
- onClose: p(j).cancelReplace
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
2551
2549
  }, null, 8, [
2552
2550
  "visible",
2553
2551
  "item",
@@ -2557,7 +2555,7 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2557
2555
  "onReplace",
2558
2556
  "onClose"
2559
2557
  ]),
2560
- g(M, {
2558
+ d(M, {
2561
2559
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
2562
2560
  "enter-from-class": "tpl:opacity-0",
2563
2561
  "enter-to-class": "tpl:opacity-100",
@@ -2565,7 +2563,7 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2565
2563
  "leave-from-class": "tpl:opacity-100",
2566
2564
  "leave-to-class": "tpl:opacity-0"
2567
2565
  }, {
2568
- default: n(() => [p(j).showDeleteWarning.value ? (e(), h("div", {
2566
+ default: l(() => [S(j).showDeleteWarning.value ? (v(), h("div", {
2569
2567
  key: 0,
2570
2568
  role: "dialog",
2571
2569
  "aria-modal": "true",
@@ -2576,79 +2574,79 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2576
2574
  "backdrop-filter": "blur(8px)",
2577
2575
  "-webkit-backdrop-filter": "blur(8px)"
2578
2576
  },
2579
- onClick: a[10] ||= A((...e) => p(j).cancelDelete && p(j).cancelDelete(...e), ["self"])
2580
- }, [m("div", Rn, [
2581
- m("h3", zn, b(v.value.mediaLibrary.deleteWarningTitle), 1),
2582
- m("p", {
2583
- class: x(["tpl:text-xs", p(N).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
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"]),
2584
2582
  style: { color: "var(--tpl-text-muted)" }
2585
- }, b(v.value.mediaLibrary.deleteWarningMessage), 3),
2586
- p(N).hasUsedFiles.value ? (e(), h("p", Bn, b(v.value.mediaLibrary.deleteWarningUsageNote), 1)) : D("", !0),
2587
- p(N).hasUsedFiles.value ? (e(), h("div", Vn, [(e(!0), h(C, null, o(p(j).deleteUsageInfo.value, (t, n) => (e(), h("div", {
2588
- key: n,
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", {
2586
+ key: t,
2589
2587
  class: "tpl:text-xs",
2590
2588
  style: { color: "var(--tpl-text)" }
2591
- }, [t.templateCount > 0 ? (e(), h(C, { key: 0 }, [m("span", Hn, b(p(N).displayItems.value.find((e) => e.id === n)?.filename || n), 1), m("span", Un, " - " + b(v.value.mediaLibrary.usedInTemplates.replace("{count}", t.templateCount.toString())), 1)], 64)) : D("", !0)]))), 128))])) : D("", !0),
2592
- m("div", Wn, [m("button", {
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", {
2593
2591
  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",
2594
2592
  style: {
2595
2593
  "border-color": "var(--tpl-border)",
2596
2594
  color: "var(--tpl-text)",
2597
2595
  "background-color": "var(--tpl-bg)"
2598
2596
  },
2599
- onClick: a[8] ||= (...e) => p(j).cancelDelete && p(j).cancelDelete(...e)
2600
- }, b(v.value.mediaLibrary.cancel), 1), m("button", {
2597
+ onClick: r[8] ||= (...e) => S(j).cancelDelete && S(j).cancelDelete(...e)
2598
+ }, a(_.value.mediaLibrary.cancel), 1), b("button", {
2601
2599
  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",
2602
2600
  style: {
2603
2601
  "border-color": "var(--tpl-danger)",
2604
2602
  color: "var(--tpl-danger)",
2605
2603
  "background-color": "var(--tpl-bg)"
2606
2604
  },
2607
- onClick: a[9] ||= (...e) => p(j).confirmDelete && p(j).confirmDelete(...e)
2608
- }, b(p(N).hasUsedFiles.value ? v.value.mediaLibrary.deleteAnyway : v.value.mediaLibrary.confirmDelete), 1)])
2609
- ])])) : D("", !0)]),
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)]),
2610
2608
  _: 1
2611
2609
  }),
2612
- m("div", Gn, [m("div", Kn, [p(j).previewItem.value ? (e(), S(It, {
2610
+ b("div", Gn, [b("div", Kn, [S(j).previewItem.value ? (v(), T(It, {
2613
2611
  key: 0,
2614
- item: p(j).previewItem.value,
2615
- folders: p(N).folderTree.value
2616
- }, null, 8, ["item", "folders"])) : D("", !0)]), m("div", qn, [p(j).selectedItems.value.size > 0 ? (e(), h("div", Jn, [p(j).previewItem.value ? (e(), h("button", {
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", {
2617
2615
  key: 0,
2618
2616
  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",
2619
- style: t({
2620
- borderColor: p(N).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
2621
- color: p(N).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
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)",
2622
2620
  backgroundColor: "var(--tpl-bg)"
2623
2621
  }),
2624
- onClick: a[11] ||= (e) => p(N).copy(p(N).selectedUrl.value)
2625
- }, [p(N).copied.value ? (e(), S(p(B), {
2622
+ onClick: r[11] ||= (e) => S(N).copy(S(N).selectedUrl.value)
2623
+ }, [S(N).copied.value ? (v(), T(S(B), {
2626
2624
  key: 1,
2627
2625
  size: 12,
2628
2626
  "stroke-width": 2
2629
- })) : (e(), S(p(ne), {
2627
+ })) : (v(), T(S(ne), {
2630
2628
  key: 0,
2631
2629
  size: 12,
2632
2630
  "stroke-width": 2
2633
- })), _(" " + b(p(N).copied.value ? v.value.mediaLibrary.copied : v.value.mediaLibrary.copyUrl), 1)], 4)) : D("", !0), te.value ? (e(), h("div", Yn, [m("button", {
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", {
2634
2632
  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",
2635
2633
  style: {
2636
2634
  "border-color": "var(--tpl-border)",
2637
2635
  color: "var(--tpl-text)",
2638
2636
  "background-color": "var(--tpl-bg)"
2639
2637
  },
2640
- onClick: a[12] ||= (e) => p(N).showMovePicker.value = !p(N).showMovePicker.value
2641
- }, b(v.value.mediaLibrary.moveSelected), 1), p(N).showMovePicker.value ? (e(), S(kt, {
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, {
2642
2640
  key: 0,
2643
- folders: p(N).folderTree.value,
2644
- "current-folder-id": p(j).currentFolderId.value,
2645
- onSelect: p(N).handleMoveToFolder,
2646
- onClose: a[13] ||= (e) => p(N).showMovePicker.value = !1
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
2647
2645
  }, null, 8, [
2648
2646
  "folders",
2649
2647
  "current-folder-id",
2650
2648
  "onSelect"
2651
- ])) : D("", !0)])) : D("", !0)])) : D("", !0), m("div", Xn, [ce.value > 0 ? (e(), h("button", {
2649
+ ])) : m("", !0)])) : m("", !0)])) : m("", !0), b("div", Xn, [se.value > 0 ? (v(), h("button", {
2652
2650
  key: 0,
2653
2651
  "data-testid": "media-delete",
2654
2652
  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",
@@ -2657,24 +2655,24 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2657
2655
  color: "var(--tpl-danger)",
2658
2656
  "background-color": "var(--tpl-bg)"
2659
2657
  },
2660
- onClick: J
2661
- }, b(v.value.mediaLibrary.deleteSelected), 1)) : D("", !0), i.showConfirm ? (e(), h("button", {
2658
+ onClick: Y
2659
+ }, a(_.value.mediaLibrary.deleteSelected), 1)) : m("", !0), t.showConfirm ? (v(), h("button", {
2662
2660
  key: 1,
2663
- "data-testid": w.value,
2661
+ "data-testid": x.value,
2664
2662
  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",
2665
2663
  style: {
2666
2664
  "background-color": "var(--tpl-primary)",
2667
2665
  color: "var(--tpl-on-primary)"
2668
2666
  },
2669
- disabled: !se.value,
2670
- onClick: K
2671
- }, b(i.accept?.length ? v.value.mediaLibrary.selectImage : v.value.mediaLibrary.selectFile), 9, Zn)) : D("", !0)])])])
2667
+ disabled: !W.value,
2668
+ onClick: q
2669
+ }, a(t.accept?.length ? _.value.mediaLibrary.selectImage : _.value.mediaLibrary.selectFile), 9, Zn)) : m("", !0)])])])
2672
2670
  ]));
2673
2671
  }
2674
2672
  }), $n = /* #__PURE__ */ Object.assign({
2675
2673
  "./locales/ca.ts": () => import("./ca-CYQH3J0b.js"),
2676
2674
  "./locales/de.ts": () => import("./de-JvCTMJPy.js"),
2677
- "./locales/en.ts": () => import("./en-BHCMzqib.js"),
2675
+ "./locales/en.ts": () => import("./en-DwV15ltA.js"),
2678
2676
  "./locales/es.ts": () => import("./es-CAv-Vldw.js"),
2679
2677
  "./locales/fr.ts": () => import("./fr-DVPtxpR6.js"),
2680
2678
  "./locales/ja.ts": () => import("./ja-dcWzjStz.js"),
@@ -2704,7 +2702,7 @@ async function or(e) {
2704
2702
  }
2705
2703
  //#endregion
2706
2704
  //#region ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
2707
- var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ O({
2705
+ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ D({
2708
2706
  __name: "MediaLibraryModal",
2709
2707
  props: {
2710
2708
  visible: { type: Boolean },
@@ -2717,25 +2715,25 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ O({
2717
2715
  onError: { type: Function }
2718
2716
  },
2719
2717
  emits: ["close", "select"],
2720
- setup(t, { emit: r }) {
2721
- let i = t, a = r, o = d(null);
2722
- c(() => i.locale, async (e) => {
2718
+ setup(t, { emit: n }) {
2719
+ let r = t, a = n, o = c(null);
2720
+ O(() => r.locale, async (e) => {
2723
2721
  o.value = await or(e ?? "en");
2724
- }, { immediate: !0 }), y(pe, o);
2725
- let s = T(() => i.uiTheme);
2726
- y(Y, s);
2727
- let l = E(() => i.popoverTarget ?? null);
2728
- y(J, l), y(X, E(() => i.locale));
2729
- let u = d(null), f = d(null);
2730
- _e(u, T(() => i.visible && o.value !== null && !f.value?.nestedDialogOpen));
2731
- function p(e) {
2732
- e.key === "Escape" && (f.value?.handleEscape() ? e.preventDefault() : a("close"));
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"));
2733
2731
  }
2734
- P(document, "keydown", p);
2735
- function _(e) {
2732
+ P(document, "keydown", y);
2733
+ function S(e) {
2736
2734
  a("select", e), a("close");
2737
2735
  }
2738
- return (r, i) => (e(), S(v, { to: t.popoverTarget || "body" }, [g(M, {
2736
+ return (n, r) => (v(), T(f, { to: t.popoverTarget || "body" }, [d(M, {
2739
2737
  "enter-active-class": "tpl:transition tpl:duration-200",
2740
2738
  "enter-from-class": "tpl:opacity-0",
2741
2739
  "enter-to-class": "tpl:opacity-100",
@@ -2743,20 +2741,20 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ O({
2743
2741
  "leave-from-class": "tpl:opacity-100",
2744
2742
  "leave-to-class": "tpl:opacity-0"
2745
2743
  }, {
2746
- default: n(() => [t.visible && o.value ? (e(), h("div", {
2744
+ default: l(() => [t.visible && o.value ? (v(), h("div", {
2747
2745
  key: 0,
2748
2746
  "data-testid": "media-library-modal",
2749
2747
  "data-tpl-theme": s.value,
2750
- class: x([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"]),
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"]),
2751
2749
  style: {
2752
2750
  "background-color": "var(--tpl-overlay)",
2753
2751
  "backdrop-filter": "blur(8px)",
2754
2752
  "-webkit-backdrop-filter": "blur(8px)"
2755
2753
  },
2756
- onClick: i[1] ||= A((e) => a("close"), ["self"])
2757
- }, [m("div", {
2754
+ onClick: r[1] ||= A((e) => a("close"), ["self"])
2755
+ }, [b("div", {
2758
2756
  ref_key: "dialogRef",
2759
- ref: u,
2757
+ ref: g,
2760
2758
  role: "dialog",
2761
2759
  "aria-modal": "true",
2762
2760
  "aria-labelledby": "tpl-media-library-title",
@@ -2771,9 +2769,9 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ O({
2771
2769
  border: "1px solid var(--tpl-border)",
2772
2770
  "box-shadow": "var(--tpl-shadow-xl)"
2773
2771
  }
2774
- }, [g(Qn, {
2772
+ }, [d(Qn, {
2775
2773
  ref_key: "chromeRef",
2776
- ref: f,
2774
+ ref: _,
2777
2775
  provider: t.provider,
2778
2776
  accept: t.accept,
2779
2777
  "template-id": t.templateId,
@@ -2782,18 +2780,18 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ O({
2782
2780
  "show-close": "",
2783
2781
  "show-confirm": "",
2784
2782
  "confirm-test-id": "media-confirm",
2785
- onClose: i[0] ||= (e) => a("close"),
2786
- onConfirm: _
2783
+ onClose: r[0] ||= (e) => a("close"),
2784
+ onConfirm: S
2787
2785
  }, null, 8, [
2788
2786
  "provider",
2789
2787
  "accept",
2790
2788
  "template-id",
2791
2789
  "on-error",
2792
2790
  "translations"
2793
- ])], 512)], 10, sr)) : D("", !0)]),
2791
+ ])], 512)], 10, sr)) : m("", !0)]),
2794
2792
  _: 1
2795
2793
  })], 8, ["to"]));
2796
2794
  }
2797
2795
  });
2798
2796
  //#endregion
2799
- export { cr as MediaLibraryModal, J as a, me as i, Q as n, Y as o, Z as r, _e as t };
2797
+ export { cr as MediaLibraryModal, Y as a, pe as i, he as n, X as o, Q as r, _e as t };