@templatical/editor 0.6.4 → 0.6.6

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