@templatical/editor 0.20.0 → 0.21.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 (186) hide show
  1. package/README.md +1 -0
  2. package/dist/{AiChatSidebar-ChrE6pUq.js → AiChatSidebar-K_AehWc-.js} +9 -9
  3. package/dist/{AiFeatureMenu-DkQ9HhQ6.js → AiFeatureMenu-CPdNpHpZ.js} +6 -6
  4. package/dist/{BlockIssueBadge-B4QjePax.js → BlockIssueBadge-Dmj9rVra.js} +4 -4
  5. package/dist/{CloudEditor-CfX-aMiV.js → CloudEditor-3a7mqMhe.js} +263 -315
  6. package/dist/{CollaboratorBar-DTibhQ1j.js → CollaboratorBar-Ds0YZWzV.js} +3 -3
  7. package/dist/{ColorPicker-4vDYhdGe.js → ColorPicker-s9GHXjZs.js} +4 -4
  8. package/dist/CommentsSidebar-DvNEdugN.js +435 -0
  9. package/dist/{CountdownBlock-Bn5w7C-p.js → CountdownBlock-BUHYIAe9.js} +1 -1
  10. package/dist/{CountdownToolbar-D7yQqnA2.js → CountdownToolbar-DPRcv3Fu.js} +3 -4
  11. package/dist/{DesignReferenceSidebar-DnO6ZdwS.js → DesignReferenceSidebar-DNmK3dxp.js} +8 -8
  12. package/dist/{IssuesPanel-X_vkNGrs.js → IssuesPanel-CEnEGFtd.js} +7 -7
  13. package/dist/{MergeTagSuggestion-DCuaSOPQ.js → MergeTagSuggestion-DMe4rqn0.js} +2 -2
  14. package/dist/NumberWithSuffix-CCPN_oCh.js +121 -0
  15. package/dist/{ParagraphEditor-C5ixOIYb.js → ParagraphEditor-CkwBirNl.js} +47 -47
  16. package/dist/{RichTextEditorContent-DwhDnMsG.js → RichTextEditorContent-FbnWsh46.js} +6 -6
  17. package/dist/SaveBlockDialog-Cc5BSUBx.js +264 -0
  18. package/dist/SavedBlockPreviewCanvas-ubttfmKr.js +109 -0
  19. package/dist/SavedBlocksBrowserModal-LkY_U3lY.js +323 -0
  20. package/dist/SavedBlocksPanels-CET0zvH6.js +36 -0
  21. package/dist/SavedBlocksPickBar-poGS4PoI.js +52 -0
  22. package/dist/{SnapshotHistory-DaVueFv6.js → SnapshotHistory-BvF5IXn1.js} +8 -8
  23. package/dist/{TemplateScoringPanel-B0UHoTLx.js → TemplateScoringPanel-ifGGGWs5.js} +14 -14
  24. package/dist/{TestEmailModal-BkauxF7j.js → TestEmailModal-BRaM_eko.js} +4 -4
  25. package/dist/{TitleEditor-n6WDVDjW.js → TitleEditor-Bhgzh-iQ.js} +11 -11
  26. package/dist/{TplModal-BDDyvT-C.js → TplModal-BA-Zsg0O.js} +3 -3
  27. package/dist/{blockTypeIcons-4D0aFXNg.js → blockTypeIcons-B1-Yzp-a.js} +6 -6
  28. package/dist/bundle-stats.json +8 -8
  29. package/dist/{cdn/chunks/ca-DbWoy4rG.js → ca-BBgad6y5.js} +50 -5
  30. package/dist/cdn/chunks/{AiFeatureMenu-CIBHAGSz.js → AiFeatureMenu--PdArSnv.js} +7 -7
  31. package/dist/cdn/chunks/{AiFeatureMenu-CIBHAGSz.js.map → AiFeatureMenu--PdArSnv.js.map} +1 -1
  32. package/dist/cdn/chunks/{BlockIssueBadge-CxMiLo3p.js → BlockIssueBadge-DMSd0SIl.js} +5 -5
  33. package/dist/cdn/chunks/{BlockIssueBadge-CxMiLo3p.js.map → BlockIssueBadge-DMSd0SIl.js.map} +1 -1
  34. package/dist/cdn/chunks/{CloudEditor-CEa3Xgqh.js → CloudEditor-DnTfI5GU.js} +270 -322
  35. package/dist/cdn/chunks/CloudEditor-DnTfI5GU.js.map +1 -0
  36. package/dist/cdn/chunks/{CollaboratorBar-Bk1gD02G.js → CollaboratorBar-CBqd7ldq.js} +3 -3
  37. package/dist/cdn/chunks/{CollaboratorBar-Bk1gD02G.js.map → CollaboratorBar-CBqd7ldq.js.map} +1 -1
  38. package/dist/cdn/chunks/{ColorPicker-ll8pynws.js → ColorPicker-DCdWP8YB.js} +161 -161
  39. package/dist/cdn/chunks/{ColorPicker-ll8pynws.js.map → ColorPicker-DCdWP8YB.js.map} +1 -1
  40. package/dist/cdn/chunks/{CountdownBlock-eGUE7hhw.js → CountdownBlock-BDnWMAME.js} +4 -4
  41. package/dist/cdn/chunks/{CountdownBlock-eGUE7hhw.js.map → CountdownBlock-BDnWMAME.js.map} +1 -1
  42. package/dist/cdn/chunks/{CountdownToolbar-C1bkSjUR.js → CountdownToolbar-BbLoo22S.js} +4 -5
  43. package/dist/cdn/chunks/{CountdownToolbar-C1bkSjUR.js.map → CountdownToolbar-BbLoo22S.js.map} +1 -1
  44. package/dist/cdn/chunks/{IssuesPanel-Csasylf_.js → IssuesPanel-CfudrI3T.js} +7 -7
  45. package/dist/cdn/chunks/{IssuesPanel-Csasylf_.js.map → IssuesPanel-CfudrI3T.js.map} +1 -1
  46. package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js → MergeTagSuggestion-D7TsECll.js} +2 -2
  47. package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js.map → MergeTagSuggestion-D7TsECll.js.map} +1 -1
  48. package/dist/cdn/chunks/NumberWithSuffix-BmMx9_n_.js +123 -0
  49. package/dist/cdn/chunks/NumberWithSuffix-BmMx9_n_.js.map +1 -0
  50. package/dist/cdn/chunks/{ParagraphEditor-v0_XEL-v.js → ParagraphEditor-DPCUSXpx.js} +86 -86
  51. package/dist/cdn/chunks/{ParagraphEditor-v0_XEL-v.js.map → ParagraphEditor-DPCUSXpx.js.map} +1 -1
  52. package/dist/cdn/chunks/{RichTextEditorContent-NQExNsaV.js → RichTextEditorContent-B8dOiv_D.js} +5 -5
  53. package/dist/cdn/chunks/{RichTextEditorContent-NQExNsaV.js.map → RichTextEditorContent-B8dOiv_D.js.map} +1 -1
  54. package/dist/cdn/chunks/SaveBlockDialog-BY3SMnNV.js +259 -0
  55. package/dist/cdn/chunks/SaveBlockDialog-BY3SMnNV.js.map +1 -0
  56. package/dist/cdn/chunks/SavedBlockPreviewCanvas-LpaOcusq.js +110 -0
  57. package/dist/cdn/chunks/SavedBlockPreviewCanvas-LpaOcusq.js.map +1 -0
  58. package/dist/cdn/chunks/SavedBlocksBrowserModal-CfIcmyzF.js +318 -0
  59. package/dist/cdn/chunks/SavedBlocksBrowserModal-CfIcmyzF.js.map +1 -0
  60. package/dist/cdn/chunks/SavedBlocksPanels-kIowCfh_.js +38 -0
  61. package/dist/cdn/chunks/SavedBlocksPanels-kIowCfh_.js.map +1 -0
  62. package/dist/cdn/chunks/SavedBlocksPickBar-WSGe1GiZ.js +52 -0
  63. package/dist/cdn/chunks/SavedBlocksPickBar-WSGe1GiZ.js.map +1 -0
  64. package/dist/cdn/chunks/{TitleEditor-CS-_MzYs.js → TitleEditor-iwd-O9sO.js} +11 -11
  65. package/dist/cdn/chunks/{TitleEditor-CS-_MzYs.js.map → TitleEditor-iwd-O9sO.js.map} +1 -1
  66. package/dist/cdn/chunks/{blockTypeIcons-B0Hjh42a.js → blockTypeIcons-BYz0fgLz.js} +7 -7
  67. package/dist/cdn/chunks/{blockTypeIcons-B0Hjh42a.js.map → blockTypeIcons-BYz0fgLz.js.map} +1 -1
  68. package/dist/{ca-DbWoy4rG.js → cdn/chunks/ca-BBgad6y5.js} +52 -3
  69. package/dist/cdn/chunks/ca-BBgad6y5.js.map +1 -0
  70. package/dist/{de-CTYXVU9v.js → cdn/chunks/de-Bw6fB5JU.js} +2 -24
  71. package/dist/cdn/chunks/{de-CTYXVU9v.js.map → de-Bw6fB5JU.js.map} +1 -1
  72. package/dist/cdn/chunks/{de-CgGOnerg.js → de-D7WbpFBR.js} +50 -3
  73. package/dist/cdn/chunks/de-D7WbpFBR.js.map +1 -0
  74. package/dist/{en-DrUV9xth.js → cdn/chunks/en-BrZ0uGK2.js} +51 -2
  75. package/dist/cdn/chunks/en-BrZ0uGK2.js.map +1 -0
  76. package/dist/{en-BtmIaJeb.js → cdn/chunks/en-DAdHJz7h.js} +2 -24
  77. package/dist/cdn/chunks/{en-BtmIaJeb.js.map → en-DAdHJz7h.js.map} +1 -1
  78. package/dist/{es-DwbKjU7q.js → cdn/chunks/es-tLSLysPs.js} +51 -2
  79. package/dist/cdn/chunks/es-tLSLysPs.js.map +1 -0
  80. package/dist/cdn/chunks/{extensions-Di3hdIRT.js → extensions-DeJh3E9b.js} +26 -26
  81. package/dist/cdn/chunks/{extensions-Di3hdIRT.js.map → extensions-DeJh3E9b.js.map} +1 -1
  82. package/dist/cdn/chunks/{features-CLIZ7Q-Y.js → features-pLfGJWIB.js} +1118 -962
  83. package/dist/cdn/chunks/features-pLfGJWIB.js.map +1 -0
  84. package/dist/cdn/chunks/{icons-GX40Qm2W.js → icons-FLemooQz.js} +16 -16
  85. package/dist/cdn/chunks/{icons-GX40Qm2W.js.map → icons-FLemooQz.js.map} +1 -1
  86. package/dist/cdn/chunks/{media-library-yYAkAagU.js → media-library-mCCZieYO.js} +176 -176
  87. package/dist/cdn/chunks/{media-library-yYAkAagU.js.map → media-library-mCCZieYO.js.map} +1 -1
  88. package/dist/cdn/chunks/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +50 -3
  89. package/dist/cdn/chunks/pt-BR-BWFokdTU.js.map +1 -0
  90. package/dist/{pt-BR-B2ZvFlRL.js → cdn/chunks/pt-BR-w2sGzHNX.js} +2 -24
  91. package/dist/cdn/chunks/{pt-BR-B2ZvFlRL.js.map → pt-BR-w2sGzHNX.js.map} +1 -1
  92. package/dist/cdn/chunks/quality-BRbHtAk1.js +2180 -0
  93. package/dist/cdn/chunks/{quality-DffYv9j5.js.map → quality-BRbHtAk1.js.map} +1 -1
  94. package/dist/cdn/chunks/{renderer-DpBGiXOg.js → renderer-Yg1XhsBN.js} +17 -17
  95. package/dist/cdn/chunks/{renderer-DpBGiXOg.js.map → renderer-Yg1XhsBN.js.map} +1 -1
  96. package/dist/cdn/chunks/{src-9K6uFiuK.js → src-BDJeYiVE.js} +33 -33
  97. package/dist/cdn/chunks/{src-9K6uFiuK.js.map → src-BDJeYiVE.js.map} +1 -1
  98. package/dist/cdn/chunks/{styles-DHSmjlpX.js → styles-Bp5Jsu9J.js} +1380 -1294
  99. package/dist/cdn/chunks/styles-Bp5Jsu9J.js.map +1 -0
  100. package/dist/cdn/chunks/{tiptap-C2indasq.js → tiptap-BMZ-OENR.js} +2012 -1863
  101. package/dist/cdn/chunks/tiptap-BMZ-OENR.js.map +1 -0
  102. package/dist/cdn/editor.css +1 -1
  103. package/dist/cdn/editor.js +123 -114
  104. package/dist/cdn/editor.js.map +1 -1
  105. package/dist/{check-Bl4J_tYV.js → check-BpQDKiPz.js} +1 -1
  106. package/dist/{chevron-down-COEcl2iP.js → chevron-down-j8GrdTyz.js} +1 -1
  107. package/dist/chevron-up-BACyVhyC.js +7 -0
  108. package/dist/{circle-alert-CvHi5etc.js → circle-alert-CgtE46ND.js} +1 -1
  109. package/dist/{clock-CZZw62e8.js → clock-BzKLLW5L.js} +1 -1
  110. package/dist/{cloud-B-RebwxI.js → cloud-Du7mnkz2.js} +19 -47
  111. package/dist/{createLucideIcon-_peTZQtY.js → createLucideIcon-JWHwTI6N.js} +2 -2
  112. package/dist/{cdn/chunks/de-CTYXVU9v.js → de-Bw6fB5JU.js} +0 -26
  113. package/dist/{de-CgGOnerg.js → de-D7WbpFBR.js} +49 -2
  114. package/dist/{dist-CgTKuIUN.js → dist-BEpCh2mG.js} +1158 -1125
  115. package/dist/{dist-Cx7IUM7J.js → dist-BgPYC_8-.js} +14 -6
  116. package/dist/{dist-BKKo5wPC.js → dist-BkM8A17N.js} +2 -2
  117. package/dist/{dist-CcX5sLpz.js → dist-BuNDAAVp.js} +361 -256
  118. package/dist/{dist-COSN3oDJ.js → dist-CBzCU-a-.js} +2 -2
  119. package/dist/{dist-YSCPD13F.js → dist-CDO52Rxy.js} +2 -2
  120. package/dist/{dist-Dk5AdwoQ.js → dist-CrjzhIxB.js} +2 -2
  121. package/dist/{dist-DXAZUjj3.js → dist-CtcgoC_R.js} +2 -2
  122. package/dist/{dist-D6M5FAY7.js → dist-CuXha2_7.js} +2 -2
  123. package/dist/dist-CweLDZrs.js +5 -0
  124. package/dist/dist-DOsdqAEZ.js +5 -0
  125. package/dist/{dist-8TKf-Jpg.js → dist-DYClLqy8.js} +6 -3
  126. package/dist/{cdn/chunks/en-DrUV9xth.js → en-BrZ0uGK2.js} +49 -4
  127. package/dist/{cdn/chunks/en-BtmIaJeb.js → en-DAdHJz7h.js} +0 -26
  128. package/dist/{cdn/chunks/es-DwbKjU7q.js → es-tLSLysPs.js} +49 -4
  129. package/dist/{extensions-BCA9pyer.js → extensions-ClY5Sh7S.js} +5 -5
  130. package/dist/{image-up-D26rNdfX.js → image-up-CQdtq8ge.js} +1 -1
  131. package/dist/index.d.ts +81 -4
  132. package/dist/{info-CE3JSTqk.js → info-BUJBXoE6.js} +1 -1
  133. package/dist/{keys-DFaIbGR8.js → keys-CHPcp-Nz.js} +2 -2
  134. package/dist/{list-checks-BQsLrtBB.js → list-checks-BGHaCSD5.js} +1 -1
  135. package/dist/{loader-circle-s9Rh5lLd.js → loader-circle-C-Z6kgI6.js} +1 -1
  136. package/dist/{message-circle-CI62d690.js → message-circle-CEm5qckV.js} +1 -1
  137. package/dist/pencil-DdwmkKLb.js +10 -0
  138. package/dist/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +49 -2
  139. package/dist/{cdn/chunks/pt-BR-B2ZvFlRL.js → pt-BR-w2sGzHNX.js} +0 -26
  140. package/dist/{refresh-cw-DlYfl65Y.js → refresh-cw-maKlg0dl.js} +1 -1
  141. package/dist/{scan-line-CHadrYVb.js → scan-line-BFgesTOY.js} +1 -1
  142. package/dist/{send-CbP40otC.js → send-B70aQDrA.js} +1 -1
  143. package/dist/{shield-check-Bnj9aRoJ.js → shield-check-B7x5OKt5.js} +1 -1
  144. package/dist/{sparkles-CncWT57a.js → sparkles-DVlm1Ipp.js} +1 -1
  145. package/dist/style.css +1 -1
  146. package/dist/{styles-DkF_-uX8.js → styles-DIDAJdkj.js} +1237 -1151
  147. package/dist/templatical-editor.js +134 -125
  148. package/dist/{text-align-start-B458vzYw.js → text-align-start-Vay3Kvo2.js} +1 -1
  149. package/dist/{trash-2-DO0yjSU1.js → trash-2-DE8CmxAG.js} +1 -1
  150. package/dist/{triangle-alert-C18_ima6.js → triangle-alert-Djg6IG8N.js} +1 -1
  151. package/dist/{upload-DsCd2zTR.js → upload-BwwE0U6G.js} +1 -1
  152. package/dist/{useCloudI18n-PCDOC2kz.js → useCloudI18n-BmiygEM4.js} +1 -1
  153. package/dist/{useEditorCore-kKUemYY6.js → useEditorCore-Bd9CA4L_.js} +997 -817
  154. package/dist/{useI18n-BNMzZTM5.js → useI18n-D2L9Mkik.js} +1 -1
  155. package/dist/{useMergeTag-DfEY0eK5.js → useMergeTag-BTdDq5DC.js} +1 -1
  156. package/dist/{usePopoverPosition-F9STHRIr.js → usePopoverPosition-BO2LNy5n.js} +1 -1
  157. package/dist/{x-BCFQuE_q.js → x-CkD6A1iB.js} +1 -1
  158. package/package.json +21 -21
  159. package/dist/CommentsSidebar-D-o5Stlg.js +0 -442
  160. package/dist/ModuleBrowserModal-AJt--JPh.js +0 -202
  161. package/dist/ModulePreviewCanvas-BKYOcVCh.js +0 -106
  162. package/dist/NumberWithSuffix-Bf3rNxza.js +0 -89
  163. package/dist/SaveModuleDialog-B4QX9eiv.js +0 -125
  164. package/dist/ToggleSwitch-DUNuUPsZ.js +0 -37
  165. package/dist/cdn/chunks/CloudEditor-CEa3Xgqh.js.map +0 -1
  166. package/dist/cdn/chunks/ModuleBrowserModal-DznWWtBI.js +0 -198
  167. package/dist/cdn/chunks/ModuleBrowserModal-DznWWtBI.js.map +0 -1
  168. package/dist/cdn/chunks/ModulePreviewCanvas-D-h7fr87.js +0 -107
  169. package/dist/cdn/chunks/ModulePreviewCanvas-D-h7fr87.js.map +0 -1
  170. package/dist/cdn/chunks/NumberWithSuffix-Dt-0odUN.js +0 -91
  171. package/dist/cdn/chunks/NumberWithSuffix-Dt-0odUN.js.map +0 -1
  172. package/dist/cdn/chunks/SaveModuleDialog-BpFhTi-k.js +0 -120
  173. package/dist/cdn/chunks/SaveModuleDialog-BpFhTi-k.js.map +0 -1
  174. package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js +0 -39
  175. package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js.map +0 -1
  176. package/dist/cdn/chunks/ca-DbWoy4rG.js.map +0 -1
  177. package/dist/cdn/chunks/de-CgGOnerg.js.map +0 -1
  178. package/dist/cdn/chunks/en-DrUV9xth.js.map +0 -1
  179. package/dist/cdn/chunks/es-DwbKjU7q.js.map +0 -1
  180. package/dist/cdn/chunks/features-CLIZ7Q-Y.js.map +0 -1
  181. package/dist/cdn/chunks/pt-BR-Bcc5Tjed.js.map +0 -1
  182. package/dist/cdn/chunks/quality-DffYv9j5.js +0 -2180
  183. package/dist/cdn/chunks/styles-DHSmjlpX.js.map +0 -1
  184. package/dist/cdn/chunks/tiptap-C2indasq.js.map +0 -1
  185. package/dist/dist-BDVm2MrW.js +0 -5
  186. package/dist/dist-DbekZDmJ.js +0 -5
@@ -924,11 +924,151 @@ function zt(e, t) {
924
924
  };
925
925
  }
926
926
  //#endregion
927
+ //#region ../core/src/saved-blocks.ts
928
+ function Bt(e) {
929
+ let { provider: t } = e, n = C([]), r = C(!1), i = O(() => {
930
+ let e = /* @__PURE__ */ new Set();
931
+ for (let t of n.value) {
932
+ let n = t.category?.trim();
933
+ n && e.add(n);
934
+ }
935
+ return [...e].sort((e, t) => e.localeCompare(t));
936
+ }), a = O(() => typeof t.create == "function"), o = O(() => typeof t.update == "function"), s = O(() => typeof t.delete == "function");
937
+ function c(e) {
938
+ return o.value && e.canUpdate !== !1;
939
+ }
940
+ function l(e) {
941
+ return s.value && e.canDelete !== !1;
942
+ }
943
+ function u(e, t) {
944
+ throw new Dt(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
945
+ }
946
+ async function d(i) {
947
+ r.value = !0;
948
+ try {
949
+ n.value = await t.list(i);
950
+ } catch (t) {
951
+ throw e.onError?.(t), t;
952
+ } finally {
953
+ r.value = !1;
954
+ }
955
+ }
956
+ async function f(r, i, a) {
957
+ let { create: o } = t;
958
+ typeof o != "function" && u("create", "disabled by the provider");
959
+ try {
960
+ let e = await o(a ? {
961
+ name: r,
962
+ content: i,
963
+ category: a
964
+ } : {
965
+ name: r,
966
+ content: i
967
+ });
968
+ return n.value = [e, ...n.value], e;
969
+ } catch (t) {
970
+ throw e.onError?.(t), t;
971
+ }
972
+ }
973
+ async function p(r, i) {
974
+ let { update: a } = t;
975
+ typeof a != "function" && u("update", "disabled by the provider");
976
+ let o = n.value.find((e) => e.id === r);
977
+ o && o.canUpdate === !1 && u("update", `not permitted for entry "${r}"`);
978
+ try {
979
+ let e = await a(r, i);
980
+ return n.value = n.value.map((t) => t.id === r ? e : t), e;
981
+ } catch (t) {
982
+ throw e.onError?.(t), t;
983
+ }
984
+ }
985
+ async function m(r) {
986
+ let { delete: i } = t;
987
+ typeof i != "function" && u("delete", "disabled by the provider");
988
+ let a = n.value.find((e) => e.id === r);
989
+ a && a.canDelete === !1 && u("delete", `not permitted for entry "${r}"`);
990
+ try {
991
+ await i(r), n.value = n.value.filter((e) => e.id !== r);
992
+ } catch (t) {
993
+ throw e.onError?.(t), t;
994
+ }
995
+ }
996
+ return {
997
+ savedBlocks: n,
998
+ isLoading: r,
999
+ categories: i,
1000
+ canCreate: a,
1001
+ canUpdate: o,
1002
+ canDelete: s,
1003
+ canUpdateBlock: c,
1004
+ canDeleteBlock: l,
1005
+ load: d,
1006
+ create: f,
1007
+ update: p,
1008
+ remove: m
1009
+ };
1010
+ }
1011
+ //#endregion
1012
+ //#region ../core/src/saved-blocks-local.ts
1013
+ var Vt = "templatical:saved-blocks";
1014
+ function Ht(e = {}) {
1015
+ let t = e.key ?? Vt;
1016
+ function n() {
1017
+ if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
1018
+ return localStorage;
1019
+ }
1020
+ function r() {
1021
+ let e = n().getItem(t);
1022
+ if (!e) return [];
1023
+ try {
1024
+ let t = JSON.parse(e);
1025
+ return Array.isArray(t) ? t : [];
1026
+ } catch {
1027
+ return [];
1028
+ }
1029
+ }
1030
+ function i(e) {
1031
+ n().setItem(t, JSON.stringify(e));
1032
+ }
1033
+ return {
1034
+ async list(e) {
1035
+ let t = r(), n = e?.search?.trim().toLowerCase(), i = e?.category?.trim();
1036
+ return t.filter((e) => !(n && !e.name.toLowerCase().includes(n) || i && e.category !== i));
1037
+ },
1038
+ async create(e) {
1039
+ let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
1040
+ id: W(),
1041
+ name: e.name,
1042
+ content: e.content,
1043
+ ...e.category ? { category: e.category } : {},
1044
+ createdAt: t,
1045
+ updatedAt: t
1046
+ };
1047
+ return i([n, ...r()]), n;
1048
+ },
1049
+ async update(e, t) {
1050
+ let n = r(), a = n.findIndex((t) => t.id === e);
1051
+ if (a === -1) throw Error(`[Templatical] Saved block not found: ${e}`);
1052
+ let o = {
1053
+ ...n[a],
1054
+ ...t,
1055
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
1056
+ }, s = [...n];
1057
+ return s[a] = o, i(s), o;
1058
+ },
1059
+ async delete(e) {
1060
+ let t = r();
1061
+ if (!t.some((t) => t.id === e)) throw Error(`[Templatical] Saved block not found: ${e}`);
1062
+ i(t.filter((t) => t.id !== e));
1063
+ }
1064
+ };
1065
+ }
1066
+ //#endregion
927
1067
  //#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.40_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
928
- function Bt(e, t) {
1068
+ function Ut(e, t) {
929
1069
  return s() ? (l(e, t), !0) : !1;
930
1070
  }
931
- function Vt() {
1071
+ function Wt() {
932
1072
  let e = /* @__PURE__ */ new Set(), t = (t) => {
933
1073
  e.delete(t);
934
1074
  };
@@ -936,7 +1076,7 @@ function Vt() {
936
1076
  on: (n) => {
937
1077
  e.add(n);
938
1078
  let r = () => t(n);
939
- return Bt(r), { off: r };
1079
+ return Ut(r), { off: r };
940
1080
  },
941
1081
  off: t,
942
1082
  trigger: (...t) => Promise.all(Array.from(e).map((e) => e(...t))),
@@ -945,18 +1085,18 @@ function Vt() {
945
1085
  }
946
1086
  };
947
1087
  }
948
- var Ht = /* @__PURE__ */ new WeakMap(), Ut = (...e) => {
1088
+ var Gt = /* @__PURE__ */ new WeakMap(), Kt = (...e) => {
949
1089
  let t = e[0], n = _()?.proxy ?? s();
950
1090
  if (n == null && !le()) throw Error("injectLocal must be called in setup");
951
- return n && Ht.has(n) && t in Ht.get(n) ? Ht.get(n)[t] : v(...e);
952
- }, Wt = typeof window < "u" && typeof document < "u";
1091
+ return n && Gt.has(n) && t in Gt.get(n) ? Gt.get(n)[t] : v(...e);
1092
+ }, qt = typeof window < "u" && typeof document < "u";
953
1093
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
954
- var Gt = (e) => e != null, Kt = Object.prototype.toString, qt = (e) => Kt.call(e) === "[object Object]", Jt = () => {}, Yt = (e, t) => Object.hasOwn(e, t), Xt = /* @__PURE__ */ Zt();
955
- function Zt() {
1094
+ var Jt = (e) => e != null, Yt = Object.prototype.toString, Xt = (e) => Yt.call(e) === "[object Object]", Zt = () => {}, Qt = (e, t) => Object.hasOwn(e, t), $t = /* @__PURE__ */ en();
1095
+ function en() {
956
1096
  var e, t;
957
- return Wt && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
1097
+ return qt && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
958
1098
  }
959
- function Qt(e, t) {
1099
+ function tn(e, t) {
960
1100
  function n(...n) {
961
1101
  return new Promise((r, i) => {
962
1102
  Promise.resolve(e(() => t.apply(this, n), {
@@ -968,10 +1108,10 @@ function Qt(e, t) {
968
1108
  }
969
1109
  return n;
970
1110
  }
971
- var $t = (e) => e();
972
- function en(e, t = {}) {
973
- let n, r, i = Jt, a = (e) => {
974
- clearTimeout(e), i(), i = Jt;
1111
+ var nn = (e) => e();
1112
+ function rn(e, t = {}) {
1113
+ let n, r, i = Zt, a = (e) => {
1114
+ clearTimeout(e), i(), i = Zt;
975
1115
  }, o;
976
1116
  return (s) => {
977
1117
  let c = P(e), l = P(t.maxWait);
@@ -984,7 +1124,7 @@ function en(e, t = {}) {
984
1124
  });
985
1125
  };
986
1126
  }
987
- function tn(e) {
1127
+ function an(e) {
988
1128
  let t;
989
1129
  function n() {
990
1130
  return t ||= e(), t;
@@ -994,32 +1134,32 @@ function tn(e) {
994
1134
  t = void 0, e && await e;
995
1135
  }, n;
996
1136
  }
997
- function nn(e) {
1137
+ function on(e) {
998
1138
  return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
999
1139
  }
1000
- function rn(e) {
1140
+ function sn(e) {
1001
1141
  return Array.isArray(e) ? e : [e];
1002
1142
  }
1003
- function an(e) {
1143
+ function cn(e) {
1004
1144
  return e || _();
1005
1145
  }
1006
- function on(e, t = 200, n = {}) {
1007
- return Qt(en(t, n), e);
1146
+ function ln(e, t = 200, n = {}) {
1147
+ return tn(rn(t, n), e);
1008
1148
  }
1009
- function sn(e, t = 200, n = {}) {
1010
- let r = C(P(e)), i = on(() => {
1149
+ function un(e, t = 200, n = {}) {
1150
+ let r = C(P(e)), i = ln(() => {
1011
1151
  r.value = e.value;
1012
1152
  }, t, n);
1013
1153
  return H(e, () => i()), g(r);
1014
1154
  }
1015
- function cn(e, t, n = {}) {
1016
- let { eventFilter: r = $t, ...i } = n;
1017
- return H(e, Qt(r, t), i);
1155
+ function dn(e, t, n = {}) {
1156
+ let { eventFilter: r = nn, ...i } = n;
1157
+ return H(e, tn(r, t), i);
1018
1158
  }
1019
- function ln(e, t = !0, n) {
1020
- an(n) ? r(e, n) : t ? e() : m(e);
1159
+ function fn(e, t = !0, n) {
1160
+ cn(n) ? r(e, n) : t ? e() : m(e);
1021
1161
  }
1022
- function un(e, t = 1e3, r = {}) {
1162
+ function pn(e, t = 1e3, r = {}) {
1023
1163
  let { immediate: i = !0, immediateCallback: a = !1 } = r, o = null, s = n(!1);
1024
1164
  function c() {
1025
1165
  o &&= (clearInterval(o), null);
@@ -1031,15 +1171,15 @@ function un(e, t = 1e3, r = {}) {
1031
1171
  let n = P(t);
1032
1172
  n <= 0 || (s.value = !0, a && e(), c(), s.value && (o = setInterval(e, n)));
1033
1173
  }
1034
- return i && Wt && d(), (u(t) || typeof t == "function") && Bt(H(t, () => {
1035
- s.value && Wt && d();
1036
- })), Bt(l), {
1174
+ return i && qt && d(), (u(t) || typeof t == "function") && Ut(H(t, () => {
1175
+ s.value && qt && d();
1176
+ })), Ut(l), {
1037
1177
  isActive: g(s),
1038
1178
  pause: l,
1039
1179
  resume: d
1040
1180
  };
1041
1181
  }
1042
- function dn(e, t, r = {}) {
1182
+ function mn(e, t, r = {}) {
1043
1183
  let { immediate: i = !0, immediateCallback: a = !1 } = r, o = n(!1), s;
1044
1184
  function c() {
1045
1185
  s &&= (clearTimeout(s), void 0);
@@ -1052,13 +1192,13 @@ function dn(e, t, r = {}) {
1052
1192
  o.value = !1, s = void 0, e(...n);
1053
1193
  }, P(t));
1054
1194
  }
1055
- return i && (o.value = !0, Wt && u()), Bt(l), {
1195
+ return i && (o.value = !0, qt && u()), Ut(l), {
1056
1196
  isPending: g(o),
1057
1197
  start: u,
1058
1198
  stop: l
1059
1199
  };
1060
1200
  }
1061
- function fn(e = !1, t = {}) {
1201
+ function hn(e = !1, t = {}) {
1062
1202
  let { truthyValue: r = !0, falsyValue: i = !1 } = t, a = u(e), o = n(e);
1063
1203
  function s(e) {
1064
1204
  if (arguments.length) return o.value = e, o.value;
@@ -1069,14 +1209,14 @@ function fn(e = !1, t = {}) {
1069
1209
  }
1070
1210
  return a ? s : [o, s];
1071
1211
  }
1072
- function pn(e, t, n = {}) {
1212
+ function gn(e, t, n = {}) {
1073
1213
  let { debounce: r = 0, maxWait: i = void 0, ...a } = n;
1074
- return cn(e, t, {
1214
+ return dn(e, t, {
1075
1215
  ...a,
1076
- eventFilter: en(r, { maxWait: i })
1216
+ eventFilter: rn(r, { maxWait: i })
1077
1217
  });
1078
1218
  }
1079
- function mn(e, t, n) {
1219
+ function _n(e, t, n) {
1080
1220
  return H(e, t, {
1081
1221
  ...n,
1082
1222
  immediate: !0
@@ -1084,41 +1224,41 @@ function mn(e, t, n) {
1084
1224
  }
1085
1225
  //#endregion
1086
1226
  //#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.40_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
1087
- var hn = Wt ? window : void 0, gn = Wt ? window.document : void 0, _n = Wt ? window.navigator : void 0;
1227
+ var vn = qt ? window : void 0, yn = qt ? window.document : void 0, bn = qt ? window.navigator : void 0;
1088
1228
  function K(e) {
1089
1229
  let t = P(e);
1090
1230
  return t?.$el ?? t;
1091
1231
  }
1092
1232
  function q(...e) {
1093
1233
  let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = O(() => {
1094
- let t = rn(P(e[0])).filter((e) => e != null);
1234
+ let t = sn(P(e[0])).filter((e) => e != null);
1095
1235
  return t.every((e) => typeof e != "string") ? t : void 0;
1096
1236
  });
1097
- return mn(() => [
1098
- n.value?.map((e) => K(e)) ?? [hn].filter((e) => e != null),
1099
- rn(P(n.value ? e[1] : e[0])),
1100
- rn(j(n.value ? e[2] : e[1])),
1237
+ return _n(() => [
1238
+ n.value?.map((e) => K(e)) ?? [vn].filter((e) => e != null),
1239
+ sn(P(n.value ? e[1] : e[0])),
1240
+ sn(j(n.value ? e[2] : e[1])),
1101
1241
  P(n.value ? e[3] : e[2])
1102
1242
  ], ([e, n, r, i], a, o) => {
1103
1243
  if (!e?.length || !n?.length || !r?.length) return;
1104
- let s = qt(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
1244
+ let s = Xt(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
1105
1245
  o(() => {
1106
1246
  c.forEach((e) => e());
1107
1247
  });
1108
1248
  }, { flush: "post" });
1109
1249
  }
1110
- var vn = !1;
1111
- function yn(e, t, n = {}) {
1112
- let { window: r = hn, ignore: i = [], capture: a = !0, detectIframe: o = !1, controls: s = !1 } = n;
1250
+ var xn = !1;
1251
+ function Sn(e, t, n = {}) {
1252
+ let { window: r = vn, ignore: i = [], capture: a = !0, detectIframe: o = !1, controls: s = !1 } = n;
1113
1253
  if (!r) return s ? {
1114
- stop: Jt,
1115
- cancel: Jt,
1116
- trigger: Jt
1117
- } : Jt;
1118
- if (Xt && !vn) {
1119
- vn = !0;
1254
+ stop: Zt,
1255
+ cancel: Zt,
1256
+ trigger: Zt
1257
+ } : Zt;
1258
+ if ($t && !xn) {
1259
+ xn = !0;
1120
1260
  let e = { passive: !0 };
1121
- Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", Jt, e)), r.document.documentElement.addEventListener("click", Jt, e);
1261
+ Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", Zt, e)), r.document.documentElement.addEventListener("click", Zt, e);
1122
1262
  }
1123
1263
  let c = !0, l = (e) => P(i).some((t) => {
1124
1264
  if (typeof t == "string") return Array.from(r.document.querySelectorAll(t)).some((t) => t === e.target || e.composedPath().includes(t));
@@ -1175,21 +1315,21 @@ function yn(e, t, n = {}) {
1175
1315
  }
1176
1316
  } : h;
1177
1317
  }
1178
- function bn() {
1318
+ function Cn() {
1179
1319
  let e = n(!1), t = _();
1180
1320
  return t && r(() => {
1181
1321
  e.value = !0;
1182
1322
  }, t), e;
1183
1323
  }
1184
1324
  /* @__NO_SIDE_EFFECTS__ */
1185
- function xn(e) {
1186
- return bn(), O(() => !!e());
1325
+ function wn(e) {
1326
+ return Cn(), O(() => !!e());
1187
1327
  }
1188
- function Sn(e, t, n = {}) {
1189
- let { window: r = hn, ...i } = n, a, o = /* @__PURE__ */ xn(() => r && "MutationObserver" in r), s = () => {
1328
+ function Tn(e, t, n = {}) {
1329
+ let { window: r = vn, ...i } = n, a, o = /* @__PURE__ */ wn(() => r && "MutationObserver" in r), s = () => {
1190
1330
  a &&= (a.disconnect(), void 0);
1191
1331
  }, c = H(O(() => {
1192
- let t = rn(P(e)).map(K).filter(Gt);
1332
+ let t = sn(P(e)).map(K).filter(Jt);
1193
1333
  return new Set(t);
1194
1334
  }), (e) => {
1195
1335
  s(), o.value && e.size && (a = new MutationObserver(t), e.forEach((e) => a.observe(e, i)));
@@ -1199,25 +1339,25 @@ function Sn(e, t, n = {}) {
1199
1339
  }), l = () => a?.takeRecords(), u = () => {
1200
1340
  c(), s();
1201
1341
  };
1202
- return Bt(u), {
1342
+ return Ut(u), {
1203
1343
  isSupported: o,
1204
1344
  stop: u,
1205
1345
  takeRecords: l
1206
1346
  };
1207
1347
  }
1208
- var Cn = Symbol("vueuse-ssr-width");
1348
+ var En = Symbol("vueuse-ssr-width");
1209
1349
  /* @__NO_SIDE_EFFECTS__ */
1210
- function wn() {
1211
- let e = le() ? Ut(Cn, null) : null;
1350
+ function Dn() {
1351
+ let e = le() ? Kt(En, null) : null;
1212
1352
  return typeof e == "number" ? e : void 0;
1213
1353
  }
1214
- function Tn(e, t = {}) {
1215
- let { window: r = hn, ssrWidth: a = /* @__PURE__ */ wn() } = t, o = /* @__PURE__ */ xn(() => r && "matchMedia" in r && typeof r.matchMedia == "function"), s = n(typeof a == "number"), c = n(), l = n(!1);
1354
+ function On(e, t = {}) {
1355
+ let { window: r = vn, ssrWidth: a = /* @__PURE__ */ Dn() } = t, o = /* @__PURE__ */ wn(() => r && "matchMedia" in r && typeof r.matchMedia == "function"), s = n(typeof a == "number"), c = n(), l = n(!1);
1216
1356
  return i(() => {
1217
1357
  if (s.value) {
1218
1358
  s.value = !o.value, l.value = P(e).split(",").some((e) => {
1219
1359
  let t = e.includes("not all"), n = e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), r = e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), i = !!(n || r);
1220
- return n && i && (i = a >= nn(n[1])), r && i && (i = a <= nn(r[1])), t ? !i : i;
1360
+ return n && i && (i = a >= on(n[1])), r && i && (i = a <= on(r[1])), t ? !i : i;
1221
1361
  });
1222
1362
  return;
1223
1363
  }
@@ -1226,12 +1366,12 @@ function Tn(e, t = {}) {
1226
1366
  l.value = e.matches;
1227
1367
  }, { passive: !0 }), O(() => l.value);
1228
1368
  }
1229
- function En(e, t = {}) {
1230
- let { controls: r = !1, navigator: i = _n } = t, a = /* @__PURE__ */ xn(() => i && "permissions" in i), o = n(), s = typeof e == "string" ? { name: e } : e, c = n(), l = () => {
1369
+ function kn(e, t = {}) {
1370
+ let { controls: r = !1, navigator: i = bn } = t, a = /* @__PURE__ */ wn(() => i && "permissions" in i), o = n(), s = typeof e == "string" ? { name: e } : e, c = n(), l = () => {
1231
1371
  c.value = o.value?.state ?? "prompt";
1232
1372
  };
1233
1373
  q(o, "change", l, { passive: !0 });
1234
- let u = tn(async () => {
1374
+ let u = an(async () => {
1235
1375
  if (a.value) {
1236
1376
  if (!o.value) try {
1237
1377
  o.value = await i.permissions.query(s);
@@ -1249,8 +1389,8 @@ function En(e, t = {}) {
1249
1389
  query: u
1250
1390
  } : c;
1251
1391
  }
1252
- function Dn(e = {}) {
1253
- let { navigator: t = _n, read: r = !1, source: i, copiedDuring: a = 1500, legacy: o = !1 } = e, s = /* @__PURE__ */ xn(() => t && "clipboard" in t), c = En("clipboard-read"), l = En("clipboard-write"), u = O(() => s.value || o), d = n(""), f = n(!1), p = n(!1), m = dn(() => f.value = !1, a, { immediate: !1 }), h = 0;
1392
+ function An(e = {}) {
1393
+ let { navigator: t = bn, read: r = !1, source: i, copiedDuring: a = 1500, legacy: o = !1 } = e, s = /* @__PURE__ */ wn(() => t && "clipboard" in t), c = kn("clipboard-read"), l = kn("clipboard-write"), u = O(() => s.value || o), d = n(""), f = n(!1), p = n(!1), m = mn(() => f.value = !1, a, { immediate: !1 }), h = 0;
1254
1394
  async function _() {
1255
1395
  let e = !(s.value && S(c.value));
1256
1396
  if (!e) try {
@@ -1302,9 +1442,9 @@ function Dn(e = {}) {
1302
1442
  copy: v
1303
1443
  };
1304
1444
  }
1305
- function On(e, t = {}) {
1445
+ function jn(e, t = {}) {
1306
1446
  let r = n(!1), i = n(null), a = 0, o = !0;
1307
- if (Wt) {
1447
+ if (qt) {
1308
1448
  let n = typeof t == "function" ? { onDrop: t } : t, s = n.multiple ?? !0, c = n.preventDefaultForUnhandled ?? !1, l = (e) => {
1309
1449
  let t = Array.from(e.dataTransfer?.files ?? []);
1310
1450
  return t.length === 0 ? null : s ? t : [t[0]];
@@ -1347,8 +1487,8 @@ function On(e, t = {}) {
1347
1487
  isOverDropZone: r
1348
1488
  };
1349
1489
  }
1350
- function kn(e, t, n = {}) {
1351
- let { window: r = hn, ...i } = n, a, o = /* @__PURE__ */ xn(() => r && "ResizeObserver" in r), s = () => {
1490
+ function Mn(e, t, n = {}) {
1491
+ let { window: r = vn, ...i } = n, a, o = /* @__PURE__ */ wn(() => r && "ResizeObserver" in r), s = () => {
1352
1492
  a &&= (a.disconnect(), void 0);
1353
1493
  }, c = H(O(() => {
1354
1494
  let t = P(e);
@@ -1364,12 +1504,12 @@ function kn(e, t, n = {}) {
1364
1504
  }), l = () => {
1365
1505
  s(), c();
1366
1506
  };
1367
- return Bt(l), {
1507
+ return Ut(l), {
1368
1508
  isSupported: o,
1369
1509
  stop: l
1370
1510
  };
1371
1511
  }
1372
- function An(e, t = {}) {
1512
+ function Nn(e, t = {}) {
1373
1513
  let { reset: r = !0, windowResize: i = !0, windowScroll: a = !0, immediate: o = !0, updateTiming: s = "sync" } = t, c = n(0), l = n(0), u = n(0), d = n(0), f = n(0), p = n(0), m = n(0), h = n(0);
1374
1514
  function g() {
1375
1515
  let t = K(e);
@@ -1383,10 +1523,10 @@ function An(e, t = {}) {
1383
1523
  function _() {
1384
1524
  s === "sync" ? g() : s === "next-frame" && requestAnimationFrame(() => g());
1385
1525
  }
1386
- return kn(e, _), H(() => K(e), (e) => !e && _()), Sn(e, _, { attributeFilter: ["style", "class"] }), a && q("scroll", _, {
1526
+ return Mn(e, _), H(() => K(e), (e) => !e && _()), Tn(e, _, { attributeFilter: ["style", "class"] }), a && q("scroll", _, {
1387
1527
  capture: !0,
1388
1528
  passive: !0
1389
- }), i && q("resize", _, { passive: !0 }), ln(() => {
1529
+ }), i && q("resize", _, { passive: !0 }), fn(() => {
1390
1530
  o && _();
1391
1531
  }), {
1392
1532
  height: c,
@@ -1400,8 +1540,8 @@ function An(e, t = {}) {
1400
1540
  update: _
1401
1541
  };
1402
1542
  }
1403
- function jn(e, t, r = {}) {
1404
- let { root: i, rootMargin: a, threshold: o = 0, window: s = hn, immediate: c = !0 } = r, l = /* @__PURE__ */ xn(() => s && "IntersectionObserver" in s), u = O(() => rn(P(e)).map(K).filter(Gt)), d = Jt, f = n(c), p = l.value ? H(() => [
1543
+ function Pn(e, t, r = {}) {
1544
+ let { root: i, rootMargin: a, threshold: o = 0, window: s = vn, immediate: c = !0 } = r, l = /* @__PURE__ */ wn(() => s && "IntersectionObserver" in s), u = O(() => sn(P(e)).map(K).filter(Jt)), d = Zt, f = n(c), p = l.value ? H(() => [
1405
1545
  u.value,
1406
1546
  K(i),
1407
1547
  P(a),
@@ -1414,15 +1554,15 @@ function jn(e, t, r = {}) {
1414
1554
  threshold: o
1415
1555
  });
1416
1556
  e.forEach((e) => e && i.observe(e)), d = () => {
1417
- i.disconnect(), d = Jt;
1557
+ i.disconnect(), d = Zt;
1418
1558
  };
1419
1559
  }, {
1420
1560
  immediate: c,
1421
1561
  flush: "post"
1422
- }) : Jt, m = () => {
1562
+ }) : Zt, m = () => {
1423
1563
  d(), p(), f.value = !1;
1424
1564
  };
1425
- return Bt(m), {
1565
+ return Ut(m), {
1426
1566
  isSupported: l,
1427
1567
  isActive: f,
1428
1568
  pause() {
@@ -1434,21 +1574,21 @@ function jn(e, t, r = {}) {
1434
1574
  stop: m
1435
1575
  };
1436
1576
  }
1437
- var Mn = {
1577
+ var Fn = {
1438
1578
  multiple: !0,
1439
1579
  accept: "*",
1440
1580
  reset: !1,
1441
1581
  directory: !1
1442
1582
  };
1443
- function Nn(e) {
1583
+ function In(e) {
1444
1584
  if (!e) return null;
1445
1585
  if (e instanceof FileList) return e;
1446
1586
  let t = new DataTransfer();
1447
1587
  for (let n of e) t.items.add(n);
1448
1588
  return t.files;
1449
1589
  }
1450
- function Pn(e = {}) {
1451
- let { document: t = gn } = e, n = C(Nn(e.initialFiles)), { on: r, trigger: a } = Vt(), { on: o, trigger: s } = Vt(), c = O(() => {
1590
+ function Ln(e = {}) {
1591
+ let { document: t = yn } = e, n = C(In(e.initialFiles)), { on: r, trigger: a } = Wt(), { on: o, trigger: s } = Wt(), c = O(() => {
1452
1592
  let r = K(e.input) ?? (t ? t.createElement("input") : void 0);
1453
1593
  return r && (r.type = "file", r.onchange = (e) => {
1454
1594
  n.value = e.target.files, a(n.value);
@@ -1459,7 +1599,7 @@ function Pn(e = {}) {
1459
1599
  n.value = null, c.value && c.value.value && (c.value.value = "", a(null));
1460
1600
  }, u = (e) => {
1461
1601
  let t = c.value;
1462
- t && (t.multiple = P(e.multiple), t.accept = P(e.accept), t.webkitdirectory = P(e.directory), Yt(e, "capture") && (t.capture = P(e.capture)));
1602
+ t && (t.multiple = P(e.multiple), t.accept = P(e.accept), t.webkitdirectory = P(e.directory), Qt(e, "capture") && (t.capture = P(e.capture)));
1463
1603
  };
1464
1604
  return i(() => {
1465
1605
  u(e);
@@ -1469,7 +1609,7 @@ function Pn(e = {}) {
1469
1609
  let n = c.value;
1470
1610
  if (!n) return;
1471
1611
  let r = {
1472
- ...Mn,
1612
+ ...Fn,
1473
1613
  ...e,
1474
1614
  ...t
1475
1615
  };
@@ -1482,26 +1622,26 @@ function Pn(e = {}) {
1482
1622
  }
1483
1623
  //#endregion
1484
1624
  //#region src/utils/activeEditorTracker.ts
1485
- var Fn = /* @__PURE__ */ new Set(), In = 0, Ln = 0;
1486
- function Rn() {
1487
- let e = ++Ln;
1488
- return Fn.add(e), In === 0 && (In = e), {
1625
+ var Rn = /* @__PURE__ */ new Set(), zn = 0, Bn = 0;
1626
+ function Vn() {
1627
+ let e = ++Bn;
1628
+ return Rn.add(e), zn === 0 && (zn = e), {
1489
1629
  id: e,
1490
- isActive: () => Fn.size <= 1 || In === e,
1630
+ isActive: () => Rn.size <= 1 || zn === e,
1491
1631
  claim: () => {
1492
- In = e;
1632
+ zn = e;
1493
1633
  },
1494
1634
  dispose: () => {
1495
- if (Fn.delete(e), In === e) {
1496
- let e = Array.from(Fn);
1497
- In = e[e.length - 1] ?? 0;
1635
+ if (Rn.delete(e), zn === e) {
1636
+ let e = Array.from(Rn);
1637
+ zn = e[e.length - 1] ?? 0;
1498
1638
  }
1499
1639
  }
1500
1640
  };
1501
1641
  }
1502
1642
  //#endregion
1503
1643
  //#region src/keys.ts
1504
- var zn = Symbol("translations"), Bn = Symbol("editor"), Vn = Symbol("history"), Hn = Symbol("blockActions"), Un = Symbol("conditionPreview"), Wn = Symbol("fontsManager"), Gn = Symbol("themeStyles"), Kn = Symbol("tplUiTheme"), qn = Symbol("blockDefaults"), Jn = Symbol("blockRegistry"), Yn = Symbol("customBlockDefinitions"), Xn = Symbol("paletteBlocks"), Zn = Symbol("htmlBlockPreview"), Qn = Symbol("colors"), $n = Symbol("customBlockStylesheets"), er = Symbol("mergeTags"), tr = Symbol("mergeTagSyntax"), nr = Symbol("onRequestMergeTag"), rr = Symbol("mergeTagAutocomplete"), ir = Symbol("mergeTagPicker"), ar = Symbol("logicTags"), or = Symbol("logicPairs"), sr = Symbol("logicPicker"), cr = Symbol("onRequestLogic"), lr = Symbol("onRequestMedia"), ur = Symbol("imageUrlResolver"), dr = Symbol("displayConditions"), fr = Symbol("allowCustomConditions"), pr = Symbol("capabilities"), mr = Symbol("keyboardReorder"), hr = Symbol("templateLint"), gr = Symbol("editorRoot"), _r = Symbol("popoverRoot"), vr = Symbol("authManager"), yr = Symbol("aiConfig"), br = Symbol("comments"), xr = Symbol("savedModulesHeadless"), Sr = Symbol("scoring"), Cr = Symbol("cloudTranslations");
1644
+ var Hn = Symbol("translations"), Un = Symbol("editor"), Wn = Symbol("history"), Gn = Symbol("blockActions"), Kn = Symbol("conditionPreview"), qn = Symbol("fontsManager"), Jn = Symbol("themeStyles"), Yn = Symbol("tplUiTheme"), Xn = Symbol("blockDefaults"), Zn = Symbol("blockRegistry"), Qn = Symbol("customBlockDefinitions"), $n = Symbol("paletteBlocks"), er = Symbol("htmlBlockPreview"), tr = Symbol("colors"), nr = Symbol("customBlockStylesheets"), rr = Symbol("mergeTags"), ir = Symbol("mergeTagSyntax"), ar = Symbol("onRequestMergeTag"), or = Symbol("mergeTagAutocomplete"), sr = Symbol("mergeTagPicker"), cr = Symbol("logicTags"), lr = Symbol("logicPairs"), ur = Symbol("logicPicker"), dr = Symbol("onRequestLogic"), fr = Symbol("onRequestMedia"), pr = Symbol("imageUrlResolver"), mr = Symbol("displayConditions"), hr = Symbol("allowCustomConditions"), gr = Symbol("capabilities"), _r = Symbol("keyboardReorder"), vr = Symbol("templateLint"), yr = Symbol("editorRoot"), br = Symbol("popoverRoot"), xr = Symbol("savedBlocks"), Sr = Symbol("authManager"), Cr = Symbol("aiConfig"), wr = Symbol("comments"), Tr = Symbol("scoring"), Er = Symbol("cloudTranslations");
1505
1645
  function J(e, t) {
1506
1646
  let n = v(e, null);
1507
1647
  if (n == null) throw Error(`${t} requires a provider for ${e.description ?? "unknown key"}. Ensure it is a descendant of Editor or CloudEditor.`);
@@ -1509,7 +1649,7 @@ function J(e, t) {
1509
1649
  }
1510
1650
  //#endregion
1511
1651
  //#region src/composables/useImageUrlResolver.ts
1512
- function wr(e) {
1652
+ function Dr(e) {
1513
1653
  let t = S(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
1514
1654
  function r(e) {
1515
1655
  return t.get(e);
@@ -1542,8 +1682,8 @@ function wr(e) {
1542
1682
  lookup: a
1543
1683
  };
1544
1684
  }
1545
- function Tr(e) {
1546
- let t = v(ur, null), n = O(e);
1685
+ function Or(e) {
1686
+ let t = v(pr, null), n = O(e);
1547
1687
  if (!t) return n;
1548
1688
  let r;
1549
1689
  function i() {
@@ -1572,7 +1712,7 @@ function Tr(e) {
1572
1712
  }
1573
1713
  //#endregion
1574
1714
  //#region src/composables/useMergeTagPicker.ts
1575
- function Er() {
1715
+ function kr() {
1576
1716
  let e = C(!1), t = C([]), n = null;
1577
1717
  function r(r) {
1578
1718
  if (n) {
@@ -1602,7 +1742,7 @@ function Er() {
1602
1742
  }
1603
1743
  //#endregion
1604
1744
  //#region src/composables/useLogicTagPicker.ts
1605
- function Dr() {
1745
+ function Ar() {
1606
1746
  let e = C(!1), t = C([]), n = C([]), r = null;
1607
1747
  function i(i, a) {
1608
1748
  if (r) {
@@ -1633,17 +1773,17 @@ function Dr() {
1633
1773
  }
1634
1774
  //#endregion
1635
1775
  //#region src/composables/useTemplateLint.ts
1636
- function Or(e) {
1776
+ function jr(e) {
1637
1777
  return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
1638
1778
  }
1639
- function kr(e) {
1640
- let t = C([]), r = C(!1), i = C(!1), a = n(null), o = Or(e.options), s = null, c = !1;
1779
+ function Mr(e) {
1780
+ let t = C([]), r = C(!1), i = C(!1), a = n(null), o = jr(e.options), s = null, c = !1;
1641
1781
  o || l();
1642
1782
  async function l() {
1643
1783
  try {
1644
- let t = await import("./quality-DffYv9j5.js").then((e) => e.t);
1784
+ let t = await import("./quality-BRbHtAk1.js").then((e) => e.t);
1645
1785
  if (c) return;
1646
- a.value = { lintTemplate: t.lintTemplate }, r.value = !0, u(), s = pn(e.content, u, {
1786
+ a.value = { lintTemplate: t.lintTemplate }, r.value = !0, u(), s = gn(e.content, u, {
1647
1787
  debounce: e.debounce ?? 500,
1648
1788
  deep: !0
1649
1789
  });
@@ -1679,7 +1819,7 @@ function kr(e) {
1679
1819
  //#endregion
1680
1820
  //#region src/composables/useI18n.ts
1681
1821
  function Y(e) {
1682
- let t = e ?? v(zn, null);
1822
+ let t = e ?? v(Hn, null);
1683
1823
  if (!t) throw Error("useI18n() requires a translations provider. Ensure the component is a descendant of Editor or CloudEditor.");
1684
1824
  let n = u(t) ? t.value : t;
1685
1825
  function r(e, t) {
@@ -1692,14 +1832,19 @@ function Y(e) {
1692
1832
  }
1693
1833
  //#endregion
1694
1834
  //#region src/utils/blockTypeLabels.ts
1695
- function Ar(e, t) {
1835
+ function Nr(e, t) {
1696
1836
  return t.blocks[e] ?? e;
1697
1837
  }
1838
+ function Pr(e, t, n = []) {
1839
+ if (e.type !== "custom") return Nr(e.type, t);
1840
+ let { customType: r } = e;
1841
+ return n.find((e) => e.type === r)?.name ?? r;
1842
+ }
1698
1843
  //#endregion
1699
1844
  //#region src/composables/useKeyboardReorder.ts
1700
- function jr(e, t) {
1701
- let n = C(null), r = C(""), i = null;
1702
- function a(t) {
1845
+ function Fr(e, t, n = []) {
1846
+ let r = C(null), i = C(""), a = null;
1847
+ function o(t) {
1703
1848
  let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
1704
1849
  if (r !== -1) return {
1705
1850
  index: r,
@@ -1720,86 +1865,86 @@ function jr(e, t) {
1720
1865
  }
1721
1866
  return null;
1722
1867
  }
1723
- function o(n) {
1724
- let r = a(n);
1725
- if (!r) return "";
1726
- let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
1727
- return i ? Ar(i.type, t.t) : "";
1868
+ function s(r) {
1869
+ let i = o(r);
1870
+ if (!i) return "";
1871
+ let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
1872
+ return a ? Pr(a, t.t, n) : "";
1728
1873
  }
1729
- function s(t, n) {
1874
+ function c(t, n) {
1730
1875
  return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
1731
1876
  }
1732
- function c(e) {
1733
- r.value = "", queueMicrotask(() => {
1734
- r.value = e;
1735
- });
1736
- }
1737
1877
  function l(e) {
1738
- return n.value === e;
1878
+ i.value = "", queueMicrotask(() => {
1879
+ i.value = e;
1880
+ });
1739
1881
  }
1740
1882
  function u(e) {
1741
- let r = a(e);
1742
- r && (n.value = e, i = r, c(t.format(t.t.blockActions.lifted, {
1743
- block: o(e),
1744
- position: String(r.index + 1),
1745
- total: String(r.total)
1883
+ return r.value === e;
1884
+ }
1885
+ function d(e) {
1886
+ let n = o(e);
1887
+ n && (r.value = e, a = n, l(t.format(t.t.blockActions.lifted, {
1888
+ block: s(e),
1889
+ position: String(n.index + 1),
1890
+ total: String(n.total)
1746
1891
  })));
1747
1892
  }
1748
- function d(n, r) {
1749
- let i = a(n);
1893
+ function f(n, r) {
1894
+ let i = o(n);
1750
1895
  if (!i) return;
1751
- let s = i.index + r;
1752
- s < 0 || s >= i.total || (e.moveBlock(n, s, i.sectionId, i.columnIndex), c(t.format(t.t.blockActions.moved, {
1753
- block: o(n),
1754
- position: String(s + 1),
1896
+ let a = i.index + r;
1897
+ a < 0 || a >= i.total || (e.moveBlock(n, a, i.sectionId, i.columnIndex), l(t.format(t.t.blockActions.moved, {
1898
+ block: s(n),
1899
+ position: String(a + 1),
1755
1900
  total: String(i.total)
1756
1901
  })));
1757
1902
  }
1758
- function f(e) {
1759
- d(e, -1);
1760
- }
1761
1903
  function p(e) {
1762
- d(e, 1);
1904
+ f(e, -1);
1763
1905
  }
1764
1906
  function m(e) {
1765
- let r = a(e);
1766
- r && c(t.format(t.t.blockActions.dropped, {
1767
- block: o(e),
1768
- position: String(r.index + 1),
1769
- total: String(r.total)
1770
- })), n.value = null, i = null;
1907
+ f(e, 1);
1771
1908
  }
1772
- function h() {
1773
- let r = n.value;
1774
- if (r && i) {
1775
- let n = a(r);
1776
- n && (n && (n.sectionId !== i.sectionId || n.columnIndex !== i.columnIndex) || n && n.index !== i.index) && e.moveBlock(r, i.index, i.sectionId, i.columnIndex), c(t.format(t.t.blockActions.cancelled, {
1777
- block: o(r),
1778
- position: String(i.index + 1)
1909
+ function h(e) {
1910
+ let n = o(e);
1911
+ n && l(t.format(t.t.blockActions.dropped, {
1912
+ block: s(e),
1913
+ position: String(n.index + 1),
1914
+ total: String(n.total)
1915
+ })), r.value = null, a = null;
1916
+ }
1917
+ function g() {
1918
+ let n = r.value;
1919
+ if (n && a) {
1920
+ let r = o(n);
1921
+ r && (r && (r.sectionId !== a.sectionId || r.columnIndex !== a.columnIndex) || r && r.index !== a.index) && e.moveBlock(n, a.index, a.sectionId, a.columnIndex), l(t.format(t.t.blockActions.cancelled, {
1922
+ block: s(n),
1923
+ position: String(a.index + 1)
1779
1924
  }));
1780
1925
  }
1781
- n.value = null, i = null;
1926
+ r.value = null, a = null;
1782
1927
  }
1783
1928
  return {
1784
- liftedBlockId: n,
1785
- announcement: r,
1786
- isLifted: l,
1787
- lift: u,
1788
- cancel: h,
1789
- moveUp: f,
1790
- moveDown: p,
1791
- drop: m
1929
+ liftedBlockId: r,
1930
+ announcement: i,
1931
+ isLifted: u,
1932
+ lift: d,
1933
+ cancel: g,
1934
+ moveUp: p,
1935
+ moveDown: m,
1936
+ drop: h
1792
1937
  };
1793
1938
  }
1794
1939
  //#endregion
1795
1940
  //#region src/composables/useUiTheme.ts
1796
- function Mr(e) {
1797
- let t = Tn("(prefers-color-scheme: dark)");
1941
+ function Ir(e) {
1942
+ let t = On("(prefers-color-scheme: dark)");
1798
1943
  return { resolvedTheme: O(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
1799
1944
  }
1800
1945
  //#endregion
1801
1946
  //#region src/composables/useThemeStyles.ts
1802
- var Nr = {
1947
+ var Lr = {
1803
1948
  bg: "--tpl-bg",
1804
1949
  bgElevated: "--tpl-bg-elevated",
1805
1950
  bgHover: "--tpl-bg-hover",
@@ -1823,10 +1968,10 @@ var Nr = {
1823
1968
  dangerLight: "--tpl-danger-light",
1824
1969
  canvasBg: "--tpl-canvas-bg"
1825
1970
  };
1826
- function Pr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1971
+ function Rr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1827
1972
  return { themeStyles: O(() => {
1828
1973
  let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
1829
- if (a) for (let [e, t] of Object.entries(Nr)) {
1974
+ if (a) for (let [e, t] of Object.entries(Lr)) {
1830
1975
  let n = a[e];
1831
1976
  n && (r[t] = n);
1832
1977
  }
@@ -1835,27 +1980,27 @@ function Pr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1835
1980
  }
1836
1981
  //#endregion
1837
1982
  //#region src/utils/logger.ts
1838
- var Fr = "[Templatical]";
1839
- function Ir() {
1983
+ var zr = "[Templatical]";
1984
+ function Br() {
1840
1985
  return typeof process < "u" && !0;
1841
1986
  }
1842
- var Lr = {
1987
+ var Vr = {
1843
1988
  warn(...e) {
1844
- console.warn(Fr, ...e);
1989
+ console.warn(zr, ...e);
1845
1990
  },
1846
1991
  error(...e) {
1847
- console.error(Fr, ...e);
1992
+ console.error(zr, ...e);
1848
1993
  },
1849
1994
  debug(...e) {
1850
- Ir() || console.debug(Fr, ...e);
1995
+ Br() || console.debug(zr, ...e);
1851
1996
  },
1852
1997
  info(...e) {
1853
- Ir() || console.info(Fr, ...e);
1998
+ Br() || console.info(zr, ...e);
1854
1999
  }
1855
2000
  };
1856
2001
  //#endregion
1857
2002
  //#region src/composables/useBlockRegistry.ts
1858
- function Rr() {
2003
+ function Hr() {
1859
2004
  let e = n(/* @__PURE__ */ new Map());
1860
2005
  function t(t, n) {
1861
2006
  e.value.set(t, n), oe(e);
@@ -1895,7 +2040,7 @@ function Rr() {
1895
2040
  strictFilters: !1
1896
2041
  }).parseAndRender(t.template, e.fieldValues);
1897
2042
  } catch (t) {
1898
- return Lr.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
2043
+ return Vr.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
1899
2044
  }
1900
2045
  }
1901
2046
  function l(t) {
@@ -1913,9 +2058,9 @@ function Rr() {
1913
2058
  }
1914
2059
  //#endregion
1915
2060
  //#region src/composables/useCustomBlockStylesheets.ts
1916
- function zr(e, t) {
2061
+ function Ur(e, t) {
1917
2062
  return O(() => {
1918
- let n = Br(e.value.blocks);
2063
+ let n = Wr(e.value.blocks);
1919
2064
  if (n.size === 0) return [];
1920
2065
  let r = /* @__PURE__ */ new Set(), i = [];
1921
2066
  for (let e of n) {
@@ -1927,11 +2072,11 @@ function zr(e, t) {
1927
2072
  return i;
1928
2073
  });
1929
2074
  }
1930
- function Br(e) {
2075
+ function Wr(e) {
1931
2076
  let t = /* @__PURE__ */ new Set();
1932
- return Vr(e, t), t;
2077
+ return Gr(e, t), t;
1933
2078
  }
1934
- function Vr(e, t) {
2079
+ function Gr(e, t) {
1935
2080
  for (let n of e) {
1936
2081
  if (De(n)) {
1937
2082
  t.add(n.customType);
@@ -1940,13 +2085,13 @@ function Vr(e, t) {
1940
2085
  if (n.type === "section") {
1941
2086
  let e = n.children;
1942
2087
  if (!e) continue;
1943
- for (let n of e) Vr(n, t);
2088
+ for (let n of e) Gr(n, t);
1944
2089
  }
1945
2090
  }
1946
2091
  }
1947
2092
  //#endregion
1948
2093
  //#region src/utils/registerBuiltInBlocks.ts
1949
- var Hr = [
2094
+ var Kr = [
1950
2095
  {
1951
2096
  type: "section",
1952
2097
  createBlock: Qe
@@ -2000,8 +2145,8 @@ var Hr = [
2000
2145
  createBlock: ot
2001
2146
  }
2002
2147
  ];
2003
- function Ur(e, t) {
2004
- for (let n of Hr) {
2148
+ function qr(e, t) {
2149
+ for (let n of Kr) {
2005
2150
  let r = t[n.type];
2006
2151
  r && e.registerBuiltIn(n.type, {
2007
2152
  component: r,
@@ -2011,23 +2156,23 @@ function Ur(e, t) {
2011
2156
  }
2012
2157
  //#endregion
2013
2158
  //#region src/utils/resolveHtmlBlockPreview.ts
2014
- function Wr(e) {
2159
+ function Jr(e) {
2015
2160
  return typeof e == "boolean" ? e : e?.enabled ?? !1;
2016
2161
  }
2017
2162
  //#endregion
2018
2163
  //#region src/utils/resolveColorsConfig.ts
2019
- var Gr = {
2164
+ var Yr = {
2020
2165
  presets: [],
2021
2166
  allowCustom: !0,
2022
2167
  allowCustomIgnored: !1,
2023
2168
  invalidPresets: []
2024
- }, Kr = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;
2025
- function qr(e, t = Gr) {
2169
+ }, Xr = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;
2170
+ function Zr(e, t = Yr) {
2026
2171
  let n, r;
2027
2172
  if (e?.presets === void 0) n = t.presets, r = [];
2028
2173
  else {
2029
2174
  n = [], r = [];
2030
- for (let t of e.presets) Kr.test(t) ? n.push(t) : r.push(t);
2175
+ for (let t of e.presets) Xr.test(t) ? n.push(t) : r.push(t);
2031
2176
  }
2032
2177
  let i = e?.allowCustom ?? t.allowCustom, a = !i && n.length === 0;
2033
2178
  return {
@@ -2039,30 +2184,30 @@ function qr(e, t = Gr) {
2039
2184
  }
2040
2185
  //#endregion
2041
2186
  //#region src/utils/color.ts
2042
- function Jr(e) {
2187
+ function Qr(e) {
2043
2188
  let t = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i.exec(e.trim());
2044
2189
  if (!t) return e;
2045
2190
  let n = (e) => Number(e).toString(16).padStart(2, "0");
2046
2191
  return `#${n(t[1])}${n(t[2])}${n(t[3])}`;
2047
2192
  }
2048
- function Yr(e) {
2049
- let t = Jr(e), n = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(t);
2193
+ function $r(e) {
2194
+ let t = Qr(e), n = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(t);
2050
2195
  return n ? `#${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`.toLowerCase() : /^#[0-9a-f]{6}$/i.test(t) ? t.toLowerCase() : t;
2051
2196
  }
2052
2197
  //#endregion
2053
2198
  //#region src/utils/collectOffPaletteDefaults.ts
2054
- function Xr(e) {
2199
+ function ei(e) {
2055
2200
  return typeof e == "object" && !!e && !Array.isArray(e);
2056
2201
  }
2057
- function Zr(e, t, n) {
2058
- let r = new Set(e.map((e) => Yr(e))), i = [], a = (e, t) => {
2059
- for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Yr(o)) && i.push(`${t}.${n}: ${o}`) : Xr(o) && a(o, `${t}.${n}`);
2202
+ function ti(e, t, n) {
2203
+ let r = new Set(e.map((e) => $r(e))), i = [], a = (e, t) => {
2204
+ for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has($r(o)) && i.push(`${t}.${n}: ${o}`) : ei(o) && a(o, `${t}.${n}`);
2060
2205
  }, o = t;
2061
2206
  for (let [e, t] of Object.entries(Ve)) {
2062
2207
  let n = o?.[e];
2063
2208
  a({
2064
2209
  ...t,
2065
- ...Xr(n) ? n : {}
2210
+ ...ei(n) ? n : {}
2066
2211
  }, e);
2067
2212
  }
2068
2213
  return a({
@@ -2072,8 +2217,8 @@ function Zr(e, t, n) {
2072
2217
  }
2073
2218
  //#endregion
2074
2219
  //#region src/utils/resolveFieldColors.ts
2075
- function Qr(e, t) {
2076
- let n = qr({ presets: e.presets }, Gr), r = n.presets.length === 0;
2220
+ function ni(e, t) {
2221
+ let n = Zr({ presets: e.presets }, Yr), r = n.presets.length === 0;
2077
2222
  return {
2078
2223
  presets: r ? t.presets : n.presets,
2079
2224
  allowCustom: t.allowCustom === !1 ? !1 : e.allowCustom ?? t.allowCustom,
@@ -2085,9 +2230,9 @@ function Qr(e, t) {
2085
2230
  }
2086
2231
  //#endregion
2087
2232
  //#region src/utils/collectColorFieldIssues.ts
2088
- function $r(e, t) {
2233
+ function ri(e, t) {
2089
2234
  let n = [], r = (r, i) => {
2090
- let a = Qr(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
2235
+ let a = ni(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
2091
2236
  if (a.invalidPresets.length > 0 && n.push({
2092
2237
  id: s("invalid-presets"),
2093
2238
  message: `${o}: presets skipped invalid entries: ${a.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).` + (a.presetsInherited ? " No valid entries are left, so the field inherits colors.presets." : "")
@@ -2098,8 +2243,8 @@ function $r(e, t) {
2098
2243
  id: s("allow-custom-ignored"),
2099
2244
  message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
2100
2245
  }), !a.allowCustom && a.presets.length > 0) {
2101
- let e = r.default ?? "", t = new Set(a.presets.map((e) => Yr(e)));
2102
- e !== "" && !t.has(Yr(e)) && n.push({
2246
+ let e = r.default ?? "", t = new Set(a.presets.map((e) => $r(e)));
2247
+ e !== "" && !t.has($r(e)) && n.push({
2103
2248
  id: s("off-palette-default"),
2104
2249
  message: `${o} locks custom colours, but its default ${e} falls outside the field's presets: ${a.presets.join(", ")}. New blocks start on a colour the picker can't reselect — set the default from the same palette.`
2105
2250
  });
@@ -2111,7 +2256,7 @@ function $r(e, t) {
2111
2256
  }
2112
2257
  //#endregion
2113
2258
  //#region src/utils/keyboardShortcuts.ts
2114
- function ei(e) {
2259
+ function ii(e) {
2115
2260
  for (let t of e.composedPath()) {
2116
2261
  if (!(t instanceof HTMLElement)) continue;
2117
2262
  if (t.isContentEditable) return !0;
@@ -2120,26 +2265,40 @@ function ei(e) {
2120
2265
  }
2121
2266
  return !1;
2122
2267
  }
2123
- function ti(e, t) {
2268
+ function ai(e, t) {
2124
2269
  let n = e.metaKey || e.ctrlKey;
2125
2270
  if (n && e.key.toLowerCase() === "s") {
2126
2271
  e.preventDefault(), t.onSave?.();
2127
2272
  return;
2128
2273
  }
2129
2274
  if (n && e.key.toLowerCase() === "z") {
2130
- if (ei(e)) return;
2275
+ if (ii(e)) return;
2131
2276
  e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
2132
2277
  return;
2133
2278
  }
2279
+ if (t.isPicking?.() && !ii(e)) {
2280
+ if (e.key === "Escape") {
2281
+ e.preventDefault(), t.onCancelPick?.();
2282
+ return;
2283
+ }
2284
+ if (e.key === "Enter") {
2285
+ e.preventDefault(), t.onConfirmPick?.();
2286
+ return;
2287
+ }
2288
+ if (e.key === "Delete" || e.key === "Backspace") {
2289
+ e.preventDefault();
2290
+ return;
2291
+ }
2292
+ }
2134
2293
  if (e.key === "Escape") {
2135
2294
  t.selectBlock(null);
2136
2295
  return;
2137
2296
  }
2138
- (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !ei(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
2297
+ (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !ii(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
2139
2298
  }
2140
2299
  //#endregion
2141
2300
  //#region src/utils/mergeTagLabelSegments.ts
2142
- function ni(e, t, n) {
2301
+ function oi(e, t, n) {
2143
2302
  if (!e) return [];
2144
2303
  let r = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), i = [], a = 0, o;
2145
2304
  for (; (o = r.exec(e)) !== null;) {
@@ -2166,20 +2325,20 @@ function ni(e, t, n) {
2166
2325
  }
2167
2326
  //#endregion
2168
2327
  //#region src/components/MergeTagPreviewText.vue
2169
- var ri = B({
2328
+ var si = B({
2170
2329
  name: "MergeTagPreviewText",
2171
2330
  props: { text: {
2172
2331
  type: String,
2173
2332
  required: !0
2174
2333
  } },
2175
2334
  setup(e) {
2176
- let t = v(er, []), n = v(tr, ft.liquid), r = O(() => ni(e.text, t, n));
2335
+ let t = v(rr, []), n = v(ir, ft.liquid), r = O(() => oi(e.text, t, n));
2177
2336
  return () => r.value.map((e, t) => e.type === "tag" ? a("span", {
2178
2337
  key: t,
2179
2338
  class: "tpl-merge-tag-label"
2180
2339
  }, e.value) : e.value);
2181
2340
  }
2182
- }), ii = { class: "tpl:text-center" }, ai = ["href"], oi = /* @__PURE__ */ B({
2341
+ }), ci = { class: "tpl:text-center" }, li = ["href"], ui = /* @__PURE__ */ B({
2183
2342
  __name: "ButtonBlock",
2184
2343
  props: {
2185
2344
  block: {},
@@ -2200,17 +2359,17 @@ var ri = B({
2200
2359
  };
2201
2360
  return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
2202
2361
  });
2203
- return (t, r) => (f(), k("div", ii, [I("a", {
2362
+ return (t, r) => (f(), k("div", ci, [I("a", {
2204
2363
  href: e.block.url || "#",
2205
2364
  style: L(n.value),
2206
2365
  class: "tpl:cursor-default",
2207
2366
  onClick: r[0] ||= M(() => {}, ["prevent"])
2208
- }, [V(ri, { text: e.block.text }, null, 8, ["text"])], 12, ai)]));
2367
+ }, [V(si, { text: e.block.text }, null, 8, ["text"])], 12, li)]));
2209
2368
  }
2210
- }), si = (e) => e === "", ci = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), li = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ui = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), di = (e) => {
2211
- let t = ui(e);
2369
+ }), di = (e) => e === "", fi = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), pi = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), mi = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), hi = (e) => {
2370
+ let t = mi(e);
2212
2371
  return t.charAt(0).toUpperCase() + t.slice(1);
2213
- }, fi = {
2372
+ }, gi = {
2214
2373
  xmlns: "http://www.w3.org/2000/svg",
2215
2374
  width: 24,
2216
2375
  height: 24,
@@ -2220,35 +2379,35 @@ var ri = B({
2220
2379
  "stroke-width": 2,
2221
2380
  "stroke-linecap": "round",
2222
2381
  "stroke-linejoin": "round"
2223
- }, pi = /* @__PURE__ */ Symbol("lucide-icons");
2224
- function mi() {
2225
- return v(pi, {});
2382
+ }, _i = /* @__PURE__ */ Symbol("lucide-icons");
2383
+ function vi() {
2384
+ return v(_i, {});
2226
2385
  }
2227
2386
  //#endregion
2228
- //#region ../../node_modules/.pnpm/@lucide+vue@1.26.0_vue@3.5.40_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
2229
- var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absolute-stroke-width": i, strokeWidth: o, "stroke-width": s, size: c, color: l, ...u }, { slots: d }) => {
2230
- let { size: f, color: p, strokeWidth: m = 2, absoluteStrokeWidth: h = !1, class: g = "" } = mi(), _ = O(() => {
2231
- let e = si(r) || si(i) || r === !0 || i === !0 || h === !0, t = o || s || m || fi["stroke-width"];
2232
- return e ? Number(t) * 24 / Number(c ?? f ?? fi.width) : t;
2387
+ //#region ../../node_modules/.pnpm/@lucide+vue@1.27.0_vue@3.5.40_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
2388
+ var yi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absolute-stroke-width": i, strokeWidth: o, "stroke-width": s, size: c, color: l, ...u }, { slots: d }) => {
2389
+ let { size: f, color: p, strokeWidth: m = 2, absoluteStrokeWidth: h = !1, class: g = "" } = vi(), _ = O(() => {
2390
+ let e = di(r) || di(i) || r === !0 || i === !0 || h === !0, t = o || s || m || gi["stroke-width"];
2391
+ return e ? Number(t) * 24 / Number(c ?? f ?? gi.width) : t;
2233
2392
  });
2234
2393
  return a("svg", {
2235
- ...fi,
2394
+ ...gi,
2236
2395
  ...u,
2237
- width: c ?? f ?? fi.width,
2238
- height: c ?? f ?? fi.height,
2239
- stroke: l ?? p ?? fi.stroke,
2396
+ width: c ?? f ?? gi.width,
2397
+ height: c ?? f ?? gi.height,
2398
+ stroke: l ?? p ?? gi.stroke,
2240
2399
  "stroke-width": _.value,
2241
- class: ci("lucide", g, ...e ? [`lucide-${li(di(e))}-icon`, `lucide-${li(e)}`] : ["lucide-icon"])
2400
+ class: fi("lucide", g, ...e ? [`lucide-${pi(hi(e))}-icon`, `lucide-${pi(e)}`] : ["lucide-icon"])
2242
2401
  }, [...(t ?? n ?? []).map((e) => a(...e)), ...d.default ? [d.default()] : []]);
2243
- }, X = (e, t) => (n, { slots: r, attrs: i }) => a(hi, {
2402
+ }, X = (e, t) => (n, { slots: r, attrs: i }) => a(yi, {
2244
2403
  ...i,
2245
2404
  ...n,
2246
2405
  iconNode: t,
2247
2406
  name: e
2248
- }, r.default ? { default: r.default } : void 0), gi = X("bookmark", [["path", {
2407
+ }, r.default ? { default: r.default } : void 0), bi = X("bookmark", [["path", {
2249
2408
  d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
2250
2409
  key: "oz39mx"
2251
- }]]), _i = X("box", [
2410
+ }]]), xi = X("box", [
2252
2411
  ["path", {
2253
2412
  d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
2254
2413
  key: "hh9hay"
@@ -2261,22 +2420,22 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2261
2420
  d: "M12 22V12",
2262
2421
  key: "d0xqtd"
2263
2422
  }]
2264
- ]), vi = X("check", [["path", {
2423
+ ]), Si = X("check", [["path", {
2265
2424
  d: "M20 6 9 17l-5-5",
2266
2425
  key: "1gmf2c"
2267
- }]]), yi = X("chevron-down", [["path", {
2426
+ }]]), Ci = X("chevron-down", [["path", {
2268
2427
  d: "m6 9 6 6 6-6",
2269
2428
  key: "qrunsl"
2270
- }]]), bi = X("chevron-left", [["path", {
2429
+ }]]), wi = X("chevron-left", [["path", {
2271
2430
  d: "m15 18-6-6 6-6",
2272
2431
  key: "1wnfg3"
2273
- }]]), xi = X("chevron-right", [["path", {
2432
+ }]]), Ti = X("chevron-right", [["path", {
2274
2433
  d: "m9 18 6-6-6-6",
2275
2434
  key: "mthhwq"
2276
- }]]), Si = X("chevron-up", [["path", {
2435
+ }]]), Ei = X("chevron-up", [["path", {
2277
2436
  d: "m18 15-6-6-6 6",
2278
2437
  key: "153udz"
2279
- }]]), Ci = X("circle-alert", [
2438
+ }]]), Di = X("circle-alert", [
2280
2439
  ["circle", {
2281
2440
  cx: "12",
2282
2441
  cy: "12",
@@ -2297,7 +2456,7 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2297
2456
  y2: "16",
2298
2457
  key: "4dfq90"
2299
2458
  }]
2300
- ]), wi = X("circle-check", [["circle", {
2459
+ ]), Oi = X("circle-check", [["circle", {
2301
2460
  cx: "12",
2302
2461
  cy: "12",
2303
2462
  r: "10",
@@ -2305,7 +2464,7 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2305
2464
  }], ["path", {
2306
2465
  d: "m9 12 2 2 4-4",
2307
2466
  key: "dzmm74"
2308
- }]]), Ti = X("clock", [["circle", {
2467
+ }]]), ki = X("clock", [["circle", {
2309
2468
  cx: "12",
2310
2469
  cy: "12",
2311
2470
  r: "10",
@@ -2313,13 +2472,13 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2313
2472
  }], ["path", {
2314
2473
  d: "M12 6v6l4 2",
2315
2474
  key: "mmk7yg"
2316
- }]]), Ei = X("code", [["path", {
2475
+ }]]), Ai = X("code", [["path", {
2317
2476
  d: "m16 18 6-6-6-6",
2318
2477
  key: "eg8j8"
2319
2478
  }], ["path", {
2320
2479
  d: "m8 6-6 6 6 6",
2321
2480
  key: "ppft3o"
2322
- }]]), Di = X("copy", [["rect", {
2481
+ }]]), ji = X("copy", [["rect", {
2323
2482
  width: "14",
2324
2483
  height: "14",
2325
2484
  x: "8",
@@ -2330,7 +2489,7 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2330
2489
  }], ["path", {
2331
2490
  d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
2332
2491
  key: "zix9uf"
2333
- }]]), Oi = X("eye-off", [
2492
+ }]]), Mi = X("eye-off", [
2334
2493
  ["path", {
2335
2494
  d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
2336
2495
  key: "ct8e1f"
@@ -2347,7 +2506,7 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2347
2506
  d: "m2 2 20 20",
2348
2507
  key: "1ooewy"
2349
2508
  }]
2350
- ]), ki = X("eye", [["path", {
2509
+ ]), Ni = X("eye", [["path", {
2351
2510
  d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
2352
2511
  key: "1nclc0"
2353
2512
  }], ["circle", {
@@ -2355,7 +2514,7 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2355
2514
  cy: "12",
2356
2515
  r: "3",
2357
2516
  key: "1v7zrd"
2358
- }]]), Ai = X("file-image", [
2517
+ }]]), Pi = X("file-image", [
2359
2518
  ["path", {
2360
2519
  d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
2361
2520
  key: "1oefj6"
@@ -2374,7 +2533,7 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2374
2533
  d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",
2375
2534
  key: "wt3hpn"
2376
2535
  }]
2377
- ]), ji = X("file-text", [
2536
+ ]), Fi = X("file-text", [
2378
2537
  ["path", {
2379
2538
  d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
2380
2539
  key: "1oefj6"
@@ -2395,10 +2554,10 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2395
2554
  d: "M16 17H8",
2396
2555
  key: "z1uh3a"
2397
2556
  }]
2398
- ]), Mi = X("funnel", [["path", {
2557
+ ]), Ii = X("funnel", [["path", {
2399
2558
  d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
2400
2559
  key: "sc7q7i"
2401
- }]]), Ni = X("grip-vertical", [
2560
+ }]]), Li = X("grip-vertical", [
2402
2561
  ["circle", {
2403
2562
  cx: "9",
2404
2563
  cy: "12",
@@ -2435,7 +2594,7 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2435
2594
  r: "1",
2436
2595
  key: "f4zoj3"
2437
2596
  }]
2438
- ]), Pi = X("image-up", [
2597
+ ]), Ri = X("image-up", [
2439
2598
  ["path", {
2440
2599
  d: "M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",
2441
2600
  key: "9csbqa"
@@ -2454,7 +2613,7 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2454
2613
  r: "2",
2455
2614
  key: "af1f0g"
2456
2615
  }]
2457
- ]), Fi = X("image", [
2616
+ ]), zi = X("image", [
2458
2617
  ["rect", {
2459
2618
  width: "18",
2460
2619
  height: "18",
@@ -2474,7 +2633,7 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2474
2633
  d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
2475
2634
  key: "1xmnt7"
2476
2635
  }]
2477
- ]), Ii = X("info", [
2636
+ ]), Bi = X("info", [
2478
2637
  ["circle", {
2479
2638
  cx: "12",
2480
2639
  cy: "12",
@@ -2489,31 +2648,31 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2489
2648
  d: "M12 8h.01",
2490
2649
  key: "e9boi3"
2491
2650
  }]
2492
- ]), Li = X("loader-circle", [["path", {
2651
+ ]), Vi = X("loader-circle", [["path", {
2493
2652
  d: "M21 12a9 9 0 1 1-6.219-8.56",
2494
2653
  key: "13zald"
2495
- }]]), Ri = X("message-circle", [["path", {
2654
+ }]]), Hi = X("message-circle", [["path", {
2496
2655
  d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
2497
2656
  key: "1sd12s"
2498
- }]]), zi = X("navigation", [["polygon", {
2657
+ }]]), Ui = X("navigation", [["polygon", {
2499
2658
  points: "3 11 22 2 13 21 11 13 3 11",
2500
2659
  key: "1ltx0t"
2501
- }]]), Bi = X("pencil", [["path", {
2660
+ }]]), Wi = X("pencil", [["path", {
2502
2661
  d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
2503
2662
  key: "1a8usu"
2504
2663
  }], ["path", {
2505
2664
  d: "m15 5 4 4",
2506
2665
  key: "1mk7zo"
2507
- }]]), Vi = X("puzzle", [["path", {
2666
+ }]]), Gi = X("puzzle", [["path", {
2508
2667
  d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
2509
2668
  key: "w46dr5"
2510
- }]]), Hi = X("redo-2", [["path", {
2669
+ }]]), Ki = X("redo-2", [["path", {
2511
2670
  d: "m15 14 5-5-5-5",
2512
2671
  key: "12vg1m"
2513
2672
  }], ["path", {
2514
2673
  d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
2515
2674
  key: "6uklza"
2516
- }]]), Ui = X("refresh-cw", [
2675
+ }]]), qi = X("refresh-cw", [
2517
2676
  ["path", {
2518
2677
  d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
2519
2678
  key: "v9h5vc"
@@ -2530,19 +2689,19 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2530
2689
  d: "M8 16H3v5",
2531
2690
  key: "1cv678"
2532
2691
  }]
2533
- ]), Wi = X("reply", [["path", {
2692
+ ]), Ji = X("reply", [["path", {
2534
2693
  d: "M20 18v-2a4 4 0 0 0-4-4H4",
2535
2694
  key: "5vmcpk"
2536
2695
  }], ["path", {
2537
2696
  d: "m9 17-5-5 5-5",
2538
2697
  key: "nvlc11"
2539
- }]]), Gi = X("send", [["path", {
2698
+ }]]), Yi = X("send", [["path", {
2540
2699
  d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
2541
2700
  key: "1ffxy3"
2542
2701
  }], ["path", {
2543
2702
  d: "m21.854 2.147-10.94 10.939",
2544
2703
  key: "12cjpa"
2545
- }]]), Ki = X("share-2", [
2704
+ }]]), Xi = X("share-2", [
2546
2705
  ["circle", {
2547
2706
  cx: "18",
2548
2707
  cy: "5",
@@ -2575,13 +2734,13 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2575
2734
  y2: "10.49",
2576
2735
  key: "1n3mei"
2577
2736
  }]
2578
- ]), qi = X("shield-check", [["path", {
2737
+ ]), Zi = X("shield-check", [["path", {
2579
2738
  d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
2580
2739
  key: "oel41y"
2581
2740
  }], ["path", {
2582
2741
  d: "m9 12 2 2 4-4",
2583
2742
  key: "dzmm74"
2584
- }]]), Ji = X("shield-x", [
2743
+ }]]), Qi = X("shield-x", [
2585
2744
  ["path", {
2586
2745
  d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
2587
2746
  key: "oel41y"
@@ -2594,7 +2753,7 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2594
2753
  d: "m9.5 9.5 5 5",
2595
2754
  key: "18nt4w"
2596
2755
  }]
2597
- ]), Yi = X("sparkles", [
2756
+ ]), $i = X("sparkles", [
2598
2757
  ["path", {
2599
2758
  d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
2600
2759
  key: "1s2grr"
@@ -2613,7 +2772,7 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2613
2772
  r: "2",
2614
2773
  key: "6kqj1y"
2615
2774
  }]
2616
- ]), Xi = X("table", [
2775
+ ]), ea = X("table", [
2617
2776
  ["path", {
2618
2777
  d: "M12 3v18",
2619
2778
  key: "108xh3"
@@ -2634,7 +2793,7 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2634
2793
  d: "M3 15h18",
2635
2794
  key: "5xshup"
2636
2795
  }]
2637
- ]), Zi = X("trash-2", [
2796
+ ]), ta = X("trash-2", [
2638
2797
  ["path", {
2639
2798
  d: "M10 11v6",
2640
2799
  key: "nco0om"
@@ -2655,7 +2814,7 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2655
2814
  d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
2656
2815
  key: "e791ji"
2657
2816
  }]
2658
- ]), Qi = X("triangle-alert", [
2817
+ ]), na = X("triangle-alert", [
2659
2818
  ["path", {
2660
2819
  d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
2661
2820
  key: "wmoenq"
@@ -2668,13 +2827,13 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2668
2827
  d: "M12 17h.01",
2669
2828
  key: "p32p05"
2670
2829
  }]
2671
- ]), $i = X("undo-2", [["path", {
2830
+ ]), ra = X("undo-2", [["path", {
2672
2831
  d: "M9 14 4 9l5-5",
2673
2832
  key: "102s5s"
2674
2833
  }], ["path", {
2675
2834
  d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",
2676
2835
  key: "f3b9sd"
2677
- }]]), ea = X("upload", [
2836
+ }]]), ia = X("upload", [
2678
2837
  ["path", {
2679
2838
  d: "M12 3v12",
2680
2839
  key: "1x0j5s"
@@ -2687,7 +2846,7 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2687
2846
  d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
2688
2847
  key: "ih7n3h"
2689
2848
  }]
2690
- ]), ta = X("video", [["path", {
2849
+ ]), aa = X("video", [["path", {
2691
2850
  d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
2692
2851
  key: "ftymec"
2693
2852
  }], ["rect", {
@@ -2697,20 +2856,20 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2697
2856
  height: "12",
2698
2857
  rx: "2",
2699
2858
  key: "158x01"
2700
- }]]), na = X("x", [["path", {
2859
+ }]]), oa = X("x", [["path", {
2701
2860
  d: "M18 6 6 18",
2702
2861
  key: "1bl5f8"
2703
2862
  }], ["path", {
2704
2863
  d: "m6 6 12 12",
2705
2864
  key: "d8bk6v"
2706
- }]]), ra = X("zap", [["path", {
2707
- d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
2708
- key: "1xq2db"
2709
- }]]), ia = ["innerHTML"], aa = [
2865
+ }]]), sa = X("zap", [["path", {
2866
+ d: "M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",
2867
+ key: "1v7up4"
2868
+ }]]), ca = ["innerHTML"], la = [
2710
2869
  "src",
2711
2870
  "width",
2712
2871
  "height"
2713
- ], oa = /* @__PURE__ */ B({
2872
+ ], ua = /* @__PURE__ */ B({
2714
2873
  __name: "CustomBlockIcon",
2715
2874
  props: {
2716
2875
  icon: {},
@@ -2726,40 +2885,40 @@ var hi = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
2726
2885
  height: `${n.value}px`
2727
2886
  }),
2728
2887
  innerHTML: e.icon
2729
- }, null, 12, ia)) : i.value ? (f(), k("img", {
2888
+ }, null, 12, ca)) : i.value ? (f(), k("img", {
2730
2889
  key: 1,
2731
2890
  src: e.icon,
2732
2891
  width: n.value,
2733
2892
  height: n.value,
2734
2893
  class: "tpl:inline-block",
2735
2894
  alt: ""
2736
- }, null, 8, aa)) : (f(), N(j(_i), {
2895
+ }, null, 8, la)) : (f(), N(j(xi), {
2737
2896
  key: 2,
2738
2897
  size: n.value,
2739
2898
  "stroke-width": 1.5
2740
2899
  }, null, 8, ["size"]));
2741
2900
  }
2742
- }), sa = (e, t) => {
2901
+ }), da = (e, t) => {
2743
2902
  let n = e.__vccOpts || e;
2744
2903
  for (let [e, r] of t) n[e] = r;
2745
2904
  return n;
2746
- }, ca = {}, la = { class: "tpl-loading-track" };
2747
- function ua(e, t) {
2748
- return f(), k("div", la);
2905
+ }, fa = {}, pa = { class: "tpl-loading-track" };
2906
+ function ma(e, t) {
2907
+ return f(), k("div", pa);
2749
2908
  }
2750
- var da = /*#__PURE__*/ sa(ca, [["render", ua], ["__scopeId", "data-v-1ed538ec"]]);
2909
+ var ha = /*#__PURE__*/ da(fa, [["render", ma], ["__scopeId", "data-v-1ed538ec"]]);
2751
2910
  //#endregion
2752
2911
  //#region src/composables/useEditorRoot.ts
2753
- function fa() {
2754
- return v(gr, document) ?? document;
2912
+ function ga() {
2913
+ return v(yr, document) ?? document;
2755
2914
  }
2756
2915
  //#endregion
2757
2916
  //#region src/composables/useFocusTrap.ts
2758
- var pa = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
2759
- function ma(e, t) {
2760
- let n = fa(), r = null, i = null, a = null;
2917
+ var _a = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
2918
+ function va(e, t) {
2919
+ let n = ga(), r = null, i = null, a = null;
2761
2920
  function o() {
2762
- return e.value ? Array.from(e.value.querySelectorAll(pa)).filter((e) => e.offsetParent !== null) : [];
2921
+ return e.value ? Array.from(e.value.querySelectorAll(_a)).filter((e) => e.offsetParent !== null) : [];
2763
2922
  }
2764
2923
  function s(e) {
2765
2924
  if (e.key !== "Tab") return;
@@ -2789,18 +2948,18 @@ function ma(e, t) {
2789
2948
  }
2790
2949
  //#endregion
2791
2950
  //#region src/composables/useCloudI18n.ts
2792
- function ha(e, t) {
2951
+ function ya(e, t) {
2793
2952
  return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
2794
2953
  }
2795
- function ga(e) {
2796
- let t = e ?? v(Cr, null);
2954
+ function ba(e) {
2955
+ let t = e ?? v(Er, null);
2797
2956
  return {
2798
2957
  t: t ? u(t) ? t.value : t : null,
2799
- format: ha
2958
+ format: ya
2800
2959
  };
2801
2960
  }
2802
- function _a(e) {
2803
- let { t, format: n } = ga(e);
2961
+ function xa(e) {
2962
+ let { t, format: n } = ba(e);
2804
2963
  if (!t) throw Error("useCloudI18nStrict() requires a cloud translations provider. Ensure the component is a descendant of CloudEditor.");
2805
2964
  return {
2806
2965
  t,
@@ -2809,8 +2968,8 @@ function _a(e) {
2809
2968
  }
2810
2969
  //#endregion
2811
2970
  //#region src/composables/useMergeTag.ts
2812
- function va() {
2813
- let e = v(er, []), t = v(tr, ft.liquid), n = v(nr, null), r = v(rr, !0), i = v(ir, null), a = C(!1);
2971
+ function Sa() {
2972
+ let e = v(rr, []), t = v(ir, ft.liquid), n = v(ar, null), r = v(or, !0), i = v(sr, null), a = C(!1);
2814
2973
  function o(e) {
2815
2974
  return yt(e, t);
2816
2975
  }
@@ -2849,8 +3008,8 @@ function va() {
2849
3008
  }
2850
3009
  //#endregion
2851
3010
  //#region src/composables/useEmoji.ts
2852
- function ya() {
2853
- let [e, t] = fn(!1), r = n([]), i = !1;
3011
+ function Ca() {
3012
+ let [e, t] = hn(!1), r = n([]), i = !1;
2854
3013
  l(() => {
2855
3014
  i = !0;
2856
3015
  }), H(e, async (e) => {
@@ -2875,7 +3034,7 @@ function ya() {
2875
3034
  }
2876
3035
  //#endregion
2877
3036
  //#region src/composables/useDragDrop.ts
2878
- function ba(e) {
3037
+ function wa(e) {
2879
3038
  let { onBlockMove: t, onBlockAdd: n } = e, r = C(!1), i = C(null), a = C(null);
2880
3039
  function o(e) {
2881
3040
  r.value = !0, i.value = e;
@@ -2925,7 +3084,7 @@ function ba(e) {
2925
3084
  }
2926
3085
  //#endregion
2927
3086
  //#region src/composables/useFonts.ts
2928
- var xa = [
3087
+ var Ta = [
2929
3088
  {
2930
3089
  value: "Arial",
2931
3090
  label: "Arial"
@@ -2954,7 +3113,7 @@ var xa = [
2954
3113
  value: "Courier New",
2955
3114
  label: "Courier New"
2956
3115
  }
2957
- ], Sa = {
3116
+ ], Ea = {
2958
3117
  arial: "Arial, sans-serif",
2959
3118
  helvetica: "Helvetica, sans-serif",
2960
3119
  georgia: "Georgia, serif",
@@ -2962,23 +3121,23 @@ var xa = [
2962
3121
  verdana: "Verdana, sans-serif",
2963
3122
  "trebuchet ms": "'Trebuchet MS', sans-serif",
2964
3123
  "courier new": "'Courier New', monospace"
2965
- }, Ca = "Arial, sans-serif";
2966
- function wa(e) {
2967
- if (e === void 0 || e === !0) return [...xa];
3124
+ }, Da = "Arial, sans-serif";
3125
+ function Oa(e) {
3126
+ if (e === void 0 || e === !0) return [...Ta];
2968
3127
  if (e === !1) return [];
2969
3128
  let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
2970
3129
  for (let i of e) {
2971
- let e = i.toLowerCase(), a = xa.find((t) => t.value.toLowerCase() === e);
3130
+ let e = i.toLowerCase(), a = Ta.find((t) => t.value.toLowerCase() === e);
2972
3131
  if (!a) {
2973
- r.has(e) || (r.add(e), Lr.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${xa.map((e) => e.value).join(", ")}.`));
3132
+ r.has(e) || (r.add(e), Vr.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Ta.map((e) => e.value).join(", ")}.`));
2974
3133
  continue;
2975
3134
  }
2976
3135
  n.has(a.value) || (n.add(a.value), t.push(a));
2977
3136
  }
2978
3137
  return t;
2979
3138
  }
2980
- function Ta(e) {
2981
- let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = wa(e?.builtIns), a = O(() => e?.defaultFallback ?? Ca);
3139
+ function ka(e) {
3140
+ let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = Oa(e?.builtIns), a = O(() => e?.defaultFallback ?? Da);
2982
3141
  function o(e) {
2983
3142
  n.value = e;
2984
3143
  }
@@ -2995,26 +3154,26 @@ function Ta(e) {
2995
3154
  function u(e) {
2996
3155
  return c.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
2997
3156
  }
2998
- let d = e?.defaultFont ?? Ca.split(",")[0].trim();
2999
- u(d) || Lr.warn(`config.fonts: new templates seed "${d}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
3157
+ let d = e?.defaultFont ?? Da.split(",")[0].trim();
3158
+ u(d) || Vr.warn(`config.fonts: new templates seed "${d}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
3000
3159
  function f(e) {
3001
- return xa.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
3160
+ return Ta.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
3002
3161
  }
3003
3162
  function p() {
3004
3163
  if (e?.defaultFont) {
3005
- if (!n.value && !f(e.defaultFont)) return Ca;
3164
+ if (!n.value && !f(e.defaultFont)) return Da;
3006
3165
  if (u(e.defaultFont)) {
3007
3166
  let t = c.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
3008
3167
  if (t) return t.value;
3009
3168
  }
3010
3169
  }
3011
- return Ca;
3170
+ return Da;
3012
3171
  }
3013
3172
  let m = O(() => p());
3014
3173
  function h(e) {
3015
3174
  if (!e) return a.value;
3016
3175
  let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
3017
- return n ? `'${n.name}', ${n.fallback ?? a.value}` : Sa[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${a.value}`);
3176
+ return n ? `'${n.name}', ${n.fallback ?? a.value}` : Ea[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${a.value}`);
3018
3177
  }
3019
3178
  let g = [], _ = !1;
3020
3179
  async function v() {
@@ -3030,7 +3189,7 @@ function Ta(e) {
3030
3189
  t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
3031
3190
  });
3032
3191
  } catch (t) {
3033
- Lr.warn(`Failed to load custom font "${e.name}":`, t);
3192
+ Vr.warn(`Failed to load custom font "${e.name}":`, t);
3034
3193
  }
3035
3194
  });
3036
3195
  await Promise.allSettled(e), !_ && (r.value = !0);
@@ -3057,8 +3216,8 @@ function Ta(e) {
3057
3216
  }
3058
3217
  //#endregion
3059
3218
  //#region src/composables/useLogicTag.ts
3060
- function Ea() {
3061
- let e = v(ar, []), t = v(or, []), n = v(tr, ft.liquid), r = v(cr, null), i = v(sr, null), a = C(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
3219
+ function Aa() {
3220
+ let e = v(cr, []), t = v(lr, []), n = v(ir, ft.liquid), r = v(dr, null), i = v(ur, null), a = C(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
3062
3221
  async function c() {
3063
3222
  if (r) {
3064
3223
  a.value = !0;
@@ -3089,7 +3248,7 @@ function Ea() {
3089
3248
  }
3090
3249
  //#endregion
3091
3250
  //#region src/utils/mergeTagNodeSpec.ts
3092
- function Da(e, t, n) {
3251
+ function ja(e, t, n) {
3093
3252
  return Ct(e, n) ? {
3094
3253
  type: "logicMergeTagNode",
3095
3254
  attrs: {
@@ -3106,15 +3265,15 @@ function Da(e, t, n) {
3106
3265
  }
3107
3266
  //#endregion
3108
3267
  //#region src/utils/insertLogicTag.ts
3109
- function Oa(e) {
3268
+ function Ma(e) {
3110
3269
  return "before" in e && "after" in e;
3111
3270
  }
3112
- function ka(e, t, n) {
3113
- if (!Oa(t)) {
3114
- e.chain().focus().insertContent(Da(t.value, t.label, n)).run();
3271
+ function Na(e, t, n) {
3272
+ if (!Ma(t)) {
3273
+ e.chain().focus().insertContent(ja(t.value, t.label, n)).run();
3115
3274
  return;
3116
3275
  }
3117
- let r = Da(t.before, t.label, n), i = Da(t.after, t.label, n), { from: a, to: o } = e.state.selection;
3276
+ let r = ja(t.before, t.label, n), i = ja(t.after, t.label, n), { from: a, to: o } = e.state.selection;
3118
3277
  if (a !== o) {
3119
3278
  e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
3120
3279
  return;
@@ -3123,20 +3282,20 @@ function ka(e, t, n) {
3123
3282
  }
3124
3283
  //#endregion
3125
3284
  //#region src/utils/linkColorExtension.ts
3126
- function Aa(e) {
3285
+ function Pa(e) {
3127
3286
  if (!e) return null;
3128
3287
  let t = e.trim();
3129
3288
  return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
3130
3289
  }
3131
- function ja(e) {
3290
+ function Fa(e) {
3132
3291
  return e.extend({ addAttributes() {
3133
3292
  return {
3134
3293
  ...this.parent?.(),
3135
3294
  color: {
3136
3295
  default: null,
3137
- parseHTML: (e) => Aa(Jr(e.style.color)),
3296
+ parseHTML: (e) => Pa(Qr(e.style.color)),
3138
3297
  renderHTML: (e) => {
3139
- let t = Aa(e.color);
3298
+ let t = Pa(e.color);
3140
3299
  return t ? { style: `color: ${t}` } : {};
3141
3300
  }
3142
3301
  }
@@ -3145,9 +3304,9 @@ function ja(e) {
3145
3304
  }
3146
3305
  //#endregion
3147
3306
  //#region src/composables/useRichTextLinkDialog.ts
3148
- function Ma(e) {
3307
+ function Ia(e) {
3149
3308
  let t = C(!1), n = C(""), r = C(""), i = C(null);
3150
- ma(i, t);
3309
+ va(i, t);
3151
3310
  function a() {
3152
3311
  let i = e.value?.getAttributes("link") ?? {};
3153
3312
  n.value = i.href || "", r.value = i.color || "", t.value = !0;
@@ -3156,7 +3315,7 @@ function Ma(e) {
3156
3315
  if (n.value) {
3157
3316
  let t = c(n.value);
3158
3317
  if (t !== null) {
3159
- let n = Aa(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
3318
+ let n = Pa(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
3160
3319
  n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
3161
3320
  }
3162
3321
  }
@@ -3203,8 +3362,8 @@ function Ma(e) {
3203
3362
  }
3204
3363
  //#endregion
3205
3364
  //#region src/composables/useRichTextEditor.ts
3206
- function Na(e) {
3207
- let t = v(Bn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = va(), { canInsertLogicTag: l, isRequesting: d, requestLogicTag: f } = Ea(), p = v(zn, null), m = (u(p) ? p.value : p)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", h = ht(s), g = n(null), { showLinkDialog: _, linkUrl: y, linkColor: b, linkDialogRef: x, openLinkDialog: S, insertLink: w, removeLink: T, closeLinkDialog: E, handleLinkKeydown: ee } = Ma(g), { start: D, stop: te } = dn(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ne = n(null), O = C(!0), k = C(null), A = !1;
3365
+ function La(e) {
3366
+ let t = v(Un, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = Sa(), { canInsertLogicTag: l, isRequesting: d, requestLogicTag: f } = Aa(), p = v(Hn, null), m = (u(p) ? p.value : p)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", h = ht(s), g = n(null), { showLinkDialog: _, linkUrl: y, linkColor: b, linkDialogRef: x, openLinkDialog: S, insertLink: w, removeLink: T, closeLinkDialog: E, handleLinkKeydown: ee } = Ia(g), { start: D, stop: te } = mn(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ne = n(null), O = C(!0), k = C(null), A = !1;
3208
3367
  async function j() {
3209
3368
  k.value = null, O.value = !0;
3210
3369
  try {
@@ -3234,7 +3393,7 @@ function Na(e) {
3234
3393
  g.value = l, O.value = !1, D();
3235
3394
  } catch (t) {
3236
3395
  if (A) return;
3237
- Lr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), k.value = t instanceof Error ? t.message : "Failed to load editor", O.value = !1;
3396
+ Vr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), k.value = t instanceof Error ? t.message : "Failed to load editor", O.value = !1;
3238
3397
  }
3239
3398
  }
3240
3399
  function M() {
@@ -3264,7 +3423,7 @@ function Na(e) {
3264
3423
  }
3265
3424
  async function ae() {
3266
3425
  let e = await f();
3267
- A || (e && g.value ? ka(g.value, e, s) : g.value?.commands.focus());
3426
+ A || (e && g.value ? Na(g.value, e, s) : g.value?.commands.focus());
3268
3427
  }
3269
3428
  return {
3270
3429
  editor: g,
@@ -3293,9 +3452,9 @@ function Na(e) {
3293
3452
  }
3294
3453
  //#endregion
3295
3454
  //#region src/composables/useSmallScreenNotice.ts
3296
- var Pa = "(max-width: 767px)";
3297
- function Fa(e) {
3298
- let t = Tn(Pa);
3455
+ var Ra = "(max-width: 767px)";
3456
+ function za(e) {
3457
+ let t = On(Ra);
3299
3458
  return {
3300
3459
  isSmallScreen: t,
3301
3460
  showNotice: O(() => (P(e) ?? !0) && t.value)
@@ -3303,20 +3462,20 @@ function Fa(e) {
3303
3462
  }
3304
3463
  //#endregion
3305
3464
  //#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
3306
- var Ia = { class: "tpl:w-full" }, La = {
3465
+ var Ba = { class: "tpl:w-full" }, Va = {
3307
3466
  key: 0,
3308
3467
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
3309
- }, Ra = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, za = {
3468
+ }, Ha = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ua = {
3310
3469
  key: 1,
3311
3470
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
3312
- }, Ba = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Va = {
3471
+ }, Wa = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ga = {
3313
3472
  key: 2,
3314
3473
  class: "tpl:relative"
3315
- }, Ha = ["innerHTML"], Ua = {
3474
+ }, Ka = ["innerHTML"], qa = {
3316
3475
  key: 0,
3317
3476
  class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
3318
3477
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
3319
- }, Wa = /* @__PURE__ */ B({
3478
+ }, Ja = /* @__PURE__ */ B({
3320
3479
  __name: "CustomBlock",
3321
3480
  props: {
3322
3481
  block: {},
@@ -3324,7 +3483,7 @@ var Ia = { class: "tpl:w-full" }, La = {
3324
3483
  },
3325
3484
  emits: ["fetchData"],
3326
3485
  setup(e, { emit: t }) {
3327
- let n = e, i = t, { t: a } = Y(), o = v(Jn, null), s = C(""), c = C(!1), l = O(() => o?.getDefinition(n.block.customType)), u = O(() => !!l.value), { isFetching: d, fetch: p, needsFetch: m, hasDataSource: h } = Rt({
3486
+ let n = e, i = t, { t: a } = Y(), o = v(Zn, null), s = C(""), c = C(!1), l = O(() => o?.getDefinition(n.block.customType)), u = O(() => !!l.value), { isFetching: d, fetch: p, needsFetch: m, hasDataSource: h } = Rt({
3328
3487
  definition: l,
3329
3488
  block: O(() => n.block),
3330
3489
  onUpdate: (e, t) => {
@@ -3345,15 +3504,15 @@ var Ia = { class: "tpl:w-full" }, La = {
3345
3504
  }
3346
3505
  }
3347
3506
  }
3348
- let _ = on(g, 150);
3507
+ let _ = ln(g, 150);
3349
3508
  return r(() => {
3350
3509
  g();
3351
3510
  }), H(() => n.block.fieldValues, () => {
3352
3511
  _();
3353
- }, { deep: !0 }), (e, t) => (f(), k("div", Ia, [u.value ? c.value ? (f(), k("div", za, [V(j(Qi), {
3512
+ }, { deep: !0 }), (e, t) => (f(), k("div", Ba, [u.value ? c.value ? (f(), k("div", Ua, [V(j(na), {
3354
3513
  size: 24,
3355
3514
  class: "tpl:text-[var(--tpl-danger)]"
3356
- }), I("span", Ba, D(j(a).customBlocks.renderError), 1)])) : (f(), k("div", Va, [I("div", { innerHTML: s.value }, null, 8, Ha), j(h) && j(m) ? (f(), k("div", Ua, [j(d) ? (f(), N(da, {
3515
+ }), I("span", Wa, D(j(a).customBlocks.renderError), 1)])) : (f(), k("div", Ga, [I("div", { innerHTML: s.value }, null, 8, Ka), j(h) && j(m) ? (f(), k("div", qa, [j(d) ? (f(), N(ha, {
3357
3516
  key: 1,
3358
3517
  class: "tpl:w-48"
3359
3518
  })) : (f(), k("button", {
@@ -3361,16 +3520,16 @@ var Ia = { class: "tpl:w-full" }, La = {
3361
3520
  type: "button",
3362
3521
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
3363
3522
  onClick: t[0] ||= M((...e) => j(p) && j(p)(...e), ["stop"])
3364
- }, [l.value?.icon ? (f(), N(oa, {
3523
+ }, [l.value?.icon ? (f(), N(ua, {
3365
3524
  key: 0,
3366
3525
  icon: l.value.icon,
3367
3526
  size: 16
3368
- }, null, 8, ["icon"])) : A("", !0), z(" " + D(l.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (f(), k("div", La, [V(j(Vi), {
3527
+ }, null, 8, ["icon"])) : A("", !0), z(" " + D(l.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (f(), k("div", Va, [V(j(Gi), {
3369
3528
  size: 24,
3370
3529
  class: "tpl:text-[var(--tpl-warning)]"
3371
- }), I("span", Ra, D(j(a).customBlocks.definitionNotFound), 1)]))]));
3530
+ }), I("span", Ha, D(j(a).customBlocks.definitionNotFound), 1)]))]));
3372
3531
  }
3373
- }), Ga = { class: "tpl:w-full" }, Ka = /* @__PURE__ */ B({
3532
+ }), Ya = { class: "tpl:w-full" }, Xa = /* @__PURE__ */ B({
3374
3533
  __name: "DividerBlock",
3375
3534
  props: {
3376
3535
  block: {},
@@ -3382,28 +3541,28 @@ var Ia = { class: "tpl:w-full" }, La = {
3382
3541
  width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
3383
3542
  margin: t.block.width === "full" ? "0" : "0 auto"
3384
3543
  }));
3385
- return (e, t) => (f(), k("div", Ga, [I("hr", {
3544
+ return (e, t) => (f(), k("div", Ya, [I("hr", {
3386
3545
  class: "tpl:m-0 tpl:border-none",
3387
3546
  style: L(n.value)
3388
3547
  }, null, 4)]));
3389
3548
  }
3390
- }), qa = { class: "tpl:w-full" }, Ja = ["srcdoc", "title"], Ya = {
3549
+ }), Za = { class: "tpl:w-full" }, Qa = ["srcdoc", "title"], $a = {
3391
3550
  key: 1,
3392
3551
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
3393
- }, Xa = {
3552
+ }, eo = {
3394
3553
  key: 0,
3395
3554
  class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
3396
- }, Za = {
3555
+ }, to = {
3397
3556
  key: 1,
3398
3557
  class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
3399
- }, Qa = /* @__PURE__ */ B({
3558
+ }, no = /* @__PURE__ */ B({
3400
3559
  __name: "HtmlBlock",
3401
3560
  props: {
3402
3561
  block: {},
3403
3562
  viewport: {}
3404
3563
  },
3405
3564
  setup(e) {
3406
- let t = e, { t: n } = Y(), r = v(Zn, !1), i = O(() => t.block.content.trim().length > 0), a = O(() => r && i.value), o = C(null), s = C(60), c = null;
3565
+ let t = e, { t: n } = Y(), r = v(er, !1), i = O(() => t.block.content.trim().length > 0), a = O(() => r && i.value), o = C(null), s = C(60), c = null;
3407
3566
  function l() {
3408
3567
  let e = o.value?.contentDocument;
3409
3568
  e && (s.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
@@ -3417,7 +3576,7 @@ var Ia = { class: "tpl:w-full" }, La = {
3417
3576
  e || (c?.disconnect(), c = null);
3418
3577
  }), re(() => {
3419
3578
  c?.disconnect(), c = null;
3420
- }), (t, r) => (f(), k("div", qa, [a.value ? (f(), k("iframe", {
3579
+ }), (t, r) => (f(), k("div", Za, [a.value ? (f(), k("iframe", {
3421
3580
  key: 0,
3422
3581
  ref_key: "iframeRef",
3423
3582
  ref: o,
@@ -3427,15 +3586,15 @@ var Ia = { class: "tpl:w-full" }, La = {
3427
3586
  class: "tpl:block tpl:w-full tpl:border-0",
3428
3587
  style: L({ height: `${s.value}px` }),
3429
3588
  onLoad: u
3430
- }, null, 44, Ja)) : (f(), k("div", Ya, [V(j(Ei), {
3589
+ }, null, 44, Qa)) : (f(), k("div", $a, [V(j(Ai), {
3431
3590
  size: 24,
3432
3591
  class: "tpl:text-[var(--tpl-text-dim)]"
3433
- }), i.value ? (f(), k("span", Xa, D(j(n).html.preview), 1)) : (f(), k("span", Za, D(j(n).html.empty), 1))]))]));
3592
+ }), i.value ? (f(), k("span", eo, D(j(n).html.preview), 1)) : (f(), k("span", to, D(j(n).html.empty), 1))]))]));
3434
3593
  }
3435
3594
  });
3436
3595
  //#endregion
3437
3596
  //#region src/composables/useAliveFlag.ts
3438
- function $a() {
3597
+ function ro() {
3439
3598
  let e = { alive: !0 };
3440
3599
  return re(() => {
3441
3600
  e.alive = !1;
@@ -3443,13 +3602,13 @@ function $a() {
3443
3602
  }
3444
3603
  //#endregion
3445
3604
  //#region src/composables/useImageDrop.ts
3446
- var eo = "image/";
3447
- function to(e) {
3448
- let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || P(r), { isOverDropZone: a } = On(t, {
3605
+ var io = "image/";
3606
+ function ao(e) {
3607
+ let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || P(r), { isOverDropZone: a } = jn(t, {
3449
3608
  preventDefaultForUnhandled: !0,
3450
3609
  onDrop: (e) => {
3451
3610
  if (!i()) return;
3452
- let t = (e ?? []).filter((e) => e.type.startsWith(eo));
3611
+ let t = (e ?? []).filter((e) => e.type.startsWith(io));
3453
3612
  t.length > 0 && n([t[0]]);
3454
3613
  }
3455
3614
  });
@@ -3457,17 +3616,17 @@ function to(e) {
3457
3616
  }
3458
3617
  //#endregion
3459
3618
  //#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
3460
- var no = {
3619
+ var oo = {
3461
3620
  key: 0,
3462
3621
  class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
3463
3622
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
3464
- }, ro = ["href"], io = ["src", "alt"], ao = ["src", "alt"], oo = {
3623
+ }, so = ["href"], co = ["src", "alt"], lo = ["src", "alt"], uo = {
3465
3624
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
3466
3625
  style: { opacity: "0.7" }
3467
- }, so = ["href"], co = ["src", "alt"], lo = ["src", "alt"], uo = {
3626
+ }, fo = ["href"], po = ["src", "alt"], mo = ["src", "alt"], ho = {
3468
3627
  key: 4,
3469
3628
  class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
3470
- }, fo = ["aria-label"], po = { key: 1 }, mo = /* @__PURE__ */ B({
3629
+ }, go = ["aria-label"], _o = { key: 1 }, vo = /* @__PURE__ */ B({
3471
3630
  __name: "ImageBlock",
3472
3631
  props: {
3473
3632
  block: {},
@@ -3475,7 +3634,7 @@ var no = {
3475
3634
  },
3476
3635
  emits: ["update"],
3477
3636
  setup(e, { emit: t }) {
3478
- let n = e, r = t, { t: i } = Y(), { syntax: a } = va(), o = v(lr, null), s = O(() => !!o), c = $a();
3637
+ let n = e, r = t, { t: i } = Y(), { syntax: a } = Sa(), o = v(fr, null), s = O(() => !!o), c = ro();
3479
3638
  async function l() {
3480
3639
  let e = await o?.({ accept: ["images"] });
3481
3640
  if (c.alive && e) {
@@ -3502,7 +3661,7 @@ var no = {
3502
3661
  }
3503
3662
  }
3504
3663
  }
3505
- let { isOver: h } = to({
3664
+ let { isOver: h } = ao({
3506
3665
  target: u,
3507
3666
  enabled: p,
3508
3667
  onFiles: m
@@ -3515,18 +3674,18 @@ var no = {
3515
3674
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
3516
3675
  marginRight: e === "center" ? "auto" : void 0
3517
3676
  };
3518
- }), y = O(() => St(n.block.src, a)), b = Tr(() => y.value ? void 0 : n.block.src), x = Tr(() => y.value ? n.block.placeholderUrl : void 0);
3677
+ }), y = O(() => St(n.block.src, a)), b = Or(() => y.value ? void 0 : n.block.src), x = Or(() => y.value ? n.block.placeholderUrl : void 0);
3519
3678
  return (t, n) => (f(), k("div", {
3520
3679
  ref_key: "dropZoneRef",
3521
3680
  ref: u,
3522
3681
  "data-testid": "image-drop-zone",
3523
3682
  class: "tpl:relative tpl:w-full",
3524
3683
  style: L(g.value)
3525
- }, [p.value && (j(h) || d.value) ? (f(), k("div", no, [d.value ? (f(), k(R, { key: 0 }, [V(j(Li), {
3684
+ }, [p.value && (j(h) || d.value) ? (f(), k("div", oo, [d.value ? (f(), k(R, { key: 0 }, [V(j(Vi), {
3526
3685
  class: "tpl-spinner",
3527
3686
  size: 20,
3528
3687
  "stroke-width": 2
3529
- }), z(" " + D(j(i).image.uploading), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(ea), {
3688
+ }), z(" " + D(j(i).image.uploading), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(ia), {
3530
3689
  size: 20,
3531
3690
  "stroke-width": 1.5
3532
3691
  }), z(" " + D(j(i).image.dropToUpload), 1)], 64))])) : A("", !0), e.block.src && y.value && e.block.placeholderUrl ? (f(), k(R, { key: 1 }, [e.block.linkUrl ? (f(), k("a", {
@@ -3541,22 +3700,22 @@ var no = {
3541
3700
  src: j(x),
3542
3701
  alt: e.block.alt || j(i).image.altTextPlaceholder,
3543
3702
  style: L(_.value)
3544
- }, null, 12, io)], 8, ro)) : (f(), k("img", {
3703
+ }, null, 12, co)], 8, so)) : (f(), k("img", {
3545
3704
  key: 1,
3546
3705
  class: "tpl:border-0",
3547
3706
  src: j(x),
3548
3707
  alt: e.block.alt,
3549
3708
  style: L(_.value)
3550
- }, null, 12, ao))], 64)) : e.block.src && y.value ? (f(), k("div", {
3709
+ }, null, 12, lo))], 64)) : e.block.src && y.value ? (f(), k("div", {
3551
3710
  key: 2,
3552
3711
  class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
3553
3712
  style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, _.value])
3554
- }, [V(j(Fi), {
3713
+ }, [V(j(zi), {
3555
3714
  size: 32,
3556
3715
  "stroke-width": 1.5,
3557
3716
  class: "tpl:text-[var(--tpl-primary)]",
3558
3717
  style: { opacity: "0.5" }
3559
- }), I("span", oo, [V(ri, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (f(), k(R, { key: 3 }, [e.block.linkUrl ? (f(), k("a", {
3718
+ }), I("span", uo, [V(si, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (f(), k(R, { key: 3 }, [e.block.linkUrl ? (f(), k("a", {
3560
3719
  key: 0,
3561
3720
  href: e.block.linkUrl,
3562
3721
  target: "_blank",
@@ -3568,26 +3727,26 @@ var no = {
3568
3727
  src: j(b),
3569
3728
  alt: e.block.alt || j(i).image.altTextPlaceholder,
3570
3729
  style: L(_.value)
3571
- }, null, 12, co)], 8, so)) : (f(), k("img", {
3730
+ }, null, 12, po)], 8, fo)) : (f(), k("img", {
3572
3731
  key: 1,
3573
3732
  class: "tpl:border-0",
3574
3733
  src: j(b),
3575
3734
  alt: e.block.alt,
3576
3735
  style: L(_.value)
3577
- }, null, 12, lo))], 64)) : (f(), k("div", uo, [s.value ? (f(), k("button", {
3736
+ }, null, 12, mo))], 64)) : (f(), k("div", ho, [s.value ? (f(), k("button", {
3578
3737
  key: 0,
3579
3738
  "aria-label": j(i).image.browseMedia,
3580
3739
  class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
3581
3740
  onClick: M(l, ["stop"])
3582
- }, [V(j(Fi), {
3741
+ }, [V(j(zi), {
3583
3742
  size: 14,
3584
3743
  "stroke-width": 1.5
3585
- }), z(" " + D(j(i).image.browseMedia), 1)], 8, fo)) : (f(), k("span", po, D(j(i).image.clickToAdd), 1))]))], 4));
3744
+ }), z(" " + D(j(i).image.browseMedia), 1)], 8, go)) : (f(), k("span", _o, D(j(i).image.clickToAdd), 1))]))], 4));
3586
3745
  }
3587
- }), ho = { class: "tpl:w-full" }, go = ["href"], _o = {
3746
+ }), yo = { class: "tpl:w-full" }, bo = ["href"], xo = {
3588
3747
  key: 1,
3589
3748
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
3590
- }, vo = /* @__PURE__ */ B({
3749
+ }, So = /* @__PURE__ */ B({
3591
3750
  __name: "MenuBlock",
3592
3751
  props: {
3593
3752
  block: {},
@@ -3606,7 +3765,7 @@ var no = {
3606
3765
  function a(e) {
3607
3766
  return e || t.block.linkColor || t.block.color;
3608
3767
  }
3609
- return (t, o) => (f(), k("div", ho, [i.value ? (f(), k("div", {
3768
+ return (t, o) => (f(), k("div", yo, [i.value ? (f(), k("div", {
3610
3769
  key: 0,
3611
3770
  style: L(r.value)
3612
3771
  }, [(f(!0), k(R, null, h(e.block.items, (t, n) => (f(), k(R, { key: t.id }, [I("a", {
@@ -3618,24 +3777,24 @@ var no = {
3618
3777
  textDecoration: t.underline ? "underline" : "none"
3619
3778
  }),
3620
3779
  onClick: o[0] ||= M(() => {}, ["prevent"])
3621
- }, [V(ri, { text: t.text || "..." }, null, 8, ["text"])], 12, go), n < e.block.items.length - 1 ? (f(), k("span", {
3780
+ }, [V(si, { text: t.text || "..." }, null, 8, ["text"])], 12, bo), n < e.block.items.length - 1 ? (f(), k("span", {
3622
3781
  key: 0,
3623
3782
  style: L({
3624
3783
  color: e.block.separatorColor,
3625
3784
  padding: `0 ${e.block.spacing}px`
3626
3785
  })
3627
- }, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div", _o, [V(j(zi), { size: 16 }), I("span", null, D(j(n).menu.addLinks), 1)]))]));
3786
+ }, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div", xo, [V(j(Ui), { size: 16 }), I("span", null, D(j(n).menu.addLinks), 1)]))]));
3628
3787
  }
3629
3788
  });
3630
3789
  //#endregion
3631
3790
  //#region src/composables/usePopoverRoot.ts
3632
- function yo() {
3633
- return v(_r, C(null));
3791
+ function Co() {
3792
+ return v(br, C(null));
3634
3793
  }
3635
3794
  //#endregion
3636
3795
  //#region src/composables/usePopoverPosition.ts
3637
- function bo() {
3638
- let e = yo();
3796
+ function wo() {
3797
+ let e = Co();
3639
3798
  function t(t) {
3640
3799
  let n = e.value?.getBoundingClientRect();
3641
3800
  return n ? {
@@ -3650,7 +3809,7 @@ function bo() {
3650
3809
  }
3651
3810
  //#endregion
3652
3811
  //#region src/utils/sanitizeRichTextHtml.ts
3653
- var xo = /* @__PURE__ */ new Set([
3812
+ var To = /* @__PURE__ */ new Set([
3654
3813
  "http",
3655
3814
  "https",
3656
3815
  "mailto",
@@ -3660,7 +3819,7 @@ var xo = /* @__PURE__ */ new Set([
3660
3819
  "sms",
3661
3820
  "xmpp",
3662
3821
  "cid"
3663
- ]), So = /* @__PURE__ */ new Set([
3822
+ ]), Eo = /* @__PURE__ */ new Set([
3664
3823
  "SCRIPT",
3665
3824
  "STYLE",
3666
3825
  "IFRAME",
@@ -3670,7 +3829,7 @@ var xo = /* @__PURE__ */ new Set([
3670
3829
  "META",
3671
3830
  "BASE",
3672
3831
  "FORM"
3673
- ]), Co = /* @__PURE__ */ new Set([
3832
+ ]), Do = /* @__PURE__ */ new Set([
3674
3833
  "href",
3675
3834
  "xlink:href",
3676
3835
  "formaction",
@@ -3679,16 +3838,16 @@ var xo = /* @__PURE__ */ new Set([
3679
3838
  "background",
3680
3839
  "poster"
3681
3840
  ]);
3682
- function wo(e, t) {
3841
+ function Oo(e, t) {
3683
3842
  let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
3684
3843
  if (!n || n.startsWith("#")) return !0;
3685
3844
  let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
3686
3845
  if (!r) return !0;
3687
3846
  let i = r[1].toLowerCase();
3688
- return xo.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
3847
+ return To.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
3689
3848
  }
3690
- function To(e) {
3691
- if (So.has(e.tagName)) {
3849
+ function ko(e) {
3850
+ if (Eo.has(e.tagName)) {
3692
3851
  e.remove();
3693
3852
  return;
3694
3853
  }
@@ -3700,29 +3859,29 @@ function To(e) {
3700
3859
  e.removeAttribute(n);
3701
3860
  continue;
3702
3861
  }
3703
- if (Co.has(t)) {
3704
- wo(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
3862
+ if (Do.has(t)) {
3863
+ Oo(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
3705
3864
  continue;
3706
3865
  }
3707
3866
  if (t === "src") {
3708
- wo(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
3867
+ Oo(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
3709
3868
  continue;
3710
3869
  }
3711
3870
  t === "srcdoc" && e.removeAttribute(n);
3712
3871
  }
3713
3872
  let n = Array.from(e.children);
3714
- for (let e of n) To(e);
3873
+ for (let e of n) ko(e);
3715
3874
  }
3716
- function Eo(e) {
3875
+ function Ao(e) {
3717
3876
  if (typeof DOMParser > "u") return e;
3718
3877
  let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
3719
- for (let e of n) To(e);
3878
+ for (let e of n) ko(e);
3720
3879
  return t.innerHTML;
3721
3880
  }
3722
3881
  //#endregion
3723
3882
  //#region src/composables/useEditableTextBlock.ts
3724
- function Do(e) {
3725
- let t = v(er, []), { syntax: n } = va(), r = O(() => Eo(Tt(xt(e(), t), n))), i = C(!1), a = C(null), { top: o, left: s } = An(a), { toLocal: c } = bo(), l = O(() => c({
3883
+ function jo(e) {
3884
+ let t = v(rr, []), { syntax: n } = Sa(), r = O(() => Ao(Tt(xt(e(), t), n))), i = C(!1), a = C(null), { top: o, left: s } = Nn(a), { toLocal: c } = wo(), l = O(() => c({
3726
3885
  top: o.value - 8,
3727
3886
  left: s.value
3728
3887
  }));
@@ -3743,14 +3902,14 @@ function Do(e) {
3743
3902
  }
3744
3903
  //#endregion
3745
3904
  //#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
3746
- var Oo = ["innerHTML"], ko = /* @__PURE__ */ B({
3905
+ var Mo = ["innerHTML"], No = /* @__PURE__ */ B({
3747
3906
  __name: "ParagraphBlock",
3748
3907
  props: {
3749
3908
  block: {},
3750
3909
  viewport: {}
3751
3910
  },
3752
3911
  setup(e) {
3753
- let t = e, n = E(() => import("./ParagraphEditor-v0_XEL-v.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Do(() => t.block.content);
3912
+ let t = e, n = E(() => import("./ParagraphEditor-DPCUSXpx.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = jo(() => t.block.content);
3754
3913
  return (t, l) => (f(), k("div", {
3755
3914
  ref_key: "blockRef",
3756
3915
  ref: i,
@@ -3769,56 +3928,66 @@ var Oo = ["innerHTML"], ko = /* @__PURE__ */ B({
3769
3928
  key: 1,
3770
3929
  class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
3771
3930
  innerHTML: j(o)
3772
- }, null, 8, Oo))], 544));
3931
+ }, null, 8, Mo))], 544));
3773
3932
  }
3774
3933
  });
3775
3934
  //#endregion
3776
3935
  //#region src/utils/blockComponentResolver.ts
3777
- function Ao(e, t, n) {
3936
+ function Po(e) {
3937
+ let t = { fontFamily: e.fontFamily };
3938
+ return e.textColor && (t.color = e.textColor), e.linkColor && (t["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (t["--tpl-doc-link-underline"] = "underline"), t;
3939
+ }
3940
+ function Fo(e, t, n) {
3778
3941
  if (t) {
3779
3942
  let n = t.getComponent(e);
3780
3943
  if (n) return n;
3781
3944
  }
3782
3945
  return n[e.type] ?? null;
3783
3946
  }
3784
- function jo(e) {
3947
+ function Io(e) {
3785
3948
  let { padding: t, backgroundColor: n } = e.styles, r = {
3786
3949
  padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
3787
3950
  backgroundColor: n || "transparent"
3788
3951
  };
3789
3952
  return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
3790
3953
  }
3791
- function Mo(e) {
3954
+ function Lo(e) {
3792
3955
  if (e.type !== "section" || !e.wrapper) return null;
3793
3956
  let t = e.wrapper, n = {};
3794
3957
  return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
3795
3958
  }
3796
3959
  //#endregion
3797
3960
  //#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
3798
- var No = ["data-block-id", "data-block-type"], Po = ["aria-label"], Fo = [
3961
+ var Ro = [
3962
+ "data-block-id",
3963
+ "data-block-type",
3964
+ "data-tpl-picked"
3965
+ ], zo = ["aria-label"], Bo = [
3799
3966
  "aria-label",
3800
3967
  "aria-pressed",
3801
3968
  "title"
3802
- ], Io = ["aria-label", "title"], Lo = ["aria-label", "title"], Ro = ["aria-label", "title"], zo = {
3969
+ ], Vo = ["aria-label", "title"], Ho = ["aria-label", "title"], Uo = ["aria-label", "title"], Wo = {
3803
3970
  key: 1,
3804
3971
  class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
3805
- }, Bo = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, Vo = {
3972
+ }, Go = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, Ko = {
3806
3973
  key: 2,
3807
3974
  class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
3808
- }, Ho = ["aria-label", "title"], Uo = {
3975
+ }, qo = ["aria-label", "title"], Jo = {
3809
3976
  key: 3,
3810
3977
  class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
3811
- }, Wo = ["aria-label"], Go = /*#__PURE__*/ sa(/* @__PURE__ */ B({
3978
+ }, Yo = ["aria-label"], Xo = /*#__PURE__*/ da(/* @__PURE__ */ B({
3812
3979
  __name: "BlockWrapper",
3813
3980
  props: {
3814
3981
  block: {},
3815
3982
  isSelected: { type: Boolean },
3816
3983
  viewport: {},
3817
- previewMode: { type: Boolean }
3984
+ previewMode: { type: Boolean },
3985
+ nested: { type: Boolean },
3986
+ picked: { type: Boolean }
3818
3987
  },
3819
3988
  emits: ["select"],
3820
3989
  setup(e, { emit: t }) {
3821
- let n = E(() => import("./BlockIssueBadge-CxMiLo3p.js")), r = e, i = t, { t: a, format: s } = Y(), c = v(mr, null), l = C(null), u = O(() => c?.liftedBlockId.value === r.block.id), d = O(() => u.value ? s(a.blockActions.dragLifted, { block: r.block.type }) : a.blockActions.drag);
3990
+ let n = E(() => import("./BlockIssueBadge-DMSd0SIl.js")), r = e, i = t, { t: a, format: s } = Y(), c = v(_r, null), l = C(null), u = O(() => c?.liftedBlockId.value === r.block.id), d = O(() => u.value ? s(a.blockActions.dragLifted, { block: r.block.type }) : a.blockActions.drag);
3822
3991
  async function p() {
3823
3992
  await m(), l.value?.focus();
3824
3993
  }
@@ -3844,45 +4013,47 @@ var No = ["data-block-id", "data-block-type"], Po = ["aria-label"], Fo = [
3844
4013
  let g = O(() => !r.viewport || !r.block.visibility ? !1 : r.block.visibility[r.viewport] === !1), _ = O(() => r.previewMode === !0 && g.value), y = O(() => r.viewport ? {
3845
4014
  desktop: a.viewport.desktop,
3846
4015
  mobile: a.viewport.mobile
3847
- }[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(Hn, null), S = v(Un, null), w = v(pr, {}), T = O(() => !!w.savedModules), ee = O(() => w.comments?.getBlockCount(r.block.id) ?? 0), te = O(() => {
3848
- let e = jo(r.block), t = {
4016
+ }[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(Gn, null), S = v(Kn, null), w = v(gr, {}), T = O(() => w.savedBlocks?.isPicking.value === !0), ee = O(() => !r.nested && w.savedBlocks?.isAvailable.value === !0 && w.savedBlocks?.canCreate.value === !0), te = O(() => r.isSelected && !T.value), ne = O(() => w.comments?.getBlockCount(r.block.id) ?? 0), re = O(() => {
4017
+ let e = Io(r.block), t = {
3849
4018
  padding: e.padding,
3850
4019
  backgroundColor: e.backgroundColor
3851
4020
  };
3852
4021
  return e.borderRadius && (t.borderRadius = e.borderRadius), t;
3853
- }), ne = O(() => Mo(r.block));
3854
- function re(e) {
4022
+ }), N = O(() => Lo(r.block));
4023
+ function ie(e) {
3855
4024
  r.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), i("select"));
3856
4025
  }
3857
- function N() {
4026
+ function P() {
3858
4027
  x?.deleteBlock(r.block.id);
3859
4028
  }
3860
- function ie() {
4029
+ function ae() {
3861
4030
  x?.duplicateBlock(r.block);
3862
4031
  }
3863
- function P() {
3864
- w.savedModules?.openSaveDialog(r.block.id);
4032
+ function oe() {
4033
+ w.savedBlocks?.startPicking(r.block.id);
3865
4034
  }
3866
- function ae() {
4035
+ function se() {
3867
4036
  S?.toggleBlock(r.block.id);
3868
4037
  }
3869
4038
  return (t, r) => _.value ? A("", !0) : (f(), k("div", {
3870
4039
  key: 0,
3871
4040
  class: F(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
3872
4041
  "tpl-block--selected": e.isSelected,
3873
- "tpl-block--idle": !e.isSelected,
4042
+ "tpl-block--picked": e.picked,
4043
+ "tpl-block--idle": !e.isSelected && !e.picked,
3874
4044
  "tpl-block--lifted": u.value
3875
4045
  }]),
3876
4046
  "data-block-id": e.block.id,
3877
4047
  "data-block-type": e.block.type,
3878
- onClick: re
4048
+ "data-tpl-picked": e.picked || void 0,
4049
+ onClick: ie
3879
4050
  }, [
3880
4051
  V(j(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
3881
- e.isSelected ? (f(), k("div", {
4052
+ te.value ? (f(), k("div", {
3882
4053
  key: 0,
3883
4054
  role: "toolbar",
3884
4055
  "aria-label": j(a).blockActions.drag,
3885
- class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
4056
+ class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
3886
4057
  }, [
3887
4058
  I("button", {
3888
4059
  ref_key: "dragButtonRef",
@@ -3893,97 +4064,97 @@ var No = ["data-block-id", "data-block-type"], Po = ["aria-label"], Fo = [
3893
4064
  "aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
3894
4065
  title: j(a).blockActions.drag,
3895
4066
  onKeydown: h
3896
- }, [V(j(Ni), {
4067
+ }, [V(j(Li), {
3897
4068
  size: 14,
3898
4069
  "stroke-width": 1.5
3899
- })], 40, Fo),
4070
+ })], 40, Bo),
3900
4071
  I("button", {
3901
4072
  class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
3902
4073
  "aria-label": j(a).blockActions.duplicate,
3903
4074
  title: j(a).blockActions.duplicate,
3904
- onClick: M(ie, ["stop"])
3905
- }, [V(j(Di), {
4075
+ onClick: M(ae, ["stop"])
4076
+ }, [V(j(ji), {
3906
4077
  size: 14,
3907
4078
  "stroke-width": 1.5
3908
- })], 8, Io),
3909
- T.value ? (f(), k("button", {
4079
+ })], 8, Vo),
4080
+ ee.value ? (f(), k("button", {
3910
4081
  key: 0,
3911
4082
  class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
3912
- "aria-label": j(a).blockActions.saveAsModule,
3913
- title: j(a).blockActions.saveAsModule,
3914
- onClick: M(P, ["stop"])
3915
- }, [V(j(gi), {
4083
+ "aria-label": j(a).blockActions.saveAsBlock,
4084
+ title: j(a).blockActions.saveAsBlock,
4085
+ onClick: M(oe, ["stop"])
4086
+ }, [V(j(bi), {
3916
4087
  size: 14,
3917
4088
  "stroke-width": 1.5
3918
- })], 8, Lo)) : A("", !0),
4089
+ })], 8, Ho)) : A("", !0),
3919
4090
  I("button", {
3920
4091
  class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
3921
4092
  "aria-label": j(a).blockActions.delete,
3922
4093
  title: j(a).blockActions.delete,
3923
- onClick: M(N, ["stop"])
3924
- }, [V(j(Zi), {
4094
+ onClick: M(P, ["stop"])
4095
+ }, [V(j(ta), {
3925
4096
  size: 14,
3926
4097
  "stroke-width": 1.5
3927
- })], 8, Ro)
3928
- ], 8, Po)) : A("", !0),
3929
- g.value ? (f(), k("div", zo, [I("span", Bo, [V(j(Oi), {
4098
+ })], 8, Uo)
4099
+ ], 8, zo)) : A("", !0),
4100
+ g.value ? (f(), k("div", Wo, [I("span", Go, [V(j(Mi), {
3930
4101
  size: 12,
3931
4102
  "stroke-width": 1.5
3932
4103
  }), z(" " + D(j(s)(j(a).blockActions.hiddenOnViewport, { viewport: y.value })), 1)])])) : A("", !0),
3933
- b.value && !g.value ? (f(), k("div", Vo, [I("button", {
3934
- class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
4104
+ b.value && !g.value ? (f(), k("div", Ko, [I("button", {
4105
+ class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
3935
4106
  "aria-label": j(a).blockActions.conditionToggle,
3936
4107
  title: e.block.displayCondition?.label,
3937
- onClick: M(ae, ["stop"])
3938
- }, [V(j(Mi), {
4108
+ onClick: M(se, ["stop"])
4109
+ }, [V(j(Ii), {
3939
4110
  size: 12,
3940
4111
  "stroke-width": 2
3941
- })], 8, Ho)])) : A("", !0),
3942
- ee.value > 0 && !g.value ? (f(), k("div", Uo, [I("button", {
3943
- class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]",
3944
- "aria-label": j(s)(j(a).blockActions.comments, { count: String(ee.value) }),
4112
+ })], 8, qo)])) : A("", !0),
4113
+ ne.value > 0 && !g.value ? (f(), k("div", Jo, [I("button", {
4114
+ class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
4115
+ "aria-label": j(s)(j(a).blockActions.comments, { count: String(ne.value) }),
3945
4116
  onClick: r[0] ||= M((t) => j(w).comments?.openForBlock(e.block.id), ["stop"])
3946
- }, [V(j(Ri), {
4117
+ }, [V(j(Hi), {
3947
4118
  size: 12,
3948
4119
  "stroke-width": 2.5
3949
- }), z(" " + D(ee.value), 1)], 8, Wo)])) : A("", !0),
3950
- ne.value ? (f(), k("div", {
4120
+ }), z(" " + D(ne.value), 1)], 8, Yo)])) : A("", !0),
4121
+ N.value ? (f(), k("div", {
3951
4122
  key: 4,
3952
4123
  class: "tpl-section-wrapper",
3953
- style: L(ne.value)
4124
+ style: L(N.value)
3954
4125
  }, [I("div", {
3955
4126
  class: "tpl-block-content",
3956
- style: L(te.value)
4127
+ style: L(re.value)
3957
4128
  }, [o(t.$slots, "default", {}, void 0, !0)], 4)], 4)) : (f(), k("div", {
3958
4129
  key: 5,
3959
4130
  class: "tpl-block-content",
3960
- style: L(te.value)
4131
+ style: L(re.value)
3961
4132
  }, [o(t.$slots, "default", {}, void 0, !0)], 4))
3962
- ], 10, No));
4133
+ ], 10, Ro));
3963
4134
  }
3964
- }), [["__scopeId", "data-v-7d9e7893"]]);
4135
+ }), [["__scopeId", "data-v-43c10a08"]]);
3965
4136
  //#endregion
3966
4137
  //#region src/utils/unwrapParagraph.ts
3967
- function Ko(e) {
4138
+ function Zo(e) {
3968
4139
  let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
3969
4140
  return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
3970
4141
  }
3971
4142
  //#endregion
3972
4143
  //#region src/components/blocks/TitleBlock.vue
3973
- var qo = /* @__PURE__ */ B({
4144
+ var Qo = /* @__PURE__ */ B({
3974
4145
  __name: "TitleBlock",
3975
4146
  props: {
3976
4147
  block: {},
3977
4148
  viewport: {}
3978
4149
  },
3979
4150
  setup(e) {
3980
- let t = e, n = E(() => import("./TitleEditor-CS-_MzYs.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Do(() => t.block.content), l = O(() => {
4151
+ let t = e, n = E(() => import("./TitleEditor-iwd-O9sO.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = jo(() => t.block.content), l = O(() => {
3981
4152
  let e = {
3982
4153
  fontSize: `${pe[t.block.level]}px`,
3983
4154
  textAlign: t.block.textAlign
3984
4155
  };
3985
4156
  return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
3986
- }), u = O(() => `h${t.block.level}`), p = O(() => Ko(o.value));
4157
+ }), u = O(() => `h${t.block.level}`), p = O(() => Zo(o.value));
3987
4158
  return (t, o) => (f(), k("div", {
3988
4159
  ref_key: "blockRef",
3989
4160
  ref: i,
@@ -4009,16 +4180,16 @@ var qo = /* @__PURE__ */ B({
4009
4180
  });
4010
4181
  //#endregion
4011
4182
  //#region src/utils/sectionColumnDrop.ts
4012
- function Jo(e) {
4183
+ function $o(e) {
4013
4184
  return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
4014
4185
  }
4015
4186
  //#endregion
4016
4187
  //#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
4017
- var Yo = { class: "tpl:w-full" }, Xo = {
4188
+ var es = { class: "tpl:w-full" }, ts = {
4018
4189
  key: 0,
4019
4190
  "data-testid": "section-drop-hint",
4020
- class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
4021
- }, Zo = /* @__PURE__ */ B({
4191
+ class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
4192
+ }, ns = /* @__PURE__ */ B({
4022
4193
  __name: "SectionBlock",
4023
4194
  props: {
4024
4195
  block: {},
@@ -4026,13 +4197,22 @@ var Yo = { class: "tpl:w-full" }, Xo = {
4026
4197
  },
4027
4198
  setup(e) {
4028
4199
  let t = {
4029
- title: qo,
4030
- paragraph: ko,
4031
- image: mo,
4032
- button: oi,
4033
- divider: Ka,
4034
- custom: Wa
4035
- }, n = e, { t: r } = Y(), i = J(Bn, "SectionBlock"), a = v(Un, null), o = v(Jn, null), s = O(() => {
4200
+ title: Qo,
4201
+ paragraph: No,
4202
+ image: vo,
4203
+ button: ui,
4204
+ divider: Xa,
4205
+ custom: Ja
4206
+ }, n = e, { t: r } = Y(), i = J(Un, "SectionBlock"), a = v(Kn, null), o = v(Zn, null), s = v(gr, {});
4207
+ function l(e) {
4208
+ let t = s.savedBlocks;
4209
+ if (t?.isPicking.value) {
4210
+ t.togglePick(n.block.id);
4211
+ return;
4212
+ }
4213
+ i.selectBlock(e);
4214
+ }
4215
+ let u = O(() => {
4036
4216
  switch (n.block.columns) {
4037
4217
  case "2": return ["50%", "50%"];
4038
4218
  case "3": return [
@@ -4044,38 +4224,38 @@ var Yo = { class: "tpl:w-full" }, Xo = {
4044
4224
  case "2-1": return ["66.67%", "33.33%"];
4045
4225
  default: return ["100%"];
4046
4226
  }
4047
- }), l = O(() => {
4048
- let e = s.value.length, t = [...n.block.children];
4227
+ }), p = O(() => {
4228
+ let e = u.value.length, t = [...n.block.children];
4049
4229
  for (; t.length < e;) t.push([]);
4050
4230
  return t.slice(0, e);
4051
- }), u = O(() => n.viewport === "mobile" && n.block.stackOnMobile !== !1);
4052
- function p(e) {
4053
- return l.value[e] || [];
4231
+ }), m = O(() => n.viewport === "mobile" && n.block.stackOnMobile !== !1);
4232
+ function g(e) {
4233
+ return p.value[e] || [];
4054
4234
  }
4055
- function m(e, t) {
4235
+ function _(e, t) {
4056
4236
  let r = t.map((e) => JSON.parse(JSON.stringify(e))), a = [...n.block.children];
4057
4237
  for (; a.length <= e;) a.push([]);
4058
4238
  a[e] = r, i.updateBlock(n.block.id, { children: a });
4059
4239
  }
4060
- function g(e) {
4061
- return Ao(e, o, t);
4240
+ function y(e) {
4241
+ return Fo(e, o, t);
4062
4242
  }
4063
- function _(e, t) {
4243
+ function x(e, t) {
4064
4244
  e.type === "custom" && i.updateBlock(e.id, {
4065
4245
  fieldValues: t.fieldValues,
4066
4246
  dataSourceFetched: t.dataSourceFetched
4067
4247
  });
4068
4248
  }
4069
- return (t, n) => (f(), k("div", Yo, [I("div", { class: F(["tpl:flex tpl:gap-0", { "tpl:flex-col": u.value }]) }, [(f(!0), k(R, null, h(l.value, (t, n) => (f(), k("div", {
4249
+ return (t, n) => (f(), k("div", es, [I("div", { class: F(["tpl:flex tpl:gap-0", { "tpl:flex-col": m.value }]) }, [(f(!0), k(R, null, h(p.value, (t, n) => (f(), k("div", {
4070
4250
  key: n,
4071
- class: F(["tpl:relative tpl:min-h-[60px] tpl:rounded", p(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
4072
- style: L({ width: u.value ? "100%" : s.value[n] })
4251
+ class: F(["tpl:relative tpl:min-h-[60px] tpl:rounded", g(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
4252
+ style: L({ width: m.value ? "100%" : u.value[n] })
4073
4253
  }, [V(j(ce), {
4074
- "model-value": p(n),
4254
+ "model-value": g(n),
4075
4255
  group: {
4076
4256
  name: "blocks",
4077
4257
  pull: !0,
4078
- put: (e, t, n) => j(Jo)(n)
4258
+ put: (e, t, n) => j($o)(n)
4079
4259
  },
4080
4260
  animation: 150,
4081
4261
  "ghost-class": "tpl-ghost",
@@ -4086,19 +4266,20 @@ var Yo = { class: "tpl:w-full" }, Xo = {
4086
4266
  "empty-insert-threshold": 20,
4087
4267
  "force-fallback": !0,
4088
4268
  class: "tpl:min-h-[60px]",
4089
- "onUpdate:modelValue": (e) => m(n, e)
4269
+ "onUpdate:modelValue": (e) => _(n, e)
4090
4270
  }, {
4091
- default: b(() => [(f(!0), k(R, null, h(p(n), (t) => c((f(), k("div", { key: t.id }, [V(Go, {
4271
+ default: b(() => [(f(!0), k(R, null, h(g(n), (t) => c((f(), k("div", { key: t.id }, [V(Xo, {
4092
4272
  block: t,
4093
4273
  "is-selected": j(i).state.selectedBlockId === t.id,
4094
4274
  viewport: e.viewport,
4095
4275
  "preview-mode": j(i).state.previewMode,
4096
- onSelect: (e) => j(i).selectBlock(t.id)
4276
+ nested: "",
4277
+ onSelect: (e) => l(t.id)
4097
4278
  }, {
4098
- default: b(() => [(f(), N(d(g(t)), {
4279
+ default: b(() => [(f(), N(d(y(t)), {
4099
4280
  block: t,
4100
4281
  viewport: e.viewport,
4101
- onFetchData: (e) => _(t, e),
4282
+ onFetchData: (e) => x(t, e),
4102
4283
  onUpdate: (e) => j(i).updateBlock(t.id, e)
4103
4284
  }, null, 40, [
4104
4285
  "block",
@@ -4119,13 +4300,13 @@ var Yo = { class: "tpl:w-full" }, Xo = {
4119
4300
  "model-value",
4120
4301
  "group",
4121
4302
  "onUpdate:modelValue"
4122
- ]), p(n).length === 0 ? (f(), k("div", Xo, [I("span", null, D(j(r).section.dropHere), 1)])) : A("", !0)], 6))), 128))], 2)]));
4303
+ ]), g(n).length === 0 ? (f(), k("div", ts, [I("span", null, D(j(r).section.dropHere), 1)])) : A("", !0)], 6))), 128))], 2)]));
4123
4304
  }
4124
- }), Qo = me, $o = {
4305
+ }), rs = me, is = {
4125
4306
  small: 24,
4126
4307
  medium: 32,
4127
4308
  large: 48
4128
- }, es = [
4309
+ }, as = [
4129
4310
  "facebook",
4130
4311
  "twitter",
4131
4312
  "instagram",
@@ -4143,11 +4324,11 @@ var Yo = { class: "tpl:w-full" }, Xo = {
4143
4324
  "github",
4144
4325
  "dribbble",
4145
4326
  "behance"
4146
- ], ts = [
4327
+ ], os = [
4147
4328
  "width",
4148
4329
  "height",
4149
4330
  "fill"
4150
- ], ns = ["d"], rs = /* @__PURE__ */ B({
4331
+ ], ss = ["d"], cs = /* @__PURE__ */ B({
4151
4332
  __name: "SocialIconSvg",
4152
4333
  props: {
4153
4334
  platform: {},
@@ -4155,7 +4336,7 @@ var Yo = { class: "tpl:w-full" }, Xo = {
4155
4336
  iconSize: {}
4156
4337
  },
4157
4338
  setup(e) {
4158
- let t = e, n = O(() => Qo[t.platform]), r = O(() => $o[t.iconSize]), i = O(() => {
4339
+ let t = e, n = O(() => rs[t.platform]), r = O(() => is[t.iconSize]), i = O(() => {
4159
4340
  let e = {
4160
4341
  display: "inline-flex",
4161
4342
  alignItems: "center",
@@ -4199,12 +4380,12 @@ var Yo = { class: "tpl:w-full" }, Xo = {
4199
4380
  viewBox: "0 0 24 24",
4200
4381
  fill: o.value,
4201
4382
  xmlns: "http://www.w3.org/2000/svg"
4202
- }, [I("path", { d: n.value.path }, null, 8, ns)], 8, ts))], 4));
4383
+ }, [I("path", { d: n.value.path }, null, 8, ss)], 8, os))], 4));
4203
4384
  }
4204
- }), is = { class: "tpl:w-full" }, as = ["href"], os = {
4385
+ }), ls = { class: "tpl:w-full" }, us = ["href"], ds = {
4205
4386
  key: 1,
4206
4387
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
4207
- }, ss = /* @__PURE__ */ B({
4388
+ }, fs = /* @__PURE__ */ B({
4208
4389
  __name: "SocialIconsBlock",
4209
4390
  props: {
4210
4391
  block: {},
@@ -4217,7 +4398,7 @@ var Yo = { class: "tpl:w-full" }, Xo = {
4217
4398
  gap: `${t.block.spacing}px`,
4218
4399
  justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
4219
4400
  })), i = O(() => t.block.icons.length > 0);
4220
- return (t, a) => (f(), k("div", is, [i.value ? (f(), k("div", {
4401
+ return (t, a) => (f(), k("div", ls, [i.value ? (f(), k("div", {
4221
4402
  key: 0,
4222
4403
  style: L(r.value)
4223
4404
  }, [(f(!0), k(R, null, h(e.block.icons, (t) => (f(), k("a", {
@@ -4225,7 +4406,7 @@ var Yo = { class: "tpl:w-full" }, Xo = {
4225
4406
  href: t.url || "#",
4226
4407
  class: "tpl:cursor-default",
4227
4408
  onClick: a[0] ||= M(() => {}, ["prevent"])
4228
- }, [V(rs, {
4409
+ }, [V(cs, {
4229
4410
  platform: t.platform,
4230
4411
  "icon-style": e.block.iconStyle,
4231
4412
  "icon-size": e.block.iconSize
@@ -4233,44 +4414,44 @@ var Yo = { class: "tpl:w-full" }, Xo = {
4233
4414
  "platform",
4234
4415
  "icon-style",
4235
4416
  "icon-size"
4236
- ])], 8, as))), 128))], 4)) : (f(), k("div", os, [V(j(Ki), { size: 16 }), I("span", null, D(j(n).social.addIcons), 1)]))]));
4417
+ ])], 8, us))), 128))], 4)) : (f(), k("div", ds, [V(j(Xi), { size: 16 }), I("span", null, D(j(n).social.addIcons), 1)]))]));
4237
4418
  }
4238
- }), cs = { class: "tpl:w-full" }, ls = {
4419
+ }), ps = { class: "tpl:w-full" }, ms = {
4239
4420
  key: 0,
4240
4421
  class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
4241
4422
  style: {
4242
4423
  "background-color": "var(--tpl-bg-hover)",
4243
4424
  color: "var(--tpl-text-dim)"
4244
4425
  }
4245
- }, us = /* @__PURE__ */ B({
4426
+ }, hs = /* @__PURE__ */ B({
4246
4427
  __name: "SpacerBlock",
4247
4428
  props: {
4248
4429
  block: {},
4249
4430
  viewport: {}
4250
4431
  },
4251
4432
  setup(e) {
4252
- let t = e, n = J(Bn, "SpacerBlock"), r = O(() => ({
4433
+ let t = e, n = J(Un, "SpacerBlock"), r = O(() => ({
4253
4434
  height: `${t.block.height}px`,
4254
4435
  minHeight: `${t.block.height}px`,
4255
4436
  ...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
4256
4437
  }));
4257
- return (t, i) => (f(), k("div", cs, [I("div", {
4438
+ return (t, i) => (f(), k("div", ps, [I("div", {
4258
4439
  style: L(r.value),
4259
4440
  class: F(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(n).state.previewMode }])
4260
- }, [j(n).state.previewMode ? A("", !0) : (f(), k("span", ls, D(e.block.height) + "px ", 1))], 6)]));
4441
+ }, [j(n).state.previewMode ? A("", !0) : (f(), k("span", ms, D(e.block.height) + "px ", 1))], 6)]));
4261
4442
  }
4262
- }), ds = { class: "tpl:w-full" }, fs = { key: 0 }, ps = [
4443
+ }), gs = { class: "tpl:w-full" }, _s = { key: 0 }, vs = [
4263
4444
  "aria-label",
4264
4445
  "data-placeholder",
4265
4446
  "onBlur"
4266
- ], ms = [
4447
+ ], ys = [
4267
4448
  "aria-label",
4268
4449
  "data-placeholder",
4269
4450
  "onBlur"
4270
- ], hs = {
4451
+ ], bs = {
4271
4452
  key: 1,
4272
4453
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
4273
- }, gs = /*#__PURE__*/ sa(/* @__PURE__ */ B({
4454
+ }, xs = /*#__PURE__*/ da(/* @__PURE__ */ B({
4274
4455
  __name: "TableBlock",
4275
4456
  props: {
4276
4457
  block: {},
@@ -4284,7 +4465,7 @@ var Yo = { class: "tpl:w-full" }, Xo = {
4284
4465
  updated(e, t) {
4285
4466
  t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
4286
4467
  }
4287
- }, n = e, { t: r } = Y(), i = J(Bn, "TableBlock"), a = O(() => n.block.rows.length > 0), o = O(() => {
4468
+ }, n = e, { t: r } = Y(), i = J(Un, "TableBlock"), a = O(() => n.block.rows.length > 0), o = O(() => {
4288
4469
  let e = {
4289
4470
  width: "100%",
4290
4471
  borderCollapse: "collapse",
@@ -4315,11 +4496,11 @@ var Yo = { class: "tpl:w-full" }, Xo = {
4315
4496
  } : n);
4316
4497
  i.updateBlock(n.block.id, { rows: o });
4317
4498
  }
4318
- return (e, n) => (f(), k("div", ds, [a.value ? (f(), k("table", {
4499
+ return (e, n) => (f(), k("div", gs, [a.value ? (f(), k("table", {
4319
4500
  key: 0,
4320
4501
  style: L(o.value),
4321
4502
  class: "tpl-table-editable"
4322
- }, [u.value ? (f(), k("thead", fs, [I("tr", null, [(f(!0), k(R, null, h(u.value.cells, (e) => c((f(), k("th", {
4503
+ }, [u.value ? (f(), k("thead", _s, [I("tr", null, [(f(!0), k(R, null, h(u.value.cells, (e) => c((f(), k("th", {
4323
4504
  key: e.id,
4324
4505
  style: L(l.value),
4325
4506
  "aria-label": j(r).table.cellPlaceholder,
@@ -4328,7 +4509,7 @@ var Yo = { class: "tpl:w-full" }, Xo = {
4328
4509
  onBlur: (t) => m(u.value.id, e.id, t),
4329
4510
  onKeydown: n[0] ||= ee(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
4330
4511
  onClick: M(p, ["stop"])
4331
- }, null, 44, ps)), [[t, e.content]])), 128))])])) : A("", !0), I("tbody", null, [(f(!0), k(R, null, h(d.value, (e) => (f(), k("tr", { key: e.id }, [(f(!0), k(R, null, h(e.cells, (i) => c((f(), k("td", {
4512
+ }, null, 44, vs)), [[t, e.content]])), 128))])])) : A("", !0), I("tbody", null, [(f(!0), k(R, null, h(d.value, (e) => (f(), k("tr", { key: e.id }, [(f(!0), k(R, null, h(e.cells, (i) => c((f(), k("td", {
4332
4513
  key: i.id,
4333
4514
  style: L(s.value),
4334
4515
  "aria-label": j(r).table.cellPlaceholder,
@@ -4337,9 +4518,9 @@ var Yo = { class: "tpl:w-full" }, Xo = {
4337
4518
  onBlur: (t) => m(e.id, i.id, t),
4338
4519
  onKeydown: n[1] ||= ee(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
4339
4520
  onClick: M(p, ["stop"])
4340
- }, null, 44, ms)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), k("div", hs, [V(j(Xi), { size: 16 }), I("span", null, D(j(r).table.empty), 1)]))]));
4521
+ }, null, 44, ys)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), k("div", bs, [V(j(ea), { size: 16 }), I("span", null, D(j(r).table.empty), 1)]))]));
4341
4522
  }
4342
- }), [["__scopeId", "data-v-963ac422"]]), _s = /* @__PURE__ */ B({
4523
+ }), [["__scopeId", "data-v-963ac422"]]), Ss = /* @__PURE__ */ B({
4343
4524
  __name: "VideoPlayButton",
4344
4525
  props: { hoverEffect: {
4345
4526
  type: Boolean,
@@ -4357,7 +4538,7 @@ var Yo = { class: "tpl:w-full" }, Xo = {
4357
4538
  });
4358
4539
  //#endregion
4359
4540
  //#region src/utils/videoThumbnail.ts
4360
- function vs(e) {
4541
+ function Cs(e) {
4361
4542
  if (!e) return {
4362
4543
  platform: "unknown",
4363
4544
  videoId: null,
@@ -4389,25 +4570,25 @@ function vs(e) {
4389
4570
  thumbnailUrl: null
4390
4571
  };
4391
4572
  }
4392
- function ys(e, t) {
4393
- return t || vs(e).thumbnailUrl;
4573
+ function ws(e, t) {
4574
+ return t || Cs(e).thumbnailUrl;
4394
4575
  }
4395
4576
  //#endregion
4396
4577
  //#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
4397
- var bs = ["src", "alt"], xs = {
4578
+ var Ts = ["src", "alt"], Es = {
4398
4579
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
4399
4580
  style: { opacity: "0.7" }
4400
- }, Ss = ["href"], Cs = ["src", "alt"], ws = ["src", "alt"], Ts = {
4581
+ }, Ds = ["href"], Os = ["src", "alt"], ks = ["src", "alt"], As = {
4401
4582
  key: 3,
4402
4583
  class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
4403
- }, Es = /* @__PURE__ */ B({
4584
+ }, js = /* @__PURE__ */ B({
4404
4585
  __name: "VideoBlock",
4405
4586
  props: {
4406
4587
  block: {},
4407
4588
  viewport: {}
4408
4589
  },
4409
4590
  setup(e) {
4410
- let t = e, { t: n } = Y(), { syntax: r } = va(), i = O(() => St(t.block.url, r) || St(t.block.thumbnailUrl, r)), a = Tr(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Tr(() => i.value ? t.block.placeholderUrl : void 0), s = O(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : ys(t.block.url)), c = O(() => ({ textAlign: t.block.align })), l = O(() => {
4591
+ let t = e, { t: n } = Y(), { syntax: r } = Sa(), i = O(() => St(t.block.url, r) || St(t.block.thumbnailUrl, r)), a = Or(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Or(() => i.value ? t.block.placeholderUrl : void 0), s = O(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : ws(t.block.url)), c = O(() => ({ textAlign: t.block.align })), l = O(() => {
4411
4592
  let e = t.block.align;
4412
4593
  return {
4413
4594
  maxWidth: "100%",
@@ -4428,16 +4609,16 @@ var bs = ["src", "alt"], xs = {
4428
4609
  class: "tpl:w-full tpl:border-0",
4429
4610
  src: j(o),
4430
4611
  alt: e.block.alt
4431
- }, null, 8, bs), V(_s)], 4)) : i.value ? (f(), k("div", {
4612
+ }, null, 8, Ts), V(Ss)], 4)) : i.value ? (f(), k("div", {
4432
4613
  key: 1,
4433
4614
  class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
4434
4615
  style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, l.value])
4435
- }, [V(j(ta), {
4616
+ }, [V(j(aa), {
4436
4617
  size: 36,
4437
4618
  "stroke-width": 1.5,
4438
4619
  class: "tpl:text-[var(--tpl-primary)]",
4439
4620
  style: { opacity: "0.5" }
4440
- }), I("span", xs, [V(ri, { text: u.value }, null, 8, ["text"])])], 4)) : s.value ? (f(), k(R, { key: 2 }, [e.block.url ? (f(), k("a", {
4621
+ }), I("span", Es, [V(si, { text: u.value }, null, 8, ["text"])])], 4)) : s.value ? (f(), k(R, { key: 2 }, [e.block.url ? (f(), k("a", {
4441
4622
  key: 0,
4442
4623
  href: e.block.url,
4443
4624
  target: "_blank",
@@ -4449,7 +4630,7 @@ var bs = ["src", "alt"], xs = {
4449
4630
  class: "tpl:w-full tpl:border-0",
4450
4631
  src: s.value,
4451
4632
  alt: e.block.alt
4452
- }, null, 8, Cs), V(_s, { "hover-effect": "" })], 12, Ss)) : (f(), k("div", {
4633
+ }, null, 8, Os), V(Ss, { "hover-effect": "" })], 12, Ds)) : (f(), k("div", {
4453
4634
  key: 1,
4454
4635
  class: "tpl:relative tpl:inline-block",
4455
4636
  style: L(l.value)
@@ -4457,31 +4638,31 @@ var bs = ["src", "alt"], xs = {
4457
4638
  class: "tpl:w-full tpl:border-0",
4458
4639
  src: s.value,
4459
4640
  alt: e.block.alt
4460
- }, null, 8, ws), V(_s)], 4))], 64)) : (f(), k("div", Ts, [V(j(ta), {
4641
+ }, null, 8, ks), V(Ss)], 4))], 64)) : (f(), k("div", As, [V(j(aa), {
4461
4642
  size: 40,
4462
4643
  "stroke-width": 1.5,
4463
4644
  class: "tpl:text-[var(--tpl-border-light)]"
4464
4645
  }), I("span", null, D(j(n).video.addVideo), 1)]))], 4));
4465
4646
  }
4466
- }), Ds = {
4467
- section: Zo,
4468
- title: qo,
4469
- paragraph: ko,
4470
- image: mo,
4471
- button: oi,
4472
- divider: Ka,
4473
- video: Es,
4474
- social: ss,
4475
- menu: vo,
4476
- table: gs,
4477
- spacer: us,
4478
- html: Qa,
4479
- countdown: E(() => import("./CountdownBlock-eGUE7hhw.js").then((e) => e.n))
4647
+ }), Ms = {
4648
+ section: ns,
4649
+ title: Qo,
4650
+ paragraph: No,
4651
+ image: vo,
4652
+ button: ui,
4653
+ divider: Xa,
4654
+ video: js,
4655
+ social: fs,
4656
+ menu: So,
4657
+ table: xs,
4658
+ spacer: hs,
4659
+ html: no,
4660
+ countdown: E(() => import("./CountdownBlock-BDnWMAME.js").then((e) => e.n))
4480
4661
  };
4481
- function Os(e) {
4662
+ function Ns(e) {
4482
4663
  let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Y(r);
4483
4664
  t.setUiTheme(n.uiTheme ?? "auto");
4484
- let { resolvedTheme: c } = Mr(O(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = Pr({
4665
+ let { resolvedTheme: c } = Ir(O(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = Rr({
4485
4666
  themeOverrides: u,
4486
4667
  resolvedTheme: c,
4487
4668
  extraStyles: e.themeExtraStyles
@@ -4506,25 +4687,25 @@ function Os(e) {
4506
4687
  g && (_ = H(f.isNavigating, (e) => {
4507
4688
  e ? g.pause() : g.resume();
4508
4689
  }));
4509
- let v = jr(t, {
4690
+ let v = Fr(t, {
4510
4691
  t: a,
4511
4692
  format: o
4512
- }), y = qr(n.colors);
4513
- if (y.allowCustomIgnored && Lr.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), y.invalidPresets.length > 0 && Lr.warn(`config.colors.presets skipped invalid entries: ${y.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), y.allowCustom === !1) {
4514
- let e = Zr(y.presets, n.blockDefaults, n.templateDefaults);
4515
- e.length > 0 && Lr.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
4693
+ }, n.customBlocks ?? []), y = Zr(n.colors);
4694
+ if (y.allowCustomIgnored && Vr.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), y.invalidPresets.length > 0 && Vr.warn(`config.colors.presets skipped invalid entries: ${y.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), y.allowCustom === !1) {
4695
+ let e = ti(y.presets, n.blockDefaults, n.templateDefaults);
4696
+ e.length > 0 && Vr.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
4516
4697
  }
4517
- let b = Rr();
4518
- Ur(b, Ds);
4698
+ let b = Hr();
4699
+ qr(b, Ms);
4519
4700
  let x = /* @__PURE__ */ new Set();
4520
4701
  function S(e) {
4521
4702
  for (let t of e) {
4522
- b.registerCustom(t, Wa);
4523
- for (let e of $r(t, y)) x.has(e.id) || (x.add(e.id), Lr.warn(e.message));
4703
+ b.registerCustom(t, Ja);
4704
+ for (let e of ri(t, y)) x.has(e.id) || (x.add(e.id), Vr.warn(e.message));
4524
4705
  }
4525
4706
  }
4526
4707
  n.customBlocks?.length && S(n.customBlocks);
4527
- let w = Rn();
4708
+ let w = Vn();
4528
4709
  if (s() && l(w.dispose), e.containerEl) {
4529
4710
  let t = e.containerEl;
4530
4711
  q(document, "pointerdown", (e) => {
@@ -4533,28 +4714,31 @@ function Os(e) {
4533
4714
  }, { capture: !0 });
4534
4715
  }
4535
4716
  function T(r) {
4536
- w.isActive() && ti(r, {
4717
+ w.isActive() && ai(r, {
4537
4718
  history: f,
4538
4719
  selectBlock: (e) => t.selectBlock(e),
4539
4720
  getSelectedBlockId: () => t.state.selectedBlockId,
4540
4721
  removeBlock: (e) => t.removeBlock(e),
4541
4722
  onSave: n.onSave,
4542
- onBeforeUndo: e.keyboardOptions?.onBeforeUndo
4723
+ onBeforeUndo: e.keyboardOptions?.onBeforeUndo,
4724
+ isPicking: () => e.capabilities?.savedBlocks?.isPicking.value === !0,
4725
+ onConfirmPick: () => e.capabilities?.savedBlocks?.confirmPicking(),
4726
+ onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
4543
4727
  });
4544
4728
  }
4545
4729
  q(document, "keydown", T);
4546
4730
  let E = C(null);
4547
- p(gr, e.editorRoot ?? document), p(_r, E), p(zn, r), p(Bn, t), p(Vn, f), p(Hn, m), p(Un, h), p(Wn, i), p(Gn, d), p(Kn, c), p(qn, n.blockDefaults), p(Jn, b), p(Yn, n.customBlocks ?? []), p(Xn, n.paletteBlocks), p(Zn, Wr(n.htmlBlockPreview)), p(Qn, y), p($n, zr(t.content, b));
4731
+ p(yr, e.editorRoot ?? document), p(br, E), p(Hn, r), p(Un, t), p(Wn, f), p(Gn, m), p(Kn, h), p(qn, i), p(Jn, d), p(Yn, c), p(Xn, n.blockDefaults), p(Zn, b), p(Qn, n.customBlocks ?? []), p($n, n.paletteBlocks), p(er, Jr(n.htmlBlockPreview)), p(tr, y), p(nr, Ur(t.content, b));
4548
4732
  let ee = _t(n.mergeTags?.syntax);
4549
- p(er, n.mergeTags?.tags ?? []), p(tr, ee), p(nr, n.mergeTags?.onRequest ?? null), p(rr, n.mergeTags?.autocomplete !== !1), p(ir, Er()), p(ar, n.logicTags?.tags ?? []), p(or, n.logicTags?.pairs ?? []), p(cr, n.logicTags?.onRequest ?? null), p(sr, Dr()), p(lr, n.onRequestMedia ?? null), p(ur, n.resolveImageUrl ? wr(n.resolveImageUrl) : null), p(dr, n.displayConditions?.conditions ?? []), p(fr, n.displayConditions?.allowCustom ?? !1), p(pr, e.capabilities ?? {}), p(mr, v);
4550
- let D = Or(n.lint) ? null : kr({
4733
+ p(rr, n.mergeTags?.tags ?? []), p(ir, ee), p(ar, n.mergeTags?.onRequest ?? null), p(or, n.mergeTags?.autocomplete !== !1), p(sr, kr()), p(cr, n.logicTags?.tags ?? []), p(lr, n.logicTags?.pairs ?? []), p(dr, n.logicTags?.onRequest ?? null), p(ur, Ar()), p(fr, n.onRequestMedia ?? null), p(pr, n.resolveImageUrl ? Dr(n.resolveImageUrl) : null), p(mr, n.displayConditions?.conditions ?? []), p(hr, n.displayConditions?.allowCustom ?? !1), p(gr, e.capabilities ?? {}), p(_r, v);
4734
+ let D = jr(n.lint) ? null : Mr({
4551
4735
  content: t.content,
4552
4736
  options: n.lint ?? {},
4553
4737
  updateBlock: t.updateBlock,
4554
4738
  updateSettings: t.updateSettings,
4555
4739
  removeBlock: t.removeBlock
4556
4740
  });
4557
- p(hr, D);
4741
+ p(vr, D);
4558
4742
  function te() {
4559
4743
  _?.(), D?.destroy(), g?.destroy(), f.destroy();
4560
4744
  }
@@ -4578,14 +4762,14 @@ function Os(e) {
4578
4762
  }
4579
4763
  //#endregion
4580
4764
  //#region src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
4581
- var ks = ["data-tpl-theme"], As = /* @__PURE__ */ B({
4765
+ var Ps = ["data-tpl-theme"], Fs = /* @__PURE__ */ B({
4582
4766
  __name: "TplModal",
4583
4767
  props: { visible: { type: Boolean } },
4584
4768
  emits: ["close", "keydown"],
4585
4769
  setup(e, { emit: t }) {
4586
4770
  let n = e, r = t, i = C(null);
4587
- ma(i, O(() => n.visible));
4588
- let a = v(Kn), s = yo();
4771
+ va(i, O(() => n.visible));
4772
+ let a = v(Yn), s = Co();
4589
4773
  function c(e) {
4590
4774
  e.key === "Escape" && r("close"), r("keydown", e);
4591
4775
  }
@@ -4614,11 +4798,11 @@ var ks = ["data-tpl-theme"], As = /* @__PURE__ */ B({
4614
4798
  }, [I("div", {
4615
4799
  ref_key: "dialogRef",
4616
4800
  ref: i
4617
- }, [o(t.$slots, "default")], 512)], 40, ks)) : A("", !0)]),
4801
+ }, [o(t.$slots, "default")], 512)], 40, Ps)) : A("", !0)]),
4618
4802
  _: 3
4619
4803
  })], 8, ["to"])) : A("", !0);
4620
4804
  }
4621
- }), js = class e {
4805
+ }), Is = class e {
4622
4806
  static DEFAULT_BASE_URL = "https://templatical.com";
4623
4807
  accessToken = null;
4624
4808
  expiresAt = null;
@@ -4719,8 +4903,8 @@ var ks = ["data-tpl-theme"], As = /* @__PURE__ */ B({
4719
4903
  return a.status === 401 && (a = await i(await this.refreshToken())), a;
4720
4904
  }
4721
4905
  };
4722
- function Ms(e, t) {
4723
- return e.mode === "direct" ? new js({
4906
+ function Ls(e, t) {
4907
+ return e.mode === "direct" ? new Is({
4724
4908
  url: `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}/api/v1/auth/token`,
4725
4909
  baseUrl: e.baseUrl,
4726
4910
  requestOptions: {
@@ -4734,7 +4918,7 @@ function Ms(e, t) {
4734
4918
  }
4735
4919
  },
4736
4920
  onError: t
4737
- }) : new js({
4921
+ }) : new Is({
4738
4922
  url: e.url,
4739
4923
  baseUrl: e.baseUrl,
4740
4924
  requestOptions: e.requestOptions,
@@ -4746,16 +4930,16 @@ function Ms(e, t) {
4746
4930
  function Z(e, t) {
4747
4931
  return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
4748
4932
  }
4749
- var Ns = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Ns}/templates/{template}`, Ps = `${Q}/ai`, Fs = `${Ns}/media`, Is = `${Fs}/folders`, Ls = `${Ns}/saved-modules`, $ = {
4933
+ var Rs = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Rs}/templates/{template}`, zs = `${Q}/ai`, Bs = `${Rs}/media`, Vs = `${Bs}/folders`, Hs = `${Rs}/saved-modules`, $ = {
4750
4934
  health: "/api/v1/health",
4751
- "projects.config": `${Ns}/config`,
4752
- "broadcasting.auth": `${Ns}/broadcasting/auth`,
4753
- "templates.store": `${Ns}/templates`,
4935
+ "projects.config": `${Rs}/config`,
4936
+ "broadcasting.auth": `${Rs}/broadcasting/auth`,
4937
+ "templates.store": `${Rs}/templates`,
4754
4938
  "templates.show": `${Q}`,
4755
4939
  "templates.update": `${Q}`,
4756
4940
  "templates.destroy": `${Q}`,
4757
4941
  "templates.export": `${Q}/export`,
4758
- "templates.importFromBeefree": `${Ns}/templates/import/from-beefree`,
4942
+ "templates.importFromBeefree": `${Rs}/templates/import/from-beefree`,
4759
4943
  "templates.sendTestEmail": `${Q}/send-test-email`,
4760
4944
  "snapshots.index": `${Q}/snapshots`,
4761
4945
  "snapshots.store": `${Q}/snapshots`,
@@ -4766,31 +4950,31 @@ var Ns = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Ns}/templates/{te
4766
4950
  "comments.update": `${Q}/comments/{comment}`,
4767
4951
  "comments.destroy": `${Q}/comments/{comment}`,
4768
4952
  "comments.resolve": `${Q}/comments/{comment}/resolve`,
4769
- "ai.generate": `${Ps}/generate`,
4770
- "ai.conversationMessages": `${Ps}/conversation-messages`,
4771
- "ai.suggestions": `${Ps}/suggestions`,
4772
- "ai.rewriteText": `${Ps}/rewrite-text`,
4773
- "ai.score": `${Ps}/score`,
4774
- "ai.fixFinding": `${Ps}/fix-finding`,
4775
- "ai.generateFromDesign": `${Ps}/generate-from-design`,
4776
- "media.upload": `${Fs}/upload`,
4777
- "media.browse": `${Fs}/browse`,
4778
- "media.delete": `${Fs}/delete`,
4779
- "media.move": `${Fs}/move`,
4780
- "media.update": `${Fs}/{media}`,
4781
- "media.replace": `${Fs}/{media}/replace`,
4782
- "media.checkUsage": `${Fs}/check-usage`,
4783
- "media.frequentlyUsed": `${Fs}/frequently-used`,
4784
- "media.importFromUrl": `${Fs}/import-from-url`,
4785
- "folders.index": `${Is}`,
4786
- "folders.store": `${Is}`,
4787
- "folders.update": `${Is}/{mediaFolder}`,
4788
- "folders.destroy": `${Is}/{mediaFolder}`,
4789
- "savedModules.index": `${Ls}`,
4790
- "savedModules.store": `${Ls}`,
4791
- "savedModules.update": `${Ls}/{savedModule}`,
4792
- "savedModules.destroy": `${Ls}/{savedModule}`
4793
- }, Rs = class {
4953
+ "ai.generate": `${zs}/generate`,
4954
+ "ai.conversationMessages": `${zs}/conversation-messages`,
4955
+ "ai.suggestions": `${zs}/suggestions`,
4956
+ "ai.rewriteText": `${zs}/rewrite-text`,
4957
+ "ai.score": `${zs}/score`,
4958
+ "ai.fixFinding": `${zs}/fix-finding`,
4959
+ "ai.generateFromDesign": `${zs}/generate-from-design`,
4960
+ "media.upload": `${Bs}/upload`,
4961
+ "media.browse": `${Bs}/browse`,
4962
+ "media.delete": `${Bs}/delete`,
4963
+ "media.move": `${Bs}/move`,
4964
+ "media.update": `${Bs}/{media}`,
4965
+ "media.replace": `${Bs}/{media}/replace`,
4966
+ "media.checkUsage": `${Bs}/check-usage`,
4967
+ "media.frequentlyUsed": `${Bs}/frequently-used`,
4968
+ "media.importFromUrl": `${Bs}/import-from-url`,
4969
+ "folders.index": `${Vs}`,
4970
+ "folders.store": `${Vs}`,
4971
+ "folders.update": `${Vs}/{mediaFolder}`,
4972
+ "folders.destroy": `${Vs}/{mediaFolder}`,
4973
+ "savedModules.index": `${Hs}`,
4974
+ "savedModules.store": `${Hs}`,
4975
+ "savedModules.update": `${Hs}/{savedModule}`,
4976
+ "savedModules.destroy": `${Hs}/{savedModule}`
4977
+ }, Us = class {
4794
4978
  authManager;
4795
4979
  constructor(e) {
4796
4980
  this.authManager = e;
@@ -4948,9 +5132,11 @@ var Ns = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Ns}/templates/{te
4948
5132
  async fetchConfig() {
4949
5133
  return this.request(Z($["projects.config"], this.baseParams));
4950
5134
  }
4951
- async listModules(e) {
4952
- let t = Z($["savedModules.index"], this.baseParams), n = e ? `?search=${encodeURIComponent(e)}` : "";
4953
- return this.request(`${t}${n}`);
5135
+ async listModules(e, t) {
5136
+ let n = Z($["savedModules.index"], this.baseParams), r = new URLSearchParams();
5137
+ e && r.set("search", e), t && r.set("category", t);
5138
+ let i = r.size > 0 ? `?${r}` : "";
5139
+ return this.request(`${n}${i}`);
4954
5140
  }
4955
5141
  async createModule(e) {
4956
5142
  return this.request(Z($["savedModules.store"], this.baseParams), {
@@ -4976,14 +5162,14 @@ var Ns = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Ns}/templates/{te
4976
5162
  };
4977
5163
  //#endregion
4978
5164
  //#region ../core/src/cloud/websocket-client.ts
4979
- function zs(e) {
5165
+ function Ws(e) {
4980
5166
  return {
4981
5167
  host: e.host,
4982
5168
  port: e.port,
4983
5169
  appKey: e.app_key
4984
5170
  };
4985
5171
  }
4986
- var Bs = class {
5172
+ var Gs = class {
4987
5173
  pusher = null;
4988
5174
  authManager;
4989
5175
  config;
@@ -5050,7 +5236,7 @@ var Bs = class {
5050
5236
  };
5051
5237
  //#endregion
5052
5238
  //#region ../core/src/cloud/mcp-operation-handler.ts
5053
- function Vs(e, t) {
5239
+ function Ks(e, t) {
5054
5240
  let { operation: n, data: r } = t;
5055
5241
  switch (n) {
5056
5242
  case "add_block":
@@ -5078,11 +5264,11 @@ function Vs(e, t) {
5078
5264
  }
5079
5265
  //#endregion
5080
5266
  //#region ../core/src/cloud/editor.ts
5081
- function Hs(e) {
5267
+ function qs(e) {
5082
5268
  return e === "1" ? 1 : e === "3" ? 3 : 2;
5083
5269
  }
5084
- function Us(e) {
5085
- let t = new Rs(e.authManager), n = S({
5270
+ function Js(e) {
5271
+ let t = new Us(e.authManager), n = S({
5086
5272
  template: null,
5087
5273
  content: Ge(e.defaultFontFamily, e.templateDefaults),
5088
5274
  selectedBlockId: null,
@@ -5188,7 +5374,7 @@ function Us(e) {
5188
5374
  let l;
5189
5375
  if (r) {
5190
5376
  let e = o(n.content.blocks, r);
5191
- if (!e || e.type !== "section" || i < 0 || i >= Hs(e.columns)) return;
5377
+ if (!e || e.type !== "section" || i < 0 || i >= qs(e.columns)) return;
5192
5378
  e.children[i] = e.children[i] || [], l = e.children[i];
5193
5379
  } else l = n.content.blocks;
5194
5380
  let [u] = a.blocks.splice(c, 1);
@@ -5280,11 +5466,11 @@ function Us(e) {
5280
5466
  }
5281
5467
  //#endregion
5282
5468
  //#region ../core/src/cloud/ai-chat.ts
5283
- var Ws = 0;
5284
- function Gs() {
5285
- return `msg_${Date.now()}_${++Ws}`;
5469
+ var Ys = 0;
5470
+ function Xs() {
5471
+ return `msg_${Date.now()}_${++Ys}`;
5286
5472
  }
5287
- function Ks(e) {
5473
+ function Zs(e) {
5288
5474
  let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C([]), o = C(!1), s = C(!1), c = C(null), l = C(null), u = C(null), d = C(null), f = C(null), p = C(null), m = C(!1), h = C([]), g = C(!1);
5289
5475
  function _(e, t) {
5290
5476
  let n = a.value.findIndex((t) => t.id === e);
@@ -5378,14 +5564,14 @@ function Ks(e) {
5378
5564
  let v = n();
5379
5565
  if (!v) throw Error("Template must be saved before using AI generation");
5380
5566
  o.value = !0, c.value = null, l.value = null, h.value = [];
5381
- let y = Gs();
5567
+ let y = Xs();
5382
5568
  a.value = [...a.value, {
5383
5569
  id: y,
5384
5570
  role: "user",
5385
5571
  content: e,
5386
5572
  timestamp: Date.now()
5387
5573
  }];
5388
- let b = Gs();
5574
+ let b = Xs();
5389
5575
  a.value = [...a.value, {
5390
5576
  id: b,
5391
5577
  role: "assistant",
@@ -5476,7 +5662,7 @@ function Ks(e) {
5476
5662
  }
5477
5663
  //#endregion
5478
5664
  //#region ../core/src/cloud/ai-config.ts
5479
- function qs(e) {
5665
+ function Qs(e) {
5480
5666
  function t(t) {
5481
5667
  return e !== !1 && e?.[t] !== !1;
5482
5668
  }
@@ -5487,7 +5673,7 @@ function qs(e) {
5487
5673
  }
5488
5674
  //#endregion
5489
5675
  //#region ../core/src/cloud/template-scoring.ts
5490
- function Js(e) {
5676
+ function $s(e) {
5491
5677
  let { authManager: t, getTemplateId: n } = e, r = C(!1), i = C(null), a = C(null), o = C(null), s = C(""), c = C(null);
5492
5678
  async function l(e, o) {
5493
5679
  let s = n();
@@ -5632,7 +5818,7 @@ function Js(e) {
5632
5818
  }
5633
5819
  //#endregion
5634
5820
  //#region ../core/src/cloud/design-reference.ts
5635
- function Ys(e) {
5821
+ function ec(e) {
5636
5822
  let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C(!1), o = C(null);
5637
5823
  async function s(e) {
5638
5824
  let s = n();
@@ -5695,8 +5881,8 @@ function Ys(e) {
5695
5881
  }
5696
5882
  //#endregion
5697
5883
  //#region ../core/src/cloud/comments.ts
5698
- function Xs(e) {
5699
- let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new Rs(t), c = C([]), l = C(!1), u = C(!1), d = O(() => (o?.() ?? !1) && t.userConfig !== null), f = O(() => {
5884
+ function tc(e) {
5885
+ let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new Us(t), c = C([]), l = C(!1), u = C(!1), d = O(() => (o?.() ?? !1) && t.userConfig !== null), f = O(() => {
5700
5886
  let e = 0;
5701
5887
  for (let t of c.value) e += 1 + (t.replies?.length ?? 0);
5702
5888
  return e;
@@ -5895,17 +6081,17 @@ function Xs(e) {
5895
6081
  }
5896
6082
  //#endregion
5897
6083
  //#region ../core/src/cloud/comment-listener.ts
5898
- function Zs(e) {
6084
+ function nc(e) {
5899
6085
  let { comments: t, channel: n } = e;
5900
6086
  H(n, (e, n) => {
5901
6087
  n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
5902
- Qs(t, e);
6088
+ rc(t, e);
5903
6089
  });
5904
6090
  }), l(() => {
5905
6091
  n.value?.unbind("comment-broadcast");
5906
6092
  });
5907
6093
  }
5908
- function Qs(e, t) {
6094
+ function rc(e, t) {
5909
6095
  switch (t.action) {
5910
6096
  case "comment_created":
5911
6097
  e.applyRemoteCreate(t.comment);
@@ -5924,7 +6110,7 @@ function Qs(e, t) {
5924
6110
  }
5925
6111
  //#endregion
5926
6112
  //#region ../core/src/cloud/collaboration.ts
5927
- var $s = [
6113
+ var ic = [
5928
6114
  "pusher:member_added",
5929
6115
  "pusher:member_removed",
5930
6116
  "client-block_locked",
@@ -5932,10 +6118,10 @@ var $s = [
5932
6118
  "client-operation",
5933
6119
  "mcp-operation"
5934
6120
  ];
5935
- function ec(e) {
5936
- for (let t of $s) e.unbind(t);
6121
+ function ac(e) {
6122
+ for (let t of ic) e.unbind(t);
5937
6123
  }
5938
- var tc = [
6124
+ var oc = [
5939
6125
  "#3b82f6",
5940
6126
  "#ef4444",
5941
6127
  "#10b981",
@@ -5947,10 +6133,10 @@ var tc = [
5947
6133
  "#6366f1",
5948
6134
  "#14b8a6"
5949
6135
  ];
5950
- function nc(e) {
6136
+ function sc(e) {
5951
6137
  let { authManager: t, editor: n, channel: r } = e, i = C([]), a = C(/* @__PURE__ */ new Map()), o = 0, s = !1, c = O(() => t.userConfig?.id ?? "");
5952
6138
  function u() {
5953
- let e = tc[o % tc.length];
6139
+ let e = oc[o % oc.length];
5954
6140
  return o++, e;
5955
6141
  }
5956
6142
  function d(e) {
@@ -5992,7 +6178,7 @@ function nc(e) {
5992
6178
  function h(e) {
5993
6179
  s = !0;
5994
6180
  try {
5995
- Vs(n, e);
6181
+ Ks(n, e);
5996
6182
  } finally {
5997
6183
  s = !1;
5998
6184
  }
@@ -6012,7 +6198,7 @@ function nc(e) {
6012
6198
  return H(() => n.state.selectedBlockId, (e, t) => {
6013
6199
  s || (t && v(t), e && _(e));
6014
6200
  }), H(r, (t, n) => {
6015
- if (n && ec(n), !t) {
6201
+ if (n && ac(n), !t) {
6016
6202
  i.value = [], a.value = /* @__PURE__ */ new Map(), o = 0;
6017
6203
  return;
6018
6204
  }
@@ -6044,7 +6230,7 @@ function nc(e) {
6044
6230
  h(e);
6045
6231
  });
6046
6232
  }), l(() => {
6047
- r.value && ec(r.value);
6233
+ r.value && ac(r.value);
6048
6234
  }), {
6049
6235
  collaborators: i,
6050
6236
  lockedBlocks: a,
@@ -6054,7 +6240,7 @@ function nc(e) {
6054
6240
  }
6055
6241
  //#endregion
6056
6242
  //#region ../core/src/cloud/collaboration-broadcast.ts
6057
- function rc(e, t) {
6243
+ function cc(e, t) {
6058
6244
  let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
6059
6245
  e.addBlock = (e, r, i, a) => {
6060
6246
  n(e, r, i, a), t._broadcastOperation({
@@ -6109,11 +6295,11 @@ function rc(e, t) {
6109
6295
  }
6110
6296
  //#endregion
6111
6297
  //#region ../core/src/cloud/web-socket.ts
6112
- function ic(e) {
6298
+ function lc(e) {
6113
6299
  let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = null, o = null;
6114
6300
  async function s(e, s) {
6115
6301
  if (a) return;
6116
- a = new Bs({
6302
+ a = new Gs({
6117
6303
  authManager: t,
6118
6304
  config: s,
6119
6305
  onError: n
@@ -6140,58 +6326,28 @@ function ic(e) {
6140
6326
  };
6141
6327
  }
6142
6328
  //#endregion
6143
- //#region ../core/src/cloud/saved-modules.ts
6144
- function ac(e) {
6145
- let t = new Rs(e.authManager), n = C([]), r = C(!1);
6146
- async function i(i) {
6147
- r.value = !0;
6148
- try {
6149
- n.value = await t.listModules(i);
6150
- } catch (t) {
6151
- throw e.onError?.(t), t;
6152
- } finally {
6153
- r.value = !1;
6154
- }
6155
- }
6156
- async function a(r, i) {
6157
- try {
6158
- let e = await t.createModule({
6159
- name: r,
6160
- content: i
6161
- });
6162
- return n.value = [e, ...n.value], e;
6163
- } catch (t) {
6164
- throw e.onError?.(t), t;
6165
- }
6166
- }
6167
- async function o(r, i) {
6168
- try {
6169
- let e = await t.updateModule(r, i);
6170
- return n.value = n.value.map((t) => t.id === r ? e : t), e;
6171
- } catch (t) {
6172
- throw e.onError?.(t), t;
6173
- }
6174
- }
6175
- async function s(r) {
6176
- try {
6177
- await t.deleteModule(r), n.value = n.value.filter((e) => e.id !== r);
6178
- } catch (t) {
6179
- throw e.onError?.(t), t;
6180
- }
6181
- }
6329
+ //#region ../core/src/cloud/saved-blocks-provider.ts
6330
+ function uc(e) {
6331
+ let t = new Us(e);
6182
6332
  return {
6183
- modules: n,
6184
- isLoading: r,
6185
- loadModules: i,
6186
- createModule: a,
6187
- updateModule: o,
6188
- deleteModule: s
6333
+ list(e) {
6334
+ return t.listModules(e?.search, e?.category);
6335
+ },
6336
+ create(e) {
6337
+ return t.createModule(e);
6338
+ },
6339
+ update(e, n) {
6340
+ return t.updateModule(e, n);
6341
+ },
6342
+ delete(e) {
6343
+ return t.deleteModule(e);
6344
+ }
6189
6345
  };
6190
6346
  }
6191
6347
  //#endregion
6192
6348
  //#region ../core/src/cloud/snapshots.ts
6193
- function oc(e) {
6194
- let t = new Rs(e.authManager), n = C([]), r = C(!1), i = C(!1);
6349
+ function dc(e) {
6350
+ let t = new Us(e.authManager), n = C([]), r = C(!1), i = C(!1);
6195
6351
  async function a() {
6196
6352
  r.value = !0;
6197
6353
  try {
@@ -6223,8 +6379,8 @@ function oc(e) {
6223
6379
  }
6224
6380
  //#endregion
6225
6381
  //#region ../core/src/cloud/test-email.ts
6226
- function sc(e) {
6227
- let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new Rs(t), l = C(!1), u = C(null), d = C(null);
6382
+ function fc(e) {
6383
+ let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new Us(t), l = C(!1), u = C(null), d = C(null);
6228
6384
  o && H(o, (e) => {
6229
6385
  e && (d.value = t.testEmailConfig);
6230
6386
  }, { immediate: !0 });
@@ -6260,8 +6416,8 @@ function sc(e) {
6260
6416
  }
6261
6417
  //#endregion
6262
6418
  //#region ../core/src/cloud/export.ts
6263
- function cc(e) {
6264
- let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new Rs(t);
6419
+ function pc(e) {
6420
+ let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new Us(t);
6265
6421
  function a() {
6266
6422
  let e = n?.();
6267
6423
  return {
@@ -6287,8 +6443,8 @@ function cc(e) {
6287
6443
  }
6288
6444
  //#endregion
6289
6445
  //#region ../core/src/cloud/plan-config.ts
6290
- function lc(e) {
6291
- let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new Rs(t), o = O(() => r.value?.features ?? null);
6446
+ function mc(e) {
6447
+ let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new Us(t), o = O(() => r.value?.features ?? null);
6292
6448
  function s(e) {
6293
6449
  return r.value?.features[e] ?? !1;
6294
6450
  }
@@ -6314,11 +6470,11 @@ function lc(e) {
6314
6470
  }
6315
6471
  //#endregion
6316
6472
  //#region ../core/src/cloud/health-check.ts
6317
- var uc = 5e3;
6318
- function dc(e) {
6473
+ var hc = 5e3;
6474
+ function gc(e) {
6319
6475
  return e.authManager ? e.authManager.resolveUrl($.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${$.health}`;
6320
6476
  }
6321
- async function fc(e, t) {
6477
+ async function _c(e, t) {
6322
6478
  let n = performance.now();
6323
6479
  try {
6324
6480
  let r = t ? await t.authenticatedFetch($.health, {
@@ -6370,7 +6526,7 @@ async function fc(e, t) {
6370
6526
  };
6371
6527
  }
6372
6528
  }
6373
- async function pc(e) {
6529
+ async function vc(e) {
6374
6530
  if (!e?.host || !e?.app_key) return {
6375
6531
  ok: !1,
6376
6532
  error: "WebSocket configuration not available"
@@ -6386,7 +6542,7 @@ async function pc(e) {
6386
6542
  ok: !1,
6387
6543
  error: "WebSocket connection timed out"
6388
6544
  });
6389
- }, uc);
6545
+ }, hc);
6390
6546
  try {
6391
6547
  n = new WebSocket(t);
6392
6548
  } catch (t) {
@@ -6406,8 +6562,8 @@ async function pc(e) {
6406
6562
  };
6407
6563
  });
6408
6564
  }
6409
- async function mc(e = {}) {
6410
- let t = await fc(dc(e), e.authManager), n = await pc(t.wsConfig);
6565
+ async function yc(e = {}) {
6566
+ let t = await _c(gc(e), e.authManager), n = await vc(t.wsConfig);
6411
6567
  return {
6412
6568
  api: t.api,
6413
6569
  websocket: n,
@@ -6417,29 +6573,29 @@ async function mc(e = {}) {
6417
6573
  }
6418
6574
  //#endregion
6419
6575
  //#region ../core/src/cloud/mcp-listener.ts
6420
- function hc(e) {
6576
+ function bc(e) {
6421
6577
  let { editor: t, channel: n, onOperation: r } = e;
6422
6578
  H(n, (e, n) => {
6423
6579
  n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
6424
- Vs(t, e), r?.(e);
6580
+ Ks(t, e), r?.(e);
6425
6581
  });
6426
6582
  });
6427
6583
  }
6428
6584
  //#endregion
6429
6585
  //#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
6430
- var gc = {
6586
+ var xc = {
6431
6587
  key: 0,
6432
6588
  class: "tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
6433
- }, _c = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, vc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, yc = { class: "tpl:flex tpl:items-center tpl:gap-1" }, bc = ["title"], xc = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, Sc = {
6589
+ }, Sc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Cc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, wc = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Tc = ["title"], Ec = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, Dc = {
6434
6590
  key: 0,
6435
6591
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
6436
- }, Cc = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, wc = {
6592
+ }, Oc = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, kc = {
6437
6593
  key: 1,
6438
6594
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
6439
- }, Tc = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ec = {
6595
+ }, Ac = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, jc = {
6440
6596
  key: 2,
6441
6597
  class: "tpl:flex tpl:flex-col tpl:gap-4"
6442
- }, Dc = {
6598
+ }, Mc = {
6443
6599
  key: 0,
6444
6600
  class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
6445
6601
  style: {
@@ -6448,10 +6604,10 @@ var gc = {
6448
6604
  "max-width": "85%",
6449
6605
  "box-shadow": "var(--tpl-shadow)"
6450
6606
  }
6451
- }, Oc = {
6607
+ }, Nc = {
6452
6608
  key: 1,
6453
6609
  class: "tpl:flex tpl:flex-col tpl:gap-2"
6454
- }, kc = {
6610
+ }, Pc = {
6455
6611
  key: 1,
6456
6612
  class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
6457
6613
  style: {
@@ -6460,21 +6616,21 @@ var gc = {
6460
6616
  color: "var(--tpl-text)",
6461
6617
  "box-shadow": "var(--tpl-shadow)"
6462
6618
  }
6463
- }, Ac = {
6619
+ }, Fc = {
6464
6620
  key: 0,
6465
6621
  class: "tpl:mx-3 tpl:mb-2 tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs",
6466
6622
  style: {
6467
6623
  "background-color": "var(--tpl-danger-light)",
6468
6624
  color: "var(--tpl-danger)"
6469
6625
  }
6470
- }, jc = {
6626
+ }, Ic = {
6471
6627
  key: 1,
6472
6628
  class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
6473
6629
  style: {
6474
6630
  "background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
6475
6631
  "backdrop-filter": "blur(2px)"
6476
6632
  }
6477
- }, Mc = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Nc = ["onClick"], Pc = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Fc = { class: "tpl-ai-input-wrapper tpl:flex tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Ic = ["placeholder", "disabled"], Lc = ["disabled"], Rc = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, zc = /*@__PURE__*/ B({
6633
+ }, Lc = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Rc = ["onClick"], zc = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Bc = { class: "tpl-ai-input-wrapper tpl:flex tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Vc = ["placeholder", "disabled"], Hc = ["disabled"], Uc = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Wc = /*@__PURE__*/ B({
6478
6634
  __name: "AiChatSidebar",
6479
6635
  props: {
6480
6636
  visible: { type: Boolean },
@@ -6482,14 +6638,14 @@ var gc = {
6482
6638
  },
6483
6639
  emits: ["close"],
6484
6640
  setup(e, { emit: t }) {
6485
- let n = e, r = t, i = J(Cr, "AiChatSidebar"), a = J(Bn, "AiChatSidebar"), o = J(vr, "AiChatSidebar"), s = v(er, []), l = $a(), u = Ks({
6641
+ let n = e, r = t, i = J(Er, "AiChatSidebar"), a = J(Un, "AiChatSidebar"), o = J(Sr, "AiChatSidebar"), s = v(rr, []), l = ro(), u = Zs({
6486
6642
  authManager: o,
6487
6643
  getTemplateId: () => a.state.template?.id ?? null,
6488
6644
  onApply: n.onApply,
6489
6645
  onError: void 0
6490
- }), d = C(""), p = C(null), g = C(!1), _ = C(0), { pause: y, resume: x } = un(() => {
6646
+ }), d = C(""), p = C(null), g = C(!1), _ = C(0), { pause: y, resume: x } = pn(() => {
6491
6647
  _.value < (u.suggestions.value?.length ?? 0) ? _.value++ : y();
6492
- }, 150, { immediate: !1 }), { start: S } = dn(() => x(), 100, { immediate: !1 });
6648
+ }, 150, { immediate: !1 }), { start: S } = mn(() => x(), 100, { immediate: !1 });
6493
6649
  H(() => u.suggestions.value?.length ?? 0, (e) => {
6494
6650
  if (y(), e === 0) {
6495
6651
  _.value = 0;
@@ -6529,42 +6685,42 @@ var gc = {
6529
6685
  "leave-from-class": "tpl:translate-x-0",
6530
6686
  "leave-to-class": "tpl:translate-x-full"
6531
6687
  }, {
6532
- default: b(() => [e.visible ? (f(), k("div", gc, [
6533
- I("div", _c, [I("div", vc, [V(j(Yi), {
6688
+ default: b(() => [e.visible ? (f(), k("div", xc, [
6689
+ I("div", Sc, [I("div", Cc, [V(j($i), {
6534
6690
  size: 13,
6535
6691
  "stroke-width": 2
6536
- }), I("span", null, D(j(i).aiChat.title), 1)]), I("div", yc, [(j(u).messages.value?.length ?? 0) > 0 ? (f(), k("button", {
6692
+ }), I("span", null, D(j(i).aiChat.title), 1)]), I("div", wc, [(j(u).messages.value?.length ?? 0) > 0 ? (f(), k("button", {
6537
6693
  key: 0,
6538
6694
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
6539
6695
  title: j(i).aiChat.clear,
6540
6696
  onClick: n[0] ||= (e) => j(u).clearChat()
6541
- }, [V(j(Zi), {
6697
+ }, [V(j(ta), {
6542
6698
  size: 14,
6543
6699
  "stroke-width": 2
6544
- })], 8, bc)) : A("", !0), I("button", {
6700
+ })], 8, Tc)) : A("", !0), I("button", {
6545
6701
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
6546
6702
  onClick: n[1] ||= (e) => r("close")
6547
- }, [V(j(na), {
6703
+ }, [V(j(oa), {
6548
6704
  size: 14,
6549
6705
  "stroke-width": 2
6550
6706
  })])])]),
6551
- I("div", xc, [
6707
+ I("div", Ec, [
6552
6708
  I("div", {
6553
6709
  ref_key: "messagesContainer",
6554
6710
  ref: p,
6555
6711
  class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
6556
- }, [j(u).isLoadingHistory.value ? (f(), k("div", Sc, [V(j(Li), {
6712
+ }, [j(u).isLoadingHistory.value ? (f(), k("div", Dc, [V(j(Vi), {
6557
6713
  class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
6558
6714
  size: 24,
6559
6715
  "stroke-width": 2
6560
- }), I("p", Cc, D(j(i).aiChat.loadingHistory), 1)])) : (j(u).messages.value?.length ?? 0) === 0 ? (f(), k("div", wc, [V(j(Yi), {
6716
+ }), I("p", Oc, D(j(i).aiChat.loadingHistory), 1)])) : (j(u).messages.value?.length ?? 0) === 0 ? (f(), k("div", kc, [V(j($i), {
6561
6717
  size: 32,
6562
6718
  "stroke-width": 1.5,
6563
6719
  class: "tpl:text-[var(--tpl-text-dim)]"
6564
- }), I("p", Tc, D(j(i).aiChat.placeholder), 1)])) : (f(), k("div", Ec, [(f(!0), k(R, null, h(j(u).messages.value, (e, t) => (f(), k("div", {
6720
+ }), I("p", Ac, D(j(i).aiChat.placeholder), 1)])) : (f(), k("div", jc, [(f(!0), k(R, null, h(j(u).messages.value, (e, t) => (f(), k("div", {
6565
6721
  key: e.id,
6566
6722
  class: "tpl:flex tpl:flex-col tpl:gap-2"
6567
- }, [e.role === "user" ? (f(), k("div", Dc, D(e.content), 1)) : (f(), k("div", Oc, [!E(e.content) && j(u).isGenerating.value && t === (j(u).messages.value?.length ?? 0) - 1 ? (f(), N(da, { key: 0 })) : (f(), k("div", kc, D(E(e.content) || j(i).aiChat.applied), 1)), e.id === j(u).lastApplyMessageId.value && !j(u).isGenerating.value ? (f(), k("button", {
6723
+ }, [e.role === "user" ? (f(), k("div", Mc, D(e.content), 1)) : (f(), k("div", Nc, [!E(e.content) && j(u).isGenerating.value && t === (j(u).messages.value?.length ?? 0) - 1 ? (f(), N(ha, { key: 0 })) : (f(), k("div", Pc, D(E(e.content) || j(i).aiChat.applied), 1)), e.id === j(u).lastApplyMessageId.value && !j(u).isGenerating.value ? (f(), k("button", {
6568
6724
  key: 2,
6569
6725
  class: "tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:self-start tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
6570
6726
  style: {
@@ -6573,19 +6729,19 @@ var gc = {
6573
6729
  "background-color": "transparent"
6574
6730
  },
6575
6731
  onClick: n[2] ||= (e) => j(u).toggleLastRevert()
6576
- }, [j(u).isLastChangeReverted.value ? (f(), k(R, { key: 0 }, [V(j(Hi), {
6732
+ }, [j(u).isLastChangeReverted.value ? (f(), k(R, { key: 0 }, [V(j(Ki), {
6577
6733
  size: 12,
6578
6734
  "stroke-width": 2
6579
- }), z(" " + D(j(i).aiChat.reapply), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j($i), {
6735
+ }), z(" " + D(j(i).aiChat.reapply), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(ra), {
6580
6736
  size: 12,
6581
6737
  "stroke-width": 2
6582
6738
  }), z(" " + D(j(i).aiChat.revert), 1)], 64))])) : A("", !0)]))]))), 128))]))], 512),
6583
- j(u).error.value ? (f(), k("div", Ac, [V(j(Ci), {
6739
+ j(u).error.value ? (f(), k("div", Fc, [V(j(Di), {
6584
6740
  size: 14,
6585
6741
  "stroke-width": 2,
6586
6742
  class: "tpl:mt-0.5 tpl:shrink-0"
6587
6743
  }), I("span", null, D(j(u).error.value === "ai_apply_failed" ? j(i).aiChat.applyFailed : j(i).aiChat.error), 1)])) : A("", !0),
6588
- (j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div", jc, [I("div", Mc, [(f(!0), k(R, null, h(j(u).suggestions.value ?? [], (e, t) => (f(), k("button", {
6744
+ (j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div", Ic, [I("div", Lc, [(f(!0), k(R, null, h(j(u).suggestions.value ?? [], (e, t) => (f(), k("button", {
6589
6745
  key: t,
6590
6746
  class: F(["tpl-suggestion-btn tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:leading-snug tpl:transition-all tpl:duration-300 tpl:ease-out", (j(u).suggestions.value?.length ?? 0) - 1 - t < _.value ? "tpl:translate-y-0 tpl:opacity-100" : "tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0"]),
6591
6747
  style: {
@@ -6595,104 +6751,104 @@ var gc = {
6595
6751
  "box-shadow": "var(--tpl-shadow)"
6596
6752
  },
6597
6753
  onClick: (t) => ee(e)
6598
- }, D(e), 11, Nc))), 128))])])) : A("", !0)
6754
+ }, D(e), 11, Rc))), 128))])])) : A("", !0)
6599
6755
  ]),
6600
- I("div", Pc, [I("div", Fc, [c(I("textarea", {
6756
+ I("div", zc, [I("div", Bc, [c(I("textarea", {
6601
6757
  "onUpdate:modelValue": n[3] ||= (e) => d.value = e,
6602
6758
  class: "tpl:max-h-32 tpl:min-h-[64px] tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-sm tpl:outline-none tpl:text-[var(--tpl-text)]",
6603
6759
  placeholder: j(i).aiChat.inputPlaceholder,
6604
6760
  disabled: j(u).isGenerating.value,
6605
6761
  rows: "3",
6606
6762
  onKeydown: te
6607
- }, null, 40, Ic), [[ae, d.value]]), I("button", {
6763
+ }, null, 40, Vc), [[ae, d.value]]), I("button", {
6608
6764
  class: "tpl-ai-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
6609
6765
  disabled: !d.value.trim() || j(u).isGenerating.value,
6610
6766
  onClick: T
6611
- }, [V(j(Gi), {
6767
+ }, [V(j(Yi), {
6612
6768
  size: 16,
6613
6769
  "stroke-width": 2
6614
- })], 8, Lc)]), I("p", Rc, D(j(i).aiMenu.disclaimer), 1)])
6770
+ })], 8, Hc)]), I("p", Uc, D(j(i).aiMenu.disclaimer), 1)])
6615
6771
  ])) : A("", !0)]),
6616
6772
  _: 1
6617
6773
  }));
6618
6774
  }
6619
- }), Bc = /* @__PURE__ */ e({ default: () => Vc }), Vc = /*#__PURE__*/ sa(zc, [["__scopeId", "data-v-a55e4bff"]]), Hc = 6e4, Uc = 36e5, Wc = 864e5;
6620
- function Gc(e, t, n, r) {
6775
+ }), Gc = /* @__PURE__ */ e({ default: () => Kc }), Kc = /*#__PURE__*/ da(Wc, [["__scopeId", "data-v-a55e4bff"]]), qc = 6e4, Jc = 36e5, Yc = 864e5;
6776
+ function Xc(e, t, n, r) {
6621
6777
  let i = new Date(e).getTime();
6622
6778
  if (Number.isNaN(i)) return null;
6623
6779
  let a = Date.now() - i;
6624
6780
  if (a < -6e4) return null;
6625
- let o = Math.floor(a / Hc), s = Math.floor(a / Uc), c = Math.floor(a / Wc);
6781
+ let o = Math.floor(a / qc), s = Math.floor(a / Jc), c = Math.floor(a / Yc);
6626
6782
  return o < 1 ? t.justNow : o < 60 ? n ? n(t.minutesAgo, { minutes: o }) : t.minutesAgo.replace("{minutes}", String(o)) : s < 24 ? n ? n(t.hoursAgo, { hours: s }) : t.hoursAgo.replace("{hours}", String(s)) : r !== void 0 && c >= r ? null : n ? n(t.daysAgo, { days: c }) : t.daysAgo.replace("{days}", String(c));
6627
6783
  }
6628
6784
  //#endregion
6629
6785
  //#region src/cloud/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
6630
- var Kc = {
6786
+ var Zc = {
6631
6787
  key: 0,
6632
6788
  class: "tpl-comments-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
6633
- }, qc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Jc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, Yc = {
6789
+ }, Qc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, $c = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, el = {
6634
6790
  key: 0,
6635
6791
  class: "tpl:ml-1 tpl:inline-flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[10px] tpl:font-semibold tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]"
6636
- }, Xc = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, Zc = { class: "tpl:flex-1 tpl:overflow-y-auto" }, Qc = {
6792
+ }, tl = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, nl = { class: "tpl:flex-1 tpl:overflow-y-auto" }, rl = {
6637
6793
  key: 0,
6638
6794
  class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
6639
- }, $c = {
6795
+ }, il = {
6640
6796
  key: 1,
6641
6797
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
6642
- }, el = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, tl = {
6798
+ }, al = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ol = {
6643
6799
  key: 2,
6644
6800
  class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
6645
- }, nl = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, rl = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, il = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, al = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, ol = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, sl = {
6801
+ }, sl = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, cl = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, ll = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, ul = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, dl = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, fl = {
6646
6802
  key: 0,
6647
6803
  class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
6648
- }, cl = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, ll = ["title", "onClick"], ul = ["title", "onClick"], dl = ["title", "onClick"], fl = {
6804
+ }, pl = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, ml = ["title", "onClick"], hl = ["title", "onClick"], gl = ["title", "onClick"], _l = {
6649
6805
  key: 0,
6650
6806
  class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
6651
- }, pl = {
6807
+ }, vl = {
6652
6808
  key: 0,
6653
6809
  class: "tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]"
6654
- }, ml = ["onClick"], hl = {
6810
+ }, yl = ["onClick"], bl = {
6655
6811
  key: 2,
6656
6812
  class: "tpl:mt-2"
6657
- }, gl = ["onKeydown"], _l = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, vl = ["disabled", "onClick"], yl = {
6813
+ }, xl = ["onKeydown"], Sl = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Cl = ["disabled", "onClick"], wl = {
6658
6814
  key: 3,
6659
6815
  class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
6660
- }, bl = {
6816
+ }, Tl = {
6661
6817
  key: 4,
6662
6818
  class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
6663
- }, xl = { class: "tpl:flex-1" }, Sl = ["onClick"], Cl = {
6819
+ }, El = { class: "tpl:flex-1" }, Dl = ["onClick"], Ol = {
6664
6820
  key: 5,
6665
6821
  class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
6666
- }, wl = ["title", "onClick"], Tl = ["onClick"], El = {
6822
+ }, kl = ["title", "onClick"], Al = ["onClick"], jl = {
6667
6823
  key: 0,
6668
6824
  class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
6669
- }, Dl = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Ol = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, kl = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Al = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, jl = {
6825
+ }, Ml = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Nl = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Pl = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Fl = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Il = {
6670
6826
  key: 0,
6671
6827
  class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
6672
- }, Ml = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Nl = ["title", "onClick"], Pl = ["title", "onClick"], Fl = {
6828
+ }, Ll = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Rl = ["title", "onClick"], zl = ["title", "onClick"], Bl = {
6673
6829
  key: 0,
6674
6830
  class: "tpl:mt-1.5"
6675
- }, Il = ["onKeydown"], Ll = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Rl = ["disabled", "onClick"], zl = {
6831
+ }, Vl = ["onKeydown"], Hl = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Ul = ["disabled", "onClick"], Wl = {
6676
6832
  key: 1,
6677
6833
  class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
6678
- }, Bl = {
6834
+ }, Gl = {
6679
6835
  key: 2,
6680
6836
  class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
6681
- }, Vl = { class: "tpl:flex-1" }, Hl = ["onClick"], Ul = {
6837
+ }, Kl = { class: "tpl:flex-1" }, ql = ["onClick"], Jl = {
6682
6838
  key: 0,
6683
6839
  class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
6684
- }, Wl = { class: "tpl:flex tpl:items-end tpl:gap-2" }, Gl = ["placeholder", "onKeydown"], Kl = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, ql = ["disabled", "onClick"], Jl = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Yl = {
6840
+ }, Yl = { class: "tpl:flex tpl:items-end tpl:gap-2" }, Xl = ["placeholder", "onKeydown"], Zl = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, Ql = ["disabled", "onClick"], $l = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, eu = {
6685
6841
  key: 0,
6686
6842
  class: "tpl:flex tpl:min-h-[68px] tpl:items-center tpl:rounded-md tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]"
6687
- }, Xl = {
6843
+ }, tu = {
6688
6844
  key: 1,
6689
6845
  class: "tpl-comments-input-wrapper tpl:flex tpl:min-h-[68px] tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]"
6690
- }, Zl = ["placeholder", "disabled"], Ql = ["disabled"], $l = /*@__PURE__*/ B({
6846
+ }, nu = ["placeholder", "disabled"], ru = ["disabled"], iu = /*@__PURE__*/ B({
6691
6847
  __name: "CommentsSidebar",
6692
6848
  props: { visible: { type: Boolean } },
6693
6849
  emits: ["close", "filterBlock"],
6694
6850
  setup(e, { expose: t, emit: n }) {
6695
- let r = e, i = n, { format: a } = Y(), { t: o } = _a(), s = J(Bn, "CommentsSidebar"), l = J(vr, "CommentsSidebar"), u = J(br, "CommentsSidebar"), d = C("unresolved"), p = C(null), g = C(""), _ = C(null), v = C(""), y = C(null), x = C(""), S = C(/* @__PURE__ */ new Set()), w = C(null), T = C(null), E = O(() => l.userConfig?.id ?? null), ee = O(() => {
6851
+ let r = e, i = n, { format: a } = Y(), { t: o } = xa(), s = J(Un, "CommentsSidebar"), l = J(Sr, "CommentsSidebar"), u = J(wr, "CommentsSidebar"), d = C("unresolved"), p = C(null), g = C(""), _ = C(null), v = C(""), y = C(null), x = C(""), S = C(/* @__PURE__ */ new Set()), w = C(null), T = C(null), E = O(() => l.userConfig?.id ?? null), ee = O(() => {
6696
6852
  let e = /* @__PURE__ */ new Set();
6697
6853
  for (let t of s.content.value.blocks) if (e.add(t.id), t.type === "section") for (let n of t.children) for (let t of n) e.add(t.id);
6698
6854
  return e;
@@ -6760,7 +6916,7 @@ var Kc = {
6760
6916
  return e.author_identifier === E.value;
6761
6917
  }
6762
6918
  function ve(e) {
6763
- return Gc(e, o.snapshotHistory) ?? e;
6919
+ return Xc(e, o.snapshotHistory) ?? e;
6764
6920
  }
6765
6921
  function ye(e) {
6766
6922
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), fe());
@@ -6787,22 +6943,22 @@ var Kc = {
6787
6943
  "leave-from-class": "tpl:translate-x-0",
6788
6944
  "leave-to-class": "tpl:translate-x-full"
6789
6945
  }, {
6790
- default: b(() => [e.visible ? (f(), k("div", Kc, [
6791
- I("div", qc, [I("div", Jc, [
6792
- V(j(Ri), {
6946
+ default: b(() => [e.visible ? (f(), k("div", Zc, [
6947
+ I("div", Qc, [I("div", $c, [
6948
+ V(j(Hi), {
6793
6949
  size: 13,
6794
6950
  "stroke-width": 2
6795
6951
  }),
6796
6952
  I("span", null, D(j(o).comments.title), 1),
6797
- j(u).unresolvedCount.value > 0 ? (f(), k("span", Yc, D(j(u).unresolvedCount.value), 1)) : A("", !0)
6953
+ j(u).unresolvedCount.value > 0 ? (f(), k("span", el, D(j(u).unresolvedCount.value), 1)) : A("", !0)
6798
6954
  ]), I("button", {
6799
6955
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
6800
6956
  onClick: n[0] ||= (e) => i("close")
6801
- }, [V(j(na), {
6957
+ }, [V(j(oa), {
6802
6958
  size: 14,
6803
6959
  "stroke-width": 2
6804
6960
  })])]),
6805
- I("div", Xc, [
6961
+ I("div", tl, [
6806
6962
  I("button", {
6807
6963
  class: F(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150", d.value === "unresolved" ? "tpl-comment-filter--active" : ""]),
6808
6964
  onClick: n[1] ||= (e) => M("unresolved")
@@ -6817,156 +6973,156 @@ var Kc = {
6817
6973
  onClick: n[3] ||= (e) => M("block", j(s).state.selectedBlockId ?? void 0)
6818
6974
  }, D(j(o).comments.filterBlock), 3)) : A("", !0)
6819
6975
  ]),
6820
- I("div", Zc, [j(u).isLoading.value ? (f(), k("div", Qc, [V(j(Li), {
6976
+ I("div", nl, [j(u).isLoading.value ? (f(), k("div", rl, [V(j(Vi), {
6821
6977
  class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
6822
6978
  size: 24,
6823
6979
  "stroke-width": 2
6824
- })])) : re.value.length === 0 ? (f(), k("div", $c, [V(j(Ri), {
6980
+ })])) : re.value.length === 0 ? (f(), k("div", il, [V(j(Hi), {
6825
6981
  size: 32,
6826
6982
  "stroke-width": 1.5,
6827
6983
  class: "tpl:text-[var(--tpl-text-dim)]"
6828
- }), I("p", el, D(d.value === "all" ? j(o).comments.noCommentsHint : j(o).comments.noComments), 1)])) : (f(), k("div", tl, [(f(!0), k(R, null, h(re.value, (e) => (f(), k("div", {
6984
+ }), I("p", al, D(d.value === "all" ? j(o).comments.noCommentsHint : j(o).comments.noComments), 1)])) : (f(), k("div", ol, [(f(!0), k(R, null, h(re.value, (e) => (f(), k("div", {
6829
6985
  key: e.id,
6830
6986
  class: "tpl-comment-thread"
6831
6987
  }, [
6832
- I("div", nl, [
6833
- I("div", rl, [I("div", il, [
6834
- I("span", al, D(_e(e) ? j(o).comments.ownedByYou : e.author_name), 1),
6835
- I("span", ol, D(ve(e.created_at)), 1),
6836
- e.updated_at === e.created_at ? A("", !0) : (f(), k("span", sl, " (" + D(j(o).comments.edited) + ") ", 1))
6837
- ]), I("div", cl, [
6988
+ I("div", sl, [
6989
+ I("div", cl, [I("div", ll, [
6990
+ I("span", ul, D(_e(e) ? j(o).comments.ownedByYou : e.author_name), 1),
6991
+ I("span", dl, D(ve(e.created_at)), 1),
6992
+ e.updated_at === e.created_at ? A("", !0) : (f(), k("span", fl, " (" + D(j(o).comments.edited) + ") ", 1))
6993
+ ]), I("div", pl, [
6838
6994
  I("button", {
6839
6995
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
6840
6996
  title: e.resolved_at ? j(o).comments.unresolve : j(o).comments.resolve,
6841
6997
  onClick: (t) => ge(e.id)
6842
- }, [V(j(wi), {
6998
+ }, [V(j(Oi), {
6843
6999
  size: 13,
6844
7000
  "stroke-width": 2,
6845
7001
  class: "tpl-resolve-icon",
6846
7002
  style: L({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
6847
- }, null, 8, ["style"])], 8, ll),
7003
+ }, null, 8, ["style"])], 8, ml),
6848
7004
  _e(e) ? (f(), k("button", {
6849
7005
  key: 0,
6850
7006
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
6851
7007
  title: j(o).comments.edit,
6852
7008
  onClick: (t) => le(e)
6853
- }, [V(j(Bi), {
7009
+ }, [V(j(Wi), {
6854
7010
  size: 12,
6855
7011
  "stroke-width": 2
6856
- })], 8, ul)) : A("", !0),
7012
+ })], 8, hl)) : A("", !0),
6857
7013
  _e(e) ? (f(), k("button", {
6858
7014
  key: 1,
6859
7015
  class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
6860
7016
  title: j(o).comments.delete,
6861
7017
  onClick: (t) => ue(e.id)
6862
- }, [V(j(Zi), {
7018
+ }, [V(j(ta), {
6863
7019
  size: 12,
6864
7020
  "stroke-width": 2
6865
- })], 8, dl)) : A("", !0)
7021
+ })], 8, gl)) : A("", !0)
6866
7022
  ])]),
6867
7023
  V(ie, { name: "tpl-resolve" }, {
6868
- default: b(() => [e.resolved_at ? (f(), k("div", fl, [V(j(vi), {
7024
+ default: b(() => [e.resolved_at ? (f(), k("div", _l, [V(j(Si), {
6869
7025
  size: 10,
6870
7026
  "stroke-width": 2.5
6871
7027
  }), I("span", null, D(j(a)(j(o).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : A("", !0)]),
6872
7028
  _: 2
6873
7029
  }, 1024),
6874
- e.block_id && te(e.block_id) ? (f(), k("span", pl, D(j(o).comments.missingBlock), 1)) : e.block_id ? (f(), k("button", {
7030
+ e.block_id && te(e.block_id) ? (f(), k("span", vl, D(j(o).comments.missingBlock), 1)) : e.block_id ? (f(), k("button", {
6875
7031
  key: 1,
6876
7032
  class: "tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
6877
7033
  onClick: (t) => j(s).selectBlock(e.block_id ?? "")
6878
- }, " Block ", 8, ml)) : A("", !0),
6879
- y.value === e.id ? (f(), k("div", hl, [c(I("textarea", {
7034
+ }, " Block ", 8, yl)) : A("", !0),
7035
+ y.value === e.id ? (f(), k("div", bl, [c(I("textarea", {
6880
7036
  "onUpdate:modelValue": n[4] ||= (e) => x.value = e,
6881
7037
  class: "tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
6882
7038
  rows: "3",
6883
7039
  onKeydown: (t) => xe(t, e.id)
6884
- }, null, 40, gl), [[ae, x.value]]), I("div", _l, [I("button", {
7040
+ }, null, 40, xl), [[ae, x.value]]), I("div", Sl, [I("button", {
6885
7041
  class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
6886
7042
  disabled: !x.value.trim() || j(u).isSubmitting.value,
6887
7043
  onClick: (t) => me(e.id)
6888
- }, D(j(o).comments.save), 9, vl), I("button", {
7044
+ }, D(j(o).comments.save), 9, Cl), I("button", {
6889
7045
  class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
6890
7046
  onClick: n[5] ||= (e) => B()
6891
- }, D(j(o).comments.cancel), 1)])])) : (f(), k("p", yl, D(e.body), 1)),
6892
- w.value === e.id ? (f(), k("div", bl, [
6893
- I("span", xl, D(j(o).comments.deleteConfirm), 1),
7047
+ }, D(j(o).comments.cancel), 1)])])) : (f(), k("p", wl, D(e.body), 1)),
7048
+ w.value === e.id ? (f(), k("div", Tl, [
7049
+ I("span", El, D(j(o).comments.deleteConfirm), 1),
6894
7050
  I("button", {
6895
7051
  class: "tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]",
6896
7052
  onClick: (t) => he(e.id)
6897
- }, D(j(o).comments.delete), 9, Sl),
7053
+ }, D(j(o).comments.delete), 9, Dl),
6898
7054
  I("button", {
6899
7055
  class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
6900
7056
  onClick: n[6] ||= (e) => de()
6901
7057
  }, D(j(o).comments.cancel), 1)
6902
7058
  ])) : A("", !0),
6903
- y.value !== e.id && w.value !== e.id ? (f(), k("div", Cl, [I("button", {
7059
+ y.value !== e.id && w.value !== e.id ? (f(), k("div", Ol, [I("button", {
6904
7060
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
6905
7061
  title: j(o).comments.reply,
6906
7062
  onClick: (t) => se(e.id)
6907
- }, [V(j(Wi), {
7063
+ }, [V(j(Ji), {
6908
7064
  size: 13,
6909
7065
  "stroke-width": 2,
6910
7066
  class: "tpl:text-[var(--tpl-primary)]"
6911
- })], 8, wl), (e.replies?.length ?? 0) > 0 ? (f(), k("button", {
7067
+ })], 8, kl), (e.replies?.length ?? 0) > 0 ? (f(), k("button", {
6912
7068
  key: 0,
6913
7069
  class: "tpl:flex tpl:items-center tpl:gap-0.5 tpl:text-[11px] tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
6914
7070
  onClick: (t) => oe(e.id)
6915
- }, [S.value.has(e.id) ? (f(), N(j(Si), {
7071
+ }, [S.value.has(e.id) ? (f(), N(j(Ei), {
6916
7072
  key: 0,
6917
7073
  size: 11,
6918
7074
  "stroke-width": 2
6919
- })) : (f(), N(j(yi), {
7075
+ })) : (f(), N(j(Ci), {
6920
7076
  key: 1,
6921
7077
  size: 11,
6922
7078
  "stroke-width": 2
6923
- })), z(" " + D((e.replies?.length ?? 0) === 1 ? j(a)(j(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : j(a)(j(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, Tl)) : A("", !0)])) : A("", !0)
7079
+ })), z(" " + D((e.replies?.length ?? 0) === 1 ? j(a)(j(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : j(a)(j(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, Al)) : A("", !0)])) : A("", !0)
6924
7080
  ]),
6925
7081
  V(ie, { name: "tpl-replies" }, {
6926
- default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div", El, [(f(!0), k(R, null, h(e.replies, (t, r) => (f(), k("div", {
7082
+ default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div", jl, [(f(!0), k(R, null, h(e.replies, (t, r) => (f(), k("div", {
6927
7083
  key: t.id,
6928
7084
  class: F(["tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5", r < (e.replies?.length ?? 0) - 1 ? "tpl:mb-2" : ""])
6929
7085
  }, [
6930
- I("div", Dl, [I("div", Ol, [
6931
- I("span", kl, D(_e(t) ? j(o).comments.ownedByYou : t.author_name), 1),
6932
- I("span", Al, D(ve(t.created_at)), 1),
6933
- t.updated_at === t.created_at ? A("", !0) : (f(), k("span", jl, " (" + D(j(o).comments.edited) + ") ", 1))
6934
- ]), I("div", Ml, [_e(t) ? (f(), k("button", {
7086
+ I("div", Ml, [I("div", Nl, [
7087
+ I("span", Pl, D(_e(t) ? j(o).comments.ownedByYou : t.author_name), 1),
7088
+ I("span", Fl, D(ve(t.created_at)), 1),
7089
+ t.updated_at === t.created_at ? A("", !0) : (f(), k("span", Il, " (" + D(j(o).comments.edited) + ") ", 1))
7090
+ ]), I("div", Ll, [_e(t) ? (f(), k("button", {
6935
7091
  key: 0,
6936
7092
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
6937
7093
  title: j(o).comments.edit,
6938
7094
  onClick: (e) => le(t)
6939
- }, [V(j(Bi), {
7095
+ }, [V(j(Wi), {
6940
7096
  size: 11,
6941
7097
  "stroke-width": 2
6942
- })], 8, Nl)) : A("", !0), _e(t) ? (f(), k("button", {
7098
+ })], 8, Rl)) : A("", !0), _e(t) ? (f(), k("button", {
6943
7099
  key: 1,
6944
7100
  class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
6945
7101
  title: j(o).comments.delete,
6946
7102
  onClick: (e) => ue(t.id)
6947
- }, [V(j(Zi), {
7103
+ }, [V(j(ta), {
6948
7104
  size: 11,
6949
7105
  "stroke-width": 2
6950
- })], 8, Pl)) : A("", !0)])]),
6951
- y.value === t.id ? (f(), k("div", Fl, [c(I("textarea", {
7106
+ })], 8, zl)) : A("", !0)])]),
7107
+ y.value === t.id ? (f(), k("div", Bl, [c(I("textarea", {
6952
7108
  "onUpdate:modelValue": n[7] ||= (e) => x.value = e,
6953
7109
  class: "tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
6954
7110
  rows: "2",
6955
7111
  onKeydown: (e) => xe(e, t.id)
6956
- }, null, 40, Il), [[ae, x.value]]), I("div", Ll, [I("button", {
7112
+ }, null, 40, Vl), [[ae, x.value]]), I("div", Hl, [I("button", {
6957
7113
  class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
6958
7114
  disabled: !x.value.trim() || j(u).isSubmitting.value,
6959
7115
  onClick: (e) => me(t.id)
6960
- }, D(j(o).comments.save), 9, Rl), I("button", {
7116
+ }, D(j(o).comments.save), 9, Ul), I("button", {
6961
7117
  class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
6962
7118
  onClick: n[8] ||= (e) => B()
6963
- }, D(j(o).comments.cancel), 1)])])) : (f(), k("p", zl, D(t.body), 1)),
6964
- w.value === t.id ? (f(), k("div", Bl, [
6965
- I("span", Vl, D(j(o).comments.deleteConfirm), 1),
7119
+ }, D(j(o).comments.cancel), 1)])])) : (f(), k("p", Wl, D(t.body), 1)),
7120
+ w.value === t.id ? (f(), k("div", Gl, [
7121
+ I("span", Kl, D(j(o).comments.deleteConfirm), 1),
6966
7122
  I("button", {
6967
7123
  class: "tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]",
6968
7124
  onClick: (e) => he(t.id)
6969
- }, D(j(o).comments.delete), 9, Hl),
7125
+ }, D(j(o).comments.delete), 9, ql),
6970
7126
  I("button", {
6971
7127
  class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
6972
7128
  onClick: n[9] ||= (e) => de()
@@ -6976,30 +7132,30 @@ var Kc = {
6976
7132
  _: 2
6977
7133
  }, 1024),
6978
7134
  V(ie, { name: "tpl-replies" }, {
6979
- default: b(() => [_.value === e.id ? (f(), k("div", Ul, [I("div", Wl, [c(I("textarea", {
7135
+ default: b(() => [_.value === e.id ? (f(), k("div", Jl, [I("div", Yl, [c(I("textarea", {
6980
7136
  "onUpdate:modelValue": n[10] ||= (e) => v.value = e,
6981
7137
  class: "tpl:flex-1 tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
6982
7138
  placeholder: j(o).comments.replyPlaceholder,
6983
7139
  rows: "2",
6984
7140
  onKeydown: (t) => be(t, e.id)
6985
- }, null, 40, Gl), [[ae, v.value]]), I("div", Kl, [I("button", {
7141
+ }, null, 40, Xl), [[ae, v.value]]), I("div", Zl, [I("button", {
6986
7142
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-colors tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
6987
7143
  disabled: !v.value.trim() || j(u).isSubmitting.value,
6988
7144
  onClick: (t) => pe(e.id)
6989
- }, [V(j(Gi), {
7145
+ }, [V(j(Yi), {
6990
7146
  size: 14,
6991
7147
  "stroke-width": 2
6992
- })], 8, ql), I("button", {
7148
+ })], 8, Ql), I("button", {
6993
7149
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
6994
7150
  onClick: n[11] ||= (e) => ce()
6995
- }, [V(j(na), {
7151
+ }, [V(j(oa), {
6996
7152
  size: 14,
6997
7153
  "stroke-width": 2
6998
7154
  })])])])])) : A("", !0)]),
6999
7155
  _: 2
7000
7156
  }, 1024)
7001
7157
  ]))), 128))]))]),
7002
- I("div", Jl, [ne.value ? (f(), k("div", Yl, D(j(o).comments.saveTemplateFirst), 1)) : (f(), k("div", Xl, [c(I("textarea", {
7158
+ I("div", $l, [ne.value ? (f(), k("div", eu, D(j(o).comments.saveTemplateFirst), 1)) : (f(), k("div", tu, [c(I("textarea", {
7003
7159
  ref_key: "newCommentInput",
7004
7160
  ref: T,
7005
7161
  "onUpdate:modelValue": n[12] ||= (e) => g.value = e,
@@ -7008,46 +7164,46 @@ var Kc = {
7008
7164
  disabled: j(u).isSubmitting.value,
7009
7165
  rows: "2",
7010
7166
  onKeydown: ye
7011
- }, null, 40, Zl), [[ae, g.value]]), I("button", {
7167
+ }, null, 40, nu), [[ae, g.value]]), I("button", {
7012
7168
  class: "tpl-comments-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
7013
7169
  disabled: !g.value.trim() || j(u).isSubmitting.value,
7014
7170
  onClick: fe
7015
- }, [j(u).isSubmitting.value ? (f(), N(j(Li), {
7171
+ }, [j(u).isSubmitting.value ? (f(), N(j(Vi), {
7016
7172
  key: 0,
7017
7173
  class: "tpl-spinner",
7018
7174
  size: 16,
7019
7175
  "stroke-width": 2
7020
- })) : (f(), N(j(Gi), {
7176
+ })) : (f(), N(j(Yi), {
7021
7177
  key: 1,
7022
7178
  size: 16,
7023
7179
  "stroke-width": 2
7024
- }))], 8, Ql)]))])
7180
+ }))], 8, ru)]))])
7025
7181
  ])) : A("", !0)]),
7026
7182
  _: 1
7027
7183
  }));
7028
7184
  }
7029
- }), eu = /* @__PURE__ */ e({ default: () => tu }), tu = /*#__PURE__*/ sa($l, [["__scopeId", "data-v-d204f573"]]), nu = {
7185
+ }), au = /* @__PURE__ */ e({ default: () => ou }), ou = /*#__PURE__*/ da(iu, [["__scopeId", "data-v-d204f573"]]), su = {
7030
7186
  key: 0,
7031
7187
  class: "tpl-design-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
7032
- }, ru = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, iu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, au = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, ou = {
7188
+ }, cu = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, lu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, uu = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, du = {
7033
7189
  key: 0,
7034
7190
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
7035
- }, su = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, cu = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, lu = {
7191
+ }, fu = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, pu = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, mu = {
7036
7192
  key: 1,
7037
7193
  class: "tpl:flex tpl:flex-col tpl:gap-4"
7038
- }, uu = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, du = {
7194
+ }, hu = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, gu = {
7039
7195
  key: 0,
7040
7196
  class: "tpl:flex tpl:flex-col tpl:gap-2"
7041
- }, fu = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, pu = ["src", "alt"], mu = {
7197
+ }, _u = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, vu = ["src", "alt"], yu = {
7042
7198
  key: 1,
7043
7199
  class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
7044
- }, hu = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, gu = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, _u = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, vu = ["accept"], yu = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, bu = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, xu = ["placeholder"], Su = {
7200
+ }, bu = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, xu = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Su = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Cu = ["accept"], wu = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Tu = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Eu = ["placeholder"], Du = {
7045
7201
  key: 0,
7046
7202
  class: "tpl:flex tpl:flex-col tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:px-3 tpl:py-3 tpl:bg-[var(--tpl-warning-light)] tpl:border tpl:border-[var(--tpl-warning)]"
7047
- }, Cu = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, wu = { class: "tpl:flex tpl:gap-2" }, Tu = {
7203
+ }, Ou = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, ku = { class: "tpl:flex tpl:gap-2" }, Au = {
7048
7204
  key: 1,
7049
7205
  class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
7050
- }, Eu = ["disabled"], Du = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Ou = /*@__PURE__*/ B({
7206
+ }, ju = ["disabled"], Mu = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Nu = /*@__PURE__*/ B({
7051
7207
  __name: "DesignReferenceSidebar",
7052
7208
  props: {
7053
7209
  visible: { type: Boolean },
@@ -7055,8 +7211,8 @@ var Kc = {
7055
7211
  },
7056
7212
  emits: ["close", "apply"],
7057
7213
  setup(e, { emit: t }) {
7058
- let n = e, r = t, { t: i } = _a(), a = J(Bn, "DesignReferenceSidebar"), o = Ys({
7059
- authManager: J(vr, "DesignReferenceSidebar"),
7214
+ let n = e, r = t, { t: i } = xa(), a = J(Un, "DesignReferenceSidebar"), o = ec({
7215
+ authManager: J(Sr, "DesignReferenceSidebar"),
7060
7216
  getTemplateId: () => a.state.template?.id ?? null,
7061
7217
  onApply: (e) => r("apply", e)
7062
7218
  }), s = C(null), l = C("image"), u = C(null), d = C(""), p = C(null), m = C(!1), h = C(!1), g = O(() => !o.isGenerating.value && u.value !== null);
@@ -7127,17 +7283,17 @@ var Kc = {
7127
7283
  "leave-from-class": "tpl:translate-x-0",
7128
7284
  "leave-to-class": "tpl:translate-x-full"
7129
7285
  }, {
7130
- default: b(() => [e.visible ? (f(), k("div", nu, [I("div", ru, [I("div", iu, [V(j(Pi), {
7286
+ default: b(() => [e.visible ? (f(), k("div", su, [I("div", cu, [I("div", lu, [V(j(Ri), {
7131
7287
  size: 13,
7132
7288
  "stroke-width": 2
7133
7289
  }), I("span", null, D(j(i).designReference.title), 1)]), I("button", {
7134
7290
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
7135
7291
  onClick: n[0] ||= (e) => r("close")
7136
- }, [V(j(na), {
7292
+ }, [V(j(oa), {
7137
7293
  size: 14,
7138
7294
  "stroke-width": 2
7139
- })])]), I("div", au, [j(o).isGenerating.value ? (f(), k("div", ou, [I("div", su, [V(da), I("p", cu, D(j(i).designReference.generating), 1)])])) : (f(), k("div", lu, [
7140
- I("div", uu, [I("button", {
7295
+ })])]), I("div", uu, [j(o).isGenerating.value ? (f(), k("div", du, [I("div", fu, [V(ha), I("p", pu, D(j(i).designReference.generating), 1)])])) : (f(), k("div", mu, [
7296
+ I("div", hu, [I("button", {
7141
7297
  class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
7142
7298
  style: L({
7143
7299
  backgroundColor: l.value === "image" ? "var(--tpl-bg)" : "transparent",
@@ -7145,7 +7301,7 @@ var Kc = {
7145
7301
  boxShadow: l.value === "image" ? "var(--tpl-shadow)" : "none"
7146
7302
  }),
7147
7303
  onClick: n[1] ||= (e) => _("image")
7148
- }, [V(j(Ai), {
7304
+ }, [V(j(Pi), {
7149
7305
  size: 12,
7150
7306
  "stroke-width": 2
7151
7307
  }), z(" " + D(j(i).designReference.uploadImage), 1)], 4), I("button", {
@@ -7156,23 +7312,23 @@ var Kc = {
7156
7312
  boxShadow: l.value === "pdf" ? "var(--tpl-shadow)" : "none"
7157
7313
  }),
7158
7314
  onClick: n[2] ||= (e) => _("pdf")
7159
- }, [V(j(ji), {
7315
+ }, [V(j(Fi), {
7160
7316
  size: 12,
7161
7317
  "stroke-width": 2
7162
7318
  }), z(" " + D(j(i).designReference.uploadPdf), 1)], 4)]),
7163
- I("div", null, [u.value ? (f(), k("div", du, [I("div", fu, [p.value ? (f(), k("img", {
7319
+ I("div", null, [u.value ? (f(), k("div", gu, [I("div", _u, [p.value ? (f(), k("img", {
7164
7320
  key: 0,
7165
7321
  src: p.value,
7166
7322
  alt: u.value.name,
7167
7323
  class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
7168
- }, null, 8, pu)) : (f(), k("div", mu, [V(j(ji), {
7324
+ }, null, 8, vu)) : (f(), k("div", yu, [V(j(Fi), {
7169
7325
  size: 32,
7170
7326
  "stroke-width": 1.5,
7171
7327
  class: "tpl:text-[var(--tpl-text-dim)]"
7172
- }), I("span", hu, D(u.value.name), 1)])), I("button", {
7328
+ }), I("span", bu, D(u.value.name), 1)])), I("button", {
7173
7329
  class: "tpl:absolute tpl:top-2 tpl:right-2 tpl:rounded-full tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow)]",
7174
7330
  onClick: x
7175
- }, [V(j(na), {
7331
+ }, [V(j(oa), {
7176
7332
  size: 12,
7177
7333
  "stroke-width": 2
7178
7334
  })])])])) : (f(), k("div", {
@@ -7187,13 +7343,13 @@ var Kc = {
7187
7343
  onDragleave: w,
7188
7344
  onDrop: T
7189
7345
  }, [
7190
- V(j(ea), {
7346
+ V(j(ia), {
7191
7347
  size: 24,
7192
7348
  "stroke-width": 1.5,
7193
7349
  class: "tpl:text-[var(--tpl-text-dim)]"
7194
7350
  }),
7195
- I("span", gu, D(j(i).designReference.dropHint), 1),
7196
- I("span", _u, D(l.value === "image" ? j(i).designReference.acceptedImages : j(i).designReference.acceptedPdf), 1)
7351
+ I("span", xu, D(j(i).designReference.dropHint), 1),
7352
+ I("span", Su, D(l.value === "image" ? j(i).designReference.acceptedImages : j(i).designReference.acceptedPdf), 1)
7197
7353
  ], 36)), I("input", {
7198
7354
  ref_key: "fileInput",
7199
7355
  ref: s,
@@ -7201,14 +7357,14 @@ var Kc = {
7201
7357
  class: "tpl:hidden",
7202
7358
  accept: l.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
7203
7359
  onChange: v
7204
- }, null, 40, vu)]),
7205
- I("div", yu, [I("label", bu, D(j(i).designReference.promptLabel), 1), c(I("textarea", {
7360
+ }, null, 40, Cu)]),
7361
+ I("div", wu, [I("label", Tu, D(j(i).designReference.promptLabel), 1), c(I("textarea", {
7206
7362
  "onUpdate:modelValue": n[4] ||= (e) => d.value = e,
7207
7363
  class: F(["tpl:min-h-[72px] tpl:w-full tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:font-sans tpl:text-sm tpl:outline-none tpl:transition-colors tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", ["tpl-design-prompt-input"]]),
7208
7364
  placeholder: j(i).designReference.promptPlaceholder,
7209
7365
  rows: "3"
7210
- }, null, 8, xu), [[ae, d.value]])]),
7211
- m.value ? (f(), k("div", Su, [I("p", Cu, D(j(i).designReference.replaceWarning), 1), I("div", wu, [I("button", {
7366
+ }, null, 8, Eu), [[ae, d.value]])]),
7367
+ m.value ? (f(), k("div", Du, [I("p", Ou, D(j(i).designReference.replaceWarning), 1), I("div", ku, [I("button", {
7212
7368
  class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
7213
7369
  style: { "background-color": "transparent" },
7214
7370
  onClick: ee
@@ -7216,7 +7372,7 @@ var Kc = {
7216
7372
  class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
7217
7373
  onClick: E
7218
7374
  }, D(j(i).designReference.replaceConfirm), 1)])])) : A("", !0),
7219
- j(o).error.value ? (f(), k("div", Tu, [V(j(Ci), {
7375
+ j(o).error.value ? (f(), k("div", Au, [V(j(Di), {
7220
7376
  size: 14,
7221
7377
  "stroke-width": 2,
7222
7378
  class: "tpl:mt-0.5 tpl:shrink-0"
@@ -7226,35 +7382,35 @@ var Kc = {
7226
7382
  class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
7227
7383
  disabled: !g.value,
7228
7384
  onClick: E
7229
- }, [V(j(Pi), {
7385
+ }, [V(j(Ri), {
7230
7386
  size: 16,
7231
7387
  "stroke-width": 2
7232
- }), z(" " + D(j(i).designReference.generate), 1)], 8, Eu)),
7233
- I("p", Du, D(j(i).aiMenu.disclaimer), 1)
7388
+ }), z(" " + D(j(i).designReference.generate), 1)], 8, ju)),
7389
+ I("p", Mu, D(j(i).aiMenu.disclaimer), 1)
7234
7390
  ]))])])) : A("", !0)]),
7235
7391
  _: 1
7236
7392
  }));
7237
7393
  }
7238
- }), ku = /* @__PURE__ */ e({ default: () => Au }), Au = /*#__PURE__*/ sa(Ou, [["__scopeId", "data-v-bdbf8d0d"]]), ju = ["disabled", "title"], Mu = ["title"], Nu = {
7394
+ }), Pu = /* @__PURE__ */ e({ default: () => Fu }), Fu = /*#__PURE__*/ da(Nu, [["__scopeId", "data-v-bdbf8d0d"]]), Iu = ["disabled", "title"], Lu = ["title"], Ru = {
7239
7395
  key: 0,
7240
7396
  class: "tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]",
7241
7397
  style: {
7242
7398
  "backdrop-filter": "blur(8px)",
7243
7399
  "-webkit-backdrop-filter": "blur(8px)"
7244
7400
  }
7245
- }, Pu = { class: "tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]" }, Fu = {
7401
+ }, zu = { class: "tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]" }, Bu = {
7246
7402
  key: 0,
7247
7403
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
7248
- }, Iu = {
7404
+ }, Vu = {
7249
7405
  key: 1,
7250
7406
  class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
7251
- }, Lu = {
7407
+ }, Hu = {
7252
7408
  key: 2,
7253
7409
  class: "tpl:max-h-64 tpl:overflow-y-auto"
7254
- }, Ru = ["disabled", "onClick"], zu = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, Bu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Vu = {
7410
+ }, Uu = ["disabled", "onClick"], Wu = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, Gu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ku = {
7255
7411
  key: 0,
7256
7412
  class: "tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-[10px] tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]"
7257
- }, Hu = ["disabled", "title"], Uu = /*@__PURE__*/ B({
7413
+ }, qu = ["disabled", "title"], Ju = /*@__PURE__*/ B({
7258
7414
  __name: "SnapshotHistory",
7259
7415
  props: {
7260
7416
  snapshots: {},
@@ -7263,7 +7419,7 @@ var Kc = {
7263
7419
  },
7264
7420
  emits: ["load", "navigate"],
7265
7421
  setup(e, { emit: t }) {
7266
- let n = e, r = t, { format: i } = Y(), { t: a } = _a(), o = C(!1), s = C(null), c = C(-1);
7422
+ let n = e, r = t, { format: i } = Y(), { t: a } = xa(), o = C(!1), s = C(null), c = C(-1);
7267
7423
  H(() => n.snapshots.length, () => {
7268
7424
  c.value = -1;
7269
7425
  });
@@ -7282,7 +7438,7 @@ var Kc = {
7282
7438
  t !== -1 && (c.value = t, r("navigate", n.snapshots[t])), o.value = !1;
7283
7439
  }
7284
7440
  function _(e) {
7285
- let t = Gc(e, a.snapshotHistory, i, 7);
7441
+ let t = Xc(e, a.snapshotHistory, i, 7);
7286
7442
  return t === null ? new Date(e).toLocaleDateString(void 0, {
7287
7443
  month: "short",
7288
7444
  day: "numeric",
@@ -7290,7 +7446,7 @@ var Kc = {
7290
7446
  minute: "2-digit"
7291
7447
  }) : t;
7292
7448
  }
7293
- return yn(s, () => {
7449
+ return Sn(s, () => {
7294
7450
  o.value = !1;
7295
7451
  }), (t, n) => (f(), k("div", {
7296
7452
  ref_key: "dropdownRef",
@@ -7302,34 +7458,34 @@ var Kc = {
7302
7458
  disabled: !u.value,
7303
7459
  title: j(a).snapshotHistory.olderSnapshot,
7304
7460
  onClick: M(p, ["stop"])
7305
- }, [V(j(bi), {
7461
+ }, [V(j(wi), {
7306
7462
  size: 14,
7307
7463
  "stroke-width": 2
7308
- })], 8, ju),
7464
+ })], 8, Iu),
7309
7465
  I("button", {
7310
7466
  class: "tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
7311
7467
  title: j(a).snapshotHistory.tooltip,
7312
7468
  onClick: M(m, ["stop"])
7313
- }, [V(j(Ti), {
7469
+ }, [V(j(ki), {
7314
7470
  size: 16,
7315
7471
  "stroke-width": 1.5
7316
- }), V(j(yi), {
7472
+ }), V(j(Ci), {
7317
7473
  class: F(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": o.value }]),
7318
7474
  size: 10,
7319
7475
  "stroke-width": 2
7320
- }, null, 8, ["class"])], 8, Mu),
7476
+ }, null, 8, ["class"])], 8, Lu),
7321
7477
  V(ie, { name: "tpl-dropdown" }, {
7322
- default: b(() => [o.value ? (f(), k("div", Nu, [I("div", Pu, D(j(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), k("div", Fu, [V(j(Li), {
7478
+ default: b(() => [o.value ? (f(), k("div", Ru, [I("div", zu, D(j(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), k("div", Bu, [V(j(Vi), {
7323
7479
  class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
7324
7480
  size: 20,
7325
7481
  "stroke-width": 2
7326
- })])) : e.snapshots.length === 0 ? (f(), k("div", Iu, D(j(a).snapshotHistory.noSnapshots), 1)) : (f(), k("div", Lu, [(f(!0), k(R, null, h(e.snapshots, (t) => (f(), k("button", {
7482
+ })])) : e.snapshots.length === 0 ? (f(), k("div", Vu, D(j(a).snapshotHistory.noSnapshots), 1)) : (f(), k("div", Hu, [(f(!0), k(R, null, h(e.snapshots, (t) => (f(), k("button", {
7327
7483
  key: t.id,
7328
7484
  class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-b tpl:border-b-[var(--tpl-border-light)] tpl:border-l-2 tpl:border-l-transparent tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:duration-150 last:tpl:border-b-0 hover:tpl:border-l-[var(--tpl-primary)] hover:tpl:bg-[var(--tpl-bg-hover)]",
7329
7485
  style: { "background-color": "transparent" },
7330
7486
  disabled: e.isRestoring,
7331
7487
  onClick: (e) => g(t.id)
7332
- }, [I("div", zu, [I("div", Bu, [I("span", null, D(_(t.created_at)), 1), t.is_autosave ? (f(), k("span", Vu, D(j(a).snapshotHistory.auto), 1)) : A("", !0)])])], 8, Ru))), 128))]))])) : A("", !0)]),
7488
+ }, [I("div", Wu, [I("div", Gu, [I("span", null, D(_(t.created_at)), 1), t.is_autosave ? (f(), k("span", Ku, D(j(a).snapshotHistory.auto), 1)) : A("", !0)])])], 8, Uu))), 128))]))])) : A("", !0)]),
7333
7489
  _: 1
7334
7490
  }),
7335
7491
  I("button", {
@@ -7337,74 +7493,74 @@ var Kc = {
7337
7493
  disabled: !l.value,
7338
7494
  title: j(a).snapshotHistory.newerSnapshot,
7339
7495
  onClick: M(d, ["stop"])
7340
- }, [V(j(xi), {
7496
+ }, [V(j(Ti), {
7341
7497
  size: 14,
7342
7498
  "stroke-width": 2
7343
- })], 8, Hu)
7499
+ })], 8, qu)
7344
7500
  ], 512));
7345
7501
  }
7346
- }), Wu = /* @__PURE__ */ e({ default: () => Gu }), Gu = Uu;
7502
+ }), Yu = /* @__PURE__ */ e({ default: () => Xu }), Xu = Ju;
7347
7503
  //#endregion
7348
7504
  //#region src/cloud/utils/scoringStyles.ts
7349
- function Ku(e) {
7505
+ function Zu(e) {
7350
7506
  return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
7351
7507
  }
7352
- function qu(e) {
7508
+ function Qu(e) {
7353
7509
  return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
7354
7510
  }
7355
- function Ju(e) {
7511
+ function $u(e) {
7356
7512
  return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
7357
7513
  }
7358
- function Yu(e) {
7514
+ function ed(e) {
7359
7515
  return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
7360
7516
  }
7361
7517
  //#endregion
7362
7518
  //#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
7363
- var Xu = {
7519
+ var td = {
7364
7520
  key: 0,
7365
7521
  class: "tpl-scoring-panel tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
7366
- }, Zu = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Qu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, $u = { class: "tpl:flex tpl:items-center tpl:gap-1" }, ed = ["title"], td = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, nd = {
7522
+ }, nd = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, rd = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, id = { class: "tpl:flex tpl:items-center tpl:gap-1" }, ad = ["title"], od = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, sd = {
7367
7523
  key: 0,
7368
7524
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
7369
- }, rd = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, id = {
7525
+ }, cd = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ld = {
7370
7526
  key: 1,
7371
7527
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
7372
- }, ad = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, od = {
7528
+ }, ud = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, dd = {
7373
7529
  key: 2,
7374
7530
  class: "tpl:flex tpl:flex-col tpl:gap-4"
7375
- }, sd = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, cd = {
7531
+ }, fd = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, pd = {
7376
7532
  key: 0,
7377
7533
  class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
7378
- }, ld = {
7534
+ }, md = {
7379
7535
  key: 0,
7380
7536
  class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
7381
- }, ud = ["onClick"], dd = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, fd = {
7537
+ }, hd = ["onClick"], gd = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, _d = {
7382
7538
  key: 0,
7383
7539
  class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
7384
- }, pd = {
7540
+ }, vd = {
7385
7541
  key: 0,
7386
7542
  class: "tpl:border-t tpl:border-[var(--tpl-border)]"
7387
- }, md = {
7543
+ }, yd = {
7388
7544
  key: 0,
7389
7545
  class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
7390
- }, hd = { class: "tpl:flex tpl:items-start tpl:gap-2" }, gd = { class: "tpl:flex-1 tpl:min-w-0" }, _d = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, vd = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, yd = {
7546
+ }, bd = { class: "tpl:flex tpl:items-start tpl:gap-2" }, xd = { class: "tpl:flex-1 tpl:min-w-0" }, Sd = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, Cd = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, wd = {
7391
7547
  key: 0,
7392
7548
  class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
7393
- }, bd = {
7549
+ }, Td = {
7394
7550
  key: 1,
7395
7551
  class: "tpl:mt-2 tpl:flex tpl:justify-center"
7396
- }, xd = ["disabled", "onClick"], Sd = {
7552
+ }, Ed = ["disabled", "onClick"], Dd = {
7397
7553
  key: 0,
7398
7554
  class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
7399
- }, Cd = {
7555
+ }, Od = {
7400
7556
  key: 3,
7401
7557
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
7402
- }, wd = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Td = { class: "tpl:m-0 tpl:px-4 tpl:pb-2 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Ed = /*@__PURE__*/ B({
7558
+ }, kd = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ad = { class: "tpl:m-0 tpl:px-4 tpl:pb-2 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, jd = /*@__PURE__*/ B({
7403
7559
  __name: "TemplateScoringPanel",
7404
7560
  props: { visible: { type: Boolean } },
7405
7561
  emits: ["close"],
7406
7562
  setup(e, { emit: t }) {
7407
- let n = e, r = t, { t: i } = _a(), a = J(Bn, "TemplateScoringPanel"), o = J(Sr, "TemplateScoringPanel"), s = v(er, []), c = C({
7563
+ let n = e, r = t, { t: i } = xa(), a = J(Un, "TemplateScoringPanel"), o = J(Tr, "TemplateScoringPanel"), s = v(rr, []), c = C({
7408
7564
  spam: !0,
7409
7565
  readability: !0,
7410
7566
  accessibility: !0,
@@ -7419,10 +7575,10 @@ var Xu = {
7419
7575
  "accessibility",
7420
7576
  "bestPractices"
7421
7577
  ], p = {
7422
- spam: Ji,
7423
- readability: ki,
7424
- accessibility: Yi,
7425
- bestPractices: ra
7578
+ spam: Qi,
7579
+ readability: Ni,
7580
+ accessibility: $i,
7581
+ bestPractices: sa
7426
7582
  };
7427
7583
  function m() {
7428
7584
  o.score(a.content.value, s);
@@ -7450,50 +7606,50 @@ var Xu = {
7450
7606
  "leave-from-class": "tpl:translate-x-0",
7451
7607
  "leave-to-class": "tpl:translate-x-full"
7452
7608
  }, {
7453
- default: b(() => [e.visible ? (f(), k("div", Xu, [I("div", Zu, [I("div", Qu, [V(j(qi), {
7609
+ default: b(() => [e.visible ? (f(), k("div", td, [I("div", nd, [I("div", rd, [V(j(Zi), {
7454
7610
  size: 13,
7455
7611
  "stroke-width": 2
7456
- }), I("span", null, D(j(i).scoring.title), 1)]), I("div", $u, [j(o).scoringResult.value && !j(o).isScoring.value ? (f(), k("button", {
7612
+ }), I("span", null, D(j(i).scoring.title), 1)]), I("div", id, [j(o).scoringResult.value && !j(o).isScoring.value ? (f(), k("button", {
7457
7613
  key: 0,
7458
7614
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
7459
7615
  title: j(i).scoring.rescore,
7460
7616
  onClick: n[0] ||= (e) => m()
7461
- }, [V(j(Ui), {
7617
+ }, [V(j(qi), {
7462
7618
  size: 14,
7463
7619
  "stroke-width": 2
7464
- })], 8, ed)) : A("", !0), I("button", {
7620
+ })], 8, ad)) : A("", !0), I("button", {
7465
7621
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
7466
7622
  onClick: n[1] ||= (e) => r("close")
7467
- }, [V(j(na), {
7623
+ }, [V(j(oa), {
7468
7624
  size: 14,
7469
7625
  "stroke-width": 2
7470
- })])])]), I("div", td, [j(o).isScoring.value ? (f(), k("div", nd, [I("p", rd, D(j(i).scoring.scoring), 1), V(da, { class: "tpl:w-3/4" })])) : j(o).error.value && !j(o).scoringResult.value ? (f(), k("div", id, [
7471
- V(j(Ci), {
7626
+ })])])]), I("div", od, [j(o).isScoring.value ? (f(), k("div", sd, [I("p", cd, D(j(i).scoring.scoring), 1), V(ha, { class: "tpl:w-3/4" })])) : j(o).error.value && !j(o).scoringResult.value ? (f(), k("div", ld, [
7627
+ V(j(Di), {
7472
7628
  size: 32,
7473
7629
  "stroke-width": 1.5,
7474
7630
  class: "tpl:text-[var(--tpl-danger)]"
7475
7631
  }),
7476
- I("p", ad, D(j(i).scoring.error), 1),
7632
+ I("p", ud, D(j(i).scoring.error), 1),
7477
7633
  I("button", {
7478
7634
  class: "tpl:mt-2 tpl:inline-flex tpl:items-center tpl:gap-1.5 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:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-muted)]",
7479
7635
  onClick: n[2] ||= (e) => m()
7480
- }, [V(j(Ui), {
7636
+ }, [V(j(qi), {
7481
7637
  size: 12,
7482
7638
  "stroke-width": 2
7483
7639
  }), z(" " + D(j(i).scoring.rescore), 1)])
7484
- ])) : j(o).scoringResult.value ? (f(), k("div", od, [
7640
+ ])) : j(o).scoringResult.value ? (f(), k("div", dd, [
7485
7641
  I("div", {
7486
7642
  class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
7487
- style: L({ backgroundColor: j(qu)(j(o).scoringResult.value.score) })
7643
+ style: L({ backgroundColor: j(Qu)(j(o).scoringResult.value.score) })
7488
7644
  }, [
7489
7645
  I("span", {
7490
7646
  class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
7491
- style: L({ color: j(Ku)(j(o).scoringResult.value.score) })
7647
+ style: L({ color: j(Zu)(j(o).scoringResult.value.score) })
7492
7648
  }, D(j(o).scoringResult.value.score), 5),
7493
- I("span", sd, D(j(i).scoring.overallScore), 1),
7494
- _() > 0 ? (f(), k("span", cd, D(_()) + " " + D(j(i).scoring.findings), 1)) : A("", !0)
7649
+ I("span", fd, D(j(i).scoring.overallScore), 1),
7650
+ _() > 0 ? (f(), k("span", pd, D(_()) + " " + D(j(i).scoring.findings), 1)) : A("", !0)
7495
7651
  ], 4),
7496
- j(o).fixError.value ? (f(), k("div", ld, [V(j(Ci), {
7652
+ j(o).fixError.value ? (f(), k("div", md, [V(j(Di), {
7497
7653
  size: 14,
7498
7654
  "stroke-width": 2,
7499
7655
  class: "tpl:mt-0.5 tpl:shrink-0"
@@ -7508,74 +7664,74 @@ var Xu = {
7508
7664
  (f(), N(d(p[e]), {
7509
7665
  size: 14,
7510
7666
  "stroke-width": 2,
7511
- style: L({ color: j(Ku)(j(o).scoringResult.value.categories[e].score) })
7667
+ style: L({ color: j(Zu)(j(o).scoringResult.value.categories[e].score) })
7512
7668
  }, null, 8, ["style"])),
7513
- I("span", dd, D(j(i).scoring.categories[e]), 1),
7669
+ I("span", gd, D(j(i).scoring.categories[e]), 1),
7514
7670
  I("span", {
7515
7671
  class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
7516
7672
  style: L({
7517
- color: j(Ku)(j(o).scoringResult.value.categories[e].score),
7518
- backgroundColor: j(qu)(j(o).scoringResult.value.categories[e].score)
7673
+ color: j(Zu)(j(o).scoringResult.value.categories[e].score),
7674
+ backgroundColor: j(Qu)(j(o).scoringResult.value.categories[e].score)
7519
7675
  })
7520
7676
  }, D(j(o).scoringResult.value.categories[e].score), 5),
7521
- j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span", fd, D(j(o).scoringResult.value.categories[e].findings.length), 1)) : A("", !0),
7522
- V(j(yi), {
7677
+ j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span", _d, D(j(o).scoringResult.value.categories[e].findings.length), 1)) : A("", !0),
7678
+ V(j(Ci), {
7523
7679
  size: 12,
7524
7680
  "stroke-width": 2,
7525
7681
  class: F(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", c.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
7526
7682
  }, null, 8, ["class"])
7527
- ], 8, ud), c.value[e] ? (f(), k("div", pd, [j(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), k("div", md, D(j(i).scoring.noFindings), 1)) : A("", !0), (f(!0), k(R, null, h(j(o).scoringResult.value.categories[e].findings, (e) => (f(), k("div", {
7683
+ ], 8, hd), c.value[e] ? (f(), k("div", vd, [j(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), k("div", yd, D(j(i).scoring.noFindings), 1)) : A("", !0), (f(!0), k(R, null, h(j(o).scoringResult.value.categories[e].findings, (e) => (f(), k("div", {
7528
7684
  key: e.id,
7529
7685
  class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
7530
- }, [I("div", hd, [(f(), N(d(j(e.severity === "high" ? Ci : e.severity === "medium" ? Qi : Ii)), {
7686
+ }, [I("div", bd, [(f(), N(d(j(e.severity === "high" ? Di : e.severity === "medium" ? na : Bi)), {
7531
7687
  size: 13,
7532
7688
  "stroke-width": 2,
7533
7689
  class: "tpl:mt-0.5 tpl:shrink-0",
7534
- style: L({ color: j(Ju)(e.severity) })
7535
- }, null, 8, ["style"])), I("div", gd, [
7536
- I("div", _d, [I("span", {
7690
+ style: L({ color: j($u)(e.severity) })
7691
+ }, null, 8, ["style"])), I("div", xd, [
7692
+ I("div", Sd, [I("span", {
7537
7693
  class: "tpl:mt-0.5 tpl:shrink-0 tpl:rounded tpl:px-1 tpl:py-px tpl:text-[10px] tpl:font-medium tpl:leading-tight",
7538
7694
  style: L({
7539
- color: j(Ju)(e.severity),
7540
- backgroundColor: j(Yu)(e.severity)
7695
+ color: j($u)(e.severity),
7696
+ backgroundColor: j(ed)(e.severity)
7541
7697
  })
7542
- }, D(j(i).scoring.severity[e.severity]), 5), I("span", vd, D(e.message), 1)]),
7543
- e.suggestion ? (f(), k("p", yd, D(e.suggestion), 1)) : A("", !0),
7544
- e.blockId ? (f(), k("div", bd, [I("button", {
7698
+ }, D(j(i).scoring.severity[e.severity]), 5), I("span", Cd, D(e.message), 1)]),
7699
+ e.suggestion ? (f(), k("p", wd, D(e.suggestion), 1)) : A("", !0),
7700
+ e.blockId ? (f(), k("div", Td, [I("button", {
7545
7701
  class: "tpl-scoring-fix-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded tpl:border tpl:px-3 tpl:py-1.5 tpl:text-[11px] tpl:font-medium tpl:transition-all tpl:duration-150 tpl:disabled:opacity-50 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)]",
7546
7702
  style: { "background-color": "transparent" },
7547
7703
  disabled: j(o).fixingFindingId.value !== null,
7548
7704
  onClick: (t) => g(e)
7549
- }, [j(o).fixingFindingId.value === e.id ? (f(), N(j(Li), {
7705
+ }, [j(o).fixingFindingId.value === e.id ? (f(), N(j(Vi), {
7550
7706
  key: 0,
7551
7707
  class: "tpl-spinner",
7552
7708
  size: 11,
7553
7709
  "stroke-width": 2
7554
- })) : (f(), N(j(Yi), {
7710
+ })) : (f(), N(j($i), {
7555
7711
  key: 1,
7556
7712
  size: 11,
7557
7713
  "stroke-width": 2
7558
- })), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8, xd), j(o).fixError.value ? (f(), k("p", Sd, D(j(o).fixError.value), 1)) : A("", !0)])) : A("", !0)
7714
+ })), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8, Ed), j(o).fixError.value ? (f(), k("p", Dd, D(j(o).fixError.value), 1)) : A("", !0)])) : A("", !0)
7559
7715
  ])])]))), 128))])) : A("", !0)])), 64))
7560
- ])) : (f(), k("div", Cd, [V(j(qi), {
7716
+ ])) : (f(), k("div", Od, [V(j(Zi), {
7561
7717
  size: 32,
7562
7718
  "stroke-width": 1.5,
7563
7719
  class: "tpl:text-[var(--tpl-text-dim)]"
7564
- }), I("p", wd, D(j(i).scoring.emptyState), 1)])), I("p", Td, D(j(i).aiMenu.disclaimer), 1)])])) : A("", !0)]),
7720
+ }), I("p", kd, D(j(i).scoring.emptyState), 1)])), I("p", Ad, D(j(i).aiMenu.disclaimer), 1)])])) : A("", !0)]),
7565
7721
  _: 1
7566
7722
  }));
7567
7723
  }
7568
- }), Dd = /* @__PURE__ */ e({ default: () => Od }), Od = /*#__PURE__*/ sa(Ed, [["__scopeId", "data-v-c23c73d4"]]), kd = ["aria-busy"], Ad = {
7724
+ }), Md = /* @__PURE__ */ e({ default: () => Nd }), Nd = /*#__PURE__*/ da(jd, [["__scopeId", "data-v-c23c73d4"]]), Pd = ["aria-busy"], Fd = {
7569
7725
  id: "tpl-test-email-title",
7570
7726
  class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
7571
- }, jd = { class: "tpl:mb-3" }, Md = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Nd = ["value"], Pd = ["disabled"], Fd = ["value"], Id = {
7727
+ }, Id = { class: "tpl:mb-3" }, Ld = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Rd = ["value"], zd = ["disabled"], Bd = ["value"], Vd = {
7572
7728
  key: 0,
7573
7729
  role: "alert",
7574
7730
  class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
7575
- }, Ld = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Rd = ["disabled"], zd = ["disabled"], Bd = {
7731
+ }, Hd = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Ud = ["disabled"], Wd = ["disabled"], Gd = {
7576
7732
  key: 0,
7577
7733
  class: "tpl:flex tpl:items-center tpl:gap-1.5"
7578
- }, Vd = { key: 1 }, Hd = /*@__PURE__*/ B({
7734
+ }, Kd = { key: 1 }, qd = /*@__PURE__*/ B({
7579
7735
  __name: "TestEmailModal",
7580
7736
  props: {
7581
7737
  visible: { type: Boolean },
@@ -7585,7 +7741,7 @@ var Xu = {
7585
7741
  },
7586
7742
  emits: ["send", "close"],
7587
7743
  setup(e, { emit: t }) {
7588
- let n = e, r = t, { t: i } = _a(), a = C("");
7744
+ let n = e, r = t, { t: i } = xa(), a = C("");
7589
7745
  H(() => n.visible, (e) => {
7590
7746
  e && (a.value = n.allowedEmails[0] ?? "");
7591
7747
  });
@@ -7598,7 +7754,7 @@ var Xu = {
7598
7754
  function l(e) {
7599
7755
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), o()), e.key === "Escape" && s();
7600
7756
  }
7601
- return (t, n) => (f(), N(As, {
7757
+ return (t, n) => (f(), N(Fs, {
7602
7758
  visible: e.visible,
7603
7759
  onClose: s,
7604
7760
  onKeydown: l
@@ -7614,14 +7770,14 @@ var Xu = {
7614
7770
  "box-shadow": "var(--tpl-shadow-xl)"
7615
7771
  }
7616
7772
  }, [
7617
- I("h3", Ad, D(j(i).testEmail.title), 1),
7618
- I("div", jd, [I("label", Md, D(j(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), k("input", {
7773
+ I("h3", Fd, D(j(i).testEmail.title), 1),
7774
+ I("div", Id, [I("label", Ld, D(j(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), k("input", {
7619
7775
  key: 0,
7620
7776
  type: "text",
7621
7777
  value: a.value,
7622
7778
  disabled: "",
7623
7779
  class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:opacity-70 tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
7624
- }, null, 8, Nd)) : c((f(), k("select", {
7780
+ }, null, 8, Rd)) : c((f(), k("select", {
7625
7781
  key: 1,
7626
7782
  "onUpdate:modelValue": n[0] ||= (e) => a.value = e,
7627
7783
  class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
@@ -7629,29 +7785,29 @@ var Xu = {
7629
7785
  }, [(f(!0), k(R, null, h(e.allowedEmails, (e) => (f(), k("option", {
7630
7786
  key: e,
7631
7787
  value: e
7632
- }, D(e), 9, Fd))), 128))], 8, Pd)), [[w, a.value]])]),
7633
- e.error ? (f(), k("p", Id, D(e.error), 1)) : A("", !0),
7634
- I("div", Ld, [I("button", {
7788
+ }, D(e), 9, Bd))), 128))], 8, zd)), [[w, a.value]])]),
7789
+ e.error ? (f(), k("p", Vd, D(e.error), 1)) : A("", !0),
7790
+ I("div", Hd, [I("button", {
7635
7791
  type: "button",
7636
7792
  class: F(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", { "tpl:cursor-not-allowed tpl:opacity-50": e.isSending }]),
7637
7793
  disabled: e.isSending,
7638
7794
  onClick: s
7639
- }, D(j(i).testEmail.cancel), 11, Rd), I("button", {
7795
+ }, D(j(i).testEmail.cancel), 11, Ud), I("button", {
7640
7796
  type: "button",
7641
7797
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
7642
7798
  disabled: !a.value || e.isSending,
7643
7799
  onClick: o
7644
- }, [e.isSending ? (f(), k("span", Bd, [V(j(Li), {
7800
+ }, [e.isSending ? (f(), k("span", Gd, [V(j(Vi), {
7645
7801
  class: "tpl:animate-spin",
7646
7802
  size: 12,
7647
7803
  "stroke-width": 2
7648
- }), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span", Vd, D(j(i).testEmail.send), 1))], 8, zd)])
7649
- ], 8, kd)]),
7804
+ }), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span", Kd, D(j(i).testEmail.send), 1))], 8, Wd)])
7805
+ ], 8, Pd)]),
7650
7806
  _: 1
7651
7807
  }, 8, ["visible"]));
7652
7808
  }
7653
- }), Ud = /* @__PURE__ */ e({ default: () => Wd }), Wd = Hd;
7809
+ }), Jd = /* @__PURE__ */ e({ default: () => Yd }), Yd = qd;
7654
7810
  //#endregion
7655
- export { Ea as $, ge as $n, Un as $t, Es as A, St as An, Ti as At, ko as B, W as Bn, Gr as Bt, Rs as C, sn as Cn, Ii as Ct, Ms as D, Rt as Dn, Oi as Dt, js as E, dn as En, ki as Et, Zo as F, Ct as Fn, X as Ft, to as G, we as Gn, fr as Gt, yo as H, ye as Hn, Ar as Ht, qo as I, dt as In, oi as It, Ka as J, _e as Jn, Jn as Jt, $a as K, ve as Kn, vr as Kt, Go as L, ut as Ln, Qr as Lt, us as M, bt as Mn, xi as Mt, ss as N, gt as Nn, yi as Nt, As as O, kt as On, Di as Ot, es as P, ht as Pn, vi as Pt, ja as Q, Ee as Qn, br as Qt, jo as R, lt as Rn, Yr as Rt, zs as S, jn as Sn, Li as St, Z as T, un as Tn, Pi as Tt, vo as U, De as Un, Y as Ut, bo as V, Ge as Vn, Lr as Vt, mo as W, be as Wn, yr as Wt, Fa as X, Se as Xn, Cr as Xt, Wa as Y, he as Yn, pr as Yt, Na as Z, Ce as Zn, Qn as Zt, Zs as _, yn as _n, Gi as _t, eu as a, sr as an, _a as at, qs as b, q as bn, zi as bt, mc as c, lr as cn, oa as ct, sc as d, Sr as dn, Qi as dt, Yn as en, xe as er, Ta as et, oc as f, hr as fn, Zi as ft, nc as g, J as gn, Ki as gt, rc as h, Kn as hn, qi as ht, ku as i, Wn as in, ue as ir, ga as it, gs as j, wt as jn, Ci as jt, Os as k, ft as kn, Ei as kt, lc as l, Xn as ln, na as lt, ic as m, zn as mn, Yi as mt, Dd as n, dr as nn, de as nr, ya as nt, Bc as o, ir as on, ma as ot, ac as p, Gn as pn, Xi as pt, Qa as q, Te as qn, qn as qt, Wu as r, Bn as rn, fe as rr, va as rt, hc as s, tr as sn, sa as st, Ud as t, $n as tn, pe as tr, ba as tt, cc as u, xr as un, ea as ut, Xs as v, Dn as vn, Ui as vt, $ as w, on as wn, Fi as wt, Us as x, Pn as xn, Ri as xt, Js as y, On as yn, Bi as yt, Ao as z, ct as zn, Jr as zt };
7811
+ export { La as $, we as $n, Xn as $t, Ns as A, ln as An, Mi as At, Po as B, bt as Bn, X as Bt, Ws as C, Sn as Cn, Hi as Ct, Is as D, Ln as Dn, Ri as Dt, Z as E, q as En, zi as Et, as as F, Rt as Fn, Ei as Ft, So as G, ut as Gn, Yr as Gt, No as H, ht as Hn, ni as Ht, ns as I, kt as In, Ti as It, ro as J, W as Jn, Nr as Jt, vo as K, lt as Kn, Vr as Kt, Qo as L, ft as Ln, Ci as Lt, xs as M, mn as Mn, Ai as Mt, hs as N, Ht as Nn, ki as Nt, Ls as O, Pn as On, Li as Ot, fs as P, Bt as Pn, Di as Pt, za as Q, be as Qn, Sr as Qt, Xo as R, St as Rn, Si as Rt, Js as S, J as Sn, Ui as St, $ as T, jn as Tn, Bi as Tt, wo as U, Ct as Un, $r as Ut, Fo as V, gt as Vn, ui as Vt, Co as W, dt as Wn, Qr as Wt, Xa as X, ye as Xn, Cr as Xt, no as Y, Ge as Yn, Y as Yt, Ja as Z, De as Zn, hr as Zt, sc as _, Tr as _n, Zi as _t, au as a, Kn as an, Ce as ar, Sa as at, $s as b, Hn as bn, qi as bt, bc as c, mr as cn, xe as cr, va as ct, pc as d, ur as dn, fe as dr, oa as dt, Zn as en, ve as er, Fa as et, fc as f, sr as fn, ue as fr, ia as ft, cc as g, xr as gn, $i as gt, lc as h, $n as hn, ea as ht, Pu as i, wr as in, Se as ir, Ca as it, js as j, pn as jn, ji as jt, Fs as k, un as kn, Ni as kt, yc as l, Un as ln, pe as lr, da as lt, uc as m, fr as mn, ta as mt, Md as n, Er as nn, _e as nr, ka as nt, Xc as o, Qn as on, Ee as or, ba as ot, dc as p, ir as pn, na as pt, ao as q, ct as qn, Pr as qt, Yu as r, tr as rn, he as rr, wa as rt, Gc as s, nr as sn, ge as sr, xa as st, Jd as t, gr as tn, Te as tr, Aa as tt, mc as u, qn as un, de as ur, ua as ut, nc as v, vr as vn, Xi as vt, Us as w, An as wn, Vi as wt, Qs as x, Yn as xn, Wi as xt, tc as y, Jn as yn, Yi as yt, Io as z, wt as zn, bi as zt };
7656
7812
 
7657
- //# sourceMappingURL=features-CLIZ7Q-Y.js.map
7813
+ //# sourceMappingURL=features-pLfGJWIB.js.map