@templatical/editor 0.49.0 → 0.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/README.md +4 -2
  2. package/dist/AiAltTextPopover-BZQ95GXL.js +106 -0
  3. package/dist/AiAltTextReview-DoBEudnE.js +206 -0
  4. package/dist/AiChatPanel-Bs6sES3b.js +550 -0
  5. package/dist/AiHeaderMenu-BEaTazx4.js +36 -0
  6. package/dist/AiPanels-CfN7A-ZA.js +33 -0
  7. package/dist/AiRewriteMenu-C3ZfDDYy.js +276 -0
  8. package/dist/{BlockIssueBadge-BdpJwim0.js → BlockIssueBadge-CKwZ1Vgn.js} +11 -11
  9. package/dist/{BlockPreviewCanvas-D_sowkf0.js → BlockPreviewCanvas-BXNLLLYi.js} +33 -33
  10. package/dist/CloudHeaderExtras-CsJMEiyN.js +23 -0
  11. package/dist/{CloudPanels-1hwFiJ0G.js → CloudPanels-B4F5m7vy.js} +66 -85
  12. package/dist/{CollaborationNotices-BWpKzueF.js → CollaborationNotices-CNuDp7Y2.js} +19 -16
  13. package/dist/{CollaboratorBar-D87phJsw.js → CollaboratorBar-BtHPiuHq.js} +22 -22
  14. package/dist/{CommentsPanel-BUvUzO3T.js → CommentsPanel-CyCM-BvT.js} +4 -4
  15. package/dist/CommentsSidebar-Ca3DyFOX.js +500 -0
  16. package/dist/{cdn/chunks/CountdownBlock-DB4JNdqh.js → CountdownBlock-DR4Xm2-T.js} +24 -26
  17. package/dist/{CountdownToolbar-CLMIwfK7.js → CountdownToolbar-CEIMPojJ.js} +55 -55
  18. package/dist/IssuesPanel-C8nMUccy.js +360 -0
  19. package/dist/{LoadingTrack-BXOptf5g.js → LoadingTrack-B0RKQWq3.js} +2 -2
  20. package/dist/{LogicTagInsertButton-CR5E4jSG.js → LogicTagInsertButton-CqfU52CO.js} +273 -268
  21. package/dist/{cdn/chunks/MediaEditModal-DD0SZ-S3.js → MediaEditModal-DHtkZ4OU.js} +202 -186
  22. package/dist/{MediaPanels-BVXDkqtH.js → MediaPanels-CGcOB2pR.js} +4 -4
  23. package/dist/{MergeTagInput-BEw_r0PJ.js → MergeTagInput-YnEkorTZ.js} +25 -25
  24. package/dist/{MergeTagModeToggle-CJTpFmVd.js → MergeTagModeToggle-Dhb1DAcQ.js} +40 -40
  25. package/dist/MergeTagTextarea-e4lnwtqZ.js +70 -0
  26. package/dist/ParagraphEditor-B6NK0ytw.js +799 -0
  27. package/dist/{RestoreVersionDialog-BaDpy3cL.js → RestoreVersionDialog-Bq_IGOLJ.js} +21 -21
  28. package/dist/{RichTextEditorContent-CsvniFlI.js → RichTextEditorContent-AOM6fylS.js} +48 -48
  29. package/dist/{SaveBlockDialog-DzWURF_e.js → SaveBlockDialog-C8GngfQx.js} +87 -87
  30. package/dist/{cdn/chunks/SavedBlocksBrowserModal-BMtyUrUP.js → SavedBlocksBrowserModal-wnkvxpm_.js} +102 -99
  31. package/dist/{SavedBlocksPanels-B3Af8ns2.js → SavedBlocksPanels-C2s3q0pJ.js} +9 -9
  32. package/dist/{SavedBlocksPickBar-Dj11-Lqp.js → SavedBlocksPickBar-BjcTiV87.js} +13 -13
  33. package/dist/TemplateSettings-BVBWpiDU.js +237 -0
  34. package/dist/{TestEmailModal-BeRYV3eg.js → TestEmailModal-SyhO9bn3.js} +57 -57
  35. package/dist/{TestEmailPanel-B8c3fQi2.js → TestEmailPanel-BDd2Rtav.js} +4 -4
  36. package/dist/{TitleEditor-CvpNUoAp.js → TitleEditor-pxD53y_l.js} +75 -75
  37. package/dist/ToggleSwitch-D51U9cmR.js +37 -0
  38. package/dist/{Toolbar-BadDSkkF.js → Toolbar-CZSPZYbj.js} +1138 -1138
  39. package/dist/{TplModal-BZgi9Tes.js → TplModal-DCzBzicE.js} +19 -19
  40. package/dist/{VersionHistoryMenu-BRlcQ8wX.js → VersionHistoryMenu-BQeWPT85.js} +35 -35
  41. package/dist/{VersionHistoryPanels-DGkllN3a.js → VersionHistoryPanels-BBm7YbRQ.js} +5 -5
  42. package/dist/{VersionPreviewBanner-F-811aps.js → VersionPreviewBanner-DUGF0tUJ.js} +9 -9
  43. package/dist/WrapperBlock-BO619LAb.js +45 -0
  44. package/dist/aiErrors-D5UOoYOt.js +41 -0
  45. package/dist/aiImageContext-BH4Ss1h3.js +48 -0
  46. package/dist/aiRewritePreview-DLGM05Ge.js +44 -0
  47. package/dist/{blockTypeIcons-CayLluou.js → blockTypeIcons-NzaYvAI4.js} +15 -14
  48. package/dist/bundle-stats.json +8 -8
  49. package/dist/{cdn/chunks/ca-DSJwJ5ov.js → ca-C7mTzW1r.js} +130 -13
  50. package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js +107 -0
  51. package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js.map +1 -0
  52. package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js +207 -0
  53. package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js.map +1 -0
  54. package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js +476 -0
  55. package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js.map +1 -0
  56. package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js +37 -0
  57. package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js.map +1 -0
  58. package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js +34 -0
  59. package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js.map +1 -0
  60. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js +208 -0
  61. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +1 -0
  62. package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js → BlockIssueBadge-DAn2vsMJ.js} +13 -13
  63. package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js.map → BlockIssueBadge-DAn2vsMJ.js.map} +1 -1
  64. package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js → BlockPreviewCanvas-D0--EQkP.js} +38 -38
  65. package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js.map → BlockPreviewCanvas-D0--EQkP.js.map} +1 -1
  66. package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js +25 -0
  67. package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js.map +1 -0
  68. package/dist/cdn/chunks/{CloudPanels-XufhBZYF.js → CloudPanels-C3jsxo_f.js} +52 -71
  69. package/dist/cdn/chunks/CloudPanels-C3jsxo_f.js.map +1 -0
  70. package/dist/cdn/chunks/{CollaborationNotices-CBvKEj1Q.js → CollaborationNotices-DjRI8gvs.js} +23 -20
  71. package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js.map +1 -0
  72. package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js → CollaboratorBar-Dfzm6A9A.js} +20 -20
  73. package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js.map → CollaboratorBar-Dfzm6A9A.js.map} +1 -1
  74. package/dist/cdn/chunks/CommentsPanel-CSO79OeX.js +20 -0
  75. package/dist/cdn/chunks/{CommentsPanel-R8YLLO3v.js.map → CommentsPanel-CSO79OeX.js.map} +1 -1
  76. package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js +470 -0
  77. package/dist/cdn/chunks/{CommentsSidebar-96NZHVq3.js.map → CommentsSidebar-CCvplq1Z.js.map} +1 -1
  78. package/dist/{CountdownBlock-DPQXWRvU.js → cdn/chunks/CountdownBlock-C6USdwk3.js} +19 -17
  79. package/dist/cdn/chunks/{CountdownBlock-DB4JNdqh.js.map → CountdownBlock-C6USdwk3.js.map} +1 -1
  80. package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js → CountdownToolbar-Cjud2Tos.js} +70 -70
  81. package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js.map → CountdownToolbar-Cjud2Tos.js.map} +1 -1
  82. package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js +340 -0
  83. package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js.map +1 -0
  84. package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js → LoadingTrack-BIcL4NiY.js} +2 -2
  85. package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js.map → LoadingTrack-BIcL4NiY.js.map} +1 -1
  86. package/dist/cdn/chunks/{LogicTagInsertButton-BJ2t2vxC.js → LogicTagInsertButton-CsL2JDOG.js} +367 -362
  87. package/dist/cdn/chunks/LogicTagInsertButton-CsL2JDOG.js.map +1 -0
  88. package/dist/{MediaEditModal-C_wxoUMG.js → cdn/chunks/MediaEditModal-BuHCiyMu.js} +544 -560
  89. package/dist/cdn/chunks/MediaEditModal-BuHCiyMu.js.map +1 -0
  90. package/dist/cdn/chunks/MediaPanels-DAgUf_T1.js +45 -0
  91. package/dist/cdn/chunks/{MediaPanels-CkdJ_kGp.js.map → MediaPanels-DAgUf_T1.js.map} +1 -1
  92. package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js → MergeTagInput-C8U-7LxL.js} +33 -33
  93. package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js.map → MergeTagInput-C8U-7LxL.js.map} +1 -1
  94. package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js → MergeTagModeToggle-Mm-p0A52.js} +41 -41
  95. package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js.map → MergeTagModeToggle-Mm-p0A52.js.map} +1 -1
  96. package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js +72 -0
  97. package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js.map +1 -0
  98. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js +634 -0
  99. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +1 -0
  100. package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js → RestoreVersionDialog-CdA5osuA.js} +25 -25
  101. package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js.map → RestoreVersionDialog-CdA5osuA.js.map} +1 -1
  102. package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js → RichTextEditorContent-Q1d2xqBT.js} +46 -46
  103. package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js.map → RichTextEditorContent-Q1d2xqBT.js.map} +1 -1
  104. package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js → SaveBlockDialog-CijargAy.js} +77 -77
  105. package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js.map → SaveBlockDialog-CijargAy.js.map} +1 -1
  106. package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +357 -0
  107. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BMtyUrUP.js.map → SavedBlocksBrowserModal-DtOz_X5S.js.map} +1 -1
  108. package/dist/cdn/chunks/SavedBlocksPanels-BowyED5h.js +38 -0
  109. package/dist/cdn/chunks/{SavedBlocksPanels-s_gxi1im.js.map → SavedBlocksPanels-BowyED5h.js.map} +1 -1
  110. package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js → SavedBlocksPickBar-BPRaJBv3.js} +18 -18
  111. package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js.map → SavedBlocksPickBar-BPRaJBv3.js.map} +1 -1
  112. package/dist/cdn/chunks/TemplateSettings-ByZeBO34.js +209 -0
  113. package/dist/cdn/chunks/{TemplateSettings-CtrzzQWl.js.map → TemplateSettings-ByZeBO34.js.map} +1 -1
  114. package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js → TestEmailModal-BUVTj3Ic.js} +54 -54
  115. package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js.map → TestEmailModal-BUVTj3Ic.js.map} +1 -1
  116. package/dist/cdn/chunks/TestEmailPanel-BxutYoWg.js +35 -0
  117. package/dist/cdn/chunks/{TestEmailPanel-DERaCdpG.js.map → TestEmailPanel-BxutYoWg.js.map} +1 -1
  118. package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js +199 -0
  119. package/dist/cdn/chunks/{TitleEditor-CEgxjtUX.js.map → TitleEditor-Ccv6uoTz.js.map} +1 -1
  120. package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js +39 -0
  121. package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js.map +1 -0
  122. package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js → Toolbar-DoprRgTn.js} +986 -987
  123. package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js.map → Toolbar-DoprRgTn.js.map} +1 -1
  124. package/dist/cdn/chunks/{TplModal-DDrbWJcE.js → TplModal-BXQzmsJX.js} +21 -21
  125. package/dist/cdn/chunks/{TplModal-DDrbWJcE.js.map → TplModal-BXQzmsJX.js.map} +1 -1
  126. package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js → VersionHistoryMenu-BF2fNCvq.js} +41 -41
  127. package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js.map → VersionHistoryMenu-BF2fNCvq.js.map} +1 -1
  128. package/dist/cdn/chunks/VersionHistoryPanels-Dal0Uk69.js +48 -0
  129. package/dist/cdn/chunks/{VersionHistoryPanels-DVOV8QLv.js.map → VersionHistoryPanels-Dal0Uk69.js.map} +1 -1
  130. package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js → VersionPreviewBanner-BaGcn-b1.js} +12 -12
  131. package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js.map → VersionPreviewBanner-BaGcn-b1.js.map} +1 -1
  132. package/dist/cdn/chunks/WrapperBlock-DkQJtLz0.js +47 -0
  133. package/dist/cdn/chunks/{WrapperBlock-CFuP4R0c.js.map → WrapperBlock-DkQJtLz0.js.map} +1 -1
  134. package/dist/cdn/chunks/aiErrors-D5UOoYOt.js +43 -0
  135. package/dist/cdn/chunks/aiErrors-D5UOoYOt.js.map +1 -0
  136. package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js +50 -0
  137. package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js.map +1 -0
  138. package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js +46 -0
  139. package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js.map +1 -0
  140. package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +22 -0
  141. package/dist/cdn/chunks/{blockTypeIcons-BnAd8qsP.js.map → blockTypeIcons-ikZAmd6U.js.map} +1 -1
  142. package/dist/{ca-DSJwJ5ov.js → cdn/chunks/ca-C7mTzW1r.js} +132 -11
  143. package/dist/cdn/chunks/ca-C7mTzW1r.js.map +1 -0
  144. package/dist/cdn/chunks/{cloud-CI_fgDyy.js → createCloudRuntime-DpBWhrv3.js} +489 -593
  145. package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js.map +1 -0
  146. package/dist/cdn/chunks/de-DBOTcDj2.js +22 -0
  147. package/dist/cdn/chunks/de-DBOTcDj2.js.map +1 -0
  148. package/dist/{de-CBE6O79z.js → cdn/chunks/de-DNuYQTmS.js} +132 -11
  149. package/dist/cdn/chunks/de-DNuYQTmS.js.map +1 -0
  150. package/dist/{dist-Bv_GBr2l.js → cdn/chunks/dist-Bo8Thh8v.js} +60 -58
  151. package/dist/cdn/chunks/{dist-Doy3r07H.js.map → dist-Bo8Thh8v.js.map} +1 -1
  152. package/dist/cdn/chunks/dist-S-rLGqax.js +406 -0
  153. package/dist/cdn/chunks/{dist-DdwjXLme.js.map → dist-S-rLGqax.js.map} +1 -1
  154. package/dist/cdn/chunks/{draggable-akeQH_JP.js → draggable-DZ0gwUJ6.js} +1822 -1728
  155. package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +1 -0
  156. package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js → editor-modal-CI6EfeMd.js} +884 -884
  157. package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js.map → editor-modal-CI6EfeMd.js.map} +1 -1
  158. package/dist/cdn/chunks/en-CDhWRrF_.js +22 -0
  159. package/dist/cdn/chunks/en-CDhWRrF_.js.map +1 -0
  160. package/dist/{en-CDexnk0p.js → cdn/chunks/en-CW71OK66.js} +132 -11
  161. package/dist/cdn/chunks/en-CW71OK66.js.map +1 -0
  162. package/dist/cdn/chunks/en-ifvu6oPv.js +1 -0
  163. package/dist/{es-BE42B6uN.js → cdn/chunks/es-DdK7zQfi.js} +132 -11
  164. package/dist/cdn/chunks/es-DdK7zQfi.js.map +1 -0
  165. package/dist/cdn/chunks/{extensions-koOuDeZS.js → extensions-taJTZlLK.js} +59 -59
  166. package/dist/cdn/chunks/{extensions-koOuDeZS.js.map → extensions-taJTZlLK.js.map} +1 -1
  167. package/dist/{fr-DlJFPDQR.js → cdn/chunks/fr-Dz5Bgb7-.js} +132 -11
  168. package/dist/cdn/chunks/fr-Dz5Bgb7-.js.map +1 -0
  169. package/dist/cdn/chunks/{icons-CjlNV8xD.js → icons-DNX6StSs.js} +178 -145
  170. package/dist/cdn/chunks/icons-DNX6StSs.js.map +1 -0
  171. package/dist/{ja-CUT8gkNI.js → cdn/chunks/ja-Di-zJiT8.js} +132 -11
  172. package/dist/cdn/chunks/ja-Di-zJiT8.js.map +1 -0
  173. package/dist/cdn/chunks/keys-BTpmg2Tt.js +12 -0
  174. package/dist/cdn/chunks/keys-BTpmg2Tt.js.map +1 -0
  175. package/dist/{logger-BBlvSn6q.js → cdn/chunks/logger-Tj0RPskW.js} +7 -1
  176. package/dist/cdn/chunks/logger-Tj0RPskW.js.map +1 -0
  177. package/dist/{nl-bXWqqRyS.js → cdn/chunks/nl-CvVuHYFL.js} +132 -11
  178. package/dist/cdn/chunks/{nl-bXWqqRyS.js.map → nl-CvVuHYFL.js.map} +1 -1
  179. package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js +199 -0
  180. package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js.map +1 -0
  181. package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js → preRenderCustomBlocks-Dc-QLntG.js} +4 -4
  182. package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js.map → preRenderCustomBlocks-Dc-QLntG.js.map} +1 -1
  183. package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js +22 -0
  184. package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js.map +1 -0
  185. package/dist/{pt-BR-2_H4-wlb.js → cdn/chunks/pt-BR-ZhO4vgyq.js} +132 -11
  186. package/dist/cdn/chunks/pt-BR-ZhO4vgyq.js.map +1 -0
  187. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +62 -0
  188. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +1 -0
  189. package/dist/cdn/chunks/socialIcons-BBvsTwCV.js +2032 -0
  190. package/dist/cdn/chunks/socialIcons-BBvsTwCV.js.map +1 -0
  191. package/dist/{dist-DBG3nh3k.js → cdn/chunks/src-BNFnxfrA.js} +552 -350
  192. package/dist/cdn/chunks/src-BNFnxfrA.js.map +1 -0
  193. package/dist/cdn/chunks/{src-B77z1iw4.js → src-BcTUmgLe.js} +113 -113
  194. package/dist/cdn/chunks/{src-B77z1iw4.js.map → src-BcTUmgLe.js.map} +1 -1
  195. package/dist/cdn/chunks/src-Bs_yxk3h.js +4392 -0
  196. package/dist/cdn/chunks/src-Bs_yxk3h.js.map +1 -0
  197. package/dist/cdn/chunks/{tiptap-B1RfWFzB.js → tiptap-CtVrAViq.js} +43 -43
  198. package/dist/cdn/chunks/{tiptap-B1RfWFzB.js.map → tiptap-CtVrAViq.js.map} +1 -1
  199. package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js → useCloudI18n-AVXhzbhQ.js} +4 -4
  200. package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js.map → useCloudI18n-AVXhzbhQ.js.map} +1 -1
  201. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +2586 -0
  202. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +1 -0
  203. package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +10 -0
  204. package/dist/cdn/chunks/{useEditorRoot-5SBqm90x.js.map → useEditorRoot-CR5GjJD6.js.map} +1 -1
  205. package/dist/cdn/chunks/{useI18n-DEqtEgOs.js → useI18n-CbVubQhM.js} +3 -3
  206. package/dist/cdn/chunks/{useI18n-DEqtEgOs.js.map → useI18n-CbVubQhM.js.map} +1 -1
  207. package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js → useLogicTag-B49Nc53Y.js} +5 -5
  208. package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js.map → useLogicTag-B49Nc53Y.js.map} +1 -1
  209. package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js → useMergeTag-B0KryMj8.js} +5 -5
  210. package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js.map → useMergeTag-B0KryMj8.js.map} +1 -1
  211. package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js → usePopoverPosition-C829ps5i.js} +4 -4
  212. package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js.map → usePopoverPosition-C829ps5i.js.map} +1 -1
  213. package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js +51 -0
  214. package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js.map +1 -0
  215. package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js → withCurrentFont-DFPXeVfG.js} +2 -2
  216. package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js.map → withCurrentFont-DFPXeVfG.js.map} +1 -1
  217. package/dist/cdn/editor.css +1 -1
  218. package/dist/cdn/editor.js +2151 -1480
  219. package/dist/cdn/editor.js.map +1 -1
  220. package/dist/{check-DQQzkmIC.js → check-yYsp5Xpk.js} +1 -1
  221. package/dist/{chevron-down-CIF4bdon.js → chevron-down-DTmD06_j.js} +1 -1
  222. package/dist/{chevron-right-Cg7Xu-ev.js → chevron-right-BSeYZOxc.js} +1 -1
  223. package/dist/{chevron-up-Csu7ISD-.js → chevron-up-BOApwrxi.js} +1 -1
  224. package/dist/{circle-alert-YUvIJAgY.js → circle-alert-BMszY8im.js} +1 -1
  225. package/dist/{clock-CnSIGKQW.js → clock-HADxnl6-.js} +1 -1
  226. package/dist/{cloud-YUYDtdHt.js → createCloudRuntime-DVQI_ReU.js} +474 -570
  227. package/dist/{createLucideIcon-BcP1sjdp.js → createLucideIcon-0lYYH3EW.js} +6 -6
  228. package/dist/de-DBOTcDj2.js +20 -0
  229. package/dist/{cdn/chunks/de-CBE6O79z.js → de-DNuYQTmS.js} +130 -13
  230. package/dist/{cdn/chunks/dist-Doy3r07H.js → dist-C7EtxNCb.js} +49 -51
  231. package/dist/{dist-CNqjHA8e.js → dist-C_dV9QAx.js} +130 -130
  232. package/dist/{cdn/chunks/dist-DdwjXLme.js → dist-DI4_YSnG.js} +111 -110
  233. package/dist/{cdn/chunks/src-CvLTYGdO.js → dist-DtOF3bDW.js} +446 -393
  234. package/dist/{editor-modal--7_9A6j-.js → editor-modal-Bzhl-PgI.js} +832 -834
  235. package/dist/en-CDhWRrF_.js +20 -0
  236. package/dist/{cdn/chunks/en-CDexnk0p.js → en-CW71OK66.js} +130 -13
  237. package/dist/en-DwV15ltA.js +1 -0
  238. package/dist/{cdn/chunks/es-BE42B6uN.js → es-DdK7zQfi.js} +130 -13
  239. package/dist/{extensions-zwsZlWjH.js → extensions-CdyweA50.js} +57 -57
  240. package/dist/{eye-B1bua-ck.js → eye-DWkSvYpj.js} +1 -1
  241. package/dist/{cdn/chunks/fr-DlJFPDQR.js → fr-Dz5Bgb7-.js} +130 -13
  242. package/dist/image-DesWjcZ4.js +28 -0
  243. package/dist/index.d.ts +361 -24
  244. package/dist/{info-x26nGOo2.js → info-ClWJGoZy.js} +1 -1
  245. package/dist/{cdn/chunks/ja-CUT8gkNI.js → ja-Di-zJiT8.js} +130 -13
  246. package/dist/keys-Zd9KWRD1.js +10 -0
  247. package/dist/{link-CezhndyR.js → link-BqRicFTA.js} +1 -1
  248. package/dist/{list-DQqdptI0.js → list-bojQr9bn.js} +1 -1
  249. package/dist/{loader-circle-DCEeoYoi.js → loader-circle-B2B8LbUu.js} +1 -1
  250. package/dist/{cdn/chunks/logger-ByvdoAwq.js → logger-k9Nbj3Cp.js} +5 -3
  251. package/dist/{message-circle-BLGzfv_7.js → message-circle-BEuiNsyZ.js} +1 -1
  252. package/dist/{cdn/chunks/nl-bXWqqRyS.js → nl-CvVuHYFL.js} +130 -13
  253. package/dist/normalizeMergeTagMarkup-P6SUBuPv.js +197 -0
  254. package/dist/{package-D_kEQCMU.js → package-DCROB4aM.js} +1 -1
  255. package/dist/{pencil-Dct8zGLy.js → pencil-CEotCKbf.js} +1 -1
  256. package/dist/{preRenderCustomBlocks-CtKJecE-.js → preRenderCustomBlocks-D8rr61_z.js} +4 -4
  257. package/dist/pt-BR-CHM-ZKvE.js +20 -0
  258. package/dist/{cdn/chunks/pt-BR-2_H4-wlb.js → pt-BR-ZhO4vgyq.js} +130 -13
  259. package/dist/{refresh-cw-tGMRDxr8.js → refresh-cw-C6M2mHNC.js} +12 -2
  260. package/dist/{runtime-dom.esm-bundler-DYn1z2Xf.js → runtime-dom.esm-bundler-B8WCZWUm.js} +134 -134
  261. package/dist/sanitizeRichTextHtml-DeISfLFr.js +60 -0
  262. package/dist/{search-Bm2cCQpe.js → search-Cy99zPYf.js} +1 -1
  263. package/dist/{send-sVLaKZ7f.js → send-BDLJFsf3.js} +1 -1
  264. package/dist/{smartphone-B2W81p02.js → smartphone-CVvQaNA4.js} +1 -1
  265. package/dist/{cdn/chunks/socialIcons-CkZSYpoG.js → socialIcons-Dd-jRiVe.js} +688 -693
  266. package/dist/{sparkles-a1qkBZ8X.js → sparkles-Ce0Qz0ox.js} +1 -1
  267. package/dist/square-BWlolnXe.js +15 -0
  268. package/dist/style.css +1 -1
  269. package/dist/templatical-editor.js +2114 -1422
  270. package/dist/{text-align-start-CTuwQ5YW.js → text-align-start-D1V5gPTy.js} +1 -1
  271. package/dist/{trash-I3D2peFQ.js → trash-CZfiUFmw.js} +1 -1
  272. package/dist/{triangle-alert-CenxmLRE.js → triangle-alert-CFDzyFC7.js} +1 -1
  273. package/dist/upload-BJfvdIrD.js +36 -0
  274. package/dist/{useCloudI18n-CGVEZV3o.js → useCloudI18n-Dcjua65H.js} +5 -5
  275. package/dist/{useEditorCore-DRbMRe8F.js → useEditorCore-BTLeAVlM.js} +1463 -1499
  276. package/dist/{useEditorRoot-BVm2-1N8.js → useEditorRoot-DUy67lJu.js} +2 -2
  277. package/dist/{useI18n-CSh4gO5c.js → useI18n-BdoY7xDE.js} +4 -4
  278. package/dist/{useLogicTag-zcI6BWIf.js → useLogicTag-DKLZ1T9H.js} +3 -3
  279. package/dist/{useMergeTag-C-iBLlp0.js → useMergeTag-Bhdx7AKk.js} +3 -3
  280. package/dist/{usePopoverPosition-CMcsMBtK.js → usePopoverPosition-BZea45XK.js} +2 -2
  281. package/dist/useScrollToBlock-FmNMALM_.js +74 -0
  282. package/dist/{vue.runtime.esm-bundler-DV0Wx4r_.js → vue.runtime.esm-bundler-DgFJ6GPG.js} +1428 -1332
  283. package/dist/{withCurrentFont-D62njRLu.js → withCurrentFont-BATJHNve.js} +1 -1
  284. package/dist/{x-KFQ4S-Kz.js → x-CZ0Js0hA.js} +1 -1
  285. package/package.json +14 -12
  286. package/dist/AiChatSidebar-CdjTb9ej.js +0 -230
  287. package/dist/AiFeatureMenu-DKm7VYCs.js +0 -57
  288. package/dist/CloudHeaderExtras-CI8RR9hG.js +0 -55
  289. package/dist/CommentsSidebar-J65znlrH.js +0 -500
  290. package/dist/DesignReferenceSidebar-BTwCFgz8.js +0 -279
  291. package/dist/IssuesPanel-DeeVsfG7.js +0 -117
  292. package/dist/ParagraphEditor-zLV44z-R.js +0 -797
  293. package/dist/SavedBlocksBrowserModal-B8DCFW7t.js +0 -360
  294. package/dist/TemplateScoringPanel-Ba9sgvjS.js +0 -273
  295. package/dist/TemplateSettings-Cu5X9DgA.js +0 -246
  296. package/dist/ToggleSwitch-DHweVJOr.js +0 -102
  297. package/dist/WrapperBlock-DiiaxpMb.js +0 -45
  298. package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js +0 -205
  299. package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js.map +0 -1
  300. package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js +0 -57
  301. package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js.map +0 -1
  302. package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js +0 -56
  303. package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +0 -1
  304. package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +0 -1
  305. package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +0 -1
  306. package/dist/cdn/chunks/CommentsPanel-R8YLLO3v.js +0 -20
  307. package/dist/cdn/chunks/CommentsSidebar-96NZHVq3.js +0 -470
  308. package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js +0 -229
  309. package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js.map +0 -1
  310. package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js +0 -100
  311. package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js.map +0 -1
  312. package/dist/cdn/chunks/LogicTagInsertButton-BJ2t2vxC.js.map +0 -1
  313. package/dist/cdn/chunks/MediaEditModal-DD0SZ-S3.js.map +0 -1
  314. package/dist/cdn/chunks/MediaPanels-CkdJ_kGp.js +0 -45
  315. package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js +0 -632
  316. package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js.map +0 -1
  317. package/dist/cdn/chunks/SavedBlocksPanels-s_gxi1im.js +0 -38
  318. package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js +0 -237
  319. package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js.map +0 -1
  320. package/dist/cdn/chunks/TemplateSettings-CtrzzQWl.js +0 -208
  321. package/dist/cdn/chunks/TestEmailPanel-DERaCdpG.js +0 -35
  322. package/dist/cdn/chunks/TitleEditor-CEgxjtUX.js +0 -199
  323. package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js +0 -104
  324. package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js.map +0 -1
  325. package/dist/cdn/chunks/VersionHistoryPanels-DVOV8QLv.js +0 -48
  326. package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js +0 -47
  327. package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js +0 -22
  328. package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +0 -1
  329. package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +0 -1
  330. package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js +0 -358
  331. package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +0 -1
  332. package/dist/cdn/chunks/de-CBE6O79z.js.map +0 -1
  333. package/dist/cdn/chunks/de-D_atmUVB.js +0 -89
  334. package/dist/cdn/chunks/de-D_atmUVB.js.map +0 -1
  335. package/dist/cdn/chunks/draggable-akeQH_JP.js.map +0 -1
  336. package/dist/cdn/chunks/en-CDexnk0p.js.map +0 -1
  337. package/dist/cdn/chunks/en-DhJLnaBx.js +0 -89
  338. package/dist/cdn/chunks/en-DhJLnaBx.js.map +0 -1
  339. package/dist/cdn/chunks/en-Ve-PWSXu.js +0 -1
  340. package/dist/cdn/chunks/es-BE42B6uN.js.map +0 -1
  341. package/dist/cdn/chunks/fr-DlJFPDQR.js.map +0 -1
  342. package/dist/cdn/chunks/icons-CjlNV8xD.js.map +0 -1
  343. package/dist/cdn/chunks/ja-CUT8gkNI.js.map +0 -1
  344. package/dist/cdn/chunks/keys-UAWhQ3zW.js +0 -12
  345. package/dist/cdn/chunks/keys-UAWhQ3zW.js.map +0 -1
  346. package/dist/cdn/chunks/logger-ByvdoAwq.js.map +0 -1
  347. package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +0 -1
  348. package/dist/cdn/chunks/pt-BR-BphMoUTw.js +0 -89
  349. package/dist/cdn/chunks/pt-BR-BphMoUTw.js.map +0 -1
  350. package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +0 -1
  351. package/dist/cdn/chunks/src-B1e5SSYP.js +0 -1272
  352. package/dist/cdn/chunks/src-B1e5SSYP.js.map +0 -1
  353. package/dist/cdn/chunks/src-CvLTYGdO.js.map +0 -1
  354. package/dist/cdn/chunks/timeouts-o5Y9BuqI.js +0 -6
  355. package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +0 -1
  356. package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js +0 -12
  357. package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js.map +0 -1
  358. package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js +0 -2623
  359. package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +0 -1
  360. package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +0 -10
  361. package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js +0 -21
  362. package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js.map +0 -1
  363. package/dist/copy-CUC43md_.js +0 -19
  364. package/dist/createCloudRuntime-BMDRjL0k.js +0 -356
  365. package/dist/de-D_atmUVB.js +0 -87
  366. package/dist/dist-CCqn-RqE.js +0 -407
  367. package/dist/en-BHCMzqib.js +0 -1
  368. package/dist/en-DhJLnaBx.js +0 -87
  369. package/dist/image-up-BqiO7KCO.js +0 -27
  370. package/dist/keys-BymCnLHD.js +0 -10
  371. package/dist/plus-BDd0gTEm.js +0 -14
  372. package/dist/pt-BR-BphMoUTw.js +0 -87
  373. package/dist/shield-check-YhsbXfQc.js +0 -14
  374. package/dist/socialIcons-Bwv-49EB.js +0 -2167
  375. package/dist/timeouts-o5Y9BuqI.js +0 -4
  376. package/dist/upload-uU2cK0Ce.js +0 -21
  377. package/dist/useAliveFlag-BjP0Gxza.js +0 -10
  378. package/dist/useScrollToBlock-CdCQK9QQ.js +0 -47
@@ -1,12 +1,12 @@
1
- import { E as e, F as t, H as n, K as r, N as i, Q as a, S as o, Y as s, at as c, b as l, c as u, ct as d, d as f, f as p, g as m, h, k as g, l as _, lt as v, m as y, n as b, p as x, q as S, r as C, u as w, ut as T, w as E, y as D } from "./draggable-akeQH_JP.js";
2
- import { c as O, i as k, s as A, u as j } from "./src-CvLTYGdO.js";
3
- import { t as ee } from "./dist-DdwjXLme.js";
4
- import { J as te, Y as M, Z as ne, d as re } from "./keys-UAWhQ3zW.js";
5
- import { t as N } from "./useI18n-DEqtEgOs.js";
6
- import { a as ie, i as ae, n as oe, o as se, r as ce, t as le } from "./usePopoverPosition-Cz9-XiXR.js";
7
- import { Bt as P, F, n as I, q as L } from "./icons-CjlNV8xD.js";
8
- import { t as R } from "./useMergeTag-DFoOexIQ.js";
9
- import { t as ue } from "./useLogicTag-X8bc5qNl.js";
1
+ import { $ as e, A as t, C as n, D as r, I as i, J as a, P as o, T as s, U as c, X as l, _ as u, b as d, c as f, dt as p, f as m, g as h, h as g, l as _, lt as v, m as y, n as b, ot as x, p as S, q as C, r as w, u as T, ut as E, x as D } from "./draggable-DZ0gwUJ6.js";
2
+ import { c as O, i as k, s as A, u as j } from "./src-BNFnxfrA.js";
3
+ import { t as ee } from "./dist-S-rLGqax.js";
4
+ import { J as te, Y as M, Z as ne, d as re } from "./keys-BTpmg2Tt.js";
5
+ import { t as N } from "./useI18n-CbVubQhM.js";
6
+ import { a as P, i as ie, n as ae, o as oe, r as se, t as ce } from "./usePopoverPosition-C829ps5i.js";
7
+ import { Bt as le, G as F, N as I, t as L } from "./icons-DNX6StSs.js";
8
+ import { t as R } from "./useMergeTag-B0KryMj8.js";
9
+ import { t as ue } from "./useLogicTag-B49Nc53Y.js";
10
10
  import { u as de } from "./styleConstants-v1dNKgJf.js";
11
11
  //#region ../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/math.js
12
12
  var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n, V = (e) => me(H(e)), H = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
@@ -74,57 +74,57 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
74
74
  v: B(i / 255 * 100),
75
75
  a: r
76
76
  };
77
- }, he = (e, t) => {
77
+ }, q = (e, t) => {
78
78
  if (e === t) return !0;
79
79
  for (let n in e) if (e[n] !== t[n]) return !1;
80
80
  return !0;
81
- }, ge = (e, t) => e.toLowerCase() === t.toLowerCase() || he(H(e), H(t)), _e = {}, q = (e) => {
82
- let t = _e[e];
83
- return t || (t = document.createElement("template"), t.innerHTML = e, _e[e] = t), t;
84
- }, J = (e, t, n) => {
81
+ }, he = (e, t) => e.toLowerCase() === t.toLowerCase() || q(H(e), H(t)), ge = {}, J = (e) => {
82
+ let t = ge[e];
83
+ return t || (t = document.createElement("template"), t.innerHTML = e, ge[e] = t), t;
84
+ }, Y = (e, t, n) => {
85
85
  e.dispatchEvent(new CustomEvent(t, {
86
86
  bubbles: !0,
87
87
  detail: n
88
88
  }));
89
- }, Y = !1, X = (e) => "touches" in e, ve = (e) => Y && !X(e) ? !1 : (Y ||= X(e), !0), ye = (e, t) => {
90
- let n = X(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
91
- J(e.el, "move", e.getMove({
89
+ }, X = !1, Z = (e) => "touches" in e, _e = (e) => X && !Z(e) ? !1 : (X ||= Z(e), !0), ve = (e, t) => {
90
+ let n = Z(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
91
+ Y(e.el, "move", e.getMove({
92
92
  x: z((n.pageX - (r.left + window.pageXOffset)) / r.width),
93
93
  y: z((n.pageY - (r.top + window.pageYOffset)) / r.height)
94
94
  }));
95
- }, be = (e, t) => {
95
+ }, ye = (e, t) => {
96
96
  let n = t.keyCode;
97
- n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), J(e.el, "move", e.getMove({
97
+ n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), Y(e.el, "move", e.getMove({
98
98
  x: n === 39 ? .01 : n === 37 ? -.01 : n === 34 ? .05 : n === 33 ? -.05 : n === 35 ? 1 : n === 36 ? -1 : 0,
99
99
  y: n === 40 ? .01 : n === 38 ? -.01 : 0
100
100
  }, !0)));
101
- }, Z = class {
101
+ }, Q = class {
102
102
  constructor(e, t, n, r) {
103
- let i = q(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
103
+ let i = J(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
104
104
  e.appendChild(i.content.cloneNode(!0));
105
105
  let a = e.querySelector(`[part=${t}]`);
106
106
  a.addEventListener("mousedown", this), a.addEventListener("touchstart", this), a.addEventListener("keydown", this), this.el = a, this.xy = r, this.nodes = [a.firstChild, a];
107
107
  }
108
108
  set dragging(e) {
109
109
  let t = e ? document.addEventListener : document.removeEventListener;
110
- t(Y ? "touchmove" : "mousemove", this), t(Y ? "touchend" : "mouseup", this);
110
+ t(X ? "touchmove" : "mousemove", this), t(X ? "touchend" : "mouseup", this);
111
111
  }
112
112
  handleEvent(e) {
113
113
  switch (e.type) {
114
114
  case "mousedown":
115
115
  case "touchstart":
116
- if (e.preventDefault(), !ve(e) || !Y && e.button != 0) return;
117
- this.el.focus(), ye(this, e), this.dragging = !0;
116
+ if (e.preventDefault(), !_e(e) || !X && e.button != 0) return;
117
+ this.el.focus(), ve(this, e), this.dragging = !0;
118
118
  break;
119
119
  case "mousemove":
120
120
  case "touchmove":
121
- e.preventDefault(), ye(this, e);
121
+ e.preventDefault(), ve(this, e);
122
122
  break;
123
123
  case "mouseup":
124
124
  case "touchend":
125
125
  this.dragging = !1;
126
126
  break;
127
- case "keydown": be(this, e);
127
+ case "keydown": ye(this, e);
128
128
  }
129
129
  }
130
130
  style(e) {
@@ -132,7 +132,7 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
132
132
  for (let n in e) this.nodes[t].style.setProperty(n, e[n]);
133
133
  });
134
134
  }
135
- }, xe = class extends Z {
135
+ }, be = class extends Q {
136
136
  constructor(e) {
137
137
  super(e, "hue", "aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"", !1);
138
138
  }
@@ -150,7 +150,7 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
150
150
  getMove(e, t) {
151
151
  return { h: t ? z(this.h + e.x * 360, 0, 360) : 360 * e.x };
152
152
  }
153
- }, Se = class extends Z {
153
+ }, xe = class extends Q {
154
154
  constructor(e) {
155
155
  super(e, "saturation", "aria-label=\"Color\"", !0);
156
156
  }
@@ -172,32 +172,32 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
172
172
  v: t ? z(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
173
173
  };
174
174
  }
175
- }, Ce = ":host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:\"\";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}", we = "[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}", Te = "[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}", Q = Symbol("same"), Ee = Symbol("color"), De = Symbol("hsva"), $ = Symbol("update"), Oe = Symbol("parts"), ke = Symbol("css"), Ae = Symbol("sliders"), je = class extends HTMLElement {
175
+ }, Se = ":host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:\"\";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}", Ce = "[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}", we = "[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}", $ = Symbol("same"), Te = Symbol("color"), Ee = Symbol("hsva"), De = Symbol("update"), Oe = Symbol("parts"), ke = Symbol("css"), Ae = Symbol("sliders"), je = class extends HTMLElement {
176
176
  static get observedAttributes() {
177
177
  return ["color"];
178
178
  }
179
179
  get [ke]() {
180
180
  return [
181
+ Se,
181
182
  Ce,
182
- we,
183
- Te
183
+ we
184
184
  ];
185
185
  }
186
186
  get [Ae]() {
187
- return [Se, xe];
187
+ return [xe, be];
188
188
  }
189
189
  get color() {
190
- return this[Ee];
190
+ return this[Te];
191
191
  }
192
192
  set color(e) {
193
- if (!this[Q](e)) {
193
+ if (!this[$](e)) {
194
194
  let t = this.colorModel.toHsva(e);
195
- this[$](t), this[Ee] = e;
195
+ this[De](t), this[Te] = e;
196
196
  }
197
197
  }
198
198
  constructor() {
199
199
  super();
200
- let e = q(`<style>${this[ke].join("")}</style>`), t = this.attachShadow({ mode: "open" });
200
+ let e = J(`<style>${this[ke].join("")}</style>`), t = this.attachShadow({ mode: "open" });
201
201
  t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[Oe] = this[Ae].map((e) => new e(t));
202
202
  }
203
203
  connectedCallback() {
@@ -208,22 +208,22 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
208
208
  }
209
209
  attributeChangedCallback(e, t, n) {
210
210
  let r = this.colorModel.fromAttr(n);
211
- this[Q](r) || (this.color = r);
211
+ this[$](r) || (this.color = r);
212
212
  }
213
213
  handleEvent(e) {
214
- let t = this[De], n = {
214
+ let t = this[Ee], n = {
215
215
  ...t,
216
216
  ...e.detail
217
217
  };
218
- this[$](n);
218
+ this[De](n);
219
219
  let r;
220
- !he(n, t) && !this[Q](r = this.colorModel.fromHsva(n)) && (this[Ee] = r, J(this, "color-changed", { value: r }));
220
+ !q(n, t) && !this[$](r = this.colorModel.fromHsva(n)) && (this[Te] = r, Y(this, "color-changed", { value: r }));
221
221
  }
222
- [Q](e) {
222
+ [$](e) {
223
223
  return this.color && this.colorModel.equal(e, this.color);
224
224
  }
225
- [$](e) {
226
- this[De] = e, this[Oe].forEach((t) => t.update(e));
225
+ [De](e) {
226
+ this[Ee] = e, this[Oe].forEach((t) => t.update(e));
227
227
  }
228
228
  }, Me = {
229
229
  defaultColor: "#000",
@@ -234,7 +234,7 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
234
234
  v: n,
235
235
  a: 1
236
236
  }),
237
- equal: ge,
237
+ equal: he,
238
238
  fromAttr: (e) => e
239
239
  }, Ne = class extends je {
240
240
  get colorModel() {
@@ -280,7 +280,7 @@ var Pe = [
280
280
  "placeholder",
281
281
  "disabled",
282
282
  "aria-label"
283
- ], Ke = ["aria-label", "title"], qe = /* @__PURE__ */ o({
283
+ ], Ke = ["aria-label", "title"], qe = /* @__PURE__ */ n({
284
284
  __name: "ColorPicker",
285
285
  props: {
286
286
  modelValue: {},
@@ -307,23 +307,23 @@ var Pe = [
307
307
  }
308
308
  },
309
309
  emits: ["update:modelValue"],
310
- setup(r, { emit: o }) {
311
- let s = r, g = o, { t: S } = N(), C = a(!1), E = a(), O = a(), k = a(!1);
312
- ee(E, () => {
310
+ setup(t, { emit: n }) {
311
+ let a = t, s = n, { t: l } = N(), C = e(!1), w = e(), O = e(), k = e(!1);
312
+ ee(w, () => {
313
313
  C.value = !1;
314
314
  }, { ignore: [O] });
315
- let A = p(() => !s.modelValue), j = p(() => s.modelValue.trim().toLowerCase() === "transparent"), M = p(() => ae(s.modelValue)), P = p(() => (s.modelValue ? ie(s.modelValue) : null) || (ie(s.seedColor) ?? "#ffffff")), F = p(() => !s.disabled && !A.value), L = e(re, se), R = p(() => [...new Set(s.presets ?? L.presets)]), ue = p(() => s.allowCustom ?? L.allowCustom), z = p(() => R.value.length > 0), B = p(() => ue.value || !z.value), V = p(() => ce(s.modelValue));
315
+ let A = S(() => !a.modelValue), j = S(() => a.modelValue.trim().toLowerCase() === "transparent"), M = S(() => ie(a.modelValue)), le = S(() => (a.modelValue ? P(a.modelValue) : null) || (P(a.seedColor) ?? "#ffffff")), F = S(() => !a.disabled && !A.value), I = r(re, oe), R = S(() => [...new Set(a.presets ?? I.presets)]), ue = S(() => a.allowCustom ?? I.allowCustom), z = S(() => R.value.length > 0), B = S(() => ue.value || !z.value), V = S(() => se(a.modelValue));
316
316
  function H(e) {
317
- return V.value !== "" && ce(e) === V.value;
317
+ return V.value !== "" && se(e) === V.value;
318
318
  }
319
319
  function fe(e) {
320
- g("update:modelValue", e);
320
+ s("update:modelValue", e);
321
321
  }
322
- let U = p(() => z.value && !B.value);
322
+ let U = S(() => z.value && !B.value);
323
323
  function W(e) {
324
324
  return U.value ? e + 1 : e;
325
325
  }
326
- let G = p(() => {
326
+ let G = S(() => {
327
327
  if (U.value && A.value) return 0;
328
328
  let e = R.value.findIndex((e) => H(e));
329
329
  return e === -1 ? 0 : W(e);
@@ -344,35 +344,35 @@ var Pe = [
344
344
  let t = Array.from(e.currentTarget.querySelectorAll("[role=\"radio\"]")), n = e.target.closest("[role=\"radio\"]"), r = n ? t.indexOf(n) : -1;
345
345
  r !== -1 && (t[(r + (e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus(), e.preventDefault());
346
346
  }
347
- function he(e) {
348
- k.value = !0, g("update:modelValue", e.detail.value);
347
+ function q(e) {
348
+ k.value = !0, s("update:modelValue", e.detail.value);
349
349
  }
350
- function ge() {
350
+ function he() {
351
351
  k.value = !1;
352
352
  }
353
- function _e() {
354
- !k.value && A.value && g("update:modelValue", P.value);
355
- }
356
- function q(e) {
357
- g("update:modelValue", e.target.value);
353
+ function ge() {
354
+ !k.value && A.value && s("update:modelValue", le.value);
358
355
  }
359
- function J() {
360
- g("update:modelValue", "");
356
+ function J(e) {
357
+ s("update:modelValue", e.target.value);
361
358
  }
362
359
  function Y() {
363
- g("update:modelValue", "transparent");
360
+ s("update:modelValue", "");
364
361
  }
365
- let X = oe(), { toLocal: ve } = le(), ye = e(te, null), be = e(ne, null), Z = a({
362
+ function X() {
363
+ s("update:modelValue", "transparent");
364
+ }
365
+ let Z = ae(), { toLocal: _e } = ce(), ve = r(te, null), ye = r(ne, null), Q = e({
366
366
  top: 0,
367
367
  left: 0
368
368
  });
369
- function xe() {
370
- if (!s.disabled) {
369
+ function be() {
370
+ if (!a.disabled) {
371
371
  if (!C.value) {
372
372
  let e = O.value?.getBoundingClientRect();
373
373
  if (e) {
374
374
  let t = e.bottom + 8 + 240 <= window.innerHeight ? e.bottom + 8 : Math.max(8, e.top - 240 - 8);
375
- Z.value = ve({
375
+ Q.value = _e({
376
376
  top: t,
377
377
  left: e.left
378
378
  });
@@ -381,53 +381,53 @@ var Pe = [
381
381
  C.value = !C.value;
382
382
  }
383
383
  }
384
- return (e, a) => (i(), m("div", { class: d(["tpl:flex tpl:items-center tpl:gap-2 tpl:relative", r.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
385
- x("button", {
384
+ return (e, n) => (o(), u("div", { class: v(["tpl:flex tpl:items-center tpl:gap-2 tpl:relative", t.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
385
+ y("button", {
386
386
  ref_key: "swatchRef",
387
387
  ref: O,
388
388
  type: "button",
389
- disabled: r.disabled,
390
- "aria-label": r.ariaLabel || c(S).colorPicker.pickColor,
391
- title: r.ariaLabel || void 0,
389
+ disabled: t.disabled,
390
+ "aria-label": t.ariaLabel || x(l).colorPicker.pickColor,
391
+ title: t.ariaLabel || void 0,
392
392
  "aria-expanded": C.value,
393
- class: d([
393
+ class: v([
394
394
  "tpl:shrink-0 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-0.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
395
- r.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
396
- C.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !r.disabled && "tpl:hover:border-[var(--tpl-text-dim)]",
397
- r.size === "sm" ? "tpl:size-8" : "tpl:size-10"
395
+ t.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
396
+ C.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !t.disabled && "tpl:hover:border-[var(--tpl-text-dim)]",
397
+ t.size === "sm" ? "tpl:size-8" : "tpl:size-10"
398
398
  ]),
399
- onClick: xe
400
- }, [x("span", {
401
- class: d(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", {
399
+ onClick: be
400
+ }, [y("span", {
401
+ class: v(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", {
402
402
  "tpl-color-swatch-empty": A.value,
403
403
  "tpl-color-swatch-transparent": j.value
404
404
  }]),
405
- style: v(A.value || j.value ? void 0 : { backgroundColor: M.value })
405
+ style: E(A.value || j.value ? void 0 : { backgroundColor: M.value })
406
406
  }, null, 6)], 10, Pe),
407
- !r.swatchOnly && B.value ? (i(), m("div", Fe, [x("input", {
407
+ !t.swatchOnly && B.value ? (o(), u("div", Fe, [y("input", {
408
408
  type: "text",
409
- class: d([c(de), "tpl:w-full"]),
410
- style: v(F.value ? { paddingRight: "2.25rem" } : void 0),
409
+ class: v([x(de), "tpl:w-full"]),
410
+ style: E(F.value ? { paddingRight: "2.25rem" } : void 0),
411
411
  value: M.value,
412
- placeholder: r.placeholder || c(S).colorPicker.notSet,
413
- disabled: r.disabled,
414
- "aria-label": c(S).colorPicker.hexValue,
415
- onInput: q
416
- }, null, 46, Ie), F.value ? (i(), m("button", {
412
+ placeholder: t.placeholder || x(l).colorPicker.notSet,
413
+ disabled: t.disabled,
414
+ "aria-label": x(l).colorPicker.hexValue,
415
+ onInput: J
416
+ }, null, 46, Ie), F.value ? (o(), u("button", {
417
417
  key: 0,
418
418
  type: "button",
419
- "aria-label": c(S).colorPicker.clear,
420
- title: c(S).colorPicker.clear,
419
+ "aria-label": x(l).colorPicker.clear,
420
+ title: x(l).colorPicker.clear,
421
421
  class: "tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
422
- onClick: J
423
- }, [l(c(I), {
422
+ onClick: Y
423
+ }, [D(x(L), {
424
424
  size: 14,
425
425
  "stroke-width": 1.5
426
426
  })], 8, Le)) : h("", !0)])) : h("", !0),
427
- (i(), y(f, {
428
- to: c(X),
429
- disabled: !c(X)
430
- }, [l(b, {
427
+ (o(), g(m, {
428
+ to: x(Z),
429
+ disabled: !x(Z)
430
+ }, [D(b, {
431
431
  "enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
432
432
  "enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
433
433
  "enter-to-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
@@ -435,45 +435,45 @@ var Pe = [
435
435
  "leave-from-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
436
436
  "leave-to-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1"
437
437
  }, {
438
- default: n(() => [C.value ? (i(), m("div", {
438
+ default: c(() => [C.value ? (o(), u("div", {
439
439
  key: 0,
440
440
  ref_key: "popoverRef",
441
- ref: E,
442
- "data-tpl-theme": c(be),
441
+ ref: w,
442
+ "data-tpl-theme": x(ye),
443
443
  class: "tpl-color-popover tpl:absolute tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:shadow-[var(--tpl-shadow-lg)]",
444
- style: v({
445
- top: `${Z.value.top}px`,
446
- left: `${Z.value.left}px`,
447
- ...c(ye)
444
+ style: E({
445
+ top: `${Q.value.top}px`,
446
+ left: `${Q.value.left}px`,
447
+ ...x(ve)
448
448
  })
449
449
  }, [
450
- r.allowTransparent ? (i(), m("button", {
450
+ t.allowTransparent ? (o(), u("button", {
451
451
  key: 0,
452
452
  type: "button",
453
453
  "data-testid": "color-picker-transparent",
454
454
  "aria-pressed": j.value,
455
- "aria-label": c(S).colorPicker.transparent,
456
- title: c(S).colorPicker.transparent,
457
- class: d(["tpl:mb-2 tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2 tpl:py-1 tpl:text-left tpl:text-xs tpl:text-[var(--tpl-text)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)]", j.value ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "tpl:hover:border-[var(--tpl-text-dim)]"]),
458
- onClick: Y
459
- }, [a[2] ||= x("span", { class: "tpl-color-swatch-transparent tpl:size-4 tpl:shrink-0 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)]" }, null, -1), D(" " + T(c(S).colorPicker.transparent), 1)], 10, ze)) : h("", !0),
460
- z.value ? (i(), m("div", {
455
+ "aria-label": x(l).colorPicker.transparent,
456
+ title: x(l).colorPicker.transparent,
457
+ class: v(["tpl:mb-2 tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2 tpl:py-1 tpl:text-left tpl:text-xs tpl:text-[var(--tpl-text)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)]", j.value ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "tpl:hover:border-[var(--tpl-text-dim)]"]),
458
+ onClick: X
459
+ }, [n[2] ||= y("span", { class: "tpl-color-swatch-transparent tpl:size-4 tpl:shrink-0 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)]" }, null, -1), d(" " + p(x(l).colorPicker.transparent), 1)], 10, ze)) : h("", !0),
460
+ z.value ? (o(), u("div", {
461
461
  key: 1,
462
462
  role: "radiogroup",
463
- "aria-label": c(S).colorPicker.presetColors,
464
- class: d(["tpl:flex tpl:flex-wrap tpl:gap-1.5", B.value && "tpl:mb-2"]),
463
+ "aria-label": x(l).colorPicker.presetColors,
464
+ class: v(["tpl:flex tpl:flex-wrap tpl:gap-1.5", B.value && "tpl:mb-2"]),
465
465
  onKeydown: me
466
- }, [U.value ? (i(), m("button", {
466
+ }, [U.value ? (o(), u("button", {
467
467
  key: 0,
468
468
  type: "button",
469
469
  role: "radio",
470
- "aria-label": c(S).colorPicker.clear,
471
- title: c(S).colorPicker.clear,
470
+ "aria-label": x(l).colorPicker.clear,
471
+ title: x(l).colorPicker.clear,
472
472
  "aria-checked": A.value,
473
473
  tabindex: K(),
474
- class: d(["tpl-color-swatch-empty tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]", A.value ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "tpl:hover:border-[var(--tpl-text-dim)]"]),
475
- onClick: J
476
- }, null, 10, Ve)) : h("", !0), (i(!0), m(w, null, t(R.value, (e, t) => (i(), m("button", {
474
+ class: v(["tpl-color-swatch-empty tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]", A.value ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "tpl:hover:border-[var(--tpl-text-dim)]"]),
475
+ onClick: Y
476
+ }, null, 10, Ve)) : h("", !0), (o(!0), u(T, null, i(R.value, (e, t) => (o(), u("button", {
477
477
  key: e,
478
478
  type: "button",
479
479
  role: "radio",
@@ -481,37 +481,37 @@ var Pe = [
481
481
  title: e,
482
482
  "aria-checked": H(e),
483
483
  tabindex: pe(t),
484
- style: v({ backgroundColor: e }),
485
- class: d(["tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]", H(e) ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "tpl:hover:border-[var(--tpl-text-dim)]"]),
484
+ style: E({ backgroundColor: e }),
485
+ class: v(["tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]", H(e) ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "tpl:hover:border-[var(--tpl-text-dim)]"]),
486
486
  onClick: (t) => fe(e)
487
487
  }, null, 14, He))), 128))], 42, Be)) : h("", !0),
488
- B.value ? (i(), m("hex-color-picker", {
488
+ B.value ? (o(), u("hex-color-picker", {
489
489
  key: 2,
490
- color: P.value,
491
- "aria-label": c(S).colorPicker.pickColor,
492
- onColorChanged: he,
493
- onPointerdown: ge,
494
- onPointerup: _e,
495
- onKeydown: a[0] ||= u((e) => C.value = !1, ["escape"])
490
+ color: le.value,
491
+ "aria-label": x(l).colorPicker.pickColor,
492
+ onColorChanged: q,
493
+ onPointerdown: he,
494
+ onPointerup: ge,
495
+ onKeydown: n[0] ||= f((e) => C.value = !1, ["escape"])
496
496
  }, null, 40, Ue)) : h("", !0),
497
- r.swatchOnly && B.value ? (i(), m("div", We, [x("input", {
497
+ t.swatchOnly && B.value ? (o(), u("div", We, [y("input", {
498
498
  type: "text",
499
- class: d([c(de), "tpl:w-full"]),
500
- style: v(F.value ? { paddingRight: "2.25rem" } : void 0),
499
+ class: v([x(de), "tpl:w-full"]),
500
+ style: E(F.value ? { paddingRight: "2.25rem" } : void 0),
501
501
  value: M.value,
502
- placeholder: r.placeholder || c(S).colorPicker.notSet,
503
- disabled: r.disabled,
504
- "aria-label": c(S).colorPicker.hexValue,
505
- onChange: q,
506
- onKeydown: a[1] ||= u(_((e) => e.target.blur(), ["prevent"]), ["enter"])
507
- }, null, 46, Ge), F.value ? (i(), m("button", {
502
+ placeholder: t.placeholder || x(l).colorPicker.notSet,
503
+ disabled: t.disabled,
504
+ "aria-label": x(l).colorPicker.hexValue,
505
+ onChange: J,
506
+ onKeydown: n[1] ||= f(_((e) => e.target.blur(), ["prevent"]), ["enter"])
507
+ }, null, 46, Ge), F.value ? (o(), u("button", {
508
508
  key: 0,
509
509
  type: "button",
510
- "aria-label": c(S).colorPicker.clear,
511
- title: c(S).colorPicker.clear,
510
+ "aria-label": x(l).colorPicker.clear,
511
+ title: x(l).colorPicker.clear,
512
512
  class: "tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
513
- onClick: J
514
- }, [l(c(I), {
513
+ onClick: Y
514
+ }, [D(x(L), {
515
515
  size: 14,
516
516
  "stroke-width": 1.5
517
517
  })], 8, Ke)) : h("", !0)])) : h("", !0)
@@ -531,7 +531,7 @@ var Pe = [
531
531
  "data-merge-tag-value",
532
532
  "onMousedown",
533
533
  "onMousemove"
534
- ], Ze = { class: "tpl:font-medium" }, Qe = { class: "tpl:text-[var(--tpl-text-dim)] tpl:font-mono" }, $e = /* @__PURE__ */ o({
534
+ ], Ze = { class: "tpl:font-medium" }, Qe = { class: "tpl:text-[var(--tpl-text-dim)] tpl:font-mono" }, $e = /* @__PURE__ */ n({
535
535
  __name: "MergeTagSuggestionList",
536
536
  props: {
537
537
  items: {},
@@ -541,27 +541,27 @@ var Pe = [
541
541
  },
542
542
  emits: ["select", "hover"],
543
543
  setup(e) {
544
- let n = e;
545
- function r(e) {
546
- return n.listId ? `${n.listId}-opt-${e}` : void 0;
544
+ let t = e;
545
+ function n(e) {
546
+ return t.listId ? `${t.listId}-opt-${e}` : void 0;
547
547
  }
548
- return (n, a) => (i(), m("div", {
548
+ return (t, r) => (o(), u("div", {
549
549
  id: e.listId,
550
550
  class: "tpl:min-w-[200px] tpl:max-w-[320px] tpl:max-h-[50vh] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:py-1 tpl:shadow-[var(--tpl-shadow-lg)]",
551
551
  role: "listbox",
552
552
  "data-testid": "merge-tag-suggestion-list"
553
- }, [e.items.length === 0 ? (i(), m("div", Ye, T(e.emptyText), 1)) : h("", !0), (i(!0), m(w, null, t(e.items, (t, a) => (i(), m("button", {
554
- key: t.value,
555
- id: r(a),
553
+ }, [e.items.length === 0 ? (o(), u("div", Ye, p(e.emptyText), 1)) : h("", !0), (o(!0), u(T, null, i(e.items, (r, i) => (o(), u("button", {
554
+ key: r.value,
555
+ id: n(i),
556
556
  type: "button",
557
557
  role: "option",
558
- "aria-selected": a === e.selectedIndex,
559
- "data-selected": a === e.selectedIndex ? "true" : "false",
560
- "data-merge-tag-value": t.value,
561
- class: d(["tpl:flex tpl:w-full tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors", a === e.selectedIndex ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
562
- onMousedown: _((e) => n.$emit("select", t), ["prevent", "stop"]),
563
- onMousemove: (t) => a !== e.selectedIndex && n.$emit("hover", a)
564
- }, [x("span", Ze, T(t.label), 1), x("span", Qe, T(t.value), 1)], 42, Xe))), 128))], 8, Je));
558
+ "aria-selected": i === e.selectedIndex,
559
+ "data-selected": i === e.selectedIndex ? "true" : "false",
560
+ "data-merge-tag-value": r.value,
561
+ class: v(["tpl:flex tpl:w-full tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors", i === e.selectedIndex ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
562
+ onMousedown: _((e) => t.$emit("select", r), ["prevent", "stop"]),
563
+ onMousemove: (n) => i !== e.selectedIndex && t.$emit("hover", i)
564
+ }, [y("span", Ze, p(r.label), 1), y("span", Qe, p(r.value), 1)], 42, Xe))), 128))], 8, Je));
565
565
  }
566
566
  }), et = 10, tt = 0;
567
567
  function nt(e, t) {
@@ -574,17 +574,17 @@ function nt(e, t) {
574
574
  function rt(e, t, n, r) {
575
575
  return t.length === 0 ? e.key === "Enter" || e.key === "Tab" : e.key === "ArrowDown" ? (n.value = (n.value + 1) % t.length, !0) : e.key === "ArrowUp" ? (n.value = (n.value - 1 + t.length) % t.length, !0) : e.key === "Enter" || e.key === "Tab" ? (r(t[n.value]), !0) : !1;
576
576
  }
577
- function it(e, t) {
578
- let n = null, r = null, i = null, o = a([]), s = a(0), c = null, l = `tpl-merge-tag-suggestion-${++tt}`, u = null, d = [], f = null;
579
- function p() {
580
- v(u?.() ?? null);
581
- }
577
+ function it(t, n) {
578
+ let r = null, i = null, a = null, o = e([]), c = e(0), l = null, u = `tpl-merge-tag-suggestion-${++tt}`, d = null, f = [], p = null;
582
579
  function m() {
583
- p(), f !== null && cancelAnimationFrame(f), f = requestAnimationFrame(() => {
584
- f = null, p();
580
+ y(d?.() ?? null);
581
+ }
582
+ function h() {
583
+ m(), p !== null && cancelAnimationFrame(p), p = requestAnimationFrame(() => {
584
+ p = null, m();
585
585
  });
586
586
  }
587
- function h(e) {
587
+ function g(e) {
588
588
  let t = [], n = e?.parentElement ?? null;
589
589
  for (; n && n !== document.body && n !== document.documentElement;) {
590
590
  let e = window.getComputedStyle(n), r = e.overflow + e.overflowX + e.overflowY;
@@ -592,30 +592,30 @@ function it(e, t) {
592
592
  }
593
593
  return t;
594
594
  }
595
- function g(e) {
596
- d = [window, ...h(e)];
597
- for (let e of d) e.addEventListener("scroll", p, {
595
+ function _(e) {
596
+ f = [window, ...g(e)];
597
+ for (let e of f) e.addEventListener("scroll", m, {
598
598
  passive: !0,
599
599
  capture: !0
600
600
  });
601
- window.addEventListener("resize", p, { passive: !0 });
601
+ window.addEventListener("resize", m, { passive: !0 });
602
602
  }
603
- function _() {
604
- for (let e of d) e.removeEventListener("scroll", p, { capture: !0 });
605
- window.removeEventListener("resize", p), d = [];
603
+ function v() {
604
+ for (let e of f) e.removeEventListener("scroll", m, { capture: !0 });
605
+ window.removeEventListener("resize", m), f = [];
606
606
  }
607
- function v(e) {
608
- if (!r || !e || e.bottom < 0 || e.top > window.innerHeight) return;
609
- r.style.position = "absolute", r.style.zIndex = "9999";
610
- let t = r.offsetParent?.getBoundingClientRect(), n = t?.top ?? 0;
611
- r.style.left = `${e.left - (t?.left ?? 0)}px`, r.style.top = `${e.bottom - n}px`;
612
- let i = r.offsetHeight;
613
- if (i !== 0 && window.innerHeight - e.bottom < i) {
614
- let t = Math.max(0, e.top - i);
615
- r.style.top = `${t - n}px`;
607
+ function y(e) {
608
+ if (!i || !e || e.bottom < 0 || e.top > window.innerHeight) return;
609
+ i.style.position = "absolute", i.style.zIndex = "9999";
610
+ let t = i.offsetParent?.getBoundingClientRect(), n = t?.top ?? 0;
611
+ i.style.left = `${e.left - (t?.left ?? 0)}px`, i.style.top = `${e.bottom - n}px`;
612
+ let r = i.offsetHeight;
613
+ if (r !== 0 && window.innerHeight - e.bottom < r) {
614
+ let t = Math.max(0, e.top - r);
615
+ i.style.top = `${t - n}px`;
616
616
  }
617
617
  }
618
- function y(e, t) {
618
+ function b(e, t) {
619
619
  let n = t?.closest("[data-tpl-theme]");
620
620
  if (!n) return;
621
621
  let r = n.getAttribute("data-tpl-theme");
@@ -627,60 +627,65 @@ function it(e, t) {
627
627
  }
628
628
  e.style.fontFamily = i.fontFamily, e.style.fontSize = i.fontSize, e.style.lineHeight = i.lineHeight;
629
629
  }
630
- function b(e) {
631
- i && (e ? (i.setAttribute("role", "combobox"), i.setAttribute("aria-haspopup", "listbox"), i.setAttribute("aria-expanded", "true"), i.setAttribute("aria-controls", l)) : (i.removeAttribute("aria-expanded"), i.removeAttribute("aria-controls"), i.removeAttribute("aria-activedescendant"), i.removeAttribute("aria-haspopup"), i.removeAttribute("role")));
630
+ function x(e) {
631
+ a && (e ? (a.setAttribute("role", "combobox"), a.setAttribute("aria-haspopup", "listbox"), a.setAttribute("aria-expanded", "true"), a.setAttribute("aria-controls", u)) : (a.removeAttribute("aria-expanded"), a.removeAttribute("aria-controls"), a.removeAttribute("aria-activedescendant"), a.removeAttribute("aria-haspopup"), a.removeAttribute("role")));
632
632
  }
633
- function x() {
634
- i && (o.value.length === 0 ? i.removeAttribute("aria-activedescendant") : i.setAttribute("aria-activedescendant", `${l}-opt-${s.value}`));
633
+ function S() {
634
+ a && (o.value.length === 0 ? a.removeAttribute("aria-activedescendant") : a.setAttribute("aria-activedescendant", `${u}-opt-${c.value}`));
635
635
  }
636
- function S(e) {
637
- c?.(e);
636
+ function C(e) {
637
+ l?.(e);
638
638
  }
639
639
  return {
640
- open: ({ items: a, getRect: d, anchorEl: f, onCommand: p }) => {
641
- o.value = a, s.value = 0, c = p, r = document.createElement("div"), r.setAttribute("data-testid", "merge-tag-suggestion-popup"), i = f, y(r, f), (t?.value ?? document.body).appendChild(r), n = C({ render() {
642
- return E($e, {
640
+ open: ({ items: e, getRect: f, anchorEl: p, onCommand: m }) => {
641
+ o.value = e, c.value = 0, l = m, i = document.createElement("div"), i.setAttribute("data-testid", "merge-tag-suggestion-popup"), a = p, b(i, p), (n?.value ?? document.body).appendChild(i), r = w({ render() {
642
+ return s($e, {
643
643
  items: o.value,
644
- selectedIndex: s.value,
645
- emptyText: e,
646
- listId: l,
647
- onSelect: (e) => S(e),
644
+ selectedIndex: c.value,
645
+ emptyText: t,
646
+ listId: u,
647
+ onSelect: (e) => C(e),
648
648
  onHover: (e) => {
649
- s.value = e, x();
649
+ c.value = e, S();
650
650
  }
651
651
  });
652
- } }), n.mount(r), b(!0), x(), u = d, m(), g(f);
652
+ } }), r.mount(i), x(!0), S(), d = f, h(), _(p);
653
653
  },
654
654
  update: ({ items: e, getRect: t, onCommand: n }) => {
655
- o.value = e, s.value >= e.length && (s.value = 0), c = n, x(), u = t, m();
655
+ o.value = e, c.value >= e.length && (c.value = 0), l = n, S(), d = t, h();
656
656
  },
657
657
  handleKeyDown: (e) => {
658
- let t = rt(e, o.value, s, S);
659
- return t && x(), t;
658
+ let t = rt(e, o.value, c, C);
659
+ return t && S(), t;
660
660
  },
661
661
  close: () => {
662
- r !== null && (f !== null && (cancelAnimationFrame(f), f = null), _(), b(!1), n?.unmount(), r.remove(), n = null, r = null, i = null, c = null, u = null);
662
+ i !== null && (p !== null && (cancelAnimationFrame(p), p = null), v(), x(!1), r?.unmount(), i.remove(), r = null, i = null, a = null, l = null, d = null);
663
663
  },
664
- isOpen: () => r !== null
664
+ isOpen: () => i !== null
665
665
  };
666
666
  }
667
667
  //#endregion
668
668
  //#region src/utils/mergeTagTrigger.ts
669
- function at(e, t, n, r) {
669
+ function at(e, t, n, r, i) {
670
670
  if (!n) return null;
671
- let i = e.slice(0, t), a = i.lastIndexOf(n);
672
- if (a === -1) return null;
673
- let o = i.slice(a + n.length);
674
- return /\s/.test(o) || r && o.includes(r) ? null : {
675
- triggerStart: a,
671
+ let a = e.slice(0, t), o = a.lastIndexOf(n);
672
+ if (o === -1 || i && o < ot(a, i)) return null;
673
+ let s = a.slice(o + n.length);
674
+ return /\s/.test(s) || r && s.includes(r) ? null : {
675
+ triggerStart: o,
676
676
  caret: t,
677
- query: o
677
+ query: s
678
678
  };
679
679
  }
680
+ function ot(e, t) {
681
+ let n = new RegExp(t.source, `${t.flags.replace(/[gy]/g, "")}g`), r = 0;
682
+ for (let t of e.matchAll(n)) r = t.index + t[0].length;
683
+ return r;
684
+ }
680
685
  //#endregion
681
686
  //#region src/utils/textFieldCaret.ts
682
- var ot = /* @__PURE__ */ "boxSizing.width.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.borderStyle.paddingTop.paddingRight.paddingBottom.paddingLeft.fontStyle.fontVariant.fontWeight.fontStretch.fontSize.lineHeight.fontFamily.textAlign.textTransform.textIndent.letterSpacing.wordSpacing.tabSize.whiteSpace.wordWrap.wordBreak".split(".");
683
- function st(e, t, n) {
687
+ var st = /* @__PURE__ */ "boxSizing.width.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.borderStyle.paddingTop.paddingRight.paddingBottom.paddingLeft.fontStyle.fontVariant.fontWeight.fontStretch.fontSize.lineHeight.fontFamily.textAlign.textTransform.textIndent.letterSpacing.wordSpacing.tabSize.whiteSpace.wordWrap.wordBreak".split(".");
688
+ function ct(e, t, n) {
684
689
  return {
685
690
  left: e,
686
691
  top: t,
@@ -693,7 +698,7 @@ function st(e, t, n) {
693
698
  toJSON: () => ({})
694
699
  };
695
700
  }
696
- function ct(e, t) {
701
+ function lt(e, t) {
697
702
  let n = e.ownerDocument, r = n.defaultView;
698
703
  if (!r) return null;
699
704
  let i = e.tagName === "INPUT", a = r.getComputedStyle(e), o = n.createElement("div");
@@ -701,7 +706,7 @@ function ct(e, t) {
701
706
  let s = o.style;
702
707
  s.position = "absolute", s.visibility = "hidden", s.top = "0", s.left = "0", s.overflow = "hidden", s.whiteSpace = i ? "pre" : "pre-wrap", s.wordWrap = i ? "normal" : "break-word";
703
708
  let c = s, l = a;
704
- for (let e of ot) c[e] = l[e];
709
+ for (let e of st) c[e] = l[e];
705
710
  i && (s.width = "auto", s.whiteSpace = "pre");
706
711
  let u = e.value, d = u.slice(0, t);
707
712
  i && (d = d.replace(/\s/g, "\xA0")), o.textContent = d;
@@ -710,127 +715,127 @@ function ct(e, t) {
710
715
  let p = f.offsetTop, m = f.offsetLeft;
711
716
  n.body.removeChild(o);
712
717
  let h = e.getBoundingClientRect(), g = parseFloat(a.borderTopWidth) || 0, _ = parseFloat(a.borderLeftWidth) || 0, v = parseFloat(a.lineHeight) || parseFloat(a.fontSize) || 0, y = h.left + m + _ - e.scrollLeft;
713
- if (i) return st(y, h.top, h.bottom);
718
+ if (i) return ct(y, h.top, h.bottom);
714
719
  let b = h.top + p + g - e.scrollTop;
715
- return st(y, b, b + v);
720
+ return ct(y, b, b + v);
716
721
  }
717
722
  //#endregion
718
723
  //#region src/composables/useMergeTagAutocomplete.ts
719
- var lt = /* @__PURE__ */ new Set([
724
+ var ut = /* @__PURE__ */ new Set([
720
725
  "ArrowLeft",
721
726
  "ArrowRight",
722
727
  "Home",
723
728
  "End"
724
729
  ]);
725
- function ut(t) {
726
- let { elementRef: n, modelValue: i, emit: a, mergeTags: o, syntax: c, enabled: l, onInsert: u } = t, d = O(c), f = A(c), m = p(() => l && d !== null && o.value.length > 0), h = e(M, null), _ = it((S(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", oe()), v = !1;
727
- r() && s(() => {
728
- v = !0, _.close();
730
+ function dt(e) {
731
+ let { elementRef: n, modelValue: i, emit: o, mergeTags: s, syntax: c, enabled: u, onInsert: d } = e, f = O(c), p = A(c), m = S(() => u && f !== null && s.value.length > 0), h = r(M, null), g = it((a(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", ae()), _ = !1;
732
+ C() && l(() => {
733
+ _ = !0, g.close();
729
734
  });
730
- function y(e) {
735
+ function v(e) {
731
736
  let t = e.value ?? "";
732
- return at(t, e.selectionStart ?? t.length, d, f);
737
+ return at(t, e.selectionStart ?? t.length, f, p, c.value);
733
738
  }
734
- function b(e, t, r) {
735
- let o = e.value ?? i(), s = o.slice(t.caret), c = f && s.startsWith(f) ? f.length : 0, l = o.slice(0, t.triggerStart), d = o.slice(t.caret + c), p = l + r.value + d, m = l.length + r.value.length;
736
- u?.(), a(p), _.close(), g(() => {
737
- if (v) return;
739
+ function y(e, r, a) {
740
+ let s = e.value ?? i(), c = s.slice(r.caret), l = p && c.startsWith(p) ? p.length : 0, u = s.slice(0, r.triggerStart), f = s.slice(r.caret + l), m = u + a.value + f, h = u.length + a.value.length;
741
+ d?.(), o(m), g.close(), t(() => {
742
+ if (_) return;
738
743
  let e = n.value;
739
- e?.focus(), e?.setSelectionRange(m, m);
744
+ e?.focus(), e?.setSelectionRange(h, h);
740
745
  });
741
746
  }
742
- function x() {
743
- if (!m.value || v) return;
747
+ function b() {
748
+ if (!m.value || _) return;
744
749
  let e = n.value;
745
750
  if (!e) {
746
- _.close();
751
+ g.close();
747
752
  return;
748
753
  }
749
- let t = y(e);
754
+ let t = v(e);
750
755
  if (!t) {
751
- _.close();
756
+ g.close();
752
757
  return;
753
758
  }
754
- let r = nt(o.value, t.query), i = () => ct(e, t.triggerStart), a = (n) => b(e, t, n);
755
- _.isOpen() ? _.update({
759
+ let r = nt(s.value, t.query), i = () => lt(e, t.triggerStart), a = (n) => y(e, t, n);
760
+ g.isOpen() ? g.update({
756
761
  items: r,
757
762
  getRect: i,
758
763
  onCommand: a
759
- }) : _.open({
764
+ }) : g.open({
760
765
  items: r,
761
766
  getRect: i,
762
767
  anchorEl: e,
763
768
  onCommand: a
764
769
  });
765
770
  }
766
- function C(e) {
767
- return _.isOpen() ? e.key === "Escape" ? (_.close(), !0) : lt.has(e.key) ? (_.close(), !1) : _.handleKeyDown(e) : !1;
771
+ function x(e) {
772
+ return g.isOpen() ? e.key === "Escape" ? (g.close(), !0) : ut.has(e.key) ? (g.close(), !1) : g.handleKeyDown(e) : !1;
768
773
  }
769
774
  return {
770
775
  available: m,
771
- refresh: x,
772
- handleKeydown: C,
773
- close: () => _.close(),
774
- isOpen: () => _.isOpen()
776
+ refresh: b,
777
+ handleKeydown: x,
778
+ close: () => g.close(),
779
+ isOpen: () => g.isOpen()
775
780
  };
776
781
  }
777
782
  //#endregion
778
783
  //#region src/composables/useMergeTagField.ts
779
- function dt(e) {
780
- let { modelValue: t, emit: n, elementRef: i } = e, { mergeTags: o, canRequestMergeTag: c, isRequesting: l, isMergeTagValue: u, getMergeTagDisplayLabel: d, findMergeTag: f, requestMergeTag: m, syntax: h, autocomplete: _ } = R(), { canInsertLogicTag: v, isRequesting: y, requestLogicTag: b } = ue(), x = a(!1), S = !1, C = !1;
781
- r() && s(() => {
782
- C = !0;
784
+ function ft(n) {
785
+ let { modelValue: r, emit: i, elementRef: a } = n, { mergeTags: o, canRequestMergeTag: s, isRequesting: c, isMergeTagValue: u, getMergeTagDisplayLabel: d, findMergeTag: f, requestMergeTag: p, syntax: m, autocomplete: h } = R(), { canInsertLogicTag: g, isRequesting: _, requestLogicTag: v } = ue(), y = e(!1), b = !1, x = !1;
786
+ C() && l(() => {
787
+ x = !0;
783
788
  });
784
- let w = ut({
785
- elementRef: i,
786
- modelValue: t,
787
- emit: n,
789
+ let w = dt({
790
+ elementRef: a,
791
+ modelValue: r,
792
+ emit: i,
788
793
  mergeTags: o,
789
- syntax: h,
790
- enabled: _,
794
+ syntax: m,
795
+ enabled: h,
791
796
  onInsert: () => {
792
- x.value = !0;
797
+ y.value = !0;
793
798
  }
794
- }), T = p(() => {
795
- let e = t();
799
+ }), T = S(() => {
800
+ let e = r();
796
801
  if (!e) return [];
797
- let n = [], r = `(${h.value.source}|${h.logic.source})`, i = new RegExp(r, "g"), a = 0, o;
802
+ let t = [], n = `(${m.value.source}|${m.logic.source})`, i = new RegExp(n, "g"), a = 0, o;
798
803
  for (; (o = i.exec(e)) !== null;) {
799
- o.index > a && n.push({
804
+ o.index > a && t.push({
800
805
  type: "text",
801
806
  value: e.slice(a, o.index)
802
807
  });
803
- let t = o[0];
804
- u(t) ? n.push({
808
+ let n = o[0];
809
+ u(n) ? t.push({
805
810
  type: "mergeTag",
806
- value: t,
807
- label: d(t)
808
- }) : j(t, h) ? n.push({
811
+ value: n,
812
+ label: d(n)
813
+ }) : j(n, m) ? t.push({
809
814
  type: "logicMergeTag",
810
- value: t,
811
- keyword: k(t, h)
812
- }) : n.push({
815
+ value: n,
816
+ keyword: k(n, m)
817
+ }) : t.push({
813
818
  type: "text",
814
- value: t
815
- }), a = o.index + t.length;
819
+ value: n
820
+ }), a = o.index + n.length;
816
821
  }
817
- return a < e.length && n.push({
822
+ return a < e.length && t.push({
818
823
  type: "text",
819
824
  value: e.slice(a)
820
- }), n;
821
- }), E = p(() => T.value.some((e) => e.type === "mergeTag" || e.type === "logicMergeTag"));
825
+ }), t;
826
+ }), E = S(() => T.value.some((e) => e.type === "mergeTag" || e.type === "logicMergeTag"));
822
827
  function D() {
823
- x.value = !0, g(() => {
824
- i.value?.focus();
825
- let e = t()?.length || 0;
826
- i.value?.setSelectionRange(e, e);
828
+ y.value = !0, t(() => {
829
+ a.value?.focus();
830
+ let e = r()?.length || 0;
831
+ a.value?.setSelectionRange(e, e);
827
832
  });
828
833
  }
829
834
  function O() {
830
- S || (x.value = !1);
835
+ b || (y.value = !1);
831
836
  }
832
837
  function A(e) {
833
- n(e.target.value), w.refresh();
838
+ i(e.target.value), w.refresh();
834
839
  }
835
840
  function ee(e) {
836
841
  return w.handleKeydown(e) ? (e.preventDefault(), !0) : (e.key === "Escape" && O(), !1);
@@ -842,64 +847,64 @@ function dt(e) {
842
847
  w.close(), O();
843
848
  }
844
849
  function ne() {
845
- n("");
850
+ i("");
846
851
  }
847
852
  async function re() {
848
- let e = x.value && i.value ? i.value.selectionStart ?? t().length : t().length;
849
- S = !0;
850
- let r;
853
+ let e = y.value && a.value ? a.value.selectionStart ?? r().length : r().length;
854
+ b = !0;
855
+ let n;
851
856
  try {
852
- r = await m();
857
+ n = await p();
853
858
  } finally {
854
- S = !1;
859
+ b = !1;
855
860
  }
856
- if (!C && r) {
857
- let a = t().slice(0, e), o = t().slice(e), s = a + r.value + o;
858
- n(s), x.value = !0, g(() => {
859
- if (C) return;
860
- let t = e + r.value.length;
861
- i.value?.focus(), i.value?.setSelectionRange(t, t);
861
+ if (!x && n) {
862
+ let o = r().slice(0, e), s = r().slice(e), c = o + n.value + s;
863
+ i(c), y.value = !0, t(() => {
864
+ if (x) return;
865
+ let t = e + n.value.length;
866
+ a.value?.focus(), a.value?.setSelectionRange(t, t);
862
867
  });
863
868
  }
864
869
  }
865
870
  async function N(e) {
866
- let t = T.value, r = t[e];
867
- if (r?.type !== "mergeTag") return;
868
- S = !0;
869
- let i;
871
+ let t = T.value, n = t[e];
872
+ if (n?.type !== "mergeTag") return;
873
+ b = !0;
874
+ let r;
870
875
  try {
871
- i = await m({
876
+ r = await p({
872
877
  reason: "edit",
873
- current: f(r.value)
878
+ current: f(n.value)
874
879
  });
875
880
  } finally {
876
- S = !1;
881
+ b = !1;
877
882
  }
878
- !C && i && n(t.map((t, n) => n === e ? i.value : t.value).join(""));
883
+ !x && r && i(t.map((t, n) => n === e ? r.value : t.value).join(""));
879
884
  }
880
- async function ie() {
881
- let e = i.value, r = e?.selectionStart ?? t().length, a = e?.selectionEnd ?? r;
882
- S = !0;
883
- let o;
885
+ async function P() {
886
+ let e = a.value, n = e?.selectionStart ?? r().length, o = e?.selectionEnd ?? n;
887
+ b = !0;
888
+ let s;
884
889
  try {
885
- o = await b();
890
+ s = await v();
886
891
  } finally {
887
- S = !1;
892
+ b = !1;
888
893
  }
889
- if (C || !o) return;
890
- let s = t(), c, l;
891
- "before" in o ? (c = s.slice(0, r) + o.before + s.slice(r, a) + o.after + s.slice(a), l = r + o.before.length + (a - r)) : (c = s.slice(0, r) + o.value + s.slice(r), l = r + o.value.length), n(c), x.value = !0, g(() => {
892
- C || (i.value?.focus(), i.value?.setSelectionRange(l, l));
894
+ if (x || !s) return;
895
+ let c = r(), l, u;
896
+ "before" in s ? (l = c.slice(0, n) + s.before + c.slice(n, o) + s.after + c.slice(o), u = n + s.before.length + (o - n)) : (l = c.slice(0, n) + s.value + c.slice(n), u = n + s.value.length), i(l), y.value = !0, t(() => {
897
+ x || (a.value?.focus(), a.value?.setSelectionRange(u, u));
893
898
  });
894
899
  }
895
900
  return {
896
901
  segments: T,
897
902
  hasMergeTags: E,
898
- canRequestMergeTag: c,
899
- isRequestingMergeTag: l,
900
- canInsertLogicTag: v,
901
- isRequestingLogicTag: y,
902
- isEditing: x,
903
+ canRequestMergeTag: s,
904
+ isRequestingMergeTag: c,
905
+ canInsertLogicTag: g,
906
+ isRequestingLogicTag: _,
907
+ isEditing: y,
903
908
  startEditing: D,
904
909
  stopEditing: O,
905
910
  handleInput: A,
@@ -909,20 +914,20 @@ function dt(e) {
909
914
  clearValue: ne,
910
915
  insertMergeTag: re,
911
916
  replaceMergeTagAt: N,
912
- insertLogicTag: ie,
917
+ insertLogicTag: P,
913
918
  autocompleteAvailable: w.available
914
919
  };
915
920
  }
916
921
  //#endregion
917
922
  //#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
918
- var ft = ["aria-label"], pt = [
923
+ var pt = ["aria-label"], mt = [
919
924
  "data-tooltip",
920
925
  "aria-label",
921
926
  "onClick"
922
- ], mt = ["data-tooltip"], ht = ["data-tooltip"], gt = {
927
+ ], ht = ["data-tooltip"], gt = ["data-tooltip"], _t = {
923
928
  key: 3,
924
929
  class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
925
- }, _t = ["aria-label", "title"], vt = ["aria-label", "title"], yt = /* @__PURE__ */ o({
930
+ }, vt = ["aria-label", "title"], yt = ["aria-label", "title"], bt = /* @__PURE__ */ n({
926
931
  __name: "MergeTagSegments",
927
932
  props: {
928
933
  segments: {},
@@ -934,38 +939,38 @@ var ft = ["aria-label"], pt = [
934
939
  "clear",
935
940
  "repick"
936
941
  ],
937
- setup(e, { emit: n }) {
938
- let r = n, { t: a, format: o } = N(), { canRepickMergeTag: s, showRawValue: u } = R();
939
- function f() {
940
- r("edit");
942
+ setup(e, { emit: t }) {
943
+ let n = t, { t: r, format: a } = N(), { canRepickMergeTag: s, showRawValue: c } = R();
944
+ function l() {
945
+ n("edit");
941
946
  }
942
- return (n, p) => (i(), m("div", {
947
+ return (t, d) => (o(), u("div", {
943
948
  role: "group",
944
- "aria-label": c(a).mergeTag.fieldGroup,
945
- class: d([e.displayClass, { "tpl-pulse-fill": e.pulse }]),
946
- onClick: f
949
+ "aria-label": x(r).mergeTag.fieldGroup,
950
+ class: v([e.displayClass, { "tpl-pulse-fill": e.pulse }]),
951
+ onClick: l
947
952
  }, [
948
- (i(!0), m(w, null, t(e.segments, (e, t) => (i(), m(w, { key: `${e.type}-${t}-${e.value}` }, [e.type === "mergeTag" && c(s)(e.value) ? (i(), m("button", {
953
+ (o(!0), u(T, null, i(e.segments, (e, t) => (o(), u(T, { key: `${e.type}-${t}-${e.value}` }, [e.type === "mergeTag" && x(s)(e.value) ? (o(), u("button", {
949
954
  key: 0,
950
955
  type: "button",
951
- class: d(["tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded tpl:border-none tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium", c(u) ? "tpl-tooltip" : ""]),
952
- "data-tooltip": c(u) ? e.value : void 0,
953
- "aria-label": c(o)(c(a).mergeTag.changeTag, { label: e.label }),
956
+ class: v(["tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded tpl:border-none tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium", x(c) ? "tpl-tooltip" : ""]),
957
+ "data-tooltip": x(c) ? e.value : void 0,
958
+ "aria-label": x(a)(x(r).mergeTag.changeTag, { label: e.label }),
954
959
  "data-testid": "merge-tag-field-chip",
955
960
  style: {
956
961
  "background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
957
962
  color: "var(--tpl-primary)"
958
963
  },
959
- onClick: _((e) => r("repick", t), ["stop"])
960
- }, T(e.label), 11, pt)) : e.type === "mergeTag" ? (i(), m("span", {
964
+ onClick: _((e) => n("repick", t), ["stop"])
965
+ }, p(e.label), 11, mt)) : e.type === "mergeTag" ? (o(), u("span", {
961
966
  key: 1,
962
- class: d(["tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium", c(u) ? "tpl-tooltip" : ""]),
963
- "data-tooltip": c(u) ? e.value : void 0,
967
+ class: v(["tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium", x(c) ? "tpl-tooltip" : ""]),
968
+ "data-tooltip": x(c) ? e.value : void 0,
964
969
  style: {
965
970
  "background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
966
971
  color: "var(--tpl-primary)"
967
972
  }
968
- }, T(e.label), 11, mt)) : e.type === "logicMergeTag" ? (i(), m("span", {
973
+ }, p(e.label), 11, ht)) : e.type === "logicMergeTag" ? (o(), u("span", {
969
974
  key: 2,
970
975
  class: "tpl-tooltip tpl:inline-flex tpl:items-center tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase",
971
976
  "data-tooltip": e.value,
@@ -974,80 +979,80 @@ var ft = ["aria-label"], pt = [
974
979
  border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
975
980
  color: "var(--tpl-primary)"
976
981
  }
977
- }, T(e.keyword), 9, ht)) : (i(), m("span", gt, T(e.value), 1))], 64))), 128)),
978
- x("button", {
982
+ }, p(e.keyword), 9, gt)) : (o(), u("span", _t, p(e.value), 1))], 64))), 128)),
983
+ y("button", {
979
984
  type: "button",
980
985
  class: "tpl:ml-auto tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-[var(--tpl-text-dim)] tpl:opacity-60 tpl:transition-all tpl:hover:text-[var(--tpl-primary)] tpl:hover:opacity-100",
981
- "aria-label": c(a).mergeTag.editAsText,
982
- title: c(a).mergeTag.editAsText,
986
+ "aria-label": x(r).mergeTag.editAsText,
987
+ title: x(r).mergeTag.editAsText,
983
988
  "data-testid": "merge-tag-field-edit",
984
- onClick: _(f, ["stop"])
985
- }, [l(c(L), {
989
+ onClick: _(l, ["stop"])
990
+ }, [D(x(F), {
986
991
  size: 12,
987
992
  "stroke-width": 2
988
- })], 8, _t),
989
- x("button", {
993
+ })], 8, vt),
994
+ y("button", {
990
995
  type: "button",
991
996
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-[var(--tpl-text-dim)] tpl:opacity-60 tpl:transition-all tpl:hover:text-[var(--tpl-danger)] tpl:hover:opacity-100",
992
- "aria-label": c(a).mergeTag.remove,
993
- title: c(a).mergeTag.remove,
997
+ "aria-label": x(r).mergeTag.remove,
998
+ title: x(r).mergeTag.remove,
994
999
  "data-testid": "merge-tag-field-clear",
995
- onClick: p[0] ||= _((e) => r("clear"), ["stop"])
996
- }, [l(c(I), {
1000
+ onClick: d[0] ||= _((e) => n("clear"), ["stop"])
1001
+ }, [D(x(L), {
997
1002
  size: 12,
998
1003
  "stroke-width": 2.5
999
- })], 8, vt)
1000
- ], 10, ft));
1004
+ })], 8, yt)
1005
+ ], 10, pt));
1001
1006
  }
1002
- }), bt = [
1007
+ }), xt = [
1003
1008
  "aria-label",
1004
1009
  "title",
1005
1010
  "disabled"
1006
- ], xt = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:hover:bg-[var(--tpl-primary-light)] tpl:hover:text-[var(--tpl-primary)] tpl:hover:border-[var(--tpl-primary)]", St = /* @__PURE__ */ o({
1011
+ ], St = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:hover:bg-[var(--tpl-primary-light)] tpl:hover:text-[var(--tpl-primary)] tpl:hover:border-[var(--tpl-primary)]", Ct = /* @__PURE__ */ n({
1007
1012
  __name: "MergeTagInsertButton",
1008
1013
  props: { disabled: { type: Boolean } },
1009
1014
  emits: ["insert"],
1010
1015
  setup(e) {
1011
1016
  let { t } = N();
1012
- return (n, r) => (i(), m("button", {
1017
+ return (n, r) => (o(), u("button", {
1013
1018
  type: "button",
1014
- class: d([xt, "tpl:mt-1.5"]),
1015
- "aria-label": c(t).mergeTag.insert,
1016
- title: c(t).mergeTag.insert,
1019
+ class: v([St, "tpl:mt-1.5"]),
1020
+ "aria-label": x(t).mergeTag.insert,
1021
+ title: x(t).mergeTag.insert,
1017
1022
  disabled: e.disabled,
1018
1023
  onMousedown: r[0] ||= _(() => {}, ["prevent"]),
1019
1024
  onClick: r[1] ||= (e) => n.$emit("insert")
1020
- }, [l(c(F), {
1025
+ }, [D(x(I), {
1021
1026
  size: 12,
1022
1027
  "stroke-width": 2
1023
- }), D(" " + T(c(t).mergeTag.insertShort), 1)], 42, bt));
1028
+ }), d(" " + p(x(t).mergeTag.insertShort), 1)], 42, xt));
1024
1029
  }
1025
- }), Ct = [
1030
+ }), wt = [
1026
1031
  "aria-label",
1027
1032
  "title",
1028
1033
  "disabled"
1029
- ], wt = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:hover:bg-[var(--tpl-primary-light)] tpl:hover:text-[var(--tpl-primary)] tpl:hover:border-[var(--tpl-primary)]", Tt = /* @__PURE__ */ o({
1034
+ ], Tt = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:hover:bg-[var(--tpl-primary-light)] tpl:hover:text-[var(--tpl-primary)] tpl:hover:border-[var(--tpl-primary)]", Et = /* @__PURE__ */ n({
1030
1035
  __name: "LogicTagInsertButton",
1031
1036
  props: { disabled: { type: Boolean } },
1032
1037
  emits: ["insert"],
1033
1038
  setup(e) {
1034
1039
  let { t } = N();
1035
- return (n, r) => (i(), m("button", {
1040
+ return (n, r) => (o(), u("button", {
1036
1041
  type: "button",
1037
- class: d([wt, "tpl:mt-1.5"]),
1038
- "aria-label": c(t).logicTag.insert,
1039
- title: c(t).logicTag.insert,
1042
+ class: v([Tt, "tpl:mt-1.5"]),
1043
+ "aria-label": x(t).logicTag.insert,
1044
+ title: x(t).logicTag.insert,
1040
1045
  disabled: e.disabled,
1041
1046
  "data-testid": "field-insert-logic-button",
1042
1047
  onMousedown: r[0] ||= _(() => {}, ["prevent"]),
1043
1048
  onClick: r[1] ||= (e) => n.$emit("insert")
1044
- }, [l(c(P), {
1049
+ }, [D(x(le), {
1045
1050
  size: 12,
1046
1051
  "stroke-width": 2
1047
- }), D(" " + T(c(t).logicTag.insertShort), 1)], 42, Ct));
1052
+ }), d(" " + p(x(t).logicTag.insertShort), 1)], 42, wt));
1048
1053
  }
1049
1054
  });
1050
1055
  //#endregion
1051
- export { it as a, qe as c, dt as i, St as n, nt as o, yt as r, rt as s, Tt as t };
1056
+ export { it as a, qe as c, ft as i, Ct as n, nt as o, bt as r, rt as s, Et as t };
1052
1057
 
1053
- //# sourceMappingURL=LogicTagInsertButton-BJ2t2vxC.js.map
1058
+ //# sourceMappingURL=LogicTagInsertButton-CsL2JDOG.js.map