@templatical/editor 0.49.0 → 0.50.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-B77z1iw4.js → src-BcTUmgLe.js} +113 -113
  194. package/dist/cdn/chunks/{src-B77z1iw4.js.map → src-BcTUmgLe.js.map} +1 -1
  195. package/dist/cdn/chunks/src-Bs_yxk3h.js +4392 -0
  196. package/dist/cdn/chunks/src-Bs_yxk3h.js.map +1 -0
  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,7 +1,7 @@
1
- import { A as e, B as t, E as n, F as r, H as i, L as a, N as o, P as s, Q as c, S as l, U as u, Y as d, at as f, b as p, c as m, ct as h, d as g, f as _, g as v, h as y, l as b, lt as x, m as S, n as C, nt as w, o as T, p as E, q as D, rt as O, u as k, ut as A, x as j, y as M } from "./draggable-akeQH_JP.js";
2
- import { h as N } from "./dist-Doy3r07H.js";
3
- import { a as P, n as F, o as I, r as L, s as R, t as z } from "./dist-DdwjXLme.js";
4
- import { B, It as ee, Ot as te, P as ne, St as V, W as re, Y as ie, at as H, c as ae, f as U, lt as oe, n as se, ot as ce, q as W, vt as le, w as G, xt as K, zt as ue } from "./icons-CjlNV8xD.js";
1
+ import { $ as e, C as t, D as n, F as r, I as i, J as a, P as o, R as s, S as c, U as l, V as u, W as d, X as f, _ as p, b as m, c as h, dt as g, f as _, g as v, h as y, it as b, j as x, l as S, lt as C, m as w, n as T, o as E, ot as D, p as O, rt as k, u as A, ut as j, x as M } from "./draggable-DZ0gwUJ6.js";
2
+ import { h as N } from "./dist-Bo8Thh8v.js";
3
+ import { a as P, n as F, o as I, r as L, s as R, t as z } from "./dist-S-rLGqax.js";
4
+ import { Ct as B, G as V, H as ee, It as te, J as ne, M as re, Ot as ie, R as H, St as U, at as ae, f as W, lt as oe, ot as G, s as K, t as se, w as ce, yt as le, zt as ue } from "./icons-DNX6StSs.js";
5
5
  import { t as q } from "./_plugin-vue_export-helper-B3ysoDQm.js";
6
6
  //#region ../media-library/src/keys.ts
7
7
  var de = Symbol("templaticalMediaLimits"), J = Symbol("templaticalMediaPopoverTarget"), fe = Symbol("templaticalMediaTranslations"), Y = Symbol("templaticalMediaUiTheme"), X = Symbol("templaticalMediaUiLocale"), pe = { mediaLibrary: {
@@ -100,7 +100,7 @@ var de = Symbol("templaticalMediaLimits"), J = Symbol("templaticalMediaPopoverTa
100
100
  //#endregion
101
101
  //#region ../media-library/src/composables/useI18n.ts
102
102
  function Z(e) {
103
- let t = e ?? n(fe, null), r = (D(t) ? t.value : t) ?? pe;
103
+ let t = e ?? n(fe, null), r = (a(t) ? t.value : t) ?? pe;
104
104
  function i(e, t) {
105
105
  return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
106
106
  }
@@ -120,15 +120,15 @@ var me = [
120
120
  function Q(e) {
121
121
  let t = e ?? n(de, null);
122
122
  if (!t) throw Error("[Templatical] useMediaCategories() needs media limits in scope. Render it under <MediaLibraryModal> or provide MEDIA_LIMITS_KEY yourself.");
123
- let r = t, i = _(() => !0), a = _(() => r.maxFileSize ?? Infinity), o = _(() => {
123
+ let r = t, i = O(() => !0), a = O(() => r.maxFileSize ?? Infinity), o = O(() => {
124
124
  let e = r.accept;
125
125
  if (e && e.length > 0) return e;
126
126
  let t = r.mimeTypes;
127
127
  return t ? Object.keys(t) : me;
128
- }), s = _(() => {
128
+ }), s = O(() => {
129
129
  let e = r.mimeTypes;
130
130
  return e ? o.value.flatMap((t) => e[t] ?? []) : [];
131
- }), c = _(() => s.value.join(",")), l = _(() => r.mimeTypes !== void 0);
131
+ }), c = O(() => s.value.join(",")), l = O(() => r.mimeTypes !== void 0);
132
132
  function u(e, t) {
133
133
  let n = r.mimeTypes;
134
134
  return !n || (t && t.length > 0 ? t : Object.keys(n)).some((t) => n[t]?.includes(e) ?? !1);
@@ -162,40 +162,40 @@ function Q(e) {
162
162
  //#endregion
163
163
  //#region ../media-library/src/composables/useFocusTrap.ts
164
164
  var he = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
165
- function ge(e, n) {
166
- let r = null, i = null, a = null;
167
- function o(e) {
165
+ function ge(e, t) {
166
+ let n = null, r = null, i = null;
167
+ function a(e) {
168
168
  if (!e) return document;
169
169
  let t = e.getRootNode();
170
170
  return t && "activeElement" in t ? t : document;
171
171
  }
172
- function s() {
172
+ function o() {
173
173
  return e.value ? Array.from(e.value.querySelectorAll(he)).filter((e) => e.offsetParent !== null) : [];
174
174
  }
175
- function c(t) {
175
+ function s(t) {
176
176
  if (t.key !== "Tab") return;
177
- let n = s();
177
+ let n = o();
178
178
  if (n.length === 0) return;
179
- let r = n[0], i = n[n.length - 1], a = o(e.value).activeElement;
180
- t.shiftKey ? a === r && (t.preventDefault(), i.focus()) : a === i && (t.preventDefault(), r.focus());
181
- }
182
- function l() {
183
- let t = i !== null || a !== null;
184
- t && u({ restoreFocus: !1 }), t || (r = o(e.value).activeElement), a = requestAnimationFrame(() => {
185
- a = null;
186
- let t = s();
179
+ let r = n[0], i = n[n.length - 1], s = a(e.value).activeElement;
180
+ t.shiftKey ? s === r && (t.preventDefault(), i.focus()) : s === i && (t.preventDefault(), r.focus());
181
+ }
182
+ function c() {
183
+ let t = r !== null || i !== null;
184
+ t && l({ restoreFocus: !1 }), t || (n = a(e.value).activeElement), i = requestAnimationFrame(() => {
185
+ i = null;
186
+ let t = o();
187
187
  t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
188
- }), i = P(e, "keydown", c);
188
+ }), r = P(e, "keydown", s);
189
189
  }
190
- function u(e = {}) {
190
+ function l(e = {}) {
191
191
  let t = e.restoreFocus !== !1;
192
- a !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(a), a = null), i?.(), i = null, t && r && r.focus && (r.focus(), r = null);
192
+ i !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(i), i = null), r?.(), r = null, t && n && n.focus && (n.focus(), n = null);
193
193
  }
194
- let f = t([n, e], ([e, t]) => {
195
- e && t ? l() : u();
194
+ let d = u([t, e], ([e, t]) => {
195
+ e && t ? c() : l();
196
196
  }, { flush: "post" });
197
- d(() => {
198
- f(), u();
197
+ f(() => {
198
+ d(), l();
199
199
  });
200
200
  }
201
201
  //#endregion
@@ -207,7 +207,7 @@ var _e = {
207
207
  }, ve = ["onClick"], ye = {
208
208
  key: 1,
209
209
  style: { color: "var(--tpl-text)" }
210
- }, be = /* @__PURE__ */ l({
210
+ }, be = /* @__PURE__ */ t({
211
211
  __name: "MediaBreadcrumb",
212
212
  props: {
213
213
  folders: {},
@@ -215,7 +215,7 @@ var _e = {
215
215
  },
216
216
  emits: ["navigate"],
217
217
  setup(e, { emit: t }) {
218
- let n = e, i = t, { t: a } = Z(), s = _(() => {
218
+ let n = e, r = t, { t: a } = Z(), s = O(() => {
219
219
  if (!n.currentFolderId) return [];
220
220
  let e = [];
221
221
  return c(n.folders, n.currentFolderId, e), e;
@@ -227,19 +227,19 @@ var _e = {
227
227
  }
228
228
  return !1;
229
229
  }
230
- return (e, t) => s.value.length > 0 ? (o(), v("div", _e, [E("button", {
230
+ return (e, t) => s.value.length > 0 ? (o(), p("div", _e, [w("button", {
231
231
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
232
232
  style: { color: "var(--tpl-primary)" },
233
- onClick: t[0] ||= (e) => i("navigate", null)
234
- }, A(f(a).mediaLibrary.allFiles), 1), (o(!0), v(k, null, r(s.value, (e, t) => (o(), v(k, { key: e.id }, [p(f(ee), {
233
+ onClick: t[0] ||= (e) => r("navigate", null)
234
+ }, g(D(a).mediaLibrary.allFiles), 1), (o(!0), p(A, null, i(s.value, (e, t) => (o(), p(A, { key: e.id }, [M(D(te), {
235
235
  size: 12,
236
236
  "stroke-width": 2
237
- }), t < s.value.length - 1 ? (o(), v("button", {
237
+ }), t < s.value.length - 1 ? (o(), p("button", {
238
238
  key: 0,
239
239
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
240
240
  style: { color: "var(--tpl-primary)" },
241
- onClick: (t) => i("navigate", e.id)
242
- }, A(e.name), 9, ve)) : (o(), v("span", ye, A(e.name), 1))], 64))), 128))])) : y("", !0);
241
+ onClick: (t) => r("navigate", e.id)
242
+ }, g(e.name), 9, ve)) : (o(), p("span", ye, g(e.name), 1))], 64))), 128))])) : v("", !0);
243
243
  }
244
244
  }), xe = ["aria-expanded", "aria-label"], Se = {
245
245
  key: 1,
@@ -247,7 +247,7 @@ var _e = {
247
247
  }, Ce = {
248
248
  key: 0,
249
249
  class: "tpl:truncate"
250
- }, we = ["onKeydown"], Te = ["title", "aria-label"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = { key: 0 }, ke = ["placeholder", "onKeydown"], Ae = /* @__PURE__ */ l({
250
+ }, we = ["onKeydown"], Te = ["title", "aria-label"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = { key: 0 }, ke = ["placeholder", "onKeydown"], Ae = /* @__PURE__ */ t({
251
251
  __name: "MediaFolderTreeNode",
252
252
  props: {
253
253
  folder: {},
@@ -263,8 +263,8 @@ var _e = {
263
263
  "renameFolder",
264
264
  "deleteFolder"
265
265
  ],
266
- setup(e, { emit: t }) {
267
- let n = e, i = t, { t: s } = Z(), l = c(!1), d = c(!1), g = c(""), C = c(!1), w = c(""), D = c(!1), O = _(() => n.folder.children.length > 0), j = _(() => n.depth < 4), M = _(() => n.currentFolderId === n.folder.id), N = _(() => n.currentFolderId ? F(n.folder.children, n.currentFolderId) : !1), P = _(() => l.value || N.value);
266
+ setup(t, { emit: n }) {
267
+ let r = t, a = n, { t: c } = Z(), l = e(!1), u = e(!1), f = e(""), m = e(!1), _ = e(""), b = e(!1), x = O(() => r.folder.children.length > 0), T = O(() => r.depth < 4), k = O(() => r.currentFolderId === r.folder.id), N = O(() => r.currentFolderId ? F(r.folder.children, r.currentFolderId) : !1), P = O(() => l.value || N.value);
268
268
  function F(e, t) {
269
269
  for (let n of e) if (n.id === t || F(n.children, t)) return !0;
270
270
  return !1;
@@ -273,66 +273,66 @@ var _e = {
273
273
  l.value = !l.value;
274
274
  }
275
275
  function L() {
276
- d.value = !0, g.value = n.folder.name;
276
+ u.value = !0, f.value = r.folder.name;
277
277
  }
278
278
  function R() {
279
- let e = g.value.trim();
280
- e && e !== n.folder.name && i("renameFolder", n.folder.id, e), d.value = !1, g.value = "";
279
+ let e = f.value.trim();
280
+ e && e !== r.folder.name && a("renameFolder", r.folder.id, e), u.value = !1, f.value = "";
281
281
  }
282
282
  function z() {
283
- d.value = !1, g.value = "";
283
+ u.value = !1, f.value = "";
284
284
  }
285
285
  function B() {
286
- C.value = !0, w.value = "", l.value = !0;
287
- }
288
- function te() {
289
- w.value.trim() && i("createFolder", w.value.trim(), n.folder.id), C.value = !1, w.value = "";
286
+ m.value = !0, _.value = "", l.value = !0;
290
287
  }
291
288
  function ne() {
292
- C.value = !1, w.value = "";
289
+ _.value.trim() && a("createFolder", _.value.trim(), r.folder.id), m.value = !1, _.value = "";
290
+ }
291
+ function re() {
292
+ m.value = !1, _.value = "";
293
293
  }
294
- function V() {
295
- D.value ? (i("deleteFolder", n.folder.id), D.value = !1) : D.value = !0;
294
+ function ie() {
295
+ b.value ? (a("deleteFolder", r.folder.id), b.value = !1) : b.value = !0;
296
296
  }
297
- function ie(e) {
297
+ function H(e) {
298
298
  let t = e.relatedTarget;
299
- t && e.currentTarget.contains(t) || (D.value = !1);
299
+ t && e.currentTarget.contains(t) || (b.value = !1);
300
300
  }
301
- return (t, n) => {
302
- let c = a("MediaFolderTreeNode", !0);
303
- return o(), v("div", null, [E("div", {
301
+ return (e, n) => {
302
+ let r = s("MediaFolderTreeNode", !0);
303
+ return o(), p("div", null, [w("div", {
304
304
  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",
305
- style: x({
306
- paddingLeft: `${e.depth * 16 + 8}px`,
307
- backgroundColor: M.value ? "var(--tpl-bg-active)" : "transparent",
308
- color: M.value ? "var(--tpl-primary)" : "var(--tpl-text)"
305
+ style: j({
306
+ paddingLeft: `${t.depth * 16 + 8}px`,
307
+ backgroundColor: k.value ? "var(--tpl-bg-active)" : "transparent",
308
+ color: k.value ? "var(--tpl-primary)" : "var(--tpl-text)"
309
309
  }),
310
- onFocusout: ie
310
+ onFocusout: H
311
311
  }, [
312
- O.value || C.value ? (o(), v("button", {
312
+ x.value || m.value ? (o(), p("button", {
313
313
  key: 0,
314
314
  type: "button",
315
315
  class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
316
316
  "aria-expanded": P.value,
317
- "aria-label": P.value ? f(s).mediaLibrary.collapseFolder : f(s).mediaLibrary.expandFolder,
318
- onClick: b(I, ["stop"])
319
- }, [p(f(ee), {
320
- class: h(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
317
+ "aria-label": P.value ? D(c).mediaLibrary.collapseFolder : D(c).mediaLibrary.expandFolder,
318
+ onClick: S(I, ["stop"])
319
+ }, [M(D(te), {
320
+ class: C(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
321
321
  size: 10,
322
322
  "stroke-width": 2
323
- }, null, 8, ["class"])], 8, xe)) : (o(), v("span", Se)),
324
- E("button", {
323
+ }, null, 8, ["class"])], 8, xe)) : (o(), p("span", Se)),
324
+ w("button", {
325
325
  type: "button",
326
326
  class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
327
- onClick: n[0] ||= (t) => i("navigate", e.folder.id)
328
- }, [p(f(K), {
327
+ onClick: n[0] ||= (e) => a("navigate", t.folder.id)
328
+ }, [M(D(U), {
329
329
  class: "tpl:shrink-0",
330
330
  size: 14,
331
331
  "stroke-width": 1.5
332
- }), d.value ? y("", !0) : (o(), v("span", Ce, A(e.folder.name), 1))]),
333
- d.value ? u((o(), v("input", {
332
+ }), u.value ? v("", !0) : (o(), p("span", Ce, g(t.folder.name), 1))]),
333
+ u.value ? d((o(), p("input", {
334
334
  key: 2,
335
- "onUpdate:modelValue": n[1] ||= (e) => g.value = e,
335
+ "onUpdate:modelValue": n[1] ||= (e) => f.value = e,
336
336
  type: "text",
337
337
  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",
338
338
  style: {
@@ -341,62 +341,62 @@ var _e = {
341
341
  color: "var(--tpl-text)"
342
342
  },
343
343
  autofocus: "",
344
- onKeydown: [m(R, ["enter"]), m(b(z, ["stop"]), ["escape"])],
344
+ onKeydown: [h(R, ["enter"]), h(S(z, ["stop"]), ["escape"])],
345
345
  onBlur: R,
346
- onClick: n[2] ||= b(() => {}, ["stop"])
347
- }, null, 40, we)), [[T, g.value]]) : y("", !0),
348
- d.value ? y("", !0) : (o(), v("span", {
346
+ onClick: n[2] ||= S(() => {}, ["stop"])
347
+ }, null, 40, we)), [[E, f.value]]) : v("", !0),
348
+ u.value ? v("", !0) : (o(), p("span", {
349
349
  key: 3,
350
- class: h(["tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:transition-opacity", M.value || D.value ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100"])
350
+ class: C(["tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:transition-opacity", k.value || b.value ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100"])
351
351
  }, [
352
- j.value && e.canCreateFolder ? (o(), v("button", {
352
+ T.value && t.canCreateFolder ? (o(), p("button", {
353
353
  key: 0,
354
354
  type: "button",
355
355
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
356
- title: f(s).mediaLibrary.addSubfolder,
357
- "aria-label": f(s).mediaLibrary.addSubfolder,
358
- onClick: b(B, ["stop"])
359
- }, [p(f(re), {
356
+ title: D(c).mediaLibrary.addSubfolder,
357
+ "aria-label": D(c).mediaLibrary.addSubfolder,
358
+ onClick: S(B, ["stop"])
359
+ }, [M(D(ee), {
360
360
  size: 12,
361
361
  "stroke-width": 2
362
- })], 8, Te)) : y("", !0),
363
- e.canRenameFolder ? (o(), v("button", {
362
+ })], 8, Te)) : v("", !0),
363
+ t.canRenameFolder ? (o(), p("button", {
364
364
  key: 1,
365
365
  type: "button",
366
366
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
367
- title: f(s).mediaLibrary.renameFolder,
368
- "aria-label": f(s).mediaLibrary.renameFolder,
369
- onClick: b(L, ["stop"])
370
- }, [p(f(W), {
367
+ title: D(c).mediaLibrary.renameFolder,
368
+ "aria-label": D(c).mediaLibrary.renameFolder,
369
+ onClick: S(L, ["stop"])
370
+ }, [M(D(V), {
371
371
  size: 12,
372
372
  "stroke-width": 2
373
- })], 8, Ee)) : y("", !0),
374
- e.canDeleteFolder ? (o(), v("button", {
373
+ })], 8, Ee)) : v("", !0),
374
+ t.canDeleteFolder ? (o(), p("button", {
375
375
  key: 2,
376
376
  type: "button",
377
377
  "data-testid": "media-folder-delete",
378
378
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
379
- title: D.value ? f(s).mediaLibrary.deleteFolderConfirm : f(s).mediaLibrary.deleteFolder,
380
- "aria-label": D.value ? f(s).mediaLibrary.deleteFolderConfirm : f(s).mediaLibrary.deleteFolder,
381
- onClick: b(V, ["stop"])
382
- }, [p(f(U), {
379
+ title: b.value ? D(c).mediaLibrary.deleteFolderConfirm : D(c).mediaLibrary.deleteFolder,
380
+ "aria-label": b.value ? D(c).mediaLibrary.deleteFolderConfirm : D(c).mediaLibrary.deleteFolder,
381
+ onClick: S(ie, ["stop"])
382
+ }, [M(D(W), {
383
383
  size: 12,
384
384
  "stroke-width": 2,
385
385
  style: { color: "var(--tpl-danger)" }
386
- })], 8, De)) : y("", !0)
386
+ })], 8, De)) : v("", !0)
387
387
  ], 2))
388
- ], 36), P.value ? (o(), v("div", Oe, [(o(!0), v(k, null, r(e.folder.children, (t) => (o(), S(c, {
389
- key: t.id,
390
- folder: t,
391
- "current-folder-id": e.currentFolderId,
392
- depth: e.depth + 1,
393
- "can-create-folder": e.canCreateFolder,
394
- "can-rename-folder": e.canRenameFolder,
395
- "can-delete-folder": e.canDeleteFolder,
396
- onNavigate: n[3] ||= (e) => i("navigate", e),
397
- onCreateFolder: n[4] ||= (e, t) => i("createFolder", e, t),
398
- onRenameFolder: n[5] ||= (e, t) => i("renameFolder", e, t),
399
- onDeleteFolder: n[6] ||= (e) => i("deleteFolder", e)
388
+ ], 36), P.value ? (o(), p("div", Oe, [(o(!0), p(A, null, i(t.folder.children, (e) => (o(), y(r, {
389
+ key: e.id,
390
+ folder: e,
391
+ "current-folder-id": t.currentFolderId,
392
+ depth: t.depth + 1,
393
+ "can-create-folder": t.canCreateFolder,
394
+ "can-rename-folder": t.canRenameFolder,
395
+ "can-delete-folder": t.canDeleteFolder,
396
+ onNavigate: n[3] ||= (e) => a("navigate", e),
397
+ onCreateFolder: n[4] ||= (e, t) => a("createFolder", e, t),
398
+ onRenameFolder: n[5] ||= (e, t) => a("renameFolder", e, t),
399
+ onDeleteFolder: n[6] ||= (e) => a("deleteFolder", e)
400
400
  }, null, 8, [
401
401
  "folder",
402
402
  "current-folder-id",
@@ -404,12 +404,12 @@ var _e = {
404
404
  "can-create-folder",
405
405
  "can-rename-folder",
406
406
  "can-delete-folder"
407
- ]))), 128)), C.value ? (o(), v("div", {
407
+ ]))), 128)), m.value ? (o(), p("div", {
408
408
  key: 0,
409
- style: x({ paddingLeft: `${(e.depth + 1) * 16 + 8}px` }),
409
+ style: j({ paddingLeft: `${(t.depth + 1) * 16 + 8}px` }),
410
410
  class: "tpl:py-1.5 tpl:pr-2"
411
- }, [u(E("input", {
412
- "onUpdate:modelValue": n[7] ||= (e) => w.value = e,
411
+ }, [d(w("input", {
412
+ "onUpdate:modelValue": n[7] ||= (e) => _.value = e,
413
413
  type: "text",
414
414
  class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
415
415
  style: {
@@ -417,11 +417,11 @@ var _e = {
417
417
  "background-color": "var(--tpl-bg)",
418
418
  color: "var(--tpl-text)"
419
419
  },
420
- placeholder: f(s).mediaLibrary.subfolderName,
420
+ placeholder: D(c).mediaLibrary.subfolderName,
421
421
  autofocus: "",
422
- onKeydown: [m(te, ["enter"]), m(b(ne, ["stop"]), ["escape"])],
423
- onBlur: te
424
- }, null, 40, ke), [[T, w.value]])], 4)) : y("", !0)])) : y("", !0)]);
422
+ onKeydown: [h(ne, ["enter"]), h(S(re, ["stop"]), ["escape"])],
423
+ onBlur: ne
424
+ }, null, 40, ke), [[E, _.value]])], 4)) : v("", !0)])) : v("", !0)]);
425
425
  };
426
426
  }
427
427
  }), je = {
@@ -430,7 +430,7 @@ var _e = {
430
430
  }, Me = {
431
431
  key: 0,
432
432
  class: "tpl:px-3 tpl:py-2"
433
- }, Ne = ["placeholder", "onKeydown"], Pe = /* @__PURE__ */ l({
433
+ }, Ne = ["placeholder", "onKeydown"], Pe = /* @__PURE__ */ t({
434
434
  __name: "MediaFolderTree",
435
435
  props: {
436
436
  folders: {},
@@ -448,41 +448,41 @@ var _e = {
448
448
  "deleteFolder",
449
449
  "showFrequentlyUsed"
450
450
  ],
451
- setup(e, { emit: t }) {
452
- let n = t, { t: i } = Z(), a = c(!1), s = c("");
451
+ setup(t, { emit: n }) {
452
+ let r = n, { t: a } = Z(), s = e(!1), c = e("");
453
453
  function l() {
454
- a.value = !0, s.value = "";
454
+ s.value = !0, c.value = "";
455
455
  }
456
- function d() {
457
- s.value.trim() && n("createFolder", s.value.trim()), a.value = !1, s.value = "";
456
+ function u() {
457
+ c.value.trim() && r("createFolder", c.value.trim()), s.value = !1, c.value = "";
458
458
  }
459
- function h() {
460
- a.value = !1, s.value = "";
459
+ function f() {
460
+ s.value = !1, c.value = "";
461
461
  }
462
- return (t, c) => (o(), v("div", je, [
463
- E("button", {
462
+ return (e, n) => (o(), p("div", je, [
463
+ w("button", {
464
464
  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",
465
- style: x({
466
- backgroundColor: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-bg-active)" : "transparent",
467
- color: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
465
+ style: j({
466
+ backgroundColor: t.viewMode === "files" && t.currentFolderId === null ? "var(--tpl-bg-active)" : "transparent",
467
+ color: t.viewMode === "files" && t.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
468
468
  }),
469
- onClick: c[0] ||= (e) => n("navigate", null)
470
- }, [p(f(V), {
469
+ onClick: n[0] ||= (e) => r("navigate", null)
470
+ }, [M(D(B), {
471
471
  size: 14,
472
472
  "stroke-width": 1.5
473
- }), M(" " + A(f(i).mediaLibrary.allFiles), 1)], 4),
474
- (o(!0), v(k, null, r(e.folders, (t) => (o(), S(Ae, {
475
- key: t.id,
476
- folder: t,
477
- "current-folder-id": e.currentFolderId,
473
+ }), m(" " + g(D(a).mediaLibrary.allFiles), 1)], 4),
474
+ (o(!0), p(A, null, i(t.folders, (e) => (o(), y(Ae, {
475
+ key: e.id,
476
+ folder: e,
477
+ "current-folder-id": t.currentFolderId,
478
478
  depth: 0,
479
- "can-create-folder": e.canCreateFolder,
480
- "can-rename-folder": e.canRenameFolder,
481
- "can-delete-folder": e.canDeleteFolder,
482
- onNavigate: c[1] ||= (e) => n("navigate", e),
483
- onCreateFolder: c[2] ||= (e, t) => n("createFolder", e, t),
484
- onRenameFolder: c[3] ||= (e, t) => n("renameFolder", e, t),
485
- onDeleteFolder: c[4] ||= (e) => n("deleteFolder", e)
479
+ "can-create-folder": t.canCreateFolder,
480
+ "can-rename-folder": t.canRenameFolder,
481
+ "can-delete-folder": t.canDeleteFolder,
482
+ onNavigate: n[1] ||= (e) => r("navigate", e),
483
+ onCreateFolder: n[2] ||= (e, t) => r("createFolder", e, t),
484
+ onRenameFolder: n[3] ||= (e, t) => r("renameFolder", e, t),
485
+ onDeleteFolder: n[4] ||= (e) => r("deleteFolder", e)
486
486
  }, null, 8, [
487
487
  "folder",
488
488
  "current-folder-id",
@@ -490,8 +490,8 @@ var _e = {
490
490
  "can-rename-folder",
491
491
  "can-delete-folder"
492
492
  ]))), 128)),
493
- a.value ? (o(), v("div", Me, [u(E("input", {
494
- "onUpdate:modelValue": c[5] ||= (e) => s.value = e,
493
+ s.value ? (o(), p("div", Me, [d(w("input", {
494
+ "onUpdate:modelValue": n[5] ||= (e) => c.value = e,
495
495
  type: "text",
496
496
  class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
497
497
  style: {
@@ -499,38 +499,38 @@ var _e = {
499
499
  "background-color": "var(--tpl-bg)",
500
500
  color: "var(--tpl-text)"
501
501
  },
502
- placeholder: f(i).mediaLibrary.folderName,
502
+ placeholder: D(a).mediaLibrary.folderName,
503
503
  autofocus: "",
504
- onKeydown: [m(d, ["enter"]), m(b(h, ["stop"]), ["escape"])],
505
- onBlur: d
506
- }, null, 40, Ne), [[T, s.value]])])) : y("", !0),
507
- !a.value && e.canCreateFolder ? (o(), v("button", {
504
+ onKeydown: [h(u, ["enter"]), h(S(f, ["stop"]), ["escape"])],
505
+ onBlur: u
506
+ }, null, 40, Ne), [[E, c.value]])])) : v("", !0),
507
+ !s.value && t.canCreateFolder ? (o(), p("button", {
508
508
  key: 1,
509
509
  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",
510
510
  style: { color: "var(--tpl-text-muted)" },
511
511
  onClick: l
512
- }, [p(f(re), {
512
+ }, [M(D(ee), {
513
513
  size: 14,
514
514
  "stroke-width": 1.5
515
- }), M(" " + A(f(i).mediaLibrary.newFolder), 1)])) : y("", !0),
516
- c[7] ||= E("div", { class: "tpl:flex-1" }, null, -1),
517
- e.hasFrequentlyUsed ? (o(), v("button", {
515
+ }), m(" " + g(D(a).mediaLibrary.newFolder), 1)])) : v("", !0),
516
+ n[7] ||= w("div", { class: "tpl:flex-1" }, null, -1),
517
+ t.hasFrequentlyUsed ? (o(), p("button", {
518
518
  key: 2,
519
519
  "data-testid": "media-frequently-used",
520
520
  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",
521
- style: x({
521
+ style: j({
522
522
  borderColor: "var(--tpl-border)",
523
- backgroundColor: e.viewMode === "frequently-used" ? "var(--tpl-bg-active)" : "transparent",
524
- color: e.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
523
+ backgroundColor: t.viewMode === "frequently-used" ? "var(--tpl-bg-active)" : "transparent",
524
+ color: t.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
525
525
  }),
526
- onClick: c[6] ||= (e) => n("showFrequentlyUsed")
527
- }, [p(f(G), {
526
+ onClick: n[6] ||= (e) => r("showFrequentlyUsed")
527
+ }, [M(D(ce), {
528
528
  size: 14,
529
529
  "stroke-width": 1.5
530
- }), M(" " + A(f(i).mediaLibrary.frequentlyUsed), 1)], 4)) : y("", !0)
530
+ }), m(" " + g(D(a).mediaLibrary.frequentlyUsed), 1)], 4)) : v("", !0)
531
531
  ]));
532
532
  }
533
- }), Fe = /* @__PURE__ */ l({
533
+ }), Fe = /* @__PURE__ */ t({
534
534
  __name: "MediaFileIcon",
535
535
  props: { mimeType: {} },
536
536
  setup(e) {
@@ -630,11 +630,11 @@ var _e = {
630
630
  color: "var(--tpl-text-muted)",
631
631
  bgColor: "var(--tpl-bg-hover)",
632
632
  icon: "document"
633
- }, i = _(() => n[t.mimeType] ?? r);
634
- return (e, t) => (o(), v("div", {
633
+ }, i = O(() => n[t.mimeType] ?? r);
634
+ return (e, t) => (o(), p("div", {
635
635
  class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2",
636
- style: x({ backgroundColor: i.value.bgColor })
637
- }, [i.value.icon === "document" ? (o(), v("svg", {
636
+ style: j({ backgroundColor: i.value.bgColor })
637
+ }, [i.value.icon === "document" ? (o(), p("svg", {
638
638
  key: 0,
639
639
  width: "60",
640
640
  height: "60",
@@ -642,23 +642,23 @@ var _e = {
642
642
  fill: "none",
643
643
  stroke: "currentColor",
644
644
  "stroke-width": "1.5",
645
- style: x({ color: i.value.color })
645
+ style: j({ color: i.value.color })
646
646
  }, [...t[0] ||= [
647
- E("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
648
- E("polyline", { points: "14 2 14 8 20 8" }, null, -1),
649
- E("line", {
647
+ w("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
648
+ w("polyline", { points: "14 2 14 8 20 8" }, null, -1),
649
+ w("line", {
650
650
  x1: "8",
651
651
  y1: "13",
652
652
  x2: "16",
653
653
  y2: "13"
654
654
  }, null, -1),
655
- E("line", {
655
+ w("line", {
656
656
  x1: "8",
657
657
  y1: "17",
658
658
  x2: "12",
659
659
  y2: "17"
660
660
  }, null, -1)
661
- ]], 4)) : i.value.icon === "video" ? (o(), v("svg", {
661
+ ]], 4)) : i.value.icon === "video" ? (o(), p("svg", {
662
662
  key: 1,
663
663
  width: "40",
664
664
  height: "40",
@@ -666,18 +666,18 @@ var _e = {
666
666
  fill: "none",
667
667
  stroke: "currentColor",
668
668
  "stroke-width": "1.5",
669
- style: x({ color: i.value.color })
670
- }, [...t[1] ||= [E("rect", {
669
+ style: j({ color: i.value.color })
670
+ }, [...t[1] ||= [w("rect", {
671
671
  x: "2",
672
672
  y: "4",
673
673
  width: "20",
674
674
  height: "16",
675
675
  rx: "2"
676
- }, null, -1), E("polygon", {
676
+ }, null, -1), w("polygon", {
677
677
  points: "10,8 16,12 10,16",
678
678
  fill: "currentColor",
679
679
  stroke: "none"
680
- }, null, -1)]], 4)) : (o(), v("svg", {
680
+ }, null, -1)]], 4)) : (o(), p("svg", {
681
681
  key: 2,
682
682
  width: "40",
683
683
  height: "40",
@@ -685,23 +685,23 @@ var _e = {
685
685
  fill: "none",
686
686
  stroke: "currentColor",
687
687
  "stroke-width": "1.5",
688
- style: x({ color: i.value.color })
688
+ style: j({ color: i.value.color })
689
689
  }, [...t[2] ||= [
690
- E("path", { d: "M9 18V5l12-2v13" }, null, -1),
691
- E("circle", {
690
+ w("path", { d: "M9 18V5l12-2v13" }, null, -1),
691
+ w("circle", {
692
692
  cx: "6",
693
693
  cy: "18",
694
694
  r: "3"
695
695
  }, null, -1),
696
- E("circle", {
696
+ w("circle", {
697
697
  cx: "18",
698
698
  cy: "16",
699
699
  r: "3"
700
700
  }, null, -1)
701
- ]], 4)), E("span", {
701
+ ]], 4)), w("span", {
702
702
  class: "tpl:text-xs tpl:font-bold tpl:tracking-wider",
703
- style: x({ color: i.value.color })
704
- }, A(i.value.label), 5)], 4));
703
+ style: j({ color: i.value.color })
704
+ }, g(i.value.label), 5)], 4));
705
705
  }
706
706
  });
707
707
  //#endregion
@@ -804,7 +804,7 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
804
804
  }, dt = {
805
805
  key: 4,
806
806
  class: "tpl:flex tpl:justify-center tpl:py-4"
807
- }, ft = /*#__PURE__*/ q(/* @__PURE__ */ l({
807
+ }, ft = /*#__PURE__*/ q(/* @__PURE__ */ t({
808
808
  __name: "MediaGrid",
809
809
  props: {
810
810
  items: {},
@@ -825,41 +825,41 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
825
825
  "replace",
826
826
  "confirm"
827
827
  ],
828
- setup(e, { emit: t }) {
829
- let i = e, a = t, { isAcceptedMimeType: s, isImageMimeType: l } = Q();
828
+ setup(t, { emit: r }) {
829
+ let a = t, s = r, { isAcceptedMimeType: c, isImageMimeType: l } = Q();
830
830
  function u(e) {
831
831
  return e.mimeType ?? "";
832
832
  }
833
833
  function d(e) {
834
834
  return e.thumbnailUrl ?? e.url;
835
835
  }
836
- function m(e) {
837
- return !i.accept || i.accept.length === 0 || s(u(e), i.accept);
836
+ function f(e) {
837
+ return !a.accept || a.accept.length === 0 || c(u(e), a.accept);
838
838
  }
839
- function g(e) {
840
- return i.canUpdate === !0 && e.canUpdate !== !1;
839
+ function h(e) {
840
+ return a.canUpdate === !0 && e.canUpdate !== !1;
841
841
  }
842
842
  function _(e) {
843
- return i.canReplace === !0 && e.canUpdate !== !1;
843
+ return a.canReplace === !0 && e.canUpdate !== !1;
844
844
  }
845
- function C(e, t) {
846
- t.metaKey || t.ctrlKey ? a("toggle", e.id) : a("select", e);
845
+ function b(e, t) {
846
+ t.metaKey || t.ctrlKey ? s("toggle", e.id) : s("select", e);
847
847
  }
848
- function w(e) {
849
- m(e) && a("confirm", e);
848
+ function x(e) {
849
+ f(e) && s("confirm", e);
850
850
  }
851
851
  function T(e, t) {
852
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), a("select", e));
852
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), s("select", e));
853
853
  }
854
- function D(e) {
855
- return i.selectedIds.has(e.id);
854
+ function E(e) {
855
+ return a.selectedIds.has(e.id);
856
856
  }
857
857
  function O(e) {
858
- return D(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
858
+ return E(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
859
859
  }
860
- let { t: j } = Z(), N = n(X, null), P = c(null);
860
+ let { t: k } = Z(), N = n(X, null), P = e(null);
861
861
  R(P, ([{ isIntersecting: e }]) => {
862
- e && i.hasMore && !i.isLoading && a("loadMore");
862
+ e && a.hasMore && !a.isLoading && s("loadMore");
863
863
  }, { threshold: .1 });
864
864
  function F(e) {
865
865
  return Ie(e, N?.value, {
@@ -868,123 +868,123 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
868
868
  day: "numeric"
869
869
  });
870
870
  }
871
- return (t, n) => (o(), v("div", Re, [
872
- e.isLoading && e.items.length === 0 ? (o(), v("div", {
871
+ return (e, n) => (o(), p("div", Re, [
872
+ t.isLoading && t.items.length === 0 ? (o(), p("div", {
873
873
  key: 0,
874
874
  role: "status",
875
875
  "aria-busy": "true",
876
- "aria-label": f(j).mediaLibrary.loading,
877
- class: h(e.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
878
- }, [(o(), v(k, null, r(8, (t) => E("div", {
879
- key: t,
880
- class: h(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
876
+ "aria-label": D(k).mediaLibrary.loading,
877
+ class: C(t.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
878
+ }, [(o(), p(A, null, i(8, (e) => w("div", {
879
+ key: e,
880
+ class: C(["tpl-pulse tpl:rounded-lg", t.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
881
881
  style: { "background-color": "var(--tpl-bg-hover)" },
882
882
  "aria-hidden": "true"
883
- }, null, 2)), 64))], 10, ze)) : e.items.length === 0 ? (o(), v("div", Be, [p(f(V), {
883
+ }, null, 2)), 64))], 10, ze)) : t.items.length === 0 ? (o(), p("div", Be, [M(D(B), {
884
884
  class: "tpl:mb-3",
885
885
  size: 40,
886
886
  "stroke-width": 1,
887
887
  style: { color: "var(--tpl-text-dim)" }
888
- }), E("p", Ve, A(e.searchQuery ? f(j).mediaLibrary.noSearchResults : f(j).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (o(), v("div", {
888
+ }), w("p", Ve, g(t.searchQuery ? D(k).mediaLibrary.noSearchResults : D(k).mediaLibrary.noFiles), 1)])) : t.layout === "list" ? (o(), p("div", {
889
889
  key: 3,
890
890
  role: "listbox",
891
- "aria-label": f(j).mediaLibrary.filesListAriaLabel,
891
+ "aria-label": D(k).mediaLibrary.filesListAriaLabel,
892
892
  "aria-multiselectable": "true",
893
893
  class: "tpl:flex tpl:flex-col tpl:gap-1"
894
- }, [(o(!0), v(k, null, r(e.items, (e) => (o(), v("div", {
894
+ }, [(o(!0), p(A, null, i(t.items, (e) => (o(), p("div", {
895
895
  key: e.id,
896
896
  role: "option",
897
897
  tabindex: "0",
898
898
  "data-testid": "media-library-item",
899
- class: h(["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", [!m(e) && !D(e) ? "tpl:opacity-60" : ""]]),
899
+ class: C(["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", [!f(e) && !E(e) ? "tpl:opacity-60" : ""]]),
900
900
  "data-media-id": e.id,
901
- "aria-selected": D(e),
901
+ "aria-selected": E(e),
902
902
  "aria-label": e.filename || e.url,
903
- style: x({ backgroundColor: D(e) ? "var(--tpl-bg-hover)" : "transparent" }),
904
- onClick: (t) => C(e, t),
905
- onDblclick: (t) => w(e),
903
+ style: j({ backgroundColor: E(e) ? "var(--tpl-bg-hover)" : "transparent" }),
904
+ onClick: (t) => b(e, t),
905
+ onDblclick: (t) => x(e),
906
906
  onKeydown: (t) => T(e, t)
907
907
  }, [
908
- E("div", nt, [f(l)(u(e)) ? (o(), v("img", {
908
+ w("div", nt, [D(l)(u(e)) ? (o(), p("img", {
909
909
  key: 0,
910
910
  src: d(e),
911
911
  alt: e.filename || e.url,
912
912
  class: "tpl:size-full tpl:object-cover",
913
913
  loading: "lazy"
914
- }, null, 8, rt)) : (o(), v("div", it, [p(Fe, { "mime-type": u(e) }, null, 8, ["mime-type"])]))]),
915
- E("div", at, [E("p", ot, A(e.filename || e.url), 1), E("p", st, [
916
- e.size == null ? y("", !0) : (o(), v(k, { key: 0 }, [M(A(f($)(e.size)), 1)], 64)),
917
- e.createdAt ? (o(), v(k, { key: 1 }, [e.size == null ? y("", !0) : (o(), v(k, { key: 0 }, [M(" · ")], 64)), M(" " + A(F(e.createdAt)), 1)], 64)) : y("", !0),
918
- f(l)(u(e)) && e.width && e.height ? (o(), v(k, { key: 2 }, [M(" · " + A(e.width) + "×" + A(e.height), 1)], 64)) : y("", !0)
914
+ }, null, 8, rt)) : (o(), p("div", it, [M(Fe, { "mime-type": u(e) }, null, 8, ["mime-type"])]))]),
915
+ w("div", at, [w("p", ot, g(e.filename || e.url), 1), w("p", st, [
916
+ e.size == null ? v("", !0) : (o(), p(A, { key: 0 }, [m(g(D($)(e.size)), 1)], 64)),
917
+ e.createdAt ? (o(), p(A, { key: 1 }, [e.size == null ? v("", !0) : (o(), p(A, { key: 0 }, [m(" · ")], 64)), m(" " + g(F(e.createdAt)), 1)], 64)) : v("", !0),
918
+ D(l)(u(e)) && e.width && e.height ? (o(), p(A, { key: 2 }, [m(" · " + g(e.width) + "×" + g(e.height), 1)], 64)) : v("", !0)
919
919
  ])]),
920
- E("div", { class: h(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", O(e)]) }, [g(e) ? (o(), v("button", {
920
+ w("div", { class: C(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", O(e)]) }, [h(e) ? (o(), p("button", {
921
921
  key: 0,
922
922
  type: "button",
923
923
  "data-testid": "media-edit",
924
924
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
925
925
  style: { color: "var(--tpl-text-muted)" },
926
- title: f(j).mediaLibrary.editFile,
927
- "aria-label": f(j).mediaLibrary.editFile,
928
- onClick: b((t) => a("edit", e), ["stop"])
929
- }, [p(f(W), {
926
+ title: D(k).mediaLibrary.editFile,
927
+ "aria-label": D(k).mediaLibrary.editFile,
928
+ onClick: S((t) => s("edit", e), ["stop"])
929
+ }, [M(D(V), {
930
930
  size: 12,
931
931
  "stroke-width": 2
932
- })], 8, ct)) : y("", !0), _(e) ? (o(), v("button", {
932
+ })], 8, ct)) : v("", !0), _(e) ? (o(), p("button", {
933
933
  key: 1,
934
934
  type: "button",
935
935
  "data-testid": "media-replace",
936
936
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
937
937
  style: { color: "var(--tpl-text-muted)" },
938
- title: f(j).mediaLibrary.replaceFile,
939
- "aria-label": f(j).mediaLibrary.replaceFile,
940
- onClick: b((t) => a("replace", e), ["stop"])
941
- }, [p(f(B), {
938
+ title: D(k).mediaLibrary.replaceFile,
939
+ "aria-label": D(k).mediaLibrary.replaceFile,
940
+ onClick: S((t) => s("replace", e), ["stop"])
941
+ }, [M(D(H), {
942
942
  size: 12,
943
943
  "stroke-width": 2
944
- })], 8, lt)) : y("", !0)], 2),
945
- D(e) ? (o(), v("div", ut, [p(f(ue), {
944
+ })], 8, lt)) : v("", !0)], 2),
945
+ E(e) ? (o(), p("div", ut, [M(D(ue), {
946
946
  size: 12,
947
947
  "stroke-width": 3
948
- })])) : y("", !0)
949
- ], 46, tt))), 128))], 8, et)) : (o(), v("div", {
948
+ })])) : v("", !0)
949
+ ], 46, tt))), 128))], 8, et)) : (o(), p("div", {
950
950
  key: 2,
951
951
  role: "listbox",
952
- "aria-label": f(j).mediaLibrary.filesListAriaLabel,
952
+ "aria-label": D(k).mediaLibrary.filesListAriaLabel,
953
953
  "aria-multiselectable": "true",
954
954
  class: "tpl:grid tpl:grid-cols-4 tpl:gap-3"
955
- }, [(o(!0), v(k, null, r(e.items, (e) => (o(), v("div", {
955
+ }, [(o(!0), p(A, null, i(t.items, (e) => (o(), p("div", {
956
956
  key: e.id,
957
957
  role: "option",
958
958
  tabindex: "0",
959
959
  "data-testid": "media-library-item",
960
- class: h(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
960
+ class: C(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
961
961
  "tpl:cursor-pointer",
962
- !m(e) && !D(e) ? "tpl:opacity-60" : "",
963
- D(e) ? "tpl-media-item--selected" : ""
962
+ !f(e) && !E(e) ? "tpl:opacity-60" : "",
963
+ E(e) ? "tpl-media-item--selected" : ""
964
964
  ]]),
965
965
  "data-media-id": e.id,
966
- "aria-selected": D(e),
966
+ "aria-selected": E(e),
967
967
  "aria-label": e.filename || e.url,
968
- style: x({
969
- borderColor: D(e) ? "var(--tpl-primary)" : "transparent",
970
- backgroundColor: !m(e) && !D(e) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
968
+ style: j({
969
+ borderColor: E(e) ? "var(--tpl-primary)" : "transparent",
970
+ backgroundColor: !f(e) && !E(e) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
971
971
  }),
972
- onClick: (t) => C(e, t),
973
- onDblclick: (t) => w(e),
972
+ onClick: (t) => b(e, t),
973
+ onDblclick: (t) => x(e),
974
974
  onKeydown: (t) => T(e, t)
975
975
  }, [
976
- E("div", We, [f(l)(u(e)) ? (o(), v("img", {
976
+ w("div", We, [D(l)(u(e)) ? (o(), p("img", {
977
977
  key: 0,
978
978
  src: d(e),
979
979
  alt: e.filename || e.url,
980
980
  class: "tpl:size-full tpl:object-cover",
981
981
  loading: "lazy"
982
- }, null, 8, Ge)) : (o(), S(Fe, {
982
+ }, null, 8, Ge)) : (o(), y(Fe, {
983
983
  key: 1,
984
984
  "mime-type": u(e)
985
985
  }, null, 8, ["mime-type"]))]),
986
- E("div", Ke, [E("p", qe, A(e.filename || e.url), 1), E("p", Je, [e.size == null ? y("", !0) : (o(), v("span", Ye, A(f($)(e.size)), 1)), f(l)(u(e)) && e.width && e.height ? (o(), v("span", Xe, A(e.width) + "×" + A(e.height), 1)) : y("", !0)])]),
987
- E("div", { class: h(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", O(e)]) }, [g(e) ? (o(), v("button", {
986
+ w("div", Ke, [w("p", qe, g(e.filename || e.url), 1), w("p", Je, [e.size == null ? v("", !0) : (o(), p("span", Ye, g(D($)(e.size)), 1)), D(l)(u(e)) && e.width && e.height ? (o(), p("span", Xe, g(e.width) + "×" + g(e.height), 1)) : v("", !0)])]),
987
+ w("div", { class: C(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", O(e)]) }, [h(e) ? (o(), p("button", {
988
988
  key: 0,
989
989
  type: "button",
990
990
  "data-testid": "media-edit",
@@ -993,13 +993,13 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
993
993
  "background-color": "var(--tpl-overlay)",
994
994
  color: "var(--tpl-on-primary)"
995
995
  },
996
- title: f(j).mediaLibrary.editFile,
997
- "aria-label": f(j).mediaLibrary.editFile,
998
- onClick: b((t) => a("edit", e), ["stop"])
999
- }, [p(f(W), {
996
+ title: D(k).mediaLibrary.editFile,
997
+ "aria-label": D(k).mediaLibrary.editFile,
998
+ onClick: S((t) => s("edit", e), ["stop"])
999
+ }, [M(D(V), {
1000
1000
  size: 11,
1001
1001
  "stroke-width": 2
1002
- })], 8, Ze)) : y("", !0), _(e) ? (o(), v("button", {
1002
+ })], 8, Ze)) : v("", !0), _(e) ? (o(), p("button", {
1003
1003
  key: 1,
1004
1004
  type: "button",
1005
1005
  "data-testid": "media-replace",
@@ -1008,29 +1008,29 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1008
1008
  "background-color": "var(--tpl-overlay)",
1009
1009
  color: "var(--tpl-on-primary)"
1010
1010
  },
1011
- title: f(j).mediaLibrary.replaceFile,
1012
- "aria-label": f(j).mediaLibrary.replaceFile,
1013
- onClick: b((t) => a("replace", e), ["stop"])
1014
- }, [p(f(B), {
1011
+ title: D(k).mediaLibrary.replaceFile,
1012
+ "aria-label": D(k).mediaLibrary.replaceFile,
1013
+ onClick: S((t) => s("replace", e), ["stop"])
1014
+ }, [M(D(H), {
1015
1015
  size: 11,
1016
1016
  "stroke-width": 2
1017
- })], 8, Qe)) : y("", !0)], 2),
1018
- D(e) ? (o(), v("div", $e, [p(f(ue), {
1017
+ })], 8, Qe)) : v("", !0)], 2),
1018
+ E(e) ? (o(), p("div", $e, [M(D(ue), {
1019
1019
  size: 12,
1020
1020
  "stroke-width": 3
1021
- })])) : y("", !0)
1021
+ })])) : v("", !0)
1022
1022
  ], 46, Ue))), 128))], 8, He)),
1023
- E("div", {
1023
+ w("div", {
1024
1024
  ref_key: "sentinelRef",
1025
1025
  ref: P,
1026
1026
  class: "tpl:h-4"
1027
1027
  }, null, 512),
1028
- e.isLoading && e.items.length > 0 ? (o(), v("div", dt, [p(f(H), {
1028
+ t.isLoading && t.items.length > 0 ? (o(), p("div", dt, [M(D(G), {
1029
1029
  class: "tpl-spinner",
1030
1030
  size: 20,
1031
1031
  "stroke-width": 2,
1032
1032
  style: { color: "var(--tpl-primary)" }
1033
- })])) : y("", !0)
1033
+ })])) : v("", !0)
1034
1034
  ]));
1035
1035
  }
1036
1036
  }), [["__scopeId", "data-v-57c35946"]]), pt = ["data-tpl-theme"], mt = {
@@ -1052,7 +1052,7 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1052
1052
  }, vt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, yt = ["disabled"], bt = ["disabled"], xt = {
1053
1053
  key: 0,
1054
1054
  class: "tpl:flex tpl:items-center tpl:gap-1.5"
1055
- }, St = { key: 1 }, Ct = /* @__PURE__ */ l({
1055
+ }, St = { key: 1 }, Ct = /* @__PURE__ */ t({
1056
1056
  __name: "MediaImportUrlModal",
1057
1057
  props: {
1058
1058
  visible: { type: Boolean },
@@ -1060,24 +1060,24 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1060
1060
  error: {}
1061
1061
  },
1062
1062
  emits: ["import", "close"],
1063
- setup(e, { emit: r }) {
1064
- let a = e, s = r, { t: l } = Z(), d = n(Y, null), m = n(J, c(null)), x = c("");
1065
- t(() => a.visible, (e) => {
1066
- e && (x.value = "");
1063
+ setup(t, { emit: r }) {
1064
+ let i = t, a = r, { t: s } = Z(), c = n(Y, null), f = n(J, e(null)), h = e("");
1065
+ u(() => i.visible, (e) => {
1066
+ e && (h.value = "");
1067
1067
  });
1068
- function w() {
1069
- let e = x.value.trim();
1070
- e && !a.isImporting && s("import", e);
1068
+ function b() {
1069
+ let e = h.value.trim();
1070
+ e && !i.isImporting && a("import", e);
1071
1071
  }
1072
- function D() {
1073
- a.isImporting || s("close");
1072
+ function x() {
1073
+ i.isImporting || a("close");
1074
1074
  }
1075
- let O = c(null);
1076
- ge(O, _(() => a.visible));
1077
- function k(e) {
1078
- e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), w()), e.key === "Escape" && D();
1075
+ let k = e(null);
1076
+ ge(k, O(() => i.visible));
1077
+ function A(e) {
1078
+ e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), b()), e.key === "Escape" && x();
1079
1079
  }
1080
- return (t, n) => (o(), S(g, { to: f(m) || "body" }, [p(C, {
1080
+ return (e, n) => (o(), y(_, { to: D(f) || "body" }, [M(T, {
1081
1081
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
1082
1082
  "enter-from-class": "tpl:opacity-0",
1083
1083
  "enter-to-class": "tpl:opacity-100",
@@ -1085,63 +1085,63 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1085
1085
  "leave-from-class": "tpl:opacity-100",
1086
1086
  "leave-to-class": "tpl:opacity-0"
1087
1087
  }, {
1088
- default: i(() => [e.visible ? (o(), v("div", {
1088
+ default: l(() => [t.visible ? (o(), p("div", {
1089
1089
  key: 0,
1090
- "data-tpl-theme": f(d),
1091
- class: h([f(m) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
1090
+ "data-tpl-theme": D(c),
1091
+ class: C([D(f) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
1092
1092
  style: { "background-color": "var(--tpl-overlay)" },
1093
- onClick: b(D, ["self"]),
1094
- onKeydown: k
1095
- }, [E("div", {
1093
+ onClick: S(x, ["self"]),
1094
+ onKeydown: A
1095
+ }, [w("div", {
1096
1096
  ref_key: "dialogRef",
1097
- ref: O,
1097
+ ref: k,
1098
1098
  role: "dialog",
1099
1099
  "aria-modal": "true",
1100
1100
  "aria-labelledby": "tpl-media-import-title",
1101
1101
  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",
1102
1102
  style: { "background-color": "var(--tpl-bg-elevated)" }
1103
1103
  }, [
1104
- E("h3", mt, A(f(l).mediaLibrary.importFromUrl), 1),
1105
- E("div", ht, [u(E("input", {
1106
- "onUpdate:modelValue": n[0] ||= (e) => x.value = e,
1104
+ w("h3", mt, g(D(s).mediaLibrary.importFromUrl), 1),
1105
+ w("div", ht, [d(w("input", {
1106
+ "onUpdate:modelValue": n[0] ||= (e) => h.value = e,
1107
1107
  type: "url",
1108
- "aria-label": f(l).mediaLibrary.importFromUrl,
1109
- "aria-invalid": !!e.error,
1110
- "aria-describedby": e.error ? "tpl-media-import-error" : void 0,
1108
+ "aria-label": D(s).mediaLibrary.importFromUrl,
1109
+ "aria-invalid": !!t.error,
1110
+ "aria-describedby": t.error ? "tpl-media-import-error" : void 0,
1111
1111
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
1112
1112
  style: {
1113
1113
  "border-color": "var(--tpl-border)",
1114
1114
  "background-color": "var(--tpl-bg)",
1115
1115
  color: "var(--tpl-text)"
1116
1116
  },
1117
- placeholder: f(l).mediaLibrary.importUrlPlaceholder,
1118
- disabled: e.isImporting,
1117
+ placeholder: D(s).mediaLibrary.importUrlPlaceholder,
1118
+ disabled: t.isImporting,
1119
1119
  autofocus: ""
1120
- }, null, 8, gt), [[T, x.value]])]),
1121
- e.error ? (o(), v("p", _t, A(e.error), 1)) : y("", !0),
1122
- E("div", vt, [E("button", {
1123
- class: h(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150", { "tpl:cursor-not-allowed tpl:opacity-50": e.isImporting }]),
1120
+ }, null, 8, gt), [[E, h.value]])]),
1121
+ t.error ? (o(), p("p", _t, g(t.error), 1)) : v("", !0),
1122
+ w("div", vt, [w("button", {
1123
+ class: C(["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 }]),
1124
1124
  style: {
1125
1125
  "border-color": "var(--tpl-border)",
1126
1126
  color: "var(--tpl-text)",
1127
1127
  "background-color": "var(--tpl-bg)"
1128
1128
  },
1129
- disabled: e.isImporting,
1130
- onClick: D
1131
- }, A(f(l).mediaLibrary.cancel), 11, yt), E("button", {
1129
+ disabled: t.isImporting,
1130
+ onClick: x
1131
+ }, g(D(s).mediaLibrary.cancel), 11, yt), w("button", {
1132
1132
  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",
1133
1133
  style: {
1134
1134
  "background-color": "var(--tpl-primary)",
1135
1135
  color: "var(--tpl-on-primary)"
1136
1136
  },
1137
- disabled: !x.value.trim() || e.isImporting,
1138
- onClick: w
1139
- }, [e.isImporting ? (o(), v("span", xt, [p(f(H), {
1137
+ disabled: !h.value.trim() || t.isImporting,
1138
+ onClick: b
1139
+ }, [t.isImporting ? (o(), p("span", xt, [M(D(G), {
1140
1140
  class: "tpl:animate-spin",
1141
1141
  size: 12,
1142
1142
  "stroke-width": 2
1143
- }), M(" " + A(f(l).mediaLibrary.importing), 1)])) : (o(), v("span", St, A(f(l).mediaLibrary.import), 1))], 8, bt)])
1144
- ], 512)], 42, pt)) : y("", !0)]),
1143
+ }), m(" " + g(D(s).mediaLibrary.importing), 1)])) : (o(), p("span", St, g(D(s).mediaLibrary.import), 1))], 8, bt)])
1144
+ ], 512)], 42, pt)) : v("", !0)]),
1145
1145
  _: 1
1146
1146
  })], 8, ["to"]));
1147
1147
  }
@@ -1149,62 +1149,62 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1149
1149
  key: 0,
1150
1150
  class: "tpl:shrink-0",
1151
1151
  style: { color: "var(--tpl-text-dim)" }
1152
- }, Ot = /* @__PURE__ */ l({
1152
+ }, Ot = /* @__PURE__ */ t({
1153
1153
  __name: "MediaMovePicker",
1154
1154
  props: {
1155
1155
  folders: {},
1156
1156
  currentFolderId: {}
1157
1157
  },
1158
1158
  emits: ["select", "close"],
1159
- setup(e, { emit: t }) {
1160
- let n = t, { t: i } = Z(), a = c(null);
1161
- function s(e, t = 0) {
1159
+ setup(t, { emit: n }) {
1160
+ let r = n, { t: a } = Z(), s = e(null);
1161
+ function c(e, t = 0) {
1162
1162
  let n = [];
1163
1163
  for (let r of e) n.push({
1164
1164
  id: r.id,
1165
1165
  name: r.name,
1166
1166
  depth: t
1167
- }), r.children.length && n.push(...s(r.children, t + 1));
1167
+ }), r.children.length && n.push(...c(r.children, t + 1));
1168
1168
  return n;
1169
1169
  }
1170
- return z(a, () => {
1171
- n("close");
1172
- }), (t, c) => (o(), v("div", {
1170
+ return z(s, () => {
1171
+ r("close");
1172
+ }), (e, n) => (o(), p("div", {
1173
1173
  ref_key: "pickerRef",
1174
- ref: a,
1174
+ ref: s,
1175
1175
  "data-testid": "media-move-picker",
1176
1176
  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",
1177
1177
  style: {
1178
1178
  "border-color": "var(--tpl-border)",
1179
1179
  "background-color": "var(--tpl-bg-elevated)"
1180
1180
  }
1181
- }, [E("div", wt, [e.currentFolderId === null ? y("", !0) : (o(), v("button", {
1181
+ }, [w("div", wt, [t.currentFolderId === null ? v("", !0) : (o(), p("button", {
1182
1182
  key: 0,
1183
1183
  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",
1184
1184
  style: { color: "var(--tpl-text)" },
1185
- onClick: c[0] ||= (e) => n("select", null)
1186
- }, [p(f(V), {
1185
+ onClick: n[0] ||= (e) => r("select", null)
1186
+ }, [M(D(B), {
1187
1187
  class: "tpl:shrink-0",
1188
1188
  size: 14,
1189
1189
  "stroke-width": 1.5
1190
- }), M(" " + A(f(i).mediaLibrary.moveToRoot), 1)])), (o(!0), v(k, null, r(s(e.folders), (t) => (o(), v("button", {
1191
- key: t.id,
1190
+ }), m(" " + g(D(a).mediaLibrary.moveToRoot), 1)])), (o(!0), p(A, null, i(c(t.folders), (e) => (o(), p("button", {
1191
+ key: e.id,
1192
1192
  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",
1193
- style: x({
1194
- paddingLeft: `${t.depth * 16 + 12}px`,
1195
- color: t.id === e.currentFolderId ? "var(--tpl-text-dim)" : "var(--tpl-text)",
1196
- opacity: t.id === e.currentFolderId ? .5 : 1
1193
+ style: j({
1194
+ paddingLeft: `${e.depth * 16 + 12}px`,
1195
+ color: e.id === t.currentFolderId ? "var(--tpl-text-dim)" : "var(--tpl-text)",
1196
+ opacity: e.id === t.currentFolderId ? .5 : 1
1197
1197
  }),
1198
- disabled: t.id === e.currentFolderId,
1199
- onClick: (e) => n("select", t.id)
1198
+ disabled: e.id === t.currentFolderId,
1199
+ onClick: (t) => r("select", e.id)
1200
1200
  }, [
1201
- p(f(K), {
1201
+ M(D(U), {
1202
1202
  class: "tpl:shrink-0",
1203
1203
  size: 14,
1204
1204
  "stroke-width": 1.5
1205
1205
  }),
1206
- E("span", Et, A(t.name), 1),
1207
- t.id === e.currentFolderId ? (o(), v("span", Dt, A(f(i).mediaLibrary.currentFolder), 1)) : y("", !0)
1206
+ w("span", Et, g(e.name), 1),
1207
+ e.id === t.currentFolderId ? (o(), p("span", Dt, g(D(a).mediaLibrary.currentFolder), 1)) : v("", !0)
1208
1208
  ], 12, Tt))), 128))])], 512));
1209
1209
  }
1210
1210
  }), kt = { class: "tpl:flex tpl:items-center tpl:gap-3" }, At = ["src", "alt"], jt = {
@@ -1217,7 +1217,7 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1217
1217
  }, Pt = {
1218
1218
  class: "tpl:mt-0.5 tpl:text-[10px]",
1219
1219
  style: { color: "var(--tpl-text-muted)" }
1220
- }, Ft = /*#__PURE__*/ q(/* @__PURE__ */ l({
1220
+ }, Ft = /*#__PURE__*/ q(/* @__PURE__ */ t({
1221
1221
  __name: "MediaPreviewPanel",
1222
1222
  props: {
1223
1223
  item: {},
@@ -1236,11 +1236,11 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1236
1236
  }
1237
1237
  return null;
1238
1238
  }
1239
- let s = _(() => {
1239
+ let s = O(() => {
1240
1240
  if (!t.item.folderId || !t.folders) return null;
1241
1241
  let e = a(t.folders, t.item.folderId);
1242
1242
  return e ? e.join("/") : null;
1243
- }), c = _(() => t.item.mimeType ?? ""), l = _(() => i(c.value));
1243
+ }), c = O(() => t.item.mimeType ?? ""), l = O(() => i(c.value));
1244
1244
  function u(e) {
1245
1245
  return Ie(e, r?.value, {
1246
1246
  year: "numeric",
@@ -1248,37 +1248,37 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1248
1248
  day: "numeric"
1249
1249
  });
1250
1250
  }
1251
- let d = _(() => t.item.filename || t.item.url);
1252
- return (t, n) => (o(), v("div", kt, [l.value ? (o(), v("img", {
1251
+ let d = O(() => t.item.filename || t.item.url);
1252
+ return (t, n) => (o(), p("div", kt, [l.value ? (o(), p("img", {
1253
1253
  key: 0,
1254
1254
  src: e.item.url,
1255
1255
  alt: e.item.alt || d.value,
1256
1256
  class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
1257
1257
  style: { border: "1px solid var(--tpl-border)" }
1258
- }, null, 8, At)) : (o(), v("div", jt, [p(Fe, {
1258
+ }, null, 8, At)) : (o(), p("div", jt, [M(Fe, {
1259
1259
  "mime-type": c.value,
1260
1260
  class: "tpl-preview-icon"
1261
- }, null, 8, ["mime-type"])])), E("div", Mt, [
1262
- E("p", Nt, A(d.value), 1),
1263
- E("p", Pt, [
1264
- e.item.size == null ? y("", !0) : (o(), v(k, { key: 0 }, [M(A(f($)(e.item.size)), 1)], 64)),
1265
- e.item.createdAt ? (o(), v(k, { key: 1 }, [e.item.size == null ? y("", !0) : (o(), v(k, { key: 0 }, [M(" · ")], 64)), M(" " + A(u(e.item.createdAt)), 1)], 64)) : y("", !0),
1266
- l.value && e.item.width && e.item.height ? (o(), v(k, { key: 2 }, [M(" · " + A(e.item.width) + "×" + A(e.item.height) + "px ", 1)], 64)) : y("", !0),
1267
- s.value ? (o(), v(k, { key: 3 }, [
1268
- n[0] ||= M(" · ", -1),
1269
- p(f(K), {
1261
+ }, null, 8, ["mime-type"])])), w("div", Mt, [
1262
+ w("p", Nt, g(d.value), 1),
1263
+ w("p", Pt, [
1264
+ e.item.size == null ? v("", !0) : (o(), p(A, { key: 0 }, [m(g(D($)(e.item.size)), 1)], 64)),
1265
+ e.item.createdAt ? (o(), p(A, { key: 1 }, [e.item.size == null ? v("", !0) : (o(), p(A, { key: 0 }, [m(" · ")], 64)), m(" " + g(u(e.item.createdAt)), 1)], 64)) : v("", !0),
1266
+ l.value && e.item.width && e.item.height ? (o(), p(A, { key: 2 }, [m(" · " + g(e.item.width) + "×" + g(e.item.height) + "px ", 1)], 64)) : v("", !0),
1267
+ s.value ? (o(), p(A, { key: 3 }, [
1268
+ n[0] ||= m(" · ", -1),
1269
+ M(D(U), {
1270
1270
  class: "tpl:mb-px tpl:inline",
1271
1271
  size: 9,
1272
1272
  "stroke-width": 2
1273
1273
  }),
1274
- M(" " + A(s.value), 1)
1275
- ], 64)) : y("", !0)
1274
+ m(" " + g(s.value), 1)
1275
+ ], 64)) : v("", !0)
1276
1276
  ]),
1277
- l.value ? (o(), v("p", {
1277
+ l.value ? (o(), p("p", {
1278
1278
  key: 0,
1279
- class: h(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !e.item.alt }]),
1279
+ class: C(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !e.item.alt }]),
1280
1280
  style: { color: "var(--tpl-text-dim)" }
1281
- }, A(e.item.alt || "\xA0"), 3)) : y("", !0)
1281
+ }, g(e.item.alt || "\xA0"), 3)) : v("", !0)
1282
1282
  ])]));
1283
1283
  }
1284
1284
  }), [["__scopeId", "data-v-50993988"]]), It = ["data-tpl-theme"], Lt = {
@@ -1311,7 +1311,7 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1311
1311
  role: "alert",
1312
1312
  class: "tpl:mb-3 tpl:text-xs",
1313
1313
  style: { color: "var(--tpl-danger)" }
1314
- }, Kt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, qt = ["disabled"], Jt = ["disabled"], Yt = /* @__PURE__ */ l({
1314
+ }, Kt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, qt = ["disabled"], Jt = ["disabled"], Yt = /* @__PURE__ */ t({
1315
1315
  __name: "MediaReplaceModal",
1316
1316
  props: {
1317
1317
  visible: { type: Boolean },
@@ -1321,28 +1321,28 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1321
1321
  error: {}
1322
1322
  },
1323
1323
  emits: ["replace", "close"],
1324
- setup(e, { emit: r }) {
1325
- let a = e, s = r, { t: l } = Z(), u = n(Y, null), d = n(J, c(null)), m = c(null), x = c(null), w = _(() => {
1326
- if (!a.item) return "";
1327
- let e = (a.item.filename ?? "").split(".");
1324
+ setup(t, { emit: r }) {
1325
+ let i = t, a = r, { t: s } = Z(), c = n(Y, null), d = n(J, e(null)), f = e(null), m = e(null), h = O(() => {
1326
+ if (!i.item) return "";
1327
+ let e = (i.item.filename ?? "").split(".");
1328
1328
  return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
1329
- }), T = _(() => w.value ? `.${w.value}` : "*"), D = _(() => (a.usageInfo?.templateCount ?? 0) > 0);
1330
- t(() => a.visible, (e) => {
1331
- e || (x.value = null, m.value && (m.value.value = ""));
1329
+ }), b = O(() => h.value ? `.${h.value}` : "*"), x = O(() => (i.usageInfo?.templateCount ?? 0) > 0);
1330
+ u(() => i.visible, (e) => {
1331
+ e || (m.value = null, f.value && (f.value.value = ""));
1332
1332
  });
1333
- function O(e) {
1333
+ function E(e) {
1334
1334
  let t = e.target;
1335
- t.files && t.files.length > 0 && (x.value = t.files[0]);
1335
+ t.files && t.files.length > 0 && (m.value = t.files[0]);
1336
1336
  }
1337
1337
  function k() {
1338
- x.value && s("replace", x.value);
1338
+ m.value && a("replace", m.value);
1339
1339
  }
1340
- let j = c(null);
1341
- ge(j, _(() => a.visible && a.item !== null));
1342
- function M(e) {
1343
- e.stopPropagation(), e.key === "Escape" && s("close");
1340
+ let A = e(null);
1341
+ ge(A, O(() => i.visible && i.item !== null));
1342
+ function j(e) {
1343
+ e.stopPropagation(), e.key === "Escape" && a("close");
1344
1344
  }
1345
- return (t, n) => (o(), S(g, { to: f(d) || "body" }, [p(C, {
1345
+ return (e, n) => (o(), y(_, { to: D(d) || "body" }, [M(T, {
1346
1346
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
1347
1347
  "enter-from-class": "tpl:opacity-0",
1348
1348
  "enter-to-class": "tpl:opacity-100",
@@ -1350,61 +1350,61 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1350
1350
  "leave-from-class": "tpl:opacity-100",
1351
1351
  "leave-to-class": "tpl:opacity-0"
1352
1352
  }, {
1353
- default: i(() => [e.visible && e.item ? (o(), v("div", {
1353
+ default: l(() => [t.visible && t.item ? (o(), p("div", {
1354
1354
  key: 0,
1355
- "data-tpl-theme": f(u),
1356
- class: h([f(d) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
1355
+ "data-tpl-theme": D(c),
1356
+ class: C([D(d) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
1357
1357
  style: { "background-color": "var(--tpl-overlay)" },
1358
- onClick: n[1] ||= b((e) => s("close"), ["self"]),
1359
- onKeydown: M
1360
- }, [E("div", {
1358
+ onClick: n[1] ||= S((e) => a("close"), ["self"]),
1359
+ onKeydown: j
1360
+ }, [w("div", {
1361
1361
  ref_key: "dialogRef",
1362
- ref: j,
1362
+ ref: A,
1363
1363
  role: "dialog",
1364
1364
  "aria-modal": "true",
1365
1365
  "aria-labelledby": "tpl-media-replace-title",
1366
1366
  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",
1367
1367
  style: { "background-color": "var(--tpl-bg-elevated)" }
1368
1368
  }, [
1369
- E("h3", Lt, A(f(l).mediaLibrary.replaceWarningTitle), 1),
1370
- E("p", Rt, A(f(l).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${w.value}`)), 1),
1371
- D.value ? (o(), v("p", zt, A(f(l).mediaLibrary.replaceWarningUsageNote.replace("{count}", e.usageInfo.templateCount.toString())), 1)) : y("", !0),
1372
- E("div", Bt, [E("p", Vt, A(e.item.filename), 1)]),
1373
- E("div", Ht, [E("label", Ut, A(f(l).mediaLibrary.replaceSelectFile), 1), E("input", {
1369
+ w("h3", Lt, g(D(s).mediaLibrary.replaceWarningTitle), 1),
1370
+ w("p", Rt, g(D(s).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${h.value}`)), 1),
1371
+ x.value ? (o(), p("p", zt, g(D(s).mediaLibrary.replaceWarningUsageNote.replace("{count}", t.usageInfo.templateCount.toString())), 1)) : v("", !0),
1372
+ w("div", Bt, [w("p", Vt, g(t.item.filename), 1)]),
1373
+ w("div", Ht, [w("label", Ut, g(D(s).mediaLibrary.replaceSelectFile), 1), w("input", {
1374
1374
  ref_key: "fileInputRef",
1375
- ref: m,
1375
+ ref: f,
1376
1376
  type: "file",
1377
- accept: T.value,
1378
- "aria-invalid": !!e.error,
1379
- "aria-describedby": e.error ? "tpl-media-replace-error" : void 0,
1377
+ accept: b.value,
1378
+ "aria-invalid": !!t.error,
1379
+ "aria-describedby": t.error ? "tpl-media-replace-error" : void 0,
1380
1380
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs",
1381
1381
  style: {
1382
1382
  "border-color": "var(--tpl-border)",
1383
1383
  "background-color": "var(--tpl-bg)",
1384
1384
  color: "var(--tpl-text)"
1385
1385
  },
1386
- onChange: O
1386
+ onChange: E
1387
1387
  }, null, 40, Wt)]),
1388
- e.error ? (o(), v("p", Gt, A(e.error), 1)) : y("", !0),
1389
- E("div", Kt, [E("button", {
1388
+ t.error ? (o(), p("p", Gt, g(t.error), 1)) : v("", !0),
1389
+ w("div", Kt, [w("button", {
1390
1390
  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",
1391
1391
  style: {
1392
1392
  "border-color": "var(--tpl-border)",
1393
1393
  color: "var(--tpl-text)",
1394
1394
  "background-color": "var(--tpl-bg)"
1395
1395
  },
1396
- disabled: e.isReplacing,
1397
- onClick: n[0] ||= (e) => s("close")
1398
- }, A(f(l).mediaLibrary.cancel), 9, qt), E("button", {
1396
+ disabled: t.isReplacing,
1397
+ onClick: n[0] ||= (e) => a("close")
1398
+ }, g(D(s).mediaLibrary.cancel), 9, qt), w("button", {
1399
1399
  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",
1400
1400
  style: {
1401
1401
  "background-color": "var(--tpl-primary)",
1402
1402
  color: "var(--tpl-on-primary)"
1403
1403
  },
1404
- disabled: !x.value || e.isReplacing,
1404
+ disabled: !m.value || t.isReplacing,
1405
1405
  onClick: k
1406
- }, A(e.isReplacing ? f(l).mediaLibrary.replacing : f(l).mediaLibrary.replace), 9, Jt)])
1407
- ], 512)], 42, It)) : y("", !0)]),
1406
+ }, g(t.isReplacing ? D(s).mediaLibrary.replacing : D(s).mediaLibrary.replace), 9, Jt)])
1407
+ ], 512)], 42, It)) : v("", !0)]),
1408
1408
  _: 1
1409
1409
  })], 8, ["to"]));
1410
1410
  }
@@ -1449,71 +1449,71 @@ var Zt = [
1449
1449
  role: "alert",
1450
1450
  class: "tpl:mt-1.5 tpl:text-xs tpl:break-words",
1451
1451
  style: { color: "var(--tpl-danger)" }
1452
- }, rn = /* @__PURE__ */ l({
1452
+ }, rn = /* @__PURE__ */ t({
1453
1453
  __name: "MediaUploadZone",
1454
1454
  props: {
1455
1455
  isUploading: { type: Boolean },
1456
1456
  uploadProgress: {}
1457
1457
  },
1458
1458
  emits: ["upload"],
1459
- setup(e, { emit: t }) {
1460
- let r = t, { t: i, format: a } = Z(), s = n(X, null), { allAcceptedInputString: l, restrictsMimeTypes: u, availableCategories: d, maxFileSize: m, isAcceptedFile: g } = Q(), b = {
1459
+ setup(t, { emit: r }) {
1460
+ let i = r, { t: a, format: s } = Z(), c = n(X, null), { allAcceptedInputString: l, restrictsMimeTypes: u, availableCategories: d, maxFileSize: f, isAcceptedFile: m } = Q(), h = {
1461
1461
  images: "filterImages",
1462
1462
  documents: "filterDocuments",
1463
1463
  videos: "filterVideos",
1464
1464
  audio: "filterAudio"
1465
- }, x = _(() => {
1466
- let e = i.mediaLibrary, t = u.value ? Xt(d.value.map((t) => e[b[t]]), s?.value) : i.mediaLibrary.acceptedAnyType;
1467
- return Number.isFinite(m.value) ? a(i.mediaLibrary.acceptedFormatsMaxSize, {
1465
+ }, _ = O(() => {
1466
+ let e = a.mediaLibrary, t = u.value ? Xt(d.value.map((t) => e[h[t]]), c?.value) : a.mediaLibrary.acceptedAnyType;
1467
+ return Number.isFinite(f.value) ? s(a.mediaLibrary.acceptedFormatsMaxSize, {
1468
1468
  formats: t,
1469
- size: $(m.value)
1469
+ size: $(f.value)
1470
1470
  }) : t;
1471
- }), S = c([]), C = c();
1472
- function w(e) {
1471
+ }), y = e([]), b = e();
1472
+ function x(e) {
1473
1473
  let t = [], n = [];
1474
- for (let r of Array.from(e)) g(r) ? t.push(r) : n.push(r.name);
1475
- S.value = n, t.length && r("upload", t);
1474
+ for (let r of Array.from(e)) m(r) ? t.push(r) : n.push(r.name);
1475
+ y.value = n, t.length && i("upload", t);
1476
1476
  }
1477
- let { isOverDropZone: T } = L(C, { onDrop: (e) => {
1478
- e?.length && w(e);
1479
- } }), { open: D, onChange: O } = I({
1477
+ let { isOverDropZone: S } = L(b, { onDrop: (e) => {
1478
+ e?.length && x(e);
1479
+ } }), { open: T, onChange: E } = I({
1480
1480
  accept: l.value,
1481
1481
  multiple: !0
1482
1482
  });
1483
- return O((e) => {
1484
- e?.length && w(e);
1485
- }), (t, n) => (o(), v(k, null, [E("button", {
1483
+ return E((e) => {
1484
+ e?.length && x(e);
1485
+ }), (e, n) => (o(), p(A, null, [w("button", {
1486
1486
  ref_key: "dropZoneRef",
1487
- ref: C,
1487
+ ref: b,
1488
1488
  type: "button",
1489
1489
  "data-testid": "media-upload-zone",
1490
- class: h(["tpl-upload-zone tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-lg tpl:border-2 tpl:border-dashed tpl:p-5 tpl:text-center tpl:transition-all tpl:duration-150", f(T) ? "tpl-upload-zone-active" : ""]),
1491
- "aria-label": f(i).mediaLibrary.dropOrClick,
1492
- "aria-describedby": e.isUploading ? void 0 : "tpl-media-upload-hint",
1493
- "aria-busy": e.isUploading,
1490
+ class: C(["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", D(S) ? "tpl-upload-zone-active" : ""]),
1491
+ "aria-label": D(a).mediaLibrary.dropOrClick,
1492
+ "aria-describedby": t.isUploading ? void 0 : "tpl-media-upload-hint",
1493
+ "aria-busy": t.isUploading,
1494
1494
  style: {
1495
1495
  "border-color": "var(--tpl-border-light)",
1496
1496
  "background-color": "var(--tpl-bg)"
1497
1497
  },
1498
- onClick: n[0] ||= (e) => f(D)()
1499
- }, [e.isUploading ? (o(), v("div", Qt, [p(f(H), {
1498
+ onClick: n[0] ||= (e) => D(T)()
1499
+ }, [t.isUploading ? (o(), p("div", Qt, [M(D(G), {
1500
1500
  class: "tpl-spinner",
1501
1501
  size: 20,
1502
1502
  "stroke-width": 2,
1503
1503
  style: { color: "var(--tpl-primary)" }
1504
- }), E("span", $t, A(e.uploadProgress && e.uploadProgress.total > 1 ? f(a)(f(i).mediaLibrary.uploadingProgress, {
1505
- current: e.uploadProgress.current,
1506
- total: e.uploadProgress.total
1507
- }) : f(i).mediaLibrary.uploading), 1)])) : (o(), v(k, { key: 1 }, [
1508
- p(f(ae), {
1504
+ }), w("span", $t, g(t.uploadProgress && t.uploadProgress.total > 1 ? D(s)(D(a).mediaLibrary.uploadingProgress, {
1505
+ current: t.uploadProgress.current,
1506
+ total: t.uploadProgress.total
1507
+ }) : D(a).mediaLibrary.uploading), 1)])) : (o(), p(A, { key: 1 }, [
1508
+ M(D(K), {
1509
1509
  class: "tpl:mb-2",
1510
1510
  size: 24,
1511
1511
  "stroke-width": 1.5,
1512
1512
  style: { color: "var(--tpl-text-dim)" }
1513
1513
  }),
1514
- E("p", en, A(f(i).mediaLibrary.dropOrClick), 1),
1515
- E("p", tn, A(x.value), 1)
1516
- ], 64))], 10, Zt), S.value.length ? (o(), v("p", nn, A(f(a)(f(i).mediaLibrary.uploadRejected, { files: S.value.join(", ") })), 1)) : y("", !0)], 64));
1514
+ w("p", en, g(D(a).mediaLibrary.dropOrClick), 1),
1515
+ w("p", tn, g(_.value), 1)
1516
+ ], 64))], 10, Zt), y.value.length ? (o(), p("p", nn, g(D(s)(D(a).mediaLibrary.uploadRejected, { files: y.value.join(", ") })), 1)) : v("", !0)], 64));
1517
1517
  }
1518
1518
  }), an = ["aria-label"], on = [
1519
1519
  "width",
@@ -1539,52 +1539,52 @@ var Zt = [
1539
1539
  "background-color": "var(--tpl-text)",
1540
1540
  color: "var(--tpl-bg-elevated)"
1541
1541
  }
1542
- }, un = /* @__PURE__ */ l({
1542
+ }, un = /* @__PURE__ */ t({
1543
1543
  __name: "StorageProgressRing",
1544
1544
  props: {
1545
1545
  usedBytes: {},
1546
1546
  limitBytes: {},
1547
1547
  size: {}
1548
1548
  },
1549
- setup(e) {
1550
- let t = e, { t: n, format: r } = Z(), a = c(!1), s = _(() => t.size ?? 24), l = _(() => Math.max(2, s.value / 8)), u = _(() => (s.value - l.value) / 2), d = _(() => 2 * Math.PI * u.value), f = _(() => t.limitBytes <= 0 ? 0 : Math.min(100, t.usedBytes / t.limitBytes * 100)), m = _(() => d.value - f.value / 100 * d.value), h = _(() => f.value >= 95 ? "var(--tpl-danger)" : f.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)"), g = _(() => $(t.usedBytes)), b = _(() => $(t.limitBytes)), x = _(() => Math.max(0, t.limitBytes - t.usedBytes)), S = _(() => $(x.value)), w = _(() => r(n.mediaLibrary.storageTooltip, {
1551
- used: g.value,
1549
+ setup(t) {
1550
+ let n = t, { t: r, format: i } = Z(), a = e(!1), s = O(() => n.size ?? 24), c = O(() => Math.max(2, s.value / 8)), u = O(() => (s.value - c.value) / 2), d = O(() => 2 * Math.PI * u.value), f = O(() => n.limitBytes <= 0 ? 0 : Math.min(100, n.usedBytes / n.limitBytes * 100)), h = O(() => d.value - f.value / 100 * d.value), _ = O(() => f.value >= 95 ? "var(--tpl-danger)" : f.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)"), y = O(() => $(n.usedBytes)), b = O(() => $(n.limitBytes)), x = O(() => Math.max(0, n.limitBytes - n.usedBytes)), S = O(() => $(x.value)), C = O(() => i(r.mediaLibrary.storageTooltip, {
1551
+ used: y.value,
1552
1552
  total: b.value,
1553
1553
  remaining: S.value
1554
1554
  }));
1555
- return (e, t) => (o(), v("div", {
1555
+ return (e, t) => (o(), p("div", {
1556
1556
  "data-testid": "media-storage-ring",
1557
1557
  class: "tpl:relative tpl:inline-flex tpl:cursor-help tpl:items-center tpl:justify-center",
1558
1558
  tabindex: "0",
1559
- "aria-label": w.value,
1559
+ "aria-label": C.value,
1560
1560
  onMouseenter: t[0] ||= (e) => a.value = !0,
1561
1561
  onMouseleave: t[1] ||= (e) => a.value = !1,
1562
1562
  onFocus: t[2] ||= (e) => a.value = !0,
1563
1563
  onBlur: t[3] ||= (e) => a.value = !1
1564
- }, [(o(), v("svg", {
1564
+ }, [(o(), p("svg", {
1565
1565
  width: s.value,
1566
1566
  height: s.value,
1567
1567
  class: "tpl:-rotate-90",
1568
1568
  viewBox: `0 0 ${s.value} ${s.value}`
1569
- }, [E("circle", {
1569
+ }, [w("circle", {
1570
1570
  cx: s.value / 2,
1571
1571
  cy: s.value / 2,
1572
1572
  r: u.value,
1573
1573
  fill: "none",
1574
- "stroke-width": l.value,
1574
+ "stroke-width": c.value,
1575
1575
  style: { stroke: "var(--tpl-border)" }
1576
- }, null, 8, sn), E("circle", {
1576
+ }, null, 8, sn), w("circle", {
1577
1577
  cx: s.value / 2,
1578
1578
  cy: s.value / 2,
1579
1579
  r: u.value,
1580
1580
  fill: "none",
1581
- "stroke-width": l.value,
1582
- stroke: h.value,
1581
+ "stroke-width": c.value,
1582
+ stroke: _.value,
1583
1583
  "stroke-linecap": "round",
1584
1584
  "stroke-dasharray": d.value,
1585
- "stroke-dashoffset": m.value,
1585
+ "stroke-dashoffset": h.value,
1586
1586
  class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
1587
- }, null, 8, cn)], 8, on)), p(C, {
1587
+ }, null, 8, cn)], 8, on)), M(T, {
1588
1588
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
1589
1589
  "enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
1590
1590
  "enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
@@ -1592,10 +1592,10 @@ var Zt = [
1592
1592
  "leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
1593
1593
  "leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
1594
1594
  }, {
1595
- default: i(() => [a.value ? (o(), v("div", ln, [M(A(w.value) + " ", 1), t[4] ||= E("div", {
1595
+ default: l(() => [a.value ? (o(), p("div", ln, [m(g(C.value) + " ", 1), t[4] ||= w("div", {
1596
1596
  class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
1597
1597
  style: { "background-color": "var(--tpl-text)" }
1598
- }, null, -1)])) : y("", !0)]),
1598
+ }, null, -1)])) : v("", !0)]),
1599
1599
  _: 1
1600
1600
  })], 40, an));
1601
1601
  }
@@ -1617,56 +1617,56 @@ function dn(e) {
1617
1617
  }
1618
1618
  //#endregion
1619
1619
  //#region ../media-library/src/composables/useMediaLibraryUI.ts
1620
- function fn(e) {
1621
- let { library: n, translations: r } = e;
1620
+ function fn(t) {
1621
+ let { library: n, translations: r } = t;
1622
1622
  function i() {
1623
1623
  return "value" in r && typeof r.value == "object" ? r.value : r;
1624
1624
  }
1625
- let a = c("grid"), o = c(!1), s = c(""), l = c(null), u = c(!1), d = c(!1), f = _(() => n.previewItem.value?.url ?? null), p = _(() => n.frequentlyUsedItems.value.length > 0), m = _(() => n.viewMode.value === "frequently-used" ? n.frequentlyUsedItems.value : n.items.value), h = _(() => Object.values(n.deleteUsageInfo.value).some((e) => e.templateCount > 0)), g = _(() => dn(n.folders.value)), v = {
1625
+ let a = e("grid"), o = e(!1), s = e(""), c = e(null), l = e(!1), d = e(!1), f = O(() => n.previewItem.value?.url ?? null), p = O(() => n.frequentlyUsedItems.value.length > 0), m = O(() => n.viewMode.value === "frequently-used" ? n.frequentlyUsedItems.value : n.items.value), h = O(() => Object.values(n.deleteUsageInfo.value).some((e) => e.templateCount > 0)), g = O(() => dn(n.folders.value)), _ = {
1626
1626
  images: () => i().mediaLibrary.filterImages,
1627
1627
  documents: () => i().mediaLibrary.filterDocuments,
1628
1628
  videos: () => i().mediaLibrary.filterVideos,
1629
1629
  audio: () => i().mediaLibrary.filterAudio
1630
1630
  };
1631
- function y(e) {
1632
- return v[e]?.() ?? e;
1631
+ function v(e) {
1632
+ return _[e]?.() ?? e;
1633
1633
  }
1634
- t(o, (e) => {
1634
+ u(o, (e) => {
1635
1635
  e && n.loadFolders();
1636
1636
  });
1637
- let b = N((e) => {
1637
+ let y = N((e) => {
1638
1638
  n.search(e);
1639
1639
  }, 300);
1640
- function x(e) {
1641
- s.value = e, b(e);
1640
+ function b(e) {
1641
+ s.value = e, y(e);
1642
1642
  }
1643
- let { copy: S, copied: C } = F({
1643
+ let { copy: x, copied: S } = F({
1644
1644
  copiedDuring: 2e3,
1645
1645
  legacy: !0
1646
1646
  });
1647
- async function w(e) {
1647
+ async function C(e) {
1648
1648
  await n.uploadFiles(e);
1649
1649
  }
1650
- function T(e) {
1650
+ function w(e) {
1651
1651
  n.selectItem(e);
1652
1652
  }
1653
- async function E(e, t) {
1653
+ async function T(e, t) {
1654
1654
  await n.createFolder(e, t);
1655
1655
  }
1656
- async function D(e, t) {
1656
+ async function E(e, t) {
1657
1657
  await n.renameFolder(e, t);
1658
1658
  }
1659
- async function O(e) {
1659
+ async function D(e) {
1660
1660
  await n.deleteFolder(e);
1661
1661
  }
1662
1662
  function k(e) {
1663
- l.value = e;
1663
+ c.value = e;
1664
1664
  }
1665
1665
  async function A(e, t, r, i) {
1666
- return i && !await n.replaceMediaDirectly(e, i.file) ? "failed" : await n.updateFile(e, t, r) ? (l.value = null, "saved") : i ? "replaced" : "failed";
1666
+ return i && !await n.replaceMediaDirectly(e, i.file) ? "failed" : await n.updateFile(e, t, r) ? (c.value = null, "saved") : i ? "replaced" : "failed";
1667
1667
  }
1668
1668
  async function j(e) {
1669
- await n.importFromUrl(e) && (u.value = !1);
1669
+ await n.importFromUrl(e) && (l.value = !1);
1670
1670
  }
1671
1671
  async function M(e) {
1672
1672
  d.value = !1, await n.moveSelected(e);
@@ -1681,29 +1681,29 @@ function fn(e) {
1681
1681
  await n.replaceFile(e);
1682
1682
  }
1683
1683
  function R() {
1684
- n.clearSelection(), n.cancelDelete(), n.cancelReplace(), s.value = "", n.searchQuery.value = "", n.categoryFilter.value = null, n.sortOption.value = "newest", n.viewMode.value = "files", l.value = null, u.value = !1;
1684
+ n.clearSelection(), n.cancelDelete(), n.cancelReplace(), s.value = "", n.searchQuery.value = "", n.categoryFilter.value = null, n.sortOption.value = "newest", n.viewMode.value = "files", c.value = null, l.value = !1;
1685
1685
  }
1686
1686
  return {
1687
1687
  layoutMode: a,
1688
1688
  showSidebar: o,
1689
1689
  searchInput: s,
1690
- editingItem: l,
1691
- showImportUrlModal: u,
1690
+ editingItem: c,
1691
+ showImportUrlModal: l,
1692
1692
  showMovePicker: d,
1693
1693
  selectedUrl: f,
1694
1694
  hasFrequentlyUsed: p,
1695
1695
  displayItems: m,
1696
1696
  hasUsedFiles: h,
1697
1697
  folderTree: g,
1698
- copy: S,
1699
- copied: C,
1700
- getCategoryLabel: y,
1701
- handleSearchInput: x,
1702
- handleUpload: w,
1703
- handleSelect: T,
1704
- handleCreateFolder: E,
1705
- handleRenameFolder: D,
1706
- handleDeleteFolder: O,
1698
+ copy: x,
1699
+ copied: S,
1700
+ getCategoryLabel: v,
1701
+ handleSearchInput: b,
1702
+ handleUpload: C,
1703
+ handleSelect: w,
1704
+ handleCreateFolder: T,
1705
+ handleRenameFolder: E,
1706
+ handleDeleteFolder: D,
1707
1707
  handleEditItem: k,
1708
1708
  handleEditSave: A,
1709
1709
  handleImportFromUrl: j,
@@ -1716,112 +1716,112 @@ function fn(e) {
1716
1716
  }
1717
1717
  //#endregion
1718
1718
  //#region ../media-library/src/composable.ts
1719
- function pn(e) {
1720
- let { provider: t } = e, n = c([]), r = c([]), i = c(null), a = c("files"), o = c(""), s = c(null), l = c("newest"), u = c(!1), d = c(!1), f = c(!1), p = c(null), m = c(null), h = c(/* @__PURE__ */ new Set()), g = c(null), _ = c([]), v = c({}), y = c(!1), b = c([]), x = c(!1), S = c(null), C = c(!1), w = c(null), T = c(!1), E = c(null), D = c(null), k = c(null), A = 0;
1721
- function j(t) {
1719
+ function pn(t) {
1720
+ let { provider: n } = t, r = e([]), i = e([]), a = e(null), o = e("files"), s = e(""), c = e(null), l = e("newest"), u = e(!1), d = e(!1), f = e(!1), p = e(null), m = e(null), h = e(/* @__PURE__ */ new Set()), g = e(null), _ = e([]), v = e({}), y = e(!1), x = e([]), S = e(!1), C = e(null), w = e(!1), T = e(null), E = e(!1), D = e(null), O = e(null), k = e(null), A = 0;
1721
+ function j(e) {
1722
1722
  try {
1723
- t();
1724
- } catch (t) {
1725
- e.onError?.(t);
1723
+ e();
1724
+ } catch (e) {
1725
+ t.onError?.(e);
1726
1726
  }
1727
1727
  }
1728
1728
  function M() {
1729
- return t.folders === !1 ? null : t.folders;
1729
+ return n.folders === !1 ? null : n.folders;
1730
1730
  }
1731
1731
  function N() {
1732
- return O(e.templateId);
1732
+ return b(t.templateId);
1733
1733
  }
1734
1734
  function P(e) {
1735
1735
  let t = {};
1736
- o.value ? t.search = o.value : i.value != null && (t.folderId = i.value), s.value && (t.category = s.value), e && (t.cursor = e);
1736
+ s.value ? t.search = s.value : a.value != null && (t.folderId = a.value), c.value && (t.category = c.value), e && (t.cursor = e);
1737
1737
  let n = N();
1738
1738
  return n && (t.templateId = n), t;
1739
1739
  }
1740
1740
  async function F() {
1741
- let r = ++A;
1741
+ let e = ++A;
1742
1742
  u.value = !0;
1743
1743
  let i = P();
1744
1744
  try {
1745
- let e = await t.list(i);
1746
- if (r !== A) return;
1747
- n.value = e.items, p.value = e.nextCursor ?? null, f.value = !!e.nextCursor;
1748
- } catch (t) {
1749
- if (r !== A) return;
1750
- e.onError?.(t);
1745
+ let t = await n.list(i);
1746
+ if (e !== A) return;
1747
+ r.value = t.items, p.value = t.nextCursor ?? null, f.value = !!t.nextCursor;
1748
+ } catch (n) {
1749
+ if (e !== A) return;
1750
+ t.onError?.(n);
1751
1751
  } finally {
1752
- r === A && (u.value = !1);
1752
+ e === A && (u.value = !1);
1753
1753
  }
1754
1754
  }
1755
1755
  async function I() {
1756
1756
  if (!f.value || !p.value || u.value) return;
1757
- let r = ++A;
1757
+ let e = ++A;
1758
1758
  u.value = !0;
1759
1759
  let i = P(p.value);
1760
1760
  try {
1761
- let e = await t.list(i);
1762
- if (r !== A) return;
1763
- n.value = [...n.value, ...e.items], p.value = e.nextCursor ?? null, f.value = !!e.nextCursor;
1764
- } catch (t) {
1765
- if (r !== A) return;
1766
- e.onError?.(t);
1761
+ let t = await n.list(i);
1762
+ if (e !== A) return;
1763
+ r.value = [...r.value, ...t.items], p.value = t.nextCursor ?? null, f.value = !!t.nextCursor;
1764
+ } catch (n) {
1765
+ if (e !== A) return;
1766
+ t.onError?.(n);
1767
1767
  } finally {
1768
- r === A && (u.value = !1);
1768
+ e === A && (u.value = !1);
1769
1769
  }
1770
1770
  }
1771
1771
  async function L(e) {
1772
- o.value = e, await F();
1772
+ s.value = e, await F();
1773
1773
  }
1774
1774
  async function R(e) {
1775
- s.value = e, await F();
1775
+ c.value = e, await F();
1776
1776
  }
1777
1777
  async function z(e) {
1778
1778
  l.value = e, await F();
1779
1779
  }
1780
1780
  async function B(e) {
1781
- a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await F();
1781
+ o.value = "files", a.value = e, s.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await F();
1782
1782
  }
1783
- async function ee() {
1784
- a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await U();
1783
+ async function V() {
1784
+ o.value = "frequently-used", a.value = null, s.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await ae();
1785
1785
  }
1786
- async function te(r) {
1787
- let { create: a } = t;
1788
- if (typeof a != "function") return null;
1786
+ async function ee(e) {
1787
+ let { create: i } = n;
1788
+ if (typeof i != "function") return null;
1789
1789
  d.value = !0;
1790
1790
  try {
1791
- let e = { file: r };
1792
- i.value != null && (e.folderId = i.value);
1791
+ let t = { file: e };
1792
+ a.value != null && (t.folderId = a.value);
1793
1793
  let o = N();
1794
- o && (e.templateId = o);
1795
- let s = await a(e);
1796
- return n.value = [s, ...n.value], j(() => t.onCreated?.(s)), s;
1797
- } catch (t) {
1798
- return e.onError?.(t), null;
1794
+ o && (t.templateId = o);
1795
+ let s = await i(t);
1796
+ return r.value = [s, ...r.value], j(() => n.onCreated?.(s)), s;
1797
+ } catch (e) {
1798
+ return t.onError?.(e), null;
1799
1799
  } finally {
1800
1800
  d.value = !1;
1801
1801
  }
1802
1802
  }
1803
- async function ne(r) {
1804
- let { create: a } = t;
1805
- if (typeof a == "function") {
1803
+ async function te(e) {
1804
+ let { create: i } = n;
1805
+ if (typeof i == "function") {
1806
1806
  d.value = !0, m.value = {
1807
1807
  current: 0,
1808
- total: r.length
1808
+ total: e.length
1809
1809
  };
1810
1810
  try {
1811
- for (let o = 0; o < r.length; o++) {
1811
+ for (let o = 0; o < e.length; o++) {
1812
1812
  m.value = {
1813
1813
  current: o + 1,
1814
- total: r.length
1814
+ total: e.length
1815
1815
  };
1816
1816
  try {
1817
- let e = { file: r[o] };
1818
- i.value != null && (e.folderId = i.value);
1817
+ let t = { file: e[o] };
1818
+ a.value != null && (t.folderId = a.value);
1819
1819
  let s = N();
1820
- s && (e.templateId = s);
1821
- let c = await a(e);
1822
- n.value = [c, ...n.value], j(() => t.onCreated?.(c));
1823
- } catch (t) {
1824
- e.onError?.(t);
1820
+ s && (t.templateId = s);
1821
+ let c = await i(t);
1822
+ r.value = [c, ...r.value], j(() => n.onCreated?.(c));
1823
+ } catch (e) {
1824
+ t.onError?.(e);
1825
1825
  }
1826
1826
  }
1827
1827
  } finally {
@@ -1829,209 +1829,209 @@ function pn(e) {
1829
1829
  }
1830
1830
  }
1831
1831
  }
1832
- async function V(t) {
1832
+ async function ne(e) {
1833
1833
  if (h.value.size === 0) return;
1834
- let { move: r } = M() ?? { move: !1 };
1835
- if (typeof r == "function") try {
1836
- let e = await r([...h.value], t);
1837
- if (i.value === null) {
1838
- let t = new Map(e.map((e) => [e.id, e]));
1839
- n.value = n.value.map((e) => t.get(e.id) ?? e);
1840
- } else n.value = n.value.filter((e) => !h.value.has(e.id));
1834
+ let { move: n } = M() ?? { move: !1 };
1835
+ if (typeof n == "function") try {
1836
+ let t = await n([...h.value], e);
1837
+ if (a.value === null) {
1838
+ let e = new Map(t.map((e) => [e.id, e]));
1839
+ r.value = r.value.map((t) => e.get(t.id) ?? t);
1840
+ } else r.value = r.value.filter((e) => !h.value.has(e.id));
1841
1841
  h.value = /* @__PURE__ */ new Set(), g.value = null;
1842
- } catch (t) {
1843
- e.onError?.(t);
1842
+ } catch (e) {
1843
+ t.onError?.(e);
1844
1844
  }
1845
1845
  }
1846
- async function re(r, i, a) {
1847
- let { update: o } = t;
1846
+ async function re(e, i, a) {
1847
+ let { update: o } = n;
1848
1848
  if (typeof o != "function") return !1;
1849
1849
  try {
1850
- let e = { filename: i };
1851
- a !== void 0 && (e.alt = a);
1852
- let s = await o(r, e);
1853
- return n.value = n.value.map((e) => e.id === r ? s : e), g.value?.id === r && (g.value = s), j(() => t.onUpdated?.(s)), !0;
1854
- } catch (t) {
1855
- return e.onError?.(t), !1;
1850
+ let t = { filename: i };
1851
+ a !== void 0 && (t.alt = a);
1852
+ let s = await o(e, t);
1853
+ return r.value = r.value.map((t) => t.id === e ? s : t), g.value?.id === e && (g.value = s), j(() => n.onUpdated?.(s)), !0;
1854
+ } catch (e) {
1855
+ return t.onError?.(e), !1;
1856
1856
  }
1857
1857
  }
1858
1858
  function ie(e) {
1859
1859
  let t = /* @__PURE__ */ new Map();
1860
- for (let r of n.value) e.includes(r.id) && t.set(r.id, r);
1860
+ for (let n of r.value) e.includes(n.id) && t.set(n.id, n);
1861
1861
  for (let n of _.value) e.includes(n.id) && !t.has(n.id) && t.set(n.id, n);
1862
1862
  return [...t.values()];
1863
1863
  }
1864
1864
  function H(e) {
1865
- 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;
1865
+ r.value = r.value.filter((t) => !e.includes(t.id)), _.value = _.value.filter((t) => !e.includes(t.id)), h.value = /* @__PURE__ */ new Set(), g.value = null;
1866
1866
  }
1867
- async function ae() {
1867
+ async function U() {
1868
1868
  if (h.value.size === 0) return;
1869
- let { delete: n } = t;
1870
- if (typeof n != "function") return;
1869
+ let { delete: e } = n;
1870
+ if (typeof e != "function") return;
1871
1871
  let r = [...h.value], i = ie(r);
1872
1872
  try {
1873
- await n(r), H(r);
1874
- for (let e of i) j(() => t.onDeleted?.(e));
1875
- } catch (t) {
1876
- e.onError?.(t);
1873
+ await e(r), H(r);
1874
+ for (let e of i) j(() => n.onDeleted?.(e));
1875
+ } catch (e) {
1876
+ t.onError?.(e);
1877
1877
  }
1878
1878
  }
1879
- async function U() {
1880
- let { frequentlyUsed: n } = t;
1881
- if (typeof n == "function") try {
1882
- _.value = await n();
1883
- } catch (t) {
1884
- e.onError?.(t);
1879
+ async function ae() {
1880
+ let { frequentlyUsed: e } = n;
1881
+ if (typeof e == "function") try {
1882
+ _.value = await e();
1883
+ } catch (e) {
1884
+ t.onError?.(e);
1885
1885
  }
1886
1886
  }
1887
- async function oe() {
1887
+ async function W() {
1888
1888
  if (h.value.size === 0) return !1;
1889
- b.value = [...h.value];
1890
- let { checkUsage: n } = t;
1891
- if (typeof n != "function") return v.value = {}, y.value = !0, !1;
1889
+ x.value = [...h.value];
1890
+ let { checkUsage: e } = n;
1891
+ if (typeof e != "function") return v.value = {}, y.value = !0, !1;
1892
1892
  try {
1893
- let e = await n(b.value);
1894
- v.value = e;
1895
- let t = Object.values(e).some((e) => e.templateCount > 0);
1896
- return y.value = !0, t;
1897
- } catch (t) {
1898
- return e.onError?.(t), !1;
1893
+ let t = await e(x.value);
1894
+ v.value = t;
1895
+ let n = Object.values(t).some((e) => e.templateCount > 0);
1896
+ return y.value = !0, n;
1897
+ } catch (e) {
1898
+ return t.onError?.(e), !1;
1899
1899
  }
1900
1900
  }
1901
- async function se() {
1902
- let { delete: n } = t;
1903
- if (typeof n != "function" || (y.value = !1, b.value.length === 0)) return;
1904
- let r = b.value, i = ie(r);
1901
+ async function oe() {
1902
+ let { delete: e } = n;
1903
+ if (typeof e != "function" || (y.value = !1, x.value.length === 0)) return;
1904
+ let r = x.value, i = ie(r);
1905
1905
  try {
1906
- await n(r), H(r), b.value = [], v.value = {};
1907
- for (let e of i) j(() => t.onDeleted?.(e));
1908
- } catch (t) {
1909
- e.onError?.(t);
1906
+ await e(r), H(r), x.value = [], v.value = {};
1907
+ for (let e of i) j(() => n.onDeleted?.(e));
1908
+ } catch (e) {
1909
+ t.onError?.(e);
1910
1910
  }
1911
1911
  }
1912
- function ce() {
1913
- y.value = !1, b.value = [], v.value = {};
1912
+ function G() {
1913
+ y.value = !1, x.value = [], v.value = {};
1914
1914
  }
1915
- async function W(r) {
1916
- let a = t.importFromUrl;
1917
- if (typeof a != "function") return null;
1918
- x.value = !0, S.value = null;
1915
+ async function K(e) {
1916
+ let i = n.importFromUrl;
1917
+ if (typeof i != "function") return null;
1918
+ S.value = !0, C.value = null;
1919
1919
  try {
1920
- let e = await a(r, i.value, N());
1921
- return n.value = [e, ...n.value], j(() => t.onCreated?.(e)), e;
1922
- } catch (t) {
1923
- return S.value = t instanceof Error ? t.message : "Import failed", e.onError?.(t), null;
1920
+ let t = await i(e, a.value, N());
1921
+ return r.value = [t, ...r.value], j(() => n.onCreated?.(t)), t;
1922
+ } catch (e) {
1923
+ return C.value = e instanceof Error ? e.message : "Import failed", t.onError?.(e), null;
1924
1924
  } finally {
1925
- x.value = !1;
1925
+ S.value = !1;
1926
1926
  }
1927
1927
  }
1928
- function le(e) {
1928
+ function se(e) {
1929
1929
  let t = new Set(h.value);
1930
1930
  t.has(e) ? t.delete(e) : t.add(e), h.value = t;
1931
1931
  }
1932
- function G() {
1932
+ function ce() {
1933
1933
  h.value = /* @__PURE__ */ new Set(), g.value = null;
1934
1934
  }
1935
- function K(e) {
1935
+ function le(e) {
1936
1936
  g.value = e, h.value = /* @__PURE__ */ new Set([e.id]);
1937
1937
  }
1938
1938
  async function ue() {
1939
- let { storage: n } = t;
1940
- if (typeof n != "function") k.value = null;
1939
+ let { storage: e } = n;
1940
+ if (typeof e != "function") k.value = null;
1941
1941
  else try {
1942
- k.value = await n();
1943
- } catch (t) {
1944
- e.onError?.(t);
1942
+ k.value = await e();
1943
+ } catch (e) {
1944
+ t.onError?.(e);
1945
1945
  }
1946
1946
  }
1947
1947
  async function q() {
1948
- let t = M();
1949
- if (t) try {
1950
- r.value = await t.list();
1951
- } catch (t) {
1952
- e.onError?.(t);
1948
+ let e = M();
1949
+ if (e) try {
1950
+ i.value = await e.list();
1951
+ } catch (e) {
1952
+ t.onError?.(e);
1953
1953
  }
1954
1954
  }
1955
- async function de(t, n) {
1955
+ async function de(e, n) {
1956
1956
  let { create: r } = M() ?? { create: !1 };
1957
1957
  if (typeof r != "function") return null;
1958
1958
  try {
1959
- let e = { name: t };
1960
- n !== void 0 && (e.parentId = n);
1961
- let i = await r(e);
1959
+ let t = { name: e };
1960
+ n !== void 0 && (t.parentId = n);
1961
+ let i = await r(t);
1962
1962
  return await q(), i;
1963
- } catch (t) {
1964
- return e.onError?.(t), null;
1963
+ } catch (e) {
1964
+ return t.onError?.(e), null;
1965
1965
  }
1966
1966
  }
1967
1967
  function J(e, t) {
1968
1968
  for (let n of e) if (n.id === t) return n;
1969
1969
  return null;
1970
1970
  }
1971
- async function fe(t, n) {
1971
+ async function fe(e, n) {
1972
1972
  let { update: r } = M() ?? { update: !1 };
1973
1973
  if (typeof r == "function") try {
1974
- await r(t, { name: n }), await q();
1975
- } catch (t) {
1976
- e.onError?.(t);
1974
+ await r(e, { name: n }), await q();
1975
+ } catch (e) {
1976
+ t.onError?.(e);
1977
1977
  }
1978
1978
  }
1979
- async function Y(t) {
1979
+ async function Y(e) {
1980
1980
  let { delete: n } = M() ?? { delete: !1 };
1981
1981
  if (typeof n == "function") try {
1982
- let e = J(r.value, t)?.parentId ?? null;
1983
- await n(t), i.value === t && (i.value = e), await q(), await F();
1984
- } catch (t) {
1985
- e.onError?.(t);
1982
+ let t = J(i.value, e)?.parentId ?? null;
1983
+ await n(e), a.value === e && (a.value = t), await q(), await F();
1984
+ } catch (e) {
1985
+ t.onError?.(e);
1986
1986
  }
1987
1987
  }
1988
- async function X(n) {
1989
- E.value = n, w.value = null;
1990
- let { checkUsage: r } = t;
1991
- if (typeof r != "function") D.value = null, T.value = !0;
1988
+ async function X(e) {
1989
+ D.value = e, T.value = null;
1990
+ let { checkUsage: r } = n;
1991
+ if (typeof r != "function") O.value = null, E.value = !0;
1992
1992
  else try {
1993
- let e = await r([n.id]);
1994
- D.value = e[n.id] ?? null, T.value = !0;
1995
- } catch (t) {
1996
- e.onError?.(t);
1993
+ let t = await r([e.id]);
1994
+ O.value = t[e.id] ?? null, E.value = !0;
1995
+ } catch (e) {
1996
+ t.onError?.(e);
1997
1997
  }
1998
1998
  }
1999
1999
  function pe() {
2000
- T.value = !1, E.value = null, D.value = null, w.value = null;
2000
+ E.value = !1, D.value = null, O.value = null, T.value = null;
2001
2001
  }
2002
2002
  function Z(e) {
2003
- 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));
2003
+ r.value = r.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(() => n.onUpdated?.(e));
2004
2004
  }
2005
- async function me(n) {
2006
- let { replace: r } = t;
2007
- if (typeof r != "function" || !E.value) return null;
2008
- C.value = !0, w.value = null;
2005
+ async function me(e) {
2006
+ let { replace: r } = n;
2007
+ if (typeof r != "function" || !D.value) return null;
2008
+ w.value = !0, T.value = null;
2009
2009
  try {
2010
- let e = await r(E.value.id, n);
2011
- return Z(e), T.value = !1, E.value = null, D.value = null, e;
2012
- } catch (t) {
2013
- return w.value = t instanceof Error ? t.message : "Replace failed", e.onError?.(t), null;
2010
+ let t = await r(D.value.id, e);
2011
+ return Z(t), E.value = !1, D.value = null, O.value = null, t;
2012
+ } catch (e) {
2013
+ return T.value = e instanceof Error ? e.message : "Replace failed", t.onError?.(e), null;
2014
2014
  } finally {
2015
- C.value = !1;
2015
+ w.value = !1;
2016
2016
  }
2017
2017
  }
2018
- async function Q(n, r) {
2019
- let { replace: i } = t;
2018
+ async function Q(e, r) {
2019
+ let { replace: i } = n;
2020
2020
  if (typeof i != "function") return null;
2021
2021
  try {
2022
- let e = await i(n, r);
2023
- return Z(e), e;
2024
- } catch (t) {
2025
- return e.onError?.(t), null;
2022
+ let t = await i(e, r);
2023
+ return Z(t), t;
2024
+ } catch (e) {
2025
+ return t.onError?.(e), null;
2026
2026
  }
2027
2027
  }
2028
2028
  return {
2029
- items: n,
2030
- folders: r,
2031
- currentFolderId: i,
2032
- viewMode: a,
2033
- searchQuery: o,
2034
- categoryFilter: s,
2029
+ items: r,
2030
+ folders: i,
2031
+ currentFolderId: a,
2032
+ viewMode: o,
2033
+ searchQuery: s,
2034
+ categoryFilter: c,
2035
2035
  sortOption: l,
2036
2036
  isLoading: u,
2037
2037
  isUploading: d,
@@ -2048,32 +2048,32 @@ function pn(e) {
2048
2048
  filterByCategory: R,
2049
2049
  sortBy: z,
2050
2050
  navigateToFolder: B,
2051
- showFrequentlyUsed: ee,
2052
- uploadFile: te,
2053
- uploadFiles: ne,
2054
- moveSelected: V,
2051
+ showFrequentlyUsed: V,
2052
+ uploadFile: ee,
2053
+ uploadFiles: te,
2054
+ moveSelected: ne,
2055
2055
  updateFile: re,
2056
- deleteSelected: ae,
2057
- isImportingFromUrl: x,
2058
- importFromUrlError: S,
2059
- importFromUrl: W,
2060
- toggleSelection: le,
2061
- clearSelection: G,
2062
- selectItem: K,
2056
+ deleteSelected: U,
2057
+ isImportingFromUrl: S,
2058
+ importFromUrlError: C,
2059
+ importFromUrl: K,
2060
+ toggleSelection: se,
2061
+ clearSelection: ce,
2062
+ selectItem: le,
2063
2063
  loadFolders: q,
2064
2064
  createFolder: de,
2065
2065
  renameFolder: fe,
2066
2066
  deleteFolder: Y,
2067
2067
  findFolderInTree: J,
2068
- loadFrequentlyUsed: U,
2069
- checkUsageBeforeDelete: oe,
2070
- confirmDelete: se,
2071
- cancelDelete: ce,
2072
- isReplacing: C,
2073
- replaceError: w,
2074
- showReplaceWarning: T,
2075
- pendingReplaceItem: E,
2076
- replaceUsageInfo: D,
2068
+ loadFrequentlyUsed: ae,
2069
+ checkUsageBeforeDelete: W,
2070
+ confirmDelete: oe,
2071
+ cancelDelete: G,
2072
+ isReplacing: w,
2073
+ replaceError: T,
2074
+ showReplaceWarning: E,
2075
+ pendingReplaceItem: D,
2076
+ replaceUsageInfo: O,
2077
2077
  checkUsageBeforeReplace: X,
2078
2078
  cancelReplace: pe,
2079
2079
  replaceFile: me,
@@ -2159,7 +2159,7 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2159
2159
  }, Jn = {
2160
2160
  key: 1,
2161
2161
  class: "tpl:relative"
2162
- }, Yn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Xn = ["data-testid", "disabled"], Zn = /* @__PURE__ */ l({
2162
+ }, Yn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Xn = ["data-testid", "disabled"], Zn = /* @__PURE__ */ t({
2163
2163
  __name: "MediaLibraryChrome",
2164
2164
  props: {
2165
2165
  provider: {},
@@ -2176,110 +2176,110 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2176
2176
  "confirm",
2177
2177
  "ready"
2178
2178
  ],
2179
- setup(n, { expose: a, emit: c }) {
2180
- let l = n, u = c, d = j(() => import("./MediaEditModal-DD0SZ-S3.js")), m = _(() => l.translations), g = _(() => l.confirmTestId ?? "media-confirm"), w = {
2179
+ setup(e, { expose: t, emit: n }) {
2180
+ let a = e, s = n, d = c(() => import("./MediaEditModal-BuHCiyMu.js")), f = O(() => a.translations), h = O(() => a.confirmTestId ?? "media-confirm"), _ = {
2181
2181
  get maxFileSize() {
2182
- return l.provider.maxFileSize;
2182
+ return a.provider.maxFileSize;
2183
2183
  },
2184
2184
  get mimeTypes() {
2185
- return l.provider.mimeTypes;
2185
+ return a.provider.mimeTypes;
2186
2186
  },
2187
2187
  get accept() {
2188
- return l.accept;
2188
+ return a.accept;
2189
2189
  }
2190
2190
  };
2191
- s(de, w);
2192
- let { isAcceptedMimeType: T, availableCategories: D } = Q(w), O = pn({
2193
- provider: l.provider,
2194
- templateId: () => l.templateId,
2195
- onError: (e) => l.onError?.(e)
2191
+ r(de, _);
2192
+ let { isAcceptedMimeType: b, availableCategories: E } = Q(_), k = pn({
2193
+ provider: a.provider,
2194
+ templateId: () => a.templateId,
2195
+ onError: (e) => a.onError?.(e)
2196
2196
  }), N = fn({
2197
- library: O,
2198
- translations: m
2199
- }), P = _(() => typeof l.provider.create == "function"), F = _(() => l.provider.folders !== !1), I = _(() => typeof l.provider.importFromUrl == "function"), L = _(() => typeof l.provider.delete == "function"), R = _(() => typeof l.provider.update == "function"), z = _(() => typeof l.provider.replace == "function"), B = _(() => typeof l.provider.frequentlyUsed == "function"), ee = _(() => {
2200
- let e = l.provider.folders;
2197
+ library: k,
2198
+ translations: f
2199
+ }), P = O(() => typeof a.provider.create == "function"), F = O(() => a.provider.folders !== !1), I = O(() => typeof a.provider.importFromUrl == "function"), L = O(() => typeof a.provider.delete == "function"), R = O(() => typeof a.provider.update == "function"), z = O(() => typeof a.provider.replace == "function"), B = O(() => typeof a.provider.frequentlyUsed == "function"), V = O(() => {
2200
+ let e = a.provider.folders;
2201
2201
  return e !== !1 && typeof e.move == "function";
2202
- }), V = _(() => {
2203
- let e = l.provider.folders;
2202
+ }), ee = O(() => {
2203
+ let e = a.provider.folders;
2204
2204
  return e !== !1 && typeof e.create == "function";
2205
- }), re = _(() => {
2206
- let e = l.provider.folders;
2205
+ }), te = O(() => {
2206
+ let e = a.provider.folders;
2207
2207
  return e !== !1 && typeof e.update == "function";
2208
- }), H = _(() => {
2209
- let e = l.provider.folders;
2208
+ }), H = O(() => {
2209
+ let e = a.provider.folders;
2210
2210
  return e !== !1 && typeof e.delete == "function";
2211
- }), ae = _(() => O.isLoading.value && N.displayItems.value.length === 0), U = _(() => {
2212
- let e = O.previewItem.value;
2213
- return e ? !l.accept?.length || T(e.mimeType ?? "", l.accept) : !1;
2214
- }), W = _(() => {
2211
+ }), U = O(() => k.isLoading.value && N.displayItems.value.length === 0), W = O(() => {
2212
+ let e = k.previewItem.value;
2213
+ return e ? !a.accept?.length || b(e.mimeType ?? "", a.accept) : !1;
2214
+ }), G = O(() => {
2215
2215
  if (!L.value) return 0;
2216
2216
  let e = 0;
2217
- for (let t of O.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
2217
+ for (let t of k.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
2218
2218
  return e;
2219
- }), G = _(() => N.showImportUrlModal.value || N.editingItem.value !== null || O.showReplaceWarning.value);
2220
- function K() {
2221
- return G.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : O.showDeleteWarning.value ? (O.cancelDelete(), !0) : !1;
2219
+ }), K = O(() => N.showImportUrlModal.value || N.editingItem.value !== null || k.showReplaceWarning.value);
2220
+ function ce() {
2221
+ return K.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : k.showDeleteWarning.value ? (k.cancelDelete(), !0) : !1;
2222
2222
  }
2223
2223
  function q() {
2224
- U.value && O.previewItem.value && u("confirm", O.previewItem.value);
2224
+ W.value && k.previewItem.value && s("confirm", k.previewItem.value);
2225
2225
  }
2226
2226
  function J(e) {
2227
- O.filterByCategory(e.target.value || null);
2227
+ k.filterByCategory(e.target.value || null);
2228
2228
  }
2229
2229
  async function fe() {
2230
2230
  let e = /* @__PURE__ */ new Set();
2231
- for (let t of O.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
2232
- O.selectedItems.value = e, await N.handleDeleteClick();
2231
+ for (let t of k.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
2232
+ k.selectedItems.value = e, await N.handleDeleteClick();
2233
2233
  }
2234
- return t(() => l.accept, (e) => {
2235
- e?.length === 1 && (O.categoryFilter.value = e[0]);
2236
- }, { immediate: !0 }), O.loadItems(), O.loadFrequentlyUsed(), O.loadStorage(), u("ready"), e(() => {
2234
+ return u(() => a.accept, (e) => {
2235
+ e?.length === 1 && (k.categoryFilter.value = e[0]);
2236
+ }, { immediate: !0 }), k.loadItems(), k.loadFrequentlyUsed(), k.loadStorage(), s("ready"), x(() => {
2237
2237
  N.resetUI();
2238
- }), a({
2239
- nestedDialogOpen: G,
2240
- handleEscape: K,
2241
- library: O,
2238
+ }), t({
2239
+ nestedDialogOpen: K,
2240
+ handleEscape: ce,
2241
+ library: k,
2242
2242
  ui: N
2243
- }), (e, t) => (o(), v("div", mn, [
2244
- E("div", hn, [E("h2", gn, A(m.value.mediaLibrary.title), 1), E("div", _n, [
2245
- f(O).storageInfo.value ? (o(), S(un, {
2243
+ }), (t, n) => (o(), p("div", mn, [
2244
+ w("div", hn, [w("h2", gn, g(f.value.mediaLibrary.title), 1), w("div", _n, [
2245
+ D(k).storageInfo.value ? (o(), y(un, {
2246
2246
  key: 0,
2247
- "used-bytes": f(O).storageInfo.value.usedBytes,
2248
- "limit-bytes": f(O).storageInfo.value.limitBytes,
2247
+ "used-bytes": D(k).storageInfo.value.usedBytes,
2248
+ "limit-bytes": D(k).storageInfo.value.limitBytes,
2249
2249
  size: 22
2250
- }, null, 8, ["used-bytes", "limit-bytes"])) : y("", !0),
2251
- E("div", vn, [E("input", {
2252
- value: f(N).searchInput.value,
2250
+ }, null, 8, ["used-bytes", "limit-bytes"])) : v("", !0),
2251
+ w("div", vn, [w("input", {
2252
+ value: D(N).searchInput.value,
2253
2253
  type: "search",
2254
- disabled: ae.value,
2255
- "aria-label": m.value.mediaLibrary.searchAriaLabel,
2254
+ disabled: U.value,
2255
+ "aria-label": f.value.mediaLibrary.searchAriaLabel,
2256
2256
  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",
2257
2257
  style: {
2258
2258
  "border-color": "var(--tpl-border)",
2259
2259
  "background-color": "var(--tpl-bg)",
2260
2260
  color: "var(--tpl-text)"
2261
2261
  },
2262
- placeholder: m.value.mediaLibrary.searchPlaceholder,
2263
- onInput: t[0] ||= (e) => f(N).handleSearchInput(e.target.value)
2264
- }, null, 40, yn), p(f(ne), {
2262
+ placeholder: f.value.mediaLibrary.searchPlaceholder,
2263
+ onInput: n[0] ||= (e) => D(N).handleSearchInput(e.target.value)
2264
+ }, null, 40, yn), M(D(re), {
2265
2265
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
2266
2266
  size: 13,
2267
2267
  "stroke-width": 2,
2268
2268
  style: { color: "var(--tpl-text-dim)" }
2269
2269
  })]),
2270
- n.showClose ? (o(), v("button", {
2270
+ e.showClose ? (o(), p("button", {
2271
2271
  key: 1,
2272
2272
  type: "button",
2273
- "aria-label": m.value.mediaLibrary.close,
2273
+ "aria-label": f.value.mediaLibrary.close,
2274
2274
  class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
2275
2275
  style: { color: "var(--tpl-text-muted)" },
2276
- onClick: t[1] ||= (e) => u("close")
2277
- }, [p(f(se), {
2276
+ onClick: n[1] ||= (e) => s("close")
2277
+ }, [M(D(se), {
2278
2278
  size: 18,
2279
2279
  "stroke-width": 2
2280
- })], 8, bn)) : y("", !0)
2280
+ })], 8, bn)) : v("", !0)
2281
2281
  ])]),
2282
- E("div", xn, [p(C, {
2282
+ w("div", xn, [M(T, {
2283
2283
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
2284
2284
  "enter-from-class": "tpl:-ml-48 tpl:opacity-0",
2285
2285
  "enter-to-class": "tpl:ml-0 tpl:opacity-100",
@@ -2287,19 +2287,19 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2287
2287
  "leave-from-class": "tpl:ml-0 tpl:opacity-100",
2288
2288
  "leave-to-class": "tpl:-ml-48 tpl:opacity-0"
2289
2289
  }, {
2290
- default: i(() => [F.value && f(N).showSidebar.value ? (o(), v("div", Sn, [p(Pe, {
2291
- folders: f(N).folderTree.value,
2292
- "current-folder-id": f(O).currentFolderId.value,
2293
- "view-mode": f(O).viewMode.value,
2294
- "has-frequently-used": B.value && f(N).hasFrequentlyUsed.value,
2295
- "can-create-folder": V.value,
2296
- "can-rename-folder": re.value,
2290
+ default: l(() => [F.value && D(N).showSidebar.value ? (o(), p("div", Sn, [M(Pe, {
2291
+ folders: D(N).folderTree.value,
2292
+ "current-folder-id": D(k).currentFolderId.value,
2293
+ "view-mode": D(k).viewMode.value,
2294
+ "has-frequently-used": B.value && D(N).hasFrequentlyUsed.value,
2295
+ "can-create-folder": ee.value,
2296
+ "can-rename-folder": te.value,
2297
2297
  "can-delete-folder": H.value,
2298
- onNavigate: f(O).navigateToFolder,
2299
- onCreateFolder: f(N).handleCreateFolder,
2300
- onRenameFolder: f(N).handleRenameFolder,
2301
- onDeleteFolder: f(N).handleDeleteFolder,
2302
- onShowFrequentlyUsed: f(O).showFrequentlyUsed
2298
+ onNavigate: D(k).navigateToFolder,
2299
+ onCreateFolder: D(N).handleCreateFolder,
2300
+ onRenameFolder: D(N).handleRenameFolder,
2301
+ onDeleteFolder: D(N).handleDeleteFolder,
2302
+ onShowFrequentlyUsed: D(k).showFrequentlyUsed
2303
2303
  }, null, 8, [
2304
2304
  "folders",
2305
2305
  "current-folder-id",
@@ -2313,90 +2313,90 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2313
2313
  "onRenameFolder",
2314
2314
  "onDeleteFolder",
2315
2315
  "onShowFrequentlyUsed"
2316
- ])])) : y("", !0)]),
2316
+ ])])) : v("", !0)]),
2317
2317
  _: 1
2318
- }), E("div", Cn, [E("div", wn, [E("div", Tn, [
2319
- F.value ? (o(), v("button", {
2318
+ }), w("div", Cn, [w("div", wn, [w("div", Tn, [
2319
+ F.value ? (o(), p("button", {
2320
2320
  key: 0,
2321
2321
  type: "button",
2322
2322
  "data-testid": "media-folder-toggle",
2323
2323
  class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
2324
- style: x({
2325
- color: f(N).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2326
- backgroundColor: f(N).showSidebar.value ? "var(--tpl-bg)" : "transparent",
2327
- border: f(N).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
2324
+ style: j({
2325
+ color: D(N).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2326
+ backgroundColor: D(N).showSidebar.value ? "var(--tpl-bg)" : "transparent",
2327
+ border: D(N).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
2328
2328
  }),
2329
- title: f(N).showSidebar.value ? m.value.mediaLibrary.hideFolders : m.value.mediaLibrary.showFolders,
2330
- "aria-label": f(N).showSidebar.value ? m.value.mediaLibrary.hideFolders : m.value.mediaLibrary.showFolders,
2331
- "aria-pressed": f(N).showSidebar.value,
2332
- onClick: t[2] ||= (e) => f(N).showSidebar.value = !f(N).showSidebar.value
2333
- }, [p(f(ie), {
2329
+ title: D(N).showSidebar.value ? f.value.mediaLibrary.hideFolders : f.value.mediaLibrary.showFolders,
2330
+ "aria-label": D(N).showSidebar.value ? f.value.mediaLibrary.hideFolders : f.value.mediaLibrary.showFolders,
2331
+ "aria-pressed": D(N).showSidebar.value,
2332
+ onClick: n[2] ||= (e) => D(N).showSidebar.value = !D(N).showSidebar.value
2333
+ }, [M(D(ne), {
2334
2334
  size: 16,
2335
2335
  "stroke-width": 2
2336
- })], 12, En)) : y("", !0),
2337
- f(O).viewMode.value === "frequently-used" ? (o(), v("span", Dn, A(m.value.mediaLibrary.frequentlyUsed), 1)) : (o(), S(be, {
2336
+ })], 12, En)) : v("", !0),
2337
+ D(k).viewMode.value === "frequently-used" ? (o(), p("span", Dn, g(f.value.mediaLibrary.frequentlyUsed), 1)) : (o(), y(be, {
2338
2338
  key: 2,
2339
- folders: f(N).folderTree.value,
2340
- "current-folder-id": f(O).currentFolderId.value,
2341
- onNavigate: f(O).navigateToFolder
2339
+ folders: D(N).folderTree.value,
2340
+ "current-folder-id": D(k).currentFolderId.value,
2341
+ onNavigate: D(k).navigateToFolder
2342
2342
  }, null, 8, [
2343
2343
  "folders",
2344
2344
  "current-folder-id",
2345
2345
  "onNavigate"
2346
2346
  ])),
2347
- E("div", On, [E("button", {
2347
+ w("div", On, [w("button", {
2348
2348
  type: "button",
2349
2349
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
2350
- style: x({
2351
- color: f(N).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2352
- backgroundColor: f(N).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
2350
+ style: j({
2351
+ color: D(N).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2352
+ backgroundColor: D(N).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
2353
2353
  }),
2354
- title: m.value.mediaLibrary.viewGrid,
2355
- "aria-label": m.value.mediaLibrary.viewGrid,
2356
- "aria-pressed": f(N).layoutMode.value === "grid",
2357
- onClick: t[3] ||= (e) => f(N).layoutMode.value = "grid"
2358
- }, [p(f(le), {
2354
+ title: f.value.mediaLibrary.viewGrid,
2355
+ "aria-label": f.value.mediaLibrary.viewGrid,
2356
+ "aria-pressed": D(N).layoutMode.value === "grid",
2357
+ onClick: n[3] ||= (e) => D(N).layoutMode.value = "grid"
2358
+ }, [M(D(le), {
2359
2359
  size: 14,
2360
2360
  "stroke-width": 2
2361
- })], 12, kn), E("button", {
2361
+ })], 12, kn), w("button", {
2362
2362
  type: "button",
2363
2363
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
2364
- style: x({
2365
- color: f(N).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2366
- backgroundColor: f(N).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
2364
+ style: j({
2365
+ color: D(N).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2366
+ backgroundColor: D(N).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
2367
2367
  }),
2368
- title: m.value.mediaLibrary.viewList,
2369
- "aria-label": m.value.mediaLibrary.viewList,
2370
- "aria-pressed": f(N).layoutMode.value === "list",
2371
- onClick: t[4] ||= (e) => f(N).layoutMode.value = "list"
2372
- }, [p(f(ce), {
2368
+ title: f.value.mediaLibrary.viewList,
2369
+ "aria-label": f.value.mediaLibrary.viewList,
2370
+ "aria-pressed": D(N).layoutMode.value === "list",
2371
+ onClick: n[4] ||= (e) => D(N).layoutMode.value = "list"
2372
+ }, [M(D(ae), {
2373
2373
  size: 14,
2374
2374
  "stroke-width": 2
2375
2375
  })], 12, An)])
2376
- ]), E("div", jn, [f(D).length > 1 ? (o(), v("select", {
2376
+ ]), w("div", jn, [D(E).length > 1 ? (o(), p("select", {
2377
2377
  key: 0,
2378
- "aria-label": m.value.mediaLibrary.filterAriaLabel,
2378
+ "aria-label": f.value.mediaLibrary.filterAriaLabel,
2379
2379
  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",
2380
2380
  style: {
2381
2381
  "border-color": "var(--tpl-border)",
2382
2382
  "background-color": "var(--tpl-bg)",
2383
2383
  color: "var(--tpl-text)"
2384
2384
  },
2385
- value: f(O).categoryFilter.value ?? "",
2385
+ value: D(k).categoryFilter.value ?? "",
2386
2386
  onChange: J
2387
- }, [E("option", Nn, A(m.value.mediaLibrary.filterAll), 1), (o(!0), v(k, null, r(f(D), (e) => (o(), v("option", {
2387
+ }, [w("option", Nn, g(f.value.mediaLibrary.filterAll), 1), (o(!0), p(A, null, i(D(E), (e) => (o(), p("option", {
2388
2388
  key: e,
2389
2389
  value: e
2390
- }, A(f(N).getCategoryLabel(e)), 9, Pn))), 128))], 40, Mn)) : y("", !0)])]), E("div", Fn, [f(O).viewMode.value === "files" && (P.value || I.value) ? (o(), v("div", In, [P.value ? (o(), S(rn, {
2390
+ }, g(D(N).getCategoryLabel(e)), 9, Pn))), 128))], 40, Mn)) : v("", !0)])]), w("div", Fn, [D(k).viewMode.value === "files" && (P.value || I.value) ? (o(), p("div", In, [P.value ? (o(), y(rn, {
2391
2391
  key: 0,
2392
- "is-uploading": f(O).isUploading.value,
2393
- "upload-progress": f(O).uploadProgress.value,
2394
- onUpload: f(N).handleUpload
2392
+ "is-uploading": D(k).isUploading.value,
2393
+ "upload-progress": D(k).uploadProgress.value,
2394
+ onUpload: D(N).handleUpload
2395
2395
  }, null, 8, [
2396
2396
  "is-uploading",
2397
2397
  "upload-progress",
2398
2398
  "onUpload"
2399
- ])) : y("", !0), I.value ? (o(), v("button", {
2399
+ ])) : v("", !0), I.value ? (o(), p("button", {
2400
2400
  key: 1,
2401
2401
  "data-testid": "media-import-url",
2402
2402
  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",
@@ -2405,25 +2405,25 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2405
2405
  color: "var(--tpl-text-muted)",
2406
2406
  "background-color": "var(--tpl-bg)"
2407
2407
  },
2408
- onClick: t[5] ||= (e) => f(N).showImportUrlModal.value = !0
2409
- }, [p(f(oe), {
2408
+ onClick: n[5] ||= (e) => D(N).showImportUrlModal.value = !0
2409
+ }, [M(D(oe), {
2410
2410
  size: 14,
2411
2411
  "stroke-width": 2
2412
- }), M(" " + A(m.value.mediaLibrary.importFromUrl), 1)])) : y("", !0)])) : y("", !0), p(ft, {
2413
- items: f(N).displayItems.value,
2414
- "selected-ids": f(O).selectedItems.value,
2415
- "is-loading": f(O).isLoading.value,
2416
- "has-more": f(O).viewMode.value === "files" && f(O).hasMore.value,
2417
- accept: n.accept,
2418
- layout: f(N).layoutMode.value,
2419
- "search-query": f(O).searchQuery.value,
2412
+ }), m(" " + g(f.value.mediaLibrary.importFromUrl), 1)])) : v("", !0)])) : v("", !0), M(ft, {
2413
+ items: D(N).displayItems.value,
2414
+ "selected-ids": D(k).selectedItems.value,
2415
+ "is-loading": D(k).isLoading.value,
2416
+ "has-more": D(k).viewMode.value === "files" && D(k).hasMore.value,
2417
+ accept: e.accept,
2418
+ layout: D(N).layoutMode.value,
2419
+ "search-query": D(k).searchQuery.value,
2420
2420
  "can-update": R.value,
2421
2421
  "can-replace": z.value,
2422
- onSelect: f(N).handleSelect,
2423
- onToggle: f(O).toggleSelection,
2424
- onLoadMore: f(O).loadMore,
2425
- onEdit: f(N).handleEditItem,
2426
- onReplace: f(N).handleReplaceItem,
2422
+ onSelect: D(N).handleSelect,
2423
+ onToggle: D(k).toggleSelection,
2424
+ onLoadMore: D(k).loadMore,
2425
+ onEdit: D(N).handleEditItem,
2426
+ onReplace: D(N).handleReplaceItem,
2427
2427
  onConfirm: q
2428
2428
  }, null, 8, [
2429
2429
  "items",
@@ -2441,38 +2441,38 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2441
2441
  "onEdit",
2442
2442
  "onReplace"
2443
2443
  ])])])]),
2444
- p(Ct, {
2445
- visible: f(N).showImportUrlModal.value,
2446
- "is-importing": f(O).isImportingFromUrl.value,
2447
- error: f(O).importFromUrlError.value,
2448
- onImport: f(N).handleImportFromUrl,
2449
- onClose: t[6] ||= (e) => f(N).showImportUrlModal.value = !1
2444
+ M(Ct, {
2445
+ visible: D(N).showImportUrlModal.value,
2446
+ "is-importing": D(k).isImportingFromUrl.value,
2447
+ error: D(k).importFromUrlError.value,
2448
+ onImport: D(N).handleImportFromUrl,
2449
+ onClose: n[6] ||= (e) => D(N).showImportUrlModal.value = !1
2450
2450
  }, null, 8, [
2451
2451
  "visible",
2452
2452
  "is-importing",
2453
2453
  "error",
2454
2454
  "onImport"
2455
2455
  ]),
2456
- f(N).editingItem.value ? (o(), S(f(d), {
2456
+ D(N).editingItem.value ? (o(), y(D(d), {
2457
2457
  key: 0,
2458
2458
  visible: !0,
2459
- item: f(N).editingItem.value,
2460
- save: f(N).handleEditSave,
2461
- "can-crop": z.value && f(N).editingItem.value.canUpdate !== !1,
2462
- onClose: t[7] ||= (e) => f(N).editingItem.value = null
2459
+ item: D(N).editingItem.value,
2460
+ save: D(N).handleEditSave,
2461
+ "can-crop": z.value && D(N).editingItem.value.canUpdate !== !1,
2462
+ onClose: n[7] ||= (e) => D(N).editingItem.value = null
2463
2463
  }, null, 8, [
2464
2464
  "item",
2465
2465
  "save",
2466
2466
  "can-crop"
2467
- ])) : y("", !0),
2468
- p(Yt, {
2469
- visible: f(O).showReplaceWarning.value,
2470
- item: f(O).pendingReplaceItem.value,
2471
- "usage-info": f(O).replaceUsageInfo.value,
2472
- "is-replacing": f(O).isReplacing.value,
2473
- error: f(O).replaceError.value,
2474
- onReplace: f(N).handleReplaceFile,
2475
- onClose: f(O).cancelReplace
2467
+ ])) : v("", !0),
2468
+ M(Yt, {
2469
+ visible: D(k).showReplaceWarning.value,
2470
+ item: D(k).pendingReplaceItem.value,
2471
+ "usage-info": D(k).replaceUsageInfo.value,
2472
+ "is-replacing": D(k).isReplacing.value,
2473
+ error: D(k).replaceError.value,
2474
+ onReplace: D(N).handleReplaceFile,
2475
+ onClose: D(k).cancelReplace
2476
2476
  }, null, 8, [
2477
2477
  "visible",
2478
2478
  "item",
@@ -2482,7 +2482,7 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2482
2482
  "onReplace",
2483
2483
  "onClose"
2484
2484
  ]),
2485
- p(C, {
2485
+ M(T, {
2486
2486
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
2487
2487
  "enter-from-class": "tpl:opacity-0",
2488
2488
  "enter-to-class": "tpl:opacity-100",
@@ -2490,7 +2490,7 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2490
2490
  "leave-from-class": "tpl:opacity-100",
2491
2491
  "leave-to-class": "tpl:opacity-0"
2492
2492
  }, {
2493
- default: i(() => [f(O).showDeleteWarning.value ? (o(), v("div", {
2493
+ default: l(() => [D(k).showDeleteWarning.value ? (o(), p("div", {
2494
2494
  key: 0,
2495
2495
  role: "dialog",
2496
2496
  "aria-modal": "true",
@@ -2501,79 +2501,79 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2501
2501
  "backdrop-filter": "blur(8px)",
2502
2502
  "-webkit-backdrop-filter": "blur(8px)"
2503
2503
  },
2504
- onClick: t[10] ||= b((...e) => f(O).cancelDelete && f(O).cancelDelete(...e), ["self"])
2505
- }, [E("div", Ln, [
2506
- E("h3", Rn, A(m.value.mediaLibrary.deleteWarningTitle), 1),
2507
- E("p", {
2508
- class: h(["tpl:text-xs", f(N).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
2504
+ onClick: n[10] ||= S((...e) => D(k).cancelDelete && D(k).cancelDelete(...e), ["self"])
2505
+ }, [w("div", Ln, [
2506
+ w("h3", Rn, g(f.value.mediaLibrary.deleteWarningTitle), 1),
2507
+ w("p", {
2508
+ class: C(["tpl:text-xs", D(N).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
2509
2509
  style: { color: "var(--tpl-text-muted)" }
2510
- }, A(m.value.mediaLibrary.deleteWarningMessage), 3),
2511
- f(N).hasUsedFiles.value ? (o(), v("p", zn, A(m.value.mediaLibrary.deleteWarningUsageNote), 1)) : y("", !0),
2512
- f(N).hasUsedFiles.value ? (o(), v("div", Bn, [(o(!0), v(k, null, r(f(O).deleteUsageInfo.value, (e, t) => (o(), v("div", {
2510
+ }, g(f.value.mediaLibrary.deleteWarningMessage), 3),
2511
+ D(N).hasUsedFiles.value ? (o(), p("p", zn, g(f.value.mediaLibrary.deleteWarningUsageNote), 1)) : v("", !0),
2512
+ D(N).hasUsedFiles.value ? (o(), p("div", Bn, [(o(!0), p(A, null, i(D(k).deleteUsageInfo.value, (e, t) => (o(), p("div", {
2513
2513
  key: t,
2514
2514
  class: "tpl:text-xs",
2515
2515
  style: { color: "var(--tpl-text)" }
2516
- }, [e.templateCount > 0 ? (o(), v(k, { key: 0 }, [E("span", Vn, A(f(N).displayItems.value.find((e) => e.id === t)?.filename || t), 1), E("span", Hn, " - " + A(m.value.mediaLibrary.usedInTemplates.replace("{count}", e.templateCount.toString())), 1)], 64)) : y("", !0)]))), 128))])) : y("", !0),
2517
- E("div", Un, [E("button", {
2516
+ }, [e.templateCount > 0 ? (o(), p(A, { key: 0 }, [w("span", Vn, g(D(N).displayItems.value.find((e) => e.id === t)?.filename || t), 1), w("span", Hn, " - " + g(f.value.mediaLibrary.usedInTemplates.replace("{count}", e.templateCount.toString())), 1)], 64)) : v("", !0)]))), 128))])) : v("", !0),
2517
+ w("div", Un, [w("button", {
2518
2518
  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",
2519
2519
  style: {
2520
2520
  "border-color": "var(--tpl-border)",
2521
2521
  color: "var(--tpl-text)",
2522
2522
  "background-color": "var(--tpl-bg)"
2523
2523
  },
2524
- onClick: t[8] ||= (...e) => f(O).cancelDelete && f(O).cancelDelete(...e)
2525
- }, A(m.value.mediaLibrary.cancel), 1), E("button", {
2524
+ onClick: n[8] ||= (...e) => D(k).cancelDelete && D(k).cancelDelete(...e)
2525
+ }, g(f.value.mediaLibrary.cancel), 1), w("button", {
2526
2526
  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",
2527
2527
  style: {
2528
2528
  "border-color": "var(--tpl-danger)",
2529
2529
  color: "var(--tpl-danger)",
2530
2530
  "background-color": "var(--tpl-bg)"
2531
2531
  },
2532
- onClick: t[9] ||= (...e) => f(O).confirmDelete && f(O).confirmDelete(...e)
2533
- }, A(f(N).hasUsedFiles.value ? m.value.mediaLibrary.deleteAnyway : m.value.mediaLibrary.confirmDelete), 1)])
2534
- ])])) : y("", !0)]),
2532
+ onClick: n[9] ||= (...e) => D(k).confirmDelete && D(k).confirmDelete(...e)
2533
+ }, g(D(N).hasUsedFiles.value ? f.value.mediaLibrary.deleteAnyway : f.value.mediaLibrary.confirmDelete), 1)])
2534
+ ])])) : v("", !0)]),
2535
2535
  _: 1
2536
2536
  }),
2537
- E("div", Wn, [E("div", Gn, [f(O).previewItem.value ? (o(), S(Ft, {
2537
+ w("div", Wn, [w("div", Gn, [D(k).previewItem.value ? (o(), y(Ft, {
2538
2538
  key: 0,
2539
- item: f(O).previewItem.value,
2540
- folders: f(N).folderTree.value
2541
- }, null, 8, ["item", "folders"])) : y("", !0)]), E("div", Kn, [f(O).selectedItems.value.size > 0 ? (o(), v("div", qn, [f(O).previewItem.value ? (o(), v("button", {
2539
+ item: D(k).previewItem.value,
2540
+ folders: D(N).folderTree.value
2541
+ }, null, 8, ["item", "folders"])) : v("", !0)]), w("div", Kn, [D(k).selectedItems.value.size > 0 ? (o(), p("div", qn, [D(k).previewItem.value ? (o(), p("button", {
2542
2542
  key: 0,
2543
2543
  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",
2544
- style: x({
2545
- borderColor: f(N).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
2546
- color: f(N).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
2544
+ style: j({
2545
+ borderColor: D(N).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
2546
+ color: D(N).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
2547
2547
  backgroundColor: "var(--tpl-bg)"
2548
2548
  }),
2549
- onClick: t[11] ||= (e) => f(N).copy(f(N).selectedUrl.value)
2550
- }, [f(N).copied.value ? (o(), S(f(ue), {
2549
+ onClick: n[11] ||= (e) => D(N).copy(D(N).selectedUrl.value)
2550
+ }, [D(N).copied.value ? (o(), y(D(ue), {
2551
2551
  key: 1,
2552
2552
  size: 12,
2553
2553
  "stroke-width": 2
2554
- })) : (o(), S(f(te), {
2554
+ })) : (o(), y(D(ie), {
2555
2555
  key: 0,
2556
2556
  size: 12,
2557
2557
  "stroke-width": 2
2558
- })), M(" " + A(f(N).copied.value ? m.value.mediaLibrary.copied : m.value.mediaLibrary.copyUrl), 1)], 4)) : y("", !0), ee.value ? (o(), v("div", Jn, [E("button", {
2558
+ })), m(" " + g(D(N).copied.value ? f.value.mediaLibrary.copied : f.value.mediaLibrary.copyUrl), 1)], 4)) : v("", !0), V.value ? (o(), p("div", Jn, [w("button", {
2559
2559
  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",
2560
2560
  style: {
2561
2561
  "border-color": "var(--tpl-border)",
2562
2562
  color: "var(--tpl-text)",
2563
2563
  "background-color": "var(--tpl-bg)"
2564
2564
  },
2565
- onClick: t[12] ||= (e) => f(N).showMovePicker.value = !f(N).showMovePicker.value
2566
- }, A(m.value.mediaLibrary.moveSelected), 1), f(N).showMovePicker.value ? (o(), S(Ot, {
2565
+ onClick: n[12] ||= (e) => D(N).showMovePicker.value = !D(N).showMovePicker.value
2566
+ }, g(f.value.mediaLibrary.moveSelected), 1), D(N).showMovePicker.value ? (o(), y(Ot, {
2567
2567
  key: 0,
2568
- folders: f(N).folderTree.value,
2569
- "current-folder-id": f(O).currentFolderId.value,
2570
- onSelect: f(N).handleMoveToFolder,
2571
- onClose: t[13] ||= (e) => f(N).showMovePicker.value = !1
2568
+ folders: D(N).folderTree.value,
2569
+ "current-folder-id": D(k).currentFolderId.value,
2570
+ onSelect: D(N).handleMoveToFolder,
2571
+ onClose: n[13] ||= (e) => D(N).showMovePicker.value = !1
2572
2572
  }, null, 8, [
2573
2573
  "folders",
2574
2574
  "current-folder-id",
2575
2575
  "onSelect"
2576
- ])) : y("", !0)])) : y("", !0)])) : y("", !0), E("div", Yn, [W.value > 0 ? (o(), v("button", {
2576
+ ])) : v("", !0)])) : v("", !0)])) : v("", !0), w("div", Yn, [G.value > 0 ? (o(), p("button", {
2577
2577
  key: 0,
2578
2578
  "data-testid": "media-delete",
2579
2579
  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",
@@ -2583,23 +2583,23 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2583
2583
  "background-color": "var(--tpl-bg)"
2584
2584
  },
2585
2585
  onClick: fe
2586
- }, A(m.value.mediaLibrary.deleteSelected), 1)) : y("", !0), n.showConfirm ? (o(), v("button", {
2586
+ }, g(f.value.mediaLibrary.deleteSelected), 1)) : v("", !0), e.showConfirm ? (o(), p("button", {
2587
2587
  key: 1,
2588
- "data-testid": g.value,
2588
+ "data-testid": h.value,
2589
2589
  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",
2590
2590
  style: {
2591
2591
  "background-color": "var(--tpl-primary)",
2592
2592
  color: "var(--tpl-on-primary)"
2593
2593
  },
2594
- disabled: !U.value,
2594
+ disabled: !W.value,
2595
2595
  onClick: q
2596
- }, A(n.accept?.length ? m.value.mediaLibrary.selectImage : m.value.mediaLibrary.selectFile), 9, Xn)) : y("", !0)])])])
2596
+ }, g(e.accept?.length ? f.value.mediaLibrary.selectImage : f.value.mediaLibrary.selectFile), 9, Xn)) : v("", !0)])])])
2597
2597
  ]));
2598
2598
  }
2599
2599
  }), Qn = /* #__PURE__ */ Object.assign({
2600
2600
  "./locales/ca.ts": () => import("./ca-CYQH3J0b.js"),
2601
2601
  "./locales/de.ts": () => import("./de-JvCTMJPy.js"),
2602
- "./locales/en.ts": () => import("./en-Ve-PWSXu.js"),
2602
+ "./locales/en.ts": () => import("./en-ifvu6oPv.js"),
2603
2603
  "./locales/es.ts": () => import("./es-CAv-Vldw.js"),
2604
2604
  "./locales/fr.ts": () => import("./fr-DVPtxpR6.js"),
2605
2605
  "./locales/ja.ts": () => import("./ja-dcWzjStz.js"),
@@ -2629,7 +2629,7 @@ async function ar(e) {
2629
2629
  }
2630
2630
  //#endregion
2631
2631
  //#region ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
2632
- var or = ["data-tpl-theme"], sr = /* @__PURE__ */ l({
2632
+ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ t({
2633
2633
  __name: "MediaLibraryModal",
2634
2634
  props: {
2635
2635
  visible: { type: Boolean },
@@ -2642,25 +2642,25 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ l({
2642
2642
  onError: { type: Function }
2643
2643
  },
2644
2644
  emits: ["close", "select"],
2645
- setup(e, { emit: n }) {
2646
- let r = e, a = n, l = c(null);
2647
- t(() => r.locale, async (e) => {
2648
- l.value = await ar(e ?? "en");
2649
- }, { immediate: !0 }), s(fe, l);
2650
- let u = _(() => r.uiTheme);
2651
- s(Y, u);
2652
- let d = w(() => r.popoverTarget ?? null);
2653
- s(J, d), s(X, w(() => r.locale));
2654
- let f = c(null), m = c(null);
2655
- ge(f, _(() => r.visible && l.value !== null && !m.value?.nestedDialogOpen));
2656
- function x(e) {
2645
+ setup(t, { emit: n }) {
2646
+ let i = t, a = n, s = e(null);
2647
+ u(() => i.locale, async (e) => {
2648
+ s.value = await ar(e ?? "en");
2649
+ }, { immediate: !0 }), r(fe, s);
2650
+ let c = O(() => i.uiTheme);
2651
+ r(Y, c);
2652
+ let d = k(() => i.popoverTarget ?? null);
2653
+ r(J, d), r(X, k(() => i.locale));
2654
+ let f = e(null), m = e(null);
2655
+ ge(f, O(() => i.visible && s.value !== null && !m.value?.nestedDialogOpen));
2656
+ function h(e) {
2657
2657
  e.key === "Escape" && (m.value?.handleEscape() ? e.preventDefault() : a("close"));
2658
2658
  }
2659
- P(document, "keydown", x);
2660
- function T(e) {
2659
+ P(document, "keydown", h);
2660
+ function g(e) {
2661
2661
  a("select", e), a("close");
2662
2662
  }
2663
- return (t, n) => (o(), S(g, { to: e.popoverTarget || "body" }, [p(C, {
2663
+ return (e, n) => (o(), y(_, { to: t.popoverTarget || "body" }, [M(T, {
2664
2664
  "enter-active-class": "tpl:transition tpl:duration-200",
2665
2665
  "enter-from-class": "tpl:opacity-0",
2666
2666
  "enter-to-class": "tpl:opacity-100",
@@ -2668,18 +2668,18 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ l({
2668
2668
  "leave-from-class": "tpl:opacity-100",
2669
2669
  "leave-to-class": "tpl:opacity-0"
2670
2670
  }, {
2671
- default: i(() => [e.visible && l.value ? (o(), v("div", {
2671
+ default: l(() => [t.visible && s.value ? (o(), p("div", {
2672
2672
  key: 0,
2673
2673
  "data-testid": "media-library-modal",
2674
- "data-tpl-theme": u.value,
2675
- class: h([e.popoverTarget ? void 0 : "tpl", "tpl-media-overlay tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
2674
+ "data-tpl-theme": c.value,
2675
+ class: C([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"]),
2676
2676
  style: {
2677
2677
  "background-color": "var(--tpl-overlay)",
2678
2678
  "backdrop-filter": "blur(8px)",
2679
2679
  "-webkit-backdrop-filter": "blur(8px)"
2680
2680
  },
2681
- onClick: n[1] ||= b((e) => a("close"), ["self"])
2682
- }, [E("div", {
2681
+ onClick: n[1] ||= S((e) => a("close"), ["self"])
2682
+ }, [w("div", {
2683
2683
  ref_key: "dialogRef",
2684
2684
  ref: f,
2685
2685
  role: "dialog",
@@ -2696,26 +2696,26 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ l({
2696
2696
  border: "1px solid var(--tpl-border)",
2697
2697
  "box-shadow": "var(--tpl-shadow-xl)"
2698
2698
  }
2699
- }, [p(Zn, {
2699
+ }, [M(Zn, {
2700
2700
  ref_key: "chromeRef",
2701
2701
  ref: m,
2702
- provider: e.provider,
2703
- accept: e.accept,
2704
- "template-id": e.templateId,
2705
- "on-error": e.onError,
2706
- translations: l.value,
2702
+ provider: t.provider,
2703
+ accept: t.accept,
2704
+ "template-id": t.templateId,
2705
+ "on-error": t.onError,
2706
+ translations: s.value,
2707
2707
  "show-close": "",
2708
2708
  "show-confirm": "",
2709
2709
  "confirm-test-id": "media-confirm",
2710
2710
  onClose: n[0] ||= (e) => a("close"),
2711
- onConfirm: T
2711
+ onConfirm: g
2712
2712
  }, null, 8, [
2713
2713
  "provider",
2714
2714
  "accept",
2715
2715
  "template-id",
2716
2716
  "on-error",
2717
2717
  "translations"
2718
- ])], 512)], 10, or)) : y("", !0)]),
2718
+ ])], 512)], 10, or)) : v("", !0)]),
2719
2719
  _: 1
2720
2720
  })], 8, ["to"]));
2721
2721
  }
@@ -2723,4 +2723,4 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ l({
2723
2723
  //#endregion
2724
2724
  export { sr as MediaLibraryModal, J as a, pe as i, Q as n, Y as o, Z as r, ge as t };
2725
2725
 
2726
- //# sourceMappingURL=editor-modal-HJBy9kLj.js.map
2726
+ //# sourceMappingURL=editor-modal-CI6EfeMd.js.map