@templatical/editor 0.6.4 → 0.6.5

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 (128) hide show
  1. package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-B2MT0M58.js} +34 -34
  2. package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-w5ek3Z76.js} +62 -62
  3. package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-uXTxJh06.js} +20 -20
  4. package/dist/{cdn/chunks/BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-C0S6kPC4.js} +10 -9
  5. package/dist/{CloudEditor-nzrRhHIi.js → CloudEditor-_GaYluN7.js} +441 -441
  6. package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-C4eXJkXW.js} +20 -20
  7. package/dist/CommentsSidebar-BQROg36f.js +441 -0
  8. package/dist/{cdn/chunks/CountdownBlock-5YdT1uUu.js → CountdownBlock-Bxqe7zwL.js} +21 -22
  9. package/dist/CountdownToolbar-CpFAnjSo.js +210 -0
  10. package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-CfqpcWX6.js} +52 -52
  11. package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-CFkDkjBb.js} +1 -1
  12. package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-EDKHLJtb.js} +79 -79
  13. package/dist/{ModulePreviewCanvas-CHdOwV_4.js → ModulePreviewCanvas-MQxat34K.js} +29 -29
  14. package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Dw8dN1Pt.js} +88 -88
  15. package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-C8IP9HOZ.js} +218 -218
  16. package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CK3Om7ES.js} +38 -38
  17. package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-Bgu0FVr6.js} +34 -34
  18. package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-aSULEKUJ.js} +33 -33
  19. package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-BIAeCAEP.js} +82 -82
  20. package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-wcbmmWCs.js} +30 -30
  21. package/dist/{TitleEditor-fStSADI-.js → TitleEditor-21D8_OUQ.js} +67 -67
  22. package/dist/{TplModal-BwSfxIHf.js → TplModal-CINtyB6Y.js} +14 -14
  23. package/dist/{accessibility-e8JYu_zd.js → accessibility-BgUEA-Ai.js} +1 -1
  24. package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-DKetBdJx.js} +2 -2
  25. package/dist/bundle-stats.json +6 -6
  26. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-BMSGhaNU.js} +34 -34
  27. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-BMSGhaNU.js.map} +1 -1
  28. package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-hNba-JqQ.js} +16 -16
  29. package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js.map → AiFeatureMenu-hNba-JqQ.js.map} +1 -1
  30. package/dist/{BlockA11yBadge-CXDLqkcJ.js → cdn/chunks/BlockA11yBadge-BIR88CvN.js} +11 -12
  31. package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-BIR88CvN.js.map} +1 -1
  32. package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js → CloudEditor-D2G2nNpQ.js} +425 -425
  33. package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js.map → CloudEditor-D2G2nNpQ.js.map} +1 -1
  34. package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-Btzom8dY.js} +20 -20
  35. package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js.map → CollaboratorBar-Btzom8dY.js.map} +1 -1
  36. package/dist/cdn/chunks/CountdownBlock-BJSAJlJ1.js +93 -0
  37. package/dist/cdn/chunks/{CountdownBlock-5YdT1uUu.js.map → CountdownBlock-BJSAJlJ1.js.map} +1 -1
  38. package/dist/cdn/chunks/CountdownToolbar-DbknNrIi.js +212 -0
  39. package/dist/cdn/chunks/{CountdownToolbar-DXPXrbAA.js.map → CountdownToolbar-DbknNrIi.js.map} +1 -1
  40. package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js → ModuleBrowserModal-BvAuW8O5.js} +43 -43
  41. package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js.map → ModuleBrowserModal-BvAuW8O5.js.map} +1 -1
  42. package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js → ModulePreviewCanvas-CYtt0boo.js} +23 -23
  43. package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js.map → ModulePreviewCanvas-CYtt0boo.js.map} +1 -1
  44. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-CVfo9ztG.js} +108 -108
  45. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-CVfo9ztG.js.map} +1 -1
  46. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-DCo58JP8.js} +187 -187
  47. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-DCo58JP8.js.map} +1 -1
  48. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-BzCThv84.js} +33 -33
  49. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-BzCThv84.js.map} +1 -1
  50. package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-S2Lix1LD.js} +27 -27
  51. package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js.map → SaveModuleDialog-S2Lix1LD.js.map} +1 -1
  52. package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-CYzAMuUW.js} +66 -66
  53. package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js.map → TitleEditor-CYzAMuUW.js.map} +1 -1
  54. package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js → blockTypeIcons-DOzUHoor.js} +3 -3
  55. package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js.map → blockTypeIcons-DOzUHoor.js.map} +1 -1
  56. package/dist/cdn/chunks/draggable-CNhyCGIO.js +4804 -0
  57. package/dist/cdn/chunks/draggable-CNhyCGIO.js.map +1 -0
  58. package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-wafZZ0-_.js} +95 -95
  59. package/dist/cdn/chunks/{extensions-DIxF31tA.js.map → extensions-wafZZ0-_.js.map} +1 -1
  60. package/dist/cdn/chunks/{features-DEMb13KS.js → features-B4tNvoi4.js} +2260 -2267
  61. package/dist/cdn/chunks/features-B4tNvoi4.js.map +1 -0
  62. package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-B5nBFtvb.js} +2 -2
  63. package/dist/cdn/chunks/{icons-CsLTcirh.js.map → icons-B5nBFtvb.js.map} +1 -1
  64. package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-BLaoBxHe.js} +1397 -1397
  65. package/dist/cdn/chunks/{media-library-CVaNvhpM.js.map → media-library-BLaoBxHe.js.map} +1 -1
  66. package/dist/cdn/chunks/{pusher-CDbNlZBE.js → pusher-bjpcqCZG.js} +2 -2
  67. package/dist/cdn/chunks/{pusher-CDbNlZBE.js.map → pusher-bjpcqCZG.js.map} +1 -1
  68. package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-D920ZxXf.js} +3 -3
  69. package/dist/cdn/chunks/{quality-BaBfc54_.js.map → quality-D920ZxXf.js.map} +1 -1
  70. package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-Yk30CckU.js} +3 -3
  71. package/dist/cdn/chunks/{renderer-CUxvx7ro.js.map → renderer-Yk30CckU.js.map} +1 -1
  72. package/dist/{rolldown-runtime-BZGGJVDF.js → cdn/chunks/rolldown-runtime-C266TIVP.js} +5 -5
  73. package/dist/cdn/chunks/{src-CRaqN-p8.js → src-kLJg7Y0m.js} +171 -171
  74. package/dist/cdn/chunks/{src-CRaqN-p8.js.map → src-kLJg7Y0m.js.map} +1 -1
  75. package/dist/cdn/chunks/styles-DrVLif14.js +2944 -0
  76. package/dist/cdn/chunks/styles-DrVLif14.js.map +1 -0
  77. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-IyIsncxY.js} +45 -46
  78. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-IyIsncxY.js.map} +1 -1
  79. package/dist/cdn/editor.css +1 -1
  80. package/dist/cdn/editor.js +122 -122
  81. package/dist/cdn/editor.js.map +1 -1
  82. package/dist/{check-Da05j8yl.js → check-Bg5yrRmX.js} +1 -1
  83. package/dist/{chevron-down-R2uY34iD.js → chevron-down-tee-ghFi.js} +1 -1
  84. package/dist/{circle-alert-DZuGWPX-.js → circle-alert-C0L9pUQ4.js} +1 -1
  85. package/dist/{clock-CRp2sIub.js → clock-CDlEdqiP.js} +1 -1
  86. package/dist/{cloud-DEk_b4CR.js → cloud-a3VovHva.js} +145 -145
  87. package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-Di4mqmGn.js} +9 -9
  88. package/dist/{dist-B1IR0bpH.js → dist-BzRLLpfq.js} +107 -107
  89. package/dist/{dist-BFawx6IS.js → dist-Pk4MhWMP.js} +35 -35
  90. package/dist/{extensions-CUcl9Ok4.js → extensions-BF39Siqk.js} +103 -103
  91. package/dist/{image-up-MBZKKg9p.js → image-up-1D_3XDdO.js} +1 -1
  92. package/dist/index.d.ts +6 -6
  93. package/dist/{info-CJEC7piy.js → info-DTGrc0Bx.js} +1 -1
  94. package/dist/{keys-ciNfSSGj.js → keys-Bqs_0du9.js} +1 -1
  95. package/dist/{loader-circle-DsY5Yg33.js → loader-circle-_9bP23op.js} +1 -1
  96. package/dist/{message-circle-yElBbR2C.js → message-circle-gzy2ZGJ3.js} +1 -1
  97. package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-BNAhAmtL.js} +1 -1
  98. package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
  99. package/dist/{scan-line-D0vcUekt.js → scan-line-DUEg6DoT.js} +1 -1
  100. package/dist/{send-DH4oDQqC.js → send-BatIZC9a.js} +1 -1
  101. package/dist/{shield-check-CfJgs2Hd.js → shield-check-C5Gv2cM1.js} +1 -1
  102. package/dist/{sparkles-CvRXGqFs.js → sparkles-D1IGi_cC.js} +1 -1
  103. package/dist/style.css +1 -1
  104. package/dist/styles-CwJQsnSp.js +3173 -0
  105. package/dist/templatical-editor.js +99 -99
  106. package/dist/{text-align-start-BT9VUDxK.js → text-align-start-DG3aAH7Y.js} +1 -1
  107. package/dist/{trash-2-DbP2Y6t2.js → trash-2-424iqbpN.js} +1 -1
  108. package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DWQySIE2.js} +1 -1
  109. package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-CL_AwWwi.js} +4 -4
  110. package/dist/useEditorCore-DLd-5qMg.js +3784 -0
  111. package/dist/{useI18n-lb2DHDiu.js → useI18n-CgmQftNf.js} +4 -4
  112. package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-vpwrZ9eQ.js} +3 -3
  113. package/dist/vue.runtime.esm-bundler-Bxqkjqhc.js +4300 -0
  114. package/dist/{x-u2oVmjN_.js → x-Dlaenqta.js} +1 -1
  115. package/package.json +8 -8
  116. package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
  117. package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
  118. package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
  119. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
  120. package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
  121. package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
  122. package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
  123. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
  124. package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
  125. package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
  126. package/dist/styles-DEXEkBvg.js +0 -3176
  127. package/dist/useEditorCore-C6ost42Q.js +0 -9342
  128. package/dist/vue.runtime.esm-bundler-DpvJL-nX.js +0 -5775
@@ -0,0 +1,3173 @@
1
+ import { A as e, B as t, E as n, F as r, J as i, L as a, M as o, N as s, X as c, _ as l, a as u, at as d, b as f, c as p, d as m, f as h, h as g, l as _, m as v, o as y, ot as b, p as x, rt as S, s as C, st as w, t as T, v as E, w as D, y as O, z as k } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
2
+ import { C as A, D as j, E as M, S as N, a as ee, l as P, n as te, o as F } from "./dist-DJmnUmW9.js";
3
+ import { A as ne, F as I, I as L, M as re, N as ie, T as ae, _ as oe, a as se, c as ce, d as le, g as ue, h as de, i as fe, j as pe, k as me, l as he, m as ge, n as _e, o as ve, p as ye, r as be, s as xe, u as Se, v as Ce, y as we } from "./useEditorCore-DLd-5qMg.js";
4
+ import { s as Te } from "./dist-BzRLLpfq.js";
5
+ import { O as Ee, b as De, c as Oe, d as ke, f as Ae, h as je, m as Me, o as Ne, p as Pe, r as Fe, s as Ie, t as Le, x as Re } from "./keys-Bqs_0du9.js";
6
+ import { t as R } from "./useI18n-CgmQftNf.js";
7
+ import { t as z } from "./createLucideIcon-Di4mqmGn.js";
8
+ import { t as ze } from "./accessibility-BgUEA-Ai.js";
9
+ import { t as Be } from "./chevron-down-tee-ghFi.js";
10
+ import { t as Ve } from "./circle-alert-C0L9pUQ4.js";
11
+ import { n as He, r as B, t as Ue } from "./blockTypeIcons-DKetBdJx.js";
12
+ import { n as We, t as Ge } from "./refresh-cw-BNAhAmtL.js";
13
+ import { t as Ke } from "./image-up-1D_3XDdO.js";
14
+ import { t as qe } from "./info-DTGrc0Bx.js";
15
+ import { t as Je } from "./scan-line-DUEg6DoT.js";
16
+ import { t as Ye } from "./sparkles-D1IGi_cC.js";
17
+ import { n as Xe, r as Ze, t as Qe } from "./text-align-start-DG3aAH7Y.js";
18
+ import { t as $e } from "./trash-2-424iqbpN.js";
19
+ import { t as et } from "./x-Dlaenqta.js";
20
+ import { t as V } from "./_plugin-vue_export-helper-B0hnzhyu.js";
21
+ import { t as tt } from "./useCloudI18n-CL_AwWwi.js";
22
+ import { t as nt } from "./useMergeTag-vpwrZ9eQ.js";
23
+ import { t as rt } from "./readableTextColor-CY3SiRnt.js";
24
+ import { t as it } from "./CountdownBlock-Bxqe7zwL.js";
25
+ import { _ as at, c as ot, f as H, g as st, h as U, l as ct, m as W, p as G, t as lt } from "./styleConstants-fWzlIIwN.js";
26
+ import { i as K, n as q, r as J, t as ut } from "./NumberWithSuffix-Dw8dN1Pt.js";
27
+ var dt = z("circle", [["circle", {
28
+ cx: "12",
29
+ cy: "12",
30
+ r: "10",
31
+ key: "1mglay"
32
+ }]]), ft = z("globe", [
33
+ ["circle", {
34
+ cx: "12",
35
+ cy: "12",
36
+ r: "10",
37
+ key: "1mglay"
38
+ }],
39
+ ["path", {
40
+ d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",
41
+ key: "13o1zl"
42
+ }],
43
+ ["path", {
44
+ d: "M2 12h20",
45
+ key: "9i4pu4"
46
+ }]
47
+ ]), pt = z("layout-template", [
48
+ ["rect", {
49
+ width: "18",
50
+ height: "7",
51
+ x: "3",
52
+ y: "3",
53
+ rx: "1",
54
+ key: "f1a2em"
55
+ }],
56
+ ["rect", {
57
+ width: "9",
58
+ height: "7",
59
+ x: "3",
60
+ y: "14",
61
+ rx: "1",
62
+ key: "jqznyg"
63
+ }],
64
+ ["rect", {
65
+ width: "5",
66
+ height: "7",
67
+ x: "16",
68
+ y: "14",
69
+ rx: "1",
70
+ key: "q5h2i8"
71
+ }]
72
+ ]), mt = z("lock-open", [["rect", {
73
+ width: "18",
74
+ height: "11",
75
+ x: "3",
76
+ y: "11",
77
+ rx: "2",
78
+ ry: "2",
79
+ key: "1w4ew1"
80
+ }], ["path", {
81
+ d: "M7 11V7a5 5 0 0 1 9.9-1",
82
+ key: "1mm8w8"
83
+ }]]), ht = z("lock", [["rect", {
84
+ width: "18",
85
+ height: "11",
86
+ x: "3",
87
+ y: "11",
88
+ rx: "2",
89
+ ry: "2",
90
+ key: "1w4ew1"
91
+ }], ["path", {
92
+ d: "M7 11V7a5 5 0 0 1 10 0v4",
93
+ key: "fwvmzm"
94
+ }]]), gt = z("monitor", [
95
+ ["rect", {
96
+ width: "20",
97
+ height: "14",
98
+ x: "2",
99
+ y: "3",
100
+ rx: "2",
101
+ key: "48i651"
102
+ }],
103
+ ["line", {
104
+ x1: "8",
105
+ x2: "16",
106
+ y1: "21",
107
+ y2: "21",
108
+ key: "1svkeh"
109
+ }],
110
+ ["line", {
111
+ x1: "12",
112
+ x2: "12",
113
+ y1: "17",
114
+ y2: "21",
115
+ key: "vw1qmm"
116
+ }]
117
+ ]), _t = z("moon", [["path", {
118
+ d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
119
+ key: "kfwtm"
120
+ }]]), vt = z("panel-top", [["rect", {
121
+ width: "18",
122
+ height: "18",
123
+ x: "3",
124
+ y: "3",
125
+ rx: "2",
126
+ key: "afitv7"
127
+ }], ["path", {
128
+ d: "M3 9h18",
129
+ key: "1pudct"
130
+ }]]), Y = z("plus", [["path", {
131
+ d: "M5 12h14",
132
+ key: "1ays0h"
133
+ }], ["path", {
134
+ d: "M12 5v14",
135
+ key: "s699le"
136
+ }]]), yt = z("rotate-ccw", [["path", {
137
+ d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
138
+ key: "1357e3"
139
+ }], ["path", {
140
+ d: "M3 3v5h5",
141
+ key: "1xhq8a"
142
+ }]]), bt = z("settings", [["path", {
143
+ d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
144
+ key: "1i5ecw"
145
+ }], ["circle", {
146
+ cx: "12",
147
+ cy: "12",
148
+ r: "3",
149
+ key: "1v7zrd"
150
+ }]]), xt = z("smartphone", [["rect", {
151
+ width: "14",
152
+ height: "20",
153
+ x: "5",
154
+ y: "2",
155
+ rx: "2",
156
+ ry: "2",
157
+ key: "1yt0o3"
158
+ }], ["path", {
159
+ d: "M12 18h.01",
160
+ key: "mhygvu"
161
+ }]]), St = z("square-plus", [
162
+ ["rect", {
163
+ width: "18",
164
+ height: "18",
165
+ x: "3",
166
+ y: "3",
167
+ rx: "2",
168
+ key: "afitv7"
169
+ }],
170
+ ["path", {
171
+ d: "M8 12h8",
172
+ key: "1wcyev"
173
+ }],
174
+ ["path", {
175
+ d: "M12 8v8",
176
+ key: "napkw2"
177
+ }]
178
+ ]), Ct = z("square", [["rect", {
179
+ width: "18",
180
+ height: "18",
181
+ x: "3",
182
+ y: "3",
183
+ rx: "2",
184
+ key: "afitv7"
185
+ }]]), wt = z("sun", [
186
+ ["circle", {
187
+ cx: "12",
188
+ cy: "12",
189
+ r: "4",
190
+ key: "4exip2"
191
+ }],
192
+ ["path", {
193
+ d: "M12 2v2",
194
+ key: "tus03m"
195
+ }],
196
+ ["path", {
197
+ d: "M12 20v2",
198
+ key: "1lh1kg"
199
+ }],
200
+ ["path", {
201
+ d: "m4.93 4.93 1.41 1.41",
202
+ key: "149t6j"
203
+ }],
204
+ ["path", {
205
+ d: "m17.66 17.66 1.41 1.41",
206
+ key: "ptbguv"
207
+ }],
208
+ ["path", {
209
+ d: "M2 12h2",
210
+ key: "1t8f8n"
211
+ }],
212
+ ["path", {
213
+ d: "M20 12h2",
214
+ key: "1q8mjw"
215
+ }],
216
+ ["path", {
217
+ d: "m6.34 17.66-1.41 1.41",
218
+ key: "1m8zz5"
219
+ }],
220
+ ["path", {
221
+ d: "m19.07 4.93-1.41 1.41",
222
+ key: "1shlcs"
223
+ }]
224
+ ]), Tt = z("tablet", [["rect", {
225
+ width: "16",
226
+ height: "20",
227
+ x: "4",
228
+ y: "2",
229
+ rx: "2",
230
+ ry: "2",
231
+ key: "76otgf"
232
+ }], ["line", {
233
+ x1: "12",
234
+ x2: "12.01",
235
+ y1: "18",
236
+ y2: "18",
237
+ key: "1dp563"
238
+ }]]);
239
+ //#endregion
240
+ //#region src/utils/resolveAccessibilityOptions.ts
241
+ function Et(e) {
242
+ return {
243
+ ...e.accessibility,
244
+ locale: e.locale
245
+ };
246
+ }
247
+ //#endregion
248
+ //#region src/components/Canvas.vue?vue&type=script&setup=true&lang.ts
249
+ var Dt = ["aria-label"], Ot = { class: "tpl:relative" }, kt = {
250
+ class: "tpl:inline-flex tpl:size-3 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[8px] tpl:font-bold",
251
+ style: { "background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 30%,\n transparent\n )" }
252
+ }, At = {
253
+ key: 0,
254
+ class: "tpl-canvas-empty tpl:m-6 tpl:flex tpl:min-h-[400px] tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-xl tpl:border-2 tpl:border-dashed tpl:px-10 tpl:py-12 tpl:text-center tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-elevated)] tpl:font-[var(--tpl-font-family)]"
255
+ }, jt = { class: "tpl-canvas-empty-icon tpl:mb-4 tpl:text-[var(--tpl-primary)]" }, Mt = { class: "tpl-canvas-empty-title tpl:m-0 tpl:mb-2 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-primary)]" }, Nt = { class: "tpl-canvas-empty-text tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-dim)]" }, Pt = {
256
+ key: 0,
257
+ class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-center tpl:gap-x-1 tpl:gap-y-0.5 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
258
+ }, Ft = {
259
+ key: 1,
260
+ class: "tpl:m-0 tpl:mt-4 tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-center tpl:gap-x-1 tpl:gap-y-0.5 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
261
+ }, It = /* @__PURE__ */ V(/* @__PURE__ */ f({
262
+ __name: "Canvas",
263
+ props: {
264
+ viewport: {},
265
+ content: {},
266
+ selectedBlockId: {},
267
+ darkMode: { type: Boolean },
268
+ previewMode: { type: Boolean },
269
+ lockedBlocks: {}
270
+ },
271
+ emits: [
272
+ "select-block",
273
+ "open-ai-chat",
274
+ "open-design-reference"
275
+ ],
276
+ setup(n, { emit: i }) {
277
+ let a = {
278
+ section: ce,
279
+ title: Se,
280
+ paragraph: ge,
281
+ image: ue,
282
+ button: ie,
283
+ divider: Ce,
284
+ spacer: fe,
285
+ html: oe,
286
+ social: se,
287
+ menu: de,
288
+ table: be,
289
+ video: _e,
290
+ countdown: it,
291
+ custom: we
292
+ }, s = n, c = i, { t: u } = R(), { t: f } = tt(), p = Ee(Me, "Canvas"), C = D(ke, null), T = D(Ie, null), O = D(Oe, {}), A = m(() => (O.plan?.hasFeature("ai_generation") ?? !1) && (O.ai?.isFeatureEnabled("chat") ?? !1)), j = m(() => (O.plan?.hasFeature("ai_generation") ?? !1) && (O.ai?.isFeatureEnabled("designToTemplate") ?? !1)), M = m({
293
+ get: () => s.content.blocks,
294
+ set: (e) => {
295
+ p.setContent({
296
+ ...s.content,
297
+ blocks: e
298
+ });
299
+ }
300
+ }), N = m(() => {
301
+ switch (s.viewport) {
302
+ case "mobile": return 375;
303
+ case "tablet": return 768;
304
+ default: return s.content.settings.width;
305
+ }
306
+ }), ee = m(() => ({
307
+ backgroundColor: s.content.settings.backgroundColor,
308
+ fontFamily: s.content.settings.fontFamily
309
+ }));
310
+ function P(e) {
311
+ s.previewMode || e.target === e.currentTarget && c("select-block", null);
312
+ }
313
+ function te(e) {
314
+ return ye(e, T, a);
315
+ }
316
+ function F(e) {
317
+ return s.lockedBlocks?.get(e) ?? null;
318
+ }
319
+ function ne(e, t) {
320
+ e.type === "custom" && p.updateBlock(e.id, {
321
+ fieldValues: t.fieldValues,
322
+ dataSourceFetched: t.dataSourceFetched
323
+ });
324
+ }
325
+ return (i, a) => (e(), g("div", {
326
+ "data-testid": "canvas-wrapper",
327
+ role: "region",
328
+ "aria-label": S(u).landmarks.canvas,
329
+ class: "tpl-canvas-wrapper tpl:rounded-lg",
330
+ style: b({
331
+ width: `${N.value}px`,
332
+ backgroundColor: n.content.settings.backgroundColor,
333
+ boxShadow: n.darkMode ? "none" : "var(--tpl-shadow-xl)",
334
+ filter: n.darkMode ? "invert(1) hue-rotate(180deg)" : "none",
335
+ transition: "width 300ms cubic-bezier(0.34, 1.56, 0.64, 1), filter 300ms ease"
336
+ })
337
+ }, [h("div", {
338
+ class: d(["tpl-canvas tpl:rounded-lg", {
339
+ "tpl-canvas--dark-mode": n.darkMode,
340
+ "tpl-preview-mode": n.previewMode
341
+ }]),
342
+ style: b(ee.value),
343
+ onClick: P
344
+ }, [E(S(he), {
345
+ modelValue: M.value,
346
+ "onUpdate:modelValue": a[0] ||= (e) => M.value = e,
347
+ group: "blocks",
348
+ animation: 150,
349
+ "ghost-class": "tpl-ghost",
350
+ "drag-class": "tpl-dragging",
351
+ handle: ".tpl-block-btn",
352
+ "invert-swap": !0,
353
+ "inverted-swap-threshold": .65,
354
+ disabled: n.previewMode,
355
+ class: "tpl-canvas-blocks tpl:min-h-[400px]"
356
+ }, {
357
+ default: k(() => [(e(!0), g(_, null, o(M.value, (i) => t((e(), g("div", { key: i.id }, [h("div", Ot, [F(i.id) ? (e(), g("div", {
358
+ key: 0,
359
+ class: "tpl-collab-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
360
+ style: b({
361
+ outline: `2px solid ${F(i.id).color}`,
362
+ outlineOffset: "-1px"
363
+ })
364
+ }, [h("span", {
365
+ class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:flex tpl:-translate-x-1/2 tpl:-translate-y-full tpl:items-center tpl:gap-1 tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
366
+ style: b({
367
+ backgroundColor: F(i.id).color,
368
+ color: S(rt)(F(i.id).color)
369
+ })
370
+ }, [h("span", kt, w(F(i.id).name.charAt(0)), 1), l(" " + w(F(i.id).name), 1)], 4)], 4)) : v("", !0), E(le, {
371
+ block: i,
372
+ "is-selected": !n.previewMode && n.selectedBlockId === i.id && !F(i.id),
373
+ viewport: n.viewport,
374
+ "preview-mode": n.previewMode,
375
+ onSelect: (e) => n.previewMode || F(i.id) ? void 0 : c("select-block", i.id)
376
+ }, {
377
+ default: k(() => [(e(), x(r(te(i)), {
378
+ block: i,
379
+ viewport: n.viewport,
380
+ onFetchData: (e) => ne(i, e),
381
+ onUpdate: (e) => S(p).updateBlock(i.id, e)
382
+ }, null, 40, [
383
+ "block",
384
+ "viewport",
385
+ "onFetchData",
386
+ "onUpdate"
387
+ ]))]),
388
+ _: 2
389
+ }, 1032, [
390
+ "block",
391
+ "is-selected",
392
+ "viewport",
393
+ "preview-mode",
394
+ "onSelect"
395
+ ])])])), [[y, !S(C)?.isHidden(i.id)]])), 128))]),
396
+ _: 1
397
+ }, 8, ["modelValue", "disabled"]), M.value.length === 0 && !n.previewMode ? (e(), g("div", At, [
398
+ h("div", jt, [E(S(St), {
399
+ size: 48,
400
+ "stroke-width": 1
401
+ })]),
402
+ h("p", Mt, w(S(u).canvas.noBlocks), 1),
403
+ h("p", Nt, w(S(u).canvas.dragHint), 1),
404
+ A.value && S(f) ? (e(), g("p", Pt, [
405
+ l(w(S(u).canvas.aiHintChat) + " ", 1),
406
+ h("button", {
407
+ class: "tpl:inline-flex tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:whitespace-nowrap tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-sm tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
408
+ onClick: a[1] ||= (e) => c("open-ai-chat")
409
+ }, [E(S(Ye), {
410
+ size: 14,
411
+ "stroke-width": 2
412
+ }), l(" " + w(S(f).aiMenu.aiAssistant), 1)]),
413
+ l(" " + w(S(u).canvas.aiHintChatSuffix), 1)
414
+ ])) : v("", !0),
415
+ j.value && S(f) ? (e(), g("p", Ft, [
416
+ l(w(S(u).canvas.aiHintDesign) + " ", 1),
417
+ h("button", {
418
+ class: "tpl:inline-flex tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:whitespace-nowrap tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-sm tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
419
+ onClick: a[2] ||= (e) => c("open-design-reference")
420
+ }, [E(S(Ke), {
421
+ size: 14,
422
+ "stroke-width": 2
423
+ }), l(" " + w(S(f).aiMenu.designToTemplate), 1)]),
424
+ l(" " + w(S(u).canvas.aiHintDesignSuffix), 1)
425
+ ])) : v("", !0)
426
+ ])) : v("", !0)], 6)], 12, Dt));
427
+ }
428
+ }), [["__scopeId", "data-v-78ebd4cf"]]), Lt = ["aria-label"], Rt = {
429
+ key: 0,
430
+ class: "tpl:border-b tpl:px-1 tpl:pb-1 tpl:border-[var(--tpl-border)]"
431
+ }, zt = ["aria-label"], Bt = {
432
+ key: 0,
433
+ class: "tpl:flex-1 tpl:truncate tpl:text-sm tpl:font-medium"
434
+ }, Vt = {
435
+ key: 1,
436
+ class: "tpl:shrink-0 tpl:rounded-full tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]"
437
+ }, Ht = [
438
+ "data-palette-type",
439
+ "aria-label",
440
+ "onClick",
441
+ "onKeydown"
442
+ ], Ut = { class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:transition-transform tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:scale-105" }, Wt = {
443
+ key: 0,
444
+ class: "tpl:truncate tpl:text-sm tpl:font-medium"
445
+ }, Gt = /* @__PURE__ */ f({
446
+ __name: "Sidebar",
447
+ setup(t) {
448
+ let { t: n, format: i } = R(), { t: a } = tt(), s = D(Ae, []), l = D(Ne, void 0), u = D(Me, null), d = D(Oe, {}), f = m(() => (d.savedModules?.moduleCount.value ?? 0) > 0), p = c(!1), y = [
449
+ "section",
450
+ "image",
451
+ "title",
452
+ "paragraph",
453
+ "button",
454
+ "divider",
455
+ "video",
456
+ "social",
457
+ "menu",
458
+ "table",
459
+ "spacer",
460
+ "html"
461
+ ], C = m(() => {
462
+ let e = y.map((e) => ({
463
+ type: e,
464
+ label: I(e, n)
465
+ }));
466
+ return d.plan && e.splice(-1, 0, {
467
+ type: "countdown",
468
+ label: I("countdown", n)
469
+ }), e;
470
+ }), T = m(() => s.map((e) => ({
471
+ type: `custom:${e.type}`,
472
+ label: e.name,
473
+ isCustom: !0,
474
+ icon: e.icon
475
+ }))), O = m(() => [...C.value, ...T.value]);
476
+ function A(e) {
477
+ if (e.isCustom) {
478
+ let t = e.type.replace("custom:", ""), n = s.find((e) => e.type === t);
479
+ if (n) return P(n);
480
+ }
481
+ return F(e.type, l);
482
+ }
483
+ function j(e) {
484
+ if (!u) return;
485
+ let t = A(e);
486
+ u.addBlock(t), u.selectBlock(t.id);
487
+ }
488
+ function M(e, t) {
489
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), j(t));
490
+ }
491
+ return (t, s) => (e(), g("aside", {
492
+ "aria-label": S(n).sidebarNav.palette,
493
+ class: "tpl-sidebar-rail tpl:absolute tpl:top-14 tpl:bottom-0 tpl:left-0 tpl:z-40 tpl:overflow-hidden",
494
+ style: b({
495
+ width: p.value ? "200px" : "48px",
496
+ backgroundColor: "var(--tpl-bg-elevated)",
497
+ borderRight: "1px solid var(--tpl-border)",
498
+ boxShadow: p.value ? "var(--tpl-shadow-lg)" : "none",
499
+ transition: "width 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1)"
500
+ }),
501
+ onMouseenter: s[1] ||= (e) => p.value = !0,
502
+ onMouseleave: s[2] ||= (e) => p.value = !1,
503
+ onFocusin: s[3] ||= (e) => p.value = !0,
504
+ onFocusout: s[4] ||= (e) => p.value = !1
505
+ }, [f.value && S(a) ? (e(), g("div", Rt, [h("button", {
506
+ type: "button",
507
+ "aria-label": S(n).sidebarNav.browseModules,
508
+ class: "tpl:flex tpl:h-10 tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-3 tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)]",
509
+ style: b({ justifyContent: p.value ? "flex-start" : "center" }),
510
+ onClick: s[0] ||= (e) => S(d).savedModules?.openBrowser()
511
+ }, [
512
+ E(S(He), {
513
+ size: 20,
514
+ "stroke-width": 1.5,
515
+ class: "tpl:shrink-0"
516
+ }),
517
+ p.value ? (e(), g("span", Bt, w(S(a).modules.title), 1)) : v("", !0),
518
+ p.value ? (e(), g("span", Vt, w(S(d).savedModules?.moduleCount.value ?? 0), 1)) : v("", !0)
519
+ ], 12, zt)])) : v("", !0), E(S(he), {
520
+ "model-value": O.value,
521
+ group: {
522
+ name: "blocks",
523
+ pull: "clone",
524
+ put: !1
525
+ },
526
+ clone: A,
527
+ sort: !1,
528
+ animation: 150,
529
+ "ghost-class": "tpl-ghost",
530
+ class: "tpl:flex tpl:flex-col tpl:gap-0.5 tpl:p-1"
531
+ }, {
532
+ default: k(() => [(e(!0), g(_, null, o(O.value, (t) => (e(), g("button", {
533
+ key: t.type,
534
+ type: "button",
535
+ "data-palette-type": t.type,
536
+ "aria-label": S(i)(S(n).sidebarNav.insertBlock, { block: t.label }),
537
+ class: "tpl:flex tpl:h-10 tpl:w-full tpl:cursor-grab tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-3 tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)] active:tpl:cursor-grabbing",
538
+ style: b({ justifyContent: p.value ? "flex-start" : "center" }),
539
+ onClick: (e) => j(t),
540
+ onKeydown: (e) => M(e, t)
541
+ }, [h("div", Ut, [S(Ue)[t.type] ? (e(), x(r(S(Ue)[t.type]), {
542
+ key: 0,
543
+ size: 20,
544
+ "stroke-width": 1.5
545
+ })) : t.isCustom ? (e(), x(ae, {
546
+ key: 1,
547
+ icon: t.icon,
548
+ size: 20
549
+ }, null, 8, ["icon"])) : v("", !0)]), p.value ? (e(), g("span", Wt, w(t.label), 1)) : v("", !0)], 44, Ht))), 128))]),
550
+ _: 1
551
+ }, 8, ["model-value"])], 44, Lt));
552
+ }
553
+ });
554
+ //#endregion
555
+ //#region src/composables/useMergeTagField.ts
556
+ function Kt(e) {
557
+ let { modelValue: t, emit: r, elementRef: i } = e, { canRequestMergeTag: a, isRequesting: o, isMergeTagValue: s, getMergeTagLabel: l, requestMergeTag: u, syntax: d } = nt(), f = c(!1), p = !1, h = m(() => {
558
+ let e = t();
559
+ if (!e) return [];
560
+ let n = [], r = `(${d.value.source}|${d.logic.source})`, i = new RegExp(r, "g"), a = 0, o;
561
+ for (; (o = i.exec(e)) !== null;) {
562
+ o.index > a && n.push({
563
+ type: "text",
564
+ value: e.slice(a, o.index)
565
+ });
566
+ let t = o[0];
567
+ s(t) ? n.push({
568
+ type: "mergeTag",
569
+ value: t,
570
+ label: l(t)
571
+ }) : j(t, d) ? n.push({
572
+ type: "logicMergeTag",
573
+ value: t,
574
+ keyword: A(t, d)
575
+ }) : n.push({
576
+ type: "text",
577
+ value: t
578
+ }), a = o.index + t.length;
579
+ }
580
+ return a < e.length && n.push({
581
+ type: "text",
582
+ value: e.slice(a)
583
+ }), n;
584
+ }), g = m(() => h.value.some((e) => e.type === "mergeTag" || e.type === "logicMergeTag"));
585
+ function _() {
586
+ f.value = !0, n(() => {
587
+ i.value?.focus();
588
+ let e = t()?.length || 0;
589
+ i.value?.setSelectionRange(e, e);
590
+ });
591
+ }
592
+ function v() {
593
+ p || (f.value = !1);
594
+ }
595
+ function y(e) {
596
+ r(e.target.value);
597
+ }
598
+ function b() {
599
+ r("");
600
+ }
601
+ async function x() {
602
+ let e = f.value && i.value ? i.value.selectionStart ?? t().length : t().length;
603
+ p = !0;
604
+ let a;
605
+ try {
606
+ a = await u();
607
+ } finally {
608
+ p = !1;
609
+ }
610
+ if (a) {
611
+ let o = t().slice(0, e), s = t().slice(e);
612
+ r(o + a.value + s), f.value = !0, n(() => {
613
+ let t = e + a.value.length;
614
+ i.value?.focus(), i.value?.setSelectionRange(t, t);
615
+ });
616
+ }
617
+ }
618
+ return {
619
+ segments: h,
620
+ hasMergeTags: g,
621
+ canRequestMergeTag: a,
622
+ isRequestingMergeTag: o,
623
+ isEditing: f,
624
+ startEditing: _,
625
+ stopEditing: v,
626
+ handleInput: y,
627
+ clearValue: b,
628
+ insertMergeTag: x
629
+ };
630
+ }
631
+ //#endregion
632
+ //#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
633
+ var qt = ["aria-label", "onKeydown"], Jt = ["data-tooltip"], Yt = ["data-tooltip"], Xt = {
634
+ key: 2,
635
+ class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
636
+ }, Zt = ["aria-label", "title"], Qt = /* @__PURE__ */ f({
637
+ __name: "MergeTagSegments",
638
+ props: {
639
+ segments: {},
640
+ displayClass: {},
641
+ pulse: { type: Boolean }
642
+ },
643
+ emits: ["edit", "clear"],
644
+ setup(t, { emit: n }) {
645
+ let r = n, { t: i } = R();
646
+ function a() {
647
+ r("edit");
648
+ }
649
+ return (n, s) => (e(), g("div", {
650
+ role: "button",
651
+ tabindex: "0",
652
+ "aria-label": S(i).mergeTag.clickToEdit,
653
+ class: d([t.displayClass, { "tpl-pulse-fill": t.pulse }]),
654
+ onClick: a,
655
+ onKeydown: [C(a, ["enter"]), C(p(a, ["prevent"]), ["space"])]
656
+ }, [(e(!0), g(_, null, o(t.segments, (t, n) => (e(), g(_, { key: `${t.type}-${n}-${t.value}` }, [t.type === "mergeTag" ? (e(), g("span", {
657
+ key: 0,
658
+ class: "tpl-tooltip 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",
659
+ "data-tooltip": t.value,
660
+ style: {
661
+ "background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
662
+ color: "var(--tpl-primary)"
663
+ }
664
+ }, w(t.label), 9, Jt)) : t.type === "logicMergeTag" ? (e(), g("span", {
665
+ key: 1,
666
+ 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",
667
+ "data-tooltip": t.value,
668
+ style: {
669
+ "background-color": "transparent",
670
+ border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
671
+ color: "var(--tpl-primary)"
672
+ }
673
+ }, w(t.keyword), 9, Yt)) : (e(), g("span", Xt, w(t.value), 1))], 64))), 128)), h("button", {
674
+ type: "button",
675
+ 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 hover:tpl:text-[var(--tpl-danger)] hover:tpl:opacity-100",
676
+ "aria-label": S(i).mergeTag.remove,
677
+ title: S(i).mergeTag.remove,
678
+ onClick: s[0] ||= p((e) => r("clear"), ["stop"])
679
+ }, [E(S(et), {
680
+ size: 12,
681
+ "stroke-width": 2.5
682
+ })], 8, Zt)], 42, qt));
683
+ }
684
+ }), $t = [
685
+ "aria-label",
686
+ "title",
687
+ "disabled"
688
+ ], en = "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] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)] hover:tpl:border-[var(--tpl-primary)]", tn = /* @__PURE__ */ f({
689
+ __name: "MergeTagInsertButton",
690
+ props: { disabled: { type: Boolean } },
691
+ emits: ["insert"],
692
+ setup(t) {
693
+ let { t: n } = R();
694
+ return (r, i) => (e(), g("button", {
695
+ type: "button",
696
+ class: d([en, "tpl:mt-1.5"]),
697
+ "aria-label": S(n).mergeTag.insert,
698
+ title: S(n).mergeTag.insert,
699
+ disabled: t.disabled,
700
+ onClick: i[0] ||= (e) => r.$emit("insert")
701
+ }, [E(S(Je), {
702
+ size: 12,
703
+ "stroke-width": 2
704
+ }), l(" " + w(S(n).mergeTag.insert), 1)], 10, $t));
705
+ }
706
+ }), nn = { key: 0 }, rn = { key: 1 }, an = [
707
+ "value",
708
+ "placeholder",
709
+ "rows"
710
+ ], on = "tpl:w-full tpl:resize-y tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:text-sm 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:placeholder:text-[var(--tpl-text-dim)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)]", sn = "tpl:flex tpl:w-full tpl:min-h-[5rem] tpl:cursor-pointer tpl:items-start tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", cn = /* @__PURE__ */ f({
711
+ __name: "MergeTagTextarea",
712
+ props: {
713
+ modelValue: {},
714
+ placeholder: { default: "" },
715
+ rows: { default: 3 }
716
+ },
717
+ emits: ["update:modelValue"],
718
+ setup(t, { emit: n }) {
719
+ let r = t, i = n, a = c(null), { segments: o, hasMergeTags: s, canRequestMergeTag: l, isRequestingMergeTag: u, isEditing: f, startEditing: p, stopEditing: m, handleInput: _, clearValue: y, insertMergeTag: b } = Kt({
720
+ modelValue: () => r.modelValue,
721
+ emit: (e) => i("update:modelValue", e),
722
+ elementRef: a
723
+ });
724
+ return (n, r) => S(s) && !S(f) ? (e(), g("div", nn, [E(Qt, {
725
+ segments: S(o),
726
+ "display-class": sn,
727
+ onEdit: S(p),
728
+ onClear: S(y)
729
+ }, null, 8, [
730
+ "segments",
731
+ "onEdit",
732
+ "onClear"
733
+ ]), S(l) ? (e(), x(tn, {
734
+ key: 0,
735
+ disabled: S(u),
736
+ onInsert: S(b)
737
+ }, null, 8, ["disabled", "onInsert"])) : v("", !0)])) : (e(), g("div", rn, [h("textarea", {
738
+ ref_key: "textareaRef",
739
+ ref: a,
740
+ class: d(on),
741
+ value: t.modelValue,
742
+ placeholder: t.placeholder,
743
+ rows: t.rows,
744
+ onInput: r[0] ||= (...e) => S(_) && S(_)(...e),
745
+ onBlur: r[1] ||= (...e) => S(m) && S(m)(...e),
746
+ onKeydown: r[2] ||= C((...e) => S(m) && S(m)(...e), ["escape"])
747
+ }, null, 40, an), S(l) ? (e(), x(tn, {
748
+ key: 0,
749
+ disabled: S(u),
750
+ onInsert: S(b)
751
+ }, null, 8, ["disabled", "onInsert"])) : v("", !0)]));
752
+ }
753
+ }), ln = { class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]" }, un = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:gap-3 tpl:overflow-y-auto tpl:p-4" }, dn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, fn = { class: "tpl:mb-3.5" }, pn = { class: "tpl:grid tpl:grid-cols-4 tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, mn = ["onClick"], hn = { class: "tpl:flex tpl:items-stretch" }, gn = ["value"], _n = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, vn = { class: "tpl:mb-3.5" }, yn = ["value"], bn = ["value"], xn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Sn = ["value"], Cn = { class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, wn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Tn = { class: "tpl:mt-1 tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, En = { class: "tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Dn = { class: "tpl:shrink-0 tpl:text-xs tpl:tabular-nums tpl:text-[var(--tpl-text-dim)]" }, On = { class: "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3" }, kn = { class: "tpl:mb-2.5 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text-muted)]" }, An = { class: "tpl:m-0 tpl:pl-[18px] tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, jn = { class: "tpl:mb-1 tpl:last:mb-0" }, Mn = { class: "tpl:mb-1 tpl:last:mb-0" }, Nn = { class: "tpl:mb-1 tpl:last:mb-0" }, Pn = 150, Fn = /* @__PURE__ */ f({
754
+ __name: "TemplateSettings",
755
+ props: { settings: {} },
756
+ emits: ["update"],
757
+ setup(t, { emit: n }) {
758
+ let r = t, i = n, { t: a } = R(), s = Ee(je, "TemplateSettings"), c = m(() => s.fonts.value), l = m(() => c.value.some((e) => e.value === r.settings.fontFamily) ? r.settings.fontFamily : s.defaultFont.value), u = [
759
+ {
760
+ value: 480,
761
+ label: "480px"
762
+ },
763
+ {
764
+ value: 600,
765
+ label: "600px"
766
+ },
767
+ {
768
+ value: 700,
769
+ label: "700px"
770
+ },
771
+ {
772
+ value: 800,
773
+ label: "800px"
774
+ }
775
+ ];
776
+ return (n, r) => (e(), g("aside", ln, [h("div", un, [
777
+ h("div", { class: d(S(ct)) }, [
778
+ h("div", dn, [E(S(Ct), {
779
+ class: "tpl:text-[var(--tpl-text-muted)]",
780
+ size: 14,
781
+ "stroke-width": 2
782
+ }), h("span", null, w(S(a).templateSettings.layout), 1)]),
783
+ h("div", fn, [h("label", { class: d(S(U)) }, w(S(a).templateSettings.widthPreset), 3), h("div", pn, [(e(), g(_, null, o(u, (e) => h("button", {
784
+ key: e.value,
785
+ class: "tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
786
+ style: b({
787
+ backgroundColor: t.settings.width === e.value ? "var(--tpl-bg)" : "transparent",
788
+ color: t.settings.width === e.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
789
+ boxShadow: t.settings.width === e.value ? "var(--tpl-shadow)" : "none"
790
+ }),
791
+ onClick: (t) => i("update", { width: e.value })
792
+ }, w(e.label), 13, mn)), 64))])]),
793
+ h("div", null, [h("label", { class: d(S(U)) }, w(S(a).templateSettings.customWidth), 3), h("div", hn, [h("input", {
794
+ type: "number",
795
+ class: d(S(G)),
796
+ value: t.settings.width,
797
+ min: "300",
798
+ max: "900",
799
+ onInput: r[0] ||= (e) => i("update", { width: Number(e.target.value) })
800
+ }, null, 42, gn), h("span", { class: d(S(W)) }, "px", 2)])])
801
+ ], 2),
802
+ h("div", { class: d(S(ct)) }, [
803
+ h("div", _n, [E(S(dt), {
804
+ class: "tpl:text-[var(--tpl-text-muted)]",
805
+ size: 14,
806
+ "stroke-width": 2
807
+ }), h("span", null, w(S(a).templateSettings.appearance), 1)]),
808
+ h("div", vn, [h("label", { class: d(S(U)) }, w(S(a).templateSettings.backgroundColor), 3), E(K, {
809
+ "model-value": t.settings.backgroundColor,
810
+ placeholder: S(lt),
811
+ "onUpdate:modelValue": r[1] ||= (e) => i("update", { backgroundColor: e })
812
+ }, null, 8, ["model-value", "placeholder"])]),
813
+ h("div", null, [h("label", { class: d(S(U)) }, w(S(a).templateSettings.fontFamily), 3), h("select", {
814
+ class: d(S(H)),
815
+ value: l.value,
816
+ onChange: r[2] ||= (e) => i("update", { fontFamily: e.target.value })
817
+ }, [(e(!0), g(_, null, o(c.value, (t) => (e(), g("option", {
818
+ key: t.value,
819
+ value: t.value
820
+ }, w(t.label), 9, bn))), 128))], 42, yn)])
821
+ ], 2),
822
+ h("div", { class: d(S(ct)) }, [h("div", xn, [E(S(ft), {
823
+ class: "tpl:text-[var(--tpl-text-muted)]",
824
+ size: 14,
825
+ "stroke-width": 2
826
+ }), h("span", null, w(S(a).templateSettings.language), 1)]), h("div", null, [
827
+ h("label", { class: d(S(U)) }, w(S(a).templateSettings.contentLocale), 3),
828
+ h("input", {
829
+ type: "text",
830
+ class: d(S(H)),
831
+ value: t.settings.locale ?? "",
832
+ placeholder: "en",
833
+ spellcheck: "false",
834
+ autocapitalize: "off",
835
+ autocomplete: "off",
836
+ onInput: r[3] ||= (e) => i("update", { locale: e.target.value.trim() || void 0 })
837
+ }, null, 42, Sn),
838
+ h("p", Cn, w(S(a).templateSettings.contentLocaleHint), 1)
839
+ ])], 2),
840
+ h("div", { class: d(S(ct)) }, [h("div", wn, [E(S(We), {
841
+ class: "tpl:text-[var(--tpl-text-muted)]",
842
+ size: 14,
843
+ "stroke-width": 2
844
+ }), h("span", null, w(S(a).templateSettings.preheaderText), 1)]), h("div", null, [E(cn, {
845
+ "model-value": t.settings.preheaderText ?? "",
846
+ placeholder: S(a).templateSettings.preheaderTextPlaceholder,
847
+ rows: 2,
848
+ "onUpdate:modelValue": r[4] ||= (e) => i("update", { preheaderText: e.replace(/[\r\n]/g, " ") || void 0 })
849
+ }, null, 8, ["model-value", "placeholder"]), h("div", Tn, [h("span", En, w(S(a).templateSettings.preheaderTextHint), 1), h("span", Dn, w((t.settings.preheaderText ?? "").length) + "/" + w(Pn), 1)])])], 2),
850
+ h("div", On, [h("div", kn, [E(S(qe), {
851
+ size: 14,
852
+ "stroke-width": 2
853
+ }), h("span", null, w(S(a).templateSettings.tips), 1)]), h("ul", An, [
854
+ h("li", jn, w(S(a).templateSettings.tip1), 1),
855
+ h("li", Mn, w(S(a).templateSettings.tip2), 1),
856
+ h("li", Nn, w(S(a).templateSettings.tip3), 1)
857
+ ])])
858
+ ])]));
859
+ }
860
+ }), In = { key: 0 }, Ln = { key: 1 }, Rn = [
861
+ "type",
862
+ "value",
863
+ "placeholder"
864
+ ], zn = "tpl:flex tpl:w-full tpl:min-h-10 tpl:cursor-pointer tpl:items-center tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3.5 tpl:py-1.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", X = /* @__PURE__ */ V(/* @__PURE__ */ f({
865
+ __name: "MergeTagInput",
866
+ props: {
867
+ modelValue: {},
868
+ type: { default: "text" },
869
+ placeholder: { default: "" },
870
+ pulse: {
871
+ type: Boolean,
872
+ default: !1
873
+ }
874
+ },
875
+ emits: ["update:modelValue"],
876
+ setup(t, { emit: n }) {
877
+ let r = t, i = n, a = c(null), { segments: o, hasMergeTags: s, canRequestMergeTag: l, isRequestingMergeTag: u, isEditing: f, startEditing: p, stopEditing: m, handleInput: _, clearValue: y, insertMergeTag: b } = Kt({
878
+ modelValue: () => r.modelValue,
879
+ emit: (e) => i("update:modelValue", e),
880
+ elementRef: a
881
+ });
882
+ return (n, r) => S(s) && !S(f) ? (e(), g("div", In, [E(Qt, {
883
+ segments: S(o),
884
+ "display-class": zn,
885
+ pulse: t.pulse,
886
+ onEdit: S(p),
887
+ onClear: S(y)
888
+ }, null, 8, [
889
+ "segments",
890
+ "pulse",
891
+ "onEdit",
892
+ "onClear"
893
+ ]), S(l) ? (e(), x(tn, {
894
+ key: 0,
895
+ disabled: S(u),
896
+ onInsert: S(b)
897
+ }, null, 8, ["disabled", "onInsert"])) : v("", !0)])) : (e(), g("div", Ln, [h("input", {
898
+ ref_key: "inputRef",
899
+ ref: a,
900
+ type: t.type,
901
+ class: d([S(H), { "tpl-pulse-fill": t.pulse }]),
902
+ value: t.modelValue,
903
+ placeholder: t.placeholder,
904
+ onInput: r[0] ||= (...e) => S(_) && S(_)(...e),
905
+ onBlur: r[1] ||= (...e) => S(m) && S(m)(...e),
906
+ onKeydown: r[2] ||= C((...e) => S(m) && S(m)(...e), ["escape"])
907
+ }, null, 42, Rn), S(l) ? (e(), x(tn, {
908
+ key: 0,
909
+ disabled: S(u),
910
+ onInsert: S(b)
911
+ }, null, 8, ["disabled", "onInsert"])) : v("", !0)]));
912
+ }
913
+ }), [["__scopeId", "data-v-358207dd"]]), Bn = { class: "tpl:mb-3.5" }, Vn = ["value"], Hn = { value: "" }, Un = ["value"], Wn = { class: "tpl:mb-3.5" }, Gn = { class: "tpl:mb-3.5" }, Kn = {
914
+ key: 0,
915
+ class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
916
+ }, qn = ["checked"], Jn = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, Yn = { class: "tpl:mb-3.5" }, Xn = { class: "tpl:mb-3.5" }, Zn = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, Qn = { class: "tpl:mb-3.5" }, $n = { class: "tpl:flex tpl:items-stretch" }, er = ["value"], tr = { class: "tpl:mb-3.5" }, nr = { class: "tpl:flex tpl:items-stretch" }, rr = ["value"], ir = /* @__PURE__ */ f({
917
+ __name: "ButtonToolbar",
918
+ props: {
919
+ block: {},
920
+ fontFamilies: {}
921
+ },
922
+ emits: ["update"],
923
+ setup(t, { emit: n }) {
924
+ let r = n, { t: i } = R();
925
+ function a(e, t) {
926
+ r("update", { [e]: t });
927
+ }
928
+ return (n, r) => (e(), g(_, null, [
929
+ h("div", Bn, [h("label", { class: d(S(U)) }, w(S(i).button.fontFamily), 3), h("select", {
930
+ class: d(S(H)),
931
+ value: t.block.fontFamily || "",
932
+ onChange: r[0] ||= (e) => a("fontFamily", e.target.value || void 0)
933
+ }, [h("option", Hn, w(S(i).button.inheritFont), 1), (e(!0), g(_, null, o(t.fontFamilies, (t) => (e(), g("option", {
934
+ key: t.value,
935
+ value: t.value
936
+ }, w(t.label), 9, Un))), 128))], 42, Vn)]),
937
+ h("div", Wn, [h("label", { class: d(S(U)) }, w(S(i).button.text), 3), E(X, {
938
+ "model-value": t.block.text,
939
+ type: "text",
940
+ "onUpdate:modelValue": r[1] ||= (e) => a("text", e)
941
+ }, null, 8, ["model-value"])]),
942
+ h("div", Gn, [
943
+ h("label", { class: d(S(U)) }, w(S(i).button.url), 3),
944
+ E(X, {
945
+ "model-value": t.block.url,
946
+ type: "url",
947
+ placeholder: S(i).button.urlPlaceholder,
948
+ "onUpdate:modelValue": r[2] ||= (e) => a("url", e)
949
+ }, null, 8, ["model-value", "placeholder"]),
950
+ t.block.url ? (e(), g("label", Kn, [h("input", {
951
+ type: "checkbox",
952
+ class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
953
+ checked: t.block.openInNewTab ?? !1,
954
+ onChange: r[3] ||= (e) => a("openInNewTab", e.target.checked)
955
+ }, null, 40, qn), l(" " + w(S(i).button.openInNewTab), 1)])) : v("", !0)
956
+ ]),
957
+ h("div", Jn, [h("div", Yn, [h("label", { class: d(S(U)) }, w(S(i).button.background), 3), E(K, {
958
+ "model-value": t.block.backgroundColor,
959
+ "onUpdate:modelValue": r[4] ||= (e) => a("backgroundColor", e)
960
+ }, null, 8, ["model-value"])]), h("div", Xn, [h("label", { class: d(S(U)) }, w(S(i).button.textColor), 3), E(K, {
961
+ "model-value": t.block.textColor,
962
+ "onUpdate:modelValue": r[5] ||= (e) => a("textColor", e)
963
+ }, null, 8, ["model-value"])])]),
964
+ h("div", Zn, [h("div", Qn, [h("label", { class: d(S(U)) }, w(S(i).button.borderRadius), 3), h("div", $n, [h("input", {
965
+ type: "number",
966
+ class: d(S(G)),
967
+ value: t.block.borderRadius,
968
+ min: "0",
969
+ max: "50",
970
+ onInput: r[6] ||= (e) => a("borderRadius", Number(e.target.value))
971
+ }, null, 42, er), h("span", { class: d(S(W)) }, "px", 2)])]), h("div", tr, [h("label", { class: d(S(U)) }, w(S(i).button.fontSize), 3), h("div", nr, [h("input", {
972
+ type: "number",
973
+ class: d(S(G)),
974
+ value: t.block.fontSize,
975
+ min: "10",
976
+ max: "36",
977
+ onInput: r[7] ||= (e) => a("fontSize", Number(e.target.value))
978
+ }, null, 42, rr), h("span", { class: d(S(W)) }, "px", 2)])])])
979
+ ], 64));
980
+ }
981
+ }), ar = { class: "spacing-control" }, or = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, sr = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, cr = { class: "tpl:flex tpl:items-center" }, lr = ["aria-label"], ur = ["value", "aria-label"], dr = ["aria-label"], fr = { class: "tpl:flex tpl:items-center tpl:gap-2" }, pr = { class: "tpl:flex tpl:items-center" }, mr = ["aria-label"], hr = ["value", "aria-label"], gr = ["aria-label"], _r = ["aria-label", "title"], vr = { class: "tpl:flex tpl:items-center" }, yr = ["aria-label"], br = ["value", "aria-label"], xr = ["aria-label"], Sr = { class: "tpl:flex tpl:items-center" }, Cr = ["aria-label"], wr = ["value", "aria-label"], Tr = ["aria-label"], Z = "tpl:flex tpl:items-center tpl:justify-center tpl:w-8 tpl:h-8 tpl:text-[var(--tpl-text-muted)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:cursor-pointer tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)] hover:tpl:text-[var(--tpl-text)] active:tpl:bg-[var(--tpl-bg-active)]", Er = "tpl:w-10 tpl:h-8 tpl:text-center tpl:text-xs tpl:font-medium tpl:border-y tpl:border-x-0 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)]", Dr = /* @__PURE__ */ V(/* @__PURE__ */ f({
982
+ __name: "SpacingControl",
983
+ props: {
984
+ modelValue: {},
985
+ label: {}
986
+ },
987
+ emits: ["update:modelValue"],
988
+ setup(t, { emit: n }) {
989
+ let r = t, i = n, { t: o } = R(), s = m(() => r.modelValue.top === r.modelValue.right && r.modelValue.right === r.modelValue.bottom && r.modelValue.bottom === r.modelValue.left), l = c(s.value);
990
+ a(s, (e) => {
991
+ !e && l.value && (l.value = !1);
992
+ });
993
+ function u(e, t) {
994
+ let n = r.modelValue[e], a = Math.max(0, n + t);
995
+ l.value ? i("update:modelValue", {
996
+ top: a,
997
+ right: a,
998
+ bottom: a,
999
+ left: a
1000
+ }) : i("update:modelValue", {
1001
+ ...r.modelValue,
1002
+ [e]: a
1003
+ });
1004
+ }
1005
+ function f(e, t) {
1006
+ let n = Math.max(0, t);
1007
+ l.value ? i("update:modelValue", {
1008
+ top: n,
1009
+ right: n,
1010
+ bottom: n,
1011
+ left: n
1012
+ }) : i("update:modelValue", {
1013
+ ...r.modelValue,
1014
+ [e]: n
1015
+ });
1016
+ }
1017
+ function p() {
1018
+ if (l.value = !l.value, l.value) {
1019
+ let e = r.modelValue.top;
1020
+ i("update:modelValue", {
1021
+ top: e,
1022
+ right: e,
1023
+ bottom: e,
1024
+ left: e
1025
+ });
1026
+ }
1027
+ }
1028
+ return (n, r) => (e(), g("div", ar, [h("label", or, w(t.label), 1), h("div", sr, [
1029
+ h("div", cr, [
1030
+ h("button", {
1031
+ "aria-label": S(o).spacingControl.decreaseTop,
1032
+ class: d([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
1033
+ onClick: r[0] ||= (e) => u("top", -1)
1034
+ }, [E(S(B), {
1035
+ size: 12,
1036
+ "stroke-width": 2
1037
+ })], 10, lr),
1038
+ h("input", {
1039
+ type: "number",
1040
+ class: d(Er),
1041
+ value: t.modelValue.top,
1042
+ "aria-label": S(o).spacingControl.top,
1043
+ min: "0",
1044
+ onInput: r[1] ||= (e) => f("top", Number(e.target.value))
1045
+ }, null, 40, ur),
1046
+ h("button", {
1047
+ "aria-label": S(o).spacingControl.increaseTop,
1048
+ class: d([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
1049
+ onClick: r[2] ||= (e) => u("top", 1)
1050
+ }, [E(S(Y), {
1051
+ size: 12,
1052
+ "stroke-width": 2
1053
+ })], 10, dr)
1054
+ ]),
1055
+ h("div", fr, [
1056
+ h("div", pr, [
1057
+ h("button", {
1058
+ "aria-label": S(o).spacingControl.decreaseLeft,
1059
+ class: d([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
1060
+ onClick: r[3] ||= (e) => u("left", -1)
1061
+ }, [E(S(B), {
1062
+ size: 12,
1063
+ "stroke-width": 2
1064
+ })], 10, mr),
1065
+ h("input", {
1066
+ type: "number",
1067
+ class: d(Er),
1068
+ value: t.modelValue.left,
1069
+ "aria-label": S(o).spacingControl.left,
1070
+ min: "0",
1071
+ onInput: r[4] ||= (e) => f("left", Number(e.target.value))
1072
+ }, null, 40, hr),
1073
+ h("button", {
1074
+ "aria-label": S(o).spacingControl.increaseLeft,
1075
+ class: d([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
1076
+ onClick: r[5] ||= (e) => u("left", 1)
1077
+ }, [E(S(Y), {
1078
+ size: 12,
1079
+ "stroke-width": 2
1080
+ })], 10, gr)
1081
+ ]),
1082
+ h("button", {
1083
+ class: d(["tpl:flex tpl:h-8 tpl:w-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", l.value ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] hover:tpl:bg-[var(--tpl-bg-hover)]"]),
1084
+ "aria-label": l.value ? S(o).spacingControl.unlock : S(o).spacingControl.lockAll,
1085
+ title: l.value ? S(o).spacingControl.unlock : S(o).spacingControl.lockAll,
1086
+ onClick: p
1087
+ }, [l.value ? (e(), x(S(ht), {
1088
+ key: 0,
1089
+ size: 14,
1090
+ "stroke-width": 2
1091
+ })) : (e(), x(S(mt), {
1092
+ key: 1,
1093
+ size: 14,
1094
+ "stroke-width": 2
1095
+ }))], 10, _r),
1096
+ h("div", vr, [
1097
+ h("button", {
1098
+ "aria-label": S(o).spacingControl.decreaseRight,
1099
+ class: d([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
1100
+ onClick: r[6] ||= (e) => u("right", -1)
1101
+ }, [E(S(B), {
1102
+ size: 12,
1103
+ "stroke-width": 2
1104
+ })], 10, yr),
1105
+ h("input", {
1106
+ type: "number",
1107
+ class: d(Er),
1108
+ value: t.modelValue.right,
1109
+ "aria-label": S(o).spacingControl.right,
1110
+ min: "0",
1111
+ onInput: r[7] ||= (e) => f("right", Number(e.target.value))
1112
+ }, null, 40, br),
1113
+ h("button", {
1114
+ "aria-label": S(o).spacingControl.increaseRight,
1115
+ class: d([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
1116
+ onClick: r[8] ||= (e) => u("right", 1)
1117
+ }, [E(S(Y), {
1118
+ size: 12,
1119
+ "stroke-width": 2
1120
+ })], 10, xr)
1121
+ ])
1122
+ ]),
1123
+ h("div", Sr, [
1124
+ h("button", {
1125
+ "aria-label": S(o).spacingControl.decreaseBottom,
1126
+ class: d([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
1127
+ onClick: r[9] ||= (e) => u("bottom", -1)
1128
+ }, [E(S(B), {
1129
+ size: 12,
1130
+ "stroke-width": 2
1131
+ })], 10, Cr),
1132
+ h("input", {
1133
+ type: "number",
1134
+ class: d(Er),
1135
+ value: t.modelValue.bottom,
1136
+ "aria-label": S(o).spacingControl.bottom,
1137
+ min: "0",
1138
+ onInput: r[10] ||= (e) => f("bottom", Number(e.target.value))
1139
+ }, null, 40, wr),
1140
+ h("button", {
1141
+ "aria-label": S(o).spacingControl.increaseBottom,
1142
+ class: d([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
1143
+ onClick: r[11] ||= (e) => u("bottom", 1)
1144
+ }, [E(S(Y), {
1145
+ size: 12,
1146
+ "stroke-width": 2
1147
+ })], 10, Tr)
1148
+ ])
1149
+ ])]));
1150
+ }
1151
+ }), [["__scopeId", "data-v-9a9c8a07"]]), Or = { class: "tpl:mt-3" }, Q = /* @__PURE__ */ f({
1152
+ __name: "CollapsibleSection",
1153
+ props: {
1154
+ title: {},
1155
+ open: { type: Boolean },
1156
+ noBorder: { type: Boolean }
1157
+ },
1158
+ emits: ["toggle"],
1159
+ setup(n) {
1160
+ return (r, i) => (e(), g("div", { class: d(["tpl:py-3", n.noBorder ? "" : "tpl:border-t tpl:border-[var(--tpl-border)]"]) }, [h("button", {
1161
+ type: "button",
1162
+ class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-1.5 tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
1163
+ onClick: i[0] ||= (e) => r.$emit("toggle")
1164
+ }, [E(S(Be), {
1165
+ class: d(["tpl:transition-transform tpl:duration-200", n.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
1166
+ size: 12,
1167
+ "stroke-width": 2
1168
+ }, null, 8, ["class"]), h("span", null, w(n.title), 1)]), t(h("div", Or, [s(r.$slots, "default")], 512), [[y, n.open]])], 2));
1169
+ }
1170
+ }), kr = { class: "tpl:mt-4" }, Ar = { class: "tpl:space-y-2" }, jr = ["checked", "onChange"], Mr = ["value", "placeholder"], Nr = { class: "tpl:space-y-2" }, Pr = ["value"], Fr = { value: "" }, Ir = ["label"], Lr = ["value"], Rr = ["value"], zr = {
1171
+ key: 0,
1172
+ value: "__custom__"
1173
+ }, Br = {
1174
+ key: 0,
1175
+ class: "tpl:space-y-2"
1176
+ }, Vr = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Hr = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Ur = { class: "tpl:flex tpl:justify-end" }, Wr = ["disabled"], Gr = {
1177
+ key: 0,
1178
+ class: "tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]"
1179
+ }, Kr = { class: "tpl:space-y-1" }, qr = { class: "tpl:m-0 tpl:overflow-x-auto tpl:rounded tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]" }, Jr = {
1180
+ key: 0,
1181
+ class: "tpl:m-0 tpl:overflow-x-auto tpl:rounded tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
1182
+ }, Yr = /* @__PURE__ */ f({
1183
+ __name: "CommonBlockSettings",
1184
+ props: {
1185
+ block: {},
1186
+ isFirstSection: { type: Boolean }
1187
+ },
1188
+ emits: ["update"],
1189
+ setup(n, { emit: s }) {
1190
+ let f = n, p = s, { t: y } = R(), b = D(Pe, []), C = D(Fe, !1), T = i(/* @__PURE__ */ new Set()), O = c(!1), A = c(""), j = c(""), M = [
1191
+ {
1192
+ key: "desktop",
1193
+ icon: gt,
1194
+ labelKey: "showOnDesktop"
1195
+ },
1196
+ {
1197
+ key: "tablet",
1198
+ icon: Tt,
1199
+ labelKey: "showOnTablet"
1200
+ },
1201
+ {
1202
+ key: "mobile",
1203
+ icon: xt,
1204
+ labelKey: "showOnMobile"
1205
+ }
1206
+ ];
1207
+ function N(e) {
1208
+ T.has(e) ? T.delete(e) : T.add(e);
1209
+ }
1210
+ let ee = m(() => b.length > 0 || C), P = m(() => f.block.displayCondition ? !b.some((e) => e.label === f.block.displayCondition?.label) : !1);
1211
+ function te() {
1212
+ O.value = !0, P.value && f.block.displayCondition ? (A.value = f.block.displayCondition.before, j.value = f.block.displayCondition.after ?? "") : (A.value = "", j.value = "");
1213
+ }
1214
+ function F() {
1215
+ A.value.trim() && (p("update", { displayCondition: {
1216
+ label: y.blockSettings.customCondition,
1217
+ before: A.value.trim(),
1218
+ after: j.value.trim()
1219
+ } }), O.value = !1, A.value = "", j.value = "");
1220
+ }
1221
+ a(() => f.block.displayCondition, (e) => {
1222
+ if (!e) {
1223
+ O.value = !1, A.value = "", j.value = "";
1224
+ return;
1225
+ }
1226
+ P.value && (A.value = e.before, j.value = e.after ?? "");
1227
+ }, { immediate: !0 });
1228
+ let ne = m(() => {
1229
+ let e = {};
1230
+ for (let t of b) {
1231
+ let n = t.group ?? "";
1232
+ e[n] || (e[n] = []), e[n].push(t);
1233
+ }
1234
+ return e;
1235
+ });
1236
+ function I(e, t) {
1237
+ p("update", { styles: {
1238
+ ...f.block.styles,
1239
+ [e]: t
1240
+ } });
1241
+ }
1242
+ function L(e) {
1243
+ return f.block.visibility?.[e] !== !1;
1244
+ }
1245
+ function re(e) {
1246
+ let t = {
1247
+ desktop: L("desktop"),
1248
+ tablet: L("tablet"),
1249
+ mobile: L("mobile")
1250
+ };
1251
+ t[e] = !t[e], p("update", { visibility: t });
1252
+ }
1253
+ return (i, a) => (e(), g("div", { class: d(["tpl:flex tpl:flex-col", n.isFirstSection ? "" : "tpl:mt-4"]) }, [
1254
+ E(Q, {
1255
+ title: S(y).blockSettings.spacing,
1256
+ open: T.has("spacing"),
1257
+ "no-border": n.isFirstSection,
1258
+ onToggle: a[2] ||= (e) => N("spacing")
1259
+ }, {
1260
+ default: k(() => [E(Dr, {
1261
+ label: S(y).blockSettings.padding,
1262
+ "model-value": n.block.styles.padding,
1263
+ "onUpdate:modelValue": a[0] ||= (e) => I("padding", e)
1264
+ }, null, 8, ["label", "model-value"]), h("div", kr, [E(Dr, {
1265
+ label: S(y).blockSettings.margin,
1266
+ "model-value": n.block.styles.margin,
1267
+ "onUpdate:modelValue": a[1] ||= (e) => I("margin", e)
1268
+ }, null, 8, ["label", "model-value"])])]),
1269
+ _: 1
1270
+ }, 8, [
1271
+ "title",
1272
+ "open",
1273
+ "no-border"
1274
+ ]),
1275
+ E(Q, {
1276
+ title: S(y).blockSettings.background,
1277
+ open: T.has("bg"),
1278
+ onToggle: a[4] ||= (e) => N("bg")
1279
+ }, {
1280
+ default: k(() => [h("label", { class: d(S(U)) }, w(S(y).blockSettings.color), 3), E(K, {
1281
+ size: "large",
1282
+ "model-value": n.block.styles.backgroundColor || S("#ffffff"),
1283
+ "onUpdate:modelValue": a[3] ||= (e) => I("backgroundColor", e)
1284
+ }, null, 8, ["model-value"])]),
1285
+ _: 1
1286
+ }, 8, ["title", "open"]),
1287
+ E(Q, {
1288
+ title: S(y).blockSettings.display,
1289
+ open: T.has("display"),
1290
+ onToggle: a[5] ||= (e) => N("display")
1291
+ }, {
1292
+ default: k(() => [h("div", Ar, [(e(), g(_, null, o(M, (t) => h("label", {
1293
+ key: t.key,
1294
+ class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text)]"
1295
+ }, [
1296
+ h("input", {
1297
+ type: "checkbox",
1298
+ class: "tpl:accent-[var(--tpl-primary)]",
1299
+ checked: L(t.key),
1300
+ onChange: (e) => re(t.key)
1301
+ }, null, 40, jr),
1302
+ (e(), x(r(t.icon), {
1303
+ size: 14,
1304
+ "stroke-width": 1.5
1305
+ })),
1306
+ l(" " + w(S(y).blockSettings[t.labelKey]), 1)
1307
+ ])), 64))])]),
1308
+ _: 1
1309
+ }, 8, ["title", "open"]),
1310
+ E(Q, {
1311
+ title: S(y).blockSettings.customCss,
1312
+ open: T.has("css"),
1313
+ onToggle: a[7] ||= (e) => N("css")
1314
+ }, {
1315
+ default: k(() => [h("label", { class: d(S(U)) }, w(S(y).blockSettings.css), 3), h("textarea", {
1316
+ value: n.block.customCss || "",
1317
+ placeholder: S(y).blockSettings.cssPlaceholder,
1318
+ rows: "3",
1319
+ class: d(S(st)),
1320
+ onInput: a[6] ||= (e) => p("update", { customCss: e.target.value })
1321
+ }, null, 42, Mr)]),
1322
+ _: 1
1323
+ }, 8, ["title", "open"]),
1324
+ ee.value ? (e(), x(Q, {
1325
+ key: 0,
1326
+ title: S(y).blockSettings.displayCondition,
1327
+ open: T.has("condition"),
1328
+ onToggle: a[11] ||= (e) => N("condition")
1329
+ }, {
1330
+ default: k(() => [h("div", Nr, [h("select", {
1331
+ class: d(["tpl:w-full tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:outline-none tpl:transition-all tpl:duration-150 tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]", n.block.displayCondition ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-text)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"]),
1332
+ value: O.value || P.value ? "__custom__" : n.block.displayCondition?.label ?? "",
1333
+ onChange: a[8] ||= (e) => {
1334
+ let t = e.target.value;
1335
+ if (t === "__custom__") {
1336
+ te();
1337
+ return;
1338
+ }
1339
+ if (O.value = !1, !t) {
1340
+ p("update", { displayCondition: void 0 });
1341
+ return;
1342
+ }
1343
+ let n = S(b).find((e) => e.label === t);
1344
+ n && p("update", { displayCondition: n });
1345
+ }
1346
+ }, [
1347
+ h("option", Fr, w(S(y).blockSettings.noCondition), 1),
1348
+ (e(!0), g(_, null, o(ne.value, (t, n) => (e(), g(_, { key: n }, [n ? (e(), g("optgroup", {
1349
+ key: 0,
1350
+ label: String(n)
1351
+ }, [(e(!0), g(_, null, o(t, (t) => (e(), g("option", {
1352
+ key: t.label,
1353
+ value: t.label
1354
+ }, w(t.label), 9, Lr))), 128))], 8, Ir)) : (e(!0), g(_, { key: 1 }, o(t, (t) => (e(), g("option", {
1355
+ key: t.label,
1356
+ value: t.label
1357
+ }, w(t.label), 9, Rr))), 128))], 64))), 128)),
1358
+ S(C) ? (e(), g("option", zr, w(S(y).blockSettings.customCondition), 1)) : v("", !0)
1359
+ ], 42, Pr), O.value || P.value ? (e(), g("div", Br, [
1360
+ h("div", null, [h("label", Vr, w(S(y).blockSettings.customConditionBefore), 1), t(h("textarea", {
1361
+ "onUpdate:modelValue": a[9] ||= (e) => A.value = e,
1362
+ rows: "2",
1363
+ class: d(S(st))
1364
+ }, null, 2), [[u, A.value]])]),
1365
+ h("div", null, [h("label", Hr, w(S(y).blockSettings.customConditionAfter), 1), t(h("textarea", {
1366
+ "onUpdate:modelValue": a[10] ||= (e) => j.value = e,
1367
+ rows: "2",
1368
+ class: d(S(st))
1369
+ }, null, 2), [[u, j.value]])]),
1370
+ h("div", Ur, [h("button", {
1371
+ type: "button",
1372
+ class: "tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-[var(--tpl-primary)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-bg)] tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:opacity-50",
1373
+ disabled: !A.value.trim(),
1374
+ onClick: F
1375
+ }, w(S(y).blockSettings.applyCondition), 9, Wr)])
1376
+ ])) : n.block.displayCondition && !P.value ? (e(), g(_, { key: 1 }, [n.block.displayCondition.description ? (e(), g("p", Gr, w(n.block.displayCondition.description), 1)) : v("", !0), h("div", Kr, [h("pre", qr, w(n.block.displayCondition.before), 1), n.block.displayCondition.after ? (e(), g("pre", Jr, w(n.block.displayCondition.after), 1)) : v("", !0)])], 64)) : v("", !0)])]),
1377
+ _: 1
1378
+ }, 8, ["title", "open"])) : v("", !0)
1379
+ ], 2));
1380
+ }
1381
+ }), Xr = ["title"], Zr = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Qr = {
1382
+ key: 1,
1383
+ class: "tpl:text-[var(--tpl-danger)]"
1384
+ }, $r = [
1385
+ "aria-checked",
1386
+ "aria-label",
1387
+ "disabled"
1388
+ ], ei = /* @__PURE__ */ f({
1389
+ __name: "BooleanField",
1390
+ props: {
1391
+ field: {},
1392
+ modelValue: { type: Boolean },
1393
+ readOnly: { type: Boolean }
1394
+ },
1395
+ emits: ["update:modelValue"],
1396
+ setup(t, { emit: n }) {
1397
+ let r = n, { t: i } = R();
1398
+ return (n, a) => (e(), g("div", {
1399
+ class: "tpl:mb-3.5",
1400
+ title: t.readOnly ? S(i).customBlocks.dataSource.readOnlyTooltip : void 0
1401
+ }, [h("label", { class: d(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", t.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [h("span", Zr, [
1402
+ l(w(t.field.label) + " ", 1),
1403
+ t.readOnly ? (e(), x(S(ht), {
1404
+ key: 0,
1405
+ size: 12,
1406
+ class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
1407
+ })) : v("", !0),
1408
+ t.field.required ? (e(), g("span", Qr, " * ")) : v("", !0)
1409
+ ]), h("button", {
1410
+ type: "button",
1411
+ role: "switch",
1412
+ "aria-checked": t.modelValue,
1413
+ "aria-label": t.field.label,
1414
+ class: d([
1415
+ "tpl:relative tpl:inline-flex tpl:h-5 tpl:w-9 tpl:shrink-0 tpl:rounded-full tpl:border-2 tpl:border-transparent tpl:transition-colors tpl:duration-200",
1416
+ t.modelValue ? "tpl:bg-[var(--tpl-primary)]" : "tpl:bg-[var(--tpl-border)]",
1417
+ t.readOnly ? "tpl:opacity-60 tpl:cursor-not-allowed" : "tpl:cursor-pointer"
1418
+ ]),
1419
+ disabled: t.readOnly,
1420
+ onClick: a[0] ||= (e) => !t.readOnly && r("update:modelValue", !t.modelValue)
1421
+ }, [h("span", { class: d(["tpl:pointer-events-none tpl:inline-block tpl:size-4 tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow tpl:transition-transform tpl:duration-200", t.modelValue ? "tpl:translate-x-4" : "tpl:translate-x-0"]) }, null, 2)], 10, $r)], 2)], 8, Xr));
1422
+ }
1423
+ }), ti = { class: "tpl:mb-3.5" }, ni = {
1424
+ key: 1,
1425
+ class: "tpl:text-[var(--tpl-danger)]"
1426
+ }, $ = /* @__PURE__ */ f({
1427
+ __name: "FieldWrapper",
1428
+ props: {
1429
+ label: {},
1430
+ required: { type: Boolean },
1431
+ readOnly: { type: Boolean }
1432
+ },
1433
+ setup(t) {
1434
+ return (n, r) => (e(), g("div", ti, [h("label", { class: d(S(U)) }, [
1435
+ l(w(t.label) + " ", 1),
1436
+ t.readOnly ? (e(), x(S(ht), {
1437
+ key: 0,
1438
+ size: 12,
1439
+ class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
1440
+ })) : v("", !0),
1441
+ t.required ? (e(), g("span", ni, "*")) : v("", !0)
1442
+ ], 2), s(n.$slots, "default")]));
1443
+ }
1444
+ }), ri = /* @__PURE__ */ f({
1445
+ __name: "ColorField",
1446
+ props: {
1447
+ field: {},
1448
+ modelValue: {},
1449
+ readOnly: { type: Boolean }
1450
+ },
1451
+ emits: ["update:modelValue"],
1452
+ setup(t, { emit: n }) {
1453
+ let r = n, { t: i } = R();
1454
+ return (n, a) => (e(), x($, {
1455
+ label: t.field.label,
1456
+ required: t.field.required,
1457
+ "read-only": t.readOnly
1458
+ }, {
1459
+ default: k(() => [E(K, {
1460
+ "model-value": t.modelValue || S("#000000"),
1461
+ placeholder: t.field.placeholder || S("#000000"),
1462
+ disabled: t.readOnly,
1463
+ title: t.readOnly ? S(i).customBlocks.dataSource.readOnlyTooltip : void 0,
1464
+ "onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
1465
+ }, null, 8, [
1466
+ "model-value",
1467
+ "placeholder",
1468
+ "disabled",
1469
+ "title"
1470
+ ])]),
1471
+ _: 1
1472
+ }, 8, [
1473
+ "label",
1474
+ "required",
1475
+ "read-only"
1476
+ ]));
1477
+ }
1478
+ }), ii = [
1479
+ "value",
1480
+ "placeholder",
1481
+ "title"
1482
+ ], ai = ["value", "placeholder"], oi = /* @__PURE__ */ f({
1483
+ __name: "ImageField",
1484
+ props: {
1485
+ field: {},
1486
+ modelValue: {},
1487
+ readOnly: { type: Boolean }
1488
+ },
1489
+ emits: ["update:modelValue"],
1490
+ setup(t, { emit: n }) {
1491
+ let r = n, { t: i } = R(), a = D(Re, null), o = m(() => !!a);
1492
+ async function s() {
1493
+ let e = await a?.({ accept: ["images"] });
1494
+ e && r("update:modelValue", e.url);
1495
+ }
1496
+ return (n, a) => (e(), x($, {
1497
+ label: t.field.label,
1498
+ required: t.field.required,
1499
+ "read-only": t.readOnly
1500
+ }, {
1501
+ default: k(() => [t.readOnly ? (e(), g("input", {
1502
+ key: 0,
1503
+ type: "url",
1504
+ class: d([S(H), "tpl:opacity-60 tpl:cursor-not-allowed"]),
1505
+ value: t.modelValue,
1506
+ placeholder: t.field.placeholder || "https://...",
1507
+ disabled: "",
1508
+ title: S(i).customBlocks.dataSource.readOnlyTooltip
1509
+ }, null, 10, ii)) : (e(), g("input", {
1510
+ key: 1,
1511
+ type: "url",
1512
+ class: d(S(H)),
1513
+ value: t.modelValue,
1514
+ placeholder: t.field.placeholder || "https://...",
1515
+ onInput: a[0] ||= (e) => r("update:modelValue", e.target.value)
1516
+ }, null, 42, ai)), o.value && !t.readOnly ? (e(), g("button", {
1517
+ key: 2,
1518
+ class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-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:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
1519
+ onClick: a[1] ||= (e) => s()
1520
+ }, [E(S(me), {
1521
+ size: 14,
1522
+ "stroke-width": 1.5
1523
+ }), l(" " + w(S(i).image.browseMedia), 1)])) : v("", !0)]),
1524
+ _: 1
1525
+ }, 8, [
1526
+ "label",
1527
+ "required",
1528
+ "read-only"
1529
+ ]));
1530
+ }
1531
+ }), si = [
1532
+ "value",
1533
+ "placeholder",
1534
+ "min",
1535
+ "max",
1536
+ "step",
1537
+ "disabled",
1538
+ "title"
1539
+ ], ci = /* @__PURE__ */ f({
1540
+ __name: "NumberField",
1541
+ props: {
1542
+ field: {},
1543
+ modelValue: {},
1544
+ readOnly: { type: Boolean }
1545
+ },
1546
+ emits: ["update:modelValue"],
1547
+ setup(t, { emit: n }) {
1548
+ let r = n, { t: i } = R();
1549
+ return (n, a) => (e(), x($, {
1550
+ label: t.field.label,
1551
+ required: t.field.required,
1552
+ "read-only": t.readOnly
1553
+ }, {
1554
+ default: k(() => [h("input", {
1555
+ type: "number",
1556
+ class: d([S(H), t.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
1557
+ value: t.modelValue,
1558
+ placeholder: t.field.placeholder,
1559
+ min: t.field.min,
1560
+ max: t.field.max,
1561
+ step: t.field.step,
1562
+ disabled: t.readOnly,
1563
+ title: t.readOnly ? S(i).customBlocks.dataSource.readOnlyTooltip : void 0,
1564
+ onInput: a[0] ||= (e) => !t.readOnly && r("update:modelValue", Number(e.target.value))
1565
+ }, null, 42, si)]),
1566
+ _: 1
1567
+ }, 8, [
1568
+ "label",
1569
+ "required",
1570
+ "read-only"
1571
+ ]));
1572
+ }
1573
+ }), li = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, ui = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, di = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, fi = ["title", "onClick"], pi = {
1574
+ key: 1,
1575
+ class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1576
+ }, mi = /* @__PURE__ */ f({
1577
+ __name: "RepeatableField",
1578
+ props: {
1579
+ field: {},
1580
+ modelValue: {},
1581
+ readOnly: { type: Boolean }
1582
+ },
1583
+ emits: ["update:modelValue"],
1584
+ setup(t, { emit: n }) {
1585
+ let i = t, a = n, { t: s } = R(), c = m(() => i.modelValue || []), u = m(() => !i.field.maxItems || c.value.length < i.field.maxItems), f = m(() => !i.field.minItems || c.value.length > i.field.minItems);
1586
+ function p() {
1587
+ if (!u.value || i.readOnly) return;
1588
+ let e = {};
1589
+ for (let t of i.field.fields) e[t.key] = t.default ?? "";
1590
+ a("update:modelValue", [...c.value, e]);
1591
+ }
1592
+ function y(e) {
1593
+ if (!f.value || i.readOnly) return;
1594
+ let t = [...c.value];
1595
+ t.splice(e, 1), a("update:modelValue", t);
1596
+ }
1597
+ function b(e, t, n) {
1598
+ a("update:modelValue", c.value.map((r, i) => i === e ? {
1599
+ ...r,
1600
+ [t]: n
1601
+ } : r));
1602
+ }
1603
+ return (n, i) => (e(), x($, {
1604
+ label: t.field.label,
1605
+ required: t.field.required,
1606
+ "read-only": t.readOnly
1607
+ }, {
1608
+ default: k(() => [h("div", li, [
1609
+ (e(!0), g(_, null, o(c.value, (n, i) => (e(), g("div", {
1610
+ key: `${t.field.key}-${i}`,
1611
+ class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
1612
+ }, [h("div", ui, [h("span", di, " #" + w(i + 1), 1), f.value && !t.readOnly ? (e(), g("button", {
1613
+ key: 0,
1614
+ type: "button",
1615
+ class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]",
1616
+ title: S(s).customBlocks.fields.removeItem,
1617
+ onClick: (e) => y(i)
1618
+ }, [E(S($e), {
1619
+ size: 12,
1620
+ "stroke-width": 2
1621
+ })], 8, fi)) : v("", !0)]), (e(!0), g(_, null, o(t.field.fields, (a) => (e(), x(r(S(Ci)(a.type)), {
1622
+ key: a.key,
1623
+ field: a,
1624
+ "model-value": n[a.key],
1625
+ "read-only": t.readOnly,
1626
+ "onUpdate:modelValue": (e) => b(i, a.key, e)
1627
+ }, null, 8, [
1628
+ "field",
1629
+ "model-value",
1630
+ "read-only",
1631
+ "onUpdate:modelValue"
1632
+ ]))), 128))]))), 128)),
1633
+ u.value && !t.readOnly ? (e(), g("button", {
1634
+ key: 0,
1635
+ type: "button",
1636
+ class: d(S(ot)),
1637
+ onClick: p
1638
+ }, [E(S(Y), {
1639
+ size: 14,
1640
+ "stroke-width": 2
1641
+ }), l(" " + w(S(s).customBlocks.fields.addItem), 1)], 2)) : v("", !0),
1642
+ !u.value && !t.readOnly ? (e(), g("p", pi, w(S(s).customBlocks.fields.maxItemsReached), 1)) : v("", !0)
1643
+ ])]),
1644
+ _: 1
1645
+ }, 8, [
1646
+ "label",
1647
+ "required",
1648
+ "read-only"
1649
+ ]));
1650
+ }
1651
+ }), hi = [
1652
+ "value",
1653
+ "disabled",
1654
+ "title"
1655
+ ], gi = ["value"], _i = /* @__PURE__ */ f({
1656
+ __name: "SelectField",
1657
+ props: {
1658
+ field: {},
1659
+ modelValue: {},
1660
+ readOnly: { type: Boolean }
1661
+ },
1662
+ emits: ["update:modelValue"],
1663
+ setup(t, { emit: n }) {
1664
+ let r = n, { t: i } = R();
1665
+ return (n, a) => (e(), x($, {
1666
+ label: t.field.label,
1667
+ required: t.field.required,
1668
+ "read-only": t.readOnly
1669
+ }, {
1670
+ default: k(() => [h("select", {
1671
+ class: d([S(H), t.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
1672
+ value: t.modelValue,
1673
+ disabled: t.readOnly,
1674
+ title: t.readOnly ? S(i).customBlocks.dataSource.readOnlyTooltip : void 0,
1675
+ onChange: a[0] ||= (e) => !t.readOnly && r("update:modelValue", e.target.value)
1676
+ }, [(e(!0), g(_, null, o(t.field.options, (t) => (e(), g("option", {
1677
+ key: t.value,
1678
+ value: t.value
1679
+ }, w(t.label), 9, gi))), 128))], 42, hi)]),
1680
+ _: 1
1681
+ }, 8, [
1682
+ "label",
1683
+ "required",
1684
+ "read-only"
1685
+ ]));
1686
+ }
1687
+ }), vi = [
1688
+ "value",
1689
+ "placeholder",
1690
+ "title"
1691
+ ], yi = /* @__PURE__ */ f({
1692
+ __name: "TextField",
1693
+ props: {
1694
+ field: {},
1695
+ modelValue: {},
1696
+ readOnly: { type: Boolean }
1697
+ },
1698
+ emits: ["update:modelValue"],
1699
+ setup(t, { emit: n }) {
1700
+ let r = n, { t: i } = R();
1701
+ return (n, a) => (e(), x($, {
1702
+ label: t.field.label,
1703
+ required: t.field.required,
1704
+ "read-only": t.readOnly
1705
+ }, {
1706
+ default: k(() => [t.readOnly ? (e(), g("input", {
1707
+ key: 0,
1708
+ type: "text",
1709
+ class: d([S(H), "tpl:opacity-60 tpl:cursor-not-allowed"]),
1710
+ value: t.modelValue,
1711
+ placeholder: t.field.placeholder,
1712
+ disabled: "",
1713
+ title: S(i).customBlocks.dataSource.readOnlyTooltip
1714
+ }, null, 10, vi)) : (e(), x(X, {
1715
+ key: 1,
1716
+ "model-value": t.modelValue,
1717
+ placeholder: t.field.placeholder,
1718
+ "onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
1719
+ }, null, 8, ["model-value", "placeholder"]))]),
1720
+ _: 1
1721
+ }, 8, [
1722
+ "label",
1723
+ "required",
1724
+ "read-only"
1725
+ ]));
1726
+ }
1727
+ }), bi = [
1728
+ "value",
1729
+ "placeholder",
1730
+ "title"
1731
+ ], xi = "tpl:w-full tpl:resize-y tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:opacity-60 tpl:cursor-not-allowed", Si = {
1732
+ text: yi,
1733
+ textarea: /* @__PURE__ */ f({
1734
+ __name: "TextareaField",
1735
+ props: {
1736
+ field: {},
1737
+ modelValue: {},
1738
+ readOnly: { type: Boolean }
1739
+ },
1740
+ emits: ["update:modelValue"],
1741
+ setup(t, { emit: n }) {
1742
+ let r = n, { t: i } = R();
1743
+ return (n, a) => (e(), x($, {
1744
+ label: t.field.label,
1745
+ required: t.field.required,
1746
+ "read-only": t.readOnly
1747
+ }, {
1748
+ default: k(() => [t.readOnly ? (e(), g("textarea", {
1749
+ key: 0,
1750
+ value: t.modelValue,
1751
+ placeholder: t.field.placeholder,
1752
+ rows: "3",
1753
+ disabled: "",
1754
+ title: S(i).customBlocks.dataSource.readOnlyTooltip,
1755
+ class: d(xi)
1756
+ }, null, 8, bi)) : (e(), x(cn, {
1757
+ key: 1,
1758
+ "model-value": t.modelValue,
1759
+ placeholder: t.field.placeholder,
1760
+ "onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
1761
+ }, null, 8, ["model-value", "placeholder"]))]),
1762
+ _: 1
1763
+ }, 8, [
1764
+ "label",
1765
+ "required",
1766
+ "read-only"
1767
+ ]));
1768
+ }
1769
+ }),
1770
+ image: oi,
1771
+ color: ri,
1772
+ number: ci,
1773
+ select: _i,
1774
+ boolean: ei,
1775
+ repeatable: mi
1776
+ };
1777
+ function Ci(e) {
1778
+ return Si[e] ?? yi;
1779
+ }
1780
+ //#endregion
1781
+ //#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
1782
+ var wi = {
1783
+ key: 0,
1784
+ class: "tpl:p-4"
1785
+ }, Ti = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ei = { key: 1 }, Di = {
1786
+ key: 0,
1787
+ class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1788
+ }, Oi = {
1789
+ key: 1,
1790
+ class: "tpl:mb-4"
1791
+ }, ki = {
1792
+ key: 1,
1793
+ class: "tpl:flex tpl:h-[32px] tpl:items-center"
1794
+ }, Ai = {
1795
+ key: 0,
1796
+ class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
1797
+ }, ji = {
1798
+ key: 2,
1799
+ class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
1800
+ }, Mi = /* @__PURE__ */ f({
1801
+ __name: "CustomBlockToolbar",
1802
+ props: { block: {} },
1803
+ emits: ["updateFieldValues", "updateDataSourceFetched"],
1804
+ setup(t, { emit: n }) {
1805
+ let i = t, a = n, { t: s } = R(), c = D(Ae, []), u = m(() => c.find((e) => e.type === i.block.customType)), { isFetching: d, fetchError: f, fetch: p, hasDataSource: y, needsFetch: b } = L({
1806
+ definition: u,
1807
+ block: m(() => i.block),
1808
+ onUpdate: (e, t) => {
1809
+ a("updateFieldValues", e), a("updateDataSourceFetched", t);
1810
+ }
1811
+ });
1812
+ function C(e) {
1813
+ return e.readOnly === !0 && y.value && !!i.block.dataSourceFetched;
1814
+ }
1815
+ function T(e, t) {
1816
+ a("updateFieldValues", {
1817
+ ...i.block.fieldValues,
1818
+ [e]: t
1819
+ });
1820
+ }
1821
+ return (n, i) => u.value ? (e(), g("div", Ei, [
1822
+ u.value.description ? (e(), g("p", Di, w(u.value.description), 1)) : v("", !0),
1823
+ S(y) ? (e(), g("div", Oi, [S(b) && !S(d) ? (e(), g("button", {
1824
+ key: 0,
1825
+ type: "button",
1826
+ class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-md tpl:px-3 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-bg)] tpl:transition-all tpl:duration-150 tpl:bg-[var(--tpl-primary)]",
1827
+ onClick: i[0] ||= (...e) => S(p) && S(p)(...e)
1828
+ }, w(u.value?.dataSource?.label || S(s).customBlocks.dataSource.fetchButton), 1)) : (e(), g("div", ki, [S(d) ? (e(), g("div", Ai, w(S(s).customBlocks.dataSource.fetching), 1)) : (e(), g("button", {
1829
+ key: 1,
1830
+ type: "button",
1831
+ class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-primary)] tpl:hover:text-[var(--tpl-primary)]",
1832
+ onClick: i[1] ||= (...e) => S(p) && S(p)(...e)
1833
+ }, [E(S(Ge), { size: 12 }), l(" " + w(S(s).customBlocks.dataSource.changeButton), 1)]))])), S(f) ? (e(), g("p", ji, [E(S(Ve), {
1834
+ size: 14,
1835
+ class: "tpl:shrink-0"
1836
+ }), l(" " + w(S(s).customBlocks.dataSource.fetchError), 1)])) : v("", !0)])) : v("", !0),
1837
+ (e(!0), g(_, null, o(u.value.fields, (n) => (e(), x(r(S(Ci)(n.type)), {
1838
+ key: n.key,
1839
+ field: n,
1840
+ "model-value": t.block.fieldValues[n.key],
1841
+ "read-only": C(n),
1842
+ "onUpdate:modelValue": (e) => T(n.key, e)
1843
+ }, null, 8, [
1844
+ "field",
1845
+ "model-value",
1846
+ "read-only",
1847
+ "onUpdate:modelValue"
1848
+ ]))), 128))
1849
+ ])) : (e(), g("div", wi, [h("p", Ti, w(S(s).customBlocks.toolbar.noDefinition), 1)]));
1850
+ }
1851
+ }), Ni = { class: "tpl:mb-3.5" }, Pi = { class: "tpl:mb-3.5" }, Fi = { class: "tpl:mb-3.5" }, Ii = { class: "tpl:flex tpl:items-stretch" }, Li = ["value"], Ri = /* @__PURE__ */ f({
1852
+ __name: "DividerToolbar",
1853
+ props: { block: {} },
1854
+ emits: ["update"],
1855
+ setup(t, { emit: n }) {
1856
+ let r = n, { t: i } = R();
1857
+ function a(e, t) {
1858
+ r("update", { [e]: t });
1859
+ }
1860
+ return (n, r) => (e(), g(_, null, [
1861
+ h("div", Ni, [h("label", { class: d(S(U)) }, w(S(i).divider.style), 3), E(J, {
1862
+ options: [
1863
+ {
1864
+ value: "solid",
1865
+ label: S(i).divider.solid
1866
+ },
1867
+ {
1868
+ value: "dashed",
1869
+ label: S(i).divider.dashed
1870
+ },
1871
+ {
1872
+ value: "dotted",
1873
+ label: S(i).divider.dotted
1874
+ }
1875
+ ],
1876
+ "model-value": t.block.lineStyle,
1877
+ "onUpdate:modelValue": r[0] ||= (e) => a("lineStyle", e)
1878
+ }, null, 8, ["options", "model-value"])]),
1879
+ h("div", Pi, [h("label", { class: d(S(U)) }, w(S(i).divider.color), 3), E(K, {
1880
+ "model-value": t.block.color,
1881
+ "onUpdate:modelValue": r[1] ||= (e) => a("color", e)
1882
+ }, null, 8, ["model-value"])]),
1883
+ h("div", Fi, [h("label", { class: d(S(U)) }, w(S(i).divider.thickness), 3), h("div", Ii, [h("input", {
1884
+ type: "number",
1885
+ class: d(S(G)),
1886
+ value: t.block.thickness,
1887
+ min: "1",
1888
+ max: "10",
1889
+ onInput: r[2] ||= (e) => a("thickness", Number(e.target.value))
1890
+ }, null, 42, Li), h("span", { class: d(S(W)) }, "px", 2)])])
1891
+ ], 64));
1892
+ }
1893
+ }), zi = { class: "tpl:mb-3.5" }, Bi = ["value"], Vi = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Hi = /* @__PURE__ */ f({
1894
+ __name: "HtmlToolbar",
1895
+ props: { block: {} },
1896
+ emits: ["update"],
1897
+ setup(t, { emit: n }) {
1898
+ let r = n, { t: i } = R();
1899
+ return (n, a) => (e(), g("div", zi, [
1900
+ h("label", { class: d(S(U)) }, w(S(i).html.content), 3),
1901
+ h("textarea", {
1902
+ value: t.block.content,
1903
+ placeholder: "<div>...</div>",
1904
+ rows: "10",
1905
+ class: d(S(st)),
1906
+ onInput: a[0] ||= (e) => r("update", { content: e.target.value })
1907
+ }, null, 42, Bi),
1908
+ h("p", Vi, [E(S(qe), {
1909
+ size: 12,
1910
+ class: "tpl:mt-0.5 tpl:shrink-0"
1911
+ }), l(" " + w(S(i).html.sanitizationHint), 1)])
1912
+ ]));
1913
+ }
1914
+ }), Ui = { class: "tpl:mb-3.5" }, Wi = {
1915
+ key: 0,
1916
+ class: "tpl:mb-3.5"
1917
+ }, Gi = ["value", "placeholder"], Ki = { class: "tpl:mb-3.5" }, qi = { class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]" }, Ji = ["checked"], Yi = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, Xi = { class: "tpl:mb-3.5" }, Zi = ["value"], Qi = { value: "full" }, $i = { class: "tpl:mb-3.5" }, ea = { class: "tpl:mb-3.5" }, ta = {
1918
+ key: 0,
1919
+ class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
1920
+ }, na = ["checked"], ra = /* @__PURE__ */ f({
1921
+ __name: "ImageToolbar",
1922
+ props: { block: {} },
1923
+ emits: ["update"],
1924
+ setup(t, { emit: n }) {
1925
+ let r = n, { t: i } = R(), a = D(Re, null), o = D(De, te.liquid), s = m(() => !!a), u = c(!1), f = c(!1), { start: p } = Te(() => {
1926
+ u.value = !1;
1927
+ }, 1e3, { immediate: !1 });
1928
+ function y(e, t) {
1929
+ r("update", { [e]: t });
1930
+ }
1931
+ async function b() {
1932
+ let e = await a?.({ accept: ["images"] });
1933
+ e && (y("src", e.url), e.alt && (y("alt", e.alt), f.value = !0), u.value = !0, p());
1934
+ }
1935
+ return (n, r) => (e(), g(_, null, [
1936
+ h("div", Ui, [
1937
+ h("label", { class: d(S(U)) }, w(S(i).image.imageUrl), 3),
1938
+ E(X, {
1939
+ "model-value": t.block.src,
1940
+ type: "url",
1941
+ placeholder: S(i).image.imageUrlPlaceholder,
1942
+ pulse: u.value,
1943
+ "onUpdate:modelValue": r[0] ||= (e) => y("src", e)
1944
+ }, null, 8, [
1945
+ "model-value",
1946
+ "placeholder",
1947
+ "pulse"
1948
+ ]),
1949
+ s.value ? (e(), g("button", {
1950
+ key: 0,
1951
+ class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-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",
1952
+ style: {
1953
+ "border-color": "var(--tpl-border)",
1954
+ color: "var(--tpl-primary)",
1955
+ "background-color": "var(--tpl-bg)"
1956
+ },
1957
+ onClick: b
1958
+ }, [E(S(me), {
1959
+ size: 14,
1960
+ "stroke-width": 1.5
1961
+ }), l(" " + w(S(i).image.browseMedia), 1)])) : v("", !0)
1962
+ ]),
1963
+ S(ee)(t.block.src, S(o)) ? (e(), g("div", Wi, [h("label", { class: d(S(U)) }, [l(w(S(i).image.placeholderUrl) + " ", 1), r[8] ||= h("span", { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, w("(optional)"), -1)], 2), h("input", {
1964
+ type: "url",
1965
+ class: d(S(H)),
1966
+ value: t.block.placeholderUrl || "",
1967
+ placeholder: S(i).image.placeholderUrlPlaceholder,
1968
+ onInput: r[1] ||= (e) => y("placeholderUrl", e.target.value)
1969
+ }, null, 42, Gi)])) : v("", !0),
1970
+ h("div", Ki, [
1971
+ h("label", { class: d(S(U)) }, w(S(i).image.altText), 3),
1972
+ E(X, {
1973
+ "model-value": t.block.alt,
1974
+ type: "text",
1975
+ placeholder: S(i).image.altTextPlaceholder,
1976
+ pulse: f.value,
1977
+ disabled: t.block.decorative === !0,
1978
+ "onUpdate:modelValue": r[2] ||= (e) => y("alt", e)
1979
+ }, null, 8, [
1980
+ "model-value",
1981
+ "placeholder",
1982
+ "pulse",
1983
+ "disabled"
1984
+ ]),
1985
+ h("label", qi, [h("input", {
1986
+ type: "checkbox",
1987
+ class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
1988
+ checked: t.block.decorative === !0,
1989
+ onChange: r[3] ||= (e) => y("decorative", e.target.checked)
1990
+ }, null, 40, Ji), h("span", null, [l(w(S(i).image.decorative) + " ", 1), h("span", Yi, w(S(i).image.decorativeHint), 1)])])
1991
+ ]),
1992
+ h("div", Xi, [h("label", { class: d(S(U)) }, w(S(i).image.width), 3), h("select", {
1993
+ class: d(S(H)),
1994
+ value: t.block.width,
1995
+ onChange: r[4] ||= (e) => y("width", e.target.value === "full" ? "full" : Number(e.target.value))
1996
+ }, [
1997
+ h("option", Qi, w(S(i).image.fullWidth), 1),
1998
+ r[9] ||= h("option", { value: "300" }, "300px", -1),
1999
+ r[10] ||= h("option", { value: "400" }, "400px", -1),
2000
+ r[11] ||= h("option", { value: "500" }, "500px", -1)
2001
+ ], 42, Zi)]),
2002
+ h("div", $i, [h("label", { class: d(S(U)) }, w(S(i).title.align), 3), E(J, {
2003
+ options: [
2004
+ {
2005
+ value: "left",
2006
+ label: S(i).title.alignLeft
2007
+ },
2008
+ {
2009
+ value: "center",
2010
+ label: S(i).title.alignCenter
2011
+ },
2012
+ {
2013
+ value: "right",
2014
+ label: S(i).title.alignRight
2015
+ }
2016
+ ],
2017
+ "model-value": t.block.align,
2018
+ "onUpdate:modelValue": r[5] ||= (e) => y("align", e)
2019
+ }, null, 8, ["options", "model-value"])]),
2020
+ h("div", ea, [
2021
+ h("label", { class: d(S(U)) }, w(S(i).image.linkUrl), 3),
2022
+ E(X, {
2023
+ "model-value": t.block.linkUrl || "",
2024
+ type: "url",
2025
+ placeholder: S(i).image.imageUrlPlaceholder,
2026
+ "onUpdate:modelValue": r[6] ||= (e) => y("linkUrl", e)
2027
+ }, null, 8, ["model-value", "placeholder"]),
2028
+ t.block.linkUrl ? (e(), g("label", ta, [h("input", {
2029
+ type: "checkbox",
2030
+ class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
2031
+ checked: t.block.linkOpenInNewTab ?? !1,
2032
+ onChange: r[7] ||= (e) => y("linkOpenInNewTab", e.target.checked)
2033
+ }, null, 40, na), l(" " + w(S(i).image.openInNewTab), 1)])) : v("", !0)
2034
+ ])
2035
+ ], 64));
2036
+ }
2037
+ }), ia = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, aa = { class: "tpl:flex tpl:items-center tpl:gap-2" }, oa = [
2038
+ "value",
2039
+ "placeholder",
2040
+ "onInput"
2041
+ ], sa = ["title", "onClick"], ca = { class: "tpl:flex tpl:items-center tpl:gap-3 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, la = ["checked", "onChange"], ua = { class: "tpl:flex tpl:items-center tpl:gap-2" }, da = ["value"], fa = { value: "" }, pa = ["value"], ma = ["value"], ha = /* @__PURE__ */ f({
2042
+ __name: "MenuToolbar",
2043
+ props: {
2044
+ block: {},
2045
+ fontFamilies: {}
2046
+ },
2047
+ emits: ["update"],
2048
+ setup(t, { emit: n }) {
2049
+ let r = t, i = n, { t: a } = R(), s = m(() => [
2050
+ {
2051
+ key: "openInNewTab",
2052
+ label: a.menu.openInNewTab
2053
+ },
2054
+ {
2055
+ key: "bold",
2056
+ label: a.menu.bold
2057
+ },
2058
+ {
2059
+ key: "underline",
2060
+ label: a.menu.underline
2061
+ }
2062
+ ]), c = m(() => [
2063
+ {
2064
+ value: "left",
2065
+ label: a.title.alignLeft,
2066
+ icon: Qe
2067
+ },
2068
+ {
2069
+ value: "center",
2070
+ label: a.title.alignCenter,
2071
+ icon: Ze
2072
+ },
2073
+ {
2074
+ value: "right",
2075
+ label: a.title.alignRight,
2076
+ icon: Xe
2077
+ }
2078
+ ]);
2079
+ function u(e, t) {
2080
+ i("update", { [e]: t });
2081
+ }
2082
+ function f() {
2083
+ let e = {
2084
+ id: N(),
2085
+ text: "",
2086
+ url: "",
2087
+ openInNewTab: !1,
2088
+ bold: !1,
2089
+ underline: !1
2090
+ };
2091
+ i("update", { items: [...r.block.items, e] });
2092
+ }
2093
+ function p(e, t, n) {
2094
+ i("update", { items: r.block.items.map((r) => r.id === e ? {
2095
+ ...r,
2096
+ [t]: n
2097
+ } : r) });
2098
+ }
2099
+ function v(e) {
2100
+ i("update", { items: r.block.items.filter((t) => t.id !== e) });
2101
+ }
2102
+ return (n, r) => (e(), g(_, null, [
2103
+ E(q, { label: S(a).menu.items }, {
2104
+ default: k(() => [h("div", ia, [(e(!0), g(_, null, o(t.block.items, (n) => (e(), g("div", {
2105
+ key: n.id,
2106
+ class: "tpl:flex tpl:flex-col tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-2"
2107
+ }, [
2108
+ h("div", aa, [h("input", {
2109
+ type: "text",
2110
+ class: d([S(H), "tpl:flex-1"]),
2111
+ value: n.text,
2112
+ placeholder: S(a).menu.text,
2113
+ onInput: (e) => p(n.id, "text", e.target.value)
2114
+ }, null, 42, oa), h("button", {
2115
+ class: d(S(at)),
2116
+ title: S(a).menu.removeItem,
2117
+ onClick: (e) => v(n.id)
2118
+ }, [E(S(et), {
2119
+ size: 14,
2120
+ "stroke-width": 2
2121
+ })], 10, sa)]),
2122
+ E(X, {
2123
+ "model-value": n.url,
2124
+ type: "url",
2125
+ placeholder: S(a).menu.urlPlaceholder,
2126
+ "onUpdate:modelValue": (e) => p(n.id, "url", e)
2127
+ }, null, 8, [
2128
+ "model-value",
2129
+ "placeholder",
2130
+ "onUpdate:modelValue"
2131
+ ]),
2132
+ h("div", ca, [(e(!0), g(_, null, o(s.value, (t) => (e(), g("label", {
2133
+ key: t.key,
2134
+ class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1"
2135
+ }, [h("input", {
2136
+ type: "checkbox",
2137
+ checked: n[t.key],
2138
+ class: "tpl:accent-[var(--tpl-primary)]",
2139
+ onChange: (e) => p(n.id, t.key, e.target.checked)
2140
+ }, null, 40, la), l(" " + w(t.label), 1)]))), 128))]),
2141
+ h("div", ua, [h("label", { class: d([S(U), "tpl:!mb-0"]) }, w(S(a).menu.color), 3), E(K, {
2142
+ "swatch-only": "",
2143
+ "model-value": n.color || t.block.linkColor || t.block.color,
2144
+ "onUpdate:modelValue": (e) => p(n.id, "color", e)
2145
+ }, null, 8, ["model-value", "onUpdate:modelValue"])])
2146
+ ]))), 128)), h("button", {
2147
+ class: d(S(ot)),
2148
+ onClick: f
2149
+ }, [E(S(Y), {
2150
+ size: 14,
2151
+ "stroke-width": 2
2152
+ }), l(" " + w(S(a).menu.addItem), 1)], 2)])]),
2153
+ _: 1
2154
+ }, 8, ["label"]),
2155
+ E(q, { label: S(a).menu.fontFamily }, {
2156
+ default: k(() => [h("select", {
2157
+ class: d(S(H)),
2158
+ value: t.block.fontFamily || "",
2159
+ onChange: r[0] ||= (e) => u("fontFamily", e.target.value || void 0)
2160
+ }, [h("option", fa, w(S(a).title.inheritFont), 1), (e(!0), g(_, null, o(t.fontFamilies, (t) => (e(), g("option", {
2161
+ key: t.value,
2162
+ value: t.value
2163
+ }, w(t.label), 9, pa))), 128))], 42, da)]),
2164
+ _: 1
2165
+ }, 8, ["label"]),
2166
+ E(q, { label: S(a).menu.fontSize }, {
2167
+ default: k(() => [E(ut, {
2168
+ "model-value": t.block.fontSize,
2169
+ min: 8,
2170
+ max: 48,
2171
+ suffix: "px",
2172
+ "onUpdate:modelValue": r[1] ||= (e) => u("fontSize", e)
2173
+ }, null, 8, ["model-value"])]),
2174
+ _: 1
2175
+ }, 8, ["label"]),
2176
+ E(q, { label: S(a).menu.color }, {
2177
+ default: k(() => [E(K, {
2178
+ "model-value": t.block.color,
2179
+ "onUpdate:modelValue": r[2] ||= (e) => u("color", e)
2180
+ }, null, 8, ["model-value"])]),
2181
+ _: 1
2182
+ }, 8, ["label"]),
2183
+ E(q, { label: S(a).menu.linkColor }, {
2184
+ default: k(() => [E(K, {
2185
+ "model-value": t.block.linkColor || t.block.color,
2186
+ "onUpdate:modelValue": r[3] ||= (e) => u("linkColor", e || void 0)
2187
+ }, null, 8, ["model-value"])]),
2188
+ _: 1
2189
+ }, 8, ["label"]),
2190
+ E(q, { label: S(a).menu.textAlign }, {
2191
+ default: k(() => [E(J, {
2192
+ options: c.value,
2193
+ "model-value": t.block.textAlign,
2194
+ "onUpdate:modelValue": r[4] ||= (e) => u("textAlign", e)
2195
+ }, null, 8, ["options", "model-value"])]),
2196
+ _: 1
2197
+ }, 8, ["label"]),
2198
+ E(q, { label: S(a).menu.separator }, {
2199
+ default: k(() => [h("input", {
2200
+ type: "text",
2201
+ class: d(S(H)),
2202
+ value: t.block.separator,
2203
+ onInput: r[5] ||= (e) => u("separator", e.target.value)
2204
+ }, null, 42, ma)]),
2205
+ _: 1
2206
+ }, 8, ["label"]),
2207
+ E(q, { label: S(a).menu.separatorColor }, {
2208
+ default: k(() => [E(K, {
2209
+ "model-value": t.block.separatorColor,
2210
+ "onUpdate:modelValue": r[6] ||= (e) => u("separatorColor", e)
2211
+ }, null, 8, ["model-value"])]),
2212
+ _: 1
2213
+ }, 8, ["label"]),
2214
+ E(q, { label: S(a).menu.spacing }, {
2215
+ default: k(() => [E(ut, {
2216
+ "model-value": t.block.spacing,
2217
+ min: 0,
2218
+ max: 50,
2219
+ suffix: "px",
2220
+ "onUpdate:modelValue": r[7] ||= (e) => u("spacing", e)
2221
+ }, null, 8, ["model-value"])]),
2222
+ _: 1
2223
+ }, 8, ["label"])
2224
+ ], 64));
2225
+ }
2226
+ }), ga = { class: "tpl:mb-3.5" }, _a = ["value"], va = ["value"], ya = /* @__PURE__ */ f({
2227
+ __name: "SectionToolbar",
2228
+ props: { block: {} },
2229
+ emits: ["update"],
2230
+ setup(t, { emit: n }) {
2231
+ let r = n, { t: i } = R(), a = m(() => [
2232
+ {
2233
+ value: "1",
2234
+ label: i.section.column1
2235
+ },
2236
+ {
2237
+ value: "2",
2238
+ label: i.section.column2
2239
+ },
2240
+ {
2241
+ value: "3",
2242
+ label: i.section.column3
2243
+ },
2244
+ {
2245
+ value: "1-2",
2246
+ label: i.section.ratio12
2247
+ },
2248
+ {
2249
+ value: "2-1",
2250
+ label: i.section.ratio21
2251
+ }
2252
+ ]);
2253
+ return (n, s) => (e(), g("div", ga, [h("label", { class: d(S(U)) }, w(S(i).section.columns), 3), h("select", {
2254
+ class: d(S(H)),
2255
+ value: t.block.columns,
2256
+ onChange: s[0] ||= (e) => r("update", { columns: e.target.value })
2257
+ }, [(e(!0), g(_, null, o(a.value, (t) => (e(), g("option", {
2258
+ key: t.value,
2259
+ value: t.value
2260
+ }, w(t.label), 9, va))), 128))], 42, _a)]));
2261
+ }
2262
+ }), ba = { class: "tpl:mb-3.5" }, xa = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Sa = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ca = ["value", "onChange"], wa = ["value"], Ta = ["title", "onClick"], Ea = { class: "tpl:mb-3.5" }, Da = { class: "tpl:mb-3.5" }, Oa = { class: "tpl:mb-3.5" }, ka = { class: "tpl:flex tpl:items-stretch" }, Aa = ["value"], ja = { class: "tpl:mb-3.5" }, Ma = /* @__PURE__ */ f({
2263
+ __name: "SocialToolbar",
2264
+ props: { block: {} },
2265
+ emits: ["update"],
2266
+ setup(t, { emit: n }) {
2267
+ let r = t, i = n, { t: a } = R();
2268
+ function s(e, t) {
2269
+ i("update", { [e]: t });
2270
+ }
2271
+ function c() {
2272
+ let e = {
2273
+ id: N(),
2274
+ platform: "facebook",
2275
+ url: ""
2276
+ };
2277
+ i("update", { icons: [...r.block.icons, e] });
2278
+ }
2279
+ function u(e, t, n) {
2280
+ i("update", { icons: r.block.icons.map((r) => r.id === e ? {
2281
+ ...r,
2282
+ [t]: n
2283
+ } : r) });
2284
+ }
2285
+ function f(e) {
2286
+ i("update", { icons: r.block.icons.filter((t) => t.id !== e) });
2287
+ }
2288
+ return (n, r) => (e(), g(_, null, [
2289
+ h("div", ba, [h("label", { class: d(S(U)) }, w(S(a).social.icons), 3), h("div", xa, [(e(!0), g(_, null, o(t.block.icons, (t) => (e(), g("div", {
2290
+ key: t.id,
2291
+ class: "tpl:flex tpl:flex-col tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-2"
2292
+ }, [h("div", Sa, [h("select", {
2293
+ class: d([S(H), "tpl:flex-1"]),
2294
+ value: t.platform,
2295
+ onChange: (e) => u(t.id, "platform", e.target.value)
2296
+ }, [(e(!0), g(_, null, o(S(xe), (t) => (e(), g("option", {
2297
+ key: t,
2298
+ value: t
2299
+ }, w(S(ve)[t].name), 9, wa))), 128))], 42, Ca), h("button", {
2300
+ class: d(S(at)),
2301
+ title: S(a).social.removeIcon,
2302
+ onClick: (e) => f(t.id)
2303
+ }, [E(S(et), {
2304
+ size: 14,
2305
+ "stroke-width": 2
2306
+ })], 10, Ta)]), E(X, {
2307
+ "model-value": t.url,
2308
+ type: "url",
2309
+ placeholder: S(a).social.urlPlaceholder,
2310
+ "onUpdate:modelValue": (e) => u(t.id, "url", e)
2311
+ }, null, 8, [
2312
+ "model-value",
2313
+ "placeholder",
2314
+ "onUpdate:modelValue"
2315
+ ])]))), 128)), h("button", {
2316
+ class: d(S(ot)),
2317
+ onClick: c
2318
+ }, [E(S(Y), {
2319
+ size: 14,
2320
+ "stroke-width": 2
2321
+ }), l(" " + w(S(a).social.addIcon), 1)], 2)])]),
2322
+ h("div", Ea, [h("label", { class: d(S(U)) }, w(S(a).social.style), 3), E(J, {
2323
+ options: [
2324
+ {
2325
+ value: "solid",
2326
+ label: S(a).social.styleSolid
2327
+ },
2328
+ {
2329
+ value: "outlined",
2330
+ label: S(a).social.styleOutlined
2331
+ },
2332
+ {
2333
+ value: "rounded",
2334
+ label: S(a).social.styleRounded
2335
+ },
2336
+ {
2337
+ value: "square",
2338
+ label: S(a).social.styleSquare
2339
+ },
2340
+ {
2341
+ value: "circle",
2342
+ label: S(a).social.styleCircle
2343
+ }
2344
+ ],
2345
+ "model-value": t.block.iconStyle,
2346
+ "onUpdate:modelValue": r[0] ||= (e) => s("iconStyle", e)
2347
+ }, null, 8, ["options", "model-value"])]),
2348
+ h("div", Da, [h("label", { class: d(S(U)) }, w(S(a).social.size), 3), E(J, {
2349
+ options: [
2350
+ {
2351
+ value: "small",
2352
+ label: S(a).social.sizeSmall
2353
+ },
2354
+ {
2355
+ value: "medium",
2356
+ label: S(a).social.sizeMedium
2357
+ },
2358
+ {
2359
+ value: "large",
2360
+ label: S(a).social.sizeLarge
2361
+ }
2362
+ ],
2363
+ "model-value": t.block.iconSize,
2364
+ "onUpdate:modelValue": r[1] ||= (e) => s("iconSize", e)
2365
+ }, null, 8, ["options", "model-value"])]),
2366
+ h("div", Oa, [h("label", { class: d(S(U)) }, w(S(a).social.spacing), 3), h("div", ka, [h("input", {
2367
+ type: "number",
2368
+ class: d(S(G)),
2369
+ value: t.block.spacing,
2370
+ min: "0",
2371
+ max: "50",
2372
+ onInput: r[2] ||= (e) => s("spacing", Number(e.target.value))
2373
+ }, null, 42, Aa), h("span", { class: d(S(W)) }, "px", 2)])]),
2374
+ h("div", ja, [h("label", { class: d(S(U)) }, w(S(a).social.align), 3), E(J, {
2375
+ options: [
2376
+ {
2377
+ value: "left",
2378
+ label: S(a).title.alignLeft,
2379
+ icon: S(Qe)
2380
+ },
2381
+ {
2382
+ value: "center",
2383
+ label: S(a).title.alignCenter,
2384
+ icon: S(Ze)
2385
+ },
2386
+ {
2387
+ value: "right",
2388
+ label: S(a).title.alignRight,
2389
+ icon: S(Xe)
2390
+ }
2391
+ ],
2392
+ "model-value": t.block.align,
2393
+ "onUpdate:modelValue": r[3] ||= (e) => s("align", e)
2394
+ }, null, 8, ["options", "model-value"])])
2395
+ ], 64));
2396
+ }
2397
+ }), Na = { class: "tpl:mb-3.5" }, Pa = { class: "tpl:flex tpl:items-stretch" }, Fa = ["value"], Ia = ["value"], La = /* @__PURE__ */ f({
2398
+ __name: "SpacerToolbar",
2399
+ props: { block: {} },
2400
+ emits: ["update"],
2401
+ setup(t, { emit: n }) {
2402
+ let r = n, { t: i } = R();
2403
+ return (n, a) => (e(), g("div", Na, [
2404
+ h("label", { class: d(S(U)) }, w(S(i).spacer.height), 3),
2405
+ h("div", Pa, [h("input", {
2406
+ type: "number",
2407
+ class: d(S(G)),
2408
+ value: t.block.height,
2409
+ min: "10",
2410
+ max: "100",
2411
+ onInput: a[0] ||= (e) => r("update", { height: Number(e.target.value) })
2412
+ }, null, 42, Fa), h("span", { class: d(S(W)) }, "px", 2)]),
2413
+ h("input", {
2414
+ type: "range",
2415
+ class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
2416
+ value: t.block.height,
2417
+ min: "10",
2418
+ max: "100",
2419
+ onInput: a[1] ||= (e) => r("update", { height: Number(e.target.value) })
2420
+ }, null, 40, Ia)
2421
+ ]));
2422
+ }
2423
+ }), Ra = { class: "tpl:mb-3.5" }, za = { class: "tpl:flex tpl:items-center tpl:gap-3" }, Ba = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, Va = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Ha = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Ua = ["disabled"], Wa = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ga = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, Ka = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, qa = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Ja = ["disabled"], Ya = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Xa = { class: "tpl:mb-3.5" }, Za = { class: "tpl:mb-1.5 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Qa = ["checked"], $a = {
2424
+ key: 0,
2425
+ class: "tpl:mb-3.5"
2426
+ }, eo = { class: "tpl:mb-3.5" }, to = { class: "tpl:mb-3.5" }, no = { class: "tpl:flex tpl:items-stretch" }, ro = ["value"], io = { class: "tpl:mb-3.5" }, ao = { class: "tpl:flex tpl:items-stretch" }, oo = ["value"], so = { class: "tpl:mb-3.5" }, co = ["value"], lo = { value: "" }, uo = ["value"], fo = { class: "tpl:mb-3.5" }, po = { class: "tpl:flex tpl:items-stretch" }, mo = ["value"], ho = { class: "tpl:mb-3.5" }, go = { class: "tpl:mb-3.5" }, _o = /* @__PURE__ */ f({
2427
+ __name: "TableToolbar",
2428
+ props: {
2429
+ block: {},
2430
+ fontFamilies: {}
2431
+ },
2432
+ emits: ["update"],
2433
+ setup(t, { emit: n }) {
2434
+ let r = t, i = n, { t: a } = R(), s = m(() => r.block.rows.length > 0 ? r.block.rows[0].cells.length : 0);
2435
+ function c(e, t) {
2436
+ i("update", { [e]: t });
2437
+ }
2438
+ function u() {
2439
+ let e = r.block.rows.length > 0 ? r.block.rows[0].cells.length : 3, t = {
2440
+ id: N(),
2441
+ cells: Array.from({ length: e }, () => ({
2442
+ id: N(),
2443
+ content: ""
2444
+ }))
2445
+ };
2446
+ i("update", { rows: [...r.block.rows, t] });
2447
+ }
2448
+ function f(e) {
2449
+ i("update", { rows: r.block.rows.filter((t) => t.id !== e) });
2450
+ }
2451
+ function p() {
2452
+ i("update", { rows: r.block.rows.map((e) => ({
2453
+ ...e,
2454
+ cells: [...e.cells, {
2455
+ id: N(),
2456
+ content: ""
2457
+ }]
2458
+ })) });
2459
+ }
2460
+ function y(e) {
2461
+ i("update", { rows: r.block.rows.map((t) => ({
2462
+ ...t,
2463
+ cells: t.cells.filter((t, n) => n !== e)
2464
+ })) });
2465
+ }
2466
+ return (n, r) => (e(), g(_, null, [
2467
+ h("div", Ra, [h("label", { class: d(S(U)) }, w(S(a).table.dimensions), 3), h("div", za, [h("div", Ba, [h("span", Va, w(S(a).table.rows), 1), h("div", Ha, [
2468
+ h("button", {
2469
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:duration-150 tpl:hover:text-[var(--tpl-primary)] tpl:disabled:opacity-30",
2470
+ disabled: t.block.rows.length <= 1,
2471
+ onClick: r[0] ||= (e) => f(t.block.rows[t.block.rows.length - 1].id)
2472
+ }, [E(S(B), {
2473
+ size: 12,
2474
+ "stroke-width": 2
2475
+ })], 8, Ua),
2476
+ h("span", Wa, w(t.block.rows.length), 1),
2477
+ h("button", {
2478
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:duration-150 tpl:hover:text-[var(--tpl-primary)]",
2479
+ onClick: u
2480
+ }, [E(S(Y), {
2481
+ size: 12,
2482
+ "stroke-width": 2
2483
+ })])
2484
+ ])]), h("div", Ga, [h("span", Ka, w(S(a).table.columns), 1), h("div", qa, [
2485
+ h("button", {
2486
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:duration-150 tpl:hover:text-[var(--tpl-primary)] tpl:disabled:opacity-30",
2487
+ disabled: s.value <= 1,
2488
+ onClick: r[1] ||= (e) => y(s.value - 1)
2489
+ }, [E(S(B), {
2490
+ size: 12,
2491
+ "stroke-width": 2
2492
+ })], 8, Ja),
2493
+ h("span", Ya, w(s.value), 1),
2494
+ h("button", {
2495
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:duration-150 tpl:hover:text-[var(--tpl-primary)]",
2496
+ onClick: p
2497
+ }, [E(S(Y), {
2498
+ size: 12,
2499
+ "stroke-width": 2
2500
+ })])
2501
+ ])])])]),
2502
+ h("div", Xa, [h("label", Za, [h("input", {
2503
+ type: "checkbox",
2504
+ checked: t.block.hasHeaderRow,
2505
+ class: "tpl:accent-[var(--tpl-primary)]",
2506
+ onChange: r[2] ||= (e) => c("hasHeaderRow", e.target.checked)
2507
+ }, null, 40, Qa), l(" " + w(S(a).table.hasHeaderRow), 1)])]),
2508
+ t.block.hasHeaderRow ? (e(), g("div", $a, [h("label", { class: d(S(U)) }, w(S(a).table.headerBackgroundColor), 3), E(K, {
2509
+ "model-value": t.block.headerBackgroundColor || S("#f2f2f2"),
2510
+ placeholder: S(a).table.noHeaderBg,
2511
+ "onUpdate:modelValue": r[3] ||= (e) => c("headerBackgroundColor", e || null)
2512
+ }, null, 8, ["model-value", "placeholder"])])) : v("", !0),
2513
+ h("div", eo, [h("label", { class: d(S(U)) }, w(S(a).table.borderColor), 3), E(K, {
2514
+ "model-value": t.block.borderColor,
2515
+ "onUpdate:modelValue": r[4] ||= (e) => c("borderColor", e)
2516
+ }, null, 8, ["model-value"])]),
2517
+ h("div", to, [h("label", { class: d(S(U)) }, w(S(a).table.borderWidth), 3), h("div", no, [h("input", {
2518
+ type: "number",
2519
+ class: d(S(G)),
2520
+ value: t.block.borderWidth,
2521
+ min: "0",
2522
+ max: "10",
2523
+ onInput: r[5] ||= (e) => c("borderWidth", Number(e.target.value))
2524
+ }, null, 42, ro), h("span", { class: d(S(W)) }, "px", 2)])]),
2525
+ h("div", io, [h("label", { class: d(S(U)) }, w(S(a).table.cellPadding), 3), h("div", ao, [h("input", {
2526
+ type: "number",
2527
+ class: d(S(G)),
2528
+ value: t.block.cellPadding,
2529
+ min: "0",
2530
+ max: "30",
2531
+ onInput: r[6] ||= (e) => c("cellPadding", Number(e.target.value))
2532
+ }, null, 42, oo), h("span", { class: d(S(W)) }, "px", 2)])]),
2533
+ h("div", so, [h("label", { class: d(S(U)) }, w(S(a).table.fontFamily), 3), h("select", {
2534
+ class: d(S(H)),
2535
+ value: t.block.fontFamily || "",
2536
+ onChange: r[7] ||= (e) => c("fontFamily", e.target.value || void 0)
2537
+ }, [h("option", lo, w(S(a).title.inheritFont), 1), (e(!0), g(_, null, o(t.fontFamilies, (t) => (e(), g("option", {
2538
+ key: t.value,
2539
+ value: t.value
2540
+ }, w(t.label), 9, uo))), 128))], 42, co)]),
2541
+ h("div", fo, [h("label", { class: d(S(U)) }, w(S(a).table.fontSize), 3), h("div", po, [h("input", {
2542
+ type: "number",
2543
+ class: d(S(G)),
2544
+ value: t.block.fontSize,
2545
+ min: "10",
2546
+ max: "32",
2547
+ onInput: r[8] ||= (e) => c("fontSize", Number(e.target.value))
2548
+ }, null, 42, mo), h("span", { class: d(S(W)) }, "px", 2)])]),
2549
+ h("div", ho, [h("label", { class: d(S(U)) }, w(S(a).table.color), 3), E(K, {
2550
+ "model-value": t.block.color,
2551
+ "onUpdate:modelValue": r[9] ||= (e) => c("color", e)
2552
+ }, null, 8, ["model-value"])]),
2553
+ h("div", go, [h("label", { class: d(S(U)) }, w(S(a).table.textAlign), 3), E(J, {
2554
+ options: [
2555
+ {
2556
+ value: "left",
2557
+ label: S(a).title.alignLeft,
2558
+ icon: S(Qe)
2559
+ },
2560
+ {
2561
+ value: "center",
2562
+ label: S(a).title.alignCenter,
2563
+ icon: S(Ze)
2564
+ },
2565
+ {
2566
+ value: "right",
2567
+ label: S(a).title.alignRight,
2568
+ icon: S(Xe)
2569
+ }
2570
+ ],
2571
+ "model-value": t.block.textAlign,
2572
+ "onUpdate:modelValue": r[10] ||= (e) => c("textAlign", e)
2573
+ }, null, 8, ["options", "model-value"])])
2574
+ ], 64));
2575
+ }
2576
+ }), vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = { value: 1 }, xo = { value: 2 }, So = { value: 3 }, Co = { value: 4 }, wo = { class: "tpl:mb-3.5" }, To = ["value"], Eo = { value: "" }, Do = ["value"], Oo = { class: "tpl:mb-3.5" }, ko = { class: "tpl:mb-3.5" }, Ao = /* @__PURE__ */ f({
2577
+ __name: "TitleToolbar",
2578
+ props: {
2579
+ block: {},
2580
+ fontFamilies: {}
2581
+ },
2582
+ emits: ["update"],
2583
+ setup(t, { emit: n }) {
2584
+ let r = n, { t: i } = R();
2585
+ function a(e, t) {
2586
+ r("update", { [e]: t });
2587
+ }
2588
+ return (n, r) => (e(), g(_, null, [
2589
+ h("div", vo, [h("label", { class: d(S(U)) }, w(S(i).title.level), 3), h("select", {
2590
+ class: d(S(H)),
2591
+ value: t.block.level,
2592
+ onChange: r[0] ||= (e) => a("level", Number(e.target.value))
2593
+ }, [
2594
+ h("option", bo, w(S(i).title.heading1), 1),
2595
+ h("option", xo, w(S(i).title.heading2), 1),
2596
+ h("option", So, w(S(i).title.heading3), 1),
2597
+ h("option", Co, w(S(i).title.heading4), 1)
2598
+ ], 42, yo)]),
2599
+ h("div", wo, [h("label", { class: d(S(U)) }, w(S(i).title.fontFamily), 3), h("select", {
2600
+ class: d(S(H)),
2601
+ value: t.block.fontFamily || "",
2602
+ onChange: r[1] ||= (e) => a("fontFamily", e.target.value || void 0)
2603
+ }, [h("option", Eo, w(S(i).title.inheritFont), 1), (e(!0), g(_, null, o(t.fontFamilies, (t) => (e(), g("option", {
2604
+ key: t.value,
2605
+ value: t.value
2606
+ }, w(t.label), 9, Do))), 128))], 42, To)]),
2607
+ h("div", Oo, [h("label", { class: d(S(U)) }, w(S(i).title.color), 3), E(K, {
2608
+ "model-value": t.block.color,
2609
+ "onUpdate:modelValue": r[2] ||= (e) => a("color", e)
2610
+ }, null, 8, ["model-value"])]),
2611
+ h("div", ko, [h("label", { class: d(S(U)) }, w(S(i).title.align), 3), E(J, {
2612
+ options: [
2613
+ {
2614
+ value: "left",
2615
+ label: S(i).title.alignLeft,
2616
+ icon: S(Qe)
2617
+ },
2618
+ {
2619
+ value: "center",
2620
+ label: S(i).title.alignCenter,
2621
+ icon: S(Ze)
2622
+ },
2623
+ {
2624
+ value: "right",
2625
+ label: S(i).title.alignRight,
2626
+ icon: S(Xe)
2627
+ }
2628
+ ],
2629
+ "model-value": t.block.textAlign,
2630
+ "onUpdate:modelValue": r[3] ||= (e) => a("textAlign", e)
2631
+ }, null, 8, ["options", "model-value"])])
2632
+ ], 64));
2633
+ }
2634
+ }), jo = { class: "tpl:mb-3.5" }, Mo = {
2635
+ key: 0,
2636
+ class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
2637
+ }, No = ["checked"], Po = {
2638
+ key: 0,
2639
+ class: "tpl:mb-3.5"
2640
+ }, Fo = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, Io = [
2641
+ "value",
2642
+ "placeholder",
2643
+ "title"
2644
+ ], Lo = { class: "tpl:mb-3.5" }, Ro = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, zo = { class: "tpl:mb-3.5" }, Bo = { class: "tpl:mb-3.5" }, Vo = ["value"], Ho = { value: "full" }, Uo = { class: "tpl:mb-3.5" }, Wo = /* @__PURE__ */ f({
2645
+ __name: "VideoToolbar",
2646
+ props: { block: {} },
2647
+ emits: ["update"],
2648
+ setup(t, { emit: n }) {
2649
+ let r = t, i = n, { t: a } = R(), o = D(Re, null), s = D(De, te.liquid), u = m(() => !!o), f = m(() => ee(r.block.url, s)), p = c(!1), { start: y } = Te(() => {
2650
+ p.value = !1;
2651
+ }, 1e3, { immediate: !1 });
2652
+ function b(e, t) {
2653
+ i("update", { [e]: t });
2654
+ }
2655
+ async function x() {
2656
+ let e = await o?.({ accept: ["images"] });
2657
+ e && (b("thumbnailUrl", e.url), p.value = !0, y());
2658
+ }
2659
+ return (n, r) => (e(), g(_, null, [
2660
+ h("div", jo, [
2661
+ h("label", { class: d(S(U)) }, w(S(a).video.videoUrl), 3),
2662
+ E(X, {
2663
+ "model-value": t.block.url,
2664
+ type: "url",
2665
+ placeholder: S(a).video.videoUrlPlaceholder,
2666
+ "onUpdate:modelValue": r[0] ||= (e) => b("url", e)
2667
+ }, null, 8, ["model-value", "placeholder"]),
2668
+ t.block.url ? (e(), g("label", Mo, [h("input", {
2669
+ type: "checkbox",
2670
+ class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
2671
+ checked: t.block.openInNewTab ?? !1,
2672
+ onChange: r[1] ||= (e) => b("openInNewTab", e.target.checked)
2673
+ }, null, 40, No), l(" " + w(S(a).video.openInNewTab), 1)])) : v("", !0)
2674
+ ]),
2675
+ f.value ? (e(), g("div", Po, [h("label", { class: d(S(U)) }, [l(w(S(a).video.placeholderUrl) + " ", 1), h("span", Fo, w(S(a).video.optional), 1)], 2), h("input", {
2676
+ type: "url",
2677
+ class: d(S(H)),
2678
+ value: t.block.placeholderUrl || "",
2679
+ placeholder: S(a).video.placeholderUrlPlaceholder,
2680
+ title: S(a).video.placeholderUrlTooltip,
2681
+ onInput: r[2] ||= (e) => b("placeholderUrl", e.target.value)
2682
+ }, null, 42, Io)])) : v("", !0),
2683
+ h("div", Lo, [
2684
+ h("label", { class: d(S(U)) }, [l(w(S(a).video.customThumbnail) + " ", 1), h("span", Ro, w(S(a).video.optional), 1)], 2),
2685
+ E(X, {
2686
+ "model-value": t.block.thumbnailUrl,
2687
+ type: "url",
2688
+ placeholder: S(a).video.thumbnailPlaceholder,
2689
+ pulse: p.value,
2690
+ "onUpdate:modelValue": r[3] ||= (e) => b("thumbnailUrl", e)
2691
+ }, null, 8, [
2692
+ "model-value",
2693
+ "placeholder",
2694
+ "pulse"
2695
+ ]),
2696
+ u.value ? (e(), g("button", {
2697
+ key: 0,
2698
+ class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-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",
2699
+ style: {
2700
+ "border-color": "var(--tpl-border)",
2701
+ color: "var(--tpl-primary)",
2702
+ "background-color": "var(--tpl-bg)"
2703
+ },
2704
+ onClick: x
2705
+ }, [E(S(me), {
2706
+ size: 14,
2707
+ "stroke-width": 1.5
2708
+ }), l(" " + w(S(a).image.browseMedia), 1)])) : v("", !0)
2709
+ ]),
2710
+ h("div", zo, [h("label", { class: d(S(U)) }, w(S(a).video.altText), 3), E(X, {
2711
+ "model-value": t.block.alt,
2712
+ type: "text",
2713
+ placeholder: S(a).video.altTextPlaceholder,
2714
+ "onUpdate:modelValue": r[4] ||= (e) => b("alt", e)
2715
+ }, null, 8, ["model-value", "placeholder"])]),
2716
+ h("div", Bo, [h("label", { class: d(S(U)) }, w(S(a).video.width), 3), h("select", {
2717
+ class: d(S(H)),
2718
+ value: t.block.width,
2719
+ onChange: r[5] ||= (e) => b("width", e.target.value === "full" ? "full" : Number(e.target.value))
2720
+ }, [
2721
+ h("option", Ho, w(S(a).video.fullWidth), 1),
2722
+ r[7] ||= h("option", { value: "300" }, "300px", -1),
2723
+ r[8] ||= h("option", { value: "400" }, "400px", -1),
2724
+ r[9] ||= h("option", { value: "500" }, "500px", -1)
2725
+ ], 42, Vo)]),
2726
+ h("div", Uo, [h("label", { class: d(S(U)) }, w(S(a).title.align), 3), E(J, {
2727
+ options: [
2728
+ {
2729
+ value: "left",
2730
+ label: S(a).title.alignLeft
2731
+ },
2732
+ {
2733
+ value: "center",
2734
+ label: S(a).title.alignCenter
2735
+ },
2736
+ {
2737
+ value: "right",
2738
+ label: S(a).title.alignRight
2739
+ }
2740
+ ],
2741
+ "model-value": t.block.align,
2742
+ "onUpdate:modelValue": r[6] ||= (e) => b("align", e)
2743
+ }, null, 8, ["options", "model-value"])])
2744
+ ], 64));
2745
+ }
2746
+ }), Go = ["aria-label"], Ko = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, qo = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, Jo = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Yo = { class: "tpl:flex tpl:gap-1" }, Xo = ["title"], Zo = ["title"], Qo = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, $o = /* @__PURE__ */ V(/* @__PURE__ */ f({
2747
+ __name: "Toolbar",
2748
+ props: { block: {} },
2749
+ emits: [
2750
+ "update",
2751
+ "delete",
2752
+ "duplicate"
2753
+ ],
2754
+ setup(t, { emit: n }) {
2755
+ let i = O(() => import("./CountdownToolbar-CpFAnjSo.js")), a = t, o = n, { t: s } = R(), c = Ee(je, "Toolbar"), l = D(Ae, []), u = m(() => a.block.type), d = m(() => M(a.block)), f = m(() => {
2756
+ if (d.value) return l.find((e) => e.type === a.block.customType);
2757
+ }), p = m(() => d.value ? f.value?.name ?? a.block.customType : I(u.value, s)), y = c.fonts;
2758
+ function b(e) {
2759
+ o("update", e);
2760
+ }
2761
+ return (n, a) => (e(), g("aside", {
2762
+ "aria-label": S(s).landmarks.blockToolbar,
2763
+ class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
2764
+ }, [h("div", Ko, [h("div", qo, [S(Ue)[u.value] ? (e(), x(r(S(Ue)[u.value]), {
2765
+ key: 0,
2766
+ size: 16,
2767
+ "stroke-width": 1.5
2768
+ })) : d.value ? (e(), x(S(re), {
2769
+ key: 1,
2770
+ size: 16,
2771
+ "stroke-width": 1.5
2772
+ })) : v("", !0), h("h3", Jo, w(p.value), 1)]), h("div", Yo, [h("button", {
2773
+ class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-bg-active)] tpl:hover:text-[var(--tpl-text)]",
2774
+ title: S(s).toolbar.duplicate,
2775
+ onClick: a[0] ||= (e) => o("duplicate")
2776
+ }, [E(S(pe), {
2777
+ size: 14,
2778
+ "stroke-width": 2
2779
+ })], 8, Xo), h("button", {
2780
+ class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]",
2781
+ title: S(s).toolbar.delete,
2782
+ onClick: a[1] ||= (e) => o("delete")
2783
+ }, [E(S($e), {
2784
+ size: 14,
2785
+ "stroke-width": 2
2786
+ })], 8, Zo)])]), h("div", Qo, [d.value ? (e(), x(Mi, {
2787
+ key: 0,
2788
+ block: t.block,
2789
+ onUpdateFieldValues: a[2] ||= (e) => o("update", { fieldValues: e }),
2790
+ onUpdateDataSourceFetched: a[3] ||= (e) => o("update", { dataSourceFetched: e })
2791
+ }, null, 8, ["block"])) : u.value === "section" ? (e(), x(ya, {
2792
+ key: 1,
2793
+ block: t.block,
2794
+ onUpdate: b
2795
+ }, null, 8, ["block"])) : u.value === "title" ? (e(), x(Ao, {
2796
+ key: 2,
2797
+ block: t.block,
2798
+ "font-families": S(y),
2799
+ onUpdate: b
2800
+ }, null, 8, ["block", "font-families"])) : u.value === "paragraph" ? (e(), g(_, { key: 3 }, [], 64)) : u.value === "image" ? (e(), x(ra, {
2801
+ key: 4,
2802
+ block: t.block,
2803
+ onUpdate: b
2804
+ }, null, 8, ["block"])) : u.value === "video" ? (e(), x(Wo, {
2805
+ key: 5,
2806
+ block: t.block,
2807
+ onUpdate: b
2808
+ }, null, 8, ["block"])) : u.value === "button" ? (e(), x(ir, {
2809
+ key: 6,
2810
+ block: t.block,
2811
+ "font-families": S(y),
2812
+ onUpdate: b
2813
+ }, null, 8, ["block", "font-families"])) : u.value === "divider" ? (e(), x(Ri, {
2814
+ key: 7,
2815
+ block: t.block,
2816
+ onUpdate: b
2817
+ }, null, 8, ["block"])) : u.value === "social" ? (e(), x(Ma, {
2818
+ key: 8,
2819
+ block: t.block,
2820
+ onUpdate: b
2821
+ }, null, 8, ["block"])) : u.value === "menu" ? (e(), x(ha, {
2822
+ key: 9,
2823
+ block: t.block,
2824
+ "font-families": S(y),
2825
+ onUpdate: b
2826
+ }, null, 8, ["block", "font-families"])) : u.value === "table" ? (e(), x(_o, {
2827
+ key: 10,
2828
+ block: t.block,
2829
+ "font-families": S(y),
2830
+ onUpdate: b
2831
+ }, null, 8, ["block", "font-families"])) : u.value === "spacer" ? (e(), x(La, {
2832
+ key: 11,
2833
+ block: t.block,
2834
+ onUpdate: b
2835
+ }, null, 8, ["block"])) : u.value === "html" ? (e(), x(Hi, {
2836
+ key: 12,
2837
+ block: t.block,
2838
+ onUpdate: b
2839
+ }, null, 8, ["block"])) : u.value === "countdown" ? (e(), x(S(i), {
2840
+ key: 13,
2841
+ block: t.block,
2842
+ "font-families": S(y),
2843
+ onUpdate: b
2844
+ }, null, 8, ["block", "font-families"])) : v("", !0), E(Yr, {
2845
+ block: t.block,
2846
+ "is-first-section": u.value === "paragraph",
2847
+ onUpdate: b
2848
+ }, null, 8, ["block", "is-first-section"])])], 8, Go));
2849
+ }
2850
+ }), [["__scopeId", "data-v-2ac88283"]]), es = ["aria-label"], ts = {
2851
+ role: "tablist",
2852
+ class: "tpl:relative tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-active)] tpl:p-1.5"
2853
+ }, ns = [
2854
+ "aria-selected",
2855
+ "aria-label",
2856
+ "title"
2857
+ ], rs = { key: 0 }, is = [
2858
+ "aria-selected",
2859
+ "aria-label",
2860
+ "title"
2861
+ ], as = { key: 0 }, os = [
2862
+ "aria-selected",
2863
+ "aria-label",
2864
+ "title"
2865
+ ], ss = { key: 0 }, cs = {
2866
+ key: 1,
2867
+ class: "tpl:ml-1 tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-1.5 tpl:text-[10px]"
2868
+ }, ls = {
2869
+ key: 0,
2870
+ id: "tpl-tabpanel-content",
2871
+ role: "tabpanel",
2872
+ "aria-labelledby": "tpl-tab-content",
2873
+ class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
2874
+ }, us = {
2875
+ key: 1,
2876
+ class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:px-6 tpl:py-10 tpl:text-center tpl:text-[var(--tpl-text-muted)]"
2877
+ }, ds = { class: "tpl:mb-4 tpl:text-[var(--tpl-text-dim)]" }, fs = { class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, ps = { class: "tpl:m-0 tpl:text-sm tpl:leading-normal" }, ms = {
2878
+ key: 1,
2879
+ id: "tpl-tabpanel-settings",
2880
+ role: "tabpanel",
2881
+ "aria-labelledby": "tpl-tab-settings",
2882
+ class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
2883
+ }, hs = {
2884
+ key: 2,
2885
+ id: "tpl-tabpanel-accessibility",
2886
+ role: "tabpanel",
2887
+ "aria-labelledby": "tpl-tab-accessibility",
2888
+ class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
2889
+ }, gs = /* @__PURE__ */ f({
2890
+ __name: "RightSidebar",
2891
+ props: {
2892
+ selectedBlock: {},
2893
+ settings: {},
2894
+ shiftedLeft: { type: Boolean }
2895
+ },
2896
+ emits: [
2897
+ "update-block",
2898
+ "delete-block",
2899
+ "duplicate-block",
2900
+ "update-settings"
2901
+ ],
2902
+ setup(t, { emit: n }) {
2903
+ let r = O(() => import("./AccessibilityPanel-B2MT0M58.js")), i = t, o = n, { t: s } = R(), l = c("content"), u = D(Le, null), f = m(() => u !== null), p = m(() => u?.issues.value.length ?? 0);
2904
+ function _(e) {
2905
+ return l.value === e ? "tpl:flex-1 tpl:text-[var(--tpl-primary)]" : "tpl:shrink-0 tpl:text-[var(--tpl-text-muted)] hover:tpl:text-[var(--tpl-text)]";
2906
+ }
2907
+ function y(e) {
2908
+ return l.value === e ? {
2909
+ backgroundColor: "var(--tpl-bg)",
2910
+ boxShadow: "var(--tpl-shadow-md)"
2911
+ } : { backgroundColor: "transparent" };
2912
+ }
2913
+ return a(() => i.selectedBlock, (e) => {
2914
+ e && (l.value = "content");
2915
+ }), (n, i) => (e(), g("aside", {
2916
+ "aria-label": S(s).landmarks.rightSidebar,
2917
+ class: d(["tpl-right-sidebar tpl:absolute tpl:top-14 tpl:bottom-0 tpl:z-40 tpl:flex tpl:w-[320px] tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)] tpl:transition-all tpl:duration-200 tpl:border-l tpl:border-[var(--tpl-border)]", t.shiftedLeft ? "tpl:right-[360px]" : "tpl:right-0"])
2918
+ }, [
2919
+ h("div", ts, [
2920
+ h("button", {
2921
+ id: "tpl-tab-content",
2922
+ role: "tab",
2923
+ "aria-selected": l.value === "content",
2924
+ "aria-controls": "tpl-tabpanel-content",
2925
+ "aria-label": S(s).sidebar.content,
2926
+ title: S(s).sidebar.content,
2927
+ class: d(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", _("content")]),
2928
+ style: b(y("content")),
2929
+ onClick: i[0] ||= (e) => l.value = "content"
2930
+ }, [E(S(vt), {
2931
+ size: 14,
2932
+ "stroke-width": 2
2933
+ }), l.value === "content" ? (e(), g("span", rs, w(S(s).sidebar.content), 1)) : v("", !0)], 14, ns),
2934
+ h("button", {
2935
+ id: "tpl-tab-settings",
2936
+ role: "tab",
2937
+ "aria-selected": l.value === "settings",
2938
+ "aria-controls": "tpl-tabpanel-settings",
2939
+ "aria-label": S(s).sidebar.settings,
2940
+ title: S(s).sidebar.settings,
2941
+ class: d(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", _("settings")]),
2942
+ style: b(y("settings")),
2943
+ onClick: i[1] ||= (e) => l.value = "settings"
2944
+ }, [E(S(bt), {
2945
+ size: 14,
2946
+ "stroke-width": 1.5
2947
+ }), l.value === "settings" ? (e(), g("span", as, w(S(s).sidebar.settings), 1)) : v("", !0)], 14, is),
2948
+ f.value ? (e(), g("button", {
2949
+ key: 0,
2950
+ id: "tpl-tab-accessibility",
2951
+ role: "tab",
2952
+ "aria-selected": l.value === "accessibility",
2953
+ "aria-controls": "tpl-tabpanel-accessibility",
2954
+ "aria-label": S(s).accessibility.panelTabLabel,
2955
+ title: S(s).accessibility.panelTabLabel,
2956
+ class: d(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", _("accessibility")]),
2957
+ style: b(y("accessibility")),
2958
+ onClick: i[2] ||= (e) => l.value = "accessibility"
2959
+ }, [
2960
+ E(S(ze), {
2961
+ size: 14,
2962
+ "stroke-width": 1.5
2963
+ }),
2964
+ l.value === "accessibility" ? (e(), g("span", ss, w(S(s).accessibility.panelTabLabel), 1)) : v("", !0),
2965
+ p.value > 0 ? (e(), g("span", cs, w(p.value), 1)) : v("", !0)
2966
+ ], 14, os)) : v("", !0)
2967
+ ]),
2968
+ l.value === "content" ? (e(), g("div", ls, [t.selectedBlock ? (e(), x($o, {
2969
+ key: 0,
2970
+ block: t.selectedBlock,
2971
+ onUpdate: i[3] ||= (e) => o("update-block", e),
2972
+ onDelete: i[4] ||= (e) => o("delete-block"),
2973
+ onDuplicate: i[5] ||= (e) => o("duplicate-block")
2974
+ }, null, 8, ["block"])) : (e(), g("div", us, [
2975
+ h("div", ds, [E(S(pt), {
2976
+ size: 40,
2977
+ "stroke-width": 1.5
2978
+ })]),
2979
+ h("h3", fs, w(S(s).sidebar.noSelection), 1),
2980
+ h("p", ps, w(S(s).sidebar.noSelectionHint), 1)
2981
+ ]))])) : v("", !0),
2982
+ l.value === "settings" ? (e(), g("div", ms, [E(Fn, {
2983
+ settings: t.settings,
2984
+ onUpdate: i[6] ||= (e) => o("update-settings", e)
2985
+ }, null, 8, ["settings"])])) : v("", !0),
2986
+ l.value === "accessibility" && f.value ? (e(), g("div", hs, [E(S(r))])) : v("", !0)
2987
+ ], 10, es));
2988
+ }
2989
+ }), _s = ["aria-label"], vs = [
2990
+ "aria-checked",
2991
+ "aria-label",
2992
+ "title",
2993
+ "onClick"
2994
+ ], ys = /* @__PURE__ */ f({
2995
+ __name: "ViewportToggle",
2996
+ props: { viewport: {} },
2997
+ emits: ["change"],
2998
+ setup(t, { emit: n }) {
2999
+ let r = t, i = n, { t: a } = R(), s = m(() => [
3000
+ {
3001
+ value: "desktop",
3002
+ label: a.viewport.desktop
3003
+ },
3004
+ {
3005
+ value: "tablet",
3006
+ label: a.viewport.tablet
3007
+ },
3008
+ {
3009
+ value: "mobile",
3010
+ label: a.viewport.mobile
3011
+ }
3012
+ ]), c = m(() => `translateX(${s.value.findIndex((e) => e.value === r.viewport) * 100}%)`);
3013
+ return (n, r) => (e(), g("div", {
3014
+ role: "radiogroup",
3015
+ "aria-label": S(a).viewport.label,
3016
+ class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
3017
+ style: b({
3018
+ gridTemplateColumns: `repeat(${s.value.length}, 1fr)`,
3019
+ backgroundColor: "var(--tpl-bg-hover)"
3020
+ })
3021
+ }, [h("div", {
3022
+ class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
3023
+ style: b({
3024
+ left: "4px",
3025
+ width: `calc((100% - 8px) / ${s.value.length})`,
3026
+ transform: c.value,
3027
+ backgroundColor: "var(--tpl-bg)",
3028
+ boxShadow: "var(--tpl-shadow)",
3029
+ transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
3030
+ })
3031
+ }, null, 4), (e(!0), g(_, null, o(s.value, (n) => (e(), g("button", {
3032
+ key: n.value,
3033
+ role: "radio",
3034
+ "aria-checked": t.viewport === n.value,
3035
+ "aria-label": n.label,
3036
+ class: "tpl:relative tpl:z-10 tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium",
3037
+ style: b({
3038
+ color: t.viewport === n.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
3039
+ transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
3040
+ }),
3041
+ title: n.label,
3042
+ onClick: (e) => i("change", n.value)
3043
+ }, [n.value === "desktop" ? (e(), x(S(gt), {
3044
+ key: 0,
3045
+ size: 18,
3046
+ "stroke-width": 1.5
3047
+ })) : n.value === "tablet" ? (e(), x(S(Tt), {
3048
+ key: 1,
3049
+ size: 18,
3050
+ "stroke-width": 1.5
3051
+ })) : (e(), x(S(xt), {
3052
+ key: 2,
3053
+ size: 18,
3054
+ "stroke-width": 1.5
3055
+ })), h("span", null, w(n.label), 1)], 12, vs))), 128))], 12, _s));
3056
+ }
3057
+ }), bs = [
3058
+ "aria-label",
3059
+ "title",
3060
+ "aria-pressed"
3061
+ ], xs = /* @__PURE__ */ V(/* @__PURE__ */ f({
3062
+ __name: "PreviewToggle",
3063
+ props: { previewMode: { type: Boolean } },
3064
+ emits: ["change"],
3065
+ setup(t, { emit: n }) {
3066
+ let r = n, { t: i } = R();
3067
+ return (n, a) => (e(), g("button", {
3068
+ class: "tpl-preview-toggle tpl:relative tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:p-2 tpl:transition-all tpl:duration-150",
3069
+ style: b({
3070
+ color: t.previewMode ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
3071
+ backgroundColor: t.previewMode ? "var(--tpl-primary-light)" : "transparent"
3072
+ }),
3073
+ "aria-label": t.previewMode ? S(i).previewMode.disable : S(i).previewMode.enable,
3074
+ title: t.previewMode ? S(i).previewMode.disable : S(i).previewMode.enable,
3075
+ "aria-pressed": t.previewMode,
3076
+ onClick: a[0] ||= (e) => r("change", !t.previewMode)
3077
+ }, [E(T, {
3078
+ "enter-active-class": "tpl-icon-enter-active",
3079
+ "leave-active-class": "tpl-icon-leave-active",
3080
+ "enter-from-class": "tpl-icon-enter-from",
3081
+ "leave-to-class": "tpl-icon-leave-to",
3082
+ mode: "out-in"
3083
+ }, {
3084
+ default: k(() => [t.previewMode ? (e(), x(S(We), {
3085
+ key: "eye",
3086
+ size: 18,
3087
+ "stroke-width": 1.5
3088
+ })) : (e(), x(S(ne), {
3089
+ key: "eye-off",
3090
+ size: 18,
3091
+ "stroke-width": 1.5
3092
+ }))]),
3093
+ _: 1
3094
+ })], 12, bs));
3095
+ }
3096
+ }), [["__scopeId", "data-v-af87d02a"]]), Ss = [
3097
+ "aria-label",
3098
+ "title",
3099
+ "aria-pressed"
3100
+ ], Cs = /* @__PURE__ */ V(/* @__PURE__ */ f({
3101
+ __name: "DarkModeToggle",
3102
+ props: { darkMode: { type: Boolean } },
3103
+ emits: ["change"],
3104
+ setup(t, { emit: n }) {
3105
+ let r = n, { t: i } = R();
3106
+ return (n, a) => (e(), g("button", {
3107
+ class: "tpl-dark-mode-toggle tpl:relative tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:p-2 tpl:transition-all tpl:duration-150",
3108
+ style: b({
3109
+ color: t.darkMode ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
3110
+ backgroundColor: t.darkMode ? "var(--tpl-primary-light)" : "transparent"
3111
+ }),
3112
+ "aria-label": t.darkMode ? S(i).darkMode.disable : S(i).darkMode.enable,
3113
+ title: t.darkMode ? S(i).darkMode.disable : S(i).darkMode.enable,
3114
+ "aria-pressed": t.darkMode,
3115
+ onClick: a[0] ||= (e) => r("change", !t.darkMode)
3116
+ }, [E(T, {
3117
+ "enter-active-class": "tpl-icon-enter-active",
3118
+ "leave-active-class": "tpl-icon-leave-active",
3119
+ "enter-from-class": "tpl-icon-enter-from",
3120
+ "leave-to-class": "tpl-icon-leave-to",
3121
+ mode: "out-in"
3122
+ }, {
3123
+ default: k(() => [t.darkMode ? (e(), x(S(_t), {
3124
+ key: "moon",
3125
+ size: 18,
3126
+ "stroke-width": 1.5
3127
+ })) : (e(), x(S(wt), {
3128
+ key: "sun",
3129
+ size: 18,
3130
+ "stroke-width": 1.5
3131
+ }))]),
3132
+ _: 1
3133
+ })], 12, Ss));
3134
+ }
3135
+ }), [["__scopeId", "data-v-f8694f76"]]), ws = {
3136
+ class: "tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-tl-lg tpl:p-1",
3137
+ style: {
3138
+ "background-color": "color-mix(\n in srgb,\n var(--tpl-canvas-bg) 85%,\n transparent\n )",
3139
+ "backdrop-filter": "blur(8px)",
3140
+ "-webkit-backdrop-filter": "blur(8px)"
3141
+ }
3142
+ }, Ts = {
3143
+ href: "https://github.com/templatical/sdk",
3144
+ target: "_blank",
3145
+ rel: "noopener noreferrer",
3146
+ class: "tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-dim)]",
3147
+ style: { "text-decoration": "none" }
3148
+ }, Es = /* @__PURE__ */ f({
3149
+ __name: "EditorFooter",
3150
+ props: { positionClass: {} },
3151
+ setup(t) {
3152
+ let { t: n } = R();
3153
+ return (r, i) => (e(), g("footer", { class: d(["tpl:pointer-events-none tpl:absolute tpl:bottom-0 tpl:z-50 tpl:flex tpl:h-8 tpl:items-center tpl:justify-end tpl:pr-4 tpl:text-[9px] tpl:opacity-90 tpl:transition-all tpl:duration-300 tpl:text-[var(--tpl-text-dim)]", t.positionClass]) }, [h("div", ws, [
3154
+ h("span", null, w(S(n).footer.poweredBy), 1),
3155
+ i[0] ||= h("a", {
3156
+ href: "https://templatical.com",
3157
+ target: "_blank",
3158
+ rel: "noopener noreferrer",
3159
+ class: "tpl:inline-flex tpl:items-center tpl:gap-1 tpl:font-medium tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-muted)]",
3160
+ style: { "text-decoration": "none" }
3161
+ }, [h("img", {
3162
+ width: "14",
3163
+ height: "14",
3164
+ src: "https://templatical.com/logo.svg",
3165
+ alt: ""
3166
+ }), l(" Templatical ")], -1),
3167
+ i[1] ||= h("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
3168
+ h("a", Ts, w(S(n).footer.openSource), 1)
3169
+ ])], 2));
3170
+ }
3171
+ });
3172
+ //#endregion
3173
+ export { gs as a, Et as c, ys as i, yt as l, Cs as n, Gt as o, xs as r, It as s, Es as t };