@templatical/editor 0.9.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-BUKj9n02.js → AiChatSidebar-D30WPhbv.js} +2 -2
- package/dist/{AiFeatureMenu-Co14YVJt.js → AiFeatureMenu-B5CJX5zr.js} +3 -3
- package/dist/{BlockIssueBadge-DThKKeub.js → BlockIssueBadge-CkB4Yyz2.js} +2 -2
- package/dist/{CloudEditor-DHB1FoQD.js → CloudEditor-nT-R769W.js} +128 -127
- package/dist/{CollaboratorBar-Bc6q0gB9.js → CollaboratorBar-CwhlXODK.js} +2 -2
- package/dist/{CommentsSidebar-DiH4R4F0.js → CommentsSidebar-gpZMMI5w.js} +3 -3
- package/dist/{CountdownBlock-BTPefclD.js → CountdownBlock-BNvuXucv.js} +1 -1
- package/dist/{CountdownToolbar-Dvr2icg-.js → CountdownToolbar-Dl82DAmI.js} +2 -2
- package/dist/{DesignReferenceSidebar-BP32MgpS.js → DesignReferenceSidebar-Bs5AMxVd.js} +3 -3
- package/dist/{IssuesPanel-B1LT91IX.js → IssuesPanel-CqQa2BtU.js} +2 -2
- package/dist/{ModuleBrowserModal-CWegFoOA.js → ModuleBrowserModal-BWWgF0LC.js} +7 -7
- package/dist/{ModulePreviewCanvas-D9WUSSRT.js → ModulePreviewCanvas-D7Tk5HOt.js} +2 -2
- package/dist/{NumberWithSuffix-CxUBW_V2.js → NumberWithSuffix-DVy5HxMi.js} +1 -1
- package/dist/{ParagraphEditor-DrAz2yot.js → ParagraphEditor-DVSGdMOo.js} +7 -7
- package/dist/{RichTextEditorContent-gR169m1-.js → RichTextEditorContent-DN-fRjMa.js} +3 -3
- package/dist/{SaveModuleDialog-DWidA0c9.js → SaveModuleDialog-CkEYkyVD.js} +5 -5
- package/dist/{SnapshotHistory-CIo2Jaw-.js → SnapshotHistory-Nx9wrlbF.js} +3 -3
- package/dist/{TemplateScoringPanel-seBvvn8O.js → TemplateScoringPanel-BG9M-29t.js} +2 -2
- package/dist/{TestEmailModal-BuCuWp3N.js → TestEmailModal-CRjtEs6S.js} +3 -3
- package/dist/{TitleEditor-BmW0uMl7.js → TitleEditor-CvtV4pCA.js} +6 -6
- package/dist/{TplModal-YFpBaiLj.js → TplModal-BudEYVcJ.js} +3 -3
- package/dist/{blockTypeIcons-DCkHXPhx.js → blockTypeIcons-Dd-UvfnC.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-Dayzk2H7.js → AiFeatureMenu-DKOv8VnB.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-Dayzk2H7.js.map → AiFeatureMenu-DKOv8VnB.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-D_US2wqo.js → BlockIssueBadge-DpiSTwM7.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-D_US2wqo.js.map → BlockIssueBadge-DpiSTwM7.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-CrZk-OwQ.js → CloudEditor-xc_uOEgn.js} +169 -168
- package/dist/cdn/chunks/{CloudEditor-CrZk-OwQ.js.map → CloudEditor-xc_uOEgn.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-C4CFs5EJ.js → CollaboratorBar-VWfPri_h.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-C4CFs5EJ.js.map → CollaboratorBar-VWfPri_h.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-D6lCXhZA.js → CountdownBlock-BKsCWboK.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-D6lCXhZA.js.map → CountdownBlock-BKsCWboK.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BsGUxoRv.js → CountdownToolbar-BLtECDNb.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-BsGUxoRv.js.map → CountdownToolbar-BLtECDNb.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DeHTmRDz.js → IssuesPanel-BW2piyvs.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-DeHTmRDz.js.map → IssuesPanel-BW2piyvs.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-Cgjz4xAz.js → ModuleBrowserModal-TLlKpvjX.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-Cgjz4xAz.js.map → ModuleBrowserModal-TLlKpvjX.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-CeS9PsAA.js → ModulePreviewCanvas-wu7y-vrh.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-CeS9PsAA.js.map → ModulePreviewCanvas-wu7y-vrh.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-Bp-idLCc.js → NumberWithSuffix-DxoUtTMr.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-Bp-idLCc.js.map → NumberWithSuffix-DxoUtTMr.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-fM9aFu8T.js → ParagraphEditor-DvxIO2LN.js} +33 -33
- package/dist/cdn/chunks/{ParagraphEditor-fM9aFu8T.js.map → ParagraphEditor-DvxIO2LN.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DwNPE5H5.js → RichTextEditorContent-Dm9GXJmo.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-DwNPE5H5.js.map → RichTextEditorContent-Dm9GXJmo.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-BrtDXzIz.js → SaveModuleDialog-BRAdVcYM.js} +4 -4
- package/dist/cdn/chunks/{SaveModuleDialog-BrtDXzIz.js.map → SaveModuleDialog-BRAdVcYM.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-D0rSnye0.js → TitleEditor-D3gPRd0x.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-D0rSnye0.js.map → TitleEditor-D3gPRd0x.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-C2cm4RjU.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-YOEe5mDE.js.map → blockTypeIcons-C2cm4RjU.js.map} +1 -1
- package/dist/{de-CATfXDKV.js → cdn/chunks/de-DIAGP7yH.js} +2 -6
- package/dist/cdn/chunks/de-DIAGP7yH.js.map +1 -0
- package/dist/{en-CwCAgYL5.js → cdn/chunks/en-nqIW8Q9W.js} +2 -6
- package/dist/cdn/chunks/en-nqIW8Q9W.js.map +1 -0
- package/dist/cdn/chunks/{extensions-GYsbQFPr.js → extensions-SS1ywPUR.js} +21 -21
- package/dist/cdn/chunks/{extensions-GYsbQFPr.js.map → extensions-SS1ywPUR.js.map} +1 -1
- package/dist/cdn/chunks/{features-D-2kVhHY.js → features-CwZTdcbt.js} +988 -967
- package/dist/cdn/chunks/features-CwZTdcbt.js.map +1 -0
- package/dist/cdn/chunks/{icons-fZoyKV_s.js → icons-CbNEr1kc.js} +11 -25
- package/dist/cdn/chunks/icons-CbNEr1kc.js.map +1 -0
- package/dist/cdn/chunks/{media-library-CO2WOETY.js → media-library-BRpHZOl7.js} +76 -76
- package/dist/cdn/chunks/{media-library-CO2WOETY.js.map → media-library-BRpHZOl7.js.map} +1 -1
- package/dist/{pt-BR-D3Mg7AKe.js → cdn/chunks/pt-BR-DCNnLLx9.js} +2 -6
- package/dist/cdn/chunks/pt-BR-DCNnLLx9.js.map +1 -0
- package/dist/cdn/chunks/{quality-BxPiS-wv.js → quality-BqJqIPRU.js} +494 -484
- package/dist/cdn/chunks/quality-BqJqIPRU.js.map +1 -0
- package/dist/cdn/chunks/{renderer-CfHPFI5v.js → renderer-CGVYkdUi.js} +99 -82
- package/dist/cdn/chunks/renderer-CGVYkdUi.js.map +1 -0
- package/dist/cdn/chunks/{src-ftxPuuQh.js → src-CvzfrFlT.js} +8 -8
- package/dist/cdn/chunks/{src-ftxPuuQh.js.map → src-CvzfrFlT.js.map} +1 -1
- package/dist/cdn/chunks/{styles-CVUvPdKD.js → styles-2P5yvfsS.js} +1043 -1072
- package/dist/cdn/chunks/styles-2P5yvfsS.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +109 -100
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-VxYMtfXC.js → cloud-BBC7bv8q.js} +1 -1
- package/dist/{cdn/chunks/de-CATfXDKV.js → de-DIAGP7yH.js} +0 -8
- package/dist/{dist-CIV3Brg-.js → dist-GAmhYvUK.js} +3 -5
- package/dist/{cdn/chunks/en-CwCAgYL5.js → en-nqIW8Q9W.js} +0 -8
- package/dist/{extensions-Mj2-D8uK.js → extensions-C87ZSllQ.js} +3 -3
- package/dist/index.d.ts +8 -0
- package/dist/keys-Vt3XipJl.js +10 -0
- package/dist/{cdn/chunks/pt-BR-D3Mg7AKe.js → pt-BR-DCNnLLx9.js} +0 -8
- package/dist/style.css +1 -1
- package/dist/{styles-CxwIlb7Y.js → styles-DOjWbqA9.js} +1031 -1074
- package/dist/templatical-editor.js +116 -107
- package/dist/{useCloudI18n-DKWJg6rJ.js → useCloudI18n-sRfoQCZY.js} +1 -1
- package/dist/{useEditorCore-CEkf_VWX.js → useEditorCore-DxApq2hZ.js} +713 -690
- package/dist/{useI18n-Besvmtxy.js → useI18n-lF6hYgZu.js} +1 -1
- package/dist/{useMergeTag-WNzaCpXR.js → useMergeTag-CZVI7Xe5.js} +3 -3
- package/dist/{usePopoverRoot-CKt956u-.js → usePopoverRoot-p2BanBI7.js} +1 -1
- package/package.json +8 -8
- package/dist/cdn/chunks/blockTypeIcons-YOEe5mDE.js +0 -22
- package/dist/cdn/chunks/de-CATfXDKV.js.map +0 -1
- package/dist/cdn/chunks/en-CwCAgYL5.js.map +0 -1
- package/dist/cdn/chunks/features-D-2kVhHY.js.map +0 -1
- package/dist/cdn/chunks/icons-fZoyKV_s.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-D3Mg7AKe.js.map +0 -1
- package/dist/cdn/chunks/quality-BxPiS-wv.js.map +0 -1
- package/dist/cdn/chunks/renderer-CfHPFI5v.js.map +0 -1
- package/dist/cdn/chunks/styles-CVUvPdKD.js.map +0 -1
- package/dist/keys-BiQlvx51.js +0 -10
|
@@ -1,24 +1,24 @@
|
|
|
1
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-BDSGA5hA.js";
|
|
2
|
-
import { A as le,
|
|
3
|
-
import { c as
|
|
4
|
-
import { A as
|
|
5
|
-
import { t as
|
|
2
|
+
import { A as le, E as ue, S as de, T as fe, _ as pe, a as me, b as he, c as ge, d as _e, f as ve, g as ye, h as be, j as xe, k as Se, l as Ce, m as we, o as Te, p as Ee, s as De, t as Oe, u as ke, v as Ae, x as je, y as Me } from "./dist-GAmhYvUK.js";
|
|
3
|
+
import { c as Ne, i as Pe, l as Fe, n as Ie, o as Le, r as Re, u as ze } from "./dist-CNLAS2v2.js";
|
|
4
|
+
import { A as Be, C as Ve, M as He, O as Ue, S as We, T as Ge, _ as Ke, a as qe, b as Je, d as Ye, f as Xe, g as Ze, h as Qe, i as $e, j as et, k as tt, m as nt, n as rt, o as it, p as at, s as ot, u as st, v as ct, w as lt, x as ut, y as dt } from "./keys-Vt3XipJl.js";
|
|
5
|
+
import { t as ft } from "./useI18n-lF6hYgZu.js";
|
|
6
6
|
import { t as P } from "./createLucideIcon-XgXOJ05E.js";
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import "./useCloudI18n-
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
7
|
+
import { t as pt } from "./message-circle-D-umK_MU.js";
|
|
8
|
+
import { t as mt } from "./trash-2-BpY5BCLT.js";
|
|
9
|
+
import { t as ht } from "./triangle-alert-MwJBKR2e.js";
|
|
10
|
+
import { t as gt } from "./LoadingTrack-xCOLUR3o.js";
|
|
11
|
+
import { t as _t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
12
|
+
import "./useCloudI18n-sRfoQCZY.js";
|
|
13
|
+
import { t as vt } from "./useMergeTag-CZVI7Xe5.js";
|
|
14
|
+
import { t as yt } from "./useAliveFlag-BLyG8L4d.js";
|
|
15
15
|
//#region ../core/dist/index.js
|
|
16
|
-
function
|
|
16
|
+
function bt(e) {
|
|
17
17
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function xt(e) {
|
|
20
20
|
let t = o({
|
|
21
|
-
content: e.content ??
|
|
21
|
+
content: e.content ?? ke(e.defaultFontFamily, e.templateDefaults),
|
|
22
22
|
selectedBlockId: null,
|
|
23
23
|
viewport: "desktop",
|
|
24
24
|
darkMode: !1,
|
|
@@ -106,7 +106,7 @@ function yt(e) {
|
|
|
106
106
|
if (c(n)) return;
|
|
107
107
|
let o = i(t.content.blocks, n);
|
|
108
108
|
if (o && o.type === "section") {
|
|
109
|
-
if (r < 0 || r >=
|
|
109
|
+
if (r < 0 || r >= bt(o.columns)) return;
|
|
110
110
|
o.children[r] = o.children[r] || [];
|
|
111
111
|
let t = o.children[r];
|
|
112
112
|
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
@@ -138,7 +138,7 @@ function yt(e) {
|
|
|
138
138
|
let u;
|
|
139
139
|
if (r) {
|
|
140
140
|
let e = i(t.content.blocks, r);
|
|
141
|
-
if (!e || e.type !== "section" || a < 0 || a >=
|
|
141
|
+
if (!e || e.type !== "section" || a < 0 || a >= bt(e.columns)) return;
|
|
142
142
|
e.children[a] = e.children[a] || [], u = e.children[a];
|
|
143
143
|
} else u = t.content.blocks;
|
|
144
144
|
let [d] = o.blocks.splice(l, 1);
|
|
@@ -167,9 +167,9 @@ function yt(e) {
|
|
|
167
167
|
findBlockLocation: l
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
var
|
|
171
|
-
function
|
|
172
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
170
|
+
var St = 50, Ct = 300, wt = 1500;
|
|
171
|
+
function Tt(e) {
|
|
172
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = St } = e, a = h([]), o = h([]), s = h(!1), c = null, l = null, u = m(() => a.value.length > 0), d = m(() => o.value.length > 0);
|
|
173
173
|
function f() {
|
|
174
174
|
let e = /* @__PURE__ */ new WeakSet();
|
|
175
175
|
return JSON.parse(JSON.stringify(t.value, (t, n) => {
|
|
@@ -194,21 +194,21 @@ function Ct(e) {
|
|
|
194
194
|
if (l && l.blockId === e) {
|
|
195
195
|
clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
|
|
196
196
|
l = null;
|
|
197
|
-
},
|
|
197
|
+
}, Ct);
|
|
198
198
|
return;
|
|
199
199
|
}
|
|
200
200
|
g(), p(f()), o.value = [], l = {
|
|
201
201
|
blockId: e,
|
|
202
202
|
timeoutId: setTimeout(() => {
|
|
203
203
|
l = null;
|
|
204
|
-
},
|
|
204
|
+
}, Ct)
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
function y() {
|
|
209
209
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
210
210
|
s.value = !1, c = null;
|
|
211
|
-
},
|
|
211
|
+
}, wt);
|
|
212
212
|
}
|
|
213
213
|
function b() {
|
|
214
214
|
if (a.value.length === 0) return;
|
|
@@ -240,33 +240,33 @@ function Ct(e) {
|
|
|
240
240
|
destroy: C
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function Et(e) {
|
|
244
244
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
245
245
|
...e,
|
|
246
|
-
id:
|
|
246
|
+
id: de(),
|
|
247
247
|
cells: e.cells.map((e) => ({
|
|
248
248
|
...e,
|
|
249
|
-
id:
|
|
249
|
+
id: de()
|
|
250
250
|
}))
|
|
251
251
|
})) : e.type === "social" ? e.icons = e.icons.map((e) => ({
|
|
252
252
|
...e,
|
|
253
|
-
id:
|
|
253
|
+
id: de()
|
|
254
254
|
})) : e.type === "menu" && (e.items = e.items.map((e) => ({
|
|
255
255
|
...e,
|
|
256
|
-
id:
|
|
256
|
+
id: de()
|
|
257
257
|
})));
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function Dt(e) {
|
|
260
260
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
261
261
|
function o(n, r, a) {
|
|
262
|
-
let o =
|
|
262
|
+
let o = Te(n, e.blockDefaults);
|
|
263
263
|
return t(o, r, a), i(o.id), o;
|
|
264
264
|
}
|
|
265
265
|
function s(e, n, r) {
|
|
266
266
|
let o = JSON.parse(JSON.stringify(e));
|
|
267
|
-
if (o.id =
|
|
267
|
+
if (o.id = de(), Et(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
268
268
|
let t = JSON.parse(JSON.stringify(e));
|
|
269
|
-
return t.id =
|
|
269
|
+
return t.id = de(), Et(t), t;
|
|
270
270
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
271
271
|
else {
|
|
272
272
|
let i = a?.(e.id) ?? null;
|
|
@@ -287,7 +287,7 @@ function Tt(e) {
|
|
|
287
287
|
updateBlockProperty: l
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function Ot(e) {
|
|
291
291
|
let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
|
|
292
292
|
function c() {
|
|
293
293
|
return typeof a == "function" ? a() : a;
|
|
@@ -323,7 +323,7 @@ function Et(e) {
|
|
|
323
323
|
destroy: h
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function kt(e) {
|
|
327
327
|
let t = o(/* @__PURE__ */ new Set()), n = m(() => t.size > 0);
|
|
328
328
|
function r(e) {
|
|
329
329
|
return t.has(e);
|
|
@@ -341,7 +341,7 @@ function Dt(e) {
|
|
|
341
341
|
hasHiddenBlocks: n
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function At(e) {
|
|
345
345
|
let t = h(!1), n = h(!1), r = m(() => !!e.definition.value?.dataSource), i = m(() => r.value && !e.block.value.dataSourceFetched);
|
|
346
346
|
async function a() {
|
|
347
347
|
let r = e.definition.value;
|
|
@@ -371,7 +371,7 @@ function Ot(e) {
|
|
|
371
371
|
needsFetch: i
|
|
372
372
|
};
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function jt(e, t) {
|
|
375
375
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
376
376
|
e.addBlock = (r, i, a, o) => {
|
|
377
377
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -387,26 +387,26 @@ function kt(e, t) {
|
|
|
387
387
|
}
|
|
388
388
|
//#endregion
|
|
389
389
|
//#region src/utils/activeEditorTracker.ts
|
|
390
|
-
var
|
|
391
|
-
function
|
|
392
|
-
let e = ++
|
|
393
|
-
return
|
|
390
|
+
var Mt = /* @__PURE__ */ new Set(), Nt = 0, Pt = 0;
|
|
391
|
+
function Ft() {
|
|
392
|
+
let e = ++Pt;
|
|
393
|
+
return Mt.add(e), Nt === 0 && (Nt = e), {
|
|
394
394
|
id: e,
|
|
395
|
-
isActive: () =>
|
|
395
|
+
isActive: () => Mt.size <= 1 || Nt === e,
|
|
396
396
|
claim: () => {
|
|
397
|
-
|
|
397
|
+
Nt = e;
|
|
398
398
|
},
|
|
399
399
|
dispose: () => {
|
|
400
|
-
if (
|
|
401
|
-
let e = Array.from(
|
|
402
|
-
|
|
400
|
+
if (Mt.delete(e), Nt === e) {
|
|
401
|
+
let e = Array.from(Mt);
|
|
402
|
+
Nt = e[e.length - 1] ?? 0;
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
};
|
|
406
406
|
}
|
|
407
407
|
//#endregion
|
|
408
408
|
//#region src/composables/useMergeTagPicker.ts
|
|
409
|
-
function
|
|
409
|
+
function It() {
|
|
410
410
|
let e = h(!1), t = h([]), n = null;
|
|
411
411
|
function r(r) {
|
|
412
412
|
if (n) {
|
|
@@ -436,21 +436,17 @@ function Pt() {
|
|
|
436
436
|
}
|
|
437
437
|
//#endregion
|
|
438
438
|
//#region src/composables/useTemplateLint.ts
|
|
439
|
-
function
|
|
439
|
+
function Lt(e) {
|
|
440
440
|
return e ? e.disabled === !0 ? !0 : e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
let t = h([]), n = h(!1), r = h(!1), i = d(null), a =
|
|
442
|
+
function Rt(e) {
|
|
443
|
+
let t = h([]), n = h(!1), r = h(!1), i = d(null), a = Lt(e.options), o = null, c = !1;
|
|
444
444
|
a || l();
|
|
445
445
|
async function l() {
|
|
446
446
|
try {
|
|
447
447
|
let t = await import("@templatical/quality");
|
|
448
448
|
if (c) return;
|
|
449
|
-
i.value = {
|
|
450
|
-
lintAccessibility: t.lintAccessibility,
|
|
451
|
-
lintStructure: t.lintStructure,
|
|
452
|
-
lintLinks: t.lintLinks
|
|
453
|
-
}, n.value = !0, u(), o = Re(e.content, u, {
|
|
449
|
+
i.value = { lintTemplate: t.lintTemplate }, n.value = !0, u(), o = ze(e.content, u, {
|
|
454
450
|
debounce: e.debounce ?? 500,
|
|
455
451
|
deep: !0
|
|
456
452
|
});
|
|
@@ -460,13 +456,7 @@ function It(e) {
|
|
|
460
456
|
}
|
|
461
457
|
}
|
|
462
458
|
function u() {
|
|
463
|
-
|
|
464
|
-
let n = i.value.lintAccessibility(e.content.value, e.options), r = i.value.lintStructure(e.content.value, e.options), a = i.value.lintLinks(e.content.value, e.options);
|
|
465
|
-
t.value = [
|
|
466
|
-
...n,
|
|
467
|
-
...r,
|
|
468
|
-
...a
|
|
469
|
-
];
|
|
459
|
+
i.value && (t.value = i.value.lintTemplate(e.content.value, e.options));
|
|
470
460
|
}
|
|
471
461
|
let f = s(() => e.options, () => {
|
|
472
462
|
i.value && u();
|
|
@@ -491,12 +481,12 @@ function It(e) {
|
|
|
491
481
|
}
|
|
492
482
|
//#endregion
|
|
493
483
|
//#region src/utils/blockTypeLabels.ts
|
|
494
|
-
function
|
|
484
|
+
function zt(e, t) {
|
|
495
485
|
return t.blocks[e] ?? e;
|
|
496
486
|
}
|
|
497
487
|
//#endregion
|
|
498
488
|
//#region src/composables/useKeyboardReorder.ts
|
|
499
|
-
function
|
|
489
|
+
function Bt(e, t) {
|
|
500
490
|
let n = h(null), r = h(""), i = null;
|
|
501
491
|
function a(t) {
|
|
502
492
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -523,7 +513,7 @@ function Rt(e, t) {
|
|
|
523
513
|
let r = a(n);
|
|
524
514
|
if (!r) return "";
|
|
525
515
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
526
|
-
return i ?
|
|
516
|
+
return i ? zt(i.type, t.t) : "";
|
|
527
517
|
}
|
|
528
518
|
function s(t, n) {
|
|
529
519
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -592,13 +582,13 @@ function Rt(e, t) {
|
|
|
592
582
|
}
|
|
593
583
|
//#endregion
|
|
594
584
|
//#region src/composables/useUiTheme.ts
|
|
595
|
-
function
|
|
596
|
-
let t =
|
|
585
|
+
function Vt(e) {
|
|
586
|
+
let t = Pe("(prefers-color-scheme: dark)");
|
|
597
587
|
return { resolvedTheme: x(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
598
588
|
}
|
|
599
589
|
//#endregion
|
|
600
590
|
//#region src/composables/useThemeStyles.ts
|
|
601
|
-
var
|
|
591
|
+
var Ht = {
|
|
602
592
|
bg: "--tpl-bg",
|
|
603
593
|
bgElevated: "--tpl-bg-elevated",
|
|
604
594
|
bgHover: "--tpl-bg-hover",
|
|
@@ -622,10 +612,10 @@ var Bt = {
|
|
|
622
612
|
dangerLight: "--tpl-danger-light",
|
|
623
613
|
canvasBg: "--tpl-canvas-bg"
|
|
624
614
|
};
|
|
625
|
-
function
|
|
615
|
+
function Ut({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
626
616
|
return { themeStyles: x(() => {
|
|
627
617
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
628
|
-
if (a) for (let [e, t] of Object.entries(
|
|
618
|
+
if (a) for (let [e, t] of Object.entries(Ht)) {
|
|
629
619
|
let n = a[e];
|
|
630
620
|
n && (r[t] = n);
|
|
631
621
|
}
|
|
@@ -634,27 +624,27 @@ function Vt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
634
624
|
}
|
|
635
625
|
//#endregion
|
|
636
626
|
//#region src/utils/logger.ts
|
|
637
|
-
var
|
|
638
|
-
function
|
|
627
|
+
var Wt = "[Templatical]";
|
|
628
|
+
function Gt() {
|
|
639
629
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
640
630
|
}
|
|
641
|
-
var
|
|
631
|
+
var Kt = {
|
|
642
632
|
warn(...e) {
|
|
643
|
-
console.warn(
|
|
633
|
+
console.warn(Wt, ...e);
|
|
644
634
|
},
|
|
645
635
|
error(...e) {
|
|
646
|
-
console.error(
|
|
636
|
+
console.error(Wt, ...e);
|
|
647
637
|
},
|
|
648
638
|
debug(...e) {
|
|
649
|
-
|
|
639
|
+
Gt() || console.debug(Wt, ...e);
|
|
650
640
|
},
|
|
651
641
|
info(...e) {
|
|
652
|
-
|
|
642
|
+
Gt() || console.info(Wt, ...e);
|
|
653
643
|
}
|
|
654
644
|
};
|
|
655
645
|
//#endregion
|
|
656
646
|
//#region src/composables/useBlockRegistry.ts
|
|
657
|
-
function
|
|
647
|
+
function qt() {
|
|
658
648
|
let e = d(/* @__PURE__ */ new Map());
|
|
659
649
|
function t(t, n) {
|
|
660
650
|
e.value.set(t, n), k(e);
|
|
@@ -662,7 +652,7 @@ function Gt() {
|
|
|
662
652
|
function n(t, n) {
|
|
663
653
|
let r = `custom:${t.type}`, i = {
|
|
664
654
|
component: n,
|
|
665
|
-
createBlock: () =>
|
|
655
|
+
createBlock: () => Ce(t),
|
|
666
656
|
sidebarItem: {
|
|
667
657
|
type: r,
|
|
668
658
|
label: t.name,
|
|
@@ -706,7 +696,7 @@ function Gt() {
|
|
|
706
696
|
strictFilters: !1
|
|
707
697
|
}).parseAndRender(t.template, e.fieldValues);
|
|
708
698
|
} catch (t) {
|
|
709
|
-
return
|
|
699
|
+
return Kt.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
710
700
|
}
|
|
711
701
|
}
|
|
712
702
|
function l(t) {
|
|
@@ -724,76 +714,109 @@ function Gt() {
|
|
|
724
714
|
};
|
|
725
715
|
}
|
|
726
716
|
//#endregion
|
|
717
|
+
//#region src/composables/useCustomBlockStylesheets.ts
|
|
718
|
+
function Jt(e, t) {
|
|
719
|
+
return x(() => {
|
|
720
|
+
let n = Yt(e.value.blocks);
|
|
721
|
+
if (n.size === 0) return [];
|
|
722
|
+
let r = /* @__PURE__ */ new Set(), i = [];
|
|
723
|
+
for (let e of n) {
|
|
724
|
+
let n = t.getDefinition(e)?.stylesheet;
|
|
725
|
+
if (!n) continue;
|
|
726
|
+
let a = n.trim();
|
|
727
|
+
a === "" || r.has(a) || (r.add(a), i.push(a));
|
|
728
|
+
}
|
|
729
|
+
return i;
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
function Yt(e) {
|
|
733
|
+
let t = /* @__PURE__ */ new Set();
|
|
734
|
+
return Xt(e, t), t;
|
|
735
|
+
}
|
|
736
|
+
function Xt(e, t) {
|
|
737
|
+
for (let n of e) {
|
|
738
|
+
if (ue(n)) {
|
|
739
|
+
t.add(n.customType);
|
|
740
|
+
continue;
|
|
741
|
+
}
|
|
742
|
+
if (n.type === "section") {
|
|
743
|
+
let e = n.children;
|
|
744
|
+
if (!e) continue;
|
|
745
|
+
for (let n of e) Xt(n, t);
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
//#endregion
|
|
727
750
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
728
|
-
var
|
|
751
|
+
var Zt = [
|
|
729
752
|
{
|
|
730
753
|
type: "section",
|
|
731
754
|
label: "Section",
|
|
732
|
-
createBlock:
|
|
755
|
+
createBlock: ye
|
|
733
756
|
},
|
|
734
757
|
{
|
|
735
758
|
type: "title",
|
|
736
759
|
label: "Title",
|
|
737
|
-
createBlock:
|
|
760
|
+
createBlock: he
|
|
738
761
|
},
|
|
739
762
|
{
|
|
740
763
|
type: "paragraph",
|
|
741
764
|
label: "Paragraph",
|
|
742
|
-
createBlock:
|
|
765
|
+
createBlock: be
|
|
743
766
|
},
|
|
744
767
|
{
|
|
745
768
|
type: "image",
|
|
746
769
|
label: "Image",
|
|
747
|
-
createBlock:
|
|
770
|
+
createBlock: Ee
|
|
748
771
|
},
|
|
749
772
|
{
|
|
750
773
|
type: "button",
|
|
751
774
|
label: "Button",
|
|
752
|
-
createBlock:
|
|
775
|
+
createBlock: De
|
|
753
776
|
},
|
|
754
777
|
{
|
|
755
778
|
type: "divider",
|
|
756
779
|
label: "Divider",
|
|
757
|
-
createBlock:
|
|
780
|
+
createBlock: _e
|
|
758
781
|
},
|
|
759
782
|
{
|
|
760
783
|
type: "video",
|
|
761
784
|
label: "Video",
|
|
762
|
-
createBlock:
|
|
785
|
+
createBlock: je
|
|
763
786
|
},
|
|
764
787
|
{
|
|
765
788
|
type: "social",
|
|
766
789
|
label: "Social",
|
|
767
|
-
createBlock:
|
|
790
|
+
createBlock: pe
|
|
768
791
|
},
|
|
769
792
|
{
|
|
770
793
|
type: "menu",
|
|
771
794
|
label: "Menu",
|
|
772
|
-
createBlock:
|
|
795
|
+
createBlock: we
|
|
773
796
|
},
|
|
774
797
|
{
|
|
775
798
|
type: "table",
|
|
776
799
|
label: "Table",
|
|
777
|
-
createBlock:
|
|
800
|
+
createBlock: Me
|
|
778
801
|
},
|
|
779
802
|
{
|
|
780
803
|
type: "spacer",
|
|
781
804
|
label: "Spacer",
|
|
782
|
-
createBlock:
|
|
805
|
+
createBlock: Ae
|
|
783
806
|
},
|
|
784
807
|
{
|
|
785
808
|
type: "html",
|
|
786
809
|
label: "HTML",
|
|
787
|
-
createBlock:
|
|
810
|
+
createBlock: ve
|
|
788
811
|
},
|
|
789
812
|
{
|
|
790
813
|
type: "countdown",
|
|
791
814
|
label: "Countdown",
|
|
792
|
-
createBlock:
|
|
815
|
+
createBlock: ge
|
|
793
816
|
}
|
|
794
817
|
];
|
|
795
|
-
function
|
|
796
|
-
for (let n of
|
|
818
|
+
function Qt(e, t) {
|
|
819
|
+
for (let n of Zt) {
|
|
797
820
|
let r = t[n.type];
|
|
798
821
|
r && e.registerBuiltIn(n.type, {
|
|
799
822
|
component: r,
|
|
@@ -808,7 +831,7 @@ function qt(e, t) {
|
|
|
808
831
|
}
|
|
809
832
|
//#endregion
|
|
810
833
|
//#region src/utils/keyboardShortcuts.ts
|
|
811
|
-
function
|
|
834
|
+
function $t(e) {
|
|
812
835
|
for (let t of e.composedPath()) {
|
|
813
836
|
if (!(t instanceof HTMLElement)) continue;
|
|
814
837
|
if (t.isContentEditable) return !0;
|
|
@@ -817,14 +840,14 @@ function Jt(e) {
|
|
|
817
840
|
}
|
|
818
841
|
return !1;
|
|
819
842
|
}
|
|
820
|
-
function
|
|
843
|
+
function en(e, t) {
|
|
821
844
|
let n = e.metaKey || e.ctrlKey;
|
|
822
845
|
if (n && e.key.toLowerCase() === "s") {
|
|
823
846
|
e.preventDefault(), t.onSave?.();
|
|
824
847
|
return;
|
|
825
848
|
}
|
|
826
849
|
if (n && e.key.toLowerCase() === "z") {
|
|
827
|
-
if (
|
|
850
|
+
if ($t(e)) return;
|
|
828
851
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
829
852
|
return;
|
|
830
853
|
}
|
|
@@ -832,11 +855,11 @@ function Yt(e, t) {
|
|
|
832
855
|
t.selectBlock(null);
|
|
833
856
|
return;
|
|
834
857
|
}
|
|
835
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() &&
|
|
858
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !$t(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
836
859
|
}
|
|
837
860
|
//#endregion
|
|
838
861
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
839
|
-
var
|
|
862
|
+
var tn = { class: "tpl:text-center" }, nn = ["href"], rn = /* @__PURE__ */ y({
|
|
840
863
|
__name: "ButtonBlock",
|
|
841
864
|
props: {
|
|
842
865
|
block: {},
|
|
@@ -857,17 +880,17 @@ var Xt = { class: "tpl:text-center" }, Zt = ["href"], Qt = /* @__PURE__ */ y({
|
|
|
857
880
|
};
|
|
858
881
|
return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
|
|
859
882
|
});
|
|
860
|
-
return (n, i) => (e(), w("div",
|
|
883
|
+
return (n, i) => (e(), w("div", tn, [C("a", {
|
|
861
884
|
href: t.block.url || "#",
|
|
862
885
|
style: A(r.value),
|
|
863
886
|
class: "tpl:cursor-default",
|
|
864
887
|
onClick: i[0] ||= b(() => {}, ["prevent"])
|
|
865
|
-
}, M(t.block.text), 13,
|
|
888
|
+
}, M(t.block.text), 13, nn)]));
|
|
866
889
|
}
|
|
867
|
-
}),
|
|
890
|
+
}), an = P("bookmark", [["path", {
|
|
868
891
|
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",
|
|
869
892
|
key: "oz39mx"
|
|
870
|
-
}]]),
|
|
893
|
+
}]]), on = P("box", [
|
|
871
894
|
["path", {
|
|
872
895
|
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",
|
|
873
896
|
key: "hh9hay"
|
|
@@ -880,13 +903,13 @@ var Xt = { class: "tpl:text-center" }, Zt = ["href"], Qt = /* @__PURE__ */ y({
|
|
|
880
903
|
d: "M12 22V12",
|
|
881
904
|
key: "d0xqtd"
|
|
882
905
|
}]
|
|
883
|
-
]),
|
|
906
|
+
]), sn = P("code", [["path", {
|
|
884
907
|
d: "m16 18 6-6-6-6",
|
|
885
908
|
key: "eg8j8"
|
|
886
909
|
}], ["path", {
|
|
887
910
|
d: "m8 6-6 6 6 6",
|
|
888
911
|
key: "ppft3o"
|
|
889
|
-
}]]),
|
|
912
|
+
}]]), cn = P("copy", [["rect", {
|
|
890
913
|
width: "14",
|
|
891
914
|
height: "14",
|
|
892
915
|
x: "8",
|
|
@@ -897,7 +920,7 @@ var Xt = { class: "tpl:text-center" }, Zt = ["href"], Qt = /* @__PURE__ */ y({
|
|
|
897
920
|
}], ["path", {
|
|
898
921
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
899
922
|
key: "zix9uf"
|
|
900
|
-
}]]),
|
|
923
|
+
}]]), ln = P("eye-off", [
|
|
901
924
|
["path", {
|
|
902
925
|
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",
|
|
903
926
|
key: "ct8e1f"
|
|
@@ -914,10 +937,10 @@ var Xt = { class: "tpl:text-center" }, Zt = ["href"], Qt = /* @__PURE__ */ y({
|
|
|
914
937
|
d: "m2 2 20 20",
|
|
915
938
|
key: "1ooewy"
|
|
916
939
|
}]
|
|
917
|
-
]),
|
|
940
|
+
]), un = P("funnel", [["path", {
|
|
918
941
|
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",
|
|
919
942
|
key: "sc7q7i"
|
|
920
|
-
}]]),
|
|
943
|
+
}]]), dn = P("grip-vertical", [
|
|
921
944
|
["circle", {
|
|
922
945
|
cx: "9",
|
|
923
946
|
cy: "12",
|
|
@@ -954,7 +977,7 @@ var Xt = { class: "tpl:text-center" }, Zt = ["href"], Qt = /* @__PURE__ */ y({
|
|
|
954
977
|
r: "1",
|
|
955
978
|
key: "f4zoj3"
|
|
956
979
|
}]
|
|
957
|
-
]),
|
|
980
|
+
]), fn = P("image", [
|
|
958
981
|
["rect", {
|
|
959
982
|
width: "18",
|
|
960
983
|
height: "18",
|
|
@@ -974,13 +997,13 @@ var Xt = { class: "tpl:text-center" }, Zt = ["href"], Qt = /* @__PURE__ */ y({
|
|
|
974
997
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
975
998
|
key: "1xmnt7"
|
|
976
999
|
}]
|
|
977
|
-
]),
|
|
1000
|
+
]), pn = P("navigation", [["polygon", {
|
|
978
1001
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
979
1002
|
key: "1ltx0t"
|
|
980
|
-
}]]),
|
|
1003
|
+
}]]), mn = P("puzzle", [["path", {
|
|
981
1004
|
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",
|
|
982
1005
|
key: "w46dr5"
|
|
983
|
-
}]]),
|
|
1006
|
+
}]]), hn = P("share-2", [
|
|
984
1007
|
["circle", {
|
|
985
1008
|
cx: "18",
|
|
986
1009
|
cy: "5",
|
|
@@ -1013,7 +1036,7 @@ var Xt = { class: "tpl:text-center" }, Zt = ["href"], Qt = /* @__PURE__ */ y({
|
|
|
1013
1036
|
y2: "10.49",
|
|
1014
1037
|
key: "1n3mei"
|
|
1015
1038
|
}]
|
|
1016
|
-
]),
|
|
1039
|
+
]), gn = P("table", [
|
|
1017
1040
|
["path", {
|
|
1018
1041
|
d: "M12 3v18",
|
|
1019
1042
|
key: "108xh3"
|
|
@@ -1034,7 +1057,7 @@ var Xt = { class: "tpl:text-center" }, Zt = ["href"], Qt = /* @__PURE__ */ y({
|
|
|
1034
1057
|
d: "M3 15h18",
|
|
1035
1058
|
key: "5xshup"
|
|
1036
1059
|
}]
|
|
1037
|
-
]),
|
|
1060
|
+
]), _n = P("video", [["path", {
|
|
1038
1061
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1039
1062
|
key: "ftymec"
|
|
1040
1063
|
}], ["rect", {
|
|
@@ -1044,11 +1067,11 @@ var Xt = { class: "tpl:text-center" }, Zt = ["href"], Qt = /* @__PURE__ */ y({
|
|
|
1044
1067
|
height: "12",
|
|
1045
1068
|
rx: "2",
|
|
1046
1069
|
key: "158x01"
|
|
1047
|
-
}]]),
|
|
1070
|
+
}]]), vn = ["innerHTML"], yn = [
|
|
1048
1071
|
"src",
|
|
1049
1072
|
"width",
|
|
1050
1073
|
"height"
|
|
1051
|
-
],
|
|
1074
|
+
], bn = /* @__PURE__ */ y({
|
|
1052
1075
|
__name: "CustomBlockIcon",
|
|
1053
1076
|
props: {
|
|
1054
1077
|
icon: {},
|
|
@@ -1064,14 +1087,14 @@ var Xt = { class: "tpl:text-center" }, Zt = ["href"], Qt = /* @__PURE__ */ y({
|
|
|
1064
1087
|
height: `${r.value}px`
|
|
1065
1088
|
}),
|
|
1066
1089
|
innerHTML: t.icon
|
|
1067
|
-
}, null, 12,
|
|
1090
|
+
}, null, 12, vn)) : a.value ? (e(), w("img", {
|
|
1068
1091
|
key: 1,
|
|
1069
1092
|
src: t.icon,
|
|
1070
1093
|
width: r.value,
|
|
1071
1094
|
height: r.value,
|
|
1072
1095
|
class: "tpl:inline-block",
|
|
1073
1096
|
alt: ""
|
|
1074
|
-
}, null, 8,
|
|
1097
|
+
}, null, 8, yn)) : (e(), ne(j(on), {
|
|
1075
1098
|
key: 2,
|
|
1076
1099
|
size: r.value,
|
|
1077
1100
|
"stroke-width": 1.5
|
|
@@ -1080,16 +1103,16 @@ var Xt = { class: "tpl:text-center" }, Zt = ["href"], Qt = /* @__PURE__ */ y({
|
|
|
1080
1103
|
});
|
|
1081
1104
|
//#endregion
|
|
1082
1105
|
//#region src/composables/useEditorRoot.ts
|
|
1083
|
-
function
|
|
1084
|
-
return ae(
|
|
1106
|
+
function xn() {
|
|
1107
|
+
return ae(Qe, document) ?? document;
|
|
1085
1108
|
}
|
|
1086
1109
|
//#endregion
|
|
1087
1110
|
//#region src/composables/useFocusTrap.ts
|
|
1088
|
-
var
|
|
1089
|
-
function
|
|
1090
|
-
let n =
|
|
1111
|
+
var Sn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1112
|
+
function Cn(e, t) {
|
|
1113
|
+
let n = xn(), r = null, i = null, a = null;
|
|
1091
1114
|
function o() {
|
|
1092
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1115
|
+
return e.value ? Array.from(e.value.querySelectorAll(Sn)).filter((e) => e.offsetParent !== null) : [];
|
|
1093
1116
|
}
|
|
1094
1117
|
function c(e) {
|
|
1095
1118
|
if (e.key !== "Tab") return;
|
|
@@ -1104,7 +1127,7 @@ function vn(e, t) {
|
|
|
1104
1127
|
a = null;
|
|
1105
1128
|
let t = o();
|
|
1106
1129
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1107
|
-
}), i =
|
|
1130
|
+
}), i = Re(e, "keydown", c);
|
|
1108
1131
|
}
|
|
1109
1132
|
function u(e = {}) {
|
|
1110
1133
|
let t = e.restoreFocus !== !1;
|
|
@@ -1119,8 +1142,8 @@ function vn(e, t) {
|
|
|
1119
1142
|
}
|
|
1120
1143
|
//#endregion
|
|
1121
1144
|
//#region src/composables/useEmoji.ts
|
|
1122
|
-
function
|
|
1123
|
-
let [e, t] =
|
|
1145
|
+
function wn() {
|
|
1146
|
+
let [e, t] = Fe(!1), n = d([]), r = !1;
|
|
1124
1147
|
re(() => {
|
|
1125
1148
|
r = !0;
|
|
1126
1149
|
}), s(e, async (e) => {
|
|
@@ -1145,7 +1168,7 @@ function yn() {
|
|
|
1145
1168
|
}
|
|
1146
1169
|
//#endregion
|
|
1147
1170
|
//#region src/composables/useDragDrop.ts
|
|
1148
|
-
function
|
|
1171
|
+
function Tn(e) {
|
|
1149
1172
|
let { onBlockMove: t, onBlockAdd: n } = e, r = h(!1), i = h(null), a = h(null);
|
|
1150
1173
|
function o(e) {
|
|
1151
1174
|
r.value = !0, i.value = e;
|
|
@@ -1195,7 +1218,7 @@ function bn(e) {
|
|
|
1195
1218
|
}
|
|
1196
1219
|
//#endregion
|
|
1197
1220
|
//#region src/composables/useFonts.ts
|
|
1198
|
-
var
|
|
1221
|
+
var En = [
|
|
1199
1222
|
{
|
|
1200
1223
|
value: "Arial",
|
|
1201
1224
|
label: "Arial"
|
|
@@ -1224,7 +1247,7 @@ var xn = [
|
|
|
1224
1247
|
value: "Courier New",
|
|
1225
1248
|
label: "Courier New"
|
|
1226
1249
|
}
|
|
1227
|
-
],
|
|
1250
|
+
], Dn = {
|
|
1228
1251
|
arial: "Arial, sans-serif",
|
|
1229
1252
|
helvetica: "Helvetica, sans-serif",
|
|
1230
1253
|
georgia: "Georgia, serif",
|
|
@@ -1232,14 +1255,14 @@ var xn = [
|
|
|
1232
1255
|
verdana: "Verdana, sans-serif",
|
|
1233
1256
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1234
1257
|
"courier new": "'Courier New', monospace"
|
|
1235
|
-
},
|
|
1236
|
-
function
|
|
1237
|
-
let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ??
|
|
1258
|
+
}, On = "Arial, sans-serif";
|
|
1259
|
+
function kn(e) {
|
|
1260
|
+
let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ?? On);
|
|
1238
1261
|
function a(e) {
|
|
1239
1262
|
n.value = e;
|
|
1240
1263
|
}
|
|
1241
1264
|
let o = x(() => {
|
|
1242
|
-
let e = [...
|
|
1265
|
+
let e = [...En];
|
|
1243
1266
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
1244
1267
|
let r = t.value.map((e) => ({
|
|
1245
1268
|
value: e.name,
|
|
@@ -1252,17 +1275,17 @@ function wn(e) {
|
|
|
1252
1275
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1253
1276
|
}
|
|
1254
1277
|
function c(e) {
|
|
1255
|
-
return
|
|
1278
|
+
return En.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1256
1279
|
}
|
|
1257
1280
|
function l() {
|
|
1258
1281
|
if (e?.defaultFont) {
|
|
1259
|
-
if (!n.value && !c(e.defaultFont)) return
|
|
1282
|
+
if (!n.value && !c(e.defaultFont)) return On;
|
|
1260
1283
|
if (s(e.defaultFont)) {
|
|
1261
1284
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1262
1285
|
if (t) return t.value;
|
|
1263
1286
|
}
|
|
1264
1287
|
}
|
|
1265
|
-
return
|
|
1288
|
+
return On;
|
|
1266
1289
|
}
|
|
1267
1290
|
let u = x(() => l());
|
|
1268
1291
|
function d(e) {
|
|
@@ -1272,7 +1295,7 @@ function wn(e) {
|
|
|
1272
1295
|
let e = n.fallback ?? i.value;
|
|
1273
1296
|
return `'${n.name}', ${e}`;
|
|
1274
1297
|
}
|
|
1275
|
-
return
|
|
1298
|
+
return Dn[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1276
1299
|
}
|
|
1277
1300
|
let f = [], m = !1;
|
|
1278
1301
|
async function g() {
|
|
@@ -1288,7 +1311,7 @@ function wn(e) {
|
|
|
1288
1311
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1289
1312
|
});
|
|
1290
1313
|
} catch (t) {
|
|
1291
|
-
|
|
1314
|
+
Kt.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1292
1315
|
}
|
|
1293
1316
|
});
|
|
1294
1317
|
await Promise.allSettled(e), !m && (r.value = !0);
|
|
@@ -1315,9 +1338,9 @@ function wn(e) {
|
|
|
1315
1338
|
}
|
|
1316
1339
|
//#endregion
|
|
1317
1340
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1318
|
-
function
|
|
1341
|
+
function An(e) {
|
|
1319
1342
|
let t = h(!1), n = h(""), r = h(null);
|
|
1320
|
-
|
|
1343
|
+
Cn(r, t);
|
|
1321
1344
|
function i() {
|
|
1322
1345
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
1323
1346
|
}
|
|
@@ -1368,8 +1391,8 @@ function Tn(e) {
|
|
|
1368
1391
|
}
|
|
1369
1392
|
//#endregion
|
|
1370
1393
|
//#region src/composables/useRichTextEditor.ts
|
|
1371
|
-
function
|
|
1372
|
-
let t = ae(
|
|
1394
|
+
function jn(e) {
|
|
1395
|
+
let t = ae(nt, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = vt(), f = ae(Be, null), p = (a(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = fe(l), g = d(null), { showLinkDialog: _, linkUrl: v, linkDialogRef: y, openLinkDialog: b, insertLink: x, removeLink: S, closeLinkDialog: C, handleLinkKeydown: w } = An(g), { start: T, stop: E } = Ne(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ee = d(null), D = h(!0), O = h(null), k = !1;
|
|
1373
1396
|
async function te() {
|
|
1374
1397
|
O.value = null, D.value = !0;
|
|
1375
1398
|
try {
|
|
@@ -1399,7 +1422,7 @@ function En(e) {
|
|
|
1399
1422
|
g.value = s, D.value = !1, T();
|
|
1400
1423
|
} catch (t) {
|
|
1401
1424
|
if (k) return;
|
|
1402
|
-
|
|
1425
|
+
Kt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), O.value = t instanceof Error ? t.message : "Failed to load editor", D.value = !1;
|
|
1403
1426
|
}
|
|
1404
1427
|
}
|
|
1405
1428
|
function A() {
|
|
@@ -1414,7 +1437,7 @@ function En(e) {
|
|
|
1414
1437
|
let n = t.composedPath().find((e) => e instanceof HTMLElement);
|
|
1415
1438
|
n && (e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone());
|
|
1416
1439
|
}
|
|
1417
|
-
|
|
1440
|
+
Re(document, "mousedown", re), n(() => {
|
|
1418
1441
|
k = !0, ne(), E(), g.value?.destroy();
|
|
1419
1442
|
});
|
|
1420
1443
|
async function j() {
|
|
@@ -1447,20 +1470,20 @@ function En(e) {
|
|
|
1447
1470
|
}
|
|
1448
1471
|
//#endregion
|
|
1449
1472
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1450
|
-
var
|
|
1473
|
+
var Mn = { class: "tpl:w-full" }, Nn = {
|
|
1451
1474
|
key: 0,
|
|
1452
1475
|
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)]"
|
|
1453
|
-
},
|
|
1476
|
+
}, Pn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Fn = {
|
|
1454
1477
|
key: 1,
|
|
1455
1478
|
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)]"
|
|
1456
|
-
},
|
|
1479
|
+
}, In = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ln = {
|
|
1457
1480
|
key: 2,
|
|
1458
1481
|
class: "tpl:relative"
|
|
1459
|
-
},
|
|
1482
|
+
}, Rn = ["innerHTML"], zn = {
|
|
1460
1483
|
key: 0,
|
|
1461
1484
|
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]",
|
|
1462
1485
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1463
|
-
},
|
|
1486
|
+
}, Bn = /* @__PURE__ */ y({
|
|
1464
1487
|
__name: "CustomBlock",
|
|
1465
1488
|
props: {
|
|
1466
1489
|
block: {},
|
|
@@ -1468,7 +1491,7 @@ var Dn = { class: "tpl:w-full" }, On = {
|
|
|
1468
1491
|
},
|
|
1469
1492
|
emits: ["fetchData"],
|
|
1470
1493
|
setup(t, { emit: n }) {
|
|
1471
|
-
let r = t, i = n, { t: a } =
|
|
1494
|
+
let r = t, i = n, { t: a } = ft(), o = ae(it, 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 } = At({
|
|
1472
1495
|
definition: d,
|
|
1473
1496
|
block: x(() => r.block),
|
|
1474
1497
|
onUpdate: (e, t) => {
|
|
@@ -1489,15 +1512,15 @@ var Dn = { class: "tpl:w-full" }, On = {
|
|
|
1489
1512
|
}
|
|
1490
1513
|
}
|
|
1491
1514
|
}
|
|
1492
|
-
let S =
|
|
1515
|
+
let S = Le(y, 150);
|
|
1493
1516
|
return u(() => {
|
|
1494
1517
|
y();
|
|
1495
1518
|
}), s(() => r.block.fieldValues, () => {
|
|
1496
1519
|
S();
|
|
1497
|
-
}, { deep: !0 }), (t, n) => (e(), w("div",
|
|
1520
|
+
}, { deep: !0 }), (t, n) => (e(), w("div", Mn, [f.value ? l.value ? (e(), w("div", Fn, [N(j(ht), {
|
|
1498
1521
|
size: 24,
|
|
1499
1522
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1500
|
-
}), C("span",
|
|
1523
|
+
}), C("span", In, M(j(a).customBlocks.renderError), 1)])) : (e(), w("div", Ln, [C("div", { innerHTML: c.value }, null, 8, Rn), j(v) && j(g) ? (e(), w("div", zn, [j(p) ? (e(), ne(gt, {
|
|
1501
1524
|
key: 1,
|
|
1502
1525
|
class: "tpl:w-48"
|
|
1503
1526
|
})) : (e(), w("button", {
|
|
@@ -1505,16 +1528,16 @@ var Dn = { class: "tpl:w-full" }, On = {
|
|
|
1505
1528
|
type: "button",
|
|
1506
1529
|
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)]",
|
|
1507
1530
|
onClick: n[0] ||= b((...e) => j(m) && j(m)(...e), ["stop"])
|
|
1508
|
-
}, [d.value?.icon ? (e(), ne(
|
|
1531
|
+
}, [d.value?.icon ? (e(), ne(bn, {
|
|
1509
1532
|
key: 0,
|
|
1510
1533
|
icon: d.value.icon,
|
|
1511
1534
|
size: 16
|
|
1512
|
-
}, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div",
|
|
1535
|
+
}, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div", Nn, [N(j(mn), {
|
|
1513
1536
|
size: 24,
|
|
1514
1537
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1515
|
-
}), C("span",
|
|
1538
|
+
}), C("span", Pn, M(j(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1516
1539
|
}
|
|
1517
|
-
}),
|
|
1540
|
+
}), Vn = { class: "tpl:w-full" }, Hn = /* @__PURE__ */ y({
|
|
1518
1541
|
__name: "DividerBlock",
|
|
1519
1542
|
props: {
|
|
1520
1543
|
block: {},
|
|
@@ -1526,37 +1549,37 @@ var Dn = { class: "tpl:w-full" }, On = {
|
|
|
1526
1549
|
width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
|
|
1527
1550
|
margin: n.block.width === "full" ? "0" : "0 auto"
|
|
1528
1551
|
}));
|
|
1529
|
-
return (t, n) => (e(), w("div",
|
|
1552
|
+
return (t, n) => (e(), w("div", Vn, [C("hr", {
|
|
1530
1553
|
class: "tpl:m-0 tpl:border-none",
|
|
1531
1554
|
style: A(r.value)
|
|
1532
1555
|
}, null, 4)]));
|
|
1533
1556
|
}
|
|
1534
|
-
}),
|
|
1557
|
+
}), Un = { class: "tpl:w-full" }, Wn = { 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)]" }, Gn = {
|
|
1535
1558
|
key: 0,
|
|
1536
1559
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1537
|
-
},
|
|
1560
|
+
}, Kn = {
|
|
1538
1561
|
key: 1,
|
|
1539
1562
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1540
|
-
},
|
|
1563
|
+
}, qn = /* @__PURE__ */ y({
|
|
1541
1564
|
__name: "HtmlBlock",
|
|
1542
1565
|
props: {
|
|
1543
1566
|
block: {},
|
|
1544
1567
|
viewport: {}
|
|
1545
1568
|
},
|
|
1546
1569
|
setup(t) {
|
|
1547
|
-
let n = t, { t: r } =
|
|
1548
|
-
return (t, n) => (e(), w("div",
|
|
1570
|
+
let n = t, { t: r } = ft(), i = x(() => n.block.content.trim().length > 0);
|
|
1571
|
+
return (t, n) => (e(), w("div", Un, [C("div", Wn, [N(j(sn), {
|
|
1549
1572
|
size: 24,
|
|
1550
1573
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1551
|
-
}), i.value ? (e(), w("span",
|
|
1574
|
+
}), i.value ? (e(), w("span", Gn, M(j(r).html.preview), 1)) : (e(), w("span", Kn, M(j(r).html.empty), 1))])]));
|
|
1552
1575
|
}
|
|
1553
|
-
}),
|
|
1576
|
+
}), Jn = ["href"], Yn = ["src", "alt"], Xn = ["src", "alt"], Zn = {
|
|
1554
1577
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1555
1578
|
style: { opacity: "0.7" }
|
|
1556
|
-
},
|
|
1579
|
+
}, Qn = ["href"], $n = ["src", "alt"], er = ["src", "alt"], tr = {
|
|
1557
1580
|
key: 3,
|
|
1558
1581
|
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)]"
|
|
1559
|
-
},
|
|
1582
|
+
}, nr = ["aria-label"], rr = { key: 1 }, ir = /* @__PURE__ */ y({
|
|
1560
1583
|
__name: "ImageBlock",
|
|
1561
1584
|
props: {
|
|
1562
1585
|
block: {},
|
|
@@ -1564,7 +1587,7 @@ var Dn = { class: "tpl:w-full" }, On = {
|
|
|
1564
1587
|
},
|
|
1565
1588
|
emits: ["update"],
|
|
1566
1589
|
setup(t, { emit: n }) {
|
|
1567
|
-
let r = t, i = n, { t: a } =
|
|
1590
|
+
let r = t, i = n, { t: a } = ft(), { syntax: o } = vt(), s = ae(Ve, null), c = x(() => !!s), l = yt();
|
|
1568
1591
|
async function u() {
|
|
1569
1592
|
let e = await s?.({ accept: ["images"] });
|
|
1570
1593
|
if (l.alive && e) {
|
|
@@ -1581,7 +1604,7 @@ var Dn = { class: "tpl:w-full" }, On = {
|
|
|
1581
1604
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1582
1605
|
marginRight: e === "center" ? "auto" : void 0
|
|
1583
1606
|
};
|
|
1584
|
-
}), p = x(() =>
|
|
1607
|
+
}), p = x(() => me(r.block.src, o));
|
|
1585
1608
|
return (n, r) => (e(), w("div", {
|
|
1586
1609
|
class: "tpl:w-full",
|
|
1587
1610
|
style: A(d.value)
|
|
@@ -1597,22 +1620,22 @@ var Dn = { class: "tpl:w-full" }, On = {
|
|
|
1597
1620
|
src: t.block.placeholderUrl,
|
|
1598
1621
|
alt: t.block.alt || j(a).image.altTextPlaceholder,
|
|
1599
1622
|
style: A(f.value)
|
|
1600
|
-
}, null, 12,
|
|
1623
|
+
}, null, 12, Yn)], 8, Jn)) : (e(), w("img", {
|
|
1601
1624
|
key: 1,
|
|
1602
1625
|
class: "tpl:border-0",
|
|
1603
1626
|
src: t.block.placeholderUrl,
|
|
1604
1627
|
alt: t.block.alt,
|
|
1605
1628
|
style: A(f.value)
|
|
1606
|
-
}, null, 12,
|
|
1629
|
+
}, null, 12, Xn))], 64)) : t.block.src && p.value ? (e(), w("div", {
|
|
1607
1630
|
key: 1,
|
|
1608
1631
|
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)]",
|
|
1609
1632
|
style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, f.value])
|
|
1610
|
-
}, [N(j(
|
|
1633
|
+
}, [N(j(fn), {
|
|
1611
1634
|
size: 32,
|
|
1612
1635
|
"stroke-width": 1.5,
|
|
1613
1636
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1614
1637
|
style: { opacity: "0.5" }
|
|
1615
|
-
}), C("span",
|
|
1638
|
+
}), C("span", Zn, M(t.block.src), 1)], 4)) : t.block.src ? (e(), w(D, { key: 2 }, [t.block.linkUrl ? (e(), w("a", {
|
|
1616
1639
|
key: 0,
|
|
1617
1640
|
href: t.block.linkUrl,
|
|
1618
1641
|
target: "_blank",
|
|
@@ -1624,33 +1647,33 @@ var Dn = { class: "tpl:w-full" }, On = {
|
|
|
1624
1647
|
src: t.block.src,
|
|
1625
1648
|
alt: t.block.alt || j(a).image.altTextPlaceholder,
|
|
1626
1649
|
style: A(f.value)
|
|
1627
|
-
}, null, 12,
|
|
1650
|
+
}, null, 12, $n)], 8, Qn)) : (e(), w("img", {
|
|
1628
1651
|
key: 1,
|
|
1629
1652
|
class: "tpl:border-0",
|
|
1630
1653
|
src: t.block.src,
|
|
1631
1654
|
alt: t.block.alt,
|
|
1632
1655
|
style: A(f.value)
|
|
1633
|
-
}, null, 12,
|
|
1656
|
+
}, null, 12, er))], 64)) : (e(), w("div", tr, [c.value ? (e(), w("button", {
|
|
1634
1657
|
key: 0,
|
|
1635
1658
|
"aria-label": j(a).image.browseMedia,
|
|
1636
1659
|
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)]",
|
|
1637
1660
|
onClick: b(u, ["stop"])
|
|
1638
|
-
}, [N(j(
|
|
1661
|
+
}, [N(j(fn), {
|
|
1639
1662
|
size: 14,
|
|
1640
1663
|
"stroke-width": 1.5
|
|
1641
|
-
}), _(" " + M(j(a).image.browseMedia), 1)], 8,
|
|
1664
|
+
}), _(" " + M(j(a).image.browseMedia), 1)], 8, nr)) : (e(), w("span", rr, M(j(a).image.clickToAdd), 1))]))], 4));
|
|
1642
1665
|
}
|
|
1643
|
-
}),
|
|
1666
|
+
}), ar = { class: "tpl:w-full" }, or = ["href"], sr = {
|
|
1644
1667
|
key: 1,
|
|
1645
1668
|
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)]"
|
|
1646
|
-
},
|
|
1669
|
+
}, cr = /* @__PURE__ */ y({
|
|
1647
1670
|
__name: "MenuBlock",
|
|
1648
1671
|
props: {
|
|
1649
1672
|
block: {},
|
|
1650
1673
|
viewport: {}
|
|
1651
1674
|
},
|
|
1652
1675
|
setup(t) {
|
|
1653
|
-
let n = t, { t: r } =
|
|
1676
|
+
let n = t, { t: r } = ft(), i = x(() => ({
|
|
1654
1677
|
display: "flex",
|
|
1655
1678
|
flexWrap: "wrap",
|
|
1656
1679
|
gap: `0 ${n.block.spacing}px`,
|
|
@@ -1662,7 +1685,7 @@ var Dn = { class: "tpl:w-full" }, On = {
|
|
|
1662
1685
|
function o(e) {
|
|
1663
1686
|
return e || n.block.linkColor || n.block.color;
|
|
1664
1687
|
}
|
|
1665
|
-
return (n, s) => (e(), w("div",
|
|
1688
|
+
return (n, s) => (e(), w("div", ar, [a.value ? (e(), w("div", {
|
|
1666
1689
|
key: 0,
|
|
1667
1690
|
style: A(i.value)
|
|
1668
1691
|
}, [(e(!0), w(D, null, c(t.block.items, (n, r) => (e(), w(D, { key: n.id }, [C("a", {
|
|
@@ -1674,15 +1697,15 @@ var Dn = { class: "tpl:w-full" }, On = {
|
|
|
1674
1697
|
textDecoration: n.underline ? "underline" : "none"
|
|
1675
1698
|
}),
|
|
1676
1699
|
onClick: s[0] ||= b(() => {}, ["prevent"])
|
|
1677
|
-
}, M(n.text || "..."), 13,
|
|
1700
|
+
}, M(n.text || "..."), 13, or), r < t.block.items.length - 1 ? (e(), w("span", {
|
|
1678
1701
|
key: 0,
|
|
1679
1702
|
style: A({
|
|
1680
1703
|
color: t.block.separatorColor,
|
|
1681
1704
|
padding: `0 ${t.block.spacing}px`
|
|
1682
1705
|
})
|
|
1683
|
-
}, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div",
|
|
1706
|
+
}, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div", sr, [N(j(pn), { size: 16 }), C("span", null, M(j(r).menu.addLinks), 1)]))]));
|
|
1684
1707
|
}
|
|
1685
|
-
}),
|
|
1708
|
+
}), lr = new Set([
|
|
1686
1709
|
"http",
|
|
1687
1710
|
"https",
|
|
1688
1711
|
"mailto",
|
|
@@ -1692,7 +1715,7 @@ var Dn = { class: "tpl:w-full" }, On = {
|
|
|
1692
1715
|
"sms",
|
|
1693
1716
|
"xmpp",
|
|
1694
1717
|
"cid"
|
|
1695
|
-
]),
|
|
1718
|
+
]), ur = new Set([
|
|
1696
1719
|
"SCRIPT",
|
|
1697
1720
|
"STYLE",
|
|
1698
1721
|
"IFRAME",
|
|
@@ -1702,7 +1725,7 @@ var Dn = { class: "tpl:w-full" }, On = {
|
|
|
1702
1725
|
"META",
|
|
1703
1726
|
"BASE",
|
|
1704
1727
|
"FORM"
|
|
1705
|
-
]),
|
|
1728
|
+
]), dr = new Set([
|
|
1706
1729
|
"href",
|
|
1707
1730
|
"xlink:href",
|
|
1708
1731
|
"formaction",
|
|
@@ -1711,16 +1734,16 @@ var Dn = { class: "tpl:w-full" }, On = {
|
|
|
1711
1734
|
"background",
|
|
1712
1735
|
"poster"
|
|
1713
1736
|
]);
|
|
1714
|
-
function
|
|
1737
|
+
function fr(e, t) {
|
|
1715
1738
|
let n = e.trim();
|
|
1716
1739
|
if (!n || n.startsWith("#")) return !0;
|
|
1717
1740
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1718
1741
|
if (!r) return !0;
|
|
1719
1742
|
let i = r[1].toLowerCase();
|
|
1720
|
-
return
|
|
1743
|
+
return lr.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1721
1744
|
}
|
|
1722
|
-
function
|
|
1723
|
-
if (
|
|
1745
|
+
function pr(e) {
|
|
1746
|
+
if (ur.has(e.tagName)) {
|
|
1724
1747
|
e.remove();
|
|
1725
1748
|
return;
|
|
1726
1749
|
}
|
|
@@ -1732,29 +1755,29 @@ function cr(e) {
|
|
|
1732
1755
|
e.removeAttribute(n);
|
|
1733
1756
|
continue;
|
|
1734
1757
|
}
|
|
1735
|
-
if (
|
|
1736
|
-
|
|
1758
|
+
if (dr.has(t)) {
|
|
1759
|
+
fr(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
1737
1760
|
continue;
|
|
1738
1761
|
}
|
|
1739
1762
|
if (t === "src") {
|
|
1740
|
-
|
|
1763
|
+
fr(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
1741
1764
|
continue;
|
|
1742
1765
|
}
|
|
1743
1766
|
t === "srcdoc" && e.removeAttribute(n);
|
|
1744
1767
|
}
|
|
1745
1768
|
let n = Array.from(e.children);
|
|
1746
|
-
for (let e of n)
|
|
1769
|
+
for (let e of n) pr(e);
|
|
1747
1770
|
}
|
|
1748
|
-
function
|
|
1771
|
+
function mr(e) {
|
|
1749
1772
|
if (typeof DOMParser > "u") return e;
|
|
1750
1773
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1751
|
-
for (let e of n)
|
|
1774
|
+
for (let e of n) pr(e);
|
|
1752
1775
|
return t.innerHTML;
|
|
1753
1776
|
}
|
|
1754
1777
|
//#endregion
|
|
1755
1778
|
//#region src/composables/useEditableTextBlock.ts
|
|
1756
|
-
function
|
|
1757
|
-
let t = ae(
|
|
1779
|
+
function hr(e) {
|
|
1780
|
+
let t = ae(dt, []), { syntax: n } = vt(), r = x(() => mr(Se(le(e(), t), n))), i = h(!1), a = h(null), { top: o, left: s } = Ie(a), c = x(() => ({
|
|
1758
1781
|
top: o.value - 8,
|
|
1759
1782
|
left: s.value
|
|
1760
1783
|
}));
|
|
@@ -1775,14 +1798,14 @@ function ur(e) {
|
|
|
1775
1798
|
}
|
|
1776
1799
|
//#endregion
|
|
1777
1800
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1778
|
-
var
|
|
1801
|
+
var gr = ["innerHTML"], _r = /* @__PURE__ */ y({
|
|
1779
1802
|
__name: "ParagraphBlock",
|
|
1780
1803
|
props: {
|
|
1781
1804
|
block: {},
|
|
1782
1805
|
viewport: {}
|
|
1783
1806
|
},
|
|
1784
1807
|
setup(t) {
|
|
1785
|
-
let n = t, r = se(() => import("./ParagraphEditor-
|
|
1808
|
+
let n = t, r = se(() => import("./ParagraphEditor-DVSGdMOo.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = hr(() => n.block.content);
|
|
1786
1809
|
return (n, u) => (e(), w("div", {
|
|
1787
1810
|
ref_key: "blockRef",
|
|
1788
1811
|
ref: a,
|
|
@@ -1801,42 +1824,41 @@ var dr = ["innerHTML"], fr = /* @__PURE__ */ y({
|
|
|
1801
1824
|
key: 1,
|
|
1802
1825
|
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",
|
|
1803
1826
|
innerHTML: j(s)
|
|
1804
|
-
}, null, 8,
|
|
1827
|
+
}, null, 8, gr))], 544));
|
|
1805
1828
|
}
|
|
1806
1829
|
});
|
|
1807
1830
|
//#endregion
|
|
1808
1831
|
//#region src/utils/blockComponentResolver.ts
|
|
1809
|
-
function
|
|
1832
|
+
function vr(e, t, n) {
|
|
1810
1833
|
if (t) {
|
|
1811
1834
|
let n = t.getComponent(e);
|
|
1812
1835
|
if (n) return n;
|
|
1813
1836
|
}
|
|
1814
1837
|
return n[e.type] ?? null;
|
|
1815
1838
|
}
|
|
1816
|
-
function
|
|
1817
|
-
let { padding: t,
|
|
1839
|
+
function yr(e) {
|
|
1840
|
+
let { padding: t, backgroundColor: n } = e.styles;
|
|
1818
1841
|
return {
|
|
1819
1842
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
1820
|
-
|
|
1821
|
-
backgroundColor: r || "transparent"
|
|
1843
|
+
backgroundColor: n || "transparent"
|
|
1822
1844
|
};
|
|
1823
1845
|
}
|
|
1824
1846
|
//#endregion
|
|
1825
1847
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
1826
|
-
var
|
|
1848
|
+
var br = ["data-block-id", "data-block-type"], xr = ["aria-label"], Sr = [
|
|
1827
1849
|
"aria-label",
|
|
1828
1850
|
"aria-pressed",
|
|
1829
1851
|
"title"
|
|
1830
|
-
],
|
|
1852
|
+
], Cr = ["aria-label", "title"], wr = ["aria-label", "title"], Tr = ["aria-label", "title"], Er = {
|
|
1831
1853
|
key: 1,
|
|
1832
1854
|
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"
|
|
1833
|
-
},
|
|
1855
|
+
}, Dr = { 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)]" }, Or = {
|
|
1834
1856
|
key: 2,
|
|
1835
1857
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1836
|
-
},
|
|
1858
|
+
}, kr = ["aria-label", "title"], Ar = {
|
|
1837
1859
|
key: 3,
|
|
1838
1860
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1839
|
-
},
|
|
1861
|
+
}, jr = ["aria-label"], Mr = /* @__PURE__ */ _t(/* @__PURE__ */ y({
|
|
1840
1862
|
__name: "BlockWrapper",
|
|
1841
1863
|
props: {
|
|
1842
1864
|
block: {},
|
|
@@ -1846,7 +1868,7 @@ var hr = ["data-block-id", "data-block-type"], gr = ["aria-label"], _r = [
|
|
|
1846
1868
|
},
|
|
1847
1869
|
emits: ["select"],
|
|
1848
1870
|
setup(t, { emit: n }) {
|
|
1849
|
-
let i = se(() => import("./BlockIssueBadge-
|
|
1871
|
+
let i = se(() => import("./BlockIssueBadge-CkB4Yyz2.js")), a = t, o = n, { t: s, format: c } = ft(), u = ae(ct, 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);
|
|
1850
1872
|
async function m() {
|
|
1851
1873
|
await r(), d.value?.focus();
|
|
1852
1874
|
}
|
|
@@ -1869,12 +1891,11 @@ var hr = ["data-block-id", "data-block-type"], gr = ["aria-label"], _r = [
|
|
|
1869
1891
|
}
|
|
1870
1892
|
}
|
|
1871
1893
|
}
|
|
1872
|
-
let y = x(() => !a.viewport || !a.block.visibility ? !1 : a.block.visibility[a.viewport] === !1), S = x(() => a.viewport ? {
|
|
1894
|
+
let y = x(() => !a.viewport || !a.block.visibility ? !1 : a.block.visibility[a.viewport] === !1), S = x(() => a.previewMode === !0 && y.value), T = x(() => a.viewport ? {
|
|
1873
1895
|
desktop: s.viewport.desktop,
|
|
1874
|
-
tablet: s.viewport.tablet,
|
|
1875
1896
|
mobile: s.viewport.mobile
|
|
1876
|
-
}[a.viewport] ?? a.viewport : ""),
|
|
1877
|
-
let e =
|
|
1897
|
+
}[a.viewport] ?? a.viewport : ""), E = x(() => !!a.block.displayCondition), ee = ae($e, null), D = ae(st, null), k = ae(ot, {}), te = x(() => !!k.savedModules), ne = x(() => k.comments?.getBlockCount(a.block.id) ?? 0), re = x(() => {
|
|
1898
|
+
let e = yr(a.block);
|
|
1878
1899
|
return {
|
|
1879
1900
|
padding: e.padding,
|
|
1880
1901
|
backgroundColor: e.backgroundColor
|
|
@@ -1884,24 +1905,24 @@ var hr = ["data-block-id", "data-block-type"], gr = ["aria-label"], _r = [
|
|
|
1884
1905
|
a.previewMode || (e.stopPropagation(), o("select"));
|
|
1885
1906
|
}
|
|
1886
1907
|
function oe() {
|
|
1887
|
-
|
|
1908
|
+
ee?.deleteBlock(a.block.id);
|
|
1888
1909
|
}
|
|
1889
1910
|
function ce() {
|
|
1890
|
-
|
|
1911
|
+
ee?.duplicateBlock(a.block);
|
|
1891
1912
|
}
|
|
1892
1913
|
function le() {
|
|
1893
|
-
|
|
1914
|
+
k.savedModules?.openSaveDialog(a.block.id);
|
|
1894
1915
|
}
|
|
1895
1916
|
function ue() {
|
|
1896
|
-
|
|
1917
|
+
D?.toggleBlock(a.block.id);
|
|
1897
1918
|
}
|
|
1898
|
-
return (n, r) => (e(), w("div", {
|
|
1919
|
+
return (n, r) => S.value ? O("", !0) : (e(), w("div", {
|
|
1920
|
+
key: 0,
|
|
1899
1921
|
class: v(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
|
|
1900
1922
|
"tpl-block--selected": t.isSelected,
|
|
1901
1923
|
"tpl-block--idle": !t.isSelected,
|
|
1902
1924
|
"tpl-block--lifted": f.value
|
|
1903
1925
|
}]),
|
|
1904
|
-
style: A(ne.value),
|
|
1905
1926
|
"data-block-id": t.block.id,
|
|
1906
1927
|
"data-block-type": t.block.type,
|
|
1907
1928
|
onClick: ie
|
|
@@ -1922,90 +1943,90 @@ var hr = ["data-block-id", "data-block-type"], gr = ["aria-label"], _r = [
|
|
|
1922
1943
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1923
1944
|
title: j(s).blockActions.drag,
|
|
1924
1945
|
onKeydown: g
|
|
1925
|
-
}, [N(j(
|
|
1946
|
+
}, [N(j(dn), {
|
|
1926
1947
|
size: 14,
|
|
1927
1948
|
"stroke-width": 1.5
|
|
1928
|
-
})], 40,
|
|
1949
|
+
})], 40, Sr),
|
|
1929
1950
|
C("button", {
|
|
1930
1951
|
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",
|
|
1931
1952
|
"aria-label": j(s).blockActions.duplicate,
|
|
1932
1953
|
title: j(s).blockActions.duplicate,
|
|
1933
1954
|
onClick: b(ce, ["stop"])
|
|
1934
|
-
}, [N(j(
|
|
1955
|
+
}, [N(j(cn), {
|
|
1935
1956
|
size: 14,
|
|
1936
1957
|
"stroke-width": 1.5
|
|
1937
|
-
})], 8,
|
|
1938
|
-
|
|
1958
|
+
})], 8, Cr),
|
|
1959
|
+
te.value ? (e(), w("button", {
|
|
1939
1960
|
key: 0,
|
|
1940
1961
|
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",
|
|
1941
1962
|
"aria-label": j(s).blockActions.saveAsModule,
|
|
1942
1963
|
title: j(s).blockActions.saveAsModule,
|
|
1943
1964
|
onClick: b(le, ["stop"])
|
|
1944
|
-
}, [N(j(
|
|
1965
|
+
}, [N(j(an), {
|
|
1945
1966
|
size: 14,
|
|
1946
1967
|
"stroke-width": 1.5
|
|
1947
|
-
})], 8,
|
|
1968
|
+
})], 8, wr)) : O("", !0),
|
|
1948
1969
|
C("button", {
|
|
1949
1970
|
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",
|
|
1950
1971
|
"aria-label": j(s).blockActions.delete,
|
|
1951
1972
|
title: j(s).blockActions.delete,
|
|
1952
1973
|
onClick: b(oe, ["stop"])
|
|
1953
|
-
}, [N(j(
|
|
1974
|
+
}, [N(j(mt), {
|
|
1954
1975
|
size: 14,
|
|
1955
1976
|
"stroke-width": 1.5
|
|
1956
|
-
})], 8,
|
|
1957
|
-
], 8,
|
|
1958
|
-
y.value ? (e(), w("div",
|
|
1977
|
+
})], 8, Tr)
|
|
1978
|
+
], 8, xr)) : O("", !0),
|
|
1979
|
+
y.value ? (e(), w("div", Er, [C("span", Dr, [N(j(ln), {
|
|
1959
1980
|
size: 12,
|
|
1960
1981
|
"stroke-width": 1.5
|
|
1961
|
-
}), _(" " + M(j(c)(j(s).blockActions.hiddenOnViewport, { viewport:
|
|
1962
|
-
|
|
1982
|
+
}), _(" " + M(j(c)(j(s).blockActions.hiddenOnViewport, { viewport: T.value })), 1)])])) : O("", !0),
|
|
1983
|
+
E.value && !y.value ? (e(), w("div", Or, [C("button", {
|
|
1963
1984
|
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)]",
|
|
1964
1985
|
"aria-label": j(s).blockActions.conditionToggle,
|
|
1965
1986
|
title: t.block.displayCondition?.label,
|
|
1966
1987
|
onClick: b(ue, ["stop"])
|
|
1967
|
-
}, [N(j(
|
|
1988
|
+
}, [N(j(un), {
|
|
1968
1989
|
size: 12,
|
|
1969
1990
|
"stroke-width": 2
|
|
1970
|
-
})], 8,
|
|
1971
|
-
|
|
1991
|
+
})], 8, kr)])) : O("", !0),
|
|
1992
|
+
ne.value > 0 && !y.value ? (e(), w("div", Ar, [C("button", {
|
|
1972
1993
|
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)]",
|
|
1973
|
-
"aria-label": j(c)(j(s).blockActions.comments, { count: String(
|
|
1974
|
-
onClick: r[0] ||= b((e) => j(
|
|
1975
|
-
}, [N(j(
|
|
1994
|
+
"aria-label": j(c)(j(s).blockActions.comments, { count: String(ne.value) }),
|
|
1995
|
+
onClick: r[0] ||= b((e) => j(k).comments?.openForBlock(t.block.id), ["stop"])
|
|
1996
|
+
}, [N(j(pt), {
|
|
1976
1997
|
size: 12,
|
|
1977
1998
|
"stroke-width": 2.5
|
|
1978
|
-
}), _(" " + M(
|
|
1999
|
+
}), _(" " + M(ne.value), 1)], 8, jr)])) : O("", !0),
|
|
1979
2000
|
C("div", {
|
|
1980
2001
|
class: "tpl-block-content",
|
|
1981
2002
|
style: A(re.value)
|
|
1982
2003
|
}, [l(n.$slots, "default", {}, void 0, !0)], 4)
|
|
1983
|
-
],
|
|
2004
|
+
], 10, br));
|
|
1984
2005
|
}
|
|
1985
|
-
}), [["__scopeId", "data-v-
|
|
2006
|
+
}), [["__scopeId", "data-v-4a48371d"]]);
|
|
1986
2007
|
//#endregion
|
|
1987
2008
|
//#region src/utils/unwrapParagraph.ts
|
|
1988
|
-
function
|
|
2009
|
+
function Nr(e) {
|
|
1989
2010
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
1990
2011
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
1991
2012
|
}
|
|
1992
2013
|
//#endregion
|
|
1993
2014
|
//#region src/components/blocks/TitleBlock.vue
|
|
1994
|
-
var
|
|
2015
|
+
var Pr = /* @__PURE__ */ y({
|
|
1995
2016
|
__name: "TitleBlock",
|
|
1996
2017
|
props: {
|
|
1997
2018
|
block: {},
|
|
1998
2019
|
viewport: {}
|
|
1999
2020
|
},
|
|
2000
2021
|
setup(t) {
|
|
2001
|
-
let n = t, r = se(() => import("./TitleEditor-
|
|
2022
|
+
let n = t, r = se(() => import("./TitleEditor-CvtV4pCA.js")), { isEditing: a, blockRef: o, toolbarPosition: s, resolvedContent: c, handleDoubleClick: l, handleEditorDone: u } = hr(() => n.block.content), d = x(() => {
|
|
2002
2023
|
let e = {
|
|
2003
|
-
fontSize: `${
|
|
2024
|
+
fontSize: `${Oe[n.block.level]}px`,
|
|
2004
2025
|
color: n.block.color,
|
|
2005
2026
|
textAlign: n.block.textAlign
|
|
2006
2027
|
};
|
|
2007
2028
|
return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
|
|
2008
|
-
}), f = x(() => `h${n.block.level}`), p = x(() =>
|
|
2029
|
+
}), f = x(() => `h${n.block.level}`), p = x(() => Nr(c.value));
|
|
2009
2030
|
return (n, c) => (e(), w("div", {
|
|
2010
2031
|
ref_key: "blockRef",
|
|
2011
2032
|
ref: o,
|
|
@@ -2028,83 +2049,83 @@ var kr = /* @__PURE__ */ y({
|
|
|
2028
2049
|
innerHTML: p.value
|
|
2029
2050
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2030
2051
|
}
|
|
2031
|
-
}),
|
|
2052
|
+
}), Fr = Object.defineProperty, Ir = Object.getOwnPropertySymbols, Lr = Object.prototype.hasOwnProperty, Rr = Object.prototype.propertyIsEnumerable, zr = (e, t, n) => t in e ? Fr(e, t, {
|
|
2032
2053
|
enumerable: !0,
|
|
2033
2054
|
configurable: !0,
|
|
2034
2055
|
writable: !0,
|
|
2035
2056
|
value: n
|
|
2036
|
-
}) : e[t] = n,
|
|
2037
|
-
for (var n in t ||= {})
|
|
2038
|
-
if (
|
|
2057
|
+
}) : e[t] = n, Br = (e, t) => {
|
|
2058
|
+
for (var n in t ||= {}) Lr.call(t, n) && zr(e, n, t[n]);
|
|
2059
|
+
if (Ir) for (var n of Ir(t)) Rr.call(t, n) && zr(e, n, t[n]);
|
|
2039
2060
|
return e;
|
|
2040
|
-
},
|
|
2061
|
+
}, Vr = (e, t) => {
|
|
2041
2062
|
var n = {};
|
|
2042
|
-
for (var r in e)
|
|
2043
|
-
if (e != null &&
|
|
2063
|
+
for (var r in e) Lr.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2064
|
+
if (e != null && Ir) for (var r of Ir(e)) t.indexOf(r) < 0 && Rr.call(e, r) && (n[r] = e[r]);
|
|
2044
2065
|
return n;
|
|
2045
|
-
},
|
|
2046
|
-
function
|
|
2047
|
-
console.warn(
|
|
2066
|
+
}, Hr = "[vue-draggable-plus]: ";
|
|
2067
|
+
function Ur(e) {
|
|
2068
|
+
console.warn(Hr + e);
|
|
2048
2069
|
}
|
|
2049
|
-
function
|
|
2050
|
-
console.error(
|
|
2070
|
+
function Wr(e) {
|
|
2071
|
+
console.error(Hr + e);
|
|
2051
2072
|
}
|
|
2052
|
-
function
|
|
2073
|
+
function Gr(e, t, n) {
|
|
2053
2074
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2054
2075
|
}
|
|
2055
|
-
function
|
|
2076
|
+
function Kr(e) {
|
|
2056
2077
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2057
2078
|
}
|
|
2058
|
-
function
|
|
2059
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2079
|
+
function qr(e) {
|
|
2080
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Kr(n)] = e[n]), t), {});
|
|
2060
2081
|
}
|
|
2061
|
-
function
|
|
2082
|
+
function Jr(e, t) {
|
|
2062
2083
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2063
2084
|
}
|
|
2064
|
-
function
|
|
2085
|
+
function Yr(e, t, n) {
|
|
2065
2086
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2066
2087
|
}
|
|
2067
|
-
function
|
|
2088
|
+
function Xr(e) {
|
|
2068
2089
|
return e === void 0;
|
|
2069
2090
|
}
|
|
2070
|
-
function
|
|
2091
|
+
function Zr(e) {
|
|
2071
2092
|
return typeof e == "string";
|
|
2072
2093
|
}
|
|
2073
|
-
function
|
|
2094
|
+
function Qr(e, t, n) {
|
|
2074
2095
|
let r = e.children[n];
|
|
2075
2096
|
e.insertBefore(t, r);
|
|
2076
2097
|
}
|
|
2077
|
-
function
|
|
2098
|
+
function $r(e) {
|
|
2078
2099
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2079
2100
|
}
|
|
2080
|
-
function
|
|
2101
|
+
function ei(e, t = document) {
|
|
2081
2102
|
let n = null;
|
|
2082
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2103
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Ur(`Element not found: ${e}`), n;
|
|
2083
2104
|
}
|
|
2084
|
-
function
|
|
2105
|
+
function ti(e, t, n = null) {
|
|
2085
2106
|
return function(...r) {
|
|
2086
2107
|
return e.apply(n, r), t.apply(n, r);
|
|
2087
2108
|
};
|
|
2088
2109
|
}
|
|
2089
|
-
function
|
|
2090
|
-
let n =
|
|
2110
|
+
function ni(e, t) {
|
|
2111
|
+
let n = Br({}, e);
|
|
2091
2112
|
return Object.keys(t).forEach((r) => {
|
|
2092
|
-
n[r] ? n[r] =
|
|
2113
|
+
n[r] ? n[r] = ti(e[r], t[r]) : n[r] = t[r];
|
|
2093
2114
|
}), n;
|
|
2094
2115
|
}
|
|
2095
|
-
function
|
|
2116
|
+
function ri(e) {
|
|
2096
2117
|
return e instanceof HTMLElement;
|
|
2097
2118
|
}
|
|
2098
|
-
function
|
|
2119
|
+
function ii(e, t) {
|
|
2099
2120
|
Object.keys(e).forEach((n) => {
|
|
2100
2121
|
t(n, e[n]);
|
|
2101
2122
|
});
|
|
2102
2123
|
}
|
|
2103
|
-
function
|
|
2124
|
+
function ai(e) {
|
|
2104
2125
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2105
2126
|
}
|
|
2106
|
-
var
|
|
2107
|
-
function
|
|
2127
|
+
var oi = Object.assign;
|
|
2128
|
+
function si(e, t) {
|
|
2108
2129
|
var n = Object.keys(e);
|
|
2109
2130
|
if (Object.getOwnPropertySymbols) {
|
|
2110
2131
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2114,26 +2135,26 @@ function ni(e, t) {
|
|
|
2114
2135
|
}
|
|
2115
2136
|
return n;
|
|
2116
2137
|
}
|
|
2117
|
-
function
|
|
2138
|
+
function ci(e) {
|
|
2118
2139
|
for (var t = 1; t < arguments.length; t++) {
|
|
2119
2140
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2120
|
-
t % 2 ?
|
|
2121
|
-
|
|
2122
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2141
|
+
t % 2 ? si(Object(n), !0).forEach(function(t) {
|
|
2142
|
+
ui(e, t, n[t]);
|
|
2143
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : si(Object(n)).forEach(function(t) {
|
|
2123
2144
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2124
2145
|
});
|
|
2125
2146
|
}
|
|
2126
2147
|
return e;
|
|
2127
2148
|
}
|
|
2128
|
-
function
|
|
2149
|
+
function li(e) {
|
|
2129
2150
|
"@babel/helpers - typeof";
|
|
2130
|
-
return
|
|
2151
|
+
return li = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2131
2152
|
return typeof e;
|
|
2132
2153
|
} : function(e) {
|
|
2133
2154
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2134
|
-
},
|
|
2155
|
+
}, li(e);
|
|
2135
2156
|
}
|
|
2136
|
-
function
|
|
2157
|
+
function ui(e, t, n) {
|
|
2137
2158
|
return t in e ? Object.defineProperty(e, t, {
|
|
2138
2159
|
value: n,
|
|
2139
2160
|
enumerable: !0,
|
|
@@ -2141,45 +2162,45 @@ function ai(e, t, n) {
|
|
|
2141
2162
|
writable: !0
|
|
2142
2163
|
}) : e[t] = n, e;
|
|
2143
2164
|
}
|
|
2144
|
-
function
|
|
2145
|
-
return
|
|
2165
|
+
function di() {
|
|
2166
|
+
return di = Object.assign || function(e) {
|
|
2146
2167
|
for (var t = 1; t < arguments.length; t++) {
|
|
2147
2168
|
var n = arguments[t];
|
|
2148
2169
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2149
2170
|
}
|
|
2150
2171
|
return e;
|
|
2151
|
-
},
|
|
2172
|
+
}, di.apply(this, arguments);
|
|
2152
2173
|
}
|
|
2153
|
-
function
|
|
2174
|
+
function fi(e, t) {
|
|
2154
2175
|
if (e == null) return {};
|
|
2155
2176
|
var n = {}, r = Object.keys(e), i, a;
|
|
2156
2177
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2157
2178
|
return n;
|
|
2158
2179
|
}
|
|
2159
|
-
function
|
|
2180
|
+
function pi(e, t) {
|
|
2160
2181
|
if (e == null) return {};
|
|
2161
|
-
var n =
|
|
2182
|
+
var n = fi(e, t), r, i;
|
|
2162
2183
|
if (Object.getOwnPropertySymbols) {
|
|
2163
2184
|
var a = Object.getOwnPropertySymbols(e);
|
|
2164
2185
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2165
2186
|
}
|
|
2166
2187
|
return n;
|
|
2167
2188
|
}
|
|
2168
|
-
var
|
|
2169
|
-
function
|
|
2189
|
+
var mi = "1.15.2";
|
|
2190
|
+
function hi(e) {
|
|
2170
2191
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2171
2192
|
}
|
|
2172
|
-
var
|
|
2193
|
+
var gi = hi(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), _i = hi(/Edge/i), vi = hi(/firefox/i), yi = hi(/safari/i) && !hi(/chrome/i) && !hi(/android/i), bi = hi(/iP(ad|od|hone)/i), xi = hi(/chrome/i) && hi(/android/i), Si = {
|
|
2173
2194
|
capture: !1,
|
|
2174
2195
|
passive: !1
|
|
2175
2196
|
};
|
|
2176
2197
|
function F(e, t, n) {
|
|
2177
|
-
e.addEventListener(t, n, !
|
|
2198
|
+
e.addEventListener(t, n, !gi && Si);
|
|
2178
2199
|
}
|
|
2179
2200
|
function I(e, t, n) {
|
|
2180
|
-
e.removeEventListener(t, n, !
|
|
2201
|
+
e.removeEventListener(t, n, !gi && Si);
|
|
2181
2202
|
}
|
|
2182
|
-
function
|
|
2203
|
+
function Ci(e, t) {
|
|
2183
2204
|
if (t) {
|
|
2184
2205
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2185
2206
|
if (e.matches) return e.matches(t);
|
|
@@ -2191,22 +2212,22 @@ function vi(e, t) {
|
|
|
2191
2212
|
return !1;
|
|
2192
2213
|
}
|
|
2193
2214
|
}
|
|
2194
|
-
function
|
|
2215
|
+
function wi(e) {
|
|
2195
2216
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2196
2217
|
}
|
|
2197
|
-
function
|
|
2218
|
+
function Ti(e, t, n, r) {
|
|
2198
2219
|
if (e) {
|
|
2199
2220
|
n ||= document;
|
|
2200
2221
|
do {
|
|
2201
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2222
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && Ci(e, t) : Ci(e, t)) || r && e === n) return e;
|
|
2202
2223
|
if (e === n) break;
|
|
2203
|
-
} while (e =
|
|
2224
|
+
} while (e = wi(e));
|
|
2204
2225
|
}
|
|
2205
2226
|
return null;
|
|
2206
2227
|
}
|
|
2207
|
-
var
|
|
2228
|
+
var Ei = /\s+/g;
|
|
2208
2229
|
function L(e, t, n) {
|
|
2209
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2230
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Ei, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Ei, " "));
|
|
2210
2231
|
}
|
|
2211
2232
|
function R(e, t, n) {
|
|
2212
2233
|
var r = e && e.style;
|
|
@@ -2215,7 +2236,7 @@ function R(e, t, n) {
|
|
|
2215
2236
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2216
2237
|
}
|
|
2217
2238
|
}
|
|
2218
|
-
function
|
|
2239
|
+
function Di(e, t) {
|
|
2219
2240
|
var n = "";
|
|
2220
2241
|
if (typeof e == "string") n = e;
|
|
2221
2242
|
else do {
|
|
@@ -2225,7 +2246,7 @@ function Si(e, t) {
|
|
|
2225
2246
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2226
2247
|
return i && new i(n);
|
|
2227
2248
|
}
|
|
2228
|
-
function
|
|
2249
|
+
function Oi(e, t, n) {
|
|
2229
2250
|
if (e) {
|
|
2230
2251
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2231
2252
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2233,13 +2254,13 @@ function Ci(e, t, n) {
|
|
|
2233
2254
|
}
|
|
2234
2255
|
return [];
|
|
2235
2256
|
}
|
|
2236
|
-
function
|
|
2257
|
+
function ki() {
|
|
2237
2258
|
return document.scrollingElement || document.documentElement;
|
|
2238
2259
|
}
|
|
2239
2260
|
function z(e, t, n, r, i) {
|
|
2240
2261
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2241
2262
|
var a, o, s, c, l, u, d;
|
|
2242
|
-
if (e !== window && e.parentNode && e !==
|
|
2263
|
+
if (e !== window && e.parentNode && e !== ki() ? (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, !gi)) do
|
|
2243
2264
|
if (i && i.getBoundingClientRect && (R(i, "transform") !== "none" || n && R(i, "position") !== "static")) {
|
|
2244
2265
|
var f = i.getBoundingClientRect();
|
|
2245
2266
|
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;
|
|
@@ -2247,7 +2268,7 @@ function z(e, t, n, r, i) {
|
|
|
2247
2268
|
}
|
|
2248
2269
|
while (i = i.parentNode);
|
|
2249
2270
|
if (r && e !== window) {
|
|
2250
|
-
var p =
|
|
2271
|
+
var p = Di(i || e), m = p && p.a, h = p && p.d;
|
|
2251
2272
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2252
2273
|
}
|
|
2253
2274
|
return {
|
|
@@ -2260,18 +2281,18 @@ function z(e, t, n, r, i) {
|
|
|
2260
2281
|
};
|
|
2261
2282
|
}
|
|
2262
2283
|
}
|
|
2263
|
-
function
|
|
2264
|
-
for (var r =
|
|
2284
|
+
function Ai(e, t, n) {
|
|
2285
|
+
for (var r = Fi(e, !0), i = z(e)[t]; r;) {
|
|
2265
2286
|
var a = z(r)[n], o = void 0;
|
|
2266
2287
|
if (o = i >= a, !o) return r;
|
|
2267
|
-
if (r ===
|
|
2268
|
-
r =
|
|
2288
|
+
if (r === ki()) break;
|
|
2289
|
+
r = Fi(r, !1);
|
|
2269
2290
|
}
|
|
2270
2291
|
return !1;
|
|
2271
2292
|
}
|
|
2272
|
-
function
|
|
2293
|
+
function ji(e, t, n, r) {
|
|
2273
2294
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2274
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2295
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Ti(o[a], n.draggable, e, !1)) {
|
|
2275
2296
|
if (i === t) return o[a];
|
|
2276
2297
|
i++;
|
|
2277
2298
|
}
|
|
@@ -2279,84 +2300,84 @@ function Ei(e, t, n, r) {
|
|
|
2279
2300
|
}
|
|
2280
2301
|
return null;
|
|
2281
2302
|
}
|
|
2282
|
-
function
|
|
2283
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || R(n, "display") === "none" || t && !
|
|
2303
|
+
function Mi(e, t) {
|
|
2304
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || R(n, "display") === "none" || t && !Ci(n, t));) n = n.previousElementSibling;
|
|
2284
2305
|
return n || null;
|
|
2285
2306
|
}
|
|
2286
2307
|
function B(e, t) {
|
|
2287
2308
|
var n = 0;
|
|
2288
2309
|
if (!e || !e.parentNode) return -1;
|
|
2289
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2310
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || Ci(e, t)) && n++;
|
|
2290
2311
|
return n;
|
|
2291
2312
|
}
|
|
2292
|
-
function
|
|
2293
|
-
var t = 0, n = 0, r =
|
|
2313
|
+
function Ni(e) {
|
|
2314
|
+
var t = 0, n = 0, r = ki();
|
|
2294
2315
|
if (e) do {
|
|
2295
|
-
var i =
|
|
2316
|
+
var i = Di(e), a = i.a, o = i.d;
|
|
2296
2317
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2297
2318
|
} while (e !== r && (e = e.parentNode));
|
|
2298
2319
|
return [t, n];
|
|
2299
2320
|
}
|
|
2300
|
-
function
|
|
2321
|
+
function Pi(e, t) {
|
|
2301
2322
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2302
2323
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2303
2324
|
}
|
|
2304
2325
|
return -1;
|
|
2305
2326
|
}
|
|
2306
|
-
function
|
|
2307
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2327
|
+
function Fi(e, t) {
|
|
2328
|
+
if (!e || !e.getBoundingClientRect) return ki();
|
|
2308
2329
|
var n = e, r = !1;
|
|
2309
2330
|
do
|
|
2310
2331
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2311
2332
|
var i = R(n);
|
|
2312
2333
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2313
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2334
|
+
if (!n.getBoundingClientRect || n === document.body) return ki();
|
|
2314
2335
|
if (r || t) return n;
|
|
2315
2336
|
r = !0;
|
|
2316
2337
|
}
|
|
2317
2338
|
}
|
|
2318
2339
|
while (n = n.parentNode);
|
|
2319
|
-
return
|
|
2340
|
+
return ki();
|
|
2320
2341
|
}
|
|
2321
|
-
function
|
|
2342
|
+
function Ii(e, t) {
|
|
2322
2343
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2323
2344
|
return e;
|
|
2324
2345
|
}
|
|
2325
|
-
function
|
|
2346
|
+
function Li(e, t) {
|
|
2326
2347
|
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);
|
|
2327
2348
|
}
|
|
2328
|
-
var
|
|
2329
|
-
function
|
|
2349
|
+
var Ri;
|
|
2350
|
+
function zi(e, t) {
|
|
2330
2351
|
return function() {
|
|
2331
|
-
if (!
|
|
2352
|
+
if (!Ri) {
|
|
2332
2353
|
var n = arguments, r = this;
|
|
2333
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2334
|
-
|
|
2354
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Ri = setTimeout(function() {
|
|
2355
|
+
Ri = void 0;
|
|
2335
2356
|
}, t);
|
|
2336
2357
|
}
|
|
2337
2358
|
};
|
|
2338
2359
|
}
|
|
2339
|
-
function
|
|
2340
|
-
clearTimeout(
|
|
2360
|
+
function Bi() {
|
|
2361
|
+
clearTimeout(Ri), Ri = void 0;
|
|
2341
2362
|
}
|
|
2342
|
-
function
|
|
2363
|
+
function Vi(e, t, n) {
|
|
2343
2364
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2344
2365
|
}
|
|
2345
|
-
function
|
|
2366
|
+
function Hi(e) {
|
|
2346
2367
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2347
2368
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2348
2369
|
}
|
|
2349
|
-
function
|
|
2370
|
+
function Ui(e, t, n) {
|
|
2350
2371
|
var r = {};
|
|
2351
2372
|
return Array.from(e.children).forEach(function(i) {
|
|
2352
|
-
if (!(!
|
|
2373
|
+
if (!(!Ti(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
2353
2374
|
var a = z(i);
|
|
2354
2375
|
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);
|
|
2355
2376
|
}
|
|
2356
2377
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2357
2378
|
}
|
|
2358
2379
|
var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2359
|
-
function
|
|
2380
|
+
function Wi() {
|
|
2360
2381
|
var e = [], t;
|
|
2361
2382
|
return {
|
|
2362
2383
|
captureAnimationState: function() {
|
|
@@ -2366,9 +2387,9 @@ function zi() {
|
|
|
2366
2387
|
target: t,
|
|
2367
2388
|
rect: z(t)
|
|
2368
2389
|
});
|
|
2369
|
-
var n =
|
|
2390
|
+
var n = ci({}, e[e.length - 1].rect);
|
|
2370
2391
|
if (t.thisAnimationDuration) {
|
|
2371
|
-
var r =
|
|
2392
|
+
var r = Di(t, !0);
|
|
2372
2393
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2373
2394
|
}
|
|
2374
2395
|
t.fromRect = n;
|
|
@@ -2379,7 +2400,7 @@ function zi() {
|
|
|
2379
2400
|
e.push(t);
|
|
2380
2401
|
},
|
|
2381
2402
|
removeAnimationState: function(t) {
|
|
2382
|
-
e.splice(
|
|
2403
|
+
e.splice(Pi(e, { target: t }), 1);
|
|
2383
2404
|
},
|
|
2384
2405
|
animateAll: function(n) {
|
|
2385
2406
|
var r = this;
|
|
@@ -2389,8 +2410,8 @@ function zi() {
|
|
|
2389
2410
|
}
|
|
2390
2411
|
var i = !1, a = 0;
|
|
2391
2412
|
e.forEach(function(e) {
|
|
2392
|
-
var t = 0, n = e.target, o = n.fromRect, s = z(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2393
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2413
|
+
var t = 0, n = e.target, o = n.fromRect, s = z(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Di(n, !0);
|
|
2414
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Li(c, s) && !Li(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ki(u, c, l, r.options)), Li(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() {
|
|
2394
2415
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2395
2416
|
}, t), n.thisAnimationDuration = t);
|
|
2396
2417
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2400,26 +2421,26 @@ function zi() {
|
|
|
2400
2421
|
animate: function(e, t, n, r) {
|
|
2401
2422
|
if (r) {
|
|
2402
2423
|
R(e, "transition", ""), R(e, "transform", "");
|
|
2403
|
-
var i =
|
|
2404
|
-
e.animatingX = !!s, e.animatingY = !!c, R(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
2424
|
+
var i = Di(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2425
|
+
e.animatingX = !!s, e.animatingY = !!c, R(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Gi(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() {
|
|
2405
2426
|
R(e, "transition", ""), R(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2406
2427
|
}, r);
|
|
2407
2428
|
}
|
|
2408
2429
|
}
|
|
2409
2430
|
};
|
|
2410
2431
|
}
|
|
2411
|
-
function
|
|
2432
|
+
function Gi(e) {
|
|
2412
2433
|
return e.offsetWidth;
|
|
2413
2434
|
}
|
|
2414
|
-
function
|
|
2435
|
+
function Ki(e, t, n, r) {
|
|
2415
2436
|
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;
|
|
2416
2437
|
}
|
|
2417
|
-
var
|
|
2438
|
+
var qi = [], Ji = { initializeByDefault: !0 }, Yi = {
|
|
2418
2439
|
mount: function(e) {
|
|
2419
|
-
for (var t in
|
|
2420
|
-
|
|
2440
|
+
for (var t in Ji) Ji.hasOwnProperty(t) && !(t in e) && (e[t] = Ji[t]);
|
|
2441
|
+
qi.forEach(function(t) {
|
|
2421
2442
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2422
|
-
}),
|
|
2443
|
+
}), qi.push(e);
|
|
2423
2444
|
},
|
|
2424
2445
|
pluginEvent: function(e, t, n) {
|
|
2425
2446
|
var r = this;
|
|
@@ -2427,16 +2448,16 @@ var Hi = [], Ui = { initializeByDefault: !0 }, Wi = {
|
|
|
2427
2448
|
r.eventCanceled = !0;
|
|
2428
2449
|
};
|
|
2429
2450
|
var i = e + "Global";
|
|
2430
|
-
|
|
2431
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2451
|
+
qi.forEach(function(r) {
|
|
2452
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](ci({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](ci({ sortable: t }, n)));
|
|
2432
2453
|
});
|
|
2433
2454
|
},
|
|
2434
2455
|
initializePlugins: function(e, t, n, r) {
|
|
2435
|
-
for (var i in
|
|
2456
|
+
for (var i in qi.forEach(function(r) {
|
|
2436
2457
|
var i = r.pluginName;
|
|
2437
2458
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2438
2459
|
var a = new r(e, t, e.options);
|
|
2439
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2460
|
+
a.sortable = e, a.options = e.options, e[i] = a, di(n, a.defaults);
|
|
2440
2461
|
}
|
|
2441
2462
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2442
2463
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2445,56 +2466,56 @@ var Hi = [], Ui = { initializeByDefault: !0 }, Wi = {
|
|
|
2445
2466
|
},
|
|
2446
2467
|
getEventProperties: function(e, t) {
|
|
2447
2468
|
var n = {};
|
|
2448
|
-
return
|
|
2449
|
-
typeof r.eventProperties == "function" &&
|
|
2469
|
+
return qi.forEach(function(r) {
|
|
2470
|
+
typeof r.eventProperties == "function" && di(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2450
2471
|
}), n;
|
|
2451
2472
|
},
|
|
2452
2473
|
modifyOption: function(e, t, n) {
|
|
2453
2474
|
var r;
|
|
2454
|
-
return
|
|
2475
|
+
return qi.forEach(function(i) {
|
|
2455
2476
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2456
2477
|
}), r;
|
|
2457
2478
|
}
|
|
2458
2479
|
};
|
|
2459
|
-
function
|
|
2480
|
+
function Xi(e) {
|
|
2460
2481
|
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;
|
|
2461
2482
|
if (t ||= n && n[V], t) {
|
|
2462
2483
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2463
|
-
window.CustomEvent && !
|
|
2484
|
+
window.CustomEvent && !gi && !_i ? h = new CustomEvent(r, {
|
|
2464
2485
|
bubbles: !0,
|
|
2465
2486
|
cancelable: !0
|
|
2466
2487
|
}) : (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;
|
|
2467
|
-
var v =
|
|
2488
|
+
var v = ci(ci({}, m), Yi.getEventProperties(r, t));
|
|
2468
2489
|
for (var y in v) h[y] = v[y];
|
|
2469
2490
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2470
2491
|
}
|
|
2471
2492
|
}
|
|
2472
|
-
var
|
|
2473
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2474
|
-
|
|
2493
|
+
var Zi = ["evt"], H = function(e, t) {
|
|
2494
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = pi(n, Zi);
|
|
2495
|
+
Yi.pluginEvent.bind(Q)(e, t, ci({
|
|
2475
2496
|
dragEl: W,
|
|
2476
2497
|
parentEl: G,
|
|
2477
2498
|
ghostEl: K,
|
|
2478
2499
|
rootEl: q,
|
|
2479
|
-
nextEl:
|
|
2480
|
-
lastDownEl:
|
|
2500
|
+
nextEl: Qi,
|
|
2501
|
+
lastDownEl: $i,
|
|
2481
2502
|
cloneEl: J,
|
|
2482
|
-
cloneHidden:
|
|
2483
|
-
dragStarted:
|
|
2503
|
+
cloneHidden: ea,
|
|
2504
|
+
dragStarted: ma,
|
|
2484
2505
|
putSortable: X,
|
|
2485
2506
|
activeSortable: Q.active,
|
|
2486
2507
|
originalEvent: r,
|
|
2487
|
-
oldIndex:
|
|
2488
|
-
oldDraggableIndex:
|
|
2508
|
+
oldIndex: ta,
|
|
2509
|
+
oldDraggableIndex: na,
|
|
2489
2510
|
newIndex: Y,
|
|
2490
|
-
newDraggableIndex:
|
|
2491
|
-
hideGhostForTarget:
|
|
2492
|
-
unhideGhostForTarget:
|
|
2511
|
+
newDraggableIndex: ra,
|
|
2512
|
+
hideGhostForTarget: Ma,
|
|
2513
|
+
unhideGhostForTarget: Na,
|
|
2493
2514
|
cloneNowHidden: function() {
|
|
2494
|
-
|
|
2515
|
+
ea = !0;
|
|
2495
2516
|
},
|
|
2496
2517
|
cloneNowShown: function() {
|
|
2497
|
-
|
|
2518
|
+
ea = !1;
|
|
2498
2519
|
},
|
|
2499
2520
|
dispatchSortableEvent: function(e) {
|
|
2500
2521
|
U({
|
|
@@ -2506,45 +2527,45 @@ var Ki = ["evt"], H = function(e, t) {
|
|
|
2506
2527
|
}, i));
|
|
2507
2528
|
};
|
|
2508
2529
|
function U(e) {
|
|
2509
|
-
|
|
2530
|
+
Xi(ci({
|
|
2510
2531
|
putSortable: X,
|
|
2511
2532
|
cloneEl: J,
|
|
2512
2533
|
targetEl: W,
|
|
2513
2534
|
rootEl: q,
|
|
2514
|
-
oldIndex:
|
|
2515
|
-
oldDraggableIndex:
|
|
2535
|
+
oldIndex: ta,
|
|
2536
|
+
oldDraggableIndex: na,
|
|
2516
2537
|
newIndex: Y,
|
|
2517
|
-
newDraggableIndex:
|
|
2538
|
+
newDraggableIndex: ra
|
|
2518
2539
|
}, e));
|
|
2519
2540
|
}
|
|
2520
|
-
var W, G, K, q,
|
|
2521
|
-
if (
|
|
2522
|
-
if (
|
|
2541
|
+
var W, G, K, q, Qi, $i, J, ea, ta, Y, na, ra, ia, X, aa = !1, oa = !1, sa = [], ca, la, ua, da, fa, pa, ma, ha, ga, _a = !1, va = !1, ya, Z, ba = [], xa = !1, Sa = [], Ca = typeof document < "u", wa = bi, Ta = _i || gi ? "cssFloat" : "float", Ea = Ca && !xi && !bi && "draggable" in document.createElement("div"), Da = function() {
|
|
2542
|
+
if (Ca) {
|
|
2543
|
+
if (gi) return !1;
|
|
2523
2544
|
var e = document.createElement("x");
|
|
2524
2545
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2525
2546
|
}
|
|
2526
|
-
}(),
|
|
2527
|
-
var n = R(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
2547
|
+
}(), Oa = function(e, t) {
|
|
2548
|
+
var n = R(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = ji(e, 0, t), a = ji(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;
|
|
2528
2549
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2529
2550
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2530
2551
|
if (i && o.float && o.float !== "none") {
|
|
2531
2552
|
var u = o.float === "left" ? "left" : "right";
|
|
2532
2553
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2533
2554
|
}
|
|
2534
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2535
|
-
},
|
|
2555
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Ta] === "none" || a && n[Ta] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2556
|
+
}, ka = function(e, t, n) {
|
|
2536
2557
|
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;
|
|
2537
2558
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2538
|
-
},
|
|
2559
|
+
}, Aa = function(e, t) {
|
|
2539
2560
|
var n;
|
|
2540
|
-
return
|
|
2561
|
+
return sa.some(function(r) {
|
|
2541
2562
|
var i = r[V].options.emptyInsertThreshold;
|
|
2542
|
-
if (!(!i ||
|
|
2563
|
+
if (!(!i || Mi(r))) {
|
|
2543
2564
|
var a = z(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2544
2565
|
if (o && s) return n = r;
|
|
2545
2566
|
}
|
|
2546
2567
|
}), n;
|
|
2547
|
-
},
|
|
2568
|
+
}, ja = function(e) {
|
|
2548
2569
|
function t(e, n) {
|
|
2549
2570
|
return function(r, i, a, o) {
|
|
2550
2571
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2557,31 +2578,31 @@ var W, G, K, q, qi, Ji, J, Yi, Xi, Y, Zi, Qi, $i, X, ea = !1, ta = !1, na = [],
|
|
|
2557
2578
|
};
|
|
2558
2579
|
}
|
|
2559
2580
|
var n = {}, r = e.group;
|
|
2560
|
-
(!r ||
|
|
2561
|
-
},
|
|
2562
|
-
!
|
|
2563
|
-
},
|
|
2564
|
-
!
|
|
2581
|
+
(!r || li(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;
|
|
2582
|
+
}, Ma = function() {
|
|
2583
|
+
!Da && K && R(K, "display", "none");
|
|
2584
|
+
}, Na = function() {
|
|
2585
|
+
!Da && K && R(K, "display", "");
|
|
2565
2586
|
};
|
|
2566
|
-
|
|
2567
|
-
if (
|
|
2587
|
+
Ca && !xi && document.addEventListener("click", function(e) {
|
|
2588
|
+
if (oa) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), oa = !1, !1;
|
|
2568
2589
|
}, !0);
|
|
2569
|
-
var
|
|
2590
|
+
var Pa = function(e) {
|
|
2570
2591
|
if (W) {
|
|
2571
2592
|
e = e.touches ? e.touches[0] : e;
|
|
2572
|
-
var t =
|
|
2593
|
+
var t = Aa(e.clientX, e.clientY);
|
|
2573
2594
|
if (t) {
|
|
2574
2595
|
var n = {};
|
|
2575
2596
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2576
2597
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
|
|
2577
2598
|
}
|
|
2578
2599
|
}
|
|
2579
|
-
},
|
|
2600
|
+
}, Fa = function(e) {
|
|
2580
2601
|
W && W.parentNode[V]._isOutsideThisEl(e.target);
|
|
2581
2602
|
};
|
|
2582
2603
|
function Q(e, t) {
|
|
2583
2604
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2584
|
-
this.el = e, this.options = t =
|
|
2605
|
+
this.el = e, this.options = t = di({}, t), e[V] = this;
|
|
2585
2606
|
var n = {
|
|
2586
2607
|
group: null,
|
|
2587
2608
|
sort: !0,
|
|
@@ -2594,7 +2615,7 @@ function Q(e, t) {
|
|
|
2594
2615
|
invertedSwapThreshold: null,
|
|
2595
2616
|
removeCloneOnHide: !0,
|
|
2596
2617
|
direction: function() {
|
|
2597
|
-
return
|
|
2618
|
+
return Oa(e, this.options);
|
|
2598
2619
|
},
|
|
2599
2620
|
ghostClass: "sortable-ghost",
|
|
2600
2621
|
chosenClass: "sortable-chosen",
|
|
@@ -2621,17 +2642,17 @@ function Q(e, t) {
|
|
|
2621
2642
|
x: 0,
|
|
2622
2643
|
y: 0
|
|
2623
2644
|
},
|
|
2624
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2645
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !yi,
|
|
2625
2646
|
emptyInsertThreshold: 5
|
|
2626
2647
|
};
|
|
2627
|
-
for (var r in
|
|
2628
|
-
for (var i in
|
|
2629
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
2648
|
+
for (var r in Yi.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2649
|
+
for (var i in ja(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2650
|
+
this.nativeDraggable = t.forceFallback ? !1 : Ea, 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)), sa.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), di(this, Wi());
|
|
2630
2651
|
}
|
|
2631
2652
|
Q.prototype = {
|
|
2632
2653
|
constructor: Q,
|
|
2633
2654
|
_isOutsideThisEl: function(e) {
|
|
2634
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2655
|
+
!this.el.contains(e) && e !== this.el && (ha = null);
|
|
2635
2656
|
},
|
|
2636
2657
|
_getDirection: function(e, t) {
|
|
2637
2658
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
|
|
@@ -2639,8 +2660,8 @@ Q.prototype = {
|
|
|
2639
2660
|
_onTapStart: function(e) {
|
|
2640
2661
|
if (e.cancelable) {
|
|
2641
2662
|
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;
|
|
2642
|
-
if (
|
|
2643
|
-
if (
|
|
2663
|
+
if (Ga(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && yi && s && s.tagName.toUpperCase() === "SELECT") && (s = Ti(s, r.draggable, n, !1), !(s && s.animated) && $i !== s)) {
|
|
2664
|
+
if (ta = B(s), na = B(s, r.draggable), typeof l == "function") {
|
|
2644
2665
|
if (l.call(this, e, s, this)) {
|
|
2645
2666
|
U({
|
|
2646
2667
|
sortable: t,
|
|
@@ -2653,7 +2674,7 @@ Q.prototype = {
|
|
|
2653
2674
|
return;
|
|
2654
2675
|
}
|
|
2655
2676
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2656
|
-
if (r =
|
|
2677
|
+
if (r = Ti(c, r.trim(), n, !1), r) return U({
|
|
2657
2678
|
sortable: t,
|
|
2658
2679
|
rootEl: r,
|
|
2659
2680
|
name: "filter",
|
|
@@ -2665,7 +2686,7 @@ Q.prototype = {
|
|
|
2665
2686
|
i && e.cancelable && e.preventDefault();
|
|
2666
2687
|
return;
|
|
2667
2688
|
}
|
|
2668
|
-
r.handle && !
|
|
2689
|
+
r.handle && !Ti(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2669
2690
|
}
|
|
2670
2691
|
}
|
|
2671
2692
|
},
|
|
@@ -2673,23 +2694,23 @@ Q.prototype = {
|
|
|
2673
2694
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2674
2695
|
if (n && !W && n.parentNode === i) {
|
|
2675
2696
|
var c = z(n);
|
|
2676
|
-
if (q = i, W = n, G = W.parentNode,
|
|
2697
|
+
if (q = i, W = n, G = W.parentNode, Qi = W.nextSibling, $i = n, ia = a.group, Q.dragged = W, ca = {
|
|
2677
2698
|
target: W,
|
|
2678
2699
|
clientX: (t || e).clientX,
|
|
2679
2700
|
clientY: (t || e).clientY
|
|
2680
|
-
},
|
|
2701
|
+
}, fa = ca.clientX - c.left, pa = ca.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
|
|
2681
2702
|
if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
2682
2703
|
r._onDrop();
|
|
2683
2704
|
return;
|
|
2684
2705
|
}
|
|
2685
|
-
r._disableDelayedDragEvents(), !
|
|
2706
|
+
r._disableDelayedDragEvents(), !vi && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
2686
2707
|
sortable: r,
|
|
2687
2708
|
name: "choose",
|
|
2688
2709
|
originalEvent: e
|
|
2689
2710
|
}), L(W, a.chosenClass, !0);
|
|
2690
2711
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2691
|
-
|
|
2692
|
-
}), F(o, "dragover",
|
|
2712
|
+
Oi(W, e.trim(), Ra);
|
|
2713
|
+
}), 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), vi && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(_i || gi))) {
|
|
2693
2714
|
if (Q.eventCanceled) {
|
|
2694
2715
|
this._onDrop();
|
|
2695
2716
|
return;
|
|
@@ -2703,7 +2724,7 @@ Q.prototype = {
|
|
|
2703
2724
|
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();
|
|
2704
2725
|
},
|
|
2705
2726
|
_disableDelayedDrag: function() {
|
|
2706
|
-
W &&
|
|
2727
|
+
W && Ra(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2707
2728
|
},
|
|
2708
2729
|
_disableDelayedDragEvents: function() {
|
|
2709
2730
|
var e = this.el.ownerDocument;
|
|
@@ -2712,14 +2733,14 @@ Q.prototype = {
|
|
|
2712
2733
|
_triggerDragStart: function(e, t) {
|
|
2713
2734
|
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));
|
|
2714
2735
|
try {
|
|
2715
|
-
document.selection ?
|
|
2736
|
+
document.selection ? Ka(function() {
|
|
2716
2737
|
document.selection.empty();
|
|
2717
2738
|
}) : window.getSelection().removeAllRanges();
|
|
2718
2739
|
} catch {}
|
|
2719
2740
|
},
|
|
2720
2741
|
_dragStarted: function(e, t) {
|
|
2721
|
-
if (
|
|
2722
|
-
H("dragStarted", this, { evt: t }), this.nativeDraggable && F(document, "dragover",
|
|
2742
|
+
if (aa = !1, q && W) {
|
|
2743
|
+
H("dragStarted", this, { evt: t }), this.nativeDraggable && F(document, "dragover", Fa);
|
|
2723
2744
|
var n = this.options;
|
|
2724
2745
|
!e && L(W, n.dragClass, !1), L(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
2725
2746
|
sortable: this,
|
|
@@ -2729,33 +2750,33 @@ Q.prototype = {
|
|
|
2729
2750
|
} else this._nulling();
|
|
2730
2751
|
},
|
|
2731
2752
|
_emulateDragOver: function() {
|
|
2732
|
-
if (
|
|
2733
|
-
this._lastX =
|
|
2734
|
-
for (var e = document.elementFromPoint(
|
|
2753
|
+
if (la) {
|
|
2754
|
+
this._lastX = la.clientX, this._lastY = la.clientY, Ma();
|
|
2755
|
+
for (var e = document.elementFromPoint(la.clientX, la.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(la.clientX, la.clientY), e !== t);) t = e;
|
|
2735
2756
|
if (W.parentNode[V]._isOutsideThisEl(e), t) do {
|
|
2736
2757
|
if (t[V]) {
|
|
2737
2758
|
var n = void 0;
|
|
2738
2759
|
if (n = t[V]._onDragOver({
|
|
2739
|
-
clientX:
|
|
2740
|
-
clientY:
|
|
2760
|
+
clientX: la.clientX,
|
|
2761
|
+
clientY: la.clientY,
|
|
2741
2762
|
target: e,
|
|
2742
2763
|
rootEl: t
|
|
2743
2764
|
}), n && !this.options.dragoverBubble) break;
|
|
2744
2765
|
}
|
|
2745
2766
|
e = t;
|
|
2746
2767
|
} while (t = t.parentNode);
|
|
2747
|
-
|
|
2768
|
+
Na();
|
|
2748
2769
|
}
|
|
2749
2770
|
},
|
|
2750
2771
|
_onTouchMove: function(e) {
|
|
2751
|
-
if (
|
|
2752
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K &&
|
|
2753
|
-
if (!Q.active && !
|
|
2772
|
+
if (ca) {
|
|
2773
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && Di(K, !0), o = K && a && a.a, s = K && a && a.d, c = wa && Z && Ni(Z), l = (i.clientX - ca.clientX + r.x) / (o || 1) + (c ? c[0] - ba[0] : 0) / (o || 1), u = (i.clientY - ca.clientY + r.y) / (s || 1) + (c ? c[1] - ba[1] : 0) / (s || 1);
|
|
2774
|
+
if (!Q.active && !aa) {
|
|
2754
2775
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2755
2776
|
this._onDragStart(e, !0);
|
|
2756
2777
|
}
|
|
2757
2778
|
if (K) {
|
|
2758
|
-
a ? (a.e += l - (
|
|
2779
|
+
a ? (a.e += l - (ua || 0), a.f += u - (da || 0)) : a = {
|
|
2759
2780
|
a: 1,
|
|
2760
2781
|
b: 0,
|
|
2761
2782
|
c: 0,
|
|
@@ -2764,19 +2785,19 @@ Q.prototype = {
|
|
|
2764
2785
|
f: u
|
|
2765
2786
|
};
|
|
2766
2787
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2767
|
-
R(K, "webkitTransform", d), R(K, "mozTransform", d), R(K, "msTransform", d), R(K, "transform", d),
|
|
2788
|
+
R(K, "webkitTransform", d), R(K, "mozTransform", d), R(K, "msTransform", d), R(K, "transform", d), ua = l, da = u, la = i;
|
|
2768
2789
|
}
|
|
2769
2790
|
e.cancelable && e.preventDefault();
|
|
2770
2791
|
}
|
|
2771
2792
|
},
|
|
2772
2793
|
_appendGhost: function() {
|
|
2773
2794
|
if (!K) {
|
|
2774
|
-
var e = this.options.fallbackOnBody ? document.body : q, t = z(W, !0,
|
|
2775
|
-
if (
|
|
2795
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = z(W, !0, wa, !0, e), n = this.options;
|
|
2796
|
+
if (wa) {
|
|
2776
2797
|
for (Z = e; R(Z, "position") === "static" && R(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
2777
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
2798
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = ki()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = ki(), ba = Ni(Z);
|
|
2778
2799
|
}
|
|
2779
|
-
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",
|
|
2800
|
+
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", wa ? "absolute" : "fixed"), R(K, "zIndex", "100000"), R(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), R(K, "transform-origin", fa / parseInt(K.style.width) * 100 + "% " + pa / parseInt(K.style.height) * 100 + "%");
|
|
2780
2801
|
}
|
|
2781
2802
|
},
|
|
2782
2803
|
_onDragStart: function(e, t) {
|
|
@@ -2785,18 +2806,18 @@ Q.prototype = {
|
|
|
2785
2806
|
this._onDrop();
|
|
2786
2807
|
return;
|
|
2787
2808
|
}
|
|
2788
|
-
H("setupClone", this), Q.eventCanceled || (J =
|
|
2809
|
+
H("setupClone", this), Q.eventCanceled || (J = Hi(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), L(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Ka(function() {
|
|
2789
2810
|
H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
2790
2811
|
sortable: n,
|
|
2791
2812
|
name: "clone"
|
|
2792
2813
|
}));
|
|
2793
|
-
}), !t && L(W, i.dragClass, !0), t ? (
|
|
2814
|
+
}), !t && L(W, i.dragClass, !0), t ? (oa = !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)")), aa = !0, n._dragStartId = Ka(n._dragStarted.bind(n, t, e)), F(document, "selectstart", n), ma = !0, yi && R(document.body, "user-select", "none");
|
|
2794
2815
|
},
|
|
2795
2816
|
_onDragOver: function(e) {
|
|
2796
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
2797
|
-
if (
|
|
2817
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = ia === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
2818
|
+
if (xa) return;
|
|
2798
2819
|
function h(o, s) {
|
|
2799
|
-
H(o, p,
|
|
2820
|
+
H(o, p, ci({
|
|
2800
2821
|
evt: e,
|
|
2801
2822
|
isOwner: l,
|
|
2802
2823
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2808,7 +2829,7 @@ Q.prototype = {
|
|
|
2808
2829
|
target: n,
|
|
2809
2830
|
completed: _,
|
|
2810
2831
|
onMove: function(n, i) {
|
|
2811
|
-
return
|
|
2832
|
+
return La(q, t, W, r, n, z(n), e, i);
|
|
2812
2833
|
},
|
|
2813
2834
|
changed: v
|
|
2814
2835
|
}, s));
|
|
@@ -2819,35 +2840,35 @@ Q.prototype = {
|
|
|
2819
2840
|
function _(r) {
|
|
2820
2841
|
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() {
|
|
2821
2842
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2822
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (
|
|
2843
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (ha = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && Pa(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2823
2844
|
}
|
|
2824
2845
|
function v() {
|
|
2825
|
-
Y = B(W),
|
|
2846
|
+
Y = B(W), ra = B(W, o.draggable), U({
|
|
2826
2847
|
sortable: p,
|
|
2827
2848
|
name: "change",
|
|
2828
2849
|
toEl: t,
|
|
2829
2850
|
newIndex: Y,
|
|
2830
|
-
newDraggableIndex:
|
|
2851
|
+
newDraggableIndex: ra,
|
|
2831
2852
|
originalEvent: e
|
|
2832
2853
|
});
|
|
2833
2854
|
}
|
|
2834
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
2855
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Ti(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
2835
2856
|
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
2836
|
-
if (
|
|
2857
|
+
if (oa = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = ia.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
|
|
2837
2858
|
if (f = this._getDirection(e, n) === "vertical", r = z(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
2838
|
-
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
2839
|
-
var y =
|
|
2840
|
-
if (!y ||
|
|
2859
|
+
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Qi ? q.insertBefore(W, Qi) : q.appendChild(W)), _(!0);
|
|
2860
|
+
var y = Mi(t, o.draggable);
|
|
2861
|
+
if (!y || Va(e, f, this) && !y.animated) {
|
|
2841
2862
|
if (y === W) return _(!1);
|
|
2842
|
-
if (y && t === e.target && (n = y), n && (i = z(n)),
|
|
2843
|
-
} else if (y &&
|
|
2844
|
-
var b =
|
|
2863
|
+
if (y && t === e.target && (n = y), n && (i = z(n)), La(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);
|
|
2864
|
+
} else if (y && Ba(e, f, this)) {
|
|
2865
|
+
var b = ji(t, 0, o, !0);
|
|
2845
2866
|
if (b === W) return _(!1);
|
|
2846
|
-
if (n = b, i = z(n),
|
|
2867
|
+
if (n = b, i = z(n), La(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
|
|
2847
2868
|
} else if (n.parentNode === t) {
|
|
2848
2869
|
i = z(n);
|
|
2849
|
-
var x = 0, S, C = W.parentNode !== t, w = !
|
|
2850
|
-
|
|
2870
|
+
var x = 0, S, C = W.parentNode !== t, w = !ka(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Ai(n, "top", "top") || Ai(W, "top", "top"), ee = E ? E.scrollTop : void 0;
|
|
2871
|
+
ha !== n && (S = i[T], _a = !1, va = !w && o.invertSwap || C), x = Ha(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, va, ha === n);
|
|
2851
2872
|
var D;
|
|
2852
2873
|
if (x !== 0) {
|
|
2853
2874
|
var O = B(W);
|
|
@@ -2856,11 +2877,11 @@ Q.prototype = {
|
|
|
2856
2877
|
while (D && (R(D, "display") === "none" || D === K));
|
|
2857
2878
|
}
|
|
2858
2879
|
if (x === 0 || D === n) return _(!1);
|
|
2859
|
-
|
|
2880
|
+
ha = n, ga = x;
|
|
2860
2881
|
var k = n.nextElementSibling, te = !1;
|
|
2861
2882
|
te = x === 1;
|
|
2862
|
-
var A =
|
|
2863
|
-
if (A !== !1) return (A === 1 || A === -1) && (te = A === 1),
|
|
2883
|
+
var A = La(q, t, W, r, n, i, e, te);
|
|
2884
|
+
if (A !== !1) return (A === 1 || A === -1) && (te = A === 1), xa = !0, setTimeout(za, 30), g(), te && !k ? t.appendChild(W) : n.parentNode.insertBefore(W, te ? k : n), E && Vi(E, 0, ee - E.scrollTop), G = W.parentNode, S !== void 0 && !va && (ya = Math.abs(S - z(n)[T])), v(), _(!0);
|
|
2864
2885
|
}
|
|
2865
2886
|
if (t.contains(W)) return _(!1);
|
|
2866
2887
|
}
|
|
@@ -2868,7 +2889,7 @@ Q.prototype = {
|
|
|
2868
2889
|
},
|
|
2869
2890
|
_ignoreWhileAnimating: null,
|
|
2870
2891
|
_offMoveEvents: function() {
|
|
2871
|
-
I(document, "mousemove", this._onTouchMove), I(document, "touchmove", this._onTouchMove), I(document, "pointermove", this._onTouchMove), I(document, "dragover",
|
|
2892
|
+
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);
|
|
2872
2893
|
},
|
|
2873
2894
|
_offUpEvents: function() {
|
|
2874
2895
|
var e = this.el.ownerDocument;
|
|
@@ -2876,18 +2897,18 @@ Q.prototype = {
|
|
|
2876
2897
|
},
|
|
2877
2898
|
_onDrop: function(e) {
|
|
2878
2899
|
var t = this.el, n = this.options;
|
|
2879
|
-
if (Y = B(W),
|
|
2900
|
+
if (Y = B(W), ra = B(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = B(W), ra = B(W, n.draggable), Q.eventCanceled) {
|
|
2880
2901
|
this._nulling();
|
|
2881
2902
|
return;
|
|
2882
2903
|
}
|
|
2883
|
-
|
|
2904
|
+
aa = !1, va = !1, _a = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), qa(this.cloneId), qa(this._dragStartId), this.nativeDraggable && (I(document, "drop", this), I(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), yi && R(document.body, "user-select", ""), R(W, "transform", ""), e && (ma && (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), Ra(W), W.style["will-change"] = "", ma && !aa && L(W, X ? X.options.ghostClass : this.options.ghostClass, !1), L(W, this.options.chosenClass, !1), U({
|
|
2884
2905
|
sortable: this,
|
|
2885
2906
|
name: "unchoose",
|
|
2886
2907
|
toEl: G,
|
|
2887
2908
|
newIndex: null,
|
|
2888
2909
|
newDraggableIndex: null,
|
|
2889
2910
|
originalEvent: e
|
|
2890
|
-
}), q === G ? Y !==
|
|
2911
|
+
}), q === G ? Y !== ta && Y >= 0 && (U({
|
|
2891
2912
|
sortable: this,
|
|
2892
2913
|
name: "update",
|
|
2893
2914
|
toEl: G,
|
|
@@ -2919,7 +2940,7 @@ Q.prototype = {
|
|
|
2919
2940
|
name: "sort",
|
|
2920
2941
|
toEl: G,
|
|
2921
2942
|
originalEvent: e
|
|
2922
|
-
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y =
|
|
2943
|
+
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = ta, ra = na), U({
|
|
2923
2944
|
sortable: this,
|
|
2924
2945
|
name: "end",
|
|
2925
2946
|
toEl: G,
|
|
@@ -2927,9 +2948,9 @@ Q.prototype = {
|
|
|
2927
2948
|
}), this.save()))), this._nulling();
|
|
2928
2949
|
},
|
|
2929
2950
|
_nulling: function() {
|
|
2930
|
-
H("nulling", this), q = W = G = K =
|
|
2951
|
+
H("nulling", this), q = W = G = K = Qi = J = $i = ea = ca = la = ma = Y = ra = ta = na = ha = ga = X = ia = Q.dragged = Q.ghost = Q.clone = Q.active = null, Sa.forEach(function(e) {
|
|
2931
2952
|
e.checked = !0;
|
|
2932
|
-
}),
|
|
2953
|
+
}), Sa.length = ua = da = 0;
|
|
2933
2954
|
},
|
|
2934
2955
|
handleEvent: function(e) {
|
|
2935
2956
|
switch (e.type) {
|
|
@@ -2939,7 +2960,7 @@ Q.prototype = {
|
|
|
2939
2960
|
break;
|
|
2940
2961
|
case "dragenter":
|
|
2941
2962
|
case "dragover":
|
|
2942
|
-
W && (this._onDragOver(e),
|
|
2963
|
+
W && (this._onDragOver(e), Ia(e));
|
|
2943
2964
|
break;
|
|
2944
2965
|
case "selectstart":
|
|
2945
2966
|
e.preventDefault();
|
|
@@ -2947,14 +2968,14 @@ Q.prototype = {
|
|
|
2947
2968
|
}
|
|
2948
2969
|
},
|
|
2949
2970
|
toArray: function() {
|
|
2950
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
2971
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ti(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Wa(t));
|
|
2951
2972
|
return e;
|
|
2952
2973
|
},
|
|
2953
2974
|
sort: function(e, t) {
|
|
2954
2975
|
var n = {}, r = this.el;
|
|
2955
2976
|
this.toArray().forEach(function(e, t) {
|
|
2956
2977
|
var i = r.children[t];
|
|
2957
|
-
|
|
2978
|
+
Ti(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
2958
2979
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
2959
2980
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
2960
2981
|
}), t && this.animateAll();
|
|
@@ -2964,25 +2985,25 @@ Q.prototype = {
|
|
|
2964
2985
|
e && e.set && e.set(this);
|
|
2965
2986
|
},
|
|
2966
2987
|
closest: function(e, t) {
|
|
2967
|
-
return
|
|
2988
|
+
return Ti(e, t || this.options.draggable, this.el, !1);
|
|
2968
2989
|
},
|
|
2969
2990
|
option: function(e, t) {
|
|
2970
2991
|
var n = this.options;
|
|
2971
2992
|
if (t === void 0) return n[e];
|
|
2972
|
-
var r =
|
|
2973
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
2993
|
+
var r = Yi.modifyOption(this, e, t);
|
|
2994
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && ja(n);
|
|
2974
2995
|
},
|
|
2975
2996
|
destroy: function() {
|
|
2976
2997
|
H("destroy", this);
|
|
2977
2998
|
var e = this.el;
|
|
2978
2999
|
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) {
|
|
2979
3000
|
e.removeAttribute("draggable");
|
|
2980
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3001
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), sa.splice(sa.indexOf(this.el), 1), this.el = e = null;
|
|
2981
3002
|
},
|
|
2982
3003
|
_hideClone: function() {
|
|
2983
|
-
if (!
|
|
3004
|
+
if (!ea) {
|
|
2984
3005
|
if (H("hideClone", this), Q.eventCanceled) return;
|
|
2985
|
-
R(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J),
|
|
3006
|
+
R(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), ea = !0;
|
|
2986
3007
|
}
|
|
2987
3008
|
},
|
|
2988
3009
|
_showClone: function(e) {
|
|
@@ -2990,99 +3011,99 @@ Q.prototype = {
|
|
|
2990
3011
|
this._hideClone();
|
|
2991
3012
|
return;
|
|
2992
3013
|
}
|
|
2993
|
-
if (
|
|
3014
|
+
if (ea) {
|
|
2994
3015
|
if (H("showClone", this), Q.eventCanceled) return;
|
|
2995
|
-
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) :
|
|
3016
|
+
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : Qi ? q.insertBefore(J, Qi) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), R(J, "display", ""), ea = !1;
|
|
2996
3017
|
}
|
|
2997
3018
|
}
|
|
2998
3019
|
};
|
|
2999
|
-
function
|
|
3020
|
+
function Ia(e) {
|
|
3000
3021
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3001
3022
|
}
|
|
3002
|
-
function
|
|
3023
|
+
function La(e, t, n, r, i, a, o, s) {
|
|
3003
3024
|
var c, l = e[V], u = l.options.onMove, d;
|
|
3004
|
-
return window.CustomEvent && !
|
|
3025
|
+
return window.CustomEvent && !gi && !_i ? c = new CustomEvent("move", {
|
|
3005
3026
|
bubbles: !0,
|
|
3006
3027
|
cancelable: !0
|
|
3007
3028
|
}) : (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;
|
|
3008
3029
|
}
|
|
3009
|
-
function
|
|
3030
|
+
function Ra(e) {
|
|
3010
3031
|
e.draggable = !1;
|
|
3011
3032
|
}
|
|
3012
|
-
function
|
|
3013
|
-
|
|
3033
|
+
function za() {
|
|
3034
|
+
xa = !1;
|
|
3014
3035
|
}
|
|
3015
|
-
function
|
|
3016
|
-
var r = z(
|
|
3036
|
+
function Ba(e, t, n) {
|
|
3037
|
+
var r = z(ji(n.el, 0, n.options, !0)), i = Ui(n.el, n.options, K), a = 10;
|
|
3017
3038
|
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;
|
|
3018
3039
|
}
|
|
3019
|
-
function
|
|
3020
|
-
var r = z(
|
|
3040
|
+
function Va(e, t, n) {
|
|
3041
|
+
var r = z(Mi(n.el, n.options.draggable)), i = Ui(n.el, n.options, K), a = 10;
|
|
3021
3042
|
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;
|
|
3022
3043
|
}
|
|
3023
|
-
function
|
|
3044
|
+
function Ha(e, t, n, r, i, a, o, s) {
|
|
3024
3045
|
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;
|
|
3025
3046
|
if (!o) {
|
|
3026
|
-
if (s &&
|
|
3027
|
-
if (!
|
|
3028
|
-
else if (
|
|
3029
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3047
|
+
if (s && ya < l * i) {
|
|
3048
|
+
if (!_a && (ga === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (_a = !0), _a) f = !0;
|
|
3049
|
+
else if (ga === 1 ? c < u + ya : c > d - ya) return -ga;
|
|
3050
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Ua(t);
|
|
3030
3051
|
}
|
|
3031
3052
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3032
3053
|
}
|
|
3033
|
-
function
|
|
3054
|
+
function Ua(e) {
|
|
3034
3055
|
return B(W) < B(e) ? 1 : -1;
|
|
3035
3056
|
}
|
|
3036
|
-
function
|
|
3057
|
+
function Wa(e) {
|
|
3037
3058
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3038
3059
|
return r.toString(36);
|
|
3039
3060
|
}
|
|
3040
|
-
function
|
|
3041
|
-
|
|
3061
|
+
function Ga(e) {
|
|
3062
|
+
Sa.length = 0;
|
|
3042
3063
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3043
3064
|
var r = t[n];
|
|
3044
|
-
r.checked &&
|
|
3065
|
+
r.checked && Sa.push(r);
|
|
3045
3066
|
}
|
|
3046
3067
|
}
|
|
3047
|
-
function
|
|
3068
|
+
function Ka(e) {
|
|
3048
3069
|
return setTimeout(e, 0);
|
|
3049
3070
|
}
|
|
3050
|
-
function
|
|
3071
|
+
function qa(e) {
|
|
3051
3072
|
return clearTimeout(e);
|
|
3052
3073
|
}
|
|
3053
|
-
|
|
3054
|
-
(Q.active ||
|
|
3074
|
+
Ca && F(document, "touchmove", function(e) {
|
|
3075
|
+
(Q.active || aa) && e.cancelable && e.preventDefault();
|
|
3055
3076
|
}), Q.utils = {
|
|
3056
3077
|
on: F,
|
|
3057
3078
|
off: I,
|
|
3058
3079
|
css: R,
|
|
3059
|
-
find:
|
|
3080
|
+
find: Oi,
|
|
3060
3081
|
is: function(e, t) {
|
|
3061
|
-
return !!
|
|
3082
|
+
return !!Ti(e, t, e, !1);
|
|
3062
3083
|
},
|
|
3063
|
-
extend:
|
|
3064
|
-
throttle:
|
|
3065
|
-
closest:
|
|
3084
|
+
extend: Ii,
|
|
3085
|
+
throttle: zi,
|
|
3086
|
+
closest: Ti,
|
|
3066
3087
|
toggleClass: L,
|
|
3067
|
-
clone:
|
|
3088
|
+
clone: Hi,
|
|
3068
3089
|
index: B,
|
|
3069
|
-
nextTick:
|
|
3070
|
-
cancelNextTick:
|
|
3071
|
-
detectDirection:
|
|
3072
|
-
getChild:
|
|
3090
|
+
nextTick: Ka,
|
|
3091
|
+
cancelNextTick: qa,
|
|
3092
|
+
detectDirection: Oa,
|
|
3093
|
+
getChild: ji
|
|
3073
3094
|
}, Q.get = function(e) {
|
|
3074
3095
|
return e[V];
|
|
3075
3096
|
}, Q.mount = function() {
|
|
3076
3097
|
var e = [...arguments];
|
|
3077
3098
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3078
3099
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3079
|
-
e.utils && (Q.utils =
|
|
3100
|
+
e.utils && (Q.utils = ci(ci({}, Q.utils), e.utils)), Yi.mount(e);
|
|
3080
3101
|
});
|
|
3081
3102
|
}, Q.create = function(e, t) {
|
|
3082
3103
|
return new Q(e, t);
|
|
3083
|
-
}, Q.version =
|
|
3084
|
-
var $ = [],
|
|
3085
|
-
function
|
|
3104
|
+
}, Q.version = mi;
|
|
3105
|
+
var $ = [], Ja, Ya, Xa = !1, Za, Qa, $a, eo;
|
|
3106
|
+
function to() {
|
|
3086
3107
|
function e() {
|
|
3087
3108
|
for (var e in this.defaults = {
|
|
3088
3109
|
scroll: !0,
|
|
@@ -3102,63 +3123,63 @@ function Xa() {
|
|
|
3102
3123
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3103
3124
|
},
|
|
3104
3125
|
drop: function() {
|
|
3105
|
-
this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : (I(document, "pointermove", this._handleFallbackAutoScroll), I(document, "touchmove", this._handleFallbackAutoScroll), I(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3126
|
+
this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : (I(document, "pointermove", this._handleFallbackAutoScroll), I(document, "touchmove", this._handleFallbackAutoScroll), I(document, "mousemove", this._handleFallbackAutoScroll)), ro(), no(), Bi();
|
|
3106
3127
|
},
|
|
3107
3128
|
nulling: function() {
|
|
3108
|
-
|
|
3129
|
+
$a = Ya = Ja = Xa = eo = Za = Qa = null, $.length = 0;
|
|
3109
3130
|
},
|
|
3110
3131
|
_handleFallbackAutoScroll: function(e) {
|
|
3111
3132
|
this._handleAutoScroll(e, !0);
|
|
3112
3133
|
},
|
|
3113
3134
|
_handleAutoScroll: function(e, t) {
|
|
3114
3135
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3115
|
-
if (
|
|
3116
|
-
|
|
3117
|
-
var o =
|
|
3118
|
-
|
|
3119
|
-
var a =
|
|
3120
|
-
a !== o && (o = a,
|
|
3121
|
-
}, 10),
|
|
3136
|
+
if ($a = e, t || this.options.forceAutoScrollFallback || _i || gi || yi) {
|
|
3137
|
+
io(e, this.options, a, t);
|
|
3138
|
+
var o = Fi(a, !0);
|
|
3139
|
+
Xa && (!eo || r !== Za || i !== Qa) && (eo && ro(), eo = setInterval(function() {
|
|
3140
|
+
var a = Fi(document.elementFromPoint(r, i), !0);
|
|
3141
|
+
a !== o && (o = a, no()), io(e, n.options, a, t);
|
|
3142
|
+
}, 10), Za = r, Qa = i);
|
|
3122
3143
|
} else {
|
|
3123
|
-
if (!this.options.bubbleScroll ||
|
|
3124
|
-
|
|
3144
|
+
if (!this.options.bubbleScroll || Fi(a, !0) === ki()) {
|
|
3145
|
+
no();
|
|
3125
3146
|
return;
|
|
3126
3147
|
}
|
|
3127
|
-
|
|
3148
|
+
io(e, this.options, Fi(a, !1), !1);
|
|
3128
3149
|
}
|
|
3129
3150
|
}
|
|
3130
|
-
},
|
|
3151
|
+
}, di(e, {
|
|
3131
3152
|
pluginName: "scroll",
|
|
3132
3153
|
initializeByDefault: !0
|
|
3133
3154
|
});
|
|
3134
3155
|
}
|
|
3135
|
-
function
|
|
3156
|
+
function no() {
|
|
3136
3157
|
$.forEach(function(e) {
|
|
3137
3158
|
clearInterval(e.pid);
|
|
3138
3159
|
}), $ = [];
|
|
3139
3160
|
}
|
|
3140
|
-
function
|
|
3141
|
-
clearInterval(
|
|
3161
|
+
function ro() {
|
|
3162
|
+
clearInterval(eo);
|
|
3142
3163
|
}
|
|
3143
|
-
var
|
|
3164
|
+
var io = zi(function(e, t, n, r) {
|
|
3144
3165
|
if (t.scroll) {
|
|
3145
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3146
|
-
|
|
3147
|
-
var d = 0, f =
|
|
3166
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = ki(), l = !1, u;
|
|
3167
|
+
Ya !== n && (Ya = n, no(), Ja = t.scroll, u = t.scrollFn, Ja === !0 && (Ja = Fi(n, !0)));
|
|
3168
|
+
var d = 0, f = Ja;
|
|
3148
3169
|
do {
|
|
3149
3170
|
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;
|
|
3150
3171
|
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"));
|
|
3151
3172
|
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);
|
|
3152
3173
|
if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
|
|
3153
3174
|
($[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() {
|
|
3154
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3175
|
+
r && this.layer === 0 && Q.active._onTouchMove($a);
|
|
3155
3176
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3156
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e,
|
|
3177
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, $a, $[this.layer].el) !== "continue" || Vi($[this.layer].el, n, t);
|
|
3157
3178
|
}.bind({ layer: d }), 24))), d++;
|
|
3158
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3159
|
-
|
|
3179
|
+
} while (t.bubbleScroll && f !== c && (f = Fi(f, !1)));
|
|
3180
|
+
Xa = l;
|
|
3160
3181
|
}
|
|
3161
|
-
}, 30),
|
|
3182
|
+
}, 30), ao = function(e) {
|
|
3162
3183
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3163
3184
|
if (t) {
|
|
3164
3185
|
var c = n || i;
|
|
@@ -3170,8 +3191,8 @@ var $a = Pi(function(e, t, n, r) {
|
|
|
3170
3191
|
}));
|
|
3171
3192
|
}
|
|
3172
3193
|
};
|
|
3173
|
-
function
|
|
3174
|
-
|
|
3194
|
+
function oo() {}
|
|
3195
|
+
oo.prototype = {
|
|
3175
3196
|
startIndex: null,
|
|
3176
3197
|
dragStart: function(e) {
|
|
3177
3198
|
var t = e.oldDraggableIndex;
|
|
@@ -3180,72 +3201,72 @@ to.prototype = {
|
|
|
3180
3201
|
onSpill: function(e) {
|
|
3181
3202
|
var t = e.dragEl, n = e.putSortable;
|
|
3182
3203
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3183
|
-
var r =
|
|
3204
|
+
var r = ji(this.sortable.el, this.startIndex, this.options);
|
|
3184
3205
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3185
3206
|
},
|
|
3186
|
-
drop:
|
|
3187
|
-
},
|
|
3188
|
-
function
|
|
3189
|
-
|
|
3207
|
+
drop: ao
|
|
3208
|
+
}, di(oo, { pluginName: "revertOnSpill" });
|
|
3209
|
+
function so() {}
|
|
3210
|
+
so.prototype = {
|
|
3190
3211
|
onSpill: function(e) {
|
|
3191
3212
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3192
3213
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3193
3214
|
},
|
|
3194
|
-
drop:
|
|
3195
|
-
},
|
|
3196
|
-
function
|
|
3215
|
+
drop: ao
|
|
3216
|
+
}, di(so, { pluginName: "removeOnSpill" }), Q.mount(new to()), Q.mount(so, oo);
|
|
3217
|
+
function co(e) {
|
|
3197
3218
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3198
3219
|
}
|
|
3199
|
-
function
|
|
3220
|
+
function lo(e) {
|
|
3200
3221
|
oe() && ee(e);
|
|
3201
3222
|
}
|
|
3202
|
-
function
|
|
3223
|
+
function uo(e) {
|
|
3203
3224
|
oe() ? u(e) : r(e);
|
|
3204
3225
|
}
|
|
3205
|
-
var
|
|
3206
|
-
function
|
|
3207
|
-
|
|
3226
|
+
var fo = null, po = null;
|
|
3227
|
+
function mo(e = null, t = null) {
|
|
3228
|
+
fo = e, po = t;
|
|
3208
3229
|
}
|
|
3209
|
-
function
|
|
3230
|
+
function ho() {
|
|
3210
3231
|
return {
|
|
3211
|
-
data:
|
|
3212
|
-
clonedData:
|
|
3232
|
+
data: fo,
|
|
3233
|
+
clonedData: po
|
|
3213
3234
|
};
|
|
3214
3235
|
}
|
|
3215
|
-
var
|
|
3216
|
-
function
|
|
3236
|
+
var go = Symbol("cloneElement");
|
|
3237
|
+
function _o(...e) {
|
|
3217
3238
|
let t = oe()?.proxy, n = null, i = e[0], [, o, c] = e;
|
|
3218
3239
|
Array.isArray(j(o)) || (c = o, o = null);
|
|
3219
|
-
let l = null, { immediate: u = !0, clone: d =
|
|
3240
|
+
let l = null, { immediate: u = !0, clone: d = co, forceFallback: f, fallbackOnBody: p, customUpdate: m } = j(c) ?? {};
|
|
3220
3241
|
function h(e) {
|
|
3221
3242
|
let { from: t, oldIndex: r, item: i } = e, a = Array.from(t.childNodes);
|
|
3222
3243
|
n = f && !p ? a.slice(0, -1) : a;
|
|
3223
3244
|
let s = j(j(o)?.[r]), c = d(s);
|
|
3224
|
-
|
|
3245
|
+
mo(s, c), i[go] = c;
|
|
3225
3246
|
}
|
|
3226
3247
|
function g(e) {
|
|
3227
|
-
let t = e.item[
|
|
3228
|
-
if (!
|
|
3229
|
-
if (
|
|
3248
|
+
let t = e.item[go];
|
|
3249
|
+
if (!Xr(t)) {
|
|
3250
|
+
if ($r(e.item), a(o)) {
|
|
3230
3251
|
let n = [...j(o)];
|
|
3231
|
-
o.value =
|
|
3252
|
+
o.value = Yr(n, e.newDraggableIndex, t);
|
|
3232
3253
|
return;
|
|
3233
3254
|
}
|
|
3234
|
-
|
|
3255
|
+
Yr(j(o), e.newDraggableIndex, t);
|
|
3235
3256
|
}
|
|
3236
3257
|
}
|
|
3237
3258
|
function _(e) {
|
|
3238
3259
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, pullMode: s, clone: c } = e;
|
|
3239
|
-
if (
|
|
3240
|
-
|
|
3260
|
+
if (Qr(t, n, r), s === "clone") {
|
|
3261
|
+
$r(c);
|
|
3241
3262
|
return;
|
|
3242
3263
|
}
|
|
3243
3264
|
if (a(o)) {
|
|
3244
3265
|
let e = [...j(o)];
|
|
3245
|
-
o.value =
|
|
3266
|
+
o.value = Jr(e, i);
|
|
3246
3267
|
return;
|
|
3247
3268
|
}
|
|
3248
|
-
|
|
3269
|
+
Jr(j(o), i);
|
|
3249
3270
|
}
|
|
3250
3271
|
function v(e) {
|
|
3251
3272
|
if (m) {
|
|
@@ -3253,12 +3274,12 @@ function fo(...e) {
|
|
|
3253
3274
|
return;
|
|
3254
3275
|
}
|
|
3255
3276
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, newDraggableIndex: s } = e;
|
|
3256
|
-
if (
|
|
3277
|
+
if ($r(n), Qr(t, n, r), a(o)) {
|
|
3257
3278
|
let e = [...j(o)];
|
|
3258
|
-
o.value =
|
|
3279
|
+
o.value = Gr(e, i, s);
|
|
3259
3280
|
return;
|
|
3260
3281
|
}
|
|
3261
|
-
|
|
3282
|
+
Gr(j(o), i, s);
|
|
3262
3283
|
}
|
|
3263
3284
|
function y(e) {
|
|
3264
3285
|
let { newIndex: t, oldIndex: i, from: a, to: o } = e, s = null, c = t === i && a === o;
|
|
@@ -3277,7 +3298,7 @@ function fo(...e) {
|
|
|
3277
3298
|
n = null;
|
|
3278
3299
|
}
|
|
3279
3300
|
r(() => {
|
|
3280
|
-
if (
|
|
3301
|
+
if (mo(), s) throw s;
|
|
3281
3302
|
});
|
|
3282
3303
|
}
|
|
3283
3304
|
let b = {
|
|
@@ -3289,19 +3310,19 @@ function fo(...e) {
|
|
|
3289
3310
|
};
|
|
3290
3311
|
function x(e) {
|
|
3291
3312
|
let n = j(i);
|
|
3292
|
-
return e ||=
|
|
3313
|
+
return e ||= Zr(n) ? ei(n, t?.$el) : n, e && !ri(e) && (e = e.$el), e || Wr("Root element not found"), e;
|
|
3293
3314
|
}
|
|
3294
3315
|
function S() {
|
|
3295
|
-
let e = j(c) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3296
|
-
return
|
|
3297
|
-
|
|
3298
|
-
}),
|
|
3316
|
+
let e = j(c) ?? {}, { immediate: t, clone: n } = e, r = Vr(e, ["immediate", "clone"]);
|
|
3317
|
+
return ii(r, (e, t) => {
|
|
3318
|
+
ai(e) && (r[e] = (e, ...n) => (oi(e, ho()), t(e, ...n)));
|
|
3319
|
+
}), ni(o === null ? {} : b, r);
|
|
3299
3320
|
}
|
|
3300
3321
|
let C = (e) => {
|
|
3301
3322
|
e = x(e), l && w.destroy(), l = new Q(e, S());
|
|
3302
3323
|
};
|
|
3303
3324
|
s(() => c, () => {
|
|
3304
|
-
l &&
|
|
3325
|
+
l && ii(S(), (e, t) => {
|
|
3305
3326
|
l?.option(e, t);
|
|
3306
3327
|
});
|
|
3307
3328
|
}, { deep: !0 });
|
|
@@ -3314,15 +3335,15 @@ function fo(...e) {
|
|
|
3314
3335
|
toArray: () => l?.toArray(),
|
|
3315
3336
|
closest: (...e) => l?.closest(...e)
|
|
3316
3337
|
};
|
|
3317
|
-
return
|
|
3338
|
+
return uo(() => {
|
|
3318
3339
|
u && C();
|
|
3319
|
-
}),
|
|
3340
|
+
}), lo(w.destroy), Br({
|
|
3320
3341
|
start: C,
|
|
3321
3342
|
pause: () => w?.option("disabled", !0),
|
|
3322
3343
|
resume: () => w?.option("disabled", !1)
|
|
3323
3344
|
}, w);
|
|
3324
3345
|
}
|
|
3325
|
-
var
|
|
3346
|
+
var vo = [
|
|
3326
3347
|
"update",
|
|
3327
3348
|
"start",
|
|
3328
3349
|
"add",
|
|
@@ -3335,7 +3356,7 @@ var po = [
|
|
|
3335
3356
|
"clone",
|
|
3336
3357
|
"move",
|
|
3337
3358
|
"change"
|
|
3338
|
-
],
|
|
3359
|
+
], yo = y({
|
|
3339
3360
|
name: "VueDraggable",
|
|
3340
3361
|
model: {
|
|
3341
3362
|
prop: "modelValue",
|
|
@@ -3385,37 +3406,37 @@ var po = [
|
|
|
3385
3406
|
"tag",
|
|
3386
3407
|
"target",
|
|
3387
3408
|
"customUpdate",
|
|
3388
|
-
...
|
|
3409
|
+
...vo.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3389
3410
|
],
|
|
3390
|
-
emits: ["update:modelValue", ...
|
|
3411
|
+
emits: ["update:modelValue", ...vo],
|
|
3391
3412
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3392
|
-
let a =
|
|
3413
|
+
let a = vo.reduce((e, t) => {
|
|
3393
3414
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3394
3415
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3395
3416
|
}, {}), s = x(() => {
|
|
3396
|
-
let t = S(e), { modelValue: n } = t, r =
|
|
3417
|
+
let t = S(e), { modelValue: n } = t, r = Vr(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3397
3418
|
let r = j(n);
|
|
3398
3419
|
return r !== void 0 && (e[t] = r), e;
|
|
3399
3420
|
}, {});
|
|
3400
|
-
return
|
|
3421
|
+
return Br(Br({}, a), qr(Br(Br({}, i), o)));
|
|
3401
3422
|
}), c = x({
|
|
3402
3423
|
get: () => e.modelValue,
|
|
3403
3424
|
set: (e) => n("update:modelValue", e)
|
|
3404
|
-
}), l = h(), u = o(
|
|
3425
|
+
}), l = h(), u = o(_o(e.target || l, c, s));
|
|
3405
3426
|
return r(u), () => f(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
|
|
3406
3427
|
}
|
|
3407
|
-
}),
|
|
3428
|
+
}), bo = {
|
|
3408
3429
|
mounted: "mounted",
|
|
3409
3430
|
unmounted: "unmounted"
|
|
3410
3431
|
};
|
|
3411
|
-
|
|
3432
|
+
bo.mounted, bo.unmounted;
|
|
3412
3433
|
//#endregion
|
|
3413
3434
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3414
|
-
var
|
|
3435
|
+
var xo = { class: "tpl:w-full" }, So = { class: "tpl:flex tpl:gap-0" }, Co = {
|
|
3415
3436
|
key: 0,
|
|
3416
3437
|
"data-testid": "section-drop-hint",
|
|
3417
3438
|
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)]"
|
|
3418
|
-
},
|
|
3439
|
+
}, wo = /* @__PURE__ */ y({
|
|
3419
3440
|
__name: "SectionBlock",
|
|
3420
3441
|
props: {
|
|
3421
3442
|
block: {},
|
|
@@ -3423,13 +3444,13 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3423
3444
|
},
|
|
3424
3445
|
setup(n) {
|
|
3425
3446
|
let r = {
|
|
3426
|
-
title:
|
|
3427
|
-
paragraph:
|
|
3428
|
-
image:
|
|
3429
|
-
button:
|
|
3430
|
-
divider:
|
|
3431
|
-
custom:
|
|
3432
|
-
}, a = n, { t: o } =
|
|
3447
|
+
title: Pr,
|
|
3448
|
+
paragraph: _r,
|
|
3449
|
+
image: ir,
|
|
3450
|
+
button: rn,
|
|
3451
|
+
divider: Hn,
|
|
3452
|
+
custom: Bn
|
|
3453
|
+
}, a = n, { t: o } = ft(), s = He(nt, "SectionBlock"), l = ae(st, null), u = ae(it, null), d = x(() => {
|
|
3433
3454
|
switch (a.block.columns) {
|
|
3434
3455
|
case "2": return ["50%", "50%"];
|
|
3435
3456
|
case "3": return [
|
|
@@ -3455,7 +3476,7 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3455
3476
|
r[e] = n, s.updateBlock(a.block.id, { children: r });
|
|
3456
3477
|
}
|
|
3457
3478
|
function h(e) {
|
|
3458
|
-
return
|
|
3479
|
+
return vr(e, u, r);
|
|
3459
3480
|
}
|
|
3460
3481
|
function g(e, t) {
|
|
3461
3482
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
@@ -3463,11 +3484,11 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3463
3484
|
dataSourceFetched: t.dataSourceFetched
|
|
3464
3485
|
});
|
|
3465
3486
|
}
|
|
3466
|
-
return (r, a) => (e(), w("div",
|
|
3487
|
+
return (r, a) => (e(), w("div", xo, [C("div", So, [(e(!0), w(D, null, c(f.value, (r, a) => (e(), w("div", {
|
|
3467
3488
|
key: a,
|
|
3468
3489
|
class: v(["tpl:relative tpl:min-h-[60px] tpl:rounded", p(a).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3469
3490
|
style: A({ width: d.value[a] })
|
|
3470
|
-
}, [N(j(
|
|
3491
|
+
}, [N(j(yo), {
|
|
3471
3492
|
"model-value": p(a),
|
|
3472
3493
|
group: {
|
|
3473
3494
|
name: "blocks",
|
|
@@ -3485,10 +3506,11 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3485
3506
|
class: "tpl:min-h-[60px]",
|
|
3486
3507
|
"onUpdate:modelValue": (e) => m(a, e)
|
|
3487
3508
|
}, {
|
|
3488
|
-
default: ce(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [N(
|
|
3509
|
+
default: ce(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [N(Mr, {
|
|
3489
3510
|
block: r,
|
|
3490
3511
|
"is-selected": j(s).state.selectedBlockId === r.id,
|
|
3491
3512
|
viewport: n.viewport,
|
|
3513
|
+
"preview-mode": j(s).state.previewMode,
|
|
3492
3514
|
onSelect: (e) => j(s).selectBlock(r.id)
|
|
3493
3515
|
}, {
|
|
3494
3516
|
default: ce(() => [(e(), ne(i(h(r)), {
|
|
@@ -3505,6 +3527,7 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3505
3527
|
"block",
|
|
3506
3528
|
"is-selected",
|
|
3507
3529
|
"viewport",
|
|
3530
|
+
"preview-mode",
|
|
3508
3531
|
"onSelect"
|
|
3509
3532
|
])])), [[te, !j(l)?.isHidden(r.id)]])), 128))]),
|
|
3510
3533
|
_: 2
|
|
@@ -3512,9 +3535,9 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3512
3535
|
"model-value",
|
|
3513
3536
|
"group",
|
|
3514
3537
|
"onUpdate:modelValue"
|
|
3515
|
-
]), p(a).length === 0 ? (e(), w("div",
|
|
3538
|
+
]), p(a).length === 0 ? (e(), w("div", Co, [C("span", null, M(j(o).section.dropHere), 1)])) : O("", !0)], 6))), 128))])]));
|
|
3516
3539
|
}
|
|
3517
|
-
}),
|
|
3540
|
+
}), To = {
|
|
3518
3541
|
facebook: {
|
|
3519
3542
|
name: "Facebook",
|
|
3520
3543
|
color: "#1877F2",
|
|
@@ -3595,11 +3618,11 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3595
3618
|
color: "#1769FF",
|
|
3596
3619
|
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"
|
|
3597
3620
|
}
|
|
3598
|
-
},
|
|
3621
|
+
}, Eo = {
|
|
3599
3622
|
small: 24,
|
|
3600
3623
|
medium: 32,
|
|
3601
3624
|
large: 48
|
|
3602
|
-
},
|
|
3625
|
+
}, Do = [
|
|
3603
3626
|
"facebook",
|
|
3604
3627
|
"twitter",
|
|
3605
3628
|
"instagram",
|
|
@@ -3616,11 +3639,11 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3616
3639
|
"github",
|
|
3617
3640
|
"dribbble",
|
|
3618
3641
|
"behance"
|
|
3619
|
-
],
|
|
3642
|
+
], Oo = [
|
|
3620
3643
|
"width",
|
|
3621
3644
|
"height",
|
|
3622
3645
|
"fill"
|
|
3623
|
-
],
|
|
3646
|
+
], ko = ["d"], Ao = /* @__PURE__ */ y({
|
|
3624
3647
|
__name: "SocialIconSvg",
|
|
3625
3648
|
props: {
|
|
3626
3649
|
platform: {},
|
|
@@ -3628,7 +3651,7 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3628
3651
|
iconSize: {}
|
|
3629
3652
|
},
|
|
3630
3653
|
setup(t) {
|
|
3631
|
-
let n = t, r = x(() =>
|
|
3654
|
+
let n = t, r = x(() => To[n.platform]), i = x(() => Eo[n.iconSize]), a = x(() => {
|
|
3632
3655
|
let e = {
|
|
3633
3656
|
display: "inline-flex",
|
|
3634
3657
|
alignItems: "center",
|
|
@@ -3672,25 +3695,25 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3672
3695
|
viewBox: "0 0 24 24",
|
|
3673
3696
|
fill: s.value,
|
|
3674
3697
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3675
|
-
}, [C("path", { d: r.value.path }, null, 8,
|
|
3698
|
+
}, [C("path", { d: r.value.path }, null, 8, ko)], 8, Oo))], 4));
|
|
3676
3699
|
}
|
|
3677
|
-
}),
|
|
3700
|
+
}), jo = { class: "tpl:w-full" }, Mo = ["href"], No = {
|
|
3678
3701
|
key: 1,
|
|
3679
3702
|
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)]"
|
|
3680
|
-
},
|
|
3703
|
+
}, Po = /* @__PURE__ */ y({
|
|
3681
3704
|
__name: "SocialIconsBlock",
|
|
3682
3705
|
props: {
|
|
3683
3706
|
block: {},
|
|
3684
3707
|
viewport: {}
|
|
3685
3708
|
},
|
|
3686
3709
|
setup(t) {
|
|
3687
|
-
let n = t, { t: r } =
|
|
3710
|
+
let n = t, { t: r } = ft(), i = x(() => ({
|
|
3688
3711
|
display: "flex",
|
|
3689
3712
|
flexWrap: "wrap",
|
|
3690
3713
|
gap: `${n.block.spacing}px`,
|
|
3691
3714
|
justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
|
|
3692
3715
|
})), a = x(() => n.block.icons.length > 0);
|
|
3693
|
-
return (n, o) => (e(), w("div",
|
|
3716
|
+
return (n, o) => (e(), w("div", jo, [a.value ? (e(), w("div", {
|
|
3694
3717
|
key: 0,
|
|
3695
3718
|
style: A(i.value)
|
|
3696
3719
|
}, [(e(!0), w(D, null, c(t.block.icons, (n) => (e(), w("a", {
|
|
@@ -3698,7 +3721,7 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3698
3721
|
href: n.url || "#",
|
|
3699
3722
|
class: "tpl:cursor-default",
|
|
3700
3723
|
onClick: o[0] ||= b(() => {}, ["prevent"])
|
|
3701
|
-
}, [N(
|
|
3724
|
+
}, [N(Ao, {
|
|
3702
3725
|
platform: n.platform,
|
|
3703
3726
|
"icon-style": t.block.iconStyle,
|
|
3704
3727
|
"icon-size": t.block.iconSize
|
|
@@ -3706,44 +3729,44 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3706
3729
|
"platform",
|
|
3707
3730
|
"icon-style",
|
|
3708
3731
|
"icon-size"
|
|
3709
|
-
])], 8,
|
|
3732
|
+
])], 8, Mo))), 128))], 4)) : (e(), w("div", No, [N(j(hn), { size: 16 }), C("span", null, M(j(r).social.addIcons), 1)]))]));
|
|
3710
3733
|
}
|
|
3711
|
-
}),
|
|
3734
|
+
}), Fo = { class: "tpl:w-full" }, Io = {
|
|
3712
3735
|
key: 0,
|
|
3713
3736
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3714
3737
|
style: {
|
|
3715
3738
|
"background-color": "var(--tpl-bg-hover)",
|
|
3716
3739
|
color: "var(--tpl-text-dim)"
|
|
3717
3740
|
}
|
|
3718
|
-
},
|
|
3741
|
+
}, Lo = /* @__PURE__ */ y({
|
|
3719
3742
|
__name: "SpacerBlock",
|
|
3720
3743
|
props: {
|
|
3721
3744
|
block: {},
|
|
3722
3745
|
viewport: {}
|
|
3723
3746
|
},
|
|
3724
3747
|
setup(t) {
|
|
3725
|
-
let n = t, r =
|
|
3748
|
+
let n = t, r = He(nt, "SpacerBlock"), i = x(() => ({
|
|
3726
3749
|
height: `${n.block.height}px`,
|
|
3727
3750
|
minHeight: `${n.block.height}px`,
|
|
3728
3751
|
...r.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3729
3752
|
}));
|
|
3730
|
-
return (n, a) => (e(), w("div",
|
|
3753
|
+
return (n, a) => (e(), w("div", Fo, [C("div", {
|
|
3731
3754
|
style: A(i.value),
|
|
3732
3755
|
class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(r).state.previewMode }])
|
|
3733
|
-
}, [j(r).state.previewMode ? O("", !0) : (e(), w("span",
|
|
3756
|
+
}, [j(r).state.previewMode ? O("", !0) : (e(), w("span", Io, M(t.block.height) + "px ", 1))], 6)]));
|
|
3734
3757
|
}
|
|
3735
|
-
}),
|
|
3758
|
+
}), Ro = { class: "tpl:w-full" }, zo = { key: 0 }, Bo = [
|
|
3736
3759
|
"aria-label",
|
|
3737
3760
|
"data-placeholder",
|
|
3738
3761
|
"onBlur"
|
|
3739
|
-
],
|
|
3762
|
+
], Vo = [
|
|
3740
3763
|
"aria-label",
|
|
3741
3764
|
"data-placeholder",
|
|
3742
3765
|
"onBlur"
|
|
3743
|
-
],
|
|
3766
|
+
], Ho = {
|
|
3744
3767
|
key: 1,
|
|
3745
3768
|
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)]"
|
|
3746
|
-
},
|
|
3769
|
+
}, Uo = /* @__PURE__ */ _t(/* @__PURE__ */ y({
|
|
3747
3770
|
__name: "TableBlock",
|
|
3748
3771
|
props: {
|
|
3749
3772
|
block: {},
|
|
@@ -3757,7 +3780,7 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3757
3780
|
updated(e, t) {
|
|
3758
3781
|
t.value !== t.oldValue && e.ownerDocument.activeElement !== e && (e.textContent = t.value ?? "");
|
|
3759
3782
|
}
|
|
3760
|
-
}, i = n, { t: a } =
|
|
3783
|
+
}, i = n, { t: a } = ft(), o = He(nt, "TableBlock"), s = x(() => i.block.rows.length > 0), l = x(() => ({
|
|
3761
3784
|
width: "100%",
|
|
3762
3785
|
borderCollapse: "collapse",
|
|
3763
3786
|
fontSize: `${i.block.fontSize}px`,
|
|
@@ -3786,11 +3809,11 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3786
3809
|
} : n);
|
|
3787
3810
|
o.updateBlock(i.block.id, { rows: a });
|
|
3788
3811
|
}
|
|
3789
|
-
return (n, i) => (e(), w("div",
|
|
3812
|
+
return (n, i) => (e(), w("div", Ro, [s.value ? (e(), w("table", {
|
|
3790
3813
|
key: 0,
|
|
3791
3814
|
style: A(l.value),
|
|
3792
3815
|
class: "tpl-table-editable"
|
|
3793
|
-
}, [f.value ? (e(), w("thead",
|
|
3816
|
+
}, [f.value ? (e(), w("thead", zo, [C("tr", null, [(e(!0), w(D, null, c(f.value.cells, (n) => t((e(), w("th", {
|
|
3794
3817
|
key: n.id,
|
|
3795
3818
|
style: A(d.value),
|
|
3796
3819
|
"aria-label": j(a).table.cellPlaceholder,
|
|
@@ -3799,7 +3822,7 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3799
3822
|
onBlur: (e) => h(f.value.id, n.id, e),
|
|
3800
3823
|
onKeydown: i[0] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3801
3824
|
onClick: b(m, ["stop"])
|
|
3802
|
-
}, null, 44,
|
|
3825
|
+
}, null, 44, Bo)), [[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", {
|
|
3803
3826
|
key: o.id,
|
|
3804
3827
|
style: A(u.value),
|
|
3805
3828
|
"aria-label": j(a).table.cellPlaceholder,
|
|
@@ -3808,9 +3831,9 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3808
3831
|
onBlur: (e) => h(n.id, o.id, e),
|
|
3809
3832
|
onKeydown: i[1] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3810
3833
|
onClick: b(m, ["stop"])
|
|
3811
|
-
}, null, 44,
|
|
3834
|
+
}, null, 44, Vo)), [[r, o.content]])), 128))]))), 128))])], 4)) : (e(), w("div", Ho, [N(j(gn), { size: 16 }), C("span", null, M(j(a).table.empty), 1)]))]));
|
|
3812
3835
|
}
|
|
3813
|
-
}), [["__scopeId", "data-v-4f49860b"]]),
|
|
3836
|
+
}), [["__scopeId", "data-v-4f49860b"]]), Wo = /* @__PURE__ */ y({
|
|
3814
3837
|
__name: "VideoPlayButton",
|
|
3815
3838
|
props: { hoverEffect: {
|
|
3816
3839
|
type: Boolean,
|
|
@@ -3828,7 +3851,7 @@ var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
|
3828
3851
|
});
|
|
3829
3852
|
//#endregion
|
|
3830
3853
|
//#region src/utils/videoThumbnail.ts
|
|
3831
|
-
function
|
|
3854
|
+
function Go(e) {
|
|
3832
3855
|
if (!e) return {
|
|
3833
3856
|
platform: "unknown",
|
|
3834
3857
|
videoId: null,
|
|
@@ -3860,25 +3883,25 @@ function Bo(e) {
|
|
|
3860
3883
|
thumbnailUrl: null
|
|
3861
3884
|
};
|
|
3862
3885
|
}
|
|
3863
|
-
function
|
|
3864
|
-
return t ||
|
|
3886
|
+
function Ko(e, t) {
|
|
3887
|
+
return t || Go(e).thumbnailUrl;
|
|
3865
3888
|
}
|
|
3866
3889
|
//#endregion
|
|
3867
3890
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3868
|
-
var
|
|
3891
|
+
var qo = ["src", "alt"], Jo = {
|
|
3869
3892
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3870
3893
|
style: { opacity: "0.7" }
|
|
3871
|
-
},
|
|
3894
|
+
}, Yo = ["href"], Xo = ["src", "alt"], Zo = ["src", "alt"], Qo = {
|
|
3872
3895
|
key: 3,
|
|
3873
3896
|
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)]"
|
|
3874
|
-
},
|
|
3897
|
+
}, $o = /* @__PURE__ */ y({
|
|
3875
3898
|
__name: "VideoBlock",
|
|
3876
3899
|
props: {
|
|
3877
3900
|
block: {},
|
|
3878
3901
|
viewport: {}
|
|
3879
3902
|
},
|
|
3880
3903
|
setup(t) {
|
|
3881
|
-
let n = t, { t: r } =
|
|
3904
|
+
let n = t, { t: r } = ft(), { syntax: i } = vt(), a = x(() => me(n.block.url, i) || me(n.block.thumbnailUrl, i)), o = x(() => a.value ? null : Ko(n.block.url, n.block.thumbnailUrl)), s = x(() => ({ textAlign: n.block.align })), c = x(() => {
|
|
3882
3905
|
let e = n.block.align;
|
|
3883
3906
|
return {
|
|
3884
3907
|
maxWidth: "100%",
|
|
@@ -3887,7 +3910,7 @@ var Ho = ["src", "alt"], Uo = {
|
|
|
3887
3910
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
3888
3911
|
marginRight: e === "center" ? "auto" : void 0
|
|
3889
3912
|
};
|
|
3890
|
-
}), l = x(() =>
|
|
3913
|
+
}), l = x(() => me(n.block.url, i) ? n.block.url : n.block.thumbnailUrl);
|
|
3891
3914
|
return (n, i) => (e(), w("div", {
|
|
3892
3915
|
class: "tpl:w-full",
|
|
3893
3916
|
style: A(s.value)
|
|
@@ -3899,16 +3922,16 @@ var Ho = ["src", "alt"], Uo = {
|
|
|
3899
3922
|
class: "tpl:w-full tpl:border-0",
|
|
3900
3923
|
src: t.block.placeholderUrl,
|
|
3901
3924
|
alt: t.block.alt
|
|
3902
|
-
}, null, 8,
|
|
3925
|
+
}, null, 8, qo), N(Wo)], 4)) : a.value ? (e(), w("div", {
|
|
3903
3926
|
key: 1,
|
|
3904
3927
|
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)]",
|
|
3905
3928
|
style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
|
|
3906
|
-
}, [N(j(
|
|
3929
|
+
}, [N(j(_n), {
|
|
3907
3930
|
size: 36,
|
|
3908
3931
|
"stroke-width": 1.5,
|
|
3909
3932
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3910
3933
|
style: { opacity: "0.5" }
|
|
3911
|
-
}), C("span",
|
|
3934
|
+
}), C("span", Jo, M(l.value), 1)], 4)) : o.value ? (e(), w(D, { key: 2 }, [t.block.url ? (e(), w("a", {
|
|
3912
3935
|
key: 0,
|
|
3913
3936
|
href: t.block.url,
|
|
3914
3937
|
target: "_blank",
|
|
@@ -3920,7 +3943,7 @@ var Ho = ["src", "alt"], Uo = {
|
|
|
3920
3943
|
class: "tpl:w-full tpl:border-0",
|
|
3921
3944
|
src: o.value,
|
|
3922
3945
|
alt: t.block.alt
|
|
3923
|
-
}, null, 8,
|
|
3946
|
+
}, null, 8, Xo), N(Wo, { "hover-effect": "" })], 12, Yo)) : (e(), w("div", {
|
|
3924
3947
|
key: 1,
|
|
3925
3948
|
class: "tpl:relative tpl:inline-block",
|
|
3926
3949
|
style: A(c.value)
|
|
@@ -3928,48 +3951,48 @@ var Ho = ["src", "alt"], Uo = {
|
|
|
3928
3951
|
class: "tpl:w-full tpl:border-0",
|
|
3929
3952
|
src: o.value,
|
|
3930
3953
|
alt: t.block.alt
|
|
3931
|
-
}, null, 8,
|
|
3954
|
+
}, null, 8, Zo), N(Wo)], 4))], 64)) : (e(), w("div", Qo, [N(j(_n), {
|
|
3932
3955
|
size: 40,
|
|
3933
3956
|
"stroke-width": 1.5,
|
|
3934
3957
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3935
3958
|
}), C("span", null, M(j(r).video.addVideo), 1)]))], 4));
|
|
3936
3959
|
}
|
|
3937
|
-
}),
|
|
3938
|
-
section:
|
|
3939
|
-
title:
|
|
3940
|
-
paragraph:
|
|
3941
|
-
image:
|
|
3942
|
-
button:
|
|
3943
|
-
divider:
|
|
3944
|
-
video:
|
|
3945
|
-
social:
|
|
3946
|
-
menu:
|
|
3947
|
-
table:
|
|
3948
|
-
spacer:
|
|
3949
|
-
html:
|
|
3950
|
-
countdown: se(() => import("./CountdownBlock-
|
|
3960
|
+
}), es = {
|
|
3961
|
+
section: wo,
|
|
3962
|
+
title: Pr,
|
|
3963
|
+
paragraph: _r,
|
|
3964
|
+
image: ir,
|
|
3965
|
+
button: rn,
|
|
3966
|
+
divider: Hn,
|
|
3967
|
+
video: $o,
|
|
3968
|
+
social: Po,
|
|
3969
|
+
menu: cr,
|
|
3970
|
+
table: Uo,
|
|
3971
|
+
spacer: Lo,
|
|
3972
|
+
html: qn,
|
|
3973
|
+
countdown: se(() => import("./CountdownBlock-BNvuXucv.js").then((e) => e.n))
|
|
3951
3974
|
};
|
|
3952
|
-
function
|
|
3953
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } =
|
|
3975
|
+
function ts(e) {
|
|
3976
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = ft(r);
|
|
3954
3977
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
3955
|
-
let { resolvedTheme: c } =
|
|
3978
|
+
let { resolvedTheme: c } = Vt(x(() => t.state.uiTheme)), l = h(n.theme ?? {}), { themeStyles: u } = Ut({
|
|
3956
3979
|
themeOverrides: l,
|
|
3957
3980
|
resolvedTheme: c,
|
|
3958
3981
|
extraStyles: e.themeExtraStyles
|
|
3959
|
-
}), d =
|
|
3982
|
+
}), d = Tt({
|
|
3960
3983
|
content: t.content,
|
|
3961
3984
|
setContent: (e, n) => t.setContent(e, n),
|
|
3962
3985
|
...e.historyOptions
|
|
3963
3986
|
});
|
|
3964
|
-
|
|
3965
|
-
let f =
|
|
3987
|
+
jt(t, d);
|
|
3988
|
+
let f = Dt({
|
|
3966
3989
|
addBlock: t.addBlock,
|
|
3967
3990
|
removeBlock: t.removeBlock,
|
|
3968
3991
|
updateBlock: t.updateBlock,
|
|
3969
3992
|
selectBlock: t.selectBlock,
|
|
3970
3993
|
findBlockLocation: t.findBlockLocation,
|
|
3971
3994
|
blockDefaults: n.blockDefaults
|
|
3972
|
-
}), m =
|
|
3995
|
+
}), m = kt(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Ot({
|
|
3973
3996
|
content: t.content,
|
|
3974
3997
|
isDirty: () => t.state.isDirty,
|
|
3975
3998
|
...e.autoSaveOptions
|
|
@@ -3977,24 +4000,24 @@ function Xo(e) {
|
|
|
3977
4000
|
g && (_ = s(d.isNavigating, (e) => {
|
|
3978
4001
|
e ? g.pause() : g.resume();
|
|
3979
4002
|
}));
|
|
3980
|
-
let v =
|
|
4003
|
+
let v = Bt(t, {
|
|
3981
4004
|
t: a,
|
|
3982
4005
|
format: o
|
|
3983
|
-
}), y =
|
|
3984
|
-
if (
|
|
4006
|
+
}), y = qt();
|
|
4007
|
+
if (Qt(y, es), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, Bn);
|
|
3985
4008
|
function b(e) {
|
|
3986
|
-
for (let t of e) y.registerCustom(t,
|
|
4009
|
+
for (let t of e) y.registerCustom(t, Bn);
|
|
3987
4010
|
}
|
|
3988
|
-
let S =
|
|
4011
|
+
let S = Ft();
|
|
3989
4012
|
if (p() && re(S.dispose), e.containerEl) {
|
|
3990
4013
|
let t = e.containerEl;
|
|
3991
|
-
|
|
4014
|
+
Re(document, "pointerdown", (e) => {
|
|
3992
4015
|
let n = t.value;
|
|
3993
4016
|
n && (e.composedPath?.() ?? []).includes(n) && S.claim();
|
|
3994
4017
|
}, { capture: !0 });
|
|
3995
4018
|
}
|
|
3996
4019
|
function C(r) {
|
|
3997
|
-
S.isActive() &&
|
|
4020
|
+
S.isActive() && en(r, {
|
|
3998
4021
|
history: d,
|
|
3999
4022
|
selectBlock: (e) => t.selectBlock(e),
|
|
4000
4023
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -4003,19 +4026,19 @@ function Xo(e) {
|
|
|
4003
4026
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
4004
4027
|
});
|
|
4005
4028
|
}
|
|
4006
|
-
|
|
4029
|
+
Re(document, "keydown", C);
|
|
4007
4030
|
let w = h(null);
|
|
4008
|
-
E(
|
|
4009
|
-
let T =
|
|
4010
|
-
E(
|
|
4011
|
-
let ee =
|
|
4031
|
+
E(Qe, e.editorRoot ?? document), E(Ge, w), E(Be, r), E(nt, t), E(Ke, d), E($e, f), E(st, m), E(Ze, i), E(tt, u), E(et, c), E(qe, n.blockDefaults), E(it, y), E(Ye, n.customBlocks ?? []), E(Xe, Jt(t.content, y));
|
|
4032
|
+
let T = xe(n.mergeTags?.syntax);
|
|
4033
|
+
E(dt, n.mergeTags?.tags ?? []), E(We, T), E(lt, n.mergeTags?.onRequest ?? null), E(Je, n.mergeTags?.autocomplete !== !1), E(ut, It()), E(Ve, n.onRequestMedia ?? null), E(at, n.displayConditions?.conditions ?? []), E(rt, n.displayConditions?.allowCustom ?? !1), E(ot, e.capabilities ?? {}), E(ct, v);
|
|
4034
|
+
let ee = Lt(n.lint) ? null : Rt({
|
|
4012
4035
|
content: t.content,
|
|
4013
4036
|
options: n.lint ?? {},
|
|
4014
4037
|
updateBlock: t.updateBlock,
|
|
4015
4038
|
updateSettings: t.updateSettings,
|
|
4016
4039
|
removeBlock: t.removeBlock
|
|
4017
4040
|
});
|
|
4018
|
-
E(
|
|
4041
|
+
E(Ue, ee);
|
|
4019
4042
|
function D() {
|
|
4020
4043
|
_?.(), ee?.destroy(), g?.destroy(), d.destroy();
|
|
4021
4044
|
}
|
|
@@ -4038,4 +4061,4 @@ function Xo(e) {
|
|
|
4038
4061
|
};
|
|
4039
4062
|
}
|
|
4040
4063
|
//#endregion
|
|
4041
|
-
export {
|
|
4064
|
+
export { ln as A, wn as C, hn as D, gn as E, zt as F, At as I, xt as L, sn as M, rn as N, pn as O, Kt as P, Tn as S, bn as T, qn as _, Po as a, jn as b, wo as c, Mr as d, yr as f, ir as g, cr as h, Lo as i, cn as j, fn as k, yo as l, _r as m, $o as n, To as o, vr as p, Uo as r, Do as s, ts as t, Pr as u, Hn as v, Cn as w, kn as x, Bn as y };
|