@templatical/editor 0.7.1 → 0.7.3

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 (109) hide show
  1. package/dist/{AiChatSidebar-BwLECwsO.js → AiChatSidebar-H7SIsxeC.js} +49 -59
  2. package/dist/{AiFeatureMenu-CVHKharv.js → AiFeatureMenu-CJGX-fP5.js} +1 -1
  3. package/dist/{CloudEditor-S7AzuNwC.js → CloudEditor-BBs3p-mW.js} +124 -120
  4. package/dist/{CollaboratorBar-VZKOv_Zn.js → CollaboratorBar-CiEo25lb.js} +2 -2
  5. package/dist/{CommentsSidebar-BiRtaXYD.js → CommentsSidebar-DikjSLtH.js} +1 -1
  6. package/dist/{CountdownToolbar-CojjlZet.js → CountdownToolbar-Bn4RwJVN.js} +2 -2
  7. package/dist/{DesignReferenceSidebar-Ci9HIGbf.js → DesignReferenceSidebar-D08CLZPA.js} +1 -1
  8. package/dist/{ModuleBrowserModal-D7IYx1Nh.js → ModuleBrowserModal-D6637s8j.js} +4 -4
  9. package/dist/{ModulePreviewCanvas-I-uMcK5G.js → ModulePreviewCanvas-DBFmwq-y.js} +1 -1
  10. package/dist/{NumberWithSuffix-CLTBb2Rj.js → NumberWithSuffix-CyFX9w1e.js} +1 -1
  11. package/dist/{ParagraphEditor-BRQTNDFO.js → ParagraphEditor-DC2jOjNh.js} +16 -16
  12. package/dist/{RichTextEditorContent-C3QSg7gd.js → RichTextEditorContent-8NkjTIua.js} +1 -1
  13. package/dist/{SaveModuleDialog-DGGGNZfm.js → SaveModuleDialog-NKT7bWWs.js} +2 -2
  14. package/dist/{SnapshotHistory-C97Iw6xw.js → SnapshotHistory-XNqYxPBj.js} +2 -2
  15. package/dist/{TestEmailModal-B7S8H-VG.js → TestEmailModal-B_-Qo5Us.js} +2 -2
  16. package/dist/{TitleEditor-DhFTYzrw.js → TitleEditor-DnH3yyTr.js} +7 -7
  17. package/dist/{TplModal-BgABm6ju.js → TplModal-BoEZFe3U.js} +2 -2
  18. package/dist/{blockTypeIcons-BSf-3RJ-.js → blockTypeIcons-CUcYuWAO.js} +1 -1
  19. package/dist/bundle-stats.json +7 -7
  20. package/dist/cdn/chunks/{AccessibilityPanel-kgNBRaZV.js → AccessibilityPanel-CQt87OMk.js} +5 -5
  21. package/dist/cdn/chunks/{AccessibilityPanel-kgNBRaZV.js.map → AccessibilityPanel-CQt87OMk.js.map} +1 -1
  22. package/dist/cdn/chunks/{AiFeatureMenu-CRkzwdMg.js → AiFeatureMenu-SxIqfqA0.js} +8 -8
  23. package/dist/cdn/chunks/{AiFeatureMenu-CRkzwdMg.js.map → AiFeatureMenu-SxIqfqA0.js.map} +1 -1
  24. package/dist/cdn/chunks/{BlockA11yBadge-BfuH2Hrg.js → BlockA11yBadge-QqW6nomn.js} +3 -3
  25. package/dist/cdn/chunks/{BlockA11yBadge-BfuH2Hrg.js.map → BlockA11yBadge-QqW6nomn.js.map} +1 -1
  26. package/dist/cdn/chunks/{CloudEditor-BGiN3M_f.js → CloudEditor-ChWUIMw7.js} +165 -161
  27. package/dist/cdn/chunks/CloudEditor-ChWUIMw7.js.map +1 -0
  28. package/dist/cdn/chunks/{CollaboratorBar-CMl3lAZU.js → CollaboratorBar-73LfbzqF.js} +3 -3
  29. package/dist/cdn/chunks/{CollaboratorBar-CMl3lAZU.js.map → CollaboratorBar-73LfbzqF.js.map} +1 -1
  30. package/dist/cdn/chunks/{CountdownBlock-D1RoaOgF.js → CountdownBlock-WYz9b9Ex.js} +2 -2
  31. package/dist/cdn/chunks/{CountdownBlock-D1RoaOgF.js.map → CountdownBlock-WYz9b9Ex.js.map} +1 -1
  32. package/dist/cdn/chunks/{CountdownToolbar-DltwuOer.js → CountdownToolbar-B9fPfFqp.js} +3 -3
  33. package/dist/cdn/chunks/{CountdownToolbar-DltwuOer.js.map → CountdownToolbar-B9fPfFqp.js.map} +1 -1
  34. package/dist/cdn/chunks/{ModuleBrowserModal-3uu2mXR9.js → ModuleBrowserModal-DfnJQBkM.js} +8 -8
  35. package/dist/cdn/chunks/{ModuleBrowserModal-3uu2mXR9.js.map → ModuleBrowserModal-DfnJQBkM.js.map} +1 -1
  36. package/dist/cdn/chunks/{ModulePreviewCanvas-K9CQFr7p.js → ModulePreviewCanvas-DE4_oHA_.js} +20 -20
  37. package/dist/cdn/chunks/{ModulePreviewCanvas-K9CQFr7p.js.map → ModulePreviewCanvas-DE4_oHA_.js.map} +1 -1
  38. package/dist/cdn/chunks/{NumberWithSuffix-BIFgtqGs.js → NumberWithSuffix-BST0yRor.js} +2 -2
  39. package/dist/cdn/chunks/{NumberWithSuffix-BIFgtqGs.js.map → NumberWithSuffix-BST0yRor.js.map} +1 -1
  40. package/dist/cdn/chunks/{ParagraphEditor-DlpZX_x4.js → ParagraphEditor-CQfijF3i.js} +36 -36
  41. package/dist/cdn/chunks/{ParagraphEditor-DlpZX_x4.js.map → ParagraphEditor-CQfijF3i.js.map} +1 -1
  42. package/dist/cdn/chunks/{RichTextEditorContent-CPGT8h-O.js → RichTextEditorContent-CBds8dnm.js} +5 -5
  43. package/dist/cdn/chunks/{RichTextEditorContent-CPGT8h-O.js.map → RichTextEditorContent-CBds8dnm.js.map} +1 -1
  44. package/dist/cdn/chunks/{SaveModuleDialog-_uaJscj1.js → SaveModuleDialog-DXhuZgZ4.js} +13 -13
  45. package/dist/cdn/chunks/{SaveModuleDialog-_uaJscj1.js.map → SaveModuleDialog-DXhuZgZ4.js.map} +1 -1
  46. package/dist/cdn/chunks/{TitleEditor-Kerz6US8.js → TitleEditor-BdQvH7eK.js} +7 -7
  47. package/dist/cdn/chunks/{TitleEditor-Kerz6US8.js.map → TitleEditor-BdQvH7eK.js.map} +1 -1
  48. package/dist/cdn/chunks/{blockTypeIcons-BeOhGtoo.js → blockTypeIcons-D3CGFW5P.js} +8 -8
  49. package/dist/cdn/chunks/{blockTypeIcons-BeOhGtoo.js.map → blockTypeIcons-D3CGFW5P.js.map} +1 -1
  50. package/dist/cdn/chunks/{extensions-BZYkPlKr.js → extensions-BE81zpqP.js} +50 -48
  51. package/dist/cdn/chunks/{extensions-BZYkPlKr.js.map → extensions-BE81zpqP.js.map} +1 -1
  52. package/dist/cdn/chunks/{features-DzIN-Nua.js → features-CXF_YKlL.js} +1313 -1122
  53. package/dist/cdn/chunks/features-CXF_YKlL.js.map +1 -0
  54. package/dist/cdn/chunks/{icons-Nvr6w13E.js → icons-KbmhF7rg.js} +2 -2
  55. package/dist/cdn/chunks/{icons-Nvr6w13E.js.map → icons-KbmhF7rg.js.map} +1 -1
  56. package/dist/cdn/chunks/{media-library-BzT7BoGU.js → media-library-BERe10wA.js} +103 -103
  57. package/dist/cdn/chunks/{media-library-BzT7BoGU.js.map → media-library-BERe10wA.js.map} +1 -1
  58. package/dist/cdn/chunks/{quality-C328caFm.js → quality-CmkY1kMU.js} +309 -309
  59. package/dist/cdn/chunks/{quality-C328caFm.js.map → quality-CmkY1kMU.js.map} +1 -1
  60. package/dist/cdn/chunks/{renderer-eDlxzlJI.js → renderer-OttGEYkY.js} +50 -50
  61. package/dist/cdn/chunks/{renderer-eDlxzlJI.js.map → renderer-OttGEYkY.js.map} +1 -1
  62. package/dist/cdn/chunks/{src-DKNTQJVO.js → src-C21GI0p6.js} +6 -6
  63. package/dist/cdn/chunks/{src-DKNTQJVO.js.map → src-C21GI0p6.js.map} +1 -1
  64. package/dist/cdn/chunks/styles-Cy-My9zK.js +2976 -0
  65. package/dist/cdn/chunks/styles-Cy-My9zK.js.map +1 -0
  66. package/dist/cdn/editor.css +1 -1
  67. package/dist/cdn/editor.js +109 -106
  68. package/dist/cdn/editor.js.map +1 -1
  69. package/dist/{cloud-a3VovHva.js → cloud-k0DgeCo2.js} +11 -0
  70. package/dist/{dist-DDJIWTRY.js → dist-B2jcQhv8.js} +1 -1
  71. package/dist/{dist-wzMIGj-D.js → dist-BYt3jdCR.js} +1 -1
  72. package/dist/{dist-aRzjfSRN.js → dist-CISFttkF.js} +1 -1
  73. package/dist/{dist-D6uC2xhi.js → dist-CfQPBf15.js} +1 -1
  74. package/dist/{dist-DjviJBCi.js → dist-DD-9hatO.js} +1 -1
  75. package/dist/{dist-KoBJjK1G.js → dist-DUvhjQ2-.js} +1 -1
  76. package/dist/{dist-BaQIYPsn.js → dist-DVwOAodp.js} +1 -1
  77. package/dist/{dist-Cp0zXPAD.js → dist-DxD1kSdH.js} +1 -1
  78. package/dist/{dist-Pk4MhWMP.js → dist-U5guDm2w.js} +1 -1
  79. package/dist/{dist-D90y8dvT.js → dist-hfu7I2rO.js} +3 -3
  80. package/dist/{dist-us-RpCWN.js → dist-v8h02hhE.js} +1 -1
  81. package/dist/{extensions-D-J02CiP.js → extensions-p6UBqXfg.js} +30 -28
  82. package/dist/index.d.ts +8 -8
  83. package/dist/style.css +1 -1
  84. package/dist/{styles-DeNciUTX.js → styles-BP15QmP3.js} +1078 -1056
  85. package/dist/templatical-editor.js +108 -105
  86. package/dist/useAliveFlag-D8GoB4VE.js +10 -0
  87. package/dist/{useEditorCore-uCU9Ny0M.js → useEditorCore-_rbu6iMu.js} +969 -791
  88. package/package.json +7 -7
  89. package/dist/cdn/chunks/CloudEditor-BGiN3M_f.js.map +0 -1
  90. package/dist/cdn/chunks/features-DzIN-Nua.js.map +0 -1
  91. package/dist/cdn/chunks/styles-lcwmaOou.js +0 -2955
  92. package/dist/cdn/chunks/styles-lcwmaOou.js.map +0 -1
  93. /package/dist/{AccessibilityPanel-D-PqmHdH.js → AccessibilityPanel-BeUibrUb.js} +0 -0
  94. /package/dist/{BlockA11yBadge-BFIw0h1m.js → BlockA11yBadge-BhyoMZJ9.js} +0 -0
  95. /package/dist/{CountdownBlock-Cq8A8WrM.js → CountdownBlock-ByJ0_8Pk.js} +0 -0
  96. /package/dist/{TemplateScoringPanel-V79yrEPC.js → TemplateScoringPanel-kYOGtac3.js} +0 -0
  97. /package/dist/{de-BhIWu_bO.js → de-C9hp3n_a.js} +0 -0
  98. /package/dist/{de-Di4MEjjx.js → de-GOtR9DwW.js} +0 -0
  99. /package/dist/{dist-iLBdeBDR.js → dist-CQQS9SRN.js} +0 -0
  100. /package/dist/{emojiData-DX3E0XT-.js → emojiData-DrBuvEoP.js} +0 -0
  101. /package/dist/{en-D7HRbYah.js → en-Dv776AqL.js} +0 -0
  102. /package/dist/{en-BSuzi-Pd.js → en-dFFQVzNn.js} +0 -0
  103. /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-bvx5sFh5.js} +0 -0
  104. /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-DX8ZHRdq.js} +0 -0
  105. /package/dist/{pt-BR-K32lt6YP.js → pt-BR-6n58Fl_q.js} +0 -0
  106. /package/dist/{pt-BR-CCVBRais.js → pt-BR-iOr79aDg.js} +0 -0
  107. /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-CXzrEnNb.js} +0 -0
  108. /package/dist/{styleConstants-fWzlIIwN.js → styleConstants-DkfOPzGu.js} +0 -0
  109. /package/dist/{usePopoverRoot-BxJrqnMD.js → usePopoverRoot-BwzFSPLy.js} +0 -0
@@ -1,20 +1,24 @@
1
- import { A as e, B as t, D as n, E as r, F as i, G as a, J as o, L as s, M as c, N as l, O as u, Q as d, S as f, U as p, V as m, X as h, Y as g, _, at as v, b as y, c as b, d as x, et as S, f as C, h as w, it as T, j as E, k as ee, l as D, m as O, nt as k, o as te, ot as A, p as ne, q as re, rt as j, s as ie, st as M, v as N, w as ae, x as oe, y as se, z as ce } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
2
- import { A as le, S as ue, T as de, _ as fe, a as pe, b as me, c as he, d as ge, f as _e, g as ve, h as ye, j as be, k as xe, l as Se, m as Ce, o as we, p as Te, s as Ee, t as De, u as Oe, v as ke, x as Ae, y as je } from "./dist-DJmnUmW9.js";
3
- import { a as Me, c as Ne, i as Pe, l as Fe, n as Ie, r as Le, s as Re } from "./dist-BzRLLpfq.js";
4
- import { A as ze, C as Be, D as Ve, O as He, S as Ue, _ as We, a as Ge, b as Ke, c as qe, d as Je, f as Ye, g as Xe, h as Ze, k as Qe, m as $e, o as et, p as tt, r as nt, s as rt, t as it, v as at, w as ot, x as st, y as ct } from "./keys-B5SJtPWf.js";
5
- import { t as lt } from "./useI18n-PEB8ioi_.js";
6
- import { t as P } from "./createLucideIcon-Di4mqmGn.js";
7
- import { t as ut } from "./message-circle-gzy2ZGJ3.js";
8
- import { t as dt } from "./trash-2-424iqbpN.js";
9
- import { t as ft } from "./triangle-alert-DWQySIE2.js";
10
- import { t as pt } from "./LoadingTrack-CFkDkjBb.js";
11
- import { t as mt } from "./_plugin-vue_export-helper-B0hnzhyu.js";
1
+ import { A as e, B as t, D as n, E as r, F as i, G as a, J as o, L as s, M as c, N as l, O as u, Q as d, S as f, U as p, V as m, X as h, Y as g, _, at as v, b as y, c as b, d as x, et as S, f as C, h as w, it as T, j as E, k as ee, l as D, m as O, nt as k, o as te, ot as A, p as ne, q as re, rt as j, s as ie, st as M, v as N, w as P, x as ae, y as oe, z as se } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
2
+ import { A as ce, S as le, T as ue, _ as de, a as fe, b as pe, c as me, d as he, f as ge, g as _e, h as ve, j as ye, k as be, l as xe, m as Se, o as Ce, p as we, s as Te, t as Ee, u as De, v as Oe, x as ke, y as Ae } from "./dist-DJmnUmW9.js";
3
+ import { a as je, c as Me, i as Ne, l as Pe, n as Fe, r as Ie, s as Le } from "./dist-BzRLLpfq.js";
4
+ import { A as Re, C as ze, D as Be, O as Ve, S as He, _ as Ue, a as We, b as Ge, c as Ke, d as qe, f as Je, g as Ye, h as Xe, k as Ze, m as Qe, o as $e, p as et, r as tt, s as nt, t as rt, v as it, w as at, x as ot, y as st } from "./keys-B5SJtPWf.js";
5
+ import { t as ct } from "./useI18n-PEB8ioi_.js";
6
+ import { t as F } from "./createLucideIcon-Di4mqmGn.js";
7
+ import { t as lt } from "./message-circle-gzy2ZGJ3.js";
8
+ import { t as ut } from "./trash-2-424iqbpN.js";
9
+ import { t as dt } from "./triangle-alert-DWQySIE2.js";
10
+ import { t as ft } from "./LoadingTrack-CFkDkjBb.js";
11
+ import { t as pt } from "./_plugin-vue_export-helper-B0hnzhyu.js";
12
12
  import "./useCloudI18n-ByEMykjO.js";
13
- import { t as ht } from "./useMergeTag-C47xwU7X.js";
13
+ import { t as mt } from "./useMergeTag-C47xwU7X.js";
14
+ import { t as ht } from "./useAliveFlag-D8GoB4VE.js";
14
15
  //#region ../core/dist/index.js
15
16
  function gt(e) {
17
+ return e === "1" ? 1 : e === "3" ? 3 : 2;
18
+ }
19
+ function _t(e) {
16
20
  let t = o({
17
- content: e.content ?? Oe(e.defaultFontFamily, e.templateDefaults),
21
+ content: e.content ?? De(e.defaultFontFamily, e.templateDefaults),
18
22
  selectedBlockId: null,
19
23
  viewport: "desktop",
20
24
  darkMode: !1,
@@ -37,12 +41,15 @@ function gt(e) {
37
41
  }
38
42
  return null;
39
43
  }
40
- function a(e, t, n = { blocks: e }) {
44
+ function a(e, t) {
45
+ if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) a(e, t);
46
+ }
47
+ function s(e, t, n = { blocks: e }) {
41
48
  for (let r = 0; r < e.length; r++) {
42
49
  let i = e[r];
43
50
  if (i.id === t) return n;
44
51
  if (i.type === "section") for (let e = 0; e < i.children.length; e++) {
45
- let n = a(i.children[e], t, {
52
+ let n = s(i.children[e], t, {
46
53
  blocks: i.children[e],
47
54
  sectionId: i.id,
48
55
  columnIndex: e
@@ -52,43 +59,54 @@ function gt(e) {
52
59
  }
53
60
  return null;
54
61
  }
55
- function s(t) {
62
+ function c(t) {
56
63
  return e.lockedBlocks?.value.has(t) ?? !1;
57
64
  }
58
- function c(e, n = !0) {
65
+ function l(e) {
66
+ let n = s(t.content.blocks, e);
67
+ if (!n) return null;
68
+ let r = n.blocks.findIndex((t) => t.id === e);
69
+ return r === -1 ? null : {
70
+ targetSectionId: n.sectionId,
71
+ columnIndex: n.columnIndex,
72
+ index: r
73
+ };
74
+ }
75
+ function u(e, n = !0) {
59
76
  t.content = e, n && (t.isDirty = !0);
60
77
  }
61
- function l(e) {
62
- e && s(e) || (t.selectedBlockId = e);
78
+ function d(e) {
79
+ e && c(e) || (t.selectedBlockId = e);
63
80
  }
64
- function u(e) {
81
+ function f(e) {
65
82
  t.viewport = e;
66
83
  }
67
- function d(e) {
84
+ function p(e) {
68
85
  t.darkMode = e;
69
86
  }
70
- function f(e) {
87
+ function h(e) {
71
88
  t.uiTheme = e;
72
89
  }
73
- function p(e) {
90
+ function _(e) {
74
91
  t.previewMode = e, e && (t.selectedBlockId = null);
75
92
  }
76
- function h(e, n) {
77
- if (s(e)) return;
93
+ function v(e, n) {
94
+ if (c(e)) return;
78
95
  let r = i(t.content.blocks, e);
79
96
  r && (Object.assign(r, n), t.isDirty = !0);
80
97
  }
81
- function _(e) {
98
+ function y(e) {
82
99
  t.content.settings = {
83
100
  ...t.content.settings,
84
101
  ...e
85
102
  }, t.isDirty = !0;
86
103
  }
87
- function v(e, n, r = 0, a) {
104
+ function b(e, n, r = 0, a) {
88
105
  if (n) {
89
- if (s(n)) return;
106
+ if (c(n)) return;
90
107
  let o = i(t.content.blocks, n);
91
108
  if (o && o.type === "section") {
109
+ if (r < 0 || r >= gt(o.columns)) return;
92
110
  o.children[r] = o.children[r] || [];
93
111
  let t = o.children[r];
94
112
  a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
@@ -96,56 +114,71 @@ function gt(e) {
96
114
  } else a !== void 0 && a < t.content.blocks.length ? t.content.blocks.splice(a, 0, e) : t.content.blocks.push(e);
97
115
  t.isDirty = !0;
98
116
  }
99
- function y(e) {
100
- if (s(e)) return;
101
- let n = a(t.content.blocks, e);
117
+ function x(e) {
118
+ if (c(e)) return;
119
+ let n = s(t.content.blocks, e);
102
120
  if (n) {
103
121
  let r = n.blocks.findIndex((t) => t.id === e);
104
- r !== -1 && (n.blocks.splice(r, 1), t.selectedBlockId === e && (t.selectedBlockId = null), t.isDirty = !0);
122
+ if (r !== -1) {
123
+ let [e] = n.blocks.splice(r, 1);
124
+ if (t.selectedBlockId) {
125
+ let n = /* @__PURE__ */ new Set();
126
+ a(e, n), n.has(t.selectedBlockId) && (t.selectedBlockId = null);
127
+ }
128
+ t.isDirty = !0;
129
+ }
105
130
  }
106
131
  }
107
- function b(e, n, r, o = 0) {
108
- if (s(e) || r && s(r)) return;
109
- let c = a(t.content.blocks, e);
110
- if (!c) return;
111
- let l = c.blocks.findIndex((t) => t.id === e);
132
+ function S(e, n, r, a = 0) {
133
+ if (c(e) || r && c(r)) return;
134
+ let o = s(t.content.blocks, e);
135
+ if (!o) return;
136
+ let l = o.blocks.findIndex((t) => t.id === e);
112
137
  if (l === -1) return;
113
138
  let u;
114
139
  if (r) {
115
140
  let e = i(t.content.blocks, r);
116
- if (!e || e.type !== "section") return;
117
- e.children[o] = e.children[o] || [], u = e.children[o];
141
+ if (!e || e.type !== "section" || a < 0 || a >= gt(e.columns)) return;
142
+ e.children[a] = e.children[a] || [], u = e.children[a];
118
143
  } else u = t.content.blocks;
119
- let [d] = c.blocks.splice(l, 1);
144
+ let [d] = o.blocks.splice(l, 1);
120
145
  u.splice(n, 0, d), t.isDirty = !0;
121
146
  }
122
- function x() {
147
+ function C() {
123
148
  t.isDirty = !0;
124
149
  }
125
150
  return {
126
151
  state: g(t),
127
152
  content: n,
128
153
  selectedBlock: r,
129
- isBlockLocked: s,
130
- setContent: c,
131
- selectBlock: l,
132
- setViewport: u,
133
- setDarkMode: d,
134
- setUiTheme: f,
135
- setPreviewMode: p,
136
- updateBlock: h,
137
- updateSettings: _,
138
- addBlock: v,
139
- removeBlock: y,
140
- moveBlock: b,
141
- markDirty: x
154
+ isBlockLocked: c,
155
+ setContent: u,
156
+ selectBlock: d,
157
+ setViewport: f,
158
+ setDarkMode: p,
159
+ setUiTheme: h,
160
+ setPreviewMode: _,
161
+ updateBlock: v,
162
+ updateSettings: y,
163
+ addBlock: b,
164
+ removeBlock: x,
165
+ moveBlock: S,
166
+ markDirty: C,
167
+ findBlockLocation: l
142
168
  };
143
169
  }
144
- var _t = 50, vt = 300, yt = 1500;
145
- function bt(e) {
146
- let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = _t } = e, a = h([]), o = h([]), s = h(!1), c = null, l = null, u = m(() => a.value.length > 0), d = m(() => o.value.length > 0);
170
+ var vt = 50, yt = 300, bt = 1500;
171
+ function xt(e) {
172
+ let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = vt } = e, a = h([]), o = h([]), s = h(!1), c = null, l = null, u = m(() => a.value.length > 0), d = m(() => o.value.length > 0);
147
173
  function f() {
148
- return JSON.parse(JSON.stringify(t.value));
174
+ let e = /* @__PURE__ */ new WeakSet();
175
+ return JSON.parse(JSON.stringify(t.value, (t, n) => {
176
+ if (typeof n == "object" && n) {
177
+ if (e.has(n)) return;
178
+ e.add(n);
179
+ }
180
+ return n;
181
+ }));
149
182
  }
150
183
  function p(e) {
151
184
  a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
@@ -161,21 +194,21 @@ function bt(e) {
161
194
  if (l && l.blockId === e) {
162
195
  clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
163
196
  l = null;
164
- }, vt);
197
+ }, yt);
165
198
  return;
166
199
  }
167
200
  g(), p(f()), o.value = [], l = {
168
201
  blockId: e,
169
202
  timeoutId: setTimeout(() => {
170
203
  l = null;
171
- }, vt)
204
+ }, yt)
172
205
  };
173
206
  }
174
207
  }
175
208
  function y() {
176
209
  s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
177
210
  s.value = !1, c = null;
178
- }, yt);
211
+ }, bt);
179
212
  }
180
213
  function b() {
181
214
  if (a.value.length === 0) return;
@@ -207,33 +240,54 @@ function bt(e) {
207
240
  destroy: C
208
241
  };
209
242
  }
210
- function xt(e) {
211
- let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i } = e;
212
- function a(n, r, a) {
213
- let o = we(n, e.blockDefaults);
243
+ function St(e) {
244
+ e.type === "table" ? e.rows = e.rows.map((e) => ({
245
+ ...e,
246
+ id: le(),
247
+ cells: e.cells.map((e) => ({
248
+ ...e,
249
+ id: le()
250
+ }))
251
+ })) : e.type === "social" ? e.icons = e.icons.map((e) => ({
252
+ ...e,
253
+ id: le()
254
+ })) : e.type === "menu" && (e.items = e.items.map((e) => ({
255
+ ...e,
256
+ id: le()
257
+ })));
258
+ }
259
+ function Ct(e) {
260
+ let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
261
+ function o(n, r, a) {
262
+ let o = Ce(n, e.blockDefaults);
214
263
  return t(o, r, a), i(o.id), o;
215
264
  }
216
- function o(e, n, r) {
217
- let a = JSON.parse(JSON.stringify(e));
218
- return a.id = ue(), a.type === "section" && (a.children = a.children.map((e) => e.map((e) => {
265
+ function s(e, n, r) {
266
+ let o = JSON.parse(JSON.stringify(e));
267
+ if (o.id = le(), St(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
219
268
  let t = JSON.parse(JSON.stringify(e));
220
- return t.id = ue(), t;
221
- }))), t(a, n, r), i(a.id), a;
269
+ return t.id = le(), St(t), t;
270
+ }))), n !== void 0 || r !== void 0) t(o, n, r);
271
+ else {
272
+ let i = a?.(e.id) ?? null;
273
+ i ? t(o, i.targetSectionId, i.columnIndex, i.index + 1) : t(o, n, r);
274
+ }
275
+ return i(o.id), o;
222
276
  }
223
- function s(e) {
277
+ function c(e) {
224
278
  n(e);
225
279
  }
226
- function c(e, t, n) {
280
+ function l(e, t, n) {
227
281
  r(e, { [t]: n });
228
282
  }
229
283
  return {
230
- createAndAddBlock: a,
231
- duplicateBlock: o,
232
- deleteBlock: s,
233
- updateBlockProperty: c
284
+ createAndAddBlock: o,
285
+ duplicateBlock: s,
286
+ deleteBlock: c,
287
+ updateBlockProperty: l
234
288
  };
235
289
  }
236
- function St(e) {
290
+ function wt(e) {
237
291
  let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
238
292
  function c() {
239
293
  return typeof a == "function" ? a() : a;
@@ -269,7 +323,7 @@ function St(e) {
269
323
  destroy: h
270
324
  };
271
325
  }
272
- function Ct(e) {
326
+ function Tt(e) {
273
327
  let t = o(/* @__PURE__ */ new Set()), n = m(() => t.size > 0);
274
328
  function r(e) {
275
329
  return t.has(e);
@@ -287,7 +341,7 @@ function Ct(e) {
287
341
  hasHiddenBlocks: n
288
342
  };
289
343
  }
290
- function wt(e) {
344
+ function Et(e) {
291
345
  let t = h(!1), n = h(!1), r = m(() => !!e.definition.value?.dataSource), i = m(() => r.value && !e.block.value.dataSourceFetched);
292
346
  async function a() {
293
347
  let r = e.definition.value;
@@ -317,7 +371,7 @@ function wt(e) {
317
371
  needsFetch: i
318
372
  };
319
373
  }
320
- function Tt(e, t) {
374
+ function Dt(e, t) {
321
375
  let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
322
376
  e.addBlock = (r, i, a, o) => {
323
377
  i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
@@ -332,15 +386,34 @@ function Tt(e, t) {
332
386
  };
333
387
  }
334
388
  //#endregion
389
+ //#region src/utils/activeEditorTracker.ts
390
+ var Ot = /* @__PURE__ */ new Set(), kt = 0, At = 0;
391
+ function jt() {
392
+ let e = ++At;
393
+ return Ot.add(e), kt === 0 && (kt = e), {
394
+ id: e,
395
+ isActive: () => Ot.size <= 1 || kt === e,
396
+ claim: () => {
397
+ kt = e;
398
+ },
399
+ dispose: () => {
400
+ if (Ot.delete(e), kt === e) {
401
+ let e = Array.from(Ot);
402
+ kt = e[e.length - 1] ?? 0;
403
+ }
404
+ }
405
+ };
406
+ }
407
+ //#endregion
335
408
  //#region src/composables/useAccessibilityLint.ts
336
- function Et(e) {
409
+ function Mt(e) {
337
410
  let t = h([]), n = h(!1), r = h(!1), i = d(null), a = e.options.disabled === !0, o = null, c = !1;
338
411
  a || l();
339
412
  async function l() {
340
413
  try {
341
414
  let t = await import("@templatical/quality");
342
415
  if (c) return;
343
- i.value = t.lintAccessibility, n.value = !0, u(), o = Fe(e.content, u, {
416
+ i.value = t.lintAccessibility, n.value = !0, u(), o = Pe(e.content, u, {
344
417
  debounce: e.debounce ?? 500,
345
418
  deep: !0
346
419
  });
@@ -374,12 +447,12 @@ function Et(e) {
374
447
  }
375
448
  //#endregion
376
449
  //#region src/utils/blockTypeLabels.ts
377
- function Dt(e, t) {
450
+ function Nt(e, t) {
378
451
  return t.blocks[e] ?? e;
379
452
  }
380
453
  //#endregion
381
454
  //#region src/composables/useKeyboardReorder.ts
382
- function Ot(e, t) {
455
+ function Pt(e, t) {
383
456
  let n = h(null), r = h(""), i = null;
384
457
  function a(t) {
385
458
  let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
@@ -406,7 +479,7 @@ function Ot(e, t) {
406
479
  let r = a(n);
407
480
  if (!r) return "";
408
481
  let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
409
- return i ? Dt(i.type, t.t) : "";
482
+ return i ? Nt(i.type, t.t) : "";
410
483
  }
411
484
  function s(t, n) {
412
485
  return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
@@ -475,13 +548,13 @@ function Ot(e, t) {
475
548
  }
476
549
  //#endregion
477
550
  //#region src/composables/useUiTheme.ts
478
- function kt(e) {
479
- let t = Pe("(prefers-color-scheme: dark)");
551
+ function Ft(e) {
552
+ let t = Ne("(prefers-color-scheme: dark)");
480
553
  return { resolvedTheme: x(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
481
554
  }
482
555
  //#endregion
483
556
  //#region src/composables/useThemeStyles.ts
484
- var At = {
557
+ var It = {
485
558
  bg: "--tpl-bg",
486
559
  bgElevated: "--tpl-bg-elevated",
487
560
  bgHover: "--tpl-bg-hover",
@@ -505,10 +578,10 @@ var At = {
505
578
  dangerLight: "--tpl-danger-light",
506
579
  canvasBg: "--tpl-canvas-bg"
507
580
  };
508
- function jt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
581
+ function Lt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
509
582
  return { themeStyles: x(() => {
510
583
  let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
511
- if (a) for (let [e, t] of Object.entries(At)) {
584
+ if (a) for (let [e, t] of Object.entries(It)) {
512
585
  let n = a[e];
513
586
  n && (r[t] = n);
514
587
  }
@@ -517,27 +590,27 @@ function jt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
517
590
  }
518
591
  //#endregion
519
592
  //#region src/utils/logger.ts
520
- var Mt = "[Templatical]";
521
- function Nt() {
593
+ var Rt = "[Templatical]";
594
+ function zt() {
522
595
  return typeof process < "u" && process.env.NODE_ENV === "production";
523
596
  }
524
- var Pt = {
597
+ var Bt = {
525
598
  warn(...e) {
526
- console.warn(Mt, ...e);
599
+ console.warn(Rt, ...e);
527
600
  },
528
601
  error(...e) {
529
- console.error(Mt, ...e);
602
+ console.error(Rt, ...e);
530
603
  },
531
604
  debug(...e) {
532
- Nt() || console.debug(Mt, ...e);
605
+ zt() || console.debug(Rt, ...e);
533
606
  },
534
607
  info(...e) {
535
- Nt() || console.info(Mt, ...e);
608
+ zt() || console.info(Rt, ...e);
536
609
  }
537
610
  };
538
611
  //#endregion
539
612
  //#region src/composables/useBlockRegistry.ts
540
- function Ft() {
613
+ function Vt() {
541
614
  let e = d(/* @__PURE__ */ new Map());
542
615
  function t(t, n) {
543
616
  e.value.set(t, n), k(e);
@@ -545,7 +618,7 @@ function Ft() {
545
618
  function n(t, n) {
546
619
  let r = `custom:${t.type}`, i = {
547
620
  component: n,
548
- createBlock: () => Se(t),
621
+ createBlock: () => xe(t),
549
622
  sidebarItem: {
550
623
  type: r,
551
624
  label: t.name,
@@ -583,13 +656,13 @@ function Ft() {
583
656
  let t = o(e.customType);
584
657
  if (!t) return s("Block definition not found");
585
658
  try {
586
- let { Liquid: n } = await import("./liquid.browser-CdMv1BTn.js");
659
+ let { Liquid: n } = await import("./liquid.browser-DX8ZHRdq.js");
587
660
  return await new n({
588
661
  strictVariables: !1,
589
662
  strictFilters: !1
590
663
  }).parseAndRender(t.template, e.fieldValues);
591
664
  } catch (t) {
592
- return Pt.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
665
+ return Bt.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
593
666
  }
594
667
  }
595
668
  function l(t) {
@@ -608,75 +681,75 @@ function Ft() {
608
681
  }
609
682
  //#endregion
610
683
  //#region src/utils/registerBuiltInBlocks.ts
611
- var It = [
684
+ var Ht = [
612
685
  {
613
686
  type: "section",
614
687
  label: "Section",
615
- createBlock: ve
688
+ createBlock: _e
616
689
  },
617
690
  {
618
691
  type: "title",
619
692
  label: "Title",
620
- createBlock: me
693
+ createBlock: pe
621
694
  },
622
695
  {
623
696
  type: "paragraph",
624
697
  label: "Paragraph",
625
- createBlock: ye
698
+ createBlock: ve
626
699
  },
627
700
  {
628
701
  type: "image",
629
702
  label: "Image",
630
- createBlock: Te
703
+ createBlock: we
631
704
  },
632
705
  {
633
706
  type: "button",
634
707
  label: "Button",
635
- createBlock: Ee
708
+ createBlock: Te
636
709
  },
637
710
  {
638
711
  type: "divider",
639
712
  label: "Divider",
640
- createBlock: ge
713
+ createBlock: he
641
714
  },
642
715
  {
643
716
  type: "video",
644
717
  label: "Video",
645
- createBlock: Ae
718
+ createBlock: ke
646
719
  },
647
720
  {
648
721
  type: "social",
649
722
  label: "Social",
650
- createBlock: fe
723
+ createBlock: de
651
724
  },
652
725
  {
653
726
  type: "menu",
654
727
  label: "Menu",
655
- createBlock: Ce
728
+ createBlock: Se
656
729
  },
657
730
  {
658
731
  type: "table",
659
732
  label: "Table",
660
- createBlock: je
733
+ createBlock: Ae
661
734
  },
662
735
  {
663
736
  type: "spacer",
664
737
  label: "Spacer",
665
- createBlock: ke
738
+ createBlock: Oe
666
739
  },
667
740
  {
668
741
  type: "html",
669
742
  label: "HTML",
670
- createBlock: _e
743
+ createBlock: ge
671
744
  },
672
745
  {
673
746
  type: "countdown",
674
747
  label: "Countdown",
675
- createBlock: he
748
+ createBlock: me
676
749
  }
677
750
  ];
678
- function Lt(e, t) {
679
- for (let n of It) {
751
+ function Ut(e, t) {
752
+ for (let n of Ht) {
680
753
  let r = t[n.type];
681
754
  r && e.registerBuiltIn(n.type, {
682
755
  component: r,
@@ -691,7 +764,7 @@ function Lt(e, t) {
691
764
  }
692
765
  //#endregion
693
766
  //#region src/utils/keyboardShortcuts.ts
694
- function Rt(e) {
767
+ function Wt(e) {
695
768
  for (let t of e.composedPath()) {
696
769
  if (!(t instanceof HTMLElement)) continue;
697
770
  if (t.isContentEditable) return !0;
@@ -700,14 +773,14 @@ function Rt(e) {
700
773
  }
701
774
  return !1;
702
775
  }
703
- function zt(e, t) {
776
+ function Gt(e, t) {
704
777
  let n = e.metaKey || e.ctrlKey;
705
778
  if (n && e.key.toLowerCase() === "s") {
706
779
  e.preventDefault(), t.onSave?.();
707
780
  return;
708
781
  }
709
782
  if (n && e.key.toLowerCase() === "z") {
710
- if (Rt(e)) return;
783
+ if (Wt(e)) return;
711
784
  e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
712
785
  return;
713
786
  }
@@ -715,11 +788,11 @@ function zt(e, t) {
715
788
  t.selectBlock(null);
716
789
  return;
717
790
  }
718
- (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Rt(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
791
+ (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Wt(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
719
792
  }
720
793
  //#endregion
721
794
  //#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
722
- var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
795
+ var Kt = { class: "tpl:text-center" }, qt = ["href"], Jt = /* @__PURE__ */ y({
723
796
  __name: "ButtonBlock",
724
797
  props: {
725
798
  block: {},
@@ -740,17 +813,17 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
740
813
  };
741
814
  return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
742
815
  });
743
- return (n, i) => (e(), w("div", Bt, [C("a", {
816
+ return (n, i) => (e(), w("div", Kt, [C("a", {
744
817
  href: t.block.url || "#",
745
818
  style: A(r.value),
746
819
  class: "tpl:cursor-default",
747
820
  onClick: i[0] ||= b(() => {}, ["prevent"])
748
- }, M(t.block.text), 13, Vt)]));
821
+ }, M(t.block.text), 13, qt)]));
749
822
  }
750
- }), Ut = P("bookmark", [["path", {
823
+ }), Yt = F("bookmark", [["path", {
751
824
  d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
752
825
  key: "oz39mx"
753
- }]]), Wt = P("box", [
826
+ }]]), Xt = F("box", [
754
827
  ["path", {
755
828
  d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
756
829
  key: "hh9hay"
@@ -763,13 +836,13 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
763
836
  d: "M12 22V12",
764
837
  key: "d0xqtd"
765
838
  }]
766
- ]), Gt = P("code", [["path", {
839
+ ]), Zt = F("code", [["path", {
767
840
  d: "m16 18 6-6-6-6",
768
841
  key: "eg8j8"
769
842
  }], ["path", {
770
843
  d: "m8 6-6 6 6 6",
771
844
  key: "ppft3o"
772
- }]]), Kt = P("copy", [["rect", {
845
+ }]]), Qt = F("copy", [["rect", {
773
846
  width: "14",
774
847
  height: "14",
775
848
  x: "8",
@@ -780,7 +853,7 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
780
853
  }], ["path", {
781
854
  d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
782
855
  key: "zix9uf"
783
- }]]), qt = P("eye-off", [
856
+ }]]), $t = F("eye-off", [
784
857
  ["path", {
785
858
  d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
786
859
  key: "ct8e1f"
@@ -797,10 +870,10 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
797
870
  d: "m2 2 20 20",
798
871
  key: "1ooewy"
799
872
  }]
800
- ]), Jt = P("funnel", [["path", {
873
+ ]), en = F("funnel", [["path", {
801
874
  d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
802
875
  key: "sc7q7i"
803
- }]]), Yt = P("grip-vertical", [
876
+ }]]), tn = F("grip-vertical", [
804
877
  ["circle", {
805
878
  cx: "9",
806
879
  cy: "12",
@@ -837,7 +910,7 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
837
910
  r: "1",
838
911
  key: "f4zoj3"
839
912
  }]
840
- ]), Xt = P("image", [
913
+ ]), nn = F("image", [
841
914
  ["rect", {
842
915
  width: "18",
843
916
  height: "18",
@@ -857,13 +930,13 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
857
930
  d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
858
931
  key: "1xmnt7"
859
932
  }]
860
- ]), Zt = P("navigation", [["polygon", {
933
+ ]), rn = F("navigation", [["polygon", {
861
934
  points: "3 11 22 2 13 21 11 13 3 11",
862
935
  key: "1ltx0t"
863
- }]]), Qt = P("puzzle", [["path", {
936
+ }]]), an = F("puzzle", [["path", {
864
937
  d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
865
938
  key: "w46dr5"
866
- }]]), $t = P("share-2", [
939
+ }]]), on = F("share-2", [
867
940
  ["circle", {
868
941
  cx: "18",
869
942
  cy: "5",
@@ -896,7 +969,7 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
896
969
  y2: "10.49",
897
970
  key: "1n3mei"
898
971
  }]
899
- ]), en = P("table", [
972
+ ]), sn = F("table", [
900
973
  ["path", {
901
974
  d: "M12 3v18",
902
975
  key: "108xh3"
@@ -917,7 +990,7 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
917
990
  d: "M3 15h18",
918
991
  key: "5xshup"
919
992
  }]
920
- ]), tn = P("video", [["path", {
993
+ ]), cn = F("video", [["path", {
921
994
  d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
922
995
  key: "ftymec"
923
996
  }], ["rect", {
@@ -927,11 +1000,11 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
927
1000
  height: "12",
928
1001
  rx: "2",
929
1002
  key: "158x01"
930
- }]]), nn = ["innerHTML"], rn = [
1003
+ }]]), ln = ["innerHTML"], un = [
931
1004
  "src",
932
1005
  "width",
933
1006
  "height"
934
- ], an = /* @__PURE__ */ y({
1007
+ ], dn = /* @__PURE__ */ y({
935
1008
  __name: "CustomBlockIcon",
936
1009
  props: {
937
1010
  icon: {},
@@ -947,14 +1020,14 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
947
1020
  height: `${r.value}px`
948
1021
  }),
949
1022
  innerHTML: t.icon
950
- }, null, 12, nn)) : a.value ? (e(), w("img", {
1023
+ }, null, 12, ln)) : a.value ? (e(), w("img", {
951
1024
  key: 1,
952
1025
  src: t.icon,
953
1026
  width: r.value,
954
1027
  height: r.value,
955
1028
  class: "tpl:inline-block",
956
1029
  alt: ""
957
- }, null, 8, rn)) : (e(), ne(j(Wt), {
1030
+ }, null, 8, un)) : (e(), ne(j(Xt), {
958
1031
  key: 2,
959
1032
  size: r.value,
960
1033
  "stroke-width": 1.5
@@ -963,16 +1036,16 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
963
1036
  });
964
1037
  //#endregion
965
1038
  //#region src/composables/useEditorRoot.ts
966
- function on() {
967
- return ae(Ze, document) ?? document;
1039
+ function fn() {
1040
+ return P(Xe, document) ?? document;
968
1041
  }
969
1042
  //#endregion
970
1043
  //#region src/composables/useFocusTrap.ts
971
- var sn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
972
- function cn(e, t) {
973
- let n = on(), r = null, i = null, a = null;
1044
+ var pn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1045
+ function mn(e, t) {
1046
+ let n = fn(), r = null, i = null, a = null;
974
1047
  function o() {
975
- return e.value ? Array.from(e.value.querySelectorAll(sn)).filter((e) => e.offsetParent !== null) : [];
1048
+ return e.value ? Array.from(e.value.querySelectorAll(pn)).filter((e) => e.offsetParent !== null) : [];
976
1049
  }
977
1050
  function c(e) {
978
1051
  if (e.key !== "Tab") return;
@@ -987,7 +1060,7 @@ function cn(e, t) {
987
1060
  a = null;
988
1061
  let t = o();
989
1062
  t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
990
- }), i = Le(e, "keydown", c);
1063
+ }), i = Ie(e, "keydown", c);
991
1064
  }
992
1065
  function u(e = {}) {
993
1066
  let t = e.restoreFocus !== !1;
@@ -1002,13 +1075,13 @@ function cn(e, t) {
1002
1075
  }
1003
1076
  //#endregion
1004
1077
  //#region src/composables/useEmoji.ts
1005
- function ln() {
1006
- let [e, t] = Ne(!1), n = d([]), r = !1;
1078
+ function hn() {
1079
+ let [e, t] = Me(!1), n = d([]), r = !1;
1007
1080
  re(() => {
1008
1081
  r = !0;
1009
1082
  }), s(e, async (e) => {
1010
1083
  if (e && n.value.length === 0) {
1011
- let { emojiCategories: e } = await import("./emojiData-DX3E0XT-.js");
1084
+ let { emojiCategories: e } = await import("./emojiData-DrBuvEoP.js");
1012
1085
  if (r) return;
1013
1086
  n.value = e;
1014
1087
  }
@@ -1028,7 +1101,7 @@ function ln() {
1028
1101
  }
1029
1102
  //#endregion
1030
1103
  //#region src/composables/useDragDrop.ts
1031
- function un(e) {
1104
+ function gn(e) {
1032
1105
  let { onBlockMove: t, onBlockAdd: n } = e, r = h(!1), i = h(null), a = h(null);
1033
1106
  function o(e) {
1034
1107
  r.value = !0, i.value = e;
@@ -1078,7 +1151,7 @@ function un(e) {
1078
1151
  }
1079
1152
  //#endregion
1080
1153
  //#region src/composables/useFonts.ts
1081
- var dn = [
1154
+ var _n = [
1082
1155
  {
1083
1156
  value: "Arial",
1084
1157
  label: "Arial"
@@ -1107,7 +1180,7 @@ var dn = [
1107
1180
  value: "Courier New",
1108
1181
  label: "Courier New"
1109
1182
  }
1110
- ], fn = {
1183
+ ], vn = {
1111
1184
  arial: "Arial, sans-serif",
1112
1185
  helvetica: "Helvetica, sans-serif",
1113
1186
  georgia: "Georgia, serif",
@@ -1115,14 +1188,14 @@ var dn = [
1115
1188
  verdana: "Verdana, sans-serif",
1116
1189
  "trebuchet ms": "'Trebuchet MS', sans-serif",
1117
1190
  "courier new": "'Courier New', monospace"
1118
- }, pn = "Arial, sans-serif";
1119
- function mn(e) {
1120
- let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ?? pn);
1191
+ }, yn = "Arial, sans-serif";
1192
+ function bn(e) {
1193
+ let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ?? yn);
1121
1194
  function a(e) {
1122
1195
  n.value = e;
1123
1196
  }
1124
1197
  let o = x(() => {
1125
- let e = [...dn];
1198
+ let e = [..._n];
1126
1199
  if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
1127
1200
  let r = t.value.map((e) => ({
1128
1201
  value: e.name,
@@ -1135,17 +1208,17 @@ function mn(e) {
1135
1208
  return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1136
1209
  }
1137
1210
  function c(e) {
1138
- return dn.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1211
+ return _n.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1139
1212
  }
1140
1213
  function l() {
1141
1214
  if (e?.defaultFont) {
1142
- if (!n.value && !c(e.defaultFont)) return pn;
1215
+ if (!n.value && !c(e.defaultFont)) return yn;
1143
1216
  if (s(e.defaultFont)) {
1144
1217
  let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
1145
1218
  if (t) return t.value;
1146
1219
  }
1147
1220
  }
1148
- return pn;
1221
+ return yn;
1149
1222
  }
1150
1223
  let u = x(() => l());
1151
1224
  function d(e) {
@@ -1155,12 +1228,12 @@ function mn(e) {
1155
1228
  let e = n.fallback ?? i.value;
1156
1229
  return `'${n.name}', ${e}`;
1157
1230
  }
1158
- return fn[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
1231
+ return vn[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
1159
1232
  }
1160
- let f = [];
1161
- async function m() {
1233
+ let f = [], m = !1;
1234
+ async function g() {
1162
1235
  if (t.value.length === 0) {
1163
- r.value = !0;
1236
+ m || (r.value = !0);
1164
1237
  return;
1165
1238
  }
1166
1239
  let e = t.value.map(async (e) => {
@@ -1171,16 +1244,18 @@ function mn(e) {
1171
1244
  t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
1172
1245
  });
1173
1246
  } catch (t) {
1174
- Pt.warn(`Failed to load custom font "${e.name}":`, t);
1247
+ Bt.warn(`Failed to load custom font "${e.name}":`, t);
1175
1248
  }
1176
1249
  });
1177
- await Promise.allSettled(e), r.value = !0;
1250
+ await Promise.allSettled(e), !m && (r.value = !0);
1178
1251
  }
1179
- function g() {
1252
+ function _() {
1180
1253
  for (let e of f) e.remove();
1181
1254
  f.length = 0;
1182
1255
  }
1183
- return p() && re(g), {
1256
+ return p() && re(() => {
1257
+ m = !0, _();
1258
+ }), {
1184
1259
  fonts: o,
1185
1260
  defaultFont: u,
1186
1261
  defaultFallback: i,
@@ -1188,38 +1263,53 @@ function mn(e) {
1188
1263
  customFontsEnabled: n,
1189
1264
  isLoaded: r,
1190
1265
  setCustomFontsEnabled: a,
1191
- loadCustomFonts: m,
1192
- cleanupFontLinks: g,
1266
+ loadCustomFonts: g,
1267
+ cleanupFontLinks: _,
1193
1268
  getFontWithFallback: d,
1194
1269
  getDefaultFont: l
1195
1270
  };
1196
1271
  }
1197
1272
  //#endregion
1198
1273
  //#region src/composables/useRichTextLinkDialog.ts
1199
- function hn(e) {
1274
+ function xn(e) {
1200
1275
  let t = h(!1), n = h(""), r = h(null);
1201
- cn(r, t);
1276
+ mn(r, t);
1202
1277
  function i() {
1203
1278
  n.value = e.value?.getAttributes("link").href || "", t.value = !0;
1204
1279
  }
1205
1280
  function a() {
1206
1281
  if (n.value) {
1207
- let t = o(n.value);
1208
- e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).run();
1209
- }
1210
- c();
1211
- }
1212
- function o(e) {
1213
- return /^[a-z][a-z0-9+.-]*:/i.test(e) || e.startsWith("#") ? e : `https://${e}`;
1214
- }
1215
- function s() {
1216
- e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), c();
1282
+ let t = s(n.value);
1283
+ t !== null && e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).run();
1284
+ }
1285
+ l();
1286
+ }
1287
+ let o = new Set([
1288
+ "http",
1289
+ "https",
1290
+ "mailto",
1291
+ "tel",
1292
+ "ftp",
1293
+ "ftps",
1294
+ "sms",
1295
+ "xmpp",
1296
+ "cid"
1297
+ ]);
1298
+ function s(e) {
1299
+ let t = e.trim();
1300
+ if (!t) return null;
1301
+ if (t.startsWith("#")) return t;
1302
+ let n = /^([a-z][a-z0-9+.-]*):/i.exec(t);
1303
+ return n ? o.has(n[1].toLowerCase()) ? t : null : `https://${t}`;
1217
1304
  }
1218
1305
  function c() {
1306
+ e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), l();
1307
+ }
1308
+ function l() {
1219
1309
  t.value = !1, n.value = "";
1220
1310
  }
1221
- function l(e) {
1222
- e.key === "Enter" ? (e.preventDefault(), a()) : e.key === "Escape" && c();
1311
+ function u(e) {
1312
+ e.key === "Enter" ? (e.preventDefault(), a()) : e.key === "Escape" && l();
1223
1313
  }
1224
1314
  return {
1225
1315
  showLinkDialog: t,
@@ -1227,15 +1317,15 @@ function hn(e) {
1227
1317
  linkDialogRef: r,
1228
1318
  openLinkDialog: i,
1229
1319
  insertLink: a,
1230
- removeLink: s,
1231
- closeLinkDialog: c,
1232
- handleLinkKeydown: l
1320
+ removeLink: c,
1321
+ closeLinkDialog: l,
1322
+ handleLinkKeydown: u
1233
1323
  };
1234
1324
  }
1235
1325
  //#endregion
1236
1326
  //#region src/composables/useRichTextEditor.ts
1237
- function gn(e) {
1238
- let t = ae($e, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = ht(), f = ae(He, null), p = (a(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = de(l), g = d(null), { showLinkDialog: _, linkUrl: v, linkDialogRef: y, openLinkDialog: b, insertLink: x, removeLink: S, closeLinkDialog: C, handleLinkKeydown: w } = hn(g), { start: T, stop: E } = Re(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ee = d(null), D = h(!0), O = h(null), k = !1;
1327
+ function Sn(e) {
1328
+ let t = P(Qe, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = mt(), f = P(Ve, null), p = (a(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = ue(l), g = d(null), { showLinkDialog: _, linkUrl: v, linkDialogRef: y, openLinkDialog: b, insertLink: x, removeLink: S, closeLinkDialog: C, handleLinkKeydown: w } = xn(g), { start: T, stop: E } = Le(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ee = d(null), D = h(!0), O = h(null), k = !1;
1239
1329
  async function te() {
1240
1330
  O.value = null, D.value = !0;
1241
1331
  try {
@@ -1265,7 +1355,7 @@ function gn(e) {
1265
1355
  g.value = s, D.value = !1, T();
1266
1356
  } catch (t) {
1267
1357
  if (k) return;
1268
- Pt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), O.value = t instanceof Error ? t.message : "Failed to load editor", D.value = !1;
1358
+ Bt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), O.value = t instanceof Error ? t.message : "Failed to load editor", D.value = !1;
1269
1359
  }
1270
1360
  }
1271
1361
  function A() {
@@ -1280,7 +1370,7 @@ function gn(e) {
1280
1370
  let n = t.composedPath().find((e) => e instanceof HTMLElement);
1281
1371
  n && (e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone());
1282
1372
  }
1283
- Le(document, "mousedown", re), n(() => {
1373
+ Ie(document, "mousedown", re), n(() => {
1284
1374
  k = !0, ne(), E(), g.value?.destroy();
1285
1375
  });
1286
1376
  async function j() {
@@ -1313,20 +1403,20 @@ function gn(e) {
1313
1403
  }
1314
1404
  //#endregion
1315
1405
  //#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
1316
- var _n = { class: "tpl:w-full" }, vn = {
1406
+ var Cn = { class: "tpl:w-full" }, wn = {
1317
1407
  key: 0,
1318
1408
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
1319
- }, yn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, bn = {
1409
+ }, Tn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, En = {
1320
1410
  key: 1,
1321
1411
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
1322
- }, xn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Sn = {
1412
+ }, Dn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, On = {
1323
1413
  key: 2,
1324
1414
  class: "tpl:relative"
1325
- }, Cn = ["innerHTML"], wn = {
1415
+ }, kn = ["innerHTML"], An = {
1326
1416
  key: 0,
1327
1417
  class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
1328
1418
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
1329
- }, Tn = /* @__PURE__ */ y({
1419
+ }, jn = /* @__PURE__ */ y({
1330
1420
  __name: "CustomBlock",
1331
1421
  props: {
1332
1422
  block: {},
@@ -1334,7 +1424,7 @@ var _n = { class: "tpl:w-full" }, vn = {
1334
1424
  },
1335
1425
  emits: ["fetchData"],
1336
1426
  setup(t, { emit: n }) {
1337
- let r = t, i = n, { t: a } = lt(), o = ae(rt, null), c = h(""), l = h(!1), d = x(() => o?.getDefinition(r.block.customType)), f = x(() => !!d.value), { isFetching: p, fetch: m, needsFetch: g, hasDataSource: v } = wt({
1427
+ let r = t, i = n, { t: a } = ct(), o = P(nt, null), c = h(""), l = h(!1), d = x(() => o?.getDefinition(r.block.customType)), f = x(() => !!d.value), { isFetching: p, fetch: m, needsFetch: g, hasDataSource: v } = Et({
1338
1428
  definition: d,
1339
1429
  block: x(() => r.block),
1340
1430
  onUpdate: (e, t) => {
@@ -1355,15 +1445,15 @@ var _n = { class: "tpl:w-full" }, vn = {
1355
1445
  }
1356
1446
  }
1357
1447
  }
1358
- let S = Me(y, 150);
1448
+ let S = je(y, 150);
1359
1449
  return u(() => {
1360
1450
  y();
1361
1451
  }), s(() => r.block.fieldValues, () => {
1362
1452
  S();
1363
- }, { deep: !0 }), (t, n) => (e(), w("div", _n, [f.value ? l.value ? (e(), w("div", bn, [N(j(ft), {
1453
+ }, { deep: !0 }), (t, n) => (e(), w("div", Cn, [f.value ? l.value ? (e(), w("div", En, [N(j(dt), {
1364
1454
  size: 24,
1365
1455
  class: "tpl:text-[var(--tpl-danger)]"
1366
- }), C("span", xn, M(j(a).customBlocks.renderError), 1)])) : (e(), w("div", Sn, [C("div", { innerHTML: c.value }, null, 8, Cn), j(v) && j(g) ? (e(), w("div", wn, [j(p) ? (e(), ne(pt, {
1456
+ }), C("span", Dn, M(j(a).customBlocks.renderError), 1)])) : (e(), w("div", On, [C("div", { innerHTML: c.value }, null, 8, kn), j(v) && j(g) ? (e(), w("div", An, [j(p) ? (e(), ne(ft, {
1367
1457
  key: 1,
1368
1458
  class: "tpl:w-48"
1369
1459
  })) : (e(), w("button", {
@@ -1371,16 +1461,16 @@ var _n = { class: "tpl:w-full" }, vn = {
1371
1461
  type: "button",
1372
1462
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
1373
1463
  onClick: n[0] ||= b((...e) => j(m) && j(m)(...e), ["stop"])
1374
- }, [d.value?.icon ? (e(), ne(an, {
1464
+ }, [d.value?.icon ? (e(), ne(dn, {
1375
1465
  key: 0,
1376
1466
  icon: d.value.icon,
1377
1467
  size: 16
1378
- }, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div", vn, [N(j(Qt), {
1468
+ }, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div", wn, [N(j(an), {
1379
1469
  size: 24,
1380
1470
  class: "tpl:text-[var(--tpl-warning)]"
1381
- }), C("span", yn, M(j(a).customBlocks.definitionNotFound), 1)]))]));
1471
+ }), C("span", Tn, M(j(a).customBlocks.definitionNotFound), 1)]))]));
1382
1472
  }
1383
- }), En = { class: "tpl:w-full" }, Dn = /* @__PURE__ */ y({
1473
+ }), Mn = { class: "tpl:w-full" }, Nn = /* @__PURE__ */ y({
1384
1474
  __name: "DividerBlock",
1385
1475
  props: {
1386
1476
  block: {},
@@ -1392,37 +1482,37 @@ var _n = { class: "tpl:w-full" }, vn = {
1392
1482
  width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
1393
1483
  margin: n.block.width === "full" ? "0" : "0 auto"
1394
1484
  }));
1395
- return (t, n) => (e(), w("div", En, [C("hr", {
1485
+ return (t, n) => (e(), w("div", Mn, [C("hr", {
1396
1486
  class: "tpl:m-0 tpl:border-none",
1397
1487
  style: A(r.value)
1398
1488
  }, null, 4)]));
1399
1489
  }
1400
- }), On = { class: "tpl:w-full" }, kn = { class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]" }, An = {
1490
+ }), Pn = { class: "tpl:w-full" }, Fn = { class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]" }, In = {
1401
1491
  key: 0,
1402
1492
  class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
1403
- }, jn = {
1493
+ }, Ln = {
1404
1494
  key: 1,
1405
1495
  class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
1406
- }, Mn = /* @__PURE__ */ y({
1496
+ }, Rn = /* @__PURE__ */ y({
1407
1497
  __name: "HtmlBlock",
1408
1498
  props: {
1409
1499
  block: {},
1410
1500
  viewport: {}
1411
1501
  },
1412
1502
  setup(t) {
1413
- let n = t, { t: r } = lt(), i = x(() => n.block.content.trim().length > 0);
1414
- return (t, n) => (e(), w("div", On, [C("div", kn, [N(j(Gt), {
1503
+ let n = t, { t: r } = ct(), i = x(() => n.block.content.trim().length > 0);
1504
+ return (t, n) => (e(), w("div", Pn, [C("div", Fn, [N(j(Zt), {
1415
1505
  size: 24,
1416
1506
  class: "tpl:text-[var(--tpl-text-dim)]"
1417
- }), i.value ? (e(), w("span", An, M(j(r).html.preview), 1)) : (e(), w("span", jn, M(j(r).html.empty), 1))])]));
1507
+ }), i.value ? (e(), w("span", In, M(j(r).html.preview), 1)) : (e(), w("span", Ln, M(j(r).html.empty), 1))])]));
1418
1508
  }
1419
- }), Nn = ["href"], Pn = ["src", "alt"], Fn = ["src", "alt"], In = {
1509
+ }), zn = ["href"], Bn = ["src", "alt"], Vn = ["src", "alt"], Hn = {
1420
1510
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
1421
1511
  style: { opacity: "0.7" }
1422
- }, Ln = ["href"], Rn = ["src", "alt"], zn = ["src", "alt"], Bn = {
1512
+ }, Un = ["href"], Wn = ["src", "alt"], Gn = ["src", "alt"], Kn = {
1423
1513
  key: 3,
1424
1514
  class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
1425
- }, Vn = ["aria-label"], Hn = { key: 1 }, Un = /* @__PURE__ */ y({
1515
+ }, qn = ["aria-label"], Jn = { key: 1 }, Yn = /* @__PURE__ */ y({
1426
1516
  __name: "ImageBlock",
1427
1517
  props: {
1428
1518
  block: {},
@@ -1430,25 +1520,25 @@ var _n = { class: "tpl:w-full" }, vn = {
1430
1520
  },
1431
1521
  emits: ["update"],
1432
1522
  setup(t, { emit: n }) {
1433
- let r = t, i = n, { t: a } = lt(), { syntax: o } = ht(), s = ae(Ue, null), c = x(() => !!s);
1434
- async function l() {
1523
+ let r = t, i = n, { t: a } = ct(), { syntax: o } = mt(), s = P(He, null), c = x(() => !!s), l = ht();
1524
+ async function u() {
1435
1525
  let e = await s?.({ accept: ["images"] });
1436
- if (e) {
1526
+ if (l.alive && e) {
1437
1527
  let t = { src: e.url };
1438
1528
  e.alt && (t.alt = e.alt), i("update", t);
1439
1529
  }
1440
1530
  }
1441
- let u = x(() => ({ textAlign: r.block.align })), d = x(() => ({
1531
+ let d = x(() => ({ textAlign: r.block.align })), f = x(() => ({
1442
1532
  maxWidth: "100%",
1443
1533
  width: r.block.width === "full" ? "100%" : `${r.block.width}px`,
1444
1534
  display: "block",
1445
1535
  margin: r.block.align === "center" ? "0 auto" : void 0,
1446
1536
  marginLeft: r.block.align === "right" ? "auto" : void 0
1447
- })), f = x(() => pe(r.block.src, o));
1537
+ })), p = x(() => fe(r.block.src, o));
1448
1538
  return (n, r) => (e(), w("div", {
1449
1539
  class: "tpl:w-full",
1450
- style: A(u.value)
1451
- }, [t.block.src && f.value && t.block.placeholderUrl ? (e(), w(D, { key: 0 }, [t.block.linkUrl ? (e(), w("a", {
1540
+ style: A(d.value)
1541
+ }, [t.block.src && p.value && t.block.placeholderUrl ? (e(), w(D, { key: 0 }, [t.block.linkUrl ? (e(), w("a", {
1452
1542
  key: 0,
1453
1543
  href: t.block.linkUrl,
1454
1544
  target: "_blank",
@@ -1459,23 +1549,23 @@ var _n = { class: "tpl:w-full" }, vn = {
1459
1549
  loading: "lazy",
1460
1550
  src: t.block.placeholderUrl,
1461
1551
  alt: t.block.alt || j(a).image.altTextPlaceholder,
1462
- style: A(d.value)
1463
- }, null, 12, Pn)], 8, Nn)) : (e(), w("img", {
1552
+ style: A(f.value)
1553
+ }, null, 12, Bn)], 8, zn)) : (e(), w("img", {
1464
1554
  key: 1,
1465
1555
  class: "tpl:border-0",
1466
1556
  src: t.block.placeholderUrl,
1467
1557
  alt: t.block.alt,
1468
- style: A(d.value)
1469
- }, null, 12, Fn))], 64)) : t.block.src && f.value ? (e(), w("div", {
1558
+ style: A(f.value)
1559
+ }, null, 12, Vn))], 64)) : t.block.src && p.value ? (e(), w("div", {
1470
1560
  key: 1,
1471
1561
  class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
1472
- style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
1473
- }, [N(j(Xt), {
1562
+ style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, f.value])
1563
+ }, [N(j(nn), {
1474
1564
  size: 32,
1475
1565
  "stroke-width": 1.5,
1476
1566
  class: "tpl:text-[var(--tpl-primary)]",
1477
1567
  style: { opacity: "0.5" }
1478
- }), C("span", In, M(t.block.src), 1)], 4)) : t.block.src ? (e(), w(D, { key: 2 }, [t.block.linkUrl ? (e(), w("a", {
1568
+ }), C("span", Hn, M(t.block.src), 1)], 4)) : t.block.src ? (e(), w(D, { key: 2 }, [t.block.linkUrl ? (e(), w("a", {
1479
1569
  key: 0,
1480
1570
  href: t.block.linkUrl,
1481
1571
  target: "_blank",
@@ -1486,34 +1576,34 @@ var _n = { class: "tpl:w-full" }, vn = {
1486
1576
  loading: "lazy",
1487
1577
  src: t.block.src,
1488
1578
  alt: t.block.alt || j(a).image.altTextPlaceholder,
1489
- style: A(d.value)
1490
- }, null, 12, Rn)], 8, Ln)) : (e(), w("img", {
1579
+ style: A(f.value)
1580
+ }, null, 12, Wn)], 8, Un)) : (e(), w("img", {
1491
1581
  key: 1,
1492
1582
  class: "tpl:border-0",
1493
1583
  src: t.block.src,
1494
1584
  alt: t.block.alt,
1495
- style: A(d.value)
1496
- }, null, 12, zn))], 64)) : (e(), w("div", Bn, [c.value ? (e(), w("button", {
1585
+ style: A(f.value)
1586
+ }, null, 12, Gn))], 64)) : (e(), w("div", Kn, [c.value ? (e(), w("button", {
1497
1587
  key: 0,
1498
1588
  "aria-label": j(a).image.browseMedia,
1499
1589
  class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
1500
- onClick: b(l, ["stop"])
1501
- }, [N(j(Xt), {
1590
+ onClick: b(u, ["stop"])
1591
+ }, [N(j(nn), {
1502
1592
  size: 14,
1503
1593
  "stroke-width": 1.5
1504
- }), _(" " + M(j(a).image.browseMedia), 1)], 8, Vn)) : (e(), w("span", Hn, M(j(a).image.clickToAdd), 1))]))], 4));
1594
+ }), _(" " + M(j(a).image.browseMedia), 1)], 8, qn)) : (e(), w("span", Jn, M(j(a).image.clickToAdd), 1))]))], 4));
1505
1595
  }
1506
- }), Wn = { class: "tpl:w-full" }, Gn = ["href"], Kn = {
1596
+ }), Xn = { class: "tpl:w-full" }, Zn = ["href"], Qn = {
1507
1597
  key: 1,
1508
1598
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
1509
- }, qn = /* @__PURE__ */ y({
1599
+ }, $n = /* @__PURE__ */ y({
1510
1600
  __name: "MenuBlock",
1511
1601
  props: {
1512
1602
  block: {},
1513
1603
  viewport: {}
1514
1604
  },
1515
1605
  setup(t) {
1516
- let n = t, { t: r } = lt(), i = x(() => ({
1606
+ let n = t, { t: r } = ct(), i = x(() => ({
1517
1607
  display: "flex",
1518
1608
  flexWrap: "wrap",
1519
1609
  gap: `0 ${n.block.spacing}px`,
@@ -1525,7 +1615,7 @@ var _n = { class: "tpl:w-full" }, vn = {
1525
1615
  function o(e) {
1526
1616
  return e || n.block.linkColor || n.block.color;
1527
1617
  }
1528
- return (n, s) => (e(), w("div", Wn, [a.value ? (e(), w("div", {
1618
+ return (n, s) => (e(), w("div", Xn, [a.value ? (e(), w("div", {
1529
1619
  key: 0,
1530
1620
  style: A(i.value)
1531
1621
  }, [(e(!0), w(D, null, c(t.block.items, (n, r) => (e(), w(D, { key: n.id }, [C("a", {
@@ -1537,19 +1627,87 @@ var _n = { class: "tpl:w-full" }, vn = {
1537
1627
  textDecoration: n.underline ? "underline" : "none"
1538
1628
  }),
1539
1629
  onClick: s[0] ||= b(() => {}, ["prevent"])
1540
- }, M(n.text || "..."), 13, Gn), r < t.block.items.length - 1 ? (e(), w("span", {
1630
+ }, M(n.text || "..."), 13, Zn), r < t.block.items.length - 1 ? (e(), w("span", {
1541
1631
  key: 0,
1542
1632
  style: A({
1543
1633
  color: t.block.separatorColor,
1544
1634
  padding: `0 ${t.block.spacing}px`
1545
1635
  })
1546
- }, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div", Kn, [N(j(Zt), { size: 16 }), C("span", null, M(j(r).menu.addLinks), 1)]))]));
1636
+ }, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div", Qn, [N(j(rn), { size: 16 }), C("span", null, M(j(r).menu.addLinks), 1)]))]));
1637
+ }
1638
+ }), er = new Set([
1639
+ "http",
1640
+ "https",
1641
+ "mailto",
1642
+ "tel",
1643
+ "ftp",
1644
+ "ftps",
1645
+ "sms",
1646
+ "xmpp",
1647
+ "cid"
1648
+ ]), tr = new Set([
1649
+ "SCRIPT",
1650
+ "STYLE",
1651
+ "IFRAME",
1652
+ "OBJECT",
1653
+ "EMBED",
1654
+ "LINK",
1655
+ "META",
1656
+ "BASE",
1657
+ "FORM"
1658
+ ]), nr = new Set([
1659
+ "href",
1660
+ "xlink:href",
1661
+ "formaction",
1662
+ "action",
1663
+ "ping",
1664
+ "background",
1665
+ "poster"
1666
+ ]);
1667
+ function rr(e, t) {
1668
+ let n = e.trim();
1669
+ if (!n || n.startsWith("#")) return !0;
1670
+ let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
1671
+ if (!r) return !0;
1672
+ let i = r[1].toLowerCase();
1673
+ return er.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
1674
+ }
1675
+ function ir(e) {
1676
+ if (tr.has(e.tagName)) {
1677
+ e.remove();
1678
+ return;
1547
1679
  }
1548
- });
1680
+ let t = [];
1681
+ for (let n = 0; n < e.attributes.length; n++) t.push(e.attributes[n].name);
1682
+ for (let n of t) {
1683
+ let t = n.toLowerCase();
1684
+ if (t.startsWith("on")) {
1685
+ e.removeAttribute(n);
1686
+ continue;
1687
+ }
1688
+ if (nr.has(t)) {
1689
+ rr(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
1690
+ continue;
1691
+ }
1692
+ if (t === "src") {
1693
+ rr(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
1694
+ continue;
1695
+ }
1696
+ t === "srcdoc" && e.removeAttribute(n);
1697
+ }
1698
+ let n = Array.from(e.children);
1699
+ for (let e of n) ir(e);
1700
+ }
1701
+ function ar(e) {
1702
+ if (typeof DOMParser > "u") return e;
1703
+ let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
1704
+ for (let e of n) ir(e);
1705
+ return t.innerHTML;
1706
+ }
1549
1707
  //#endregion
1550
1708
  //#region src/composables/useEditableTextBlock.ts
1551
- function Jn(e) {
1552
- let t = ae(ct, []), { syntax: n } = ht(), r = x(() => xe(le(e(), t), n)), i = h(!1), a = h(null), { top: o, left: s } = Ie(a), c = x(() => ({
1709
+ function or(e) {
1710
+ let t = P(st, []), { syntax: n } = mt(), r = x(() => ar(be(ce(e(), t), n))), i = h(!1), a = h(null), { top: o, left: s } = Fe(a), c = x(() => ({
1553
1711
  top: o.value - 8,
1554
1712
  left: s.value
1555
1713
  }));
@@ -1570,14 +1728,14 @@ function Jn(e) {
1570
1728
  }
1571
1729
  //#endregion
1572
1730
  //#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
1573
- var Yn = ["innerHTML"], Xn = /* @__PURE__ */ y({
1731
+ var sr = ["innerHTML"], cr = /* @__PURE__ */ y({
1574
1732
  __name: "ParagraphBlock",
1575
1733
  props: {
1576
1734
  block: {},
1577
1735
  viewport: {}
1578
1736
  },
1579
1737
  setup(t) {
1580
- let n = t, r = se(() => import("./ParagraphEditor-BRQTNDFO.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Jn(() => n.block.content);
1738
+ let n = t, r = oe(() => import("./ParagraphEditor-DC2jOjNh.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = or(() => n.block.content);
1581
1739
  return (n, u) => (e(), w("div", {
1582
1740
  ref_key: "blockRef",
1583
1741
  ref: a,
@@ -1596,19 +1754,19 @@ var Yn = ["innerHTML"], Xn = /* @__PURE__ */ y({
1596
1754
  key: 1,
1597
1755
  class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
1598
1756
  innerHTML: j(s)
1599
- }, null, 8, Yn))], 544));
1757
+ }, null, 8, sr))], 544));
1600
1758
  }
1601
1759
  });
1602
1760
  //#endregion
1603
1761
  //#region src/utils/blockComponentResolver.ts
1604
- function Zn(e, t, n) {
1762
+ function lr(e, t, n) {
1605
1763
  if (t) {
1606
1764
  let n = t.getComponent(e);
1607
1765
  if (n) return n;
1608
1766
  }
1609
1767
  return n[e.type] ?? null;
1610
1768
  }
1611
- function Qn(e) {
1769
+ function ur(e) {
1612
1770
  let { padding: t, margin: n, backgroundColor: r } = e.styles;
1613
1771
  return {
1614
1772
  padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
@@ -1618,20 +1776,20 @@ function Qn(e) {
1618
1776
  }
1619
1777
  //#endregion
1620
1778
  //#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
1621
- var $n = ["data-block-id", "data-block-type"], er = ["aria-label"], tr = [
1779
+ var dr = ["data-block-id", "data-block-type"], fr = ["aria-label"], pr = [
1622
1780
  "aria-label",
1623
1781
  "aria-pressed",
1624
1782
  "title"
1625
- ], nr = ["aria-label", "title"], rr = ["aria-label", "title"], ir = ["aria-label", "title"], ar = {
1783
+ ], mr = ["aria-label", "title"], hr = ["aria-label", "title"], gr = ["aria-label", "title"], _r = {
1626
1784
  key: 1,
1627
1785
  class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
1628
- }, or = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, sr = {
1786
+ }, vr = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, yr = {
1629
1787
  key: 2,
1630
1788
  class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
1631
- }, cr = ["aria-label", "title"], lr = {
1789
+ }, br = ["aria-label", "title"], xr = {
1632
1790
  key: 3,
1633
1791
  class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
1634
- }, ur = ["aria-label"], dr = /* @__PURE__ */ mt(/* @__PURE__ */ y({
1792
+ }, Sr = ["aria-label"], Cr = /* @__PURE__ */ pt(/* @__PURE__ */ y({
1635
1793
  __name: "BlockWrapper",
1636
1794
  props: {
1637
1795
  block: {},
@@ -1641,7 +1799,7 @@ var $n = ["data-block-id", "data-block-type"], er = ["aria-label"], tr = [
1641
1799
  },
1642
1800
  emits: ["select"],
1643
1801
  setup(t, { emit: n }) {
1644
- let i = se(() => import("./BlockA11yBadge-BFIw0h1m.js")), a = t, o = n, { t: s, format: c } = lt(), u = ae(at, null), d = h(null), f = x(() => u?.liftedBlockId.value === a.block.id), p = x(() => f.value ? c(s.blockActions.dragLifted, { block: a.block.type }) : s.blockActions.drag);
1802
+ let i = oe(() => import("./BlockA11yBadge-BhyoMZJ9.js")), a = t, o = n, { t: s, format: c } = ct(), u = P(it, null), d = h(null), f = x(() => u?.liftedBlockId.value === a.block.id), p = x(() => f.value ? c(s.blockActions.dragLifted, { block: a.block.type }) : s.blockActions.drag);
1645
1803
  async function m() {
1646
1804
  await r(), d.value?.focus();
1647
1805
  }
@@ -1668,14 +1826,20 @@ var $n = ["data-block-id", "data-block-type"], er = ["aria-label"], tr = [
1668
1826
  desktop: s.viewport.desktop,
1669
1827
  tablet: s.viewport.tablet,
1670
1828
  mobile: s.viewport.mobile
1671
- }[a.viewport] ?? a.viewport : ""), T = x(() => !!a.block.displayCondition), E = ae(Ge, null), ee = ae(Je, null), D = ae(qe, {}), k = x(() => !!D.savedModules), te = x(() => D.comments?.getBlockCount(a.block.id) ?? 0), ne = x(() => Qn(a.block));
1672
- function re(e) {
1829
+ }[a.viewport] ?? a.viewport : ""), T = x(() => !!a.block.displayCondition), E = P(We, null), ee = P(qe, null), D = P(Ke, {}), k = x(() => !!D.savedModules), te = x(() => D.comments?.getBlockCount(a.block.id) ?? 0), ne = x(() => ({ margin: ur(a.block).margin })), re = x(() => {
1830
+ let e = ur(a.block);
1831
+ return {
1832
+ padding: e.padding,
1833
+ backgroundColor: e.backgroundColor
1834
+ };
1835
+ });
1836
+ function ie(e) {
1673
1837
  a.previewMode || (e.stopPropagation(), o("select"));
1674
1838
  }
1675
- function ie() {
1839
+ function ae() {
1676
1840
  E?.deleteBlock(a.block.id);
1677
1841
  }
1678
- function oe() {
1842
+ function se() {
1679
1843
  E?.duplicateBlock(a.block);
1680
1844
  }
1681
1845
  function ce() {
@@ -1693,8 +1857,7 @@ var $n = ["data-block-id", "data-block-type"], er = ["aria-label"], tr = [
1693
1857
  style: A(ne.value),
1694
1858
  "data-block-id": t.block.id,
1695
1859
  "data-block-type": t.block.type,
1696
- draggable: "false",
1697
- onClick: re
1860
+ onClick: ie
1698
1861
  }, [
1699
1862
  N(j(i), { "block-id": t.block.id }, null, 8, ["block-id"]),
1700
1863
  t.isSelected ? (e(), w("div", {
@@ -1712,87 +1875,90 @@ var $n = ["data-block-id", "data-block-type"], er = ["aria-label"], tr = [
1712
1875
  "aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
1713
1876
  title: j(s).blockActions.drag,
1714
1877
  onKeydown: g
1715
- }, [N(j(Yt), {
1878
+ }, [N(j(tn), {
1716
1879
  size: 14,
1717
1880
  "stroke-width": 1.5
1718
- })], 40, tr),
1881
+ })], 40, pr),
1719
1882
  C("button", {
1720
1883
  class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
1721
1884
  "aria-label": j(s).blockActions.duplicate,
1722
1885
  title: j(s).blockActions.duplicate,
1723
- onClick: b(oe, ["stop"])
1724
- }, [N(j(Kt), {
1886
+ onClick: b(se, ["stop"])
1887
+ }, [N(j(Qt), {
1725
1888
  size: 14,
1726
1889
  "stroke-width": 1.5
1727
- })], 8, nr),
1890
+ })], 8, mr),
1728
1891
  k.value ? (e(), w("button", {
1729
1892
  key: 0,
1730
1893
  class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
1731
1894
  "aria-label": j(s).blockActions.saveAsModule,
1732
1895
  title: j(s).blockActions.saveAsModule,
1733
1896
  onClick: b(ce, ["stop"])
1734
- }, [N(j(Ut), {
1897
+ }, [N(j(Yt), {
1735
1898
  size: 14,
1736
1899
  "stroke-width": 1.5
1737
- })], 8, rr)) : O("", !0),
1900
+ })], 8, hr)) : O("", !0),
1738
1901
  C("button", {
1739
1902
  class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
1740
1903
  "aria-label": j(s).blockActions.delete,
1741
1904
  title: j(s).blockActions.delete,
1742
- onClick: b(ie, ["stop"])
1743
- }, [N(j(dt), {
1905
+ onClick: b(ae, ["stop"])
1906
+ }, [N(j(ut), {
1744
1907
  size: 14,
1745
1908
  "stroke-width": 1.5
1746
- })], 8, ir)
1747
- ], 8, er)) : O("", !0),
1748
- y.value ? (e(), w("div", ar, [C("span", or, [N(j(qt), {
1909
+ })], 8, gr)
1910
+ ], 8, fr)) : O("", !0),
1911
+ y.value ? (e(), w("div", _r, [C("span", vr, [N(j($t), {
1749
1912
  size: 12,
1750
1913
  "stroke-width": 1.5
1751
1914
  }), _(" " + M(j(c)(j(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : O("", !0),
1752
- T.value && !y.value ? (e(), w("div", sr, [C("button", {
1915
+ T.value && !y.value ? (e(), w("div", yr, [C("button", {
1753
1916
  class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
1754
1917
  "aria-label": j(s).blockActions.conditionToggle,
1755
1918
  title: t.block.displayCondition?.label,
1756
1919
  onClick: b(le, ["stop"])
1757
- }, [N(j(Jt), {
1920
+ }, [N(j(en), {
1758
1921
  size: 12,
1759
1922
  "stroke-width": 2
1760
- })], 8, cr)])) : O("", !0),
1761
- te.value > 0 && !y.value ? (e(), w("div", lr, [C("button", {
1923
+ })], 8, br)])) : O("", !0),
1924
+ te.value > 0 && !y.value ? (e(), w("div", xr, [C("button", {
1762
1925
  class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]",
1763
1926
  "aria-label": j(c)(j(s).blockActions.comments, { count: String(te.value) }),
1764
1927
  onClick: r[0] ||= b((e) => j(D).comments?.openForBlock(t.block.id), ["stop"])
1765
- }, [N(j(ut), {
1928
+ }, [N(j(lt), {
1766
1929
  size: 12,
1767
1930
  "stroke-width": 2.5
1768
- }), _(" " + M(te.value), 1)], 8, ur)])) : O("", !0),
1769
- l(n.$slots, "default", {}, void 0, !0)
1770
- ], 14, $n));
1771
- }
1772
- }), [["__scopeId", "data-v-850614e7"]]);
1931
+ }), _(" " + M(te.value), 1)], 8, Sr)])) : O("", !0),
1932
+ C("div", {
1933
+ class: "tpl-block-content",
1934
+ style: A(re.value)
1935
+ }, [l(n.$slots, "default", {}, void 0, !0)], 4)
1936
+ ], 14, dr));
1937
+ }
1938
+ }), [["__scopeId", "data-v-7333e8d7"]]);
1773
1939
  //#endregion
1774
1940
  //#region src/utils/unwrapParagraph.ts
1775
- function fr(e) {
1941
+ function wr(e) {
1776
1942
  let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
1777
1943
  return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
1778
1944
  }
1779
1945
  //#endregion
1780
1946
  //#region src/components/blocks/TitleBlock.vue
1781
- var pr = /* @__PURE__ */ y({
1947
+ var Tr = /* @__PURE__ */ y({
1782
1948
  __name: "TitleBlock",
1783
1949
  props: {
1784
1950
  block: {},
1785
1951
  viewport: {}
1786
1952
  },
1787
1953
  setup(t) {
1788
- let n = t, r = se(() => import("./TitleEditor-DhFTYzrw.js")), { isEditing: a, blockRef: o, toolbarPosition: s, resolvedContent: c, handleDoubleClick: l, handleEditorDone: u } = Jn(() => n.block.content), d = x(() => {
1954
+ let n = t, r = oe(() => import("./TitleEditor-DnH3yyTr.js")), { isEditing: a, blockRef: o, toolbarPosition: s, resolvedContent: c, handleDoubleClick: l, handleEditorDone: u } = or(() => n.block.content), d = x(() => {
1789
1955
  let e = {
1790
- fontSize: `${De[n.block.level]}px`,
1956
+ fontSize: `${Ee[n.block.level]}px`,
1791
1957
  color: n.block.color,
1792
1958
  textAlign: n.block.textAlign
1793
1959
  };
1794
1960
  return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
1795
- }), f = x(() => `h${n.block.level}`), p = x(() => fr(c.value));
1961
+ }), f = x(() => `h${n.block.level}`), p = x(() => wr(c.value));
1796
1962
  return (n, c) => (e(), w("div", {
1797
1963
  ref_key: "blockRef",
1798
1964
  ref: o,
@@ -1815,83 +1981,83 @@ var pr = /* @__PURE__ */ y({
1815
1981
  innerHTML: p.value
1816
1982
  }, null, 8, ["innerHTML"]))], 36));
1817
1983
  }
1818
- }), mr = Object.defineProperty, hr = Object.getOwnPropertySymbols, gr = Object.prototype.hasOwnProperty, _r = Object.prototype.propertyIsEnumerable, vr = (e, t, n) => t in e ? mr(e, t, {
1984
+ }), Er = Object.defineProperty, Dr = Object.getOwnPropertySymbols, Or = Object.prototype.hasOwnProperty, kr = Object.prototype.propertyIsEnumerable, Ar = (e, t, n) => t in e ? Er(e, t, {
1819
1985
  enumerable: !0,
1820
1986
  configurable: !0,
1821
1987
  writable: !0,
1822
1988
  value: n
1823
- }) : e[t] = n, yr = (e, t) => {
1824
- for (var n in t ||= {}) gr.call(t, n) && vr(e, n, t[n]);
1825
- if (hr) for (var n of hr(t)) _r.call(t, n) && vr(e, n, t[n]);
1989
+ }) : e[t] = n, jr = (e, t) => {
1990
+ for (var n in t ||= {}) Or.call(t, n) && Ar(e, n, t[n]);
1991
+ if (Dr) for (var n of Dr(t)) kr.call(t, n) && Ar(e, n, t[n]);
1826
1992
  return e;
1827
- }, br = (e, t) => {
1993
+ }, Mr = (e, t) => {
1828
1994
  var n = {};
1829
- for (var r in e) gr.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
1830
- if (e != null && hr) for (var r of hr(e)) t.indexOf(r) < 0 && _r.call(e, r) && (n[r] = e[r]);
1995
+ for (var r in e) Or.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
1996
+ if (e != null && Dr) for (var r of Dr(e)) t.indexOf(r) < 0 && kr.call(e, r) && (n[r] = e[r]);
1831
1997
  return n;
1832
- }, xr = "[vue-draggable-plus]: ";
1833
- function Sr(e) {
1834
- console.warn(xr + e);
1998
+ }, Nr = "[vue-draggable-plus]: ";
1999
+ function Pr(e) {
2000
+ console.warn(Nr + e);
1835
2001
  }
1836
- function Cr(e) {
1837
- console.error(xr + e);
2002
+ function Fr(e) {
2003
+ console.error(Nr + e);
1838
2004
  }
1839
- function wr(e, t, n) {
2005
+ function Ir(e, t, n) {
1840
2006
  return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
1841
2007
  }
1842
- function Tr(e) {
2008
+ function Lr(e) {
1843
2009
  return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
1844
2010
  }
1845
- function Er(e) {
1846
- return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Tr(n)] = e[n]), t), {});
2011
+ function Rr(e) {
2012
+ return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Lr(n)] = e[n]), t), {});
1847
2013
  }
1848
- function Dr(e, t) {
2014
+ function zr(e, t) {
1849
2015
  return Array.isArray(e) && e.splice(t, 1), e;
1850
2016
  }
1851
- function Or(e, t, n) {
2017
+ function Br(e, t, n) {
1852
2018
  return Array.isArray(e) && e.splice(t, 0, n), e;
1853
2019
  }
1854
- function kr(e) {
2020
+ function Vr(e) {
1855
2021
  return e === void 0;
1856
2022
  }
1857
- function Ar(e) {
2023
+ function Hr(e) {
1858
2024
  return typeof e == "string";
1859
2025
  }
1860
- function jr(e, t, n) {
2026
+ function Ur(e, t, n) {
1861
2027
  let r = e.children[n];
1862
2028
  e.insertBefore(t, r);
1863
2029
  }
1864
- function Mr(e) {
2030
+ function Wr(e) {
1865
2031
  e.parentNode && e.parentNode.removeChild(e);
1866
2032
  }
1867
- function Nr(e, t = document) {
2033
+ function Gr(e, t = document) {
1868
2034
  let n = null;
1869
- return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Sr(`Element not found: ${e}`), n;
2035
+ return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Pr(`Element not found: ${e}`), n;
1870
2036
  }
1871
- function Pr(e, t, n = null) {
2037
+ function Kr(e, t, n = null) {
1872
2038
  return function(...r) {
1873
2039
  return e.apply(n, r), t.apply(n, r);
1874
2040
  };
1875
2041
  }
1876
- function Fr(e, t) {
1877
- let n = yr({}, e);
2042
+ function qr(e, t) {
2043
+ let n = jr({}, e);
1878
2044
  return Object.keys(t).forEach((r) => {
1879
- n[r] ? n[r] = Pr(e[r], t[r]) : n[r] = t[r];
2045
+ n[r] ? n[r] = Kr(e[r], t[r]) : n[r] = t[r];
1880
2046
  }), n;
1881
2047
  }
1882
- function Ir(e) {
2048
+ function Jr(e) {
1883
2049
  return e instanceof HTMLElement;
1884
2050
  }
1885
- function Lr(e, t) {
2051
+ function Yr(e, t) {
1886
2052
  Object.keys(e).forEach((n) => {
1887
2053
  t(n, e[n]);
1888
2054
  });
1889
2055
  }
1890
- function Rr(e) {
2056
+ function Xr(e) {
1891
2057
  return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
1892
2058
  }
1893
- var zr = Object.assign;
1894
- function Br(e, t) {
2059
+ var Zr = Object.assign;
2060
+ function Qr(e, t) {
1895
2061
  var n = Object.keys(e);
1896
2062
  if (Object.getOwnPropertySymbols) {
1897
2063
  var r = Object.getOwnPropertySymbols(e);
@@ -1901,26 +2067,26 @@ function Br(e, t) {
1901
2067
  }
1902
2068
  return n;
1903
2069
  }
1904
- function Vr(e) {
2070
+ function $r(e) {
1905
2071
  for (var t = 1; t < arguments.length; t++) {
1906
2072
  var n = arguments[t] == null ? {} : arguments[t];
1907
- t % 2 ? Br(Object(n), !0).forEach(function(t) {
1908
- Ur(e, t, n[t]);
1909
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Br(Object(n)).forEach(function(t) {
2073
+ t % 2 ? Qr(Object(n), !0).forEach(function(t) {
2074
+ ti(e, t, n[t]);
2075
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Qr(Object(n)).forEach(function(t) {
1910
2076
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
1911
2077
  });
1912
2078
  }
1913
2079
  return e;
1914
2080
  }
1915
- function Hr(e) {
2081
+ function ei(e) {
1916
2082
  "@babel/helpers - typeof";
1917
- return Hr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2083
+ return ei = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
1918
2084
  return typeof e;
1919
2085
  } : function(e) {
1920
2086
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1921
- }, Hr(e);
2087
+ }, ei(e);
1922
2088
  }
1923
- function Ur(e, t, n) {
2089
+ function ti(e, t, n) {
1924
2090
  return t in e ? Object.defineProperty(e, t, {
1925
2091
  value: n,
1926
2092
  enumerable: !0,
@@ -1928,45 +2094,45 @@ function Ur(e, t, n) {
1928
2094
  writable: !0
1929
2095
  }) : e[t] = n, e;
1930
2096
  }
1931
- function Wr() {
1932
- return Wr = Object.assign || function(e) {
2097
+ function ni() {
2098
+ return ni = Object.assign || function(e) {
1933
2099
  for (var t = 1; t < arguments.length; t++) {
1934
2100
  var n = arguments[t];
1935
2101
  for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
1936
2102
  }
1937
2103
  return e;
1938
- }, Wr.apply(this, arguments);
2104
+ }, ni.apply(this, arguments);
1939
2105
  }
1940
- function Gr(e, t) {
2106
+ function ri(e, t) {
1941
2107
  if (e == null) return {};
1942
2108
  var n = {}, r = Object.keys(e), i, a;
1943
2109
  for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
1944
2110
  return n;
1945
2111
  }
1946
- function Kr(e, t) {
2112
+ function ii(e, t) {
1947
2113
  if (e == null) return {};
1948
- var n = Gr(e, t), r, i;
2114
+ var n = ri(e, t), r, i;
1949
2115
  if (Object.getOwnPropertySymbols) {
1950
2116
  var a = Object.getOwnPropertySymbols(e);
1951
2117
  for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
1952
2118
  }
1953
2119
  return n;
1954
2120
  }
1955
- var qr = "1.15.2";
1956
- function Jr(e) {
2121
+ var ai = "1.15.2";
2122
+ function oi(e) {
1957
2123
  if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
1958
2124
  }
1959
- var Yr = Jr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Xr = Jr(/Edge/i), Zr = Jr(/firefox/i), Qr = Jr(/safari/i) && !Jr(/chrome/i) && !Jr(/android/i), $r = Jr(/iP(ad|od|hone)/i), ei = Jr(/chrome/i) && Jr(/android/i), ti = {
2125
+ var si = oi(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ci = oi(/Edge/i), li = oi(/firefox/i), ui = oi(/safari/i) && !oi(/chrome/i) && !oi(/android/i), di = oi(/iP(ad|od|hone)/i), fi = oi(/chrome/i) && oi(/android/i), pi = {
1960
2126
  capture: !1,
1961
2127
  passive: !1
1962
2128
  };
1963
- function F(e, t, n) {
1964
- e.addEventListener(t, n, !Yr && ti);
1965
- }
1966
2129
  function I(e, t, n) {
1967
- e.removeEventListener(t, n, !Yr && ti);
2130
+ e.addEventListener(t, n, !si && pi);
2131
+ }
2132
+ function L(e, t, n) {
2133
+ e.removeEventListener(t, n, !si && pi);
1968
2134
  }
1969
- function ni(e, t) {
2135
+ function mi(e, t) {
1970
2136
  if (t) {
1971
2137
  if (t[0] === ">" && (t = t.substring(1)), e) try {
1972
2138
  if (e.matches) return e.matches(t);
@@ -1978,41 +2144,41 @@ function ni(e, t) {
1978
2144
  return !1;
1979
2145
  }
1980
2146
  }
1981
- function ri(e) {
2147
+ function hi(e) {
1982
2148
  return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
1983
2149
  }
1984
- function ii(e, t, n, r) {
2150
+ function gi(e, t, n, r) {
1985
2151
  if (e) {
1986
2152
  n ||= document;
1987
2153
  do {
1988
- if (t != null && (t[0] === ">" ? e.parentNode === n && ni(e, t) : ni(e, t)) || r && e === n) return e;
2154
+ if (t != null && (t[0] === ">" ? e.parentNode === n && mi(e, t) : mi(e, t)) || r && e === n) return e;
1989
2155
  if (e === n) break;
1990
- } while (e = ri(e));
2156
+ } while (e = hi(e));
1991
2157
  }
1992
2158
  return null;
1993
2159
  }
1994
- var ai = /\s+/g;
1995
- function L(e, t, n) {
1996
- e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(ai, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(ai, " "));
1997
- }
2160
+ var _i = /\s+/g;
1998
2161
  function R(e, t, n) {
2162
+ e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(_i, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(_i, " "));
2163
+ }
2164
+ function z(e, t, n) {
1999
2165
  var r = e && e.style;
2000
2166
  if (r) {
2001
2167
  if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
2002
2168
  !(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
2003
2169
  }
2004
2170
  }
2005
- function oi(e, t) {
2171
+ function vi(e, t) {
2006
2172
  var n = "";
2007
2173
  if (typeof e == "string") n = e;
2008
2174
  else do {
2009
- var r = R(e, "transform");
2175
+ var r = z(e, "transform");
2010
2176
  r && r !== "none" && (n = r + " " + n);
2011
2177
  } while (!t && (e = e.parentNode));
2012
2178
  var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
2013
2179
  return i && new i(n);
2014
2180
  }
2015
- function si(e, t, n) {
2181
+ function yi(e, t, n) {
2016
2182
  if (e) {
2017
2183
  var r = e.getElementsByTagName(t), i = 0, a = r.length;
2018
2184
  if (n) for (; i < a; i++) n(r[i], i);
@@ -2020,21 +2186,21 @@ function si(e, t, n) {
2020
2186
  }
2021
2187
  return [];
2022
2188
  }
2023
- function ci() {
2189
+ function bi() {
2024
2190
  return document.scrollingElement || document.documentElement;
2025
2191
  }
2026
- function z(e, t, n, r, i) {
2192
+ function B(e, t, n, r, i) {
2027
2193
  if (!(!e.getBoundingClientRect && e !== window)) {
2028
2194
  var a, o, s, c, l, u, d;
2029
- if (e !== window && e.parentNode && e !== ci() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !Yr)) do
2030
- if (i && i.getBoundingClientRect && (R(i, "transform") !== "none" || n && R(i, "position") !== "static")) {
2195
+ if (e !== window && e.parentNode && e !== bi() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !si)) do
2196
+ if (i && i.getBoundingClientRect && (z(i, "transform") !== "none" || n && z(i, "position") !== "static")) {
2031
2197
  var f = i.getBoundingClientRect();
2032
- o -= f.top + parseInt(R(i, "border-top-width")), s -= f.left + parseInt(R(i, "border-left-width")), c = o + a.height, l = s + a.width;
2198
+ o -= f.top + parseInt(z(i, "border-top-width")), s -= f.left + parseInt(z(i, "border-left-width")), c = o + a.height, l = s + a.width;
2033
2199
  break;
2034
2200
  }
2035
2201
  while (i = i.parentNode);
2036
2202
  if (r && e !== window) {
2037
- var p = oi(i || e), m = p && p.a, h = p && p.d;
2203
+ var p = vi(i || e), m = p && p.a, h = p && p.d;
2038
2204
  p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
2039
2205
  }
2040
2206
  return {
@@ -2047,18 +2213,18 @@ function z(e, t, n, r, i) {
2047
2213
  };
2048
2214
  }
2049
2215
  }
2050
- function li(e, t, n) {
2051
- for (var r = mi(e, !0), i = z(e)[t]; r;) {
2052
- var a = z(r)[n], o = void 0;
2216
+ function xi(e, t, n) {
2217
+ for (var r = Di(e, !0), i = B(e)[t]; r;) {
2218
+ var a = B(r)[n], o = void 0;
2053
2219
  if (o = i >= a, !o) return r;
2054
- if (r === ci()) break;
2055
- r = mi(r, !1);
2220
+ if (r === bi()) break;
2221
+ r = Di(r, !1);
2056
2222
  }
2057
2223
  return !1;
2058
2224
  }
2059
- function ui(e, t, n, r) {
2225
+ function Si(e, t, n, r) {
2060
2226
  for (var i = 0, a = 0, o = e.children; a < o.length;) {
2061
- if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && ii(o[a], n.draggable, e, !1)) {
2227
+ if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && gi(o[a], n.draggable, e, !1)) {
2062
2228
  if (i === t) return o[a];
2063
2229
  i++;
2064
2230
  }
@@ -2066,96 +2232,96 @@ function ui(e, t, n, r) {
2066
2232
  }
2067
2233
  return null;
2068
2234
  }
2069
- function di(e, t) {
2070
- for (var n = e.lastElementChild; n && (n === Q.ghost || R(n, "display") === "none" || t && !ni(n, t));) n = n.previousElementSibling;
2235
+ function Ci(e, t) {
2236
+ for (var n = e.lastElementChild; n && (n === Q.ghost || z(n, "display") === "none" || t && !mi(n, t));) n = n.previousElementSibling;
2071
2237
  return n || null;
2072
2238
  }
2073
- function B(e, t) {
2239
+ function wi(e, t) {
2074
2240
  var n = 0;
2075
2241
  if (!e || !e.parentNode) return -1;
2076
- for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || ni(e, t)) && n++;
2242
+ for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || mi(e, t)) && n++;
2077
2243
  return n;
2078
2244
  }
2079
- function fi(e) {
2080
- var t = 0, n = 0, r = ci();
2245
+ function Ti(e) {
2246
+ var t = 0, n = 0, r = bi();
2081
2247
  if (e) do {
2082
- var i = oi(e), a = i.a, o = i.d;
2248
+ var i = vi(e), a = i.a, o = i.d;
2083
2249
  t += e.scrollLeft * a, n += e.scrollTop * o;
2084
2250
  } while (e !== r && (e = e.parentNode));
2085
2251
  return [t, n];
2086
2252
  }
2087
- function pi(e, t) {
2253
+ function Ei(e, t) {
2088
2254
  for (var n in e) if (e.hasOwnProperty(n)) {
2089
2255
  for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
2090
2256
  }
2091
2257
  return -1;
2092
2258
  }
2093
- function mi(e, t) {
2094
- if (!e || !e.getBoundingClientRect) return ci();
2259
+ function Di(e, t) {
2260
+ if (!e || !e.getBoundingClientRect) return bi();
2095
2261
  var n = e, r = !1;
2096
2262
  do
2097
2263
  if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
2098
- var i = R(n);
2264
+ var i = z(n);
2099
2265
  if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
2100
- if (!n.getBoundingClientRect || n === document.body) return ci();
2266
+ if (!n.getBoundingClientRect || n === document.body) return bi();
2101
2267
  if (r || t) return n;
2102
2268
  r = !0;
2103
2269
  }
2104
2270
  }
2105
2271
  while (n = n.parentNode);
2106
- return ci();
2272
+ return bi();
2107
2273
  }
2108
- function hi(e, t) {
2274
+ function Oi(e, t) {
2109
2275
  if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
2110
2276
  return e;
2111
2277
  }
2112
- function gi(e, t) {
2278
+ function ki(e, t) {
2113
2279
  return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
2114
2280
  }
2115
- var _i;
2116
- function vi(e, t) {
2281
+ var Ai;
2282
+ function ji(e, t) {
2117
2283
  return function() {
2118
- if (!_i) {
2284
+ if (!Ai) {
2119
2285
  var n = arguments, r = this;
2120
- n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), _i = setTimeout(function() {
2121
- _i = void 0;
2286
+ n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Ai = setTimeout(function() {
2287
+ Ai = void 0;
2122
2288
  }, t);
2123
2289
  }
2124
2290
  };
2125
2291
  }
2126
- function yi() {
2127
- clearTimeout(_i), _i = void 0;
2292
+ function Mi() {
2293
+ clearTimeout(Ai), Ai = void 0;
2128
2294
  }
2129
- function bi(e, t, n) {
2295
+ function Ni(e, t, n) {
2130
2296
  e.scrollLeft += t, e.scrollTop += n;
2131
2297
  }
2132
- function xi(e) {
2298
+ function Pi(e) {
2133
2299
  var t = window.Polymer, n = window.jQuery || window.Zepto;
2134
2300
  return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
2135
2301
  }
2136
- function Si(e, t, n) {
2302
+ function Fi(e, t, n) {
2137
2303
  var r = {};
2138
2304
  return Array.from(e.children).forEach(function(i) {
2139
- if (!(!ii(i, t.draggable, e, !1) || i.animated || i === n)) {
2140
- var a = z(i);
2305
+ if (!(!gi(i, t.draggable, e, !1) || i.animated || i === n)) {
2306
+ var a = B(i);
2141
2307
  r.left = Math.min(r.left ?? Infinity, a.left), r.top = Math.min(r.top ?? Infinity, a.top), r.right = Math.max(r.right ?? -Infinity, a.right), r.bottom = Math.max(r.bottom ?? -Infinity, a.bottom);
2142
2308
  }
2143
2309
  }), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
2144
2310
  }
2145
2311
  var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
2146
- function Ci() {
2312
+ function Ii() {
2147
2313
  var e = [], t;
2148
2314
  return {
2149
2315
  captureAnimationState: function() {
2150
2316
  e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
2151
- if (!(R(t, "display") === "none" || t === Q.ghost)) {
2317
+ if (!(z(t, "display") === "none" || t === Q.ghost)) {
2152
2318
  e.push({
2153
2319
  target: t,
2154
- rect: z(t)
2320
+ rect: B(t)
2155
2321
  });
2156
- var n = Vr({}, e[e.length - 1].rect);
2322
+ var n = $r({}, e[e.length - 1].rect);
2157
2323
  if (t.thisAnimationDuration) {
2158
- var r = oi(t, !0);
2324
+ var r = vi(t, !0);
2159
2325
  r && (n.top -= r.f, n.left -= r.e);
2160
2326
  }
2161
2327
  t.fromRect = n;
@@ -2166,7 +2332,7 @@ function Ci() {
2166
2332
  e.push(t);
2167
2333
  },
2168
2334
  removeAnimationState: function(t) {
2169
- e.splice(pi(e, { target: t }), 1);
2335
+ e.splice(Ei(e, { target: t }), 1);
2170
2336
  },
2171
2337
  animateAll: function(n) {
2172
2338
  var r = this;
@@ -2176,8 +2342,8 @@ function Ci() {
2176
2342
  }
2177
2343
  var i = !1, a = 0;
2178
2344
  e.forEach(function(e) {
2179
- var t = 0, n = e.target, o = n.fromRect, s = z(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = oi(n, !0);
2180
- d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && gi(c, s) && !gi(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ti(u, c, l, r.options)), gi(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
2345
+ var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = vi(n, !0);
2346
+ d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && ki(c, s) && !ki(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ri(u, c, l, r.options)), ki(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
2181
2347
  n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
2182
2348
  }, t), n.thisAnimationDuration = t);
2183
2349
  }), clearTimeout(t), i ? t = setTimeout(function() {
@@ -2186,27 +2352,27 @@ function Ci() {
2186
2352
  },
2187
2353
  animate: function(e, t, n, r) {
2188
2354
  if (r) {
2189
- R(e, "transition", ""), R(e, "transform", "");
2190
- var i = oi(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
2191
- e.animatingX = !!s, e.animatingY = !!c, R(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = wi(e), R(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), R(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
2192
- R(e, "transition", ""), R(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
2355
+ z(e, "transition", ""), z(e, "transform", "");
2356
+ var i = vi(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
2357
+ e.animatingX = !!s, e.animatingY = !!c, z(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Li(e), z(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), z(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
2358
+ z(e, "transition", ""), z(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
2193
2359
  }, r);
2194
2360
  }
2195
2361
  }
2196
2362
  };
2197
2363
  }
2198
- function wi(e) {
2364
+ function Li(e) {
2199
2365
  return e.offsetWidth;
2200
2366
  }
2201
- function Ti(e, t, n, r) {
2367
+ function Ri(e, t, n, r) {
2202
2368
  return Math.sqrt((t.top - e.top) ** 2 + (t.left - e.left) ** 2) / Math.sqrt((t.top - n.top) ** 2 + (t.left - n.left) ** 2) * r.animation;
2203
2369
  }
2204
- var Ei = [], Di = { initializeByDefault: !0 }, Oi = {
2370
+ var zi = [], Bi = { initializeByDefault: !0 }, Vi = {
2205
2371
  mount: function(e) {
2206
- for (var t in Di) Di.hasOwnProperty(t) && !(t in e) && (e[t] = Di[t]);
2207
- Ei.forEach(function(t) {
2372
+ for (var t in Bi) Bi.hasOwnProperty(t) && !(t in e) && (e[t] = Bi[t]);
2373
+ zi.forEach(function(t) {
2208
2374
  if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
2209
- }), Ei.push(e);
2375
+ }), zi.push(e);
2210
2376
  },
2211
2377
  pluginEvent: function(e, t, n) {
2212
2378
  var r = this;
@@ -2214,16 +2380,16 @@ var Ei = [], Di = { initializeByDefault: !0 }, Oi = {
2214
2380
  r.eventCanceled = !0;
2215
2381
  };
2216
2382
  var i = e + "Global";
2217
- Ei.forEach(function(r) {
2218
- t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Vr({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Vr({ sortable: t }, n)));
2383
+ zi.forEach(function(r) {
2384
+ t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i]($r({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e]($r({ sortable: t }, n)));
2219
2385
  });
2220
2386
  },
2221
2387
  initializePlugins: function(e, t, n, r) {
2222
- for (var i in Ei.forEach(function(r) {
2388
+ for (var i in zi.forEach(function(r) {
2223
2389
  var i = r.pluginName;
2224
2390
  if (!(!e.options[i] && !r.initializeByDefault)) {
2225
2391
  var a = new r(e, t, e.options);
2226
- a.sortable = e, a.options = e.options, e[i] = a, Wr(n, a.defaults);
2392
+ a.sortable = e, a.options = e.options, e[i] = a, ni(n, a.defaults);
2227
2393
  }
2228
2394
  }), e.options) if (e.options.hasOwnProperty(i)) {
2229
2395
  var a = this.modifyOption(e, i, e.options[i]);
@@ -2232,56 +2398,56 @@ var Ei = [], Di = { initializeByDefault: !0 }, Oi = {
2232
2398
  },
2233
2399
  getEventProperties: function(e, t) {
2234
2400
  var n = {};
2235
- return Ei.forEach(function(r) {
2236
- typeof r.eventProperties == "function" && Wr(n, r.eventProperties.call(t[r.pluginName], e));
2401
+ return zi.forEach(function(r) {
2402
+ typeof r.eventProperties == "function" && ni(n, r.eventProperties.call(t[r.pluginName], e));
2237
2403
  }), n;
2238
2404
  },
2239
2405
  modifyOption: function(e, t, n) {
2240
2406
  var r;
2241
- return Ei.forEach(function(i) {
2407
+ return zi.forEach(function(i) {
2242
2408
  e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
2243
2409
  }), r;
2244
2410
  }
2245
2411
  };
2246
- function ki(e) {
2412
+ function Hi(e) {
2247
2413
  var t = e.sortable, n = e.rootEl, r = e.name, i = e.targetEl, a = e.cloneEl, o = e.toEl, s = e.fromEl, c = e.oldIndex, l = e.newIndex, u = e.oldDraggableIndex, d = e.newDraggableIndex, f = e.originalEvent, p = e.putSortable, m = e.extraEventProperties;
2248
2414
  if (t ||= n && n[V], t) {
2249
2415
  var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
2250
- window.CustomEvent && !Yr && !Xr ? h = new CustomEvent(r, {
2416
+ window.CustomEvent && !si && !ci ? h = new CustomEvent(r, {
2251
2417
  bubbles: !0,
2252
2418
  cancelable: !0
2253
2419
  }) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
2254
- var v = Vr(Vr({}, m), Oi.getEventProperties(r, t));
2420
+ var v = $r($r({}, m), Vi.getEventProperties(r, t));
2255
2421
  for (var y in v) h[y] = v[y];
2256
2422
  n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
2257
2423
  }
2258
2424
  }
2259
- var Ai = ["evt"], H = function(e, t) {
2260
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Kr(n, Ai);
2261
- Oi.pluginEvent.bind(Q)(e, t, Vr({
2425
+ var Ui = ["evt"], H = function(e, t) {
2426
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = ii(n, Ui);
2427
+ Vi.pluginEvent.bind(Q)(e, t, $r({
2262
2428
  dragEl: W,
2263
2429
  parentEl: G,
2264
2430
  ghostEl: K,
2265
2431
  rootEl: q,
2266
- nextEl: ji,
2267
- lastDownEl: Mi,
2432
+ nextEl: Wi,
2433
+ lastDownEl: Gi,
2268
2434
  cloneEl: J,
2269
- cloneHidden: Ni,
2270
- dragStarted: qi,
2435
+ cloneHidden: Ki,
2436
+ dragStarted: oa,
2271
2437
  putSortable: X,
2272
2438
  activeSortable: Q.active,
2273
2439
  originalEvent: r,
2274
- oldIndex: Pi,
2275
- oldDraggableIndex: Fi,
2440
+ oldIndex: qi,
2441
+ oldDraggableIndex: Ji,
2276
2442
  newIndex: Y,
2277
- newDraggableIndex: Ii,
2278
- hideGhostForTarget: da,
2279
- unhideGhostForTarget: fa,
2443
+ newDraggableIndex: Yi,
2444
+ hideGhostForTarget: wa,
2445
+ unhideGhostForTarget: Ta,
2280
2446
  cloneNowHidden: function() {
2281
- Ni = !0;
2447
+ Ki = !0;
2282
2448
  },
2283
2449
  cloneNowShown: function() {
2284
- Ni = !1;
2450
+ Ki = !1;
2285
2451
  },
2286
2452
  dispatchSortableEvent: function(e) {
2287
2453
  U({
@@ -2293,45 +2459,45 @@ var Ai = ["evt"], H = function(e, t) {
2293
2459
  }, i));
2294
2460
  };
2295
2461
  function U(e) {
2296
- ki(Vr({
2462
+ Hi($r({
2297
2463
  putSortable: X,
2298
2464
  cloneEl: J,
2299
2465
  targetEl: W,
2300
2466
  rootEl: q,
2301
- oldIndex: Pi,
2302
- oldDraggableIndex: Fi,
2467
+ oldIndex: qi,
2468
+ oldDraggableIndex: Ji,
2303
2469
  newIndex: Y,
2304
- newDraggableIndex: Ii
2470
+ newDraggableIndex: Yi
2305
2471
  }, e));
2306
2472
  }
2307
- var W, G, K, q, ji, Mi, J, Ni, Pi, Y, Fi, Ii, Li, X, Ri = !1, zi = !1, Bi = [], Vi, Hi, Ui, Wi, Gi, Ki, qi, Ji, Yi, Xi = !1, Zi = !1, Qi, Z, $i = [], ea = !1, ta = [], na = typeof document < "u", ra = $r, ia = Xr || Yr ? "cssFloat" : "float", aa = na && !ei && !$r && "draggable" in document.createElement("div"), oa = function() {
2308
- if (na) {
2309
- if (Yr) return !1;
2473
+ var W, G, K, q, Wi, Gi, J, Ki, qi, Y, Ji, Yi, Xi, X, Zi = !1, Qi = !1, $i = [], ea, ta, na, ra, ia, aa, oa, sa, ca, la = !1, ua = !1, da, Z, fa = [], pa = !1, ma = [], ha = typeof document < "u", ga = di, _a = ci || si ? "cssFloat" : "float", va = ha && !fi && !di && "draggable" in document.createElement("div"), ya = function() {
2474
+ if (ha) {
2475
+ if (si) return !1;
2310
2476
  var e = document.createElement("x");
2311
2477
  return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
2312
2478
  }
2313
- }(), sa = function(e, t) {
2314
- var n = R(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = ui(e, 0, t), a = ui(e, 1, t), o = i && R(i), s = a && R(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + z(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + z(a).width;
2479
+ }(), ba = function(e, t) {
2480
+ var n = z(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Si(e, 0, t), a = Si(e, 1, t), o = i && z(i), s = a && z(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + B(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + B(a).width;
2315
2481
  if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
2316
2482
  if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
2317
2483
  if (i && o.float && o.float !== "none") {
2318
2484
  var u = o.float === "left" ? "left" : "right";
2319
2485
  return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
2320
2486
  }
2321
- return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[ia] === "none" || a && n[ia] === "none" && c + l > r) ? "vertical" : "horizontal";
2322
- }, ca = function(e, t, n) {
2487
+ return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[_a] === "none" || a && n[_a] === "none" && c + l > r) ? "vertical" : "horizontal";
2488
+ }, xa = function(e, t, n) {
2323
2489
  var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, o = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
2324
2490
  return r === o || i === s || r + a / 2 === o + c / 2;
2325
- }, la = function(e, t) {
2491
+ }, Sa = function(e, t) {
2326
2492
  var n;
2327
- return Bi.some(function(r) {
2493
+ return $i.some(function(r) {
2328
2494
  var i = r[V].options.emptyInsertThreshold;
2329
- if (!(!i || di(r))) {
2330
- var a = z(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
2495
+ if (!(!i || Ci(r))) {
2496
+ var a = B(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
2331
2497
  if (o && s) return n = r;
2332
2498
  }
2333
2499
  }), n;
2334
- }, ua = function(e) {
2500
+ }, Ca = function(e) {
2335
2501
  function t(e, n) {
2336
2502
  return function(r, i, a, o) {
2337
2503
  var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
@@ -2344,31 +2510,31 @@ var W, G, K, q, ji, Mi, J, Ni, Pi, Y, Fi, Ii, Li, X, Ri = !1, zi = !1, Bi = [],
2344
2510
  };
2345
2511
  }
2346
2512
  var n = {}, r = e.group;
2347
- (!r || Hr(r) != "object") && (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
2348
- }, da = function() {
2349
- !oa && K && R(K, "display", "none");
2350
- }, fa = function() {
2351
- !oa && K && R(K, "display", "");
2513
+ (!r || ei(r) != "object") && (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
2514
+ }, wa = function() {
2515
+ !ya && K && z(K, "display", "none");
2516
+ }, Ta = function() {
2517
+ !ya && K && z(K, "display", "");
2352
2518
  };
2353
- na && !ei && document.addEventListener("click", function(e) {
2354
- if (zi) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), zi = !1, !1;
2519
+ ha && !fi && document.addEventListener("click", function(e) {
2520
+ if (Qi) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Qi = !1, !1;
2355
2521
  }, !0);
2356
- var pa = function(e) {
2522
+ var Ea = function(e) {
2357
2523
  if (W) {
2358
2524
  e = e.touches ? e.touches[0] : e;
2359
- var t = la(e.clientX, e.clientY);
2525
+ var t = Sa(e.clientX, e.clientY);
2360
2526
  if (t) {
2361
2527
  var n = {};
2362
2528
  for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
2363
2529
  n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
2364
2530
  }
2365
2531
  }
2366
- }, ma = function(e) {
2532
+ }, Da = function(e) {
2367
2533
  W && W.parentNode[V]._isOutsideThisEl(e.target);
2368
2534
  };
2369
2535
  function Q(e, t) {
2370
2536
  if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
2371
- this.el = e, this.options = t = Wr({}, t), e[V] = this;
2537
+ this.el = e, this.options = t = ni({}, t), e[V] = this;
2372
2538
  var n = {
2373
2539
  group: null,
2374
2540
  sort: !0,
@@ -2381,7 +2547,7 @@ function Q(e, t) {
2381
2547
  invertedSwapThreshold: null,
2382
2548
  removeCloneOnHide: !0,
2383
2549
  direction: function() {
2384
- return sa(e, this.options);
2550
+ return ba(e, this.options);
2385
2551
  },
2386
2552
  ghostClass: "sortable-ghost",
2387
2553
  chosenClass: "sortable-chosen",
@@ -2408,17 +2574,17 @@ function Q(e, t) {
2408
2574
  x: 0,
2409
2575
  y: 0
2410
2576
  },
2411
- supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Qr,
2577
+ supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !ui,
2412
2578
  emptyInsertThreshold: 5
2413
2579
  };
2414
- for (var r in Oi.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
2415
- for (var i in ua(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
2416
- this.nativeDraggable = t.forceFallback ? !1 : aa, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? F(e, "pointerdown", this._onTapStart) : (F(e, "mousedown", this._onTapStart), F(e, "touchstart", this._onTapStart)), this.nativeDraggable && (F(e, "dragover", this), F(e, "dragenter", this)), Bi.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Wr(this, Ci());
2580
+ for (var r in Vi.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
2581
+ for (var i in Ca(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
2582
+ this.nativeDraggable = t.forceFallback ? !1 : va, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? I(e, "pointerdown", this._onTapStart) : (I(e, "mousedown", this._onTapStart), I(e, "touchstart", this._onTapStart)), this.nativeDraggable && (I(e, "dragover", this), I(e, "dragenter", this)), $i.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), ni(this, Ii());
2417
2583
  }
2418
2584
  Q.prototype = {
2419
2585
  constructor: Q,
2420
2586
  _isOutsideThisEl: function(e) {
2421
- !this.el.contains(e) && e !== this.el && (Ji = null);
2587
+ !this.el.contains(e) && e !== this.el && (sa = null);
2422
2588
  },
2423
2589
  _getDirection: function(e, t) {
2424
2590
  return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
@@ -2426,8 +2592,8 @@ Q.prototype = {
2426
2592
  _onTapStart: function(e) {
2427
2593
  if (e.cancelable) {
2428
2594
  var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, o = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (o || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, l = r.filter;
2429
- if (wa(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Qr && s && s.tagName.toUpperCase() === "SELECT") && (s = ii(s, r.draggable, n, !1), !(s && s.animated) && Mi !== s)) {
2430
- if (Pi = B(s), Fi = B(s, r.draggable), typeof l == "function") {
2595
+ if (La(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && ui && s && s.tagName.toUpperCase() === "SELECT") && (s = gi(s, r.draggable, n, !1), !(s && s.animated) && Gi !== s)) {
2596
+ if (qi = wi(s), Ji = wi(s, r.draggable), typeof l == "function") {
2431
2597
  if (l.call(this, e, s, this)) {
2432
2598
  U({
2433
2599
  sortable: t,
@@ -2440,7 +2606,7 @@ Q.prototype = {
2440
2606
  return;
2441
2607
  }
2442
2608
  } else if (l && (l = l.split(",").some(function(r) {
2443
- if (r = ii(c, r.trim(), n, !1), r) return U({
2609
+ if (r = gi(c, r.trim(), n, !1), r) return U({
2444
2610
  sortable: t,
2445
2611
  rootEl: r,
2446
2612
  name: "filter",
@@ -2452,36 +2618,36 @@ Q.prototype = {
2452
2618
  i && e.cancelable && e.preventDefault();
2453
2619
  return;
2454
2620
  }
2455
- r.handle && !ii(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
2621
+ r.handle && !gi(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
2456
2622
  }
2457
2623
  }
2458
2624
  },
2459
2625
  _prepareDragStart: function(e, t, n) {
2460
2626
  var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
2461
2627
  if (n && !W && n.parentNode === i) {
2462
- var c = z(n);
2463
- if (q = i, W = n, G = W.parentNode, ji = W.nextSibling, Mi = n, Li = a.group, Q.dragged = W, Vi = {
2628
+ var c = B(n);
2629
+ if (q = i, W = n, G = W.parentNode, Wi = W.nextSibling, Gi = n, Xi = a.group, Q.dragged = W, ea = {
2464
2630
  target: W,
2465
2631
  clientX: (t || e).clientX,
2466
2632
  clientY: (t || e).clientY
2467
- }, Gi = Vi.clientX - c.left, Ki = Vi.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
2633
+ }, ia = ea.clientX - c.left, aa = ea.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
2468
2634
  if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
2469
2635
  r._onDrop();
2470
2636
  return;
2471
2637
  }
2472
- r._disableDelayedDragEvents(), !Zr && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
2638
+ r._disableDelayedDragEvents(), !li && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
2473
2639
  sortable: r,
2474
2640
  name: "choose",
2475
2641
  originalEvent: e
2476
- }), L(W, a.chosenClass, !0);
2642
+ }), R(W, a.chosenClass, !0);
2477
2643
  }, a.ignore.split(",").forEach(function(e) {
2478
- si(W, e.trim(), _a);
2479
- }), F(o, "dragover", pa), F(o, "mousemove", pa), F(o, "touchmove", pa), F(o, "mouseup", r._onDrop), F(o, "touchend", r._onDrop), F(o, "touchcancel", r._onDrop), Zr && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Xr || Yr))) {
2644
+ yi(W, e.trim(), Aa);
2645
+ }), I(o, "dragover", Ea), I(o, "mousemove", Ea), I(o, "touchmove", Ea), I(o, "mouseup", r._onDrop), I(o, "touchend", r._onDrop), I(o, "touchcancel", r._onDrop), li && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(ci || si))) {
2480
2646
  if (Q.eventCanceled) {
2481
2647
  this._onDrop();
2482
2648
  return;
2483
2649
  }
2484
- F(o, "mouseup", r._disableDelayedDrag), F(o, "touchend", r._disableDelayedDrag), F(o, "touchcancel", r._disableDelayedDrag), F(o, "mousemove", r._delayedDragTouchMoveHandler), F(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && F(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
2650
+ I(o, "mouseup", r._disableDelayedDrag), I(o, "touchend", r._disableDelayedDrag), I(o, "touchcancel", r._disableDelayedDrag), I(o, "mousemove", r._delayedDragTouchMoveHandler), I(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && I(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
2485
2651
  } else s();
2486
2652
  }
2487
2653
  },
@@ -2490,25 +2656,25 @@ Q.prototype = {
2490
2656
  Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
2491
2657
  },
2492
2658
  _disableDelayedDrag: function() {
2493
- W && _a(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
2659
+ W && Aa(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
2494
2660
  },
2495
2661
  _disableDelayedDragEvents: function() {
2496
2662
  var e = this.el.ownerDocument;
2497
- I(e, "mouseup", this._disableDelayedDrag), I(e, "touchend", this._disableDelayedDrag), I(e, "touchcancel", this._disableDelayedDrag), I(e, "mousemove", this._delayedDragTouchMoveHandler), I(e, "touchmove", this._delayedDragTouchMoveHandler), I(e, "pointermove", this._delayedDragTouchMoveHandler);
2663
+ L(e, "mouseup", this._disableDelayedDrag), L(e, "touchend", this._disableDelayedDrag), L(e, "touchcancel", this._disableDelayedDrag), L(e, "mousemove", this._delayedDragTouchMoveHandler), L(e, "touchmove", this._delayedDragTouchMoveHandler), L(e, "pointermove", this._delayedDragTouchMoveHandler);
2498
2664
  },
2499
2665
  _triggerDragStart: function(e, t) {
2500
- t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? F(document, "pointermove", this._onTouchMove) : t ? F(document, "touchmove", this._onTouchMove) : F(document, "mousemove", this._onTouchMove) : (F(W, "dragend", this), F(q, "dragstart", this._onDragStart));
2666
+ t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? I(document, "pointermove", this._onTouchMove) : t ? I(document, "touchmove", this._onTouchMove) : I(document, "mousemove", this._onTouchMove) : (I(W, "dragend", this), I(q, "dragstart", this._onDragStart));
2501
2667
  try {
2502
- document.selection ? Ta(function() {
2668
+ document.selection ? Ra(function() {
2503
2669
  document.selection.empty();
2504
2670
  }) : window.getSelection().removeAllRanges();
2505
2671
  } catch {}
2506
2672
  },
2507
2673
  _dragStarted: function(e, t) {
2508
- if (Ri = !1, q && W) {
2509
- H("dragStarted", this, { evt: t }), this.nativeDraggable && F(document, "dragover", ma);
2674
+ if (Zi = !1, q && W) {
2675
+ H("dragStarted", this, { evt: t }), this.nativeDraggable && I(document, "dragover", Da);
2510
2676
  var n = this.options;
2511
- !e && L(W, n.dragClass, !1), L(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
2677
+ !e && R(W, n.dragClass, !1), R(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
2512
2678
  sortable: this,
2513
2679
  name: "start",
2514
2680
  originalEvent: t
@@ -2516,33 +2682,33 @@ Q.prototype = {
2516
2682
  } else this._nulling();
2517
2683
  },
2518
2684
  _emulateDragOver: function() {
2519
- if (Hi) {
2520
- this._lastX = Hi.clientX, this._lastY = Hi.clientY, da();
2521
- for (var e = document.elementFromPoint(Hi.clientX, Hi.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Hi.clientX, Hi.clientY), e !== t);) t = e;
2685
+ if (ta) {
2686
+ this._lastX = ta.clientX, this._lastY = ta.clientY, wa();
2687
+ for (var e = document.elementFromPoint(ta.clientX, ta.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(ta.clientX, ta.clientY), e !== t);) t = e;
2522
2688
  if (W.parentNode[V]._isOutsideThisEl(e), t) do {
2523
2689
  if (t[V]) {
2524
2690
  var n = void 0;
2525
2691
  if (n = t[V]._onDragOver({
2526
- clientX: Hi.clientX,
2527
- clientY: Hi.clientY,
2692
+ clientX: ta.clientX,
2693
+ clientY: ta.clientY,
2528
2694
  target: e,
2529
2695
  rootEl: t
2530
2696
  }), n && !this.options.dragoverBubble) break;
2531
2697
  }
2532
2698
  e = t;
2533
2699
  } while (t = t.parentNode);
2534
- fa();
2700
+ Ta();
2535
2701
  }
2536
2702
  },
2537
2703
  _onTouchMove: function(e) {
2538
- if (Vi) {
2539
- var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && oi(K, !0), o = K && a && a.a, s = K && a && a.d, c = ra && Z && fi(Z), l = (i.clientX - Vi.clientX + r.x) / (o || 1) + (c ? c[0] - $i[0] : 0) / (o || 1), u = (i.clientY - Vi.clientY + r.y) / (s || 1) + (c ? c[1] - $i[1] : 0) / (s || 1);
2540
- if (!Q.active && !Ri) {
2704
+ if (ea) {
2705
+ var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && vi(K, !0), o = K && a && a.a, s = K && a && a.d, c = ga && Z && Ti(Z), l = (i.clientX - ea.clientX + r.x) / (o || 1) + (c ? c[0] - fa[0] : 0) / (o || 1), u = (i.clientY - ea.clientY + r.y) / (s || 1) + (c ? c[1] - fa[1] : 0) / (s || 1);
2706
+ if (!Q.active && !Zi) {
2541
2707
  if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
2542
2708
  this._onDragStart(e, !0);
2543
2709
  }
2544
2710
  if (K) {
2545
- a ? (a.e += l - (Ui || 0), a.f += u - (Wi || 0)) : a = {
2711
+ a ? (a.e += l - (na || 0), a.f += u - (ra || 0)) : a = {
2546
2712
  a: 1,
2547
2713
  b: 0,
2548
2714
  c: 0,
@@ -2551,19 +2717,19 @@ Q.prototype = {
2551
2717
  f: u
2552
2718
  };
2553
2719
  var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
2554
- R(K, "webkitTransform", d), R(K, "mozTransform", d), R(K, "msTransform", d), R(K, "transform", d), Ui = l, Wi = u, Hi = i;
2720
+ z(K, "webkitTransform", d), z(K, "mozTransform", d), z(K, "msTransform", d), z(K, "transform", d), na = l, ra = u, ta = i;
2555
2721
  }
2556
2722
  e.cancelable && e.preventDefault();
2557
2723
  }
2558
2724
  },
2559
2725
  _appendGhost: function() {
2560
2726
  if (!K) {
2561
- var e = this.options.fallbackOnBody ? document.body : q, t = z(W, !0, ra, !0, e), n = this.options;
2562
- if (ra) {
2563
- for (Z = e; R(Z, "position") === "static" && R(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
2564
- Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = ci()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = ci(), $i = fi(Z);
2727
+ var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0, ga, !0, e), n = this.options;
2728
+ if (ga) {
2729
+ for (Z = e; z(Z, "position") === "static" && z(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
2730
+ Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = bi()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = bi(), fa = Ti(Z);
2565
2731
  }
2566
- K = W.cloneNode(!0), L(K, n.ghostClass, !1), L(K, n.fallbackClass, !0), L(K, n.dragClass, !0), R(K, "transition", ""), R(K, "transform", ""), R(K, "box-sizing", "border-box"), R(K, "margin", 0), R(K, "top", t.top), R(K, "left", t.left), R(K, "width", t.width), R(K, "height", t.height), R(K, "opacity", "0.8"), R(K, "position", ra ? "absolute" : "fixed"), R(K, "zIndex", "100000"), R(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), R(K, "transform-origin", Gi / parseInt(K.style.width) * 100 + "% " + Ki / parseInt(K.style.height) * 100 + "%");
2732
+ K = W.cloneNode(!0), R(K, n.ghostClass, !1), R(K, n.fallbackClass, !0), R(K, n.dragClass, !0), z(K, "transition", ""), z(K, "transform", ""), z(K, "box-sizing", "border-box"), z(K, "margin", 0), z(K, "top", t.top), z(K, "left", t.left), z(K, "width", t.width), z(K, "height", t.height), z(K, "opacity", "0.8"), z(K, "position", ga ? "absolute" : "fixed"), z(K, "zIndex", "100000"), z(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), z(K, "transform-origin", ia / parseInt(K.style.width) * 100 + "% " + aa / parseInt(K.style.height) * 100 + "%");
2567
2733
  }
2568
2734
  },
2569
2735
  _onDragStart: function(e, t) {
@@ -2572,18 +2738,18 @@ Q.prototype = {
2572
2738
  this._onDrop();
2573
2739
  return;
2574
2740
  }
2575
- H("setupClone", this), Q.eventCanceled || (J = xi(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), L(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Ta(function() {
2741
+ H("setupClone", this), Q.eventCanceled || (J = Pi(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), R(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Ra(function() {
2576
2742
  H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
2577
2743
  sortable: n,
2578
2744
  name: "clone"
2579
2745
  }));
2580
- }), !t && L(W, i.dragClass, !0), t ? (zi = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (I(document, "mouseup", n._onDrop), I(document, "touchend", n._onDrop), I(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, W)), F(document, "drop", n), R(W, "transform", "translateZ(0)")), Ri = !0, n._dragStartId = Ta(n._dragStarted.bind(n, t, e)), F(document, "selectstart", n), qi = !0, Qr && R(document.body, "user-select", "none");
2746
+ }), !t && R(W, i.dragClass, !0), t ? (Qi = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (L(document, "mouseup", n._onDrop), L(document, "touchend", n._onDrop), L(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, W)), I(document, "drop", n), z(W, "transform", "translateZ(0)")), Zi = !0, n._dragStartId = Ra(n._dragStarted.bind(n, t, e)), I(document, "selectstart", n), oa = !0, ui && z(document.body, "user-select", "none");
2581
2747
  },
2582
2748
  _onDragOver: function(e) {
2583
- var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Li === s, u = o.sort, d = X || c, f, p = this, m = !1;
2584
- if (ea) return;
2749
+ var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Xi === s, u = o.sort, d = X || c, f, p = this, m = !1;
2750
+ if (pa) return;
2585
2751
  function h(o, s) {
2586
- H(o, p, Vr({
2752
+ H(o, p, $r({
2587
2753
  evt: e,
2588
2754
  isOwner: l,
2589
2755
  axis: f ? "vertical" : "horizontal",
@@ -2595,7 +2761,7 @@ Q.prototype = {
2595
2761
  target: n,
2596
2762
  completed: _,
2597
2763
  onMove: function(n, i) {
2598
- return ga(q, t, W, r, n, z(n), e, i);
2764
+ return ka(q, t, W, r, n, B(n), e, i);
2599
2765
  },
2600
2766
  changed: v
2601
2767
  }, s));
@@ -2604,50 +2770,50 @@ Q.prototype = {
2604
2770
  h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
2605
2771
  }
2606
2772
  function _(r) {
2607
- return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (L(W, X ? X.options.ghostClass : c.options.ghostClass, !1), L(W, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
2773
+ return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (R(W, X ? X.options.ghostClass : c.options.ghostClass, !1), R(W, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
2608
2774
  h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
2609
- }), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (Ji = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && pa(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
2775
+ }), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (sa = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && Ea(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
2610
2776
  }
2611
2777
  function v() {
2612
- Y = B(W), Ii = B(W, o.draggable), U({
2778
+ Y = wi(W), Yi = wi(W, o.draggable), U({
2613
2779
  sortable: p,
2614
2780
  name: "change",
2615
2781
  toEl: t,
2616
2782
  newIndex: Y,
2617
- newDraggableIndex: Ii,
2783
+ newDraggableIndex: Yi,
2618
2784
  originalEvent: e
2619
2785
  });
2620
2786
  }
2621
- if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = ii(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
2787
+ if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = gi(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
2622
2788
  if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
2623
- if (zi = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = Li.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
2624
- if (f = this._getDirection(e, n) === "vertical", r = z(W), h("dragOverValid"), Q.eventCanceled) return m;
2625
- if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (ji ? q.insertBefore(W, ji) : q.appendChild(W)), _(!0);
2626
- var y = di(t, o.draggable);
2627
- if (!y || ba(e, f, this) && !y.animated) {
2789
+ if (Qi = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = Xi.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
2790
+ if (f = this._getDirection(e, n) === "vertical", r = B(W), h("dragOverValid"), Q.eventCanceled) return m;
2791
+ if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Wi ? q.insertBefore(W, Wi) : q.appendChild(W)), _(!0);
2792
+ var y = Ci(t, o.draggable);
2793
+ if (!y || Na(e, f, this) && !y.animated) {
2628
2794
  if (y === W) return _(!1);
2629
- if (y && t === e.target && (n = y), n && (i = z(n)), ga(q, t, W, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(W, y.nextSibling) : t.appendChild(W), G = t, v(), _(!0);
2630
- } else if (y && ya(e, f, this)) {
2631
- var b = ui(t, 0, o, !0);
2795
+ if (y && t === e.target && (n = y), n && (i = B(n)), ka(q, t, W, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(W, y.nextSibling) : t.appendChild(W), G = t, v(), _(!0);
2796
+ } else if (y && Ma(e, f, this)) {
2797
+ var b = Si(t, 0, o, !0);
2632
2798
  if (b === W) return _(!1);
2633
- if (n = b, i = z(n), ga(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
2799
+ if (n = b, i = B(n), ka(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
2634
2800
  } else if (n.parentNode === t) {
2635
- i = z(n);
2636
- var x = 0, S, C = W.parentNode !== t, w = !ca(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = li(n, "top", "top") || li(W, "top", "top"), ee = E ? E.scrollTop : void 0;
2637
- Ji !== n && (S = i[T], Xi = !1, Zi = !w && o.invertSwap || C), x = xa(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Zi, Ji === n);
2801
+ i = B(n);
2802
+ var x = 0, S, C = W.parentNode !== t, w = !xa(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = xi(n, "top", "top") || xi(W, "top", "top"), ee = E ? E.scrollTop : void 0;
2803
+ sa !== n && (S = i[T], la = !1, ua = !w && o.invertSwap || C), x = Pa(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, ua, sa === n);
2638
2804
  var D;
2639
2805
  if (x !== 0) {
2640
- var O = B(W);
2806
+ var O = wi(W);
2641
2807
  do
2642
2808
  O -= x, D = G.children[O];
2643
- while (D && (R(D, "display") === "none" || D === K));
2809
+ while (D && (z(D, "display") === "none" || D === K));
2644
2810
  }
2645
2811
  if (x === 0 || D === n) return _(!1);
2646
- Ji = n, Yi = x;
2812
+ sa = n, ca = x;
2647
2813
  var k = n.nextElementSibling, te = !1;
2648
2814
  te = x === 1;
2649
- var A = ga(q, t, W, r, n, i, e, te);
2650
- if (A !== !1) return (A === 1 || A === -1) && (te = A === 1), ea = !0, setTimeout(va, 30), g(), te && !k ? t.appendChild(W) : n.parentNode.insertBefore(W, te ? k : n), E && bi(E, 0, ee - E.scrollTop), G = W.parentNode, S !== void 0 && !Zi && (Qi = Math.abs(S - z(n)[T])), v(), _(!0);
2815
+ var A = ka(q, t, W, r, n, i, e, te);
2816
+ if (A !== !1) return (A === 1 || A === -1) && (te = A === 1), pa = !0, setTimeout(ja, 30), g(), te && !k ? t.appendChild(W) : n.parentNode.insertBefore(W, te ? k : n), E && Ni(E, 0, ee - E.scrollTop), G = W.parentNode, S !== void 0 && !ua && (da = Math.abs(S - B(n)[T])), v(), _(!0);
2651
2817
  }
2652
2818
  if (t.contains(W)) return _(!1);
2653
2819
  }
@@ -2655,26 +2821,26 @@ Q.prototype = {
2655
2821
  },
2656
2822
  _ignoreWhileAnimating: null,
2657
2823
  _offMoveEvents: function() {
2658
- I(document, "mousemove", this._onTouchMove), I(document, "touchmove", this._onTouchMove), I(document, "pointermove", this._onTouchMove), I(document, "dragover", pa), I(document, "mousemove", pa), I(document, "touchmove", pa);
2824
+ L(document, "mousemove", this._onTouchMove), L(document, "touchmove", this._onTouchMove), L(document, "pointermove", this._onTouchMove), L(document, "dragover", Ea), L(document, "mousemove", Ea), L(document, "touchmove", Ea);
2659
2825
  },
2660
2826
  _offUpEvents: function() {
2661
2827
  var e = this.el.ownerDocument;
2662
- I(e, "mouseup", this._onDrop), I(e, "touchend", this._onDrop), I(e, "pointerup", this._onDrop), I(e, "touchcancel", this._onDrop), I(document, "selectstart", this);
2828
+ L(e, "mouseup", this._onDrop), L(e, "touchend", this._onDrop), L(e, "pointerup", this._onDrop), L(e, "touchcancel", this._onDrop), L(document, "selectstart", this);
2663
2829
  },
2664
2830
  _onDrop: function(e) {
2665
2831
  var t = this.el, n = this.options;
2666
- if (Y = B(W), Ii = B(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = B(W), Ii = B(W, n.draggable), Q.eventCanceled) {
2832
+ if (Y = wi(W), Yi = wi(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = wi(W), Yi = wi(W, n.draggable), Q.eventCanceled) {
2667
2833
  this._nulling();
2668
2834
  return;
2669
2835
  }
2670
- Ri = !1, Zi = !1, Xi = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ea(this.cloneId), Ea(this._dragStartId), this.nativeDraggable && (I(document, "drop", this), I(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Qr && R(document.body, "user-select", ""), R(W, "transform", ""), e && (qi && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), K && K.parentNode && K.parentNode.removeChild(K), (q === G || X && X.lastPutMode !== "clone") && J && J.parentNode && J.parentNode.removeChild(J), W && (this.nativeDraggable && I(W, "dragend", this), _a(W), W.style["will-change"] = "", qi && !Ri && L(W, X ? X.options.ghostClass : this.options.ghostClass, !1), L(W, this.options.chosenClass, !1), U({
2836
+ Zi = !1, ua = !1, la = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), za(this.cloneId), za(this._dragStartId), this.nativeDraggable && (L(document, "drop", this), L(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), ui && z(document.body, "user-select", ""), z(W, "transform", ""), e && (oa && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), K && K.parentNode && K.parentNode.removeChild(K), (q === G || X && X.lastPutMode !== "clone") && J && J.parentNode && J.parentNode.removeChild(J), W && (this.nativeDraggable && L(W, "dragend", this), Aa(W), W.style["will-change"] = "", oa && !Zi && R(W, X ? X.options.ghostClass : this.options.ghostClass, !1), R(W, this.options.chosenClass, !1), U({
2671
2837
  sortable: this,
2672
2838
  name: "unchoose",
2673
2839
  toEl: G,
2674
2840
  newIndex: null,
2675
2841
  newDraggableIndex: null,
2676
2842
  originalEvent: e
2677
- }), q === G ? Y !== Pi && Y >= 0 && (U({
2843
+ }), q === G ? Y !== qi && Y >= 0 && (U({
2678
2844
  sortable: this,
2679
2845
  name: "update",
2680
2846
  toEl: G,
@@ -2706,7 +2872,7 @@ Q.prototype = {
2706
2872
  name: "sort",
2707
2873
  toEl: G,
2708
2874
  originalEvent: e
2709
- })), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = Pi, Ii = Fi), U({
2875
+ })), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = qi, Yi = Ji), U({
2710
2876
  sortable: this,
2711
2877
  name: "end",
2712
2878
  toEl: G,
@@ -2714,9 +2880,9 @@ Q.prototype = {
2714
2880
  }), this.save()))), this._nulling();
2715
2881
  },
2716
2882
  _nulling: function() {
2717
- H("nulling", this), q = W = G = K = ji = J = Mi = Ni = Vi = Hi = qi = Y = Ii = Pi = Fi = Ji = Yi = X = Li = Q.dragged = Q.ghost = Q.clone = Q.active = null, ta.forEach(function(e) {
2883
+ H("nulling", this), q = W = G = K = Wi = J = Gi = Ki = ea = ta = oa = Y = Yi = qi = Ji = sa = ca = X = Xi = Q.dragged = Q.ghost = Q.clone = Q.active = null, ma.forEach(function(e) {
2718
2884
  e.checked = !0;
2719
- }), ta.length = Ui = Wi = 0;
2885
+ }), ma.length = na = ra = 0;
2720
2886
  },
2721
2887
  handleEvent: function(e) {
2722
2888
  switch (e.type) {
@@ -2726,7 +2892,7 @@ Q.prototype = {
2726
2892
  break;
2727
2893
  case "dragenter":
2728
2894
  case "dragover":
2729
- W && (this._onDragOver(e), ha(e));
2895
+ W && (this._onDragOver(e), Oa(e));
2730
2896
  break;
2731
2897
  case "selectstart":
2732
2898
  e.preventDefault();
@@ -2734,14 +2900,14 @@ Q.prototype = {
2734
2900
  }
2735
2901
  },
2736
2902
  toArray: function() {
2737
- for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], ii(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Ca(t));
2903
+ for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], gi(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Ia(t));
2738
2904
  return e;
2739
2905
  },
2740
2906
  sort: function(e, t) {
2741
2907
  var n = {}, r = this.el;
2742
2908
  this.toArray().forEach(function(e, t) {
2743
2909
  var i = r.children[t];
2744
- ii(i, this.options.draggable, r, !1) && (n[e] = i);
2910
+ gi(i, this.options.draggable, r, !1) && (n[e] = i);
2745
2911
  }, this), t && this.captureAnimationState(), e.forEach(function(e) {
2746
2912
  n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
2747
2913
  }), t && this.animateAll();
@@ -2751,25 +2917,25 @@ Q.prototype = {
2751
2917
  e && e.set && e.set(this);
2752
2918
  },
2753
2919
  closest: function(e, t) {
2754
- return ii(e, t || this.options.draggable, this.el, !1);
2920
+ return gi(e, t || this.options.draggable, this.el, !1);
2755
2921
  },
2756
2922
  option: function(e, t) {
2757
2923
  var n = this.options;
2758
2924
  if (t === void 0) return n[e];
2759
- var r = Oi.modifyOption(this, e, t);
2760
- r === void 0 ? n[e] = t : n[e] = r, e === "group" && ua(n);
2925
+ var r = Vi.modifyOption(this, e, t);
2926
+ r === void 0 ? n[e] = t : n[e] = r, e === "group" && Ca(n);
2761
2927
  },
2762
2928
  destroy: function() {
2763
2929
  H("destroy", this);
2764
2930
  var e = this.el;
2765
- e[V] = null, I(e, "mousedown", this._onTapStart), I(e, "touchstart", this._onTapStart), I(e, "pointerdown", this._onTapStart), this.nativeDraggable && (I(e, "dragover", this), I(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
2931
+ e[V] = null, L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart), L(e, "pointerdown", this._onTapStart), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
2766
2932
  e.removeAttribute("draggable");
2767
- }), this._onDrop(), this._disableDelayedDragEvents(), Bi.splice(Bi.indexOf(this.el), 1), this.el = e = null;
2933
+ }), this._onDrop(), this._disableDelayedDragEvents(), $i.splice($i.indexOf(this.el), 1), this.el = e = null;
2768
2934
  },
2769
2935
  _hideClone: function() {
2770
- if (!Ni) {
2936
+ if (!Ki) {
2771
2937
  if (H("hideClone", this), Q.eventCanceled) return;
2772
- R(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Ni = !0;
2938
+ z(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Ki = !0;
2773
2939
  }
2774
2940
  },
2775
2941
  _showClone: function(e) {
@@ -2777,99 +2943,99 @@ Q.prototype = {
2777
2943
  this._hideClone();
2778
2944
  return;
2779
2945
  }
2780
- if (Ni) {
2946
+ if (Ki) {
2781
2947
  if (H("showClone", this), Q.eventCanceled) return;
2782
- W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : ji ? q.insertBefore(J, ji) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), R(J, "display", ""), Ni = !1;
2948
+ W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : Wi ? q.insertBefore(J, Wi) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), z(J, "display", ""), Ki = !1;
2783
2949
  }
2784
2950
  }
2785
2951
  };
2786
- function ha(e) {
2952
+ function Oa(e) {
2787
2953
  e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
2788
2954
  }
2789
- function ga(e, t, n, r, i, a, o, s) {
2955
+ function ka(e, t, n, r, i, a, o, s) {
2790
2956
  var c, l = e[V], u = l.options.onMove, d;
2791
- return window.CustomEvent && !Yr && !Xr ? c = new CustomEvent("move", {
2957
+ return window.CustomEvent && !si && !ci ? c = new CustomEvent("move", {
2792
2958
  bubbles: !0,
2793
2959
  cancelable: !0
2794
- }) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || z(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
2960
+ }) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || B(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
2795
2961
  }
2796
- function _a(e) {
2962
+ function Aa(e) {
2797
2963
  e.draggable = !1;
2798
2964
  }
2799
- function va() {
2800
- ea = !1;
2965
+ function ja() {
2966
+ pa = !1;
2801
2967
  }
2802
- function ya(e, t, n) {
2803
- var r = z(ui(n.el, 0, n.options, !0)), i = Si(n.el, n.options, K), a = 10;
2968
+ function Ma(e, t, n) {
2969
+ var r = B(Si(n.el, 0, n.options, !0)), i = Fi(n.el, n.options, K), a = 10;
2804
2970
  return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
2805
2971
  }
2806
- function ba(e, t, n) {
2807
- var r = z(di(n.el, n.options.draggable)), i = Si(n.el, n.options, K), a = 10;
2972
+ function Na(e, t, n) {
2973
+ var r = B(Ci(n.el, n.options.draggable)), i = Fi(n.el, n.options, K), a = 10;
2808
2974
  return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
2809
2975
  }
2810
- function xa(e, t, n, r, i, a, o, s) {
2976
+ function Pa(e, t, n, r, i, a, o, s) {
2811
2977
  var c = r ? e.clientY : e.clientX, l = r ? n.height : n.width, u = r ? n.top : n.left, d = r ? n.bottom : n.right, f = !1;
2812
2978
  if (!o) {
2813
- if (s && Qi < l * i) {
2814
- if (!Xi && (Yi === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Xi = !0), Xi) f = !0;
2815
- else if (Yi === 1 ? c < u + Qi : c > d - Qi) return -Yi;
2816
- } else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Sa(t);
2979
+ if (s && da < l * i) {
2980
+ if (!la && (ca === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (la = !0), la) f = !0;
2981
+ else if (ca === 1 ? c < u + da : c > d - da) return -ca;
2982
+ } else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Fa(t);
2817
2983
  }
2818
2984
  return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
2819
2985
  }
2820
- function Sa(e) {
2821
- return B(W) < B(e) ? 1 : -1;
2986
+ function Fa(e) {
2987
+ return wi(W) < wi(e) ? 1 : -1;
2822
2988
  }
2823
- function Ca(e) {
2989
+ function Ia(e) {
2824
2990
  for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
2825
2991
  return r.toString(36);
2826
2992
  }
2827
- function wa(e) {
2828
- ta.length = 0;
2993
+ function La(e) {
2994
+ ma.length = 0;
2829
2995
  for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
2830
2996
  var r = t[n];
2831
- r.checked && ta.push(r);
2997
+ r.checked && ma.push(r);
2832
2998
  }
2833
2999
  }
2834
- function Ta(e) {
3000
+ function Ra(e) {
2835
3001
  return setTimeout(e, 0);
2836
3002
  }
2837
- function Ea(e) {
3003
+ function za(e) {
2838
3004
  return clearTimeout(e);
2839
3005
  }
2840
- na && F(document, "touchmove", function(e) {
2841
- (Q.active || Ri) && e.cancelable && e.preventDefault();
3006
+ ha && I(document, "touchmove", function(e) {
3007
+ (Q.active || Zi) && e.cancelable && e.preventDefault();
2842
3008
  }), Q.utils = {
2843
- on: F,
2844
- off: I,
2845
- css: R,
2846
- find: si,
3009
+ on: I,
3010
+ off: L,
3011
+ css: z,
3012
+ find: yi,
2847
3013
  is: function(e, t) {
2848
- return !!ii(e, t, e, !1);
2849
- },
2850
- extend: hi,
2851
- throttle: vi,
2852
- closest: ii,
2853
- toggleClass: L,
2854
- clone: xi,
2855
- index: B,
2856
- nextTick: Ta,
2857
- cancelNextTick: Ea,
2858
- detectDirection: sa,
2859
- getChild: ui
3014
+ return !!gi(e, t, e, !1);
3015
+ },
3016
+ extend: Oi,
3017
+ throttle: ji,
3018
+ closest: gi,
3019
+ toggleClass: R,
3020
+ clone: Pi,
3021
+ index: wi,
3022
+ nextTick: Ra,
3023
+ cancelNextTick: za,
3024
+ detectDirection: ba,
3025
+ getChild: Si
2860
3026
  }, Q.get = function(e) {
2861
3027
  return e[V];
2862
3028
  }, Q.mount = function() {
2863
3029
  var e = [...arguments];
2864
3030
  e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
2865
3031
  if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
2866
- e.utils && (Q.utils = Vr(Vr({}, Q.utils), e.utils)), Oi.mount(e);
3032
+ e.utils && (Q.utils = $r($r({}, Q.utils), e.utils)), Vi.mount(e);
2867
3033
  });
2868
3034
  }, Q.create = function(e, t) {
2869
3035
  return new Q(e, t);
2870
- }, Q.version = qr;
2871
- var $ = [], Da, Oa, ka = !1, Aa, ja, Ma, Na;
2872
- function Pa() {
3036
+ }, Q.version = ai;
3037
+ var $ = [], Ba, Va, Ha = !1, Ua, Wa, Ga, Ka;
3038
+ function qa() {
2873
3039
  function e() {
2874
3040
  for (var e in this.defaults = {
2875
3041
  scroll: !0,
@@ -2882,70 +3048,70 @@ function Pa() {
2882
3048
  return e.prototype = {
2883
3049
  dragStarted: function(e) {
2884
3050
  var t = e.originalEvent;
2885
- this.sortable.nativeDraggable ? F(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? F(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? F(document, "touchmove", this._handleFallbackAutoScroll) : F(document, "mousemove", this._handleFallbackAutoScroll);
3051
+ this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? I(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? I(document, "touchmove", this._handleFallbackAutoScroll) : I(document, "mousemove", this._handleFallbackAutoScroll);
2886
3052
  },
2887
3053
  dragOverCompleted: function(e) {
2888
3054
  var t = e.originalEvent;
2889
3055
  !this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
2890
3056
  },
2891
3057
  drop: function() {
2892
- this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : (I(document, "pointermove", this._handleFallbackAutoScroll), I(document, "touchmove", this._handleFallbackAutoScroll), I(document, "mousemove", this._handleFallbackAutoScroll)), Ia(), Fa(), yi();
3058
+ this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)), Ya(), Ja(), Mi();
2893
3059
  },
2894
3060
  nulling: function() {
2895
- Ma = Oa = Da = ka = Na = Aa = ja = null, $.length = 0;
3061
+ Ga = Va = Ba = Ha = Ka = Ua = Wa = null, $.length = 0;
2896
3062
  },
2897
3063
  _handleFallbackAutoScroll: function(e) {
2898
3064
  this._handleAutoScroll(e, !0);
2899
3065
  },
2900
3066
  _handleAutoScroll: function(e, t) {
2901
3067
  var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
2902
- if (Ma = e, t || this.options.forceAutoScrollFallback || Xr || Yr || Qr) {
2903
- La(e, this.options, a, t);
2904
- var o = mi(a, !0);
2905
- ka && (!Na || r !== Aa || i !== ja) && (Na && Ia(), Na = setInterval(function() {
2906
- var a = mi(document.elementFromPoint(r, i), !0);
2907
- a !== o && (o = a, Fa()), La(e, n.options, a, t);
2908
- }, 10), Aa = r, ja = i);
3068
+ if (Ga = e, t || this.options.forceAutoScrollFallback || ci || si || ui) {
3069
+ Xa(e, this.options, a, t);
3070
+ var o = Di(a, !0);
3071
+ Ha && (!Ka || r !== Ua || i !== Wa) && (Ka && Ya(), Ka = setInterval(function() {
3072
+ var a = Di(document.elementFromPoint(r, i), !0);
3073
+ a !== o && (o = a, Ja()), Xa(e, n.options, a, t);
3074
+ }, 10), Ua = r, Wa = i);
2909
3075
  } else {
2910
- if (!this.options.bubbleScroll || mi(a, !0) === ci()) {
2911
- Fa();
3076
+ if (!this.options.bubbleScroll || Di(a, !0) === bi()) {
3077
+ Ja();
2912
3078
  return;
2913
3079
  }
2914
- La(e, this.options, mi(a, !1), !1);
3080
+ Xa(e, this.options, Di(a, !1), !1);
2915
3081
  }
2916
3082
  }
2917
- }, Wr(e, {
3083
+ }, ni(e, {
2918
3084
  pluginName: "scroll",
2919
3085
  initializeByDefault: !0
2920
3086
  });
2921
3087
  }
2922
- function Fa() {
3088
+ function Ja() {
2923
3089
  $.forEach(function(e) {
2924
3090
  clearInterval(e.pid);
2925
3091
  }), $ = [];
2926
3092
  }
2927
- function Ia() {
2928
- clearInterval(Na);
3093
+ function Ya() {
3094
+ clearInterval(Ka);
2929
3095
  }
2930
- var La = vi(function(e, t, n, r) {
3096
+ var Xa = ji(function(e, t, n, r) {
2931
3097
  if (t.scroll) {
2932
- var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = ci(), l = !1, u;
2933
- Oa !== n && (Oa = n, Fa(), Da = t.scroll, u = t.scrollFn, Da === !0 && (Da = mi(n, !0)));
2934
- var d = 0, f = Da;
3098
+ var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = bi(), l = !1, u;
3099
+ Va !== n && (Va = n, Ja(), Ba = t.scroll, u = t.scrollFn, Ba === !0 && (Ba = Di(n, !0)));
3100
+ var d = 0, f = Ba;
2935
3101
  do {
2936
- var p = f, m = z(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = R(p), E = p.scrollLeft, ee = p.scrollTop;
3102
+ var p = f, m = B(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = z(p), E = p.scrollLeft, ee = p.scrollTop;
2937
3103
  p === c ? (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll" || T.overflowX === "visible"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll" || T.overflowY === "visible")) : (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll"));
2938
3104
  var D = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), O = S && (Math.abs(g - a) <= o && ee + b < w) - (Math.abs(h - a) <= o && !!ee);
2939
3105
  if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
2940
3106
  ($[d].vx != D || $[d].vy != O || $[d].el !== p) && ($[d].el = p, $[d].vx = D, $[d].vy = O, clearInterval($[d].pid), (D != 0 || O != 0) && (l = !0, $[d].pid = setInterval(function() {
2941
- r && this.layer === 0 && Q.active._onTouchMove(Ma);
3107
+ r && this.layer === 0 && Q.active._onTouchMove(Ga);
2942
3108
  var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
2943
- typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, Ma, $[this.layer].el) !== "continue" || bi($[this.layer].el, n, t);
3109
+ typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, Ga, $[this.layer].el) !== "continue" || Ni($[this.layer].el, n, t);
2944
3110
  }.bind({ layer: d }), 24))), d++;
2945
- } while (t.bubbleScroll && f !== c && (f = mi(f, !1)));
2946
- ka = l;
3111
+ } while (t.bubbleScroll && f !== c && (f = Di(f, !1)));
3112
+ Ha = l;
2947
3113
  }
2948
- }, 30), Ra = function(e) {
3114
+ }, 30), Za = function(e) {
2949
3115
  var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
2950
3116
  if (t) {
2951
3117
  var c = n || i;
@@ -2957,8 +3123,8 @@ var La = vi(function(e, t, n, r) {
2957
3123
  }));
2958
3124
  }
2959
3125
  };
2960
- function za() {}
2961
- za.prototype = {
3126
+ function Qa() {}
3127
+ Qa.prototype = {
2962
3128
  startIndex: null,
2963
3129
  dragStart: function(e) {
2964
3130
  var t = e.oldDraggableIndex;
@@ -2967,72 +3133,72 @@ za.prototype = {
2967
3133
  onSpill: function(e) {
2968
3134
  var t = e.dragEl, n = e.putSortable;
2969
3135
  this.sortable.captureAnimationState(), n && n.captureAnimationState();
2970
- var r = ui(this.sortable.el, this.startIndex, this.options);
3136
+ var r = Si(this.sortable.el, this.startIndex, this.options);
2971
3137
  r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
2972
3138
  },
2973
- drop: Ra
2974
- }, Wr(za, { pluginName: "revertOnSpill" });
2975
- function Ba() {}
2976
- Ba.prototype = {
3139
+ drop: Za
3140
+ }, ni(Qa, { pluginName: "revertOnSpill" });
3141
+ function $a() {}
3142
+ $a.prototype = {
2977
3143
  onSpill: function(e) {
2978
3144
  var t = e.dragEl, n = e.putSortable || this.sortable;
2979
3145
  n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
2980
3146
  },
2981
- drop: Ra
2982
- }, Wr(Ba, { pluginName: "removeOnSpill" }), Q.mount(new Pa()), Q.mount(Ba, za);
2983
- function Va(e) {
3147
+ drop: Za
3148
+ }, ni($a, { pluginName: "removeOnSpill" }), Q.mount(new qa()), Q.mount($a, Qa);
3149
+ function eo(e) {
2984
3150
  return e == null ? e : JSON.parse(JSON.stringify(e));
2985
3151
  }
2986
- function Ha(e) {
2987
- oe() && ee(e);
3152
+ function to(e) {
3153
+ ae() && ee(e);
2988
3154
  }
2989
- function Ua(e) {
2990
- oe() ? u(e) : r(e);
3155
+ function no(e) {
3156
+ ae() ? u(e) : r(e);
2991
3157
  }
2992
- var Wa = null, Ga = null;
2993
- function Ka(e = null, t = null) {
2994
- Wa = e, Ga = t;
3158
+ var ro = null, io = null;
3159
+ function ao(e = null, t = null) {
3160
+ ro = e, io = t;
2995
3161
  }
2996
- function qa() {
3162
+ function oo() {
2997
3163
  return {
2998
- data: Wa,
2999
- clonedData: Ga
3164
+ data: ro,
3165
+ clonedData: io
3000
3166
  };
3001
3167
  }
3002
- var Ja = Symbol("cloneElement");
3003
- function Ya(...e) {
3004
- let t = oe()?.proxy, n = null, i = e[0], [, o, c] = e;
3168
+ var so = Symbol("cloneElement");
3169
+ function co(...e) {
3170
+ let t = ae()?.proxy, n = null, i = e[0], [, o, c] = e;
3005
3171
  Array.isArray(j(o)) || (c = o, o = null);
3006
- let l = null, { immediate: u = !0, clone: d = Va, forceFallback: f, fallbackOnBody: p, customUpdate: m } = j(c) ?? {};
3172
+ let l = null, { immediate: u = !0, clone: d = eo, forceFallback: f, fallbackOnBody: p, customUpdate: m } = j(c) ?? {};
3007
3173
  function h(e) {
3008
3174
  let { from: t, oldIndex: r, item: i } = e, a = Array.from(t.childNodes);
3009
3175
  n = f && !p ? a.slice(0, -1) : a;
3010
3176
  let s = j(j(o)?.[r]), c = d(s);
3011
- Ka(s, c), i[Ja] = c;
3177
+ ao(s, c), i[so] = c;
3012
3178
  }
3013
3179
  function g(e) {
3014
- let t = e.item[Ja];
3015
- if (!kr(t)) {
3016
- if (Mr(e.item), a(o)) {
3180
+ let t = e.item[so];
3181
+ if (!Vr(t)) {
3182
+ if (Wr(e.item), a(o)) {
3017
3183
  let n = [...j(o)];
3018
- o.value = Or(n, e.newDraggableIndex, t);
3184
+ o.value = Br(n, e.newDraggableIndex, t);
3019
3185
  return;
3020
3186
  }
3021
- Or(j(o), e.newDraggableIndex, t);
3187
+ Br(j(o), e.newDraggableIndex, t);
3022
3188
  }
3023
3189
  }
3024
3190
  function _(e) {
3025
3191
  let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, pullMode: s, clone: c } = e;
3026
- if (jr(t, n, r), s === "clone") {
3027
- Mr(c);
3192
+ if (Ur(t, n, r), s === "clone") {
3193
+ Wr(c);
3028
3194
  return;
3029
3195
  }
3030
3196
  if (a(o)) {
3031
3197
  let e = [...j(o)];
3032
- o.value = Dr(e, i);
3198
+ o.value = zr(e, i);
3033
3199
  return;
3034
3200
  }
3035
- Dr(j(o), i);
3201
+ zr(j(o), i);
3036
3202
  }
3037
3203
  function v(e) {
3038
3204
  if (m) {
@@ -3040,12 +3206,12 @@ function Ya(...e) {
3040
3206
  return;
3041
3207
  }
3042
3208
  let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, newDraggableIndex: s } = e;
3043
- if (Mr(n), jr(t, n, r), a(o)) {
3209
+ if (Wr(n), Ur(t, n, r), a(o)) {
3044
3210
  let e = [...j(o)];
3045
- o.value = wr(e, i, s);
3211
+ o.value = Ir(e, i, s);
3046
3212
  return;
3047
3213
  }
3048
- wr(j(o), i, s);
3214
+ Ir(j(o), i, s);
3049
3215
  }
3050
3216
  function y(e) {
3051
3217
  let { newIndex: t, oldIndex: i, from: a, to: o } = e, s = null, c = t === i && a === o;
@@ -3064,7 +3230,7 @@ function Ya(...e) {
3064
3230
  n = null;
3065
3231
  }
3066
3232
  r(() => {
3067
- if (Ka(), s) throw s;
3233
+ if (ao(), s) throw s;
3068
3234
  });
3069
3235
  }
3070
3236
  let b = {
@@ -3076,19 +3242,19 @@ function Ya(...e) {
3076
3242
  };
3077
3243
  function x(e) {
3078
3244
  let n = j(i);
3079
- return e ||= Ar(n) ? Nr(n, t?.$el) : n, e && !Ir(e) && (e = e.$el), e || Cr("Root element not found"), e;
3245
+ return e ||= Hr(n) ? Gr(n, t?.$el) : n, e && !Jr(e) && (e = e.$el), e || Fr("Root element not found"), e;
3080
3246
  }
3081
3247
  function S() {
3082
- let e = j(c) ?? {}, { immediate: t, clone: n } = e, r = br(e, ["immediate", "clone"]);
3083
- return Lr(r, (e, t) => {
3084
- Rr(e) && (r[e] = (e, ...n) => (zr(e, qa()), t(e, ...n)));
3085
- }), Fr(o === null ? {} : b, r);
3248
+ let e = j(c) ?? {}, { immediate: t, clone: n } = e, r = Mr(e, ["immediate", "clone"]);
3249
+ return Yr(r, (e, t) => {
3250
+ Xr(e) && (r[e] = (e, ...n) => (Zr(e, oo()), t(e, ...n)));
3251
+ }), qr(o === null ? {} : b, r);
3086
3252
  }
3087
3253
  let C = (e) => {
3088
3254
  e = x(e), l && w.destroy(), l = new Q(e, S());
3089
3255
  };
3090
3256
  s(() => c, () => {
3091
- l && Lr(S(), (e, t) => {
3257
+ l && Yr(S(), (e, t) => {
3092
3258
  l?.option(e, t);
3093
3259
  });
3094
3260
  }, { deep: !0 });
@@ -3101,15 +3267,15 @@ function Ya(...e) {
3101
3267
  toArray: () => l?.toArray(),
3102
3268
  closest: (...e) => l?.closest(...e)
3103
3269
  };
3104
- return Ua(() => {
3270
+ return no(() => {
3105
3271
  u && C();
3106
- }), Ha(w.destroy), yr({
3272
+ }), to(w.destroy), jr({
3107
3273
  start: C,
3108
3274
  pause: () => w?.option("disabled", !0),
3109
3275
  resume: () => w?.option("disabled", !1)
3110
3276
  }, w);
3111
3277
  }
3112
- var Xa = [
3278
+ var lo = [
3113
3279
  "update",
3114
3280
  "start",
3115
3281
  "add",
@@ -3122,7 +3288,7 @@ var Xa = [
3122
3288
  "clone",
3123
3289
  "move",
3124
3290
  "change"
3125
- ], Za = y({
3291
+ ], uo = y({
3126
3292
  name: "VueDraggable",
3127
3293
  model: {
3128
3294
  prop: "modelValue",
@@ -3172,37 +3338,37 @@ var Xa = [
3172
3338
  "tag",
3173
3339
  "target",
3174
3340
  "customUpdate",
3175
- ...Xa.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
3341
+ ...lo.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
3176
3342
  ],
3177
- emits: ["update:modelValue", ...Xa],
3343
+ emits: ["update:modelValue", ...lo],
3178
3344
  setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
3179
- let a = Xa.reduce((e, t) => {
3345
+ let a = lo.reduce((e, t) => {
3180
3346
  let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
3181
3347
  return e[r] = (...e) => n(t, ...e), e;
3182
3348
  }, {}), s = x(() => {
3183
- let t = S(e), { modelValue: n } = t, r = br(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
3349
+ let t = S(e), { modelValue: n } = t, r = Mr(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
3184
3350
  let r = j(n);
3185
3351
  return r !== void 0 && (e[t] = r), e;
3186
3352
  }, {});
3187
- return yr(yr({}, a), Er(yr(yr({}, i), o)));
3353
+ return jr(jr({}, a), Rr(jr(jr({}, i), o)));
3188
3354
  }), c = x({
3189
3355
  get: () => e.modelValue,
3190
3356
  set: (e) => n("update:modelValue", e)
3191
- }), l = h(), u = o(Ya(e.target || l, c, s));
3357
+ }), l = h(), u = o(co(e.target || l, c, s));
3192
3358
  return r(u), () => f(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
3193
3359
  }
3194
- }), Qa = {
3360
+ }), fo = {
3195
3361
  mounted: "mounted",
3196
3362
  unmounted: "unmounted"
3197
3363
  };
3198
- Qa.mounted, Qa.unmounted;
3364
+ fo.mounted, fo.unmounted;
3199
3365
  //#endregion
3200
3366
  //#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
3201
- var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3367
+ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
3202
3368
  key: 0,
3203
3369
  "data-testid": "section-drop-hint",
3204
3370
  class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
3205
- }, no = /* @__PURE__ */ y({
3371
+ }, go = /* @__PURE__ */ y({
3206
3372
  __name: "SectionBlock",
3207
3373
  props: {
3208
3374
  block: {},
@@ -3210,13 +3376,13 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3210
3376
  },
3211
3377
  setup(n) {
3212
3378
  let r = {
3213
- title: pr,
3214
- paragraph: Xn,
3215
- image: Un,
3216
- button: Ht,
3217
- divider: Dn,
3218
- custom: Tn
3219
- }, a = n, { t: o } = lt(), s = ze($e, "SectionBlock"), l = ae(Je, null), u = ae(rt, null), d = x(() => {
3379
+ title: Tr,
3380
+ paragraph: cr,
3381
+ image: Yn,
3382
+ button: Jt,
3383
+ divider: Nn,
3384
+ custom: jn
3385
+ }, a = n, { t: o } = ct(), s = Re(Qe, "SectionBlock"), l = P(qe, null), u = P(nt, null), d = x(() => {
3220
3386
  switch (a.block.columns) {
3221
3387
  case "2": return ["50%", "50%"];
3222
3388
  case "3": return [
@@ -3237,12 +3403,12 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3237
3403
  return f.value[e] || [];
3238
3404
  }
3239
3405
  function m(e, t) {
3240
- let n = [...a.block.children];
3241
- for (; n.length <= e;) n.push([]);
3242
- n[e] = t, s.updateBlock(a.block.id, { children: n });
3406
+ let n = t.map((e) => JSON.parse(JSON.stringify(e))), r = [...a.block.children];
3407
+ for (; r.length <= e;) r.push([]);
3408
+ r[e] = n, s.updateBlock(a.block.id, { children: r });
3243
3409
  }
3244
3410
  function h(e) {
3245
- return Zn(e, u, r);
3411
+ return lr(e, u, r);
3246
3412
  }
3247
3413
  function g(e, t) {
3248
3414
  e.type === "custom" && s.updateBlock(e.id, {
@@ -3250,11 +3416,11 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3250
3416
  dataSourceFetched: t.dataSourceFetched
3251
3417
  });
3252
3418
  }
3253
- return (r, a) => (e(), w("div", $a, [C("div", eo, [(e(!0), w(D, null, c(f.value, (r, a) => (e(), w("div", {
3419
+ return (r, a) => (e(), w("div", po, [C("div", mo, [(e(!0), w(D, null, c(f.value, (r, a) => (e(), w("div", {
3254
3420
  key: a,
3255
3421
  class: v(["tpl:relative tpl:min-h-[60px] tpl:rounded", p(a).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
3256
3422
  style: A({ width: d.value[a] })
3257
- }, [N(j(Za), {
3423
+ }, [N(j(uo), {
3258
3424
  "model-value": p(a),
3259
3425
  group: {
3260
3426
  name: "blocks",
@@ -3263,19 +3429,22 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3263
3429
  },
3264
3430
  animation: 150,
3265
3431
  "ghost-class": "tpl-ghost",
3432
+ "drag-class": "tpl-dragging",
3433
+ handle: ".tpl-block-btn",
3266
3434
  "invert-swap": !0,
3267
3435
  "inverted-swap-threshold": .65,
3268
3436
  "empty-insert-threshold": 20,
3437
+ "force-fallback": !0,
3269
3438
  class: "tpl:min-h-[60px]",
3270
3439
  "onUpdate:modelValue": (e) => m(a, e)
3271
3440
  }, {
3272
- default: ce(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [N(dr, {
3441
+ default: se(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [N(Cr, {
3273
3442
  block: r,
3274
3443
  "is-selected": j(s).state.selectedBlockId === r.id,
3275
3444
  viewport: n.viewport,
3276
3445
  onSelect: (e) => j(s).selectBlock(r.id)
3277
3446
  }, {
3278
- default: ce(() => [(e(), ne(i(h(r)), {
3447
+ default: se(() => [(e(), ne(i(h(r)), {
3279
3448
  block: r,
3280
3449
  viewport: n.viewport,
3281
3450
  onFetchData: (e) => g(r, e)
@@ -3296,9 +3465,9 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3296
3465
  "model-value",
3297
3466
  "group",
3298
3467
  "onUpdate:modelValue"
3299
- ]), p(a).length === 0 ? (e(), w("div", to, [C("span", null, M(j(o).section.dropHere), 1)])) : O("", !0)], 6))), 128))])]));
3468
+ ]), p(a).length === 0 ? (e(), w("div", ho, [C("span", null, M(j(o).section.dropHere), 1)])) : O("", !0)], 6))), 128))])]));
3300
3469
  }
3301
- }), ro = {
3470
+ }), _o = {
3302
3471
  facebook: {
3303
3472
  name: "Facebook",
3304
3473
  color: "#1877F2",
@@ -3379,11 +3548,11 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3379
3548
  color: "#1769FF",
3380
3549
  path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
3381
3550
  }
3382
- }, io = {
3551
+ }, vo = {
3383
3552
  small: 24,
3384
3553
  medium: 32,
3385
3554
  large: 48
3386
- }, ao = [
3555
+ }, yo = [
3387
3556
  "facebook",
3388
3557
  "twitter",
3389
3558
  "instagram",
@@ -3400,11 +3569,11 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3400
3569
  "github",
3401
3570
  "dribbble",
3402
3571
  "behance"
3403
- ], oo = [
3572
+ ], bo = [
3404
3573
  "width",
3405
3574
  "height",
3406
3575
  "fill"
3407
- ], so = ["d"], co = /* @__PURE__ */ y({
3576
+ ], xo = ["d"], So = /* @__PURE__ */ y({
3408
3577
  __name: "SocialIconSvg",
3409
3578
  props: {
3410
3579
  platform: {},
@@ -3412,7 +3581,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3412
3581
  iconSize: {}
3413
3582
  },
3414
3583
  setup(t) {
3415
- let n = t, r = x(() => ro[n.platform]), i = x(() => io[n.iconSize]), a = x(() => {
3584
+ let n = t, r = x(() => _o[n.platform]), i = x(() => vo[n.iconSize]), a = x(() => {
3416
3585
  let e = {
3417
3586
  display: "inline-flex",
3418
3587
  alignItems: "center",
@@ -3456,25 +3625,25 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3456
3625
  viewBox: "0 0 24 24",
3457
3626
  fill: s.value,
3458
3627
  xmlns: "http://www.w3.org/2000/svg"
3459
- }, [C("path", { d: r.value.path }, null, 8, so)], 8, oo))], 4));
3628
+ }, [C("path", { d: r.value.path }, null, 8, xo)], 8, bo))], 4));
3460
3629
  }
3461
- }), lo = { class: "tpl:w-full" }, uo = ["href"], fo = {
3630
+ }), Co = { class: "tpl:w-full" }, wo = ["href"], To = {
3462
3631
  key: 1,
3463
3632
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
3464
- }, po = /* @__PURE__ */ y({
3633
+ }, Eo = /* @__PURE__ */ y({
3465
3634
  __name: "SocialIconsBlock",
3466
3635
  props: {
3467
3636
  block: {},
3468
3637
  viewport: {}
3469
3638
  },
3470
3639
  setup(t) {
3471
- let n = t, { t: r } = lt(), i = x(() => ({
3640
+ let n = t, { t: r } = ct(), i = x(() => ({
3472
3641
  display: "flex",
3473
3642
  flexWrap: "wrap",
3474
3643
  gap: `${n.block.spacing}px`,
3475
3644
  justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
3476
3645
  })), a = x(() => n.block.icons.length > 0);
3477
- return (n, o) => (e(), w("div", lo, [a.value ? (e(), w("div", {
3646
+ return (n, o) => (e(), w("div", Co, [a.value ? (e(), w("div", {
3478
3647
  key: 0,
3479
3648
  style: A(i.value)
3480
3649
  }, [(e(!0), w(D, null, c(t.block.icons, (n) => (e(), w("a", {
@@ -3482,7 +3651,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3482
3651
  href: n.url || "#",
3483
3652
  class: "tpl:cursor-default",
3484
3653
  onClick: o[0] ||= b(() => {}, ["prevent"])
3485
- }, [N(co, {
3654
+ }, [N(So, {
3486
3655
  platform: n.platform,
3487
3656
  "icon-style": t.block.iconStyle,
3488
3657
  "icon-size": t.block.iconSize
@@ -3490,44 +3659,44 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3490
3659
  "platform",
3491
3660
  "icon-style",
3492
3661
  "icon-size"
3493
- ])], 8, uo))), 128))], 4)) : (e(), w("div", fo, [N(j($t), { size: 16 }), C("span", null, M(j(r).social.addIcons), 1)]))]));
3662
+ ])], 8, wo))), 128))], 4)) : (e(), w("div", To, [N(j(on), { size: 16 }), C("span", null, M(j(r).social.addIcons), 1)]))]));
3494
3663
  }
3495
- }), mo = { class: "tpl:w-full" }, ho = {
3664
+ }), Do = { class: "tpl:w-full" }, Oo = {
3496
3665
  key: 0,
3497
3666
  class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
3498
3667
  style: {
3499
3668
  "background-color": "var(--tpl-bg-hover)",
3500
3669
  color: "var(--tpl-text-dim)"
3501
3670
  }
3502
- }, go = /* @__PURE__ */ y({
3671
+ }, ko = /* @__PURE__ */ y({
3503
3672
  __name: "SpacerBlock",
3504
3673
  props: {
3505
3674
  block: {},
3506
3675
  viewport: {}
3507
3676
  },
3508
3677
  setup(t) {
3509
- let n = t, r = ze($e, "SpacerBlock"), i = x(() => ({
3678
+ let n = t, r = Re(Qe, "SpacerBlock"), i = x(() => ({
3510
3679
  height: `${n.block.height}px`,
3511
3680
  minHeight: `${n.block.height}px`,
3512
3681
  ...r.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
3513
3682
  }));
3514
- return (n, a) => (e(), w("div", mo, [C("div", {
3683
+ return (n, a) => (e(), w("div", Do, [C("div", {
3515
3684
  style: A(i.value),
3516
3685
  class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(r).state.previewMode }])
3517
- }, [j(r).state.previewMode ? O("", !0) : (e(), w("span", ho, M(t.block.height) + "px ", 1))], 6)]));
3686
+ }, [j(r).state.previewMode ? O("", !0) : (e(), w("span", Oo, M(t.block.height) + "px ", 1))], 6)]));
3518
3687
  }
3519
- }), _o = { class: "tpl:w-full" }, vo = { key: 0 }, yo = [
3688
+ }), Ao = { class: "tpl:w-full" }, jo = { key: 0 }, Mo = [
3520
3689
  "aria-label",
3521
3690
  "data-placeholder",
3522
3691
  "onBlur"
3523
- ], bo = [
3692
+ ], No = [
3524
3693
  "aria-label",
3525
3694
  "data-placeholder",
3526
3695
  "onBlur"
3527
- ], xo = {
3696
+ ], Po = {
3528
3697
  key: 1,
3529
3698
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
3530
- }, So = /* @__PURE__ */ mt(/* @__PURE__ */ y({
3699
+ }, Fo = /* @__PURE__ */ pt(/* @__PURE__ */ y({
3531
3700
  __name: "TableBlock",
3532
3701
  props: {
3533
3702
  block: {},
@@ -3541,7 +3710,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3541
3710
  updated(e, t) {
3542
3711
  t.value !== t.oldValue && e.ownerDocument.activeElement !== e && (e.textContent = t.value ?? "");
3543
3712
  }
3544
- }, i = n, { t: a } = lt(), o = ze($e, "TableBlock"), s = x(() => i.block.rows.length > 0), l = x(() => ({
3713
+ }, i = n, { t: a } = ct(), o = Re(Qe, "TableBlock"), s = x(() => i.block.rows.length > 0), l = x(() => ({
3545
3714
  width: "100%",
3546
3715
  borderCollapse: "collapse",
3547
3716
  fontSize: `${i.block.fontSize}px`,
@@ -3570,11 +3739,11 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3570
3739
  } : n);
3571
3740
  o.updateBlock(i.block.id, { rows: a });
3572
3741
  }
3573
- return (n, i) => (e(), w("div", _o, [s.value ? (e(), w("table", {
3742
+ return (n, i) => (e(), w("div", Ao, [s.value ? (e(), w("table", {
3574
3743
  key: 0,
3575
3744
  style: A(l.value),
3576
3745
  class: "tpl-table-editable"
3577
- }, [f.value ? (e(), w("thead", vo, [C("tr", null, [(e(!0), w(D, null, c(f.value.cells, (n) => t((e(), w("th", {
3746
+ }, [f.value ? (e(), w("thead", jo, [C("tr", null, [(e(!0), w(D, null, c(f.value.cells, (n) => t((e(), w("th", {
3578
3747
  key: n.id,
3579
3748
  style: A(d.value),
3580
3749
  "aria-label": j(a).table.cellPlaceholder,
@@ -3583,7 +3752,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3583
3752
  onBlur: (e) => h(f.value.id, n.id, e),
3584
3753
  onKeydown: i[0] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
3585
3754
  onClick: b(m, ["stop"])
3586
- }, null, 44, yo)), [[r, n.content]])), 128))])])) : O("", !0), C("tbody", null, [(e(!0), w(D, null, c(p.value, (n) => (e(), w("tr", { key: n.id }, [(e(!0), w(D, null, c(n.cells, (o) => t((e(), w("td", {
3755
+ }, null, 44, Mo)), [[r, n.content]])), 128))])])) : O("", !0), C("tbody", null, [(e(!0), w(D, null, c(p.value, (n) => (e(), w("tr", { key: n.id }, [(e(!0), w(D, null, c(n.cells, (o) => t((e(), w("td", {
3587
3756
  key: o.id,
3588
3757
  style: A(u.value),
3589
3758
  "aria-label": j(a).table.cellPlaceholder,
@@ -3592,9 +3761,9 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3592
3761
  onBlur: (e) => h(n.id, o.id, e),
3593
3762
  onKeydown: i[1] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
3594
3763
  onClick: b(m, ["stop"])
3595
- }, null, 44, bo)), [[r, o.content]])), 128))]))), 128))])], 4)) : (e(), w("div", xo, [N(j(en), { size: 16 }), C("span", null, M(j(a).table.empty), 1)]))]));
3764
+ }, null, 44, No)), [[r, o.content]])), 128))]))), 128))])], 4)) : (e(), w("div", Po, [N(j(sn), { size: 16 }), C("span", null, M(j(a).table.empty), 1)]))]));
3596
3765
  }
3597
- }), [["__scopeId", "data-v-4f49860b"]]), Co = /* @__PURE__ */ y({
3766
+ }), [["__scopeId", "data-v-4f49860b"]]), Io = /* @__PURE__ */ y({
3598
3767
  __name: "VideoPlayButton",
3599
3768
  props: { hoverEffect: {
3600
3769
  type: Boolean,
@@ -3612,7 +3781,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3612
3781
  });
3613
3782
  //#endregion
3614
3783
  //#region src/utils/videoThumbnail.ts
3615
- function wo(e) {
3784
+ function Lo(e) {
3616
3785
  if (!e) return {
3617
3786
  platform: "unknown",
3618
3787
  videoId: null,
@@ -3644,31 +3813,31 @@ function wo(e) {
3644
3813
  thumbnailUrl: null
3645
3814
  };
3646
3815
  }
3647
- function To(e, t) {
3648
- return t || wo(e).thumbnailUrl;
3816
+ function Ro(e, t) {
3817
+ return t || Lo(e).thumbnailUrl;
3649
3818
  }
3650
3819
  //#endregion
3651
3820
  //#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
3652
- var Eo = ["src", "alt"], Do = {
3821
+ var zo = ["src", "alt"], Bo = {
3653
3822
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
3654
3823
  style: { opacity: "0.7" }
3655
- }, Oo = ["href"], ko = ["src", "alt"], Ao = ["src", "alt"], jo = {
3824
+ }, Vo = ["href"], Ho = ["src", "alt"], Uo = ["src", "alt"], Wo = {
3656
3825
  key: 3,
3657
3826
  class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
3658
- }, Mo = /* @__PURE__ */ y({
3827
+ }, Go = /* @__PURE__ */ y({
3659
3828
  __name: "VideoBlock",
3660
3829
  props: {
3661
3830
  block: {},
3662
3831
  viewport: {}
3663
3832
  },
3664
3833
  setup(t) {
3665
- let n = t, { t: r } = lt(), { syntax: i } = ht(), a = x(() => pe(n.block.url, i) || pe(n.block.thumbnailUrl, i)), o = x(() => a.value ? null : To(n.block.url, n.block.thumbnailUrl)), s = x(() => ({ textAlign: n.block.align })), c = x(() => ({
3834
+ let n = t, { t: r } = ct(), { syntax: i } = mt(), a = x(() => fe(n.block.url, i) || fe(n.block.thumbnailUrl, i)), o = x(() => a.value ? null : Ro(n.block.url, n.block.thumbnailUrl)), s = x(() => ({ textAlign: n.block.align })), c = x(() => ({
3666
3835
  maxWidth: "100%",
3667
3836
  width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
3668
3837
  display: "block",
3669
3838
  margin: n.block.align === "center" ? "0 auto" : void 0,
3670
3839
  marginLeft: n.block.align === "right" ? "auto" : void 0
3671
- })), l = x(() => pe(n.block.url, i) ? n.block.url : n.block.thumbnailUrl);
3840
+ })), l = x(() => fe(n.block.url, i) ? n.block.url : n.block.thumbnailUrl);
3672
3841
  return (n, i) => (e(), w("div", {
3673
3842
  class: "tpl:w-full",
3674
3843
  style: A(s.value)
@@ -3680,16 +3849,16 @@ var Eo = ["src", "alt"], Do = {
3680
3849
  class: "tpl:w-full tpl:border-0",
3681
3850
  src: t.block.placeholderUrl,
3682
3851
  alt: t.block.alt
3683
- }, null, 8, Eo), N(Co)], 4)) : a.value ? (e(), w("div", {
3852
+ }, null, 8, zo), N(Io)], 4)) : a.value ? (e(), w("div", {
3684
3853
  key: 1,
3685
3854
  class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
3686
3855
  style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
3687
- }, [N(j(tn), {
3856
+ }, [N(j(cn), {
3688
3857
  size: 36,
3689
3858
  "stroke-width": 1.5,
3690
3859
  class: "tpl:text-[var(--tpl-primary)]",
3691
3860
  style: { opacity: "0.5" }
3692
- }), C("span", Do, M(l.value), 1)], 4)) : o.value ? (e(), w(D, { key: 2 }, [t.block.url ? (e(), w("a", {
3861
+ }), C("span", Bo, M(l.value), 1)], 4)) : o.value ? (e(), w(D, { key: 2 }, [t.block.url ? (e(), w("a", {
3693
3862
  key: 0,
3694
3863
  href: t.block.url,
3695
3864
  target: "_blank",
@@ -3701,7 +3870,7 @@ var Eo = ["src", "alt"], Do = {
3701
3870
  class: "tpl:w-full tpl:border-0",
3702
3871
  src: o.value,
3703
3872
  alt: t.block.alt
3704
- }, null, 8, ko), N(Co, { "hover-effect": "" })], 12, Oo)) : (e(), w("div", {
3873
+ }, null, 8, Ho), N(Io, { "hover-effect": "" })], 12, Vo)) : (e(), w("div", {
3705
3874
  key: 1,
3706
3875
  class: "tpl:relative tpl:inline-block",
3707
3876
  style: A(c.value)
@@ -3709,64 +3878,73 @@ var Eo = ["src", "alt"], Do = {
3709
3878
  class: "tpl:w-full tpl:border-0",
3710
3879
  src: o.value,
3711
3880
  alt: t.block.alt
3712
- }, null, 8, Ao), N(Co)], 4))], 64)) : (e(), w("div", jo, [N(j(tn), {
3881
+ }, null, 8, Uo), N(Io)], 4))], 64)) : (e(), w("div", Wo, [N(j(cn), {
3713
3882
  size: 40,
3714
3883
  "stroke-width": 1.5,
3715
3884
  class: "tpl:text-[var(--tpl-border-light)]"
3716
3885
  }), C("span", null, M(j(r).video.addVideo), 1)]))], 4));
3717
3886
  }
3718
- }), No = {
3719
- section: no,
3720
- title: pr,
3721
- paragraph: Xn,
3722
- image: Un,
3723
- button: Ht,
3724
- divider: Dn,
3725
- video: Mo,
3726
- social: po,
3727
- menu: qn,
3728
- table: So,
3729
- spacer: go,
3730
- html: Mn,
3731
- countdown: se(() => import("./CountdownBlock-Cq8A8WrM.js").then((e) => e.n))
3887
+ }), Ko = {
3888
+ section: go,
3889
+ title: Tr,
3890
+ paragraph: cr,
3891
+ image: Yn,
3892
+ button: Jt,
3893
+ divider: Nn,
3894
+ video: Go,
3895
+ social: Eo,
3896
+ menu: $n,
3897
+ table: Fo,
3898
+ spacer: ko,
3899
+ html: Rn,
3900
+ countdown: oe(() => import("./CountdownBlock-ByJ0_8Pk.js").then((e) => e.n))
3732
3901
  };
3733
- function Po(e) {
3734
- let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = lt(r);
3902
+ function qo(e) {
3903
+ let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = ct(r);
3735
3904
  t.setUiTheme(n.uiTheme ?? "auto");
3736
- let { resolvedTheme: c } = kt(x(() => t.state.uiTheme)), l = h(n.theme ?? {}), { themeStyles: u } = jt({
3905
+ let { resolvedTheme: c } = Ft(x(() => t.state.uiTheme)), l = h(n.theme ?? {}), { themeStyles: u } = Lt({
3737
3906
  themeOverrides: l,
3738
3907
  resolvedTheme: c,
3739
3908
  extraStyles: e.themeExtraStyles
3740
- }), d = bt({
3909
+ }), d = xt({
3741
3910
  content: t.content,
3742
3911
  setContent: (e, n) => t.setContent(e, n),
3743
3912
  ...e.historyOptions
3744
3913
  });
3745
- Tt(t, d);
3746
- let f = xt({
3914
+ Dt(t, d);
3915
+ let f = Ct({
3747
3916
  addBlock: t.addBlock,
3748
3917
  removeBlock: t.removeBlock,
3749
3918
  updateBlock: t.updateBlock,
3750
3919
  selectBlock: t.selectBlock,
3920
+ findBlockLocation: t.findBlockLocation,
3751
3921
  blockDefaults: n.blockDefaults
3752
- }), p = Ct(t), m = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? St({
3922
+ }), m = Tt(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? wt({
3753
3923
  content: t.content,
3754
3924
  isDirty: () => t.state.isDirty,
3755
3925
  ...e.autoSaveOptions
3756
- }) : null, g = null;
3757
- m && (g = s(d.isNavigating, (e) => {
3758
- e ? m.pause() : m.resume();
3926
+ }) : null, _ = null;
3927
+ g && (_ = s(d.isNavigating, (e) => {
3928
+ e ? g.pause() : g.resume();
3759
3929
  }));
3760
- let _ = Ot(t, {
3930
+ let v = Pt(t, {
3761
3931
  t: a,
3762
3932
  format: o
3763
- }), v = Ft();
3764
- if (Lt(v, No), n.customBlocks?.length) for (let e of n.customBlocks) v.registerCustom(e, Tn);
3765
- function y(e) {
3766
- for (let t of e) v.registerCustom(t, Tn);
3767
- }
3768
- function b(r) {
3769
- zt(r, {
3933
+ }), y = Vt();
3934
+ if (Ut(y, Ko), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, jn);
3935
+ function b(e) {
3936
+ for (let t of e) y.registerCustom(t, jn);
3937
+ }
3938
+ let S = jt();
3939
+ if (p() && re(S.dispose), e.containerEl) {
3940
+ let t = e.containerEl;
3941
+ Ie(document, "pointerdown", (e) => {
3942
+ let n = t.value;
3943
+ n && (e.composedPath?.() ?? []).includes(n) && S.claim();
3944
+ }, { capture: !0 });
3945
+ }
3946
+ function C(r) {
3947
+ S.isActive() && Gt(r, {
3770
3948
  history: d,
3771
3949
  selectBlock: (e) => t.selectBlock(e),
3772
3950
  getSelectedBlockId: () => t.state.selectedBlockId,
@@ -3775,38 +3953,38 @@ function Po(e) {
3775
3953
  onBeforeUndo: e.keyboardOptions?.onBeforeUndo
3776
3954
  });
3777
3955
  }
3778
- Le(document, "keydown", b);
3779
- let S = h(null);
3780
- E(Ze, e.editorRoot ?? document), E(ot, S), E(He, r), E($e, t), E(We, d), E(Ge, f), E(Je, p), E(Xe, i), E(Ve, u), E(Qe, c), E(et, n.blockDefaults), E(rt, v), E(Ye, n.customBlocks ?? []);
3781
- let C = be(n.mergeTags?.syntax);
3782
- E(ct, n.mergeTags?.tags ?? []), E(st, C), E(Be, n.mergeTags?.onRequest ?? null), E(Ke, n.mergeTags?.autocomplete !== !1), E(Ue, n.onRequestMedia ?? null), E(tt, n.displayConditions?.conditions ?? []), E(nt, n.displayConditions?.allowCustom ?? !1), E(qe, e.capabilities ?? {}), E(at, _);
3783
- let w = n.accessibility?.disabled === !0 ? null : Et({
3956
+ Ie(document, "keydown", C);
3957
+ let w = h(null);
3958
+ E(Xe, e.editorRoot ?? document), E(at, w), E(Ve, r), E(Qe, t), E(Ue, d), E(We, f), E(qe, m), E(Ye, i), E(Be, u), E(Ze, c), E($e, n.blockDefaults), E(nt, y), E(Je, n.customBlocks ?? []);
3959
+ let T = ye(n.mergeTags?.syntax);
3960
+ E(st, n.mergeTags?.tags ?? []), E(ot, T), E(ze, n.mergeTags?.onRequest ?? null), E(Ge, n.mergeTags?.autocomplete !== !1), E(He, n.onRequestMedia ?? null), E(et, n.displayConditions?.conditions ?? []), E(tt, n.displayConditions?.allowCustom ?? !1), E(Ke, e.capabilities ?? {}), E(it, v);
3961
+ let ee = n.accessibility?.disabled === !0 ? null : Mt({
3784
3962
  content: t.content,
3785
3963
  options: n.accessibility ?? {},
3786
3964
  updateBlock: t.updateBlock,
3787
3965
  updateSettings: t.updateSettings
3788
3966
  });
3789
- E(it, w);
3790
- function T() {
3791
- g?.(), w?.destroy(), m?.destroy(), d.destroy();
3967
+ E(rt, ee);
3968
+ function D() {
3969
+ _?.(), ee?.destroy(), g?.destroy(), d.destroy();
3792
3970
  }
3793
3971
  return {
3794
3972
  t: a,
3795
3973
  format: o,
3796
3974
  history: d,
3797
3975
  blockActions: f,
3798
- conditionPreview: p,
3799
- autoSave: m,
3976
+ conditionPreview: m,
3977
+ autoSave: g,
3800
3978
  resolvedTheme: c,
3801
3979
  themeStyles: u,
3802
3980
  themeOverrides: l,
3803
- registry: v,
3804
- keyboardReorder: _,
3805
- accessibilityLint: w,
3806
- popoverRoot: S,
3807
- registerCustomBlocks: y,
3808
- destroy: T
3981
+ registry: y,
3982
+ keyboardReorder: v,
3983
+ accessibilityLint: ee,
3984
+ popoverRoot: w,
3985
+ registerCustomBlocks: b,
3986
+ destroy: D
3809
3987
  };
3810
3988
  }
3811
3989
  //#endregion
3812
- export { qt as A, ln as C, $t as D, en as E, Dt as F, wt as I, gt as L, Gt as M, Ht as N, Zt as O, Pt as P, un as S, an as T, Mn as _, po as a, gn as b, no as c, dr as d, Qn as f, Un as g, qn as h, go as i, Kt as j, Xt as k, Za as l, Xn as m, Mo as n, ro as o, Zn as p, So as r, ao as s, Po as t, pr as u, Dn as v, cn as w, mn as x, Tn as y };
3990
+ export { $t as A, hn as C, on as D, sn as E, Nt as F, Et as I, _t as L, Zt as M, Jt as N, rn as O, Bt as P, gn as S, dn as T, Rn as _, Eo as a, Sn as b, go as c, Cr as d, ur as f, Yn as g, $n as h, ko as i, Qt as j, nn as k, uo as l, cr as m, Go as n, _o as o, lr as p, Fo as r, yo as s, qo as t, Tr as u, Nn as v, mn as w, bn as x, jn as y };