@templatical/editor 0.8.0 → 0.8.1
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/{AiFeatureMenu-BOxQqkn9.js → AiFeatureMenu-BPOVM_Ou.js} +1 -1
- package/dist/{CloudEditor-BzCVDD6e.js → CloudEditor-wAkx8TH_.js} +4 -4
- package/dist/{CollaboratorBar-Cb-c1IkS.js → CollaboratorBar-DIr5ZUv9.js} +1 -1
- package/dist/{ModuleBrowserModal-BotDsZ0R.js → ModuleBrowserModal-VqGNisDp.js} +4 -4
- package/dist/{ModulePreviewCanvas-CDg4MnJP.js → ModulePreviewCanvas-DmzW6I_9.js} +1 -1
- package/dist/{ParagraphEditor-CfzIUFQ_.js → ParagraphEditor-BQTPI8j8.js} +1 -1
- package/dist/{SaveModuleDialog-DuzfCamG.js → SaveModuleDialog-DhgHOGgX.js} +2 -2
- package/dist/{SnapshotHistory-DiAPOSDM.js → SnapshotHistory-DJOsWv4i.js} +1 -1
- package/dist/{TestEmailModal-D5I5Mgtb.js → TestEmailModal-Dqj50aHe.js} +2 -2
- package/dist/{TitleEditor-CZUkhtDo.js → TitleEditor-PQYXfY6W.js} +1 -1
- package/dist/{TplModal-CVq2BAIW.js → TplModal-Dy6RXBV_.js} +1 -1
- package/dist/{blockTypeIcons-CJNuGjLX.js → blockTypeIcons-qnUeTls5.js} +1 -1
- package/dist/bundle-stats.json +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-DtrT-aFR.js → AiFeatureMenu-Cr6_Q9Zv.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-DtrT-aFR.js.map → AiFeatureMenu-Cr6_Q9Zv.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-w7n4orSd.js → BlockIssueBadge-D0_mYpkl.js} +2 -2
- package/dist/cdn/chunks/{BlockIssueBadge-w7n4orSd.js.map → BlockIssueBadge-D0_mYpkl.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-CwG0DhG1.js → CloudEditor-BtAkuQB4.js} +7 -7
- package/dist/cdn/chunks/{CloudEditor-CwG0DhG1.js.map → CloudEditor-BtAkuQB4.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-DYjZaz7H.js → CollaboratorBar-C-P00I9l.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-DYjZaz7H.js.map → CollaboratorBar-C-P00I9l.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CFR8VJCU.js → CountdownBlock-BEWsiqgw.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-CFR8VJCU.js.map → CountdownBlock-BEWsiqgw.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DOrQCH57.js → CountdownToolbar-CdjFGEI7.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-DOrQCH57.js.map → CountdownToolbar-CdjFGEI7.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-C54PhBgc.js → IssuesPanel-DJOLYNAJ.js} +3 -3
- package/dist/cdn/chunks/{IssuesPanel-C54PhBgc.js.map → IssuesPanel-DJOLYNAJ.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-4V6um-AC.js → ModuleBrowserModal-hnbUUl8w.js} +5 -5
- package/dist/cdn/chunks/{ModuleBrowserModal-4V6um-AC.js.map → ModuleBrowserModal-hnbUUl8w.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DL8zI6VX.js → ModulePreviewCanvas-_DoUZGQh.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-DL8zI6VX.js.map → ModulePreviewCanvas-_DoUZGQh.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-avXrYDo6.js → NumberWithSuffix-ryhWFnCJ.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-avXrYDo6.js.map → NumberWithSuffix-ryhWFnCJ.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-Cpmy85zL.js → ParagraphEditor-BtzinrI_.js} +5 -5
- package/dist/cdn/chunks/{ParagraphEditor-Cpmy85zL.js.map → ParagraphEditor-BtzinrI_.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-CFL-Lrv5.js → RichTextEditorContent-CRlcjuMH.js} +2 -2
- package/dist/cdn/chunks/{RichTextEditorContent-CFL-Lrv5.js.map → RichTextEditorContent-CRlcjuMH.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-D6szy5vX.js → SaveModuleDialog-D-g-nYuL.js} +2 -2
- package/dist/cdn/chunks/{SaveModuleDialog-D6szy5vX.js.map → SaveModuleDialog-D-g-nYuL.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CSDdss38.js → TitleEditor-Bzsbpajt.js} +5 -5
- package/dist/cdn/chunks/{TitleEditor-CSDdss38.js.map → TitleEditor-Bzsbpajt.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BEdpG8xl.js → blockTypeIcons-B_klsmQ1.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-BEdpG8xl.js.map → blockTypeIcons-B_klsmQ1.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-DgvvgeJU.js → extensions-DIHxPVrP.js} +2 -2
- package/dist/cdn/chunks/{extensions-DgvvgeJU.js.map → extensions-DIHxPVrP.js.map} +1 -1
- package/dist/cdn/chunks/{features-CgTy87Ni.js → features-BsW4aFcn.js} +621 -618
- package/dist/cdn/chunks/features-BsW4aFcn.js.map +1 -0
- package/dist/cdn/chunks/{icons-DxJ--AJb.js → icons-BgPk6tUq.js} +2 -2
- package/dist/cdn/chunks/{icons-DxJ--AJb.js.map → icons-BgPk6tUq.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-Byh_BbTm.js → media-library-C1Ue4At9.js} +3 -3
- package/dist/cdn/chunks/{media-library-Byh_BbTm.js.map → media-library-C1Ue4At9.js.map} +1 -1
- package/dist/cdn/chunks/quality-BDr54nMA.js +1878 -0
- package/dist/cdn/chunks/quality-BDr54nMA.js.map +1 -0
- package/dist/cdn/chunks/{renderer-DttVILgu.js → renderer-BdjvKDwC.js} +3 -3
- package/dist/cdn/chunks/{renderer-DttVILgu.js.map → renderer-BdjvKDwC.js.map} +1 -1
- package/dist/cdn/chunks/{src-a8fYhBi5.js → src-BI22RLP6.js} +4 -4
- package/dist/cdn/chunks/{src-a8fYhBi5.js.map → src-BI22RLP6.js.map} +1 -1
- package/dist/cdn/chunks/{styles-8qDRQ-6n.js → styles-BkubbXy8.js} +8 -8
- package/dist/cdn/chunks/{styles-8qDRQ-6n.js.map → styles-BkubbXy8.js.map} +1 -1
- package/dist/cdn/editor.js +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/{styles-Ci7RdimQ.js → styles-BEhOSxt5.js} +2 -2
- package/dist/templatical-editor.js +3 -3
- package/dist/{useEditorCore-DT3VrvZS.js → useEditorCore-DnCOsekL.js} +717 -714
- package/package.json +7 -7
- package/dist/cdn/chunks/features-CgTy87Ni.js.map +0 -1
- package/dist/cdn/chunks/quality-CHCEMG8e.js +0 -1846
- package/dist/cdn/chunks/quality-CHCEMG8e.js.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { A as e, B as t, D as n, E as r, F as i, G as a, J as o, L as s, M as c, N as l, O as u, Q as d, S as f, U as p, V as m, X as h, Y as g, _, at as v, b as y, c as b, d as x, et as S, f as C, h as w, it as T, j as E, k as ee, l as D, m as O, nt as k, o as te, ot as A, p as ne, q as re, rt as j, s as ie, st as M, v as N, w as
|
|
2
|
-
import { A as
|
|
3
|
-
import { a as
|
|
4
|
-
import { A as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
1
|
+
import { A as e, B as t, D as n, E as r, F as i, G as a, J as o, L as s, M as c, N as l, O as u, Q as d, S as f, U as p, V as m, X as h, Y as g, _, at as v, b as y, c as b, d as x, et as S, f as C, h as w, it as T, j as E, k as ee, l as D, m as O, nt as k, o as te, ot as A, p as ne, q as re, rt as j, s as ie, st as M, v as N, w as ae, x as oe, y as se, z as ce } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
|
|
2
|
+
import { A as le, S as ue, T as de, _ as fe, a as pe, b as me, c as he, d as ge, f as _e, g as ve, h as ye, j as be, k as xe, l as Se, m as Ce, o as we, p as Te, s as Ee, t as De, u as Oe, v as ke, x as Ae, y as je } from "./dist-DJmnUmW9.js";
|
|
3
|
+
import { a as Me, c as Ne, i as Pe, l as Fe, n as Ie, r as Le, s as Re } from "./dist-BzRLLpfq.js";
|
|
4
|
+
import { A as ze, C as Be, D as Ve, E as He, O as Ue, S as We, _ as Ge, a as Ke, b as qe, d as Je, f as Ye, g as Xe, h as Ze, i as Qe, k as $e, m as et, n as tt, o as nt, p as rt, s as it, u as at, v as ot, x as st, y as ct } from "./keys-CY3tkCsv.js";
|
|
5
|
+
import { t as lt } from "./useI18n-CWX9ZTCW.js";
|
|
6
|
+
import { t as P } from "./createLucideIcon-Di4mqmGn.js";
|
|
7
|
+
import { t as ut } from "./message-circle-gzy2ZGJ3.js";
|
|
8
|
+
import { t as dt } from "./trash-2-424iqbpN.js";
|
|
9
|
+
import { t as ft } from "./triangle-alert-DWQySIE2.js";
|
|
10
|
+
import { t as pt } from "./LoadingTrack-CFkDkjBb.js";
|
|
11
|
+
import { t as mt } from "./_plugin-vue_export-helper-B0hnzhyu.js";
|
|
12
12
|
import "./useCloudI18n-BPUHj2CZ.js";
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
13
|
+
import { t as ht } from "./useMergeTag-B3F9VR04.js";
|
|
14
|
+
import { t as gt } from "./useAliveFlag-D8GoB4VE.js";
|
|
15
15
|
//#region ../core/dist/index.js
|
|
16
|
-
function
|
|
16
|
+
function _t(e) {
|
|
17
17
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function vt(e) {
|
|
20
20
|
let t = o({
|
|
21
|
-
content: e.content ??
|
|
21
|
+
content: e.content ?? Oe(e.defaultFontFamily, e.templateDefaults),
|
|
22
22
|
selectedBlockId: null,
|
|
23
23
|
viewport: "desktop",
|
|
24
24
|
darkMode: !1,
|
|
@@ -106,7 +106,7 @@ function _t(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 >= _t(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 _t(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 >= _t(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 _t(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 yt = 50, bt = 300, xt = 1500;
|
|
171
|
+
function St(e) {
|
|
172
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = yt } = 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 xt(e) {
|
|
|
194
194
|
if (l && l.blockId === e) {
|
|
195
195
|
clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
|
|
196
196
|
l = null;
|
|
197
|
-
},
|
|
197
|
+
}, bt);
|
|
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
|
+
}, bt)
|
|
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
|
+
}, xt);
|
|
212
212
|
}
|
|
213
213
|
function b() {
|
|
214
214
|
if (a.value.length === 0) return;
|
|
@@ -240,33 +240,33 @@ function xt(e) {
|
|
|
240
240
|
destroy: C
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function Ct(e) {
|
|
244
244
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
245
245
|
...e,
|
|
246
|
-
id:
|
|
246
|
+
id: ue(),
|
|
247
247
|
cells: e.cells.map((e) => ({
|
|
248
248
|
...e,
|
|
249
|
-
id:
|
|
249
|
+
id: ue()
|
|
250
250
|
}))
|
|
251
251
|
})) : e.type === "social" ? e.icons = e.icons.map((e) => ({
|
|
252
252
|
...e,
|
|
253
|
-
id:
|
|
253
|
+
id: ue()
|
|
254
254
|
})) : e.type === "menu" && (e.items = e.items.map((e) => ({
|
|
255
255
|
...e,
|
|
256
|
-
id:
|
|
256
|
+
id: ue()
|
|
257
257
|
})));
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function wt(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 = we(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 = ue(), Ct(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 = ue(), Ct(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 Ct(e) {
|
|
|
287
287
|
updateBlockProperty: l
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function Tt(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 wt(e) {
|
|
|
323
323
|
destroy: h
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function Et(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 Tt(e) {
|
|
|
341
341
|
hasHiddenBlocks: n
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function Dt(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 Et(e) {
|
|
|
371
371
|
needsFetch: i
|
|
372
372
|
};
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function Ot(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,27 +387,30 @@ function Dt(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 kt = /* @__PURE__ */ new Set(), At = 0, jt = 0;
|
|
391
|
+
function Mt() {
|
|
392
|
+
let e = ++jt;
|
|
393
|
+
return kt.add(e), At === 0 && (At = e), {
|
|
394
394
|
id: e,
|
|
395
|
-
isActive: () =>
|
|
395
|
+
isActive: () => kt.size <= 1 || At === e,
|
|
396
396
|
claim: () => {
|
|
397
|
-
|
|
397
|
+
At = e;
|
|
398
398
|
},
|
|
399
399
|
dispose: () => {
|
|
400
|
-
if (
|
|
401
|
-
let e = Array.from(
|
|
402
|
-
|
|
400
|
+
if (kt.delete(e), At === e) {
|
|
401
|
+
let e = Array.from(kt);
|
|
402
|
+
At = e[e.length - 1] ?? 0;
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
};
|
|
406
406
|
}
|
|
407
407
|
//#endregion
|
|
408
408
|
//#region src/composables/useTemplateLint.ts
|
|
409
|
-
function
|
|
410
|
-
|
|
409
|
+
function Nt(e) {
|
|
410
|
+
return e ? e.disabled === !0 ? !0 : e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
411
|
+
}
|
|
412
|
+
function Pt(e) {
|
|
413
|
+
let t = h([]), n = h(!1), r = h(!1), i = d(null), a = Nt(e.options), o = null, c = !1;
|
|
411
414
|
a || l();
|
|
412
415
|
async function l() {
|
|
413
416
|
try {
|
|
@@ -417,7 +420,7 @@ function Mt(e) {
|
|
|
417
420
|
lintAccessibility: t.lintAccessibility,
|
|
418
421
|
lintStructure: t.lintStructure,
|
|
419
422
|
lintLinks: t.lintLinks
|
|
420
|
-
}, n.value = !0, u(), o =
|
|
423
|
+
}, n.value = !0, u(), o = Fe(e.content, u, {
|
|
421
424
|
debounce: e.debounce ?? 500,
|
|
422
425
|
deep: !0
|
|
423
426
|
});
|
|
@@ -458,12 +461,12 @@ function Mt(e) {
|
|
|
458
461
|
}
|
|
459
462
|
//#endregion
|
|
460
463
|
//#region src/utils/blockTypeLabels.ts
|
|
461
|
-
function
|
|
464
|
+
function Ft(e, t) {
|
|
462
465
|
return t.blocks[e] ?? e;
|
|
463
466
|
}
|
|
464
467
|
//#endregion
|
|
465
468
|
//#region src/composables/useKeyboardReorder.ts
|
|
466
|
-
function
|
|
469
|
+
function It(e, t) {
|
|
467
470
|
let n = h(null), r = h(""), i = null;
|
|
468
471
|
function a(t) {
|
|
469
472
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -490,7 +493,7 @@ function Pt(e, t) {
|
|
|
490
493
|
let r = a(n);
|
|
491
494
|
if (!r) return "";
|
|
492
495
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
493
|
-
return i ?
|
|
496
|
+
return i ? Ft(i.type, t.t) : "";
|
|
494
497
|
}
|
|
495
498
|
function s(t, n) {
|
|
496
499
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -559,13 +562,13 @@ function Pt(e, t) {
|
|
|
559
562
|
}
|
|
560
563
|
//#endregion
|
|
561
564
|
//#region src/composables/useUiTheme.ts
|
|
562
|
-
function
|
|
563
|
-
let t =
|
|
565
|
+
function Lt(e) {
|
|
566
|
+
let t = Pe("(prefers-color-scheme: dark)");
|
|
564
567
|
return { resolvedTheme: x(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
565
568
|
}
|
|
566
569
|
//#endregion
|
|
567
570
|
//#region src/composables/useThemeStyles.ts
|
|
568
|
-
var
|
|
571
|
+
var Rt = {
|
|
569
572
|
bg: "--tpl-bg",
|
|
570
573
|
bgElevated: "--tpl-bg-elevated",
|
|
571
574
|
bgHover: "--tpl-bg-hover",
|
|
@@ -589,10 +592,10 @@ var It = {
|
|
|
589
592
|
dangerLight: "--tpl-danger-light",
|
|
590
593
|
canvasBg: "--tpl-canvas-bg"
|
|
591
594
|
};
|
|
592
|
-
function
|
|
595
|
+
function zt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
593
596
|
return { themeStyles: x(() => {
|
|
594
597
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
595
|
-
if (a) for (let [e, t] of Object.entries(
|
|
598
|
+
if (a) for (let [e, t] of Object.entries(Rt)) {
|
|
596
599
|
let n = a[e];
|
|
597
600
|
n && (r[t] = n);
|
|
598
601
|
}
|
|
@@ -601,27 +604,27 @@ function Lt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
601
604
|
}
|
|
602
605
|
//#endregion
|
|
603
606
|
//#region src/utils/logger.ts
|
|
604
|
-
var
|
|
605
|
-
function
|
|
607
|
+
var Bt = "[Templatical]";
|
|
608
|
+
function Vt() {
|
|
606
609
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
607
610
|
}
|
|
608
|
-
var
|
|
611
|
+
var Ht = {
|
|
609
612
|
warn(...e) {
|
|
610
|
-
console.warn(
|
|
613
|
+
console.warn(Bt, ...e);
|
|
611
614
|
},
|
|
612
615
|
error(...e) {
|
|
613
|
-
console.error(
|
|
616
|
+
console.error(Bt, ...e);
|
|
614
617
|
},
|
|
615
618
|
debug(...e) {
|
|
616
|
-
|
|
619
|
+
Vt() || console.debug(Bt, ...e);
|
|
617
620
|
},
|
|
618
621
|
info(...e) {
|
|
619
|
-
|
|
622
|
+
Vt() || console.info(Bt, ...e);
|
|
620
623
|
}
|
|
621
624
|
};
|
|
622
625
|
//#endregion
|
|
623
626
|
//#region src/composables/useBlockRegistry.ts
|
|
624
|
-
function
|
|
627
|
+
function Ut() {
|
|
625
628
|
let e = d(/* @__PURE__ */ new Map());
|
|
626
629
|
function t(t, n) {
|
|
627
630
|
e.value.set(t, n), k(e);
|
|
@@ -629,7 +632,7 @@ function Vt() {
|
|
|
629
632
|
function n(t, n) {
|
|
630
633
|
let r = `custom:${t.type}`, i = {
|
|
631
634
|
component: n,
|
|
632
|
-
createBlock: () =>
|
|
635
|
+
createBlock: () => Se(t),
|
|
633
636
|
sidebarItem: {
|
|
634
637
|
type: r,
|
|
635
638
|
label: t.name,
|
|
@@ -673,7 +676,7 @@ function Vt() {
|
|
|
673
676
|
strictFilters: !1
|
|
674
677
|
}).parseAndRender(t.template, e.fieldValues);
|
|
675
678
|
} catch (t) {
|
|
676
|
-
return
|
|
679
|
+
return Ht.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
677
680
|
}
|
|
678
681
|
}
|
|
679
682
|
function l(t) {
|
|
@@ -692,75 +695,75 @@ function Vt() {
|
|
|
692
695
|
}
|
|
693
696
|
//#endregion
|
|
694
697
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
695
|
-
var
|
|
698
|
+
var Wt = [
|
|
696
699
|
{
|
|
697
700
|
type: "section",
|
|
698
701
|
label: "Section",
|
|
699
|
-
createBlock:
|
|
702
|
+
createBlock: ve
|
|
700
703
|
},
|
|
701
704
|
{
|
|
702
705
|
type: "title",
|
|
703
706
|
label: "Title",
|
|
704
|
-
createBlock:
|
|
707
|
+
createBlock: me
|
|
705
708
|
},
|
|
706
709
|
{
|
|
707
710
|
type: "paragraph",
|
|
708
711
|
label: "Paragraph",
|
|
709
|
-
createBlock:
|
|
712
|
+
createBlock: ye
|
|
710
713
|
},
|
|
711
714
|
{
|
|
712
715
|
type: "image",
|
|
713
716
|
label: "Image",
|
|
714
|
-
createBlock:
|
|
717
|
+
createBlock: Te
|
|
715
718
|
},
|
|
716
719
|
{
|
|
717
720
|
type: "button",
|
|
718
721
|
label: "Button",
|
|
719
|
-
createBlock:
|
|
722
|
+
createBlock: Ee
|
|
720
723
|
},
|
|
721
724
|
{
|
|
722
725
|
type: "divider",
|
|
723
726
|
label: "Divider",
|
|
724
|
-
createBlock:
|
|
727
|
+
createBlock: ge
|
|
725
728
|
},
|
|
726
729
|
{
|
|
727
730
|
type: "video",
|
|
728
731
|
label: "Video",
|
|
729
|
-
createBlock:
|
|
732
|
+
createBlock: Ae
|
|
730
733
|
},
|
|
731
734
|
{
|
|
732
735
|
type: "social",
|
|
733
736
|
label: "Social",
|
|
734
|
-
createBlock:
|
|
737
|
+
createBlock: fe
|
|
735
738
|
},
|
|
736
739
|
{
|
|
737
740
|
type: "menu",
|
|
738
741
|
label: "Menu",
|
|
739
|
-
createBlock:
|
|
742
|
+
createBlock: Ce
|
|
740
743
|
},
|
|
741
744
|
{
|
|
742
745
|
type: "table",
|
|
743
746
|
label: "Table",
|
|
744
|
-
createBlock:
|
|
747
|
+
createBlock: je
|
|
745
748
|
},
|
|
746
749
|
{
|
|
747
750
|
type: "spacer",
|
|
748
751
|
label: "Spacer",
|
|
749
|
-
createBlock:
|
|
752
|
+
createBlock: ke
|
|
750
753
|
},
|
|
751
754
|
{
|
|
752
755
|
type: "html",
|
|
753
756
|
label: "HTML",
|
|
754
|
-
createBlock:
|
|
757
|
+
createBlock: _e
|
|
755
758
|
},
|
|
756
759
|
{
|
|
757
760
|
type: "countdown",
|
|
758
761
|
label: "Countdown",
|
|
759
|
-
createBlock:
|
|
762
|
+
createBlock: he
|
|
760
763
|
}
|
|
761
764
|
];
|
|
762
|
-
function
|
|
763
|
-
for (let n of
|
|
765
|
+
function Gt(e, t) {
|
|
766
|
+
for (let n of Wt) {
|
|
764
767
|
let r = t[n.type];
|
|
765
768
|
r && e.registerBuiltIn(n.type, {
|
|
766
769
|
component: r,
|
|
@@ -775,7 +778,7 @@ function Ut(e, t) {
|
|
|
775
778
|
}
|
|
776
779
|
//#endregion
|
|
777
780
|
//#region src/utils/keyboardShortcuts.ts
|
|
778
|
-
function
|
|
781
|
+
function Kt(e) {
|
|
779
782
|
for (let t of e.composedPath()) {
|
|
780
783
|
if (!(t instanceof HTMLElement)) continue;
|
|
781
784
|
if (t.isContentEditable) return !0;
|
|
@@ -784,14 +787,14 @@ function Wt(e) {
|
|
|
784
787
|
}
|
|
785
788
|
return !1;
|
|
786
789
|
}
|
|
787
|
-
function
|
|
790
|
+
function qt(e, t) {
|
|
788
791
|
let n = e.metaKey || e.ctrlKey;
|
|
789
792
|
if (n && e.key.toLowerCase() === "s") {
|
|
790
793
|
e.preventDefault(), t.onSave?.();
|
|
791
794
|
return;
|
|
792
795
|
}
|
|
793
796
|
if (n && e.key.toLowerCase() === "z") {
|
|
794
|
-
if (
|
|
797
|
+
if (Kt(e)) return;
|
|
795
798
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
796
799
|
return;
|
|
797
800
|
}
|
|
@@ -799,11 +802,11 @@ function Gt(e, t) {
|
|
|
799
802
|
t.selectBlock(null);
|
|
800
803
|
return;
|
|
801
804
|
}
|
|
802
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
805
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Kt(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
803
806
|
}
|
|
804
807
|
//#endregion
|
|
805
808
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
806
|
-
var
|
|
809
|
+
var Jt = { class: "tpl:text-center" }, Yt = ["href"], Xt = /* @__PURE__ */ y({
|
|
807
810
|
__name: "ButtonBlock",
|
|
808
811
|
props: {
|
|
809
812
|
block: {},
|
|
@@ -824,17 +827,17 @@ var Kt = { class: "tpl:text-center" }, qt = ["href"], Jt = /* @__PURE__ */ y({
|
|
|
824
827
|
};
|
|
825
828
|
return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
|
|
826
829
|
});
|
|
827
|
-
return (n, i) => (e(), w("div",
|
|
830
|
+
return (n, i) => (e(), w("div", Jt, [C("a", {
|
|
828
831
|
href: t.block.url || "#",
|
|
829
832
|
style: A(r.value),
|
|
830
833
|
class: "tpl:cursor-default",
|
|
831
834
|
onClick: i[0] ||= b(() => {}, ["prevent"])
|
|
832
|
-
}, M(t.block.text), 13,
|
|
835
|
+
}, M(t.block.text), 13, Yt)]));
|
|
833
836
|
}
|
|
834
|
-
}),
|
|
837
|
+
}), Zt = P("bookmark", [["path", {
|
|
835
838
|
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",
|
|
836
839
|
key: "oz39mx"
|
|
837
|
-
}]]),
|
|
840
|
+
}]]), Qt = P("box", [
|
|
838
841
|
["path", {
|
|
839
842
|
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",
|
|
840
843
|
key: "hh9hay"
|
|
@@ -847,13 +850,13 @@ var Kt = { class: "tpl:text-center" }, qt = ["href"], Jt = /* @__PURE__ */ y({
|
|
|
847
850
|
d: "M12 22V12",
|
|
848
851
|
key: "d0xqtd"
|
|
849
852
|
}]
|
|
850
|
-
]),
|
|
853
|
+
]), $t = P("code", [["path", {
|
|
851
854
|
d: "m16 18 6-6-6-6",
|
|
852
855
|
key: "eg8j8"
|
|
853
856
|
}], ["path", {
|
|
854
857
|
d: "m8 6-6 6 6 6",
|
|
855
858
|
key: "ppft3o"
|
|
856
|
-
}]]),
|
|
859
|
+
}]]), en = P("copy", [["rect", {
|
|
857
860
|
width: "14",
|
|
858
861
|
height: "14",
|
|
859
862
|
x: "8",
|
|
@@ -864,7 +867,7 @@ var Kt = { class: "tpl:text-center" }, qt = ["href"], Jt = /* @__PURE__ */ y({
|
|
|
864
867
|
}], ["path", {
|
|
865
868
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
866
869
|
key: "zix9uf"
|
|
867
|
-
}]]),
|
|
870
|
+
}]]), tn = P("eye-off", [
|
|
868
871
|
["path", {
|
|
869
872
|
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",
|
|
870
873
|
key: "ct8e1f"
|
|
@@ -881,10 +884,10 @@ var Kt = { class: "tpl:text-center" }, qt = ["href"], Jt = /* @__PURE__ */ y({
|
|
|
881
884
|
d: "m2 2 20 20",
|
|
882
885
|
key: "1ooewy"
|
|
883
886
|
}]
|
|
884
|
-
]),
|
|
887
|
+
]), nn = P("funnel", [["path", {
|
|
885
888
|
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",
|
|
886
889
|
key: "sc7q7i"
|
|
887
|
-
}]]),
|
|
890
|
+
}]]), rn = P("grip-vertical", [
|
|
888
891
|
["circle", {
|
|
889
892
|
cx: "9",
|
|
890
893
|
cy: "12",
|
|
@@ -921,7 +924,7 @@ var Kt = { class: "tpl:text-center" }, qt = ["href"], Jt = /* @__PURE__ */ y({
|
|
|
921
924
|
r: "1",
|
|
922
925
|
key: "f4zoj3"
|
|
923
926
|
}]
|
|
924
|
-
]),
|
|
927
|
+
]), an = P("image", [
|
|
925
928
|
["rect", {
|
|
926
929
|
width: "18",
|
|
927
930
|
height: "18",
|
|
@@ -941,13 +944,13 @@ var Kt = { class: "tpl:text-center" }, qt = ["href"], Jt = /* @__PURE__ */ y({
|
|
|
941
944
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
942
945
|
key: "1xmnt7"
|
|
943
946
|
}]
|
|
944
|
-
]),
|
|
947
|
+
]), on = P("navigation", [["polygon", {
|
|
945
948
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
946
949
|
key: "1ltx0t"
|
|
947
|
-
}]]),
|
|
950
|
+
}]]), sn = P("puzzle", [["path", {
|
|
948
951
|
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",
|
|
949
952
|
key: "w46dr5"
|
|
950
|
-
}]]),
|
|
953
|
+
}]]), cn = P("share-2", [
|
|
951
954
|
["circle", {
|
|
952
955
|
cx: "18",
|
|
953
956
|
cy: "5",
|
|
@@ -980,7 +983,7 @@ var Kt = { class: "tpl:text-center" }, qt = ["href"], Jt = /* @__PURE__ */ y({
|
|
|
980
983
|
y2: "10.49",
|
|
981
984
|
key: "1n3mei"
|
|
982
985
|
}]
|
|
983
|
-
]),
|
|
986
|
+
]), ln = P("table", [
|
|
984
987
|
["path", {
|
|
985
988
|
d: "M12 3v18",
|
|
986
989
|
key: "108xh3"
|
|
@@ -1001,7 +1004,7 @@ var Kt = { class: "tpl:text-center" }, qt = ["href"], Jt = /* @__PURE__ */ y({
|
|
|
1001
1004
|
d: "M3 15h18",
|
|
1002
1005
|
key: "5xshup"
|
|
1003
1006
|
}]
|
|
1004
|
-
]),
|
|
1007
|
+
]), un = P("video", [["path", {
|
|
1005
1008
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1006
1009
|
key: "ftymec"
|
|
1007
1010
|
}], ["rect", {
|
|
@@ -1011,11 +1014,11 @@ var Kt = { class: "tpl:text-center" }, qt = ["href"], Jt = /* @__PURE__ */ y({
|
|
|
1011
1014
|
height: "12",
|
|
1012
1015
|
rx: "2",
|
|
1013
1016
|
key: "158x01"
|
|
1014
|
-
}]]),
|
|
1017
|
+
}]]), dn = ["innerHTML"], fn = [
|
|
1015
1018
|
"src",
|
|
1016
1019
|
"width",
|
|
1017
1020
|
"height"
|
|
1018
|
-
],
|
|
1021
|
+
], pn = /* @__PURE__ */ y({
|
|
1019
1022
|
__name: "CustomBlockIcon",
|
|
1020
1023
|
props: {
|
|
1021
1024
|
icon: {},
|
|
@@ -1031,14 +1034,14 @@ var Kt = { class: "tpl:text-center" }, qt = ["href"], Jt = /* @__PURE__ */ y({
|
|
|
1031
1034
|
height: `${r.value}px`
|
|
1032
1035
|
}),
|
|
1033
1036
|
innerHTML: t.icon
|
|
1034
|
-
}, null, 12,
|
|
1037
|
+
}, null, 12, dn)) : a.value ? (e(), w("img", {
|
|
1035
1038
|
key: 1,
|
|
1036
1039
|
src: t.icon,
|
|
1037
1040
|
width: r.value,
|
|
1038
1041
|
height: r.value,
|
|
1039
1042
|
class: "tpl:inline-block",
|
|
1040
1043
|
alt: ""
|
|
1041
|
-
}, null, 8,
|
|
1044
|
+
}, null, 8, fn)) : (e(), ne(j(Qt), {
|
|
1042
1045
|
key: 2,
|
|
1043
1046
|
size: r.value,
|
|
1044
1047
|
"stroke-width": 1.5
|
|
@@ -1047,16 +1050,16 @@ var Kt = { class: "tpl:text-center" }, qt = ["href"], Jt = /* @__PURE__ */ y({
|
|
|
1047
1050
|
});
|
|
1048
1051
|
//#endregion
|
|
1049
1052
|
//#region src/composables/useEditorRoot.ts
|
|
1050
|
-
function
|
|
1051
|
-
return
|
|
1053
|
+
function mn() {
|
|
1054
|
+
return ae(et, document) ?? document;
|
|
1052
1055
|
}
|
|
1053
1056
|
//#endregion
|
|
1054
1057
|
//#region src/composables/useFocusTrap.ts
|
|
1055
|
-
var
|
|
1056
|
-
function
|
|
1057
|
-
let n =
|
|
1058
|
+
var hn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1059
|
+
function gn(e, t) {
|
|
1060
|
+
let n = mn(), r = null, i = null, a = null;
|
|
1058
1061
|
function o() {
|
|
1059
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1062
|
+
return e.value ? Array.from(e.value.querySelectorAll(hn)).filter((e) => e.offsetParent !== null) : [];
|
|
1060
1063
|
}
|
|
1061
1064
|
function c(e) {
|
|
1062
1065
|
if (e.key !== "Tab") return;
|
|
@@ -1071,7 +1074,7 @@ function mn(e, t) {
|
|
|
1071
1074
|
a = null;
|
|
1072
1075
|
let t = o();
|
|
1073
1076
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1074
|
-
}), i =
|
|
1077
|
+
}), i = Le(e, "keydown", c);
|
|
1075
1078
|
}
|
|
1076
1079
|
function u(e = {}) {
|
|
1077
1080
|
let t = e.restoreFocus !== !1;
|
|
@@ -1086,8 +1089,8 @@ function mn(e, t) {
|
|
|
1086
1089
|
}
|
|
1087
1090
|
//#endregion
|
|
1088
1091
|
//#region src/composables/useEmoji.ts
|
|
1089
|
-
function
|
|
1090
|
-
let [e, t] =
|
|
1092
|
+
function _n() {
|
|
1093
|
+
let [e, t] = Ne(!1), n = d([]), r = !1;
|
|
1091
1094
|
re(() => {
|
|
1092
1095
|
r = !0;
|
|
1093
1096
|
}), s(e, async (e) => {
|
|
@@ -1112,7 +1115,7 @@ function hn() {
|
|
|
1112
1115
|
}
|
|
1113
1116
|
//#endregion
|
|
1114
1117
|
//#region src/composables/useDragDrop.ts
|
|
1115
|
-
function
|
|
1118
|
+
function vn(e) {
|
|
1116
1119
|
let { onBlockMove: t, onBlockAdd: n } = e, r = h(!1), i = h(null), a = h(null);
|
|
1117
1120
|
function o(e) {
|
|
1118
1121
|
r.value = !0, i.value = e;
|
|
@@ -1162,7 +1165,7 @@ function gn(e) {
|
|
|
1162
1165
|
}
|
|
1163
1166
|
//#endregion
|
|
1164
1167
|
//#region src/composables/useFonts.ts
|
|
1165
|
-
var
|
|
1168
|
+
var yn = [
|
|
1166
1169
|
{
|
|
1167
1170
|
value: "Arial",
|
|
1168
1171
|
label: "Arial"
|
|
@@ -1191,7 +1194,7 @@ var _n = [
|
|
|
1191
1194
|
value: "Courier New",
|
|
1192
1195
|
label: "Courier New"
|
|
1193
1196
|
}
|
|
1194
|
-
],
|
|
1197
|
+
], bn = {
|
|
1195
1198
|
arial: "Arial, sans-serif",
|
|
1196
1199
|
helvetica: "Helvetica, sans-serif",
|
|
1197
1200
|
georgia: "Georgia, serif",
|
|
@@ -1199,14 +1202,14 @@ var _n = [
|
|
|
1199
1202
|
verdana: "Verdana, sans-serif",
|
|
1200
1203
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1201
1204
|
"courier new": "'Courier New', monospace"
|
|
1202
|
-
},
|
|
1203
|
-
function
|
|
1204
|
-
let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ??
|
|
1205
|
+
}, xn = "Arial, sans-serif";
|
|
1206
|
+
function Sn(e) {
|
|
1207
|
+
let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ?? xn);
|
|
1205
1208
|
function a(e) {
|
|
1206
1209
|
n.value = e;
|
|
1207
1210
|
}
|
|
1208
1211
|
let o = x(() => {
|
|
1209
|
-
let e = [...
|
|
1212
|
+
let e = [...yn];
|
|
1210
1213
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
1211
1214
|
let r = t.value.map((e) => ({
|
|
1212
1215
|
value: e.name,
|
|
@@ -1219,17 +1222,17 @@ function bn(e) {
|
|
|
1219
1222
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1220
1223
|
}
|
|
1221
1224
|
function c(e) {
|
|
1222
|
-
return
|
|
1225
|
+
return yn.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1223
1226
|
}
|
|
1224
1227
|
function l() {
|
|
1225
1228
|
if (e?.defaultFont) {
|
|
1226
|
-
if (!n.value && !c(e.defaultFont)) return
|
|
1229
|
+
if (!n.value && !c(e.defaultFont)) return xn;
|
|
1227
1230
|
if (s(e.defaultFont)) {
|
|
1228
1231
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1229
1232
|
if (t) return t.value;
|
|
1230
1233
|
}
|
|
1231
1234
|
}
|
|
1232
|
-
return
|
|
1235
|
+
return xn;
|
|
1233
1236
|
}
|
|
1234
1237
|
let u = x(() => l());
|
|
1235
1238
|
function d(e) {
|
|
@@ -1239,7 +1242,7 @@ function bn(e) {
|
|
|
1239
1242
|
let e = n.fallback ?? i.value;
|
|
1240
1243
|
return `'${n.name}', ${e}`;
|
|
1241
1244
|
}
|
|
1242
|
-
return
|
|
1245
|
+
return bn[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1243
1246
|
}
|
|
1244
1247
|
let f = [], m = !1;
|
|
1245
1248
|
async function g() {
|
|
@@ -1255,7 +1258,7 @@ function bn(e) {
|
|
|
1255
1258
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1256
1259
|
});
|
|
1257
1260
|
} catch (t) {
|
|
1258
|
-
|
|
1261
|
+
Ht.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1259
1262
|
}
|
|
1260
1263
|
});
|
|
1261
1264
|
await Promise.allSettled(e), !m && (r.value = !0);
|
|
@@ -1282,9 +1285,9 @@ function bn(e) {
|
|
|
1282
1285
|
}
|
|
1283
1286
|
//#endregion
|
|
1284
1287
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1285
|
-
function
|
|
1288
|
+
function Cn(e) {
|
|
1286
1289
|
let t = h(!1), n = h(""), r = h(null);
|
|
1287
|
-
|
|
1290
|
+
gn(r, t);
|
|
1288
1291
|
function i() {
|
|
1289
1292
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
1290
1293
|
}
|
|
@@ -1335,8 +1338,8 @@ function xn(e) {
|
|
|
1335
1338
|
}
|
|
1336
1339
|
//#endregion
|
|
1337
1340
|
//#region src/composables/useRichTextEditor.ts
|
|
1338
|
-
function
|
|
1339
|
-
let t =
|
|
1341
|
+
function wn(e) {
|
|
1342
|
+
let t = ae(rt, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = ht(), f = ae(Ue, null), p = (a(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = de(l), g = d(null), { showLinkDialog: _, linkUrl: v, linkDialogRef: y, openLinkDialog: b, insertLink: x, removeLink: S, closeLinkDialog: C, handleLinkKeydown: w } = Cn(g), { start: T, stop: E } = Re(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ee = d(null), D = h(!0), O = h(null), k = !1;
|
|
1340
1343
|
async function te() {
|
|
1341
1344
|
O.value = null, D.value = !0;
|
|
1342
1345
|
try {
|
|
@@ -1366,7 +1369,7 @@ function Sn(e) {
|
|
|
1366
1369
|
g.value = s, D.value = !1, T();
|
|
1367
1370
|
} catch (t) {
|
|
1368
1371
|
if (k) return;
|
|
1369
|
-
|
|
1372
|
+
Ht.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), O.value = t instanceof Error ? t.message : "Failed to load editor", D.value = !1;
|
|
1370
1373
|
}
|
|
1371
1374
|
}
|
|
1372
1375
|
function A() {
|
|
@@ -1381,7 +1384,7 @@ function Sn(e) {
|
|
|
1381
1384
|
let n = t.composedPath().find((e) => e instanceof HTMLElement);
|
|
1382
1385
|
n && (e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone());
|
|
1383
1386
|
}
|
|
1384
|
-
|
|
1387
|
+
Le(document, "mousedown", re), n(() => {
|
|
1385
1388
|
k = !0, ne(), E(), g.value?.destroy();
|
|
1386
1389
|
});
|
|
1387
1390
|
async function j() {
|
|
@@ -1414,20 +1417,20 @@ function Sn(e) {
|
|
|
1414
1417
|
}
|
|
1415
1418
|
//#endregion
|
|
1416
1419
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1417
|
-
var
|
|
1420
|
+
var Tn = { class: "tpl:w-full" }, En = {
|
|
1418
1421
|
key: 0,
|
|
1419
1422
|
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)]"
|
|
1420
|
-
},
|
|
1423
|
+
}, Dn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, On = {
|
|
1421
1424
|
key: 1,
|
|
1422
1425
|
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)]"
|
|
1423
|
-
},
|
|
1426
|
+
}, kn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, An = {
|
|
1424
1427
|
key: 2,
|
|
1425
1428
|
class: "tpl:relative"
|
|
1426
|
-
},
|
|
1429
|
+
}, jn = ["innerHTML"], Mn = {
|
|
1427
1430
|
key: 0,
|
|
1428
1431
|
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]",
|
|
1429
1432
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1430
|
-
},
|
|
1433
|
+
}, Nn = /* @__PURE__ */ y({
|
|
1431
1434
|
__name: "CustomBlock",
|
|
1432
1435
|
props: {
|
|
1433
1436
|
block: {},
|
|
@@ -1435,7 +1438,7 @@ var Cn = { class: "tpl:w-full" }, wn = {
|
|
|
1435
1438
|
},
|
|
1436
1439
|
emits: ["fetchData"],
|
|
1437
1440
|
setup(t, { emit: n }) {
|
|
1438
|
-
let r = t, i = n, { t: a } =
|
|
1441
|
+
let r = t, i = n, { t: a } = lt(), o = ae(nt, null), c = h(""), l = h(!1), d = x(() => o?.getDefinition(r.block.customType)), f = x(() => !!d.value), { isFetching: p, fetch: m, needsFetch: g, hasDataSource: v } = Dt({
|
|
1439
1442
|
definition: d,
|
|
1440
1443
|
block: x(() => r.block),
|
|
1441
1444
|
onUpdate: (e, t) => {
|
|
@@ -1456,15 +1459,15 @@ var Cn = { class: "tpl:w-full" }, wn = {
|
|
|
1456
1459
|
}
|
|
1457
1460
|
}
|
|
1458
1461
|
}
|
|
1459
|
-
let S =
|
|
1462
|
+
let S = Me(y, 150);
|
|
1460
1463
|
return u(() => {
|
|
1461
1464
|
y();
|
|
1462
1465
|
}), s(() => r.block.fieldValues, () => {
|
|
1463
1466
|
S();
|
|
1464
|
-
}, { deep: !0 }), (t, n) => (e(), w("div",
|
|
1467
|
+
}, { deep: !0 }), (t, n) => (e(), w("div", Tn, [f.value ? l.value ? (e(), w("div", On, [N(j(ft), {
|
|
1465
1468
|
size: 24,
|
|
1466
1469
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1467
|
-
}), C("span",
|
|
1470
|
+
}), C("span", kn, M(j(a).customBlocks.renderError), 1)])) : (e(), w("div", An, [C("div", { innerHTML: c.value }, null, 8, jn), j(v) && j(g) ? (e(), w("div", Mn, [j(p) ? (e(), ne(pt, {
|
|
1468
1471
|
key: 1,
|
|
1469
1472
|
class: "tpl:w-48"
|
|
1470
1473
|
})) : (e(), w("button", {
|
|
@@ -1472,16 +1475,16 @@ var Cn = { class: "tpl:w-full" }, wn = {
|
|
|
1472
1475
|
type: "button",
|
|
1473
1476
|
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)]",
|
|
1474
1477
|
onClick: n[0] ||= b((...e) => j(m) && j(m)(...e), ["stop"])
|
|
1475
|
-
}, [d.value?.icon ? (e(), ne(
|
|
1478
|
+
}, [d.value?.icon ? (e(), ne(pn, {
|
|
1476
1479
|
key: 0,
|
|
1477
1480
|
icon: d.value.icon,
|
|
1478
1481
|
size: 16
|
|
1479
|
-
}, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div",
|
|
1482
|
+
}, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div", En, [N(j(sn), {
|
|
1480
1483
|
size: 24,
|
|
1481
1484
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1482
|
-
}), C("span",
|
|
1485
|
+
}), C("span", Dn, M(j(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1483
1486
|
}
|
|
1484
|
-
}),
|
|
1487
|
+
}), Pn = { class: "tpl:w-full" }, Fn = /* @__PURE__ */ y({
|
|
1485
1488
|
__name: "DividerBlock",
|
|
1486
1489
|
props: {
|
|
1487
1490
|
block: {},
|
|
@@ -1493,37 +1496,37 @@ var Cn = { class: "tpl:w-full" }, wn = {
|
|
|
1493
1496
|
width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
|
|
1494
1497
|
margin: n.block.width === "full" ? "0" : "0 auto"
|
|
1495
1498
|
}));
|
|
1496
|
-
return (t, n) => (e(), w("div",
|
|
1499
|
+
return (t, n) => (e(), w("div", Pn, [C("hr", {
|
|
1497
1500
|
class: "tpl:m-0 tpl:border-none",
|
|
1498
1501
|
style: A(r.value)
|
|
1499
1502
|
}, null, 4)]));
|
|
1500
1503
|
}
|
|
1501
|
-
}),
|
|
1504
|
+
}), In = { class: "tpl:w-full" }, Ln = { 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)]" }, Rn = {
|
|
1502
1505
|
key: 0,
|
|
1503
1506
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1504
|
-
},
|
|
1507
|
+
}, zn = {
|
|
1505
1508
|
key: 1,
|
|
1506
1509
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1507
|
-
},
|
|
1510
|
+
}, Bn = /* @__PURE__ */ y({
|
|
1508
1511
|
__name: "HtmlBlock",
|
|
1509
1512
|
props: {
|
|
1510
1513
|
block: {},
|
|
1511
1514
|
viewport: {}
|
|
1512
1515
|
},
|
|
1513
1516
|
setup(t) {
|
|
1514
|
-
let n = t, { t: r } =
|
|
1515
|
-
return (t, n) => (e(), w("div",
|
|
1517
|
+
let n = t, { t: r } = lt(), i = x(() => n.block.content.trim().length > 0);
|
|
1518
|
+
return (t, n) => (e(), w("div", In, [C("div", Ln, [N(j($t), {
|
|
1516
1519
|
size: 24,
|
|
1517
1520
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1518
|
-
}), i.value ? (e(), w("span",
|
|
1521
|
+
}), i.value ? (e(), w("span", Rn, M(j(r).html.preview), 1)) : (e(), w("span", zn, M(j(r).html.empty), 1))])]));
|
|
1519
1522
|
}
|
|
1520
|
-
}),
|
|
1523
|
+
}), Vn = ["href"], Hn = ["src", "alt"], Un = ["src", "alt"], Wn = {
|
|
1521
1524
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1522
1525
|
style: { opacity: "0.7" }
|
|
1523
|
-
},
|
|
1526
|
+
}, Gn = ["href"], Kn = ["src", "alt"], qn = ["src", "alt"], Jn = {
|
|
1524
1527
|
key: 3,
|
|
1525
1528
|
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)]"
|
|
1526
|
-
},
|
|
1529
|
+
}, Yn = ["aria-label"], Xn = { key: 1 }, Zn = /* @__PURE__ */ y({
|
|
1527
1530
|
__name: "ImageBlock",
|
|
1528
1531
|
props: {
|
|
1529
1532
|
block: {},
|
|
@@ -1531,7 +1534,7 @@ var Cn = { class: "tpl:w-full" }, wn = {
|
|
|
1531
1534
|
},
|
|
1532
1535
|
emits: ["update"],
|
|
1533
1536
|
setup(t, { emit: n }) {
|
|
1534
|
-
let r = t, i = n, { t: a } =
|
|
1537
|
+
let r = t, i = n, { t: a } = lt(), { syntax: o } = ht(), s = ae(st, null), c = x(() => !!s), l = gt();
|
|
1535
1538
|
async function u() {
|
|
1536
1539
|
let e = await s?.({ accept: ["images"] });
|
|
1537
1540
|
if (l.alive && e) {
|
|
@@ -1545,7 +1548,7 @@ var Cn = { class: "tpl:w-full" }, wn = {
|
|
|
1545
1548
|
display: "block",
|
|
1546
1549
|
margin: r.block.align === "center" ? "0 auto" : void 0,
|
|
1547
1550
|
marginLeft: r.block.align === "right" ? "auto" : void 0
|
|
1548
|
-
})), p = x(() =>
|
|
1551
|
+
})), p = x(() => pe(r.block.src, o));
|
|
1549
1552
|
return (n, r) => (e(), w("div", {
|
|
1550
1553
|
class: "tpl:w-full",
|
|
1551
1554
|
style: A(d.value)
|
|
@@ -1561,22 +1564,22 @@ var Cn = { class: "tpl:w-full" }, wn = {
|
|
|
1561
1564
|
src: t.block.placeholderUrl,
|
|
1562
1565
|
alt: t.block.alt || j(a).image.altTextPlaceholder,
|
|
1563
1566
|
style: A(f.value)
|
|
1564
|
-
}, null, 12,
|
|
1567
|
+
}, null, 12, Hn)], 8, Vn)) : (e(), w("img", {
|
|
1565
1568
|
key: 1,
|
|
1566
1569
|
class: "tpl:border-0",
|
|
1567
1570
|
src: t.block.placeholderUrl,
|
|
1568
1571
|
alt: t.block.alt,
|
|
1569
1572
|
style: A(f.value)
|
|
1570
|
-
}, null, 12,
|
|
1573
|
+
}, null, 12, Un))], 64)) : t.block.src && p.value ? (e(), w("div", {
|
|
1571
1574
|
key: 1,
|
|
1572
1575
|
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)]",
|
|
1573
1576
|
style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, f.value])
|
|
1574
|
-
}, [N(j(
|
|
1577
|
+
}, [N(j(an), {
|
|
1575
1578
|
size: 32,
|
|
1576
1579
|
"stroke-width": 1.5,
|
|
1577
1580
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1578
1581
|
style: { opacity: "0.5" }
|
|
1579
|
-
}), C("span",
|
|
1582
|
+
}), C("span", Wn, M(t.block.src), 1)], 4)) : t.block.src ? (e(), w(D, { key: 2 }, [t.block.linkUrl ? (e(), w("a", {
|
|
1580
1583
|
key: 0,
|
|
1581
1584
|
href: t.block.linkUrl,
|
|
1582
1585
|
target: "_blank",
|
|
@@ -1588,33 +1591,33 @@ var Cn = { class: "tpl:w-full" }, wn = {
|
|
|
1588
1591
|
src: t.block.src,
|
|
1589
1592
|
alt: t.block.alt || j(a).image.altTextPlaceholder,
|
|
1590
1593
|
style: A(f.value)
|
|
1591
|
-
}, null, 12,
|
|
1594
|
+
}, null, 12, Kn)], 8, Gn)) : (e(), w("img", {
|
|
1592
1595
|
key: 1,
|
|
1593
1596
|
class: "tpl:border-0",
|
|
1594
1597
|
src: t.block.src,
|
|
1595
1598
|
alt: t.block.alt,
|
|
1596
1599
|
style: A(f.value)
|
|
1597
|
-
}, null, 12,
|
|
1600
|
+
}, null, 12, qn))], 64)) : (e(), w("div", Jn, [c.value ? (e(), w("button", {
|
|
1598
1601
|
key: 0,
|
|
1599
1602
|
"aria-label": j(a).image.browseMedia,
|
|
1600
1603
|
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)]",
|
|
1601
1604
|
onClick: b(u, ["stop"])
|
|
1602
|
-
}, [N(j(
|
|
1605
|
+
}, [N(j(an), {
|
|
1603
1606
|
size: 14,
|
|
1604
1607
|
"stroke-width": 1.5
|
|
1605
|
-
}), _(" " + M(j(a).image.browseMedia), 1)], 8,
|
|
1608
|
+
}), _(" " + M(j(a).image.browseMedia), 1)], 8, Yn)) : (e(), w("span", Xn, M(j(a).image.clickToAdd), 1))]))], 4));
|
|
1606
1609
|
}
|
|
1607
|
-
}),
|
|
1610
|
+
}), Qn = { class: "tpl:w-full" }, $n = ["href"], er = {
|
|
1608
1611
|
key: 1,
|
|
1609
1612
|
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)]"
|
|
1610
|
-
},
|
|
1613
|
+
}, tr = /* @__PURE__ */ y({
|
|
1611
1614
|
__name: "MenuBlock",
|
|
1612
1615
|
props: {
|
|
1613
1616
|
block: {},
|
|
1614
1617
|
viewport: {}
|
|
1615
1618
|
},
|
|
1616
1619
|
setup(t) {
|
|
1617
|
-
let n = t, { t: r } =
|
|
1620
|
+
let n = t, { t: r } = lt(), i = x(() => ({
|
|
1618
1621
|
display: "flex",
|
|
1619
1622
|
flexWrap: "wrap",
|
|
1620
1623
|
gap: `0 ${n.block.spacing}px`,
|
|
@@ -1626,7 +1629,7 @@ var Cn = { class: "tpl:w-full" }, wn = {
|
|
|
1626
1629
|
function o(e) {
|
|
1627
1630
|
return e || n.block.linkColor || n.block.color;
|
|
1628
1631
|
}
|
|
1629
|
-
return (n, s) => (e(), w("div",
|
|
1632
|
+
return (n, s) => (e(), w("div", Qn, [a.value ? (e(), w("div", {
|
|
1630
1633
|
key: 0,
|
|
1631
1634
|
style: A(i.value)
|
|
1632
1635
|
}, [(e(!0), w(D, null, c(t.block.items, (n, r) => (e(), w(D, { key: n.id }, [C("a", {
|
|
@@ -1638,15 +1641,15 @@ var Cn = { class: "tpl:w-full" }, wn = {
|
|
|
1638
1641
|
textDecoration: n.underline ? "underline" : "none"
|
|
1639
1642
|
}),
|
|
1640
1643
|
onClick: s[0] ||= b(() => {}, ["prevent"])
|
|
1641
|
-
}, M(n.text || "..."), 13,
|
|
1644
|
+
}, M(n.text || "..."), 13, $n), r < t.block.items.length - 1 ? (e(), w("span", {
|
|
1642
1645
|
key: 0,
|
|
1643
1646
|
style: A({
|
|
1644
1647
|
color: t.block.separatorColor,
|
|
1645
1648
|
padding: `0 ${t.block.spacing}px`
|
|
1646
1649
|
})
|
|
1647
|
-
}, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div",
|
|
1650
|
+
}, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div", er, [N(j(on), { size: 16 }), C("span", null, M(j(r).menu.addLinks), 1)]))]));
|
|
1648
1651
|
}
|
|
1649
|
-
}),
|
|
1652
|
+
}), nr = new Set([
|
|
1650
1653
|
"http",
|
|
1651
1654
|
"https",
|
|
1652
1655
|
"mailto",
|
|
@@ -1656,7 +1659,7 @@ var Cn = { class: "tpl:w-full" }, wn = {
|
|
|
1656
1659
|
"sms",
|
|
1657
1660
|
"xmpp",
|
|
1658
1661
|
"cid"
|
|
1659
|
-
]),
|
|
1662
|
+
]), rr = new Set([
|
|
1660
1663
|
"SCRIPT",
|
|
1661
1664
|
"STYLE",
|
|
1662
1665
|
"IFRAME",
|
|
@@ -1666,7 +1669,7 @@ var Cn = { class: "tpl:w-full" }, wn = {
|
|
|
1666
1669
|
"META",
|
|
1667
1670
|
"BASE",
|
|
1668
1671
|
"FORM"
|
|
1669
|
-
]),
|
|
1672
|
+
]), ir = new Set([
|
|
1670
1673
|
"href",
|
|
1671
1674
|
"xlink:href",
|
|
1672
1675
|
"formaction",
|
|
@@ -1675,16 +1678,16 @@ var Cn = { class: "tpl:w-full" }, wn = {
|
|
|
1675
1678
|
"background",
|
|
1676
1679
|
"poster"
|
|
1677
1680
|
]);
|
|
1678
|
-
function
|
|
1681
|
+
function ar(e, t) {
|
|
1679
1682
|
let n = e.trim();
|
|
1680
1683
|
if (!n || n.startsWith("#")) return !0;
|
|
1681
1684
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1682
1685
|
if (!r) return !0;
|
|
1683
1686
|
let i = r[1].toLowerCase();
|
|
1684
|
-
return
|
|
1687
|
+
return nr.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1685
1688
|
}
|
|
1686
|
-
function
|
|
1687
|
-
if (
|
|
1689
|
+
function or(e) {
|
|
1690
|
+
if (rr.has(e.tagName)) {
|
|
1688
1691
|
e.remove();
|
|
1689
1692
|
return;
|
|
1690
1693
|
}
|
|
@@ -1696,29 +1699,29 @@ function ir(e) {
|
|
|
1696
1699
|
e.removeAttribute(n);
|
|
1697
1700
|
continue;
|
|
1698
1701
|
}
|
|
1699
|
-
if (
|
|
1700
|
-
|
|
1702
|
+
if (ir.has(t)) {
|
|
1703
|
+
ar(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
1701
1704
|
continue;
|
|
1702
1705
|
}
|
|
1703
1706
|
if (t === "src") {
|
|
1704
|
-
|
|
1707
|
+
ar(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
1705
1708
|
continue;
|
|
1706
1709
|
}
|
|
1707
1710
|
t === "srcdoc" && e.removeAttribute(n);
|
|
1708
1711
|
}
|
|
1709
1712
|
let n = Array.from(e.children);
|
|
1710
|
-
for (let e of n)
|
|
1713
|
+
for (let e of n) or(e);
|
|
1711
1714
|
}
|
|
1712
|
-
function
|
|
1715
|
+
function sr(e) {
|
|
1713
1716
|
if (typeof DOMParser > "u") return e;
|
|
1714
1717
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1715
|
-
for (let e of n)
|
|
1718
|
+
for (let e of n) or(e);
|
|
1716
1719
|
return t.innerHTML;
|
|
1717
1720
|
}
|
|
1718
1721
|
//#endregion
|
|
1719
1722
|
//#region src/composables/useEditableTextBlock.ts
|
|
1720
|
-
function
|
|
1721
|
-
let t =
|
|
1723
|
+
function cr(e) {
|
|
1724
|
+
let t = ae(ot, []), { syntax: n } = ht(), r = x(() => sr(xe(le(e(), t), n))), i = h(!1), a = h(null), { top: o, left: s } = Ie(a), c = x(() => ({
|
|
1722
1725
|
top: o.value - 8,
|
|
1723
1726
|
left: s.value
|
|
1724
1727
|
}));
|
|
@@ -1739,14 +1742,14 @@ function or(e) {
|
|
|
1739
1742
|
}
|
|
1740
1743
|
//#endregion
|
|
1741
1744
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1742
|
-
var
|
|
1745
|
+
var lr = ["innerHTML"], ur = /* @__PURE__ */ y({
|
|
1743
1746
|
__name: "ParagraphBlock",
|
|
1744
1747
|
props: {
|
|
1745
1748
|
block: {},
|
|
1746
1749
|
viewport: {}
|
|
1747
1750
|
},
|
|
1748
1751
|
setup(t) {
|
|
1749
|
-
let n = t, r =
|
|
1752
|
+
let n = t, r = se(() => import("./ParagraphEditor-BQTPI8j8.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = cr(() => n.block.content);
|
|
1750
1753
|
return (n, u) => (e(), w("div", {
|
|
1751
1754
|
ref_key: "blockRef",
|
|
1752
1755
|
ref: a,
|
|
@@ -1765,19 +1768,19 @@ var sr = ["innerHTML"], cr = /* @__PURE__ */ y({
|
|
|
1765
1768
|
key: 1,
|
|
1766
1769
|
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",
|
|
1767
1770
|
innerHTML: j(s)
|
|
1768
|
-
}, null, 8,
|
|
1771
|
+
}, null, 8, lr))], 544));
|
|
1769
1772
|
}
|
|
1770
1773
|
});
|
|
1771
1774
|
//#endregion
|
|
1772
1775
|
//#region src/utils/blockComponentResolver.ts
|
|
1773
|
-
function
|
|
1776
|
+
function dr(e, t, n) {
|
|
1774
1777
|
if (t) {
|
|
1775
1778
|
let n = t.getComponent(e);
|
|
1776
1779
|
if (n) return n;
|
|
1777
1780
|
}
|
|
1778
1781
|
return n[e.type] ?? null;
|
|
1779
1782
|
}
|
|
1780
|
-
function
|
|
1783
|
+
function fr(e) {
|
|
1781
1784
|
let { padding: t, margin: n, backgroundColor: r } = e.styles;
|
|
1782
1785
|
return {
|
|
1783
1786
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
@@ -1787,20 +1790,20 @@ function ur(e) {
|
|
|
1787
1790
|
}
|
|
1788
1791
|
//#endregion
|
|
1789
1792
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
1790
|
-
var
|
|
1793
|
+
var pr = ["data-block-id", "data-block-type"], mr = ["aria-label"], hr = [
|
|
1791
1794
|
"aria-label",
|
|
1792
1795
|
"aria-pressed",
|
|
1793
1796
|
"title"
|
|
1794
|
-
],
|
|
1797
|
+
], gr = ["aria-label", "title"], _r = ["aria-label", "title"], vr = ["aria-label", "title"], yr = {
|
|
1795
1798
|
key: 1,
|
|
1796
1799
|
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"
|
|
1797
|
-
},
|
|
1800
|
+
}, br = { 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)]" }, xr = {
|
|
1798
1801
|
key: 2,
|
|
1799
1802
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1800
|
-
},
|
|
1803
|
+
}, Sr = ["aria-label", "title"], Cr = {
|
|
1801
1804
|
key: 3,
|
|
1802
1805
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1803
|
-
},
|
|
1806
|
+
}, wr = ["aria-label"], Tr = /* @__PURE__ */ mt(/* @__PURE__ */ y({
|
|
1804
1807
|
__name: "BlockWrapper",
|
|
1805
1808
|
props: {
|
|
1806
1809
|
block: {},
|
|
@@ -1810,7 +1813,7 @@ var dr = ["data-block-id", "data-block-type"], fr = ["aria-label"], pr = [
|
|
|
1810
1813
|
},
|
|
1811
1814
|
emits: ["select"],
|
|
1812
1815
|
setup(t, { emit: n }) {
|
|
1813
|
-
let i =
|
|
1816
|
+
let i = se(() => import("./BlockIssueBadge-DJTiT1eF.js")), a = t, o = n, { t: s, format: c } = lt(), u = ae(Ge, 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);
|
|
1814
1817
|
async function m() {
|
|
1815
1818
|
await r(), d.value?.focus();
|
|
1816
1819
|
}
|
|
@@ -1837,8 +1840,8 @@ var dr = ["data-block-id", "data-block-type"], fr = ["aria-label"], pr = [
|
|
|
1837
1840
|
desktop: s.viewport.desktop,
|
|
1838
1841
|
tablet: s.viewport.tablet,
|
|
1839
1842
|
mobile: s.viewport.mobile
|
|
1840
|
-
}[a.viewport] ?? a.viewport : ""), T = x(() => !!a.block.displayCondition), E =
|
|
1841
|
-
let e =
|
|
1843
|
+
}[a.viewport] ?? a.viewport : ""), T = x(() => !!a.block.displayCondition), E = ae(Qe, null), ee = ae(at, null), D = ae(it, {}), k = x(() => !!D.savedModules), te = x(() => D.comments?.getBlockCount(a.block.id) ?? 0), ne = x(() => ({ margin: fr(a.block).margin })), re = x(() => {
|
|
1844
|
+
let e = fr(a.block);
|
|
1842
1845
|
return {
|
|
1843
1846
|
padding: e.padding,
|
|
1844
1847
|
backgroundColor: e.backgroundColor
|
|
@@ -1847,16 +1850,16 @@ var dr = ["data-block-id", "data-block-type"], fr = ["aria-label"], pr = [
|
|
|
1847
1850
|
function ie(e) {
|
|
1848
1851
|
a.previewMode || (e.stopPropagation(), o("select"));
|
|
1849
1852
|
}
|
|
1850
|
-
function
|
|
1853
|
+
function oe() {
|
|
1851
1854
|
E?.deleteBlock(a.block.id);
|
|
1852
1855
|
}
|
|
1853
|
-
function
|
|
1856
|
+
function ce() {
|
|
1854
1857
|
E?.duplicateBlock(a.block);
|
|
1855
1858
|
}
|
|
1856
|
-
function
|
|
1859
|
+
function le() {
|
|
1857
1860
|
D.savedModules?.openSaveDialog(a.block.id);
|
|
1858
1861
|
}
|
|
1859
|
-
function
|
|
1862
|
+
function ue() {
|
|
1860
1863
|
ee?.toggleBlock(a.block.id);
|
|
1861
1864
|
}
|
|
1862
1865
|
return (n, r) => (e(), w("div", {
|
|
@@ -1886,90 +1889,90 @@ var dr = ["data-block-id", "data-block-type"], fr = ["aria-label"], pr = [
|
|
|
1886
1889
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1887
1890
|
title: j(s).blockActions.drag,
|
|
1888
1891
|
onKeydown: g
|
|
1889
|
-
}, [N(j(
|
|
1892
|
+
}, [N(j(rn), {
|
|
1890
1893
|
size: 14,
|
|
1891
1894
|
"stroke-width": 1.5
|
|
1892
|
-
})], 40,
|
|
1895
|
+
})], 40, hr),
|
|
1893
1896
|
C("button", {
|
|
1894
1897
|
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",
|
|
1895
1898
|
"aria-label": j(s).blockActions.duplicate,
|
|
1896
1899
|
title: j(s).blockActions.duplicate,
|
|
1897
|
-
onClick: b(
|
|
1898
|
-
}, [N(j(
|
|
1900
|
+
onClick: b(ce, ["stop"])
|
|
1901
|
+
}, [N(j(en), {
|
|
1899
1902
|
size: 14,
|
|
1900
1903
|
"stroke-width": 1.5
|
|
1901
|
-
})], 8,
|
|
1904
|
+
})], 8, gr),
|
|
1902
1905
|
k.value ? (e(), w("button", {
|
|
1903
1906
|
key: 0,
|
|
1904
1907
|
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",
|
|
1905
1908
|
"aria-label": j(s).blockActions.saveAsModule,
|
|
1906
1909
|
title: j(s).blockActions.saveAsModule,
|
|
1907
|
-
onClick: b(
|
|
1908
|
-
}, [N(j(
|
|
1910
|
+
onClick: b(le, ["stop"])
|
|
1911
|
+
}, [N(j(Zt), {
|
|
1909
1912
|
size: 14,
|
|
1910
1913
|
"stroke-width": 1.5
|
|
1911
|
-
})], 8,
|
|
1914
|
+
})], 8, _r)) : O("", !0),
|
|
1912
1915
|
C("button", {
|
|
1913
1916
|
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",
|
|
1914
1917
|
"aria-label": j(s).blockActions.delete,
|
|
1915
1918
|
title: j(s).blockActions.delete,
|
|
1916
|
-
onClick: b(
|
|
1917
|
-
}, [N(j(
|
|
1919
|
+
onClick: b(oe, ["stop"])
|
|
1920
|
+
}, [N(j(dt), {
|
|
1918
1921
|
size: 14,
|
|
1919
1922
|
"stroke-width": 1.5
|
|
1920
|
-
})], 8,
|
|
1921
|
-
], 8,
|
|
1922
|
-
y.value ? (e(), w("div",
|
|
1923
|
+
})], 8, vr)
|
|
1924
|
+
], 8, mr)) : O("", !0),
|
|
1925
|
+
y.value ? (e(), w("div", yr, [C("span", br, [N(j(tn), {
|
|
1923
1926
|
size: 12,
|
|
1924
1927
|
"stroke-width": 1.5
|
|
1925
1928
|
}), _(" " + M(j(c)(j(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : O("", !0),
|
|
1926
|
-
T.value && !y.value ? (e(), w("div",
|
|
1929
|
+
T.value && !y.value ? (e(), w("div", xr, [C("button", {
|
|
1927
1930
|
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)]",
|
|
1928
1931
|
"aria-label": j(s).blockActions.conditionToggle,
|
|
1929
1932
|
title: t.block.displayCondition?.label,
|
|
1930
|
-
onClick: b(
|
|
1931
|
-
}, [N(j(
|
|
1933
|
+
onClick: b(ue, ["stop"])
|
|
1934
|
+
}, [N(j(nn), {
|
|
1932
1935
|
size: 12,
|
|
1933
1936
|
"stroke-width": 2
|
|
1934
|
-
})], 8,
|
|
1935
|
-
te.value > 0 && !y.value ? (e(), w("div",
|
|
1937
|
+
})], 8, Sr)])) : O("", !0),
|
|
1938
|
+
te.value > 0 && !y.value ? (e(), w("div", Cr, [C("button", {
|
|
1936
1939
|
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)]",
|
|
1937
1940
|
"aria-label": j(c)(j(s).blockActions.comments, { count: String(te.value) }),
|
|
1938
1941
|
onClick: r[0] ||= b((e) => j(D).comments?.openForBlock(t.block.id), ["stop"])
|
|
1939
|
-
}, [N(j(
|
|
1942
|
+
}, [N(j(ut), {
|
|
1940
1943
|
size: 12,
|
|
1941
1944
|
"stroke-width": 2.5
|
|
1942
|
-
}), _(" " + M(te.value), 1)], 8,
|
|
1945
|
+
}), _(" " + M(te.value), 1)], 8, wr)])) : O("", !0),
|
|
1943
1946
|
C("div", {
|
|
1944
1947
|
class: "tpl-block-content",
|
|
1945
1948
|
style: A(re.value)
|
|
1946
1949
|
}, [l(n.$slots, "default", {}, void 0, !0)], 4)
|
|
1947
|
-
], 14,
|
|
1950
|
+
], 14, pr));
|
|
1948
1951
|
}
|
|
1949
1952
|
}), [["__scopeId", "data-v-e77eb94e"]]);
|
|
1950
1953
|
//#endregion
|
|
1951
1954
|
//#region src/utils/unwrapParagraph.ts
|
|
1952
|
-
function
|
|
1955
|
+
function Er(e) {
|
|
1953
1956
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
1954
1957
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
1955
1958
|
}
|
|
1956
1959
|
//#endregion
|
|
1957
1960
|
//#region src/components/blocks/TitleBlock.vue
|
|
1958
|
-
var
|
|
1961
|
+
var Dr = /* @__PURE__ */ y({
|
|
1959
1962
|
__name: "TitleBlock",
|
|
1960
1963
|
props: {
|
|
1961
1964
|
block: {},
|
|
1962
1965
|
viewport: {}
|
|
1963
1966
|
},
|
|
1964
1967
|
setup(t) {
|
|
1965
|
-
let n = t, r =
|
|
1968
|
+
let n = t, r = se(() => import("./TitleEditor-PQYXfY6W.js")), { isEditing: a, blockRef: o, toolbarPosition: s, resolvedContent: c, handleDoubleClick: l, handleEditorDone: u } = cr(() => n.block.content), d = x(() => {
|
|
1966
1969
|
let e = {
|
|
1967
|
-
fontSize: `${
|
|
1970
|
+
fontSize: `${De[n.block.level]}px`,
|
|
1968
1971
|
color: n.block.color,
|
|
1969
1972
|
textAlign: n.block.textAlign
|
|
1970
1973
|
};
|
|
1971
1974
|
return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
|
|
1972
|
-
}), f = x(() => `h${n.block.level}`), p = x(() =>
|
|
1975
|
+
}), f = x(() => `h${n.block.level}`), p = x(() => Er(c.value));
|
|
1973
1976
|
return (n, c) => (e(), w("div", {
|
|
1974
1977
|
ref_key: "blockRef",
|
|
1975
1978
|
ref: o,
|
|
@@ -1992,83 +1995,83 @@ var Tr = /* @__PURE__ */ y({
|
|
|
1992
1995
|
innerHTML: p.value
|
|
1993
1996
|
}, null, 8, ["innerHTML"]))], 36));
|
|
1994
1997
|
}
|
|
1995
|
-
}),
|
|
1998
|
+
}), Or = Object.defineProperty, kr = Object.getOwnPropertySymbols, Ar = Object.prototype.hasOwnProperty, jr = Object.prototype.propertyIsEnumerable, Mr = (e, t, n) => t in e ? Or(e, t, {
|
|
1996
1999
|
enumerable: !0,
|
|
1997
2000
|
configurable: !0,
|
|
1998
2001
|
writable: !0,
|
|
1999
2002
|
value: n
|
|
2000
|
-
}) : e[t] = n,
|
|
2001
|
-
for (var n in t ||= {})
|
|
2002
|
-
if (
|
|
2003
|
+
}) : e[t] = n, Nr = (e, t) => {
|
|
2004
|
+
for (var n in t ||= {}) Ar.call(t, n) && Mr(e, n, t[n]);
|
|
2005
|
+
if (kr) for (var n of kr(t)) jr.call(t, n) && Mr(e, n, t[n]);
|
|
2003
2006
|
return e;
|
|
2004
|
-
},
|
|
2007
|
+
}, Pr = (e, t) => {
|
|
2005
2008
|
var n = {};
|
|
2006
|
-
for (var r in e)
|
|
2007
|
-
if (e != null &&
|
|
2009
|
+
for (var r in e) Ar.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2010
|
+
if (e != null && kr) for (var r of kr(e)) t.indexOf(r) < 0 && jr.call(e, r) && (n[r] = e[r]);
|
|
2008
2011
|
return n;
|
|
2009
|
-
},
|
|
2010
|
-
function
|
|
2011
|
-
console.warn(
|
|
2012
|
+
}, Fr = "[vue-draggable-plus]: ";
|
|
2013
|
+
function Ir(e) {
|
|
2014
|
+
console.warn(Fr + e);
|
|
2012
2015
|
}
|
|
2013
|
-
function
|
|
2014
|
-
console.error(
|
|
2016
|
+
function Lr(e) {
|
|
2017
|
+
console.error(Fr + e);
|
|
2015
2018
|
}
|
|
2016
|
-
function
|
|
2019
|
+
function Rr(e, t, n) {
|
|
2017
2020
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2018
2021
|
}
|
|
2019
|
-
function
|
|
2022
|
+
function zr(e) {
|
|
2020
2023
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2021
2024
|
}
|
|
2022
|
-
function
|
|
2023
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2025
|
+
function Br(e) {
|
|
2026
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[zr(n)] = e[n]), t), {});
|
|
2024
2027
|
}
|
|
2025
|
-
function
|
|
2028
|
+
function Vr(e, t) {
|
|
2026
2029
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2027
2030
|
}
|
|
2028
|
-
function
|
|
2031
|
+
function Hr(e, t, n) {
|
|
2029
2032
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2030
2033
|
}
|
|
2031
|
-
function
|
|
2034
|
+
function Ur(e) {
|
|
2032
2035
|
return e === void 0;
|
|
2033
2036
|
}
|
|
2034
|
-
function
|
|
2037
|
+
function Wr(e) {
|
|
2035
2038
|
return typeof e == "string";
|
|
2036
2039
|
}
|
|
2037
|
-
function
|
|
2040
|
+
function Gr(e, t, n) {
|
|
2038
2041
|
let r = e.children[n];
|
|
2039
2042
|
e.insertBefore(t, r);
|
|
2040
2043
|
}
|
|
2041
|
-
function
|
|
2044
|
+
function Kr(e) {
|
|
2042
2045
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2043
2046
|
}
|
|
2044
|
-
function
|
|
2047
|
+
function qr(e, t = document) {
|
|
2045
2048
|
let n = null;
|
|
2046
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2049
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Ir(`Element not found: ${e}`), n;
|
|
2047
2050
|
}
|
|
2048
|
-
function
|
|
2051
|
+
function Jr(e, t, n = null) {
|
|
2049
2052
|
return function(...r) {
|
|
2050
2053
|
return e.apply(n, r), t.apply(n, r);
|
|
2051
2054
|
};
|
|
2052
2055
|
}
|
|
2053
|
-
function
|
|
2054
|
-
let n =
|
|
2056
|
+
function Yr(e, t) {
|
|
2057
|
+
let n = Nr({}, e);
|
|
2055
2058
|
return Object.keys(t).forEach((r) => {
|
|
2056
|
-
n[r] ? n[r] =
|
|
2059
|
+
n[r] ? n[r] = Jr(e[r], t[r]) : n[r] = t[r];
|
|
2057
2060
|
}), n;
|
|
2058
2061
|
}
|
|
2059
|
-
function
|
|
2062
|
+
function Xr(e) {
|
|
2060
2063
|
return e instanceof HTMLElement;
|
|
2061
2064
|
}
|
|
2062
|
-
function
|
|
2065
|
+
function Zr(e, t) {
|
|
2063
2066
|
Object.keys(e).forEach((n) => {
|
|
2064
2067
|
t(n, e[n]);
|
|
2065
2068
|
});
|
|
2066
2069
|
}
|
|
2067
|
-
function
|
|
2070
|
+
function Qr(e) {
|
|
2068
2071
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2069
2072
|
}
|
|
2070
|
-
var
|
|
2071
|
-
function
|
|
2073
|
+
var $r = Object.assign;
|
|
2074
|
+
function ei(e, t) {
|
|
2072
2075
|
var n = Object.keys(e);
|
|
2073
2076
|
if (Object.getOwnPropertySymbols) {
|
|
2074
2077
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2078,26 +2081,26 @@ function Qr(e, t) {
|
|
|
2078
2081
|
}
|
|
2079
2082
|
return n;
|
|
2080
2083
|
}
|
|
2081
|
-
function
|
|
2084
|
+
function ti(e) {
|
|
2082
2085
|
for (var t = 1; t < arguments.length; t++) {
|
|
2083
2086
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2084
|
-
t % 2 ?
|
|
2085
|
-
|
|
2086
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2087
|
+
t % 2 ? ei(Object(n), !0).forEach(function(t) {
|
|
2088
|
+
ri(e, t, n[t]);
|
|
2089
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ei(Object(n)).forEach(function(t) {
|
|
2087
2090
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2088
2091
|
});
|
|
2089
2092
|
}
|
|
2090
2093
|
return e;
|
|
2091
2094
|
}
|
|
2092
|
-
function
|
|
2095
|
+
function ni(e) {
|
|
2093
2096
|
"@babel/helpers - typeof";
|
|
2094
|
-
return
|
|
2097
|
+
return ni = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2095
2098
|
return typeof e;
|
|
2096
2099
|
} : function(e) {
|
|
2097
2100
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2098
|
-
},
|
|
2101
|
+
}, ni(e);
|
|
2099
2102
|
}
|
|
2100
|
-
function
|
|
2103
|
+
function ri(e, t, n) {
|
|
2101
2104
|
return t in e ? Object.defineProperty(e, t, {
|
|
2102
2105
|
value: n,
|
|
2103
2106
|
enumerable: !0,
|
|
@@ -2105,45 +2108,45 @@ function ti(e, t, n) {
|
|
|
2105
2108
|
writable: !0
|
|
2106
2109
|
}) : e[t] = n, e;
|
|
2107
2110
|
}
|
|
2108
|
-
function
|
|
2109
|
-
return
|
|
2111
|
+
function ii() {
|
|
2112
|
+
return ii = Object.assign || function(e) {
|
|
2110
2113
|
for (var t = 1; t < arguments.length; t++) {
|
|
2111
2114
|
var n = arguments[t];
|
|
2112
2115
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2113
2116
|
}
|
|
2114
2117
|
return e;
|
|
2115
|
-
},
|
|
2118
|
+
}, ii.apply(this, arguments);
|
|
2116
2119
|
}
|
|
2117
|
-
function
|
|
2120
|
+
function ai(e, t) {
|
|
2118
2121
|
if (e == null) return {};
|
|
2119
2122
|
var n = {}, r = Object.keys(e), i, a;
|
|
2120
2123
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2121
2124
|
return n;
|
|
2122
2125
|
}
|
|
2123
|
-
function
|
|
2126
|
+
function oi(e, t) {
|
|
2124
2127
|
if (e == null) return {};
|
|
2125
|
-
var n =
|
|
2128
|
+
var n = ai(e, t), r, i;
|
|
2126
2129
|
if (Object.getOwnPropertySymbols) {
|
|
2127
2130
|
var a = Object.getOwnPropertySymbols(e);
|
|
2128
2131
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2129
2132
|
}
|
|
2130
2133
|
return n;
|
|
2131
2134
|
}
|
|
2132
|
-
var
|
|
2133
|
-
function
|
|
2135
|
+
var si = "1.15.2";
|
|
2136
|
+
function ci(e) {
|
|
2134
2137
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2135
2138
|
}
|
|
2136
|
-
var
|
|
2139
|
+
var li = ci(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ui = ci(/Edge/i), di = ci(/firefox/i), fi = ci(/safari/i) && !ci(/chrome/i) && !ci(/android/i), pi = ci(/iP(ad|od|hone)/i), mi = ci(/chrome/i) && ci(/android/i), hi = {
|
|
2137
2140
|
capture: !1,
|
|
2138
2141
|
passive: !1
|
|
2139
2142
|
};
|
|
2140
|
-
function
|
|
2141
|
-
e.addEventListener(t, n, !
|
|
2143
|
+
function F(e, t, n) {
|
|
2144
|
+
e.addEventListener(t, n, !li && hi);
|
|
2142
2145
|
}
|
|
2143
|
-
function
|
|
2144
|
-
e.removeEventListener(t, n, !
|
|
2146
|
+
function I(e, t, n) {
|
|
2147
|
+
e.removeEventListener(t, n, !li && hi);
|
|
2145
2148
|
}
|
|
2146
|
-
function
|
|
2149
|
+
function gi(e, t) {
|
|
2147
2150
|
if (t) {
|
|
2148
2151
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2149
2152
|
if (e.matches) return e.matches(t);
|
|
@@ -2155,41 +2158,41 @@ function mi(e, t) {
|
|
|
2155
2158
|
return !1;
|
|
2156
2159
|
}
|
|
2157
2160
|
}
|
|
2158
|
-
function
|
|
2161
|
+
function _i(e) {
|
|
2159
2162
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2160
2163
|
}
|
|
2161
|
-
function
|
|
2164
|
+
function vi(e, t, n, r) {
|
|
2162
2165
|
if (e) {
|
|
2163
2166
|
n ||= document;
|
|
2164
2167
|
do {
|
|
2165
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2168
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && gi(e, t) : gi(e, t)) || r && e === n) return e;
|
|
2166
2169
|
if (e === n) break;
|
|
2167
|
-
} while (e =
|
|
2170
|
+
} while (e = _i(e));
|
|
2168
2171
|
}
|
|
2169
2172
|
return null;
|
|
2170
2173
|
}
|
|
2171
|
-
var
|
|
2172
|
-
function
|
|
2173
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2174
|
+
var yi = /\s+/g;
|
|
2175
|
+
function L(e, t, n) {
|
|
2176
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(yi, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(yi, " "));
|
|
2174
2177
|
}
|
|
2175
|
-
function
|
|
2178
|
+
function R(e, t, n) {
|
|
2176
2179
|
var r = e && e.style;
|
|
2177
2180
|
if (r) {
|
|
2178
2181
|
if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
|
|
2179
2182
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2180
2183
|
}
|
|
2181
2184
|
}
|
|
2182
|
-
function
|
|
2185
|
+
function bi(e, t) {
|
|
2183
2186
|
var n = "";
|
|
2184
2187
|
if (typeof e == "string") n = e;
|
|
2185
2188
|
else do {
|
|
2186
|
-
var r =
|
|
2189
|
+
var r = R(e, "transform");
|
|
2187
2190
|
r && r !== "none" && (n = r + " " + n);
|
|
2188
2191
|
} while (!t && (e = e.parentNode));
|
|
2189
2192
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2190
2193
|
return i && new i(n);
|
|
2191
2194
|
}
|
|
2192
|
-
function
|
|
2195
|
+
function xi(e, t, n) {
|
|
2193
2196
|
if (e) {
|
|
2194
2197
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2195
2198
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2197,21 +2200,21 @@ function yi(e, t, n) {
|
|
|
2197
2200
|
}
|
|
2198
2201
|
return [];
|
|
2199
2202
|
}
|
|
2200
|
-
function
|
|
2203
|
+
function Si() {
|
|
2201
2204
|
return document.scrollingElement || document.documentElement;
|
|
2202
2205
|
}
|
|
2203
|
-
function
|
|
2206
|
+
function z(e, t, n, r, i) {
|
|
2204
2207
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2205
2208
|
var a, o, s, c, l, u, d;
|
|
2206
|
-
if (e !== window && e.parentNode && e !==
|
|
2207
|
-
if (i && i.getBoundingClientRect && (
|
|
2209
|
+
if (e !== window && e.parentNode && e !== Si() ? (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, !li)) do
|
|
2210
|
+
if (i && i.getBoundingClientRect && (R(i, "transform") !== "none" || n && R(i, "position") !== "static")) {
|
|
2208
2211
|
var f = i.getBoundingClientRect();
|
|
2209
|
-
o -= f.top + parseInt(
|
|
2212
|
+
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;
|
|
2210
2213
|
break;
|
|
2211
2214
|
}
|
|
2212
2215
|
while (i = i.parentNode);
|
|
2213
2216
|
if (r && e !== window) {
|
|
2214
|
-
var p =
|
|
2217
|
+
var p = bi(i || e), m = p && p.a, h = p && p.d;
|
|
2215
2218
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2216
2219
|
}
|
|
2217
2220
|
return {
|
|
@@ -2224,18 +2227,18 @@ function B(e, t, n, r, i) {
|
|
|
2224
2227
|
};
|
|
2225
2228
|
}
|
|
2226
2229
|
}
|
|
2227
|
-
function
|
|
2228
|
-
for (var r =
|
|
2229
|
-
var a =
|
|
2230
|
+
function Ci(e, t, n) {
|
|
2231
|
+
for (var r = Oi(e, !0), i = z(e)[t]; r;) {
|
|
2232
|
+
var a = z(r)[n], o = void 0;
|
|
2230
2233
|
if (o = i >= a, !o) return r;
|
|
2231
|
-
if (r ===
|
|
2232
|
-
r =
|
|
2234
|
+
if (r === Si()) break;
|
|
2235
|
+
r = Oi(r, !1);
|
|
2233
2236
|
}
|
|
2234
2237
|
return !1;
|
|
2235
2238
|
}
|
|
2236
|
-
function
|
|
2239
|
+
function wi(e, t, n, r) {
|
|
2237
2240
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2238
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2241
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && vi(o[a], n.draggable, e, !1)) {
|
|
2239
2242
|
if (i === t) return o[a];
|
|
2240
2243
|
i++;
|
|
2241
2244
|
}
|
|
@@ -2243,96 +2246,96 @@ function Si(e, t, n, r) {
|
|
|
2243
2246
|
}
|
|
2244
2247
|
return null;
|
|
2245
2248
|
}
|
|
2246
|
-
function
|
|
2247
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost ||
|
|
2249
|
+
function Ti(e, t) {
|
|
2250
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || R(n, "display") === "none" || t && !gi(n, t));) n = n.previousElementSibling;
|
|
2248
2251
|
return n || null;
|
|
2249
2252
|
}
|
|
2250
|
-
function
|
|
2253
|
+
function B(e, t) {
|
|
2251
2254
|
var n = 0;
|
|
2252
2255
|
if (!e || !e.parentNode) return -1;
|
|
2253
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2256
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || gi(e, t)) && n++;
|
|
2254
2257
|
return n;
|
|
2255
2258
|
}
|
|
2256
|
-
function
|
|
2257
|
-
var t = 0, n = 0, r =
|
|
2259
|
+
function Ei(e) {
|
|
2260
|
+
var t = 0, n = 0, r = Si();
|
|
2258
2261
|
if (e) do {
|
|
2259
|
-
var i =
|
|
2262
|
+
var i = bi(e), a = i.a, o = i.d;
|
|
2260
2263
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2261
2264
|
} while (e !== r && (e = e.parentNode));
|
|
2262
2265
|
return [t, n];
|
|
2263
2266
|
}
|
|
2264
|
-
function
|
|
2267
|
+
function Di(e, t) {
|
|
2265
2268
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2266
2269
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2267
2270
|
}
|
|
2268
2271
|
return -1;
|
|
2269
2272
|
}
|
|
2270
|
-
function
|
|
2271
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2273
|
+
function Oi(e, t) {
|
|
2274
|
+
if (!e || !e.getBoundingClientRect) return Si();
|
|
2272
2275
|
var n = e, r = !1;
|
|
2273
2276
|
do
|
|
2274
2277
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2275
|
-
var i =
|
|
2278
|
+
var i = R(n);
|
|
2276
2279
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2277
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2280
|
+
if (!n.getBoundingClientRect || n === document.body) return Si();
|
|
2278
2281
|
if (r || t) return n;
|
|
2279
2282
|
r = !0;
|
|
2280
2283
|
}
|
|
2281
2284
|
}
|
|
2282
2285
|
while (n = n.parentNode);
|
|
2283
|
-
return
|
|
2286
|
+
return Si();
|
|
2284
2287
|
}
|
|
2285
|
-
function
|
|
2288
|
+
function ki(e, t) {
|
|
2286
2289
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2287
2290
|
return e;
|
|
2288
2291
|
}
|
|
2289
|
-
function
|
|
2292
|
+
function Ai(e, t) {
|
|
2290
2293
|
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);
|
|
2291
2294
|
}
|
|
2292
|
-
var
|
|
2293
|
-
function
|
|
2295
|
+
var ji;
|
|
2296
|
+
function Mi(e, t) {
|
|
2294
2297
|
return function() {
|
|
2295
|
-
if (!
|
|
2298
|
+
if (!ji) {
|
|
2296
2299
|
var n = arguments, r = this;
|
|
2297
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2298
|
-
|
|
2300
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), ji = setTimeout(function() {
|
|
2301
|
+
ji = void 0;
|
|
2299
2302
|
}, t);
|
|
2300
2303
|
}
|
|
2301
2304
|
};
|
|
2302
2305
|
}
|
|
2303
|
-
function
|
|
2304
|
-
clearTimeout(
|
|
2306
|
+
function Ni() {
|
|
2307
|
+
clearTimeout(ji), ji = void 0;
|
|
2305
2308
|
}
|
|
2306
|
-
function
|
|
2309
|
+
function Pi(e, t, n) {
|
|
2307
2310
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2308
2311
|
}
|
|
2309
|
-
function
|
|
2312
|
+
function Fi(e) {
|
|
2310
2313
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2311
2314
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2312
2315
|
}
|
|
2313
|
-
function
|
|
2316
|
+
function Ii(e, t, n) {
|
|
2314
2317
|
var r = {};
|
|
2315
2318
|
return Array.from(e.children).forEach(function(i) {
|
|
2316
|
-
if (!(!
|
|
2317
|
-
var a =
|
|
2319
|
+
if (!(!vi(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
2320
|
+
var a = z(i);
|
|
2318
2321
|
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);
|
|
2319
2322
|
}
|
|
2320
2323
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2321
2324
|
}
|
|
2322
2325
|
var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2323
|
-
function
|
|
2326
|
+
function Li() {
|
|
2324
2327
|
var e = [], t;
|
|
2325
2328
|
return {
|
|
2326
2329
|
captureAnimationState: function() {
|
|
2327
2330
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
2328
|
-
if (!(
|
|
2331
|
+
if (!(R(t, "display") === "none" || t === Q.ghost)) {
|
|
2329
2332
|
e.push({
|
|
2330
2333
|
target: t,
|
|
2331
|
-
rect:
|
|
2334
|
+
rect: z(t)
|
|
2332
2335
|
});
|
|
2333
|
-
var n =
|
|
2336
|
+
var n = ti({}, e[e.length - 1].rect);
|
|
2334
2337
|
if (t.thisAnimationDuration) {
|
|
2335
|
-
var r =
|
|
2338
|
+
var r = bi(t, !0);
|
|
2336
2339
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2337
2340
|
}
|
|
2338
2341
|
t.fromRect = n;
|
|
@@ -2343,7 +2346,7 @@ function Ii() {
|
|
|
2343
2346
|
e.push(t);
|
|
2344
2347
|
},
|
|
2345
2348
|
removeAnimationState: function(t) {
|
|
2346
|
-
e.splice(
|
|
2349
|
+
e.splice(Di(e, { target: t }), 1);
|
|
2347
2350
|
},
|
|
2348
2351
|
animateAll: function(n) {
|
|
2349
2352
|
var r = this;
|
|
@@ -2353,8 +2356,8 @@ function Ii() {
|
|
|
2353
2356
|
}
|
|
2354
2357
|
var i = !1, a = 0;
|
|
2355
2358
|
e.forEach(function(e) {
|
|
2356
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
2357
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2359
|
+
var t = 0, n = e.target, o = n.fromRect, s = z(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = bi(n, !0);
|
|
2360
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Ai(c, s) && !Ai(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = zi(u, c, l, r.options)), Ai(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() {
|
|
2358
2361
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2359
2362
|
}, t), n.thisAnimationDuration = t);
|
|
2360
2363
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2363,27 +2366,27 @@ function Ii() {
|
|
|
2363
2366
|
},
|
|
2364
2367
|
animate: function(e, t, n, r) {
|
|
2365
2368
|
if (r) {
|
|
2366
|
-
|
|
2367
|
-
var i =
|
|
2368
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
2369
|
-
|
|
2369
|
+
R(e, "transition", ""), R(e, "transform", "");
|
|
2370
|
+
var i = bi(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2371
|
+
e.animatingX = !!s, e.animatingY = !!c, R(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Ri(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() {
|
|
2372
|
+
R(e, "transition", ""), R(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2370
2373
|
}, r);
|
|
2371
2374
|
}
|
|
2372
2375
|
}
|
|
2373
2376
|
};
|
|
2374
2377
|
}
|
|
2375
|
-
function
|
|
2378
|
+
function Ri(e) {
|
|
2376
2379
|
return e.offsetWidth;
|
|
2377
2380
|
}
|
|
2378
|
-
function
|
|
2381
|
+
function zi(e, t, n, r) {
|
|
2379
2382
|
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;
|
|
2380
2383
|
}
|
|
2381
|
-
var
|
|
2384
|
+
var Bi = [], Vi = { initializeByDefault: !0 }, Hi = {
|
|
2382
2385
|
mount: function(e) {
|
|
2383
|
-
for (var t in
|
|
2384
|
-
|
|
2386
|
+
for (var t in Vi) Vi.hasOwnProperty(t) && !(t in e) && (e[t] = Vi[t]);
|
|
2387
|
+
Bi.forEach(function(t) {
|
|
2385
2388
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2386
|
-
}),
|
|
2389
|
+
}), Bi.push(e);
|
|
2387
2390
|
},
|
|
2388
2391
|
pluginEvent: function(e, t, n) {
|
|
2389
2392
|
var r = this;
|
|
@@ -2391,16 +2394,16 @@ var zi = [], Bi = { initializeByDefault: !0 }, Vi = {
|
|
|
2391
2394
|
r.eventCanceled = !0;
|
|
2392
2395
|
};
|
|
2393
2396
|
var i = e + "Global";
|
|
2394
|
-
|
|
2395
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2397
|
+
Bi.forEach(function(r) {
|
|
2398
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](ti({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](ti({ sortable: t }, n)));
|
|
2396
2399
|
});
|
|
2397
2400
|
},
|
|
2398
2401
|
initializePlugins: function(e, t, n, r) {
|
|
2399
|
-
for (var i in
|
|
2402
|
+
for (var i in Bi.forEach(function(r) {
|
|
2400
2403
|
var i = r.pluginName;
|
|
2401
2404
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2402
2405
|
var a = new r(e, t, e.options);
|
|
2403
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2406
|
+
a.sortable = e, a.options = e.options, e[i] = a, ii(n, a.defaults);
|
|
2404
2407
|
}
|
|
2405
2408
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2406
2409
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2409,56 +2412,56 @@ var zi = [], Bi = { initializeByDefault: !0 }, Vi = {
|
|
|
2409
2412
|
},
|
|
2410
2413
|
getEventProperties: function(e, t) {
|
|
2411
2414
|
var n = {};
|
|
2412
|
-
return
|
|
2413
|
-
typeof r.eventProperties == "function" &&
|
|
2415
|
+
return Bi.forEach(function(r) {
|
|
2416
|
+
typeof r.eventProperties == "function" && ii(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2414
2417
|
}), n;
|
|
2415
2418
|
},
|
|
2416
2419
|
modifyOption: function(e, t, n) {
|
|
2417
2420
|
var r;
|
|
2418
|
-
return
|
|
2421
|
+
return Bi.forEach(function(i) {
|
|
2419
2422
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2420
2423
|
}), r;
|
|
2421
2424
|
}
|
|
2422
2425
|
};
|
|
2423
|
-
function
|
|
2426
|
+
function Ui(e) {
|
|
2424
2427
|
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;
|
|
2425
2428
|
if (t ||= n && n[V], t) {
|
|
2426
2429
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2427
|
-
window.CustomEvent && !
|
|
2430
|
+
window.CustomEvent && !li && !ui ? h = new CustomEvent(r, {
|
|
2428
2431
|
bubbles: !0,
|
|
2429
2432
|
cancelable: !0
|
|
2430
2433
|
}) : (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;
|
|
2431
|
-
var v =
|
|
2434
|
+
var v = ti(ti({}, m), Hi.getEventProperties(r, t));
|
|
2432
2435
|
for (var y in v) h[y] = v[y];
|
|
2433
2436
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2434
2437
|
}
|
|
2435
2438
|
}
|
|
2436
|
-
var
|
|
2437
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2438
|
-
|
|
2439
|
+
var Wi = ["evt"], H = function(e, t) {
|
|
2440
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = oi(n, Wi);
|
|
2441
|
+
Hi.pluginEvent.bind(Q)(e, t, ti({
|
|
2439
2442
|
dragEl: W,
|
|
2440
2443
|
parentEl: G,
|
|
2441
2444
|
ghostEl: K,
|
|
2442
2445
|
rootEl: q,
|
|
2443
|
-
nextEl:
|
|
2444
|
-
lastDownEl:
|
|
2446
|
+
nextEl: Gi,
|
|
2447
|
+
lastDownEl: Ki,
|
|
2445
2448
|
cloneEl: J,
|
|
2446
|
-
cloneHidden:
|
|
2447
|
-
dragStarted:
|
|
2449
|
+
cloneHidden: qi,
|
|
2450
|
+
dragStarted: sa,
|
|
2448
2451
|
putSortable: X,
|
|
2449
2452
|
activeSortable: Q.active,
|
|
2450
2453
|
originalEvent: r,
|
|
2451
|
-
oldIndex:
|
|
2452
|
-
oldDraggableIndex:
|
|
2454
|
+
oldIndex: Ji,
|
|
2455
|
+
oldDraggableIndex: Yi,
|
|
2453
2456
|
newIndex: Y,
|
|
2454
|
-
newDraggableIndex:
|
|
2455
|
-
hideGhostForTarget:
|
|
2456
|
-
unhideGhostForTarget:
|
|
2457
|
+
newDraggableIndex: Xi,
|
|
2458
|
+
hideGhostForTarget: Ta,
|
|
2459
|
+
unhideGhostForTarget: Ea,
|
|
2457
2460
|
cloneNowHidden: function() {
|
|
2458
|
-
|
|
2461
|
+
qi = !0;
|
|
2459
2462
|
},
|
|
2460
2463
|
cloneNowShown: function() {
|
|
2461
|
-
|
|
2464
|
+
qi = !1;
|
|
2462
2465
|
},
|
|
2463
2466
|
dispatchSortableEvent: function(e) {
|
|
2464
2467
|
U({
|
|
@@ -2470,45 +2473,45 @@ var Ui = ["evt"], H = function(e, t) {
|
|
|
2470
2473
|
}, i));
|
|
2471
2474
|
};
|
|
2472
2475
|
function U(e) {
|
|
2473
|
-
|
|
2476
|
+
Ui(ti({
|
|
2474
2477
|
putSortable: X,
|
|
2475
2478
|
cloneEl: J,
|
|
2476
2479
|
targetEl: W,
|
|
2477
2480
|
rootEl: q,
|
|
2478
|
-
oldIndex:
|
|
2479
|
-
oldDraggableIndex:
|
|
2481
|
+
oldIndex: Ji,
|
|
2482
|
+
oldDraggableIndex: Yi,
|
|
2480
2483
|
newIndex: Y,
|
|
2481
|
-
newDraggableIndex:
|
|
2484
|
+
newDraggableIndex: Xi
|
|
2482
2485
|
}, e));
|
|
2483
2486
|
}
|
|
2484
|
-
var W, G, K, q,
|
|
2485
|
-
if (
|
|
2486
|
-
if (
|
|
2487
|
+
var W, G, K, q, Gi, Ki, J, qi, Ji, Y, Yi, Xi, Zi, X, Qi = !1, $i = !1, ea = [], ta, na, ra, ia, aa, oa, sa, ca, la, ua = !1, da = !1, fa, Z, pa = [], ma = !1, ha = [], ga = typeof document < "u", _a = pi, va = ui || li ? "cssFloat" : "float", ya = ga && !mi && !pi && "draggable" in document.createElement("div"), ba = function() {
|
|
2488
|
+
if (ga) {
|
|
2489
|
+
if (li) return !1;
|
|
2487
2490
|
var e = document.createElement("x");
|
|
2488
2491
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2489
2492
|
}
|
|
2490
|
-
}(),
|
|
2491
|
-
var n =
|
|
2493
|
+
}(), xa = function(e, t) {
|
|
2494
|
+
var n = R(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = wi(e, 0, t), a = wi(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;
|
|
2492
2495
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2493
2496
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2494
2497
|
if (i && o.float && o.float !== "none") {
|
|
2495
2498
|
var u = o.float === "left" ? "left" : "right";
|
|
2496
2499
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2497
2500
|
}
|
|
2498
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2499
|
-
},
|
|
2501
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[va] === "none" || a && n[va] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2502
|
+
}, Sa = function(e, t, n) {
|
|
2500
2503
|
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;
|
|
2501
2504
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2502
|
-
},
|
|
2505
|
+
}, Ca = function(e, t) {
|
|
2503
2506
|
var n;
|
|
2504
|
-
return
|
|
2507
|
+
return ea.some(function(r) {
|
|
2505
2508
|
var i = r[V].options.emptyInsertThreshold;
|
|
2506
|
-
if (!(!i ||
|
|
2507
|
-
var a =
|
|
2509
|
+
if (!(!i || Ti(r))) {
|
|
2510
|
+
var a = z(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2508
2511
|
if (o && s) return n = r;
|
|
2509
2512
|
}
|
|
2510
2513
|
}), n;
|
|
2511
|
-
},
|
|
2514
|
+
}, wa = function(e) {
|
|
2512
2515
|
function t(e, n) {
|
|
2513
2516
|
return function(r, i, a, o) {
|
|
2514
2517
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2521,31 +2524,31 @@ var W, G, K, q, Wi, Gi, J, Ki, qi, Y, Ji, Yi, Xi, X, Zi = !1, Qi = !1, $i = [],
|
|
|
2521
2524
|
};
|
|
2522
2525
|
}
|
|
2523
2526
|
var n = {}, r = e.group;
|
|
2524
|
-
(!r ||
|
|
2525
|
-
}, wa = function() {
|
|
2526
|
-
!ya && K && z(K, "display", "none");
|
|
2527
|
+
(!r || ni(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;
|
|
2527
2528
|
}, Ta = function() {
|
|
2528
|
-
!
|
|
2529
|
+
!ba && K && R(K, "display", "none");
|
|
2530
|
+
}, Ea = function() {
|
|
2531
|
+
!ba && K && R(K, "display", "");
|
|
2529
2532
|
};
|
|
2530
|
-
|
|
2531
|
-
if (
|
|
2533
|
+
ga && !mi && document.addEventListener("click", function(e) {
|
|
2534
|
+
if ($i) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), $i = !1, !1;
|
|
2532
2535
|
}, !0);
|
|
2533
|
-
var
|
|
2536
|
+
var Da = function(e) {
|
|
2534
2537
|
if (W) {
|
|
2535
2538
|
e = e.touches ? e.touches[0] : e;
|
|
2536
|
-
var t =
|
|
2539
|
+
var t = Ca(e.clientX, e.clientY);
|
|
2537
2540
|
if (t) {
|
|
2538
2541
|
var n = {};
|
|
2539
2542
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2540
2543
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
|
|
2541
2544
|
}
|
|
2542
2545
|
}
|
|
2543
|
-
},
|
|
2546
|
+
}, Oa = function(e) {
|
|
2544
2547
|
W && W.parentNode[V]._isOutsideThisEl(e.target);
|
|
2545
2548
|
};
|
|
2546
2549
|
function Q(e, t) {
|
|
2547
2550
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2548
|
-
this.el = e, this.options = t =
|
|
2551
|
+
this.el = e, this.options = t = ii({}, t), e[V] = this;
|
|
2549
2552
|
var n = {
|
|
2550
2553
|
group: null,
|
|
2551
2554
|
sort: !0,
|
|
@@ -2558,7 +2561,7 @@ function Q(e, t) {
|
|
|
2558
2561
|
invertedSwapThreshold: null,
|
|
2559
2562
|
removeCloneOnHide: !0,
|
|
2560
2563
|
direction: function() {
|
|
2561
|
-
return
|
|
2564
|
+
return xa(e, this.options);
|
|
2562
2565
|
},
|
|
2563
2566
|
ghostClass: "sortable-ghost",
|
|
2564
2567
|
chosenClass: "sortable-chosen",
|
|
@@ -2585,17 +2588,17 @@ function Q(e, t) {
|
|
|
2585
2588
|
x: 0,
|
|
2586
2589
|
y: 0
|
|
2587
2590
|
},
|
|
2588
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2591
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !fi,
|
|
2589
2592
|
emptyInsertThreshold: 5
|
|
2590
2593
|
};
|
|
2591
|
-
for (var r in
|
|
2592
|
-
for (var i in
|
|
2593
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
2594
|
+
for (var r in Hi.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2595
|
+
for (var i in wa(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2596
|
+
this.nativeDraggable = t.forceFallback ? !1 : ya, 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)), ea.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), ii(this, Li());
|
|
2594
2597
|
}
|
|
2595
2598
|
Q.prototype = {
|
|
2596
2599
|
constructor: Q,
|
|
2597
2600
|
_isOutsideThisEl: function(e) {
|
|
2598
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2601
|
+
!this.el.contains(e) && e !== this.el && (ca = null);
|
|
2599
2602
|
},
|
|
2600
2603
|
_getDirection: function(e, t) {
|
|
2601
2604
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
|
|
@@ -2603,8 +2606,8 @@ Q.prototype = {
|
|
|
2603
2606
|
_onTapStart: function(e) {
|
|
2604
2607
|
if (e.cancelable) {
|
|
2605
2608
|
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;
|
|
2606
|
-
if (
|
|
2607
|
-
if (
|
|
2609
|
+
if (Ra(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && fi && s && s.tagName.toUpperCase() === "SELECT") && (s = vi(s, r.draggable, n, !1), !(s && s.animated) && Ki !== s)) {
|
|
2610
|
+
if (Ji = B(s), Yi = B(s, r.draggable), typeof l == "function") {
|
|
2608
2611
|
if (l.call(this, e, s, this)) {
|
|
2609
2612
|
U({
|
|
2610
2613
|
sortable: t,
|
|
@@ -2617,7 +2620,7 @@ Q.prototype = {
|
|
|
2617
2620
|
return;
|
|
2618
2621
|
}
|
|
2619
2622
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2620
|
-
if (r =
|
|
2623
|
+
if (r = vi(c, r.trim(), n, !1), r) return U({
|
|
2621
2624
|
sortable: t,
|
|
2622
2625
|
rootEl: r,
|
|
2623
2626
|
name: "filter",
|
|
@@ -2629,36 +2632,36 @@ Q.prototype = {
|
|
|
2629
2632
|
i && e.cancelable && e.preventDefault();
|
|
2630
2633
|
return;
|
|
2631
2634
|
}
|
|
2632
|
-
r.handle && !
|
|
2635
|
+
r.handle && !vi(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2633
2636
|
}
|
|
2634
2637
|
}
|
|
2635
2638
|
},
|
|
2636
2639
|
_prepareDragStart: function(e, t, n) {
|
|
2637
2640
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2638
2641
|
if (n && !W && n.parentNode === i) {
|
|
2639
|
-
var c =
|
|
2640
|
-
if (q = i, W = n, G = W.parentNode,
|
|
2642
|
+
var c = z(n);
|
|
2643
|
+
if (q = i, W = n, G = W.parentNode, Gi = W.nextSibling, Ki = n, Zi = a.group, Q.dragged = W, ta = {
|
|
2641
2644
|
target: W,
|
|
2642
2645
|
clientX: (t || e).clientX,
|
|
2643
2646
|
clientY: (t || e).clientY
|
|
2644
|
-
},
|
|
2647
|
+
}, aa = ta.clientX - c.left, oa = ta.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
|
|
2645
2648
|
if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
2646
2649
|
r._onDrop();
|
|
2647
2650
|
return;
|
|
2648
2651
|
}
|
|
2649
|
-
r._disableDelayedDragEvents(), !
|
|
2652
|
+
r._disableDelayedDragEvents(), !di && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
2650
2653
|
sortable: r,
|
|
2651
2654
|
name: "choose",
|
|
2652
2655
|
originalEvent: e
|
|
2653
|
-
}),
|
|
2656
|
+
}), L(W, a.chosenClass, !0);
|
|
2654
2657
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2655
|
-
|
|
2656
|
-
}),
|
|
2658
|
+
xi(W, e.trim(), ja);
|
|
2659
|
+
}), F(o, "dragover", Da), F(o, "mousemove", Da), F(o, "touchmove", Da), F(o, "mouseup", r._onDrop), F(o, "touchend", r._onDrop), F(o, "touchcancel", r._onDrop), di && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(ui || li))) {
|
|
2657
2660
|
if (Q.eventCanceled) {
|
|
2658
2661
|
this._onDrop();
|
|
2659
2662
|
return;
|
|
2660
2663
|
}
|
|
2661
|
-
|
|
2664
|
+
F(o, "mouseup", r._disableDelayedDrag), F(o, "touchend", r._disableDelayedDrag), F(o, "touchcancel", r._disableDelayedDrag), F(o, "mousemove", r._delayedDragTouchMoveHandler), F(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && F(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
2662
2665
|
} else s();
|
|
2663
2666
|
}
|
|
2664
2667
|
},
|
|
@@ -2667,25 +2670,25 @@ Q.prototype = {
|
|
|
2667
2670
|
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();
|
|
2668
2671
|
},
|
|
2669
2672
|
_disableDelayedDrag: function() {
|
|
2670
|
-
W &&
|
|
2673
|
+
W && ja(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2671
2674
|
},
|
|
2672
2675
|
_disableDelayedDragEvents: function() {
|
|
2673
2676
|
var e = this.el.ownerDocument;
|
|
2674
|
-
|
|
2677
|
+
I(e, "mouseup", this._disableDelayedDrag), I(e, "touchend", this._disableDelayedDrag), I(e, "touchcancel", this._disableDelayedDrag), I(e, "mousemove", this._delayedDragTouchMoveHandler), I(e, "touchmove", this._delayedDragTouchMoveHandler), I(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
2675
2678
|
},
|
|
2676
2679
|
_triggerDragStart: function(e, t) {
|
|
2677
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
2680
|
+
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));
|
|
2678
2681
|
try {
|
|
2679
|
-
document.selection ?
|
|
2682
|
+
document.selection ? za(function() {
|
|
2680
2683
|
document.selection.empty();
|
|
2681
2684
|
}) : window.getSelection().removeAllRanges();
|
|
2682
2685
|
} catch {}
|
|
2683
2686
|
},
|
|
2684
2687
|
_dragStarted: function(e, t) {
|
|
2685
|
-
if (
|
|
2686
|
-
H("dragStarted", this, { evt: t }), this.nativeDraggable &&
|
|
2688
|
+
if (Qi = !1, q && W) {
|
|
2689
|
+
H("dragStarted", this, { evt: t }), this.nativeDraggable && F(document, "dragover", Oa);
|
|
2687
2690
|
var n = this.options;
|
|
2688
|
-
!e &&
|
|
2691
|
+
!e && L(W, n.dragClass, !1), L(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
2689
2692
|
sortable: this,
|
|
2690
2693
|
name: "start",
|
|
2691
2694
|
originalEvent: t
|
|
@@ -2693,33 +2696,33 @@ Q.prototype = {
|
|
|
2693
2696
|
} else this._nulling();
|
|
2694
2697
|
},
|
|
2695
2698
|
_emulateDragOver: function() {
|
|
2696
|
-
if (
|
|
2697
|
-
this._lastX =
|
|
2698
|
-
for (var e = document.elementFromPoint(
|
|
2699
|
+
if (na) {
|
|
2700
|
+
this._lastX = na.clientX, this._lastY = na.clientY, Ta();
|
|
2701
|
+
for (var e = document.elementFromPoint(na.clientX, na.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(na.clientX, na.clientY), e !== t);) t = e;
|
|
2699
2702
|
if (W.parentNode[V]._isOutsideThisEl(e), t) do {
|
|
2700
2703
|
if (t[V]) {
|
|
2701
2704
|
var n = void 0;
|
|
2702
2705
|
if (n = t[V]._onDragOver({
|
|
2703
|
-
clientX:
|
|
2704
|
-
clientY:
|
|
2706
|
+
clientX: na.clientX,
|
|
2707
|
+
clientY: na.clientY,
|
|
2705
2708
|
target: e,
|
|
2706
2709
|
rootEl: t
|
|
2707
2710
|
}), n && !this.options.dragoverBubble) break;
|
|
2708
2711
|
}
|
|
2709
2712
|
e = t;
|
|
2710
2713
|
} while (t = t.parentNode);
|
|
2711
|
-
|
|
2714
|
+
Ea();
|
|
2712
2715
|
}
|
|
2713
2716
|
},
|
|
2714
2717
|
_onTouchMove: function(e) {
|
|
2715
|
-
if (
|
|
2716
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K &&
|
|
2717
|
-
if (!Q.active && !
|
|
2718
|
+
if (ta) {
|
|
2719
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && bi(K, !0), o = K && a && a.a, s = K && a && a.d, c = _a && Z && Ei(Z), l = (i.clientX - ta.clientX + r.x) / (o || 1) + (c ? c[0] - pa[0] : 0) / (o || 1), u = (i.clientY - ta.clientY + r.y) / (s || 1) + (c ? c[1] - pa[1] : 0) / (s || 1);
|
|
2720
|
+
if (!Q.active && !Qi) {
|
|
2718
2721
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2719
2722
|
this._onDragStart(e, !0);
|
|
2720
2723
|
}
|
|
2721
2724
|
if (K) {
|
|
2722
|
-
a ? (a.e += l - (
|
|
2725
|
+
a ? (a.e += l - (ra || 0), a.f += u - (ia || 0)) : a = {
|
|
2723
2726
|
a: 1,
|
|
2724
2727
|
b: 0,
|
|
2725
2728
|
c: 0,
|
|
@@ -2728,19 +2731,19 @@ Q.prototype = {
|
|
|
2728
2731
|
f: u
|
|
2729
2732
|
};
|
|
2730
2733
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2731
|
-
|
|
2734
|
+
R(K, "webkitTransform", d), R(K, "mozTransform", d), R(K, "msTransform", d), R(K, "transform", d), ra = l, ia = u, na = i;
|
|
2732
2735
|
}
|
|
2733
2736
|
e.cancelable && e.preventDefault();
|
|
2734
2737
|
}
|
|
2735
2738
|
},
|
|
2736
2739
|
_appendGhost: function() {
|
|
2737
2740
|
if (!K) {
|
|
2738
|
-
var e = this.options.fallbackOnBody ? document.body : q, t =
|
|
2739
|
-
if (
|
|
2740
|
-
for (Z = e;
|
|
2741
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
2741
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = z(W, !0, _a, !0, e), n = this.options;
|
|
2742
|
+
if (_a) {
|
|
2743
|
+
for (Z = e; R(Z, "position") === "static" && R(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
2744
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Si()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Si(), pa = Ei(Z);
|
|
2742
2745
|
}
|
|
2743
|
-
K = W.cloneNode(!0),
|
|
2746
|
+
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", _a ? "absolute" : "fixed"), R(K, "zIndex", "100000"), R(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), R(K, "transform-origin", aa / parseInt(K.style.width) * 100 + "% " + oa / parseInt(K.style.height) * 100 + "%");
|
|
2744
2747
|
}
|
|
2745
2748
|
},
|
|
2746
2749
|
_onDragStart: function(e, t) {
|
|
@@ -2749,18 +2752,18 @@ Q.prototype = {
|
|
|
2749
2752
|
this._onDrop();
|
|
2750
2753
|
return;
|
|
2751
2754
|
}
|
|
2752
|
-
H("setupClone", this), Q.eventCanceled || (J =
|
|
2755
|
+
H("setupClone", this), Q.eventCanceled || (J = Fi(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), L(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = za(function() {
|
|
2753
2756
|
H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
2754
2757
|
sortable: n,
|
|
2755
2758
|
name: "clone"
|
|
2756
2759
|
}));
|
|
2757
|
-
}), !t &&
|
|
2760
|
+
}), !t && L(W, i.dragClass, !0), t ? ($i = !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)")), Qi = !0, n._dragStartId = za(n._dragStarted.bind(n, t, e)), F(document, "selectstart", n), sa = !0, fi && R(document.body, "user-select", "none");
|
|
2758
2761
|
},
|
|
2759
2762
|
_onDragOver: function(e) {
|
|
2760
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
2761
|
-
if (
|
|
2763
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Zi === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
2764
|
+
if (ma) return;
|
|
2762
2765
|
function h(o, s) {
|
|
2763
|
-
H(o, p,
|
|
2766
|
+
H(o, p, ti({
|
|
2764
2767
|
evt: e,
|
|
2765
2768
|
isOwner: l,
|
|
2766
2769
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2772,7 +2775,7 @@ Q.prototype = {
|
|
|
2772
2775
|
target: n,
|
|
2773
2776
|
completed: _,
|
|
2774
2777
|
onMove: function(n, i) {
|
|
2775
|
-
return
|
|
2778
|
+
return Aa(q, t, W, r, n, z(n), e, i);
|
|
2776
2779
|
},
|
|
2777
2780
|
changed: v
|
|
2778
2781
|
}, s));
|
|
@@ -2781,50 +2784,50 @@ Q.prototype = {
|
|
|
2781
2784
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
2782
2785
|
}
|
|
2783
2786
|
function _(r) {
|
|
2784
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
2787
|
+
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() {
|
|
2785
2788
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2786
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (
|
|
2789
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (ca = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && Da(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2787
2790
|
}
|
|
2788
2791
|
function v() {
|
|
2789
|
-
Y =
|
|
2792
|
+
Y = B(W), Xi = B(W, o.draggable), U({
|
|
2790
2793
|
sortable: p,
|
|
2791
2794
|
name: "change",
|
|
2792
2795
|
toEl: t,
|
|
2793
2796
|
newIndex: Y,
|
|
2794
|
-
newDraggableIndex:
|
|
2797
|
+
newDraggableIndex: Xi,
|
|
2795
2798
|
originalEvent: e
|
|
2796
2799
|
});
|
|
2797
2800
|
}
|
|
2798
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
2801
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = vi(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
2799
2802
|
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
2800
|
-
if (
|
|
2801
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
2802
|
-
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
2803
|
-
var y =
|
|
2804
|
-
if (!y ||
|
|
2803
|
+
if ($i = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = Zi.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
|
|
2804
|
+
if (f = this._getDirection(e, n) === "vertical", r = z(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
2805
|
+
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Gi ? q.insertBefore(W, Gi) : q.appendChild(W)), _(!0);
|
|
2806
|
+
var y = Ti(t, o.draggable);
|
|
2807
|
+
if (!y || Pa(e, f, this) && !y.animated) {
|
|
2805
2808
|
if (y === W) return _(!1);
|
|
2806
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
2807
|
-
} else if (y &&
|
|
2808
|
-
var b =
|
|
2809
|
+
if (y && t === e.target && (n = y), n && (i = z(n)), Aa(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);
|
|
2810
|
+
} else if (y && Na(e, f, this)) {
|
|
2811
|
+
var b = wi(t, 0, o, !0);
|
|
2809
2812
|
if (b === W) return _(!1);
|
|
2810
|
-
if (n = b, i =
|
|
2813
|
+
if (n = b, i = z(n), Aa(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
|
|
2811
2814
|
} else if (n.parentNode === t) {
|
|
2812
|
-
i =
|
|
2813
|
-
var x = 0, S, C = W.parentNode !== t, w = !
|
|
2814
|
-
|
|
2815
|
+
i = z(n);
|
|
2816
|
+
var x = 0, S, C = W.parentNode !== t, w = !Sa(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Ci(n, "top", "top") || Ci(W, "top", "top"), ee = E ? E.scrollTop : void 0;
|
|
2817
|
+
ca !== n && (S = i[T], ua = !1, da = !w && o.invertSwap || C), x = Fa(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, da, ca === n);
|
|
2815
2818
|
var D;
|
|
2816
2819
|
if (x !== 0) {
|
|
2817
|
-
var O =
|
|
2820
|
+
var O = B(W);
|
|
2818
2821
|
do
|
|
2819
2822
|
O -= x, D = G.children[O];
|
|
2820
|
-
while (D && (
|
|
2823
|
+
while (D && (R(D, "display") === "none" || D === K));
|
|
2821
2824
|
}
|
|
2822
2825
|
if (x === 0 || D === n) return _(!1);
|
|
2823
|
-
|
|
2826
|
+
ca = n, la = x;
|
|
2824
2827
|
var k = n.nextElementSibling, te = !1;
|
|
2825
2828
|
te = x === 1;
|
|
2826
|
-
var A =
|
|
2827
|
-
if (A !== !1) return (A === 1 || A === -1) && (te = A === 1),
|
|
2829
|
+
var A = Aa(q, t, W, r, n, i, e, te);
|
|
2830
|
+
if (A !== !1) return (A === 1 || A === -1) && (te = A === 1), ma = !0, setTimeout(Ma, 30), g(), te && !k ? t.appendChild(W) : n.parentNode.insertBefore(W, te ? k : n), E && Pi(E, 0, ee - E.scrollTop), G = W.parentNode, S !== void 0 && !da && (fa = Math.abs(S - z(n)[T])), v(), _(!0);
|
|
2828
2831
|
}
|
|
2829
2832
|
if (t.contains(W)) return _(!1);
|
|
2830
2833
|
}
|
|
@@ -2832,26 +2835,26 @@ Q.prototype = {
|
|
|
2832
2835
|
},
|
|
2833
2836
|
_ignoreWhileAnimating: null,
|
|
2834
2837
|
_offMoveEvents: function() {
|
|
2835
|
-
|
|
2838
|
+
I(document, "mousemove", this._onTouchMove), I(document, "touchmove", this._onTouchMove), I(document, "pointermove", this._onTouchMove), I(document, "dragover", Da), I(document, "mousemove", Da), I(document, "touchmove", Da);
|
|
2836
2839
|
},
|
|
2837
2840
|
_offUpEvents: function() {
|
|
2838
2841
|
var e = this.el.ownerDocument;
|
|
2839
|
-
|
|
2842
|
+
I(e, "mouseup", this._onDrop), I(e, "touchend", this._onDrop), I(e, "pointerup", this._onDrop), I(e, "touchcancel", this._onDrop), I(document, "selectstart", this);
|
|
2840
2843
|
},
|
|
2841
2844
|
_onDrop: function(e) {
|
|
2842
2845
|
var t = this.el, n = this.options;
|
|
2843
|
-
if (Y =
|
|
2846
|
+
if (Y = B(W), Xi = B(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = B(W), Xi = B(W, n.draggable), Q.eventCanceled) {
|
|
2844
2847
|
this._nulling();
|
|
2845
2848
|
return;
|
|
2846
2849
|
}
|
|
2847
|
-
|
|
2850
|
+
Qi = !1, da = !1, ua = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ba(this.cloneId), Ba(this._dragStartId), this.nativeDraggable && (I(document, "drop", this), I(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), fi && R(document.body, "user-select", ""), R(W, "transform", ""), e && (sa && (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), ja(W), W.style["will-change"] = "", sa && !Qi && L(W, X ? X.options.ghostClass : this.options.ghostClass, !1), L(W, this.options.chosenClass, !1), U({
|
|
2848
2851
|
sortable: this,
|
|
2849
2852
|
name: "unchoose",
|
|
2850
2853
|
toEl: G,
|
|
2851
2854
|
newIndex: null,
|
|
2852
2855
|
newDraggableIndex: null,
|
|
2853
2856
|
originalEvent: e
|
|
2854
|
-
}), q === G ? Y !==
|
|
2857
|
+
}), q === G ? Y !== Ji && Y >= 0 && (U({
|
|
2855
2858
|
sortable: this,
|
|
2856
2859
|
name: "update",
|
|
2857
2860
|
toEl: G,
|
|
@@ -2883,7 +2886,7 @@ Q.prototype = {
|
|
|
2883
2886
|
name: "sort",
|
|
2884
2887
|
toEl: G,
|
|
2885
2888
|
originalEvent: e
|
|
2886
|
-
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y =
|
|
2889
|
+
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = Ji, Xi = Yi), U({
|
|
2887
2890
|
sortable: this,
|
|
2888
2891
|
name: "end",
|
|
2889
2892
|
toEl: G,
|
|
@@ -2891,9 +2894,9 @@ Q.prototype = {
|
|
|
2891
2894
|
}), this.save()))), this._nulling();
|
|
2892
2895
|
},
|
|
2893
2896
|
_nulling: function() {
|
|
2894
|
-
H("nulling", this), q = W = G = K =
|
|
2897
|
+
H("nulling", this), q = W = G = K = Gi = J = Ki = qi = ta = na = sa = Y = Xi = Ji = Yi = ca = la = X = Zi = Q.dragged = Q.ghost = Q.clone = Q.active = null, ha.forEach(function(e) {
|
|
2895
2898
|
e.checked = !0;
|
|
2896
|
-
}),
|
|
2899
|
+
}), ha.length = ra = ia = 0;
|
|
2897
2900
|
},
|
|
2898
2901
|
handleEvent: function(e) {
|
|
2899
2902
|
switch (e.type) {
|
|
@@ -2903,7 +2906,7 @@ Q.prototype = {
|
|
|
2903
2906
|
break;
|
|
2904
2907
|
case "dragenter":
|
|
2905
2908
|
case "dragover":
|
|
2906
|
-
W && (this._onDragOver(e),
|
|
2909
|
+
W && (this._onDragOver(e), ka(e));
|
|
2907
2910
|
break;
|
|
2908
2911
|
case "selectstart":
|
|
2909
2912
|
e.preventDefault();
|
|
@@ -2911,14 +2914,14 @@ Q.prototype = {
|
|
|
2911
2914
|
}
|
|
2912
2915
|
},
|
|
2913
2916
|
toArray: function() {
|
|
2914
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
2917
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], vi(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || La(t));
|
|
2915
2918
|
return e;
|
|
2916
2919
|
},
|
|
2917
2920
|
sort: function(e, t) {
|
|
2918
2921
|
var n = {}, r = this.el;
|
|
2919
2922
|
this.toArray().forEach(function(e, t) {
|
|
2920
2923
|
var i = r.children[t];
|
|
2921
|
-
|
|
2924
|
+
vi(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
2922
2925
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
2923
2926
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
2924
2927
|
}), t && this.animateAll();
|
|
@@ -2928,25 +2931,25 @@ Q.prototype = {
|
|
|
2928
2931
|
e && e.set && e.set(this);
|
|
2929
2932
|
},
|
|
2930
2933
|
closest: function(e, t) {
|
|
2931
|
-
return
|
|
2934
|
+
return vi(e, t || this.options.draggable, this.el, !1);
|
|
2932
2935
|
},
|
|
2933
2936
|
option: function(e, t) {
|
|
2934
2937
|
var n = this.options;
|
|
2935
2938
|
if (t === void 0) return n[e];
|
|
2936
|
-
var r =
|
|
2937
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
2939
|
+
var r = Hi.modifyOption(this, e, t);
|
|
2940
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && wa(n);
|
|
2938
2941
|
},
|
|
2939
2942
|
destroy: function() {
|
|
2940
2943
|
H("destroy", this);
|
|
2941
2944
|
var e = this.el;
|
|
2942
|
-
e[V] = null,
|
|
2945
|
+
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) {
|
|
2943
2946
|
e.removeAttribute("draggable");
|
|
2944
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
2947
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), ea.splice(ea.indexOf(this.el), 1), this.el = e = null;
|
|
2945
2948
|
},
|
|
2946
2949
|
_hideClone: function() {
|
|
2947
|
-
if (!
|
|
2950
|
+
if (!qi) {
|
|
2948
2951
|
if (H("hideClone", this), Q.eventCanceled) return;
|
|
2949
|
-
|
|
2952
|
+
R(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), qi = !0;
|
|
2950
2953
|
}
|
|
2951
2954
|
},
|
|
2952
2955
|
_showClone: function(e) {
|
|
@@ -2954,99 +2957,99 @@ Q.prototype = {
|
|
|
2954
2957
|
this._hideClone();
|
|
2955
2958
|
return;
|
|
2956
2959
|
}
|
|
2957
|
-
if (
|
|
2960
|
+
if (qi) {
|
|
2958
2961
|
if (H("showClone", this), Q.eventCanceled) return;
|
|
2959
|
-
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) :
|
|
2962
|
+
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : Gi ? q.insertBefore(J, Gi) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), R(J, "display", ""), qi = !1;
|
|
2960
2963
|
}
|
|
2961
2964
|
}
|
|
2962
2965
|
};
|
|
2963
|
-
function
|
|
2966
|
+
function ka(e) {
|
|
2964
2967
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
2965
2968
|
}
|
|
2966
|
-
function
|
|
2969
|
+
function Aa(e, t, n, r, i, a, o, s) {
|
|
2967
2970
|
var c, l = e[V], u = l.options.onMove, d;
|
|
2968
|
-
return window.CustomEvent && !
|
|
2971
|
+
return window.CustomEvent && !li && !ui ? c = new CustomEvent("move", {
|
|
2969
2972
|
bubbles: !0,
|
|
2970
2973
|
cancelable: !0
|
|
2971
|
-
}) : (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 ||
|
|
2974
|
+
}) : (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;
|
|
2972
2975
|
}
|
|
2973
|
-
function
|
|
2976
|
+
function ja(e) {
|
|
2974
2977
|
e.draggable = !1;
|
|
2975
2978
|
}
|
|
2976
|
-
function
|
|
2977
|
-
|
|
2979
|
+
function Ma() {
|
|
2980
|
+
ma = !1;
|
|
2978
2981
|
}
|
|
2979
|
-
function
|
|
2980
|
-
var r =
|
|
2982
|
+
function Na(e, t, n) {
|
|
2983
|
+
var r = z(wi(n.el, 0, n.options, !0)), i = Ii(n.el, n.options, K), a = 10;
|
|
2981
2984
|
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;
|
|
2982
2985
|
}
|
|
2983
|
-
function
|
|
2984
|
-
var r =
|
|
2986
|
+
function Pa(e, t, n) {
|
|
2987
|
+
var r = z(Ti(n.el, n.options.draggable)), i = Ii(n.el, n.options, K), a = 10;
|
|
2985
2988
|
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;
|
|
2986
2989
|
}
|
|
2987
|
-
function
|
|
2990
|
+
function Fa(e, t, n, r, i, a, o, s) {
|
|
2988
2991
|
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;
|
|
2989
2992
|
if (!o) {
|
|
2990
|
-
if (s &&
|
|
2991
|
-
if (!
|
|
2992
|
-
else if (
|
|
2993
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
2993
|
+
if (s && fa < l * i) {
|
|
2994
|
+
if (!ua && (la === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (ua = !0), ua) f = !0;
|
|
2995
|
+
else if (la === 1 ? c < u + fa : c > d - fa) return -la;
|
|
2996
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Ia(t);
|
|
2994
2997
|
}
|
|
2995
2998
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
2996
2999
|
}
|
|
2997
|
-
function Fa(e) {
|
|
2998
|
-
return wi(W) < wi(e) ? 1 : -1;
|
|
2999
|
-
}
|
|
3000
3000
|
function Ia(e) {
|
|
3001
|
+
return B(W) < B(e) ? 1 : -1;
|
|
3002
|
+
}
|
|
3003
|
+
function La(e) {
|
|
3001
3004
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3002
3005
|
return r.toString(36);
|
|
3003
3006
|
}
|
|
3004
|
-
function
|
|
3005
|
-
|
|
3007
|
+
function Ra(e) {
|
|
3008
|
+
ha.length = 0;
|
|
3006
3009
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3007
3010
|
var r = t[n];
|
|
3008
|
-
r.checked &&
|
|
3011
|
+
r.checked && ha.push(r);
|
|
3009
3012
|
}
|
|
3010
3013
|
}
|
|
3011
|
-
function
|
|
3014
|
+
function za(e) {
|
|
3012
3015
|
return setTimeout(e, 0);
|
|
3013
3016
|
}
|
|
3014
|
-
function
|
|
3017
|
+
function Ba(e) {
|
|
3015
3018
|
return clearTimeout(e);
|
|
3016
3019
|
}
|
|
3017
|
-
|
|
3018
|
-
(Q.active ||
|
|
3020
|
+
ga && F(document, "touchmove", function(e) {
|
|
3021
|
+
(Q.active || Qi) && e.cancelable && e.preventDefault();
|
|
3019
3022
|
}), Q.utils = {
|
|
3020
|
-
on:
|
|
3021
|
-
off:
|
|
3022
|
-
css:
|
|
3023
|
-
find:
|
|
3023
|
+
on: F,
|
|
3024
|
+
off: I,
|
|
3025
|
+
css: R,
|
|
3026
|
+
find: xi,
|
|
3024
3027
|
is: function(e, t) {
|
|
3025
|
-
return !!
|
|
3026
|
-
},
|
|
3027
|
-
extend:
|
|
3028
|
-
throttle:
|
|
3029
|
-
closest:
|
|
3030
|
-
toggleClass:
|
|
3031
|
-
clone:
|
|
3032
|
-
index:
|
|
3033
|
-
nextTick:
|
|
3034
|
-
cancelNextTick:
|
|
3035
|
-
detectDirection:
|
|
3036
|
-
getChild:
|
|
3028
|
+
return !!vi(e, t, e, !1);
|
|
3029
|
+
},
|
|
3030
|
+
extend: ki,
|
|
3031
|
+
throttle: Mi,
|
|
3032
|
+
closest: vi,
|
|
3033
|
+
toggleClass: L,
|
|
3034
|
+
clone: Fi,
|
|
3035
|
+
index: B,
|
|
3036
|
+
nextTick: za,
|
|
3037
|
+
cancelNextTick: Ba,
|
|
3038
|
+
detectDirection: xa,
|
|
3039
|
+
getChild: wi
|
|
3037
3040
|
}, Q.get = function(e) {
|
|
3038
3041
|
return e[V];
|
|
3039
3042
|
}, Q.mount = function() {
|
|
3040
3043
|
var e = [...arguments];
|
|
3041
3044
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3042
3045
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3043
|
-
e.utils && (Q.utils =
|
|
3046
|
+
e.utils && (Q.utils = ti(ti({}, Q.utils), e.utils)), Hi.mount(e);
|
|
3044
3047
|
});
|
|
3045
3048
|
}, Q.create = function(e, t) {
|
|
3046
3049
|
return new Q(e, t);
|
|
3047
|
-
}, Q.version =
|
|
3048
|
-
var $ = [],
|
|
3049
|
-
function
|
|
3050
|
+
}, Q.version = si;
|
|
3051
|
+
var $ = [], Va, Ha, Ua = !1, Wa, Ga, Ka, qa;
|
|
3052
|
+
function Ja() {
|
|
3050
3053
|
function e() {
|
|
3051
3054
|
for (var e in this.defaults = {
|
|
3052
3055
|
scroll: !0,
|
|
@@ -3059,70 +3062,70 @@ function qa() {
|
|
|
3059
3062
|
return e.prototype = {
|
|
3060
3063
|
dragStarted: function(e) {
|
|
3061
3064
|
var t = e.originalEvent;
|
|
3062
|
-
this.sortable.nativeDraggable ?
|
|
3065
|
+
this.sortable.nativeDraggable ? F(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? F(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? F(document, "touchmove", this._handleFallbackAutoScroll) : F(document, "mousemove", this._handleFallbackAutoScroll);
|
|
3063
3066
|
},
|
|
3064
3067
|
dragOverCompleted: function(e) {
|
|
3065
3068
|
var t = e.originalEvent;
|
|
3066
3069
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3067
3070
|
},
|
|
3068
3071
|
drop: function() {
|
|
3069
|
-
this.sortable.nativeDraggable ?
|
|
3072
|
+
this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : (I(document, "pointermove", this._handleFallbackAutoScroll), I(document, "touchmove", this._handleFallbackAutoScroll), I(document, "mousemove", this._handleFallbackAutoScroll)), Xa(), Ya(), Ni();
|
|
3070
3073
|
},
|
|
3071
3074
|
nulling: function() {
|
|
3072
|
-
|
|
3075
|
+
Ka = Ha = Va = Ua = qa = Wa = Ga = null, $.length = 0;
|
|
3073
3076
|
},
|
|
3074
3077
|
_handleFallbackAutoScroll: function(e) {
|
|
3075
3078
|
this._handleAutoScroll(e, !0);
|
|
3076
3079
|
},
|
|
3077
3080
|
_handleAutoScroll: function(e, t) {
|
|
3078
3081
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3079
|
-
if (
|
|
3080
|
-
|
|
3081
|
-
var o =
|
|
3082
|
-
|
|
3083
|
-
var a =
|
|
3084
|
-
a !== o && (o = a,
|
|
3085
|
-
}, 10),
|
|
3082
|
+
if (Ka = e, t || this.options.forceAutoScrollFallback || ui || li || fi) {
|
|
3083
|
+
Za(e, this.options, a, t);
|
|
3084
|
+
var o = Oi(a, !0);
|
|
3085
|
+
Ua && (!qa || r !== Wa || i !== Ga) && (qa && Xa(), qa = setInterval(function() {
|
|
3086
|
+
var a = Oi(document.elementFromPoint(r, i), !0);
|
|
3087
|
+
a !== o && (o = a, Ya()), Za(e, n.options, a, t);
|
|
3088
|
+
}, 10), Wa = r, Ga = i);
|
|
3086
3089
|
} else {
|
|
3087
|
-
if (!this.options.bubbleScroll ||
|
|
3088
|
-
|
|
3090
|
+
if (!this.options.bubbleScroll || Oi(a, !0) === Si()) {
|
|
3091
|
+
Ya();
|
|
3089
3092
|
return;
|
|
3090
3093
|
}
|
|
3091
|
-
|
|
3094
|
+
Za(e, this.options, Oi(a, !1), !1);
|
|
3092
3095
|
}
|
|
3093
3096
|
}
|
|
3094
|
-
},
|
|
3097
|
+
}, ii(e, {
|
|
3095
3098
|
pluginName: "scroll",
|
|
3096
3099
|
initializeByDefault: !0
|
|
3097
3100
|
});
|
|
3098
3101
|
}
|
|
3099
|
-
function
|
|
3102
|
+
function Ya() {
|
|
3100
3103
|
$.forEach(function(e) {
|
|
3101
3104
|
clearInterval(e.pid);
|
|
3102
3105
|
}), $ = [];
|
|
3103
3106
|
}
|
|
3104
|
-
function
|
|
3105
|
-
clearInterval(
|
|
3107
|
+
function Xa() {
|
|
3108
|
+
clearInterval(qa);
|
|
3106
3109
|
}
|
|
3107
|
-
var
|
|
3110
|
+
var Za = Mi(function(e, t, n, r) {
|
|
3108
3111
|
if (t.scroll) {
|
|
3109
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3110
|
-
|
|
3111
|
-
var d = 0, f =
|
|
3112
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Si(), l = !1, u;
|
|
3113
|
+
Ha !== n && (Ha = n, Ya(), Va = t.scroll, u = t.scrollFn, Va === !0 && (Va = Oi(n, !0)));
|
|
3114
|
+
var d = 0, f = Va;
|
|
3112
3115
|
do {
|
|
3113
|
-
var p = f, m =
|
|
3116
|
+
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;
|
|
3114
3117
|
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"));
|
|
3115
3118
|
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);
|
|
3116
3119
|
if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
|
|
3117
3120
|
($[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() {
|
|
3118
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3121
|
+
r && this.layer === 0 && Q.active._onTouchMove(Ka);
|
|
3119
3122
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3120
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e,
|
|
3123
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, Ka, $[this.layer].el) !== "continue" || Pi($[this.layer].el, n, t);
|
|
3121
3124
|
}.bind({ layer: d }), 24))), d++;
|
|
3122
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3123
|
-
|
|
3125
|
+
} while (t.bubbleScroll && f !== c && (f = Oi(f, !1)));
|
|
3126
|
+
Ua = l;
|
|
3124
3127
|
}
|
|
3125
|
-
}, 30),
|
|
3128
|
+
}, 30), Qa = function(e) {
|
|
3126
3129
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3127
3130
|
if (t) {
|
|
3128
3131
|
var c = n || i;
|
|
@@ -3134,8 +3137,8 @@ var Xa = ji(function(e, t, n, r) {
|
|
|
3134
3137
|
}));
|
|
3135
3138
|
}
|
|
3136
3139
|
};
|
|
3137
|
-
function
|
|
3138
|
-
|
|
3140
|
+
function $a() {}
|
|
3141
|
+
$a.prototype = {
|
|
3139
3142
|
startIndex: null,
|
|
3140
3143
|
dragStart: function(e) {
|
|
3141
3144
|
var t = e.oldDraggableIndex;
|
|
@@ -3144,72 +3147,72 @@ Qa.prototype = {
|
|
|
3144
3147
|
onSpill: function(e) {
|
|
3145
3148
|
var t = e.dragEl, n = e.putSortable;
|
|
3146
3149
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3147
|
-
var r =
|
|
3150
|
+
var r = wi(this.sortable.el, this.startIndex, this.options);
|
|
3148
3151
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3149
3152
|
},
|
|
3150
|
-
drop:
|
|
3151
|
-
},
|
|
3152
|
-
function
|
|
3153
|
-
|
|
3153
|
+
drop: Qa
|
|
3154
|
+
}, ii($a, { pluginName: "revertOnSpill" });
|
|
3155
|
+
function eo() {}
|
|
3156
|
+
eo.prototype = {
|
|
3154
3157
|
onSpill: function(e) {
|
|
3155
3158
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3156
3159
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3157
3160
|
},
|
|
3158
|
-
drop:
|
|
3159
|
-
},
|
|
3160
|
-
function eo(e) {
|
|
3161
|
-
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3162
|
-
}
|
|
3161
|
+
drop: Qa
|
|
3162
|
+
}, ii(eo, { pluginName: "removeOnSpill" }), Q.mount(new Ja()), Q.mount(eo, $a);
|
|
3163
3163
|
function to(e) {
|
|
3164
|
-
|
|
3164
|
+
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3165
3165
|
}
|
|
3166
3166
|
function no(e) {
|
|
3167
|
-
|
|
3167
|
+
oe() && ee(e);
|
|
3168
|
+
}
|
|
3169
|
+
function ro(e) {
|
|
3170
|
+
oe() ? u(e) : r(e);
|
|
3168
3171
|
}
|
|
3169
|
-
var
|
|
3170
|
-
function
|
|
3171
|
-
|
|
3172
|
+
var io = null, ao = null;
|
|
3173
|
+
function oo(e = null, t = null) {
|
|
3174
|
+
io = e, ao = t;
|
|
3172
3175
|
}
|
|
3173
|
-
function
|
|
3176
|
+
function so() {
|
|
3174
3177
|
return {
|
|
3175
|
-
data:
|
|
3176
|
-
clonedData:
|
|
3178
|
+
data: io,
|
|
3179
|
+
clonedData: ao
|
|
3177
3180
|
};
|
|
3178
3181
|
}
|
|
3179
|
-
var
|
|
3180
|
-
function
|
|
3181
|
-
let t =
|
|
3182
|
+
var co = Symbol("cloneElement");
|
|
3183
|
+
function lo(...e) {
|
|
3184
|
+
let t = oe()?.proxy, n = null, i = e[0], [, o, c] = e;
|
|
3182
3185
|
Array.isArray(j(o)) || (c = o, o = null);
|
|
3183
|
-
let l = null, { immediate: u = !0, clone: d =
|
|
3186
|
+
let l = null, { immediate: u = !0, clone: d = to, forceFallback: f, fallbackOnBody: p, customUpdate: m } = j(c) ?? {};
|
|
3184
3187
|
function h(e) {
|
|
3185
3188
|
let { from: t, oldIndex: r, item: i } = e, a = Array.from(t.childNodes);
|
|
3186
3189
|
n = f && !p ? a.slice(0, -1) : a;
|
|
3187
3190
|
let s = j(j(o)?.[r]), c = d(s);
|
|
3188
|
-
|
|
3191
|
+
oo(s, c), i[co] = c;
|
|
3189
3192
|
}
|
|
3190
3193
|
function g(e) {
|
|
3191
|
-
let t = e.item[
|
|
3192
|
-
if (!
|
|
3193
|
-
if (
|
|
3194
|
+
let t = e.item[co];
|
|
3195
|
+
if (!Ur(t)) {
|
|
3196
|
+
if (Kr(e.item), a(o)) {
|
|
3194
3197
|
let n = [...j(o)];
|
|
3195
|
-
o.value =
|
|
3198
|
+
o.value = Hr(n, e.newDraggableIndex, t);
|
|
3196
3199
|
return;
|
|
3197
3200
|
}
|
|
3198
|
-
|
|
3201
|
+
Hr(j(o), e.newDraggableIndex, t);
|
|
3199
3202
|
}
|
|
3200
3203
|
}
|
|
3201
3204
|
function _(e) {
|
|
3202
3205
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, pullMode: s, clone: c } = e;
|
|
3203
|
-
if (
|
|
3204
|
-
|
|
3206
|
+
if (Gr(t, n, r), s === "clone") {
|
|
3207
|
+
Kr(c);
|
|
3205
3208
|
return;
|
|
3206
3209
|
}
|
|
3207
3210
|
if (a(o)) {
|
|
3208
3211
|
let e = [...j(o)];
|
|
3209
|
-
o.value =
|
|
3212
|
+
o.value = Vr(e, i);
|
|
3210
3213
|
return;
|
|
3211
3214
|
}
|
|
3212
|
-
|
|
3215
|
+
Vr(j(o), i);
|
|
3213
3216
|
}
|
|
3214
3217
|
function v(e) {
|
|
3215
3218
|
if (m) {
|
|
@@ -3217,12 +3220,12 @@ function co(...e) {
|
|
|
3217
3220
|
return;
|
|
3218
3221
|
}
|
|
3219
3222
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, newDraggableIndex: s } = e;
|
|
3220
|
-
if (
|
|
3223
|
+
if (Kr(n), Gr(t, n, r), a(o)) {
|
|
3221
3224
|
let e = [...j(o)];
|
|
3222
|
-
o.value =
|
|
3225
|
+
o.value = Rr(e, i, s);
|
|
3223
3226
|
return;
|
|
3224
3227
|
}
|
|
3225
|
-
|
|
3228
|
+
Rr(j(o), i, s);
|
|
3226
3229
|
}
|
|
3227
3230
|
function y(e) {
|
|
3228
3231
|
let { newIndex: t, oldIndex: i, from: a, to: o } = e, s = null, c = t === i && a === o;
|
|
@@ -3241,7 +3244,7 @@ function co(...e) {
|
|
|
3241
3244
|
n = null;
|
|
3242
3245
|
}
|
|
3243
3246
|
r(() => {
|
|
3244
|
-
if (
|
|
3247
|
+
if (oo(), s) throw s;
|
|
3245
3248
|
});
|
|
3246
3249
|
}
|
|
3247
3250
|
let b = {
|
|
@@ -3253,19 +3256,19 @@ function co(...e) {
|
|
|
3253
3256
|
};
|
|
3254
3257
|
function x(e) {
|
|
3255
3258
|
let n = j(i);
|
|
3256
|
-
return e ||=
|
|
3259
|
+
return e ||= Wr(n) ? qr(n, t?.$el) : n, e && !Xr(e) && (e = e.$el), e || Lr("Root element not found"), e;
|
|
3257
3260
|
}
|
|
3258
3261
|
function S() {
|
|
3259
|
-
let e = j(c) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3260
|
-
return
|
|
3261
|
-
|
|
3262
|
-
}),
|
|
3262
|
+
let e = j(c) ?? {}, { immediate: t, clone: n } = e, r = Pr(e, ["immediate", "clone"]);
|
|
3263
|
+
return Zr(r, (e, t) => {
|
|
3264
|
+
Qr(e) && (r[e] = (e, ...n) => ($r(e, so()), t(e, ...n)));
|
|
3265
|
+
}), Yr(o === null ? {} : b, r);
|
|
3263
3266
|
}
|
|
3264
3267
|
let C = (e) => {
|
|
3265
3268
|
e = x(e), l && w.destroy(), l = new Q(e, S());
|
|
3266
3269
|
};
|
|
3267
3270
|
s(() => c, () => {
|
|
3268
|
-
l &&
|
|
3271
|
+
l && Zr(S(), (e, t) => {
|
|
3269
3272
|
l?.option(e, t);
|
|
3270
3273
|
});
|
|
3271
3274
|
}, { deep: !0 });
|
|
@@ -3278,15 +3281,15 @@ function co(...e) {
|
|
|
3278
3281
|
toArray: () => l?.toArray(),
|
|
3279
3282
|
closest: (...e) => l?.closest(...e)
|
|
3280
3283
|
};
|
|
3281
|
-
return
|
|
3284
|
+
return ro(() => {
|
|
3282
3285
|
u && C();
|
|
3283
|
-
}),
|
|
3286
|
+
}), no(w.destroy), Nr({
|
|
3284
3287
|
start: C,
|
|
3285
3288
|
pause: () => w?.option("disabled", !0),
|
|
3286
3289
|
resume: () => w?.option("disabled", !1)
|
|
3287
3290
|
}, w);
|
|
3288
3291
|
}
|
|
3289
|
-
var
|
|
3292
|
+
var uo = [
|
|
3290
3293
|
"update",
|
|
3291
3294
|
"start",
|
|
3292
3295
|
"add",
|
|
@@ -3299,7 +3302,7 @@ var lo = [
|
|
|
3299
3302
|
"clone",
|
|
3300
3303
|
"move",
|
|
3301
3304
|
"change"
|
|
3302
|
-
],
|
|
3305
|
+
], fo = y({
|
|
3303
3306
|
name: "VueDraggable",
|
|
3304
3307
|
model: {
|
|
3305
3308
|
prop: "modelValue",
|
|
@@ -3349,37 +3352,37 @@ var lo = [
|
|
|
3349
3352
|
"tag",
|
|
3350
3353
|
"target",
|
|
3351
3354
|
"customUpdate",
|
|
3352
|
-
...
|
|
3355
|
+
...uo.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3353
3356
|
],
|
|
3354
|
-
emits: ["update:modelValue", ...
|
|
3357
|
+
emits: ["update:modelValue", ...uo],
|
|
3355
3358
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3356
|
-
let a =
|
|
3359
|
+
let a = uo.reduce((e, t) => {
|
|
3357
3360
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3358
3361
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3359
3362
|
}, {}), s = x(() => {
|
|
3360
|
-
let t = S(e), { modelValue: n } = t, r =
|
|
3363
|
+
let t = S(e), { modelValue: n } = t, r = Pr(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3361
3364
|
let r = j(n);
|
|
3362
3365
|
return r !== void 0 && (e[t] = r), e;
|
|
3363
3366
|
}, {});
|
|
3364
|
-
return
|
|
3367
|
+
return Nr(Nr({}, a), Br(Nr(Nr({}, i), o)));
|
|
3365
3368
|
}), c = x({
|
|
3366
3369
|
get: () => e.modelValue,
|
|
3367
3370
|
set: (e) => n("update:modelValue", e)
|
|
3368
|
-
}), l = h(), u = o(
|
|
3371
|
+
}), l = h(), u = o(lo(e.target || l, c, s));
|
|
3369
3372
|
return r(u), () => f(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
|
|
3370
3373
|
}
|
|
3371
|
-
}),
|
|
3374
|
+
}), po = {
|
|
3372
3375
|
mounted: "mounted",
|
|
3373
3376
|
unmounted: "unmounted"
|
|
3374
3377
|
};
|
|
3375
|
-
|
|
3378
|
+
po.mounted, po.unmounted;
|
|
3376
3379
|
//#endregion
|
|
3377
3380
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3378
|
-
var
|
|
3381
|
+
var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
3379
3382
|
key: 0,
|
|
3380
3383
|
"data-testid": "section-drop-hint",
|
|
3381
3384
|
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)]"
|
|
3382
|
-
},
|
|
3385
|
+
}, _o = /* @__PURE__ */ y({
|
|
3383
3386
|
__name: "SectionBlock",
|
|
3384
3387
|
props: {
|
|
3385
3388
|
block: {},
|
|
@@ -3387,13 +3390,13 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3387
3390
|
},
|
|
3388
3391
|
setup(n) {
|
|
3389
3392
|
let r = {
|
|
3390
|
-
title:
|
|
3391
|
-
paragraph:
|
|
3392
|
-
image:
|
|
3393
|
-
button:
|
|
3394
|
-
divider:
|
|
3395
|
-
custom:
|
|
3396
|
-
}, a = n, { t: o } =
|
|
3393
|
+
title: Dr,
|
|
3394
|
+
paragraph: ur,
|
|
3395
|
+
image: Zn,
|
|
3396
|
+
button: Xt,
|
|
3397
|
+
divider: Fn,
|
|
3398
|
+
custom: Nn
|
|
3399
|
+
}, a = n, { t: o } = lt(), s = ze(rt, "SectionBlock"), l = ae(at, null), u = ae(nt, null), d = x(() => {
|
|
3397
3400
|
switch (a.block.columns) {
|
|
3398
3401
|
case "2": return ["50%", "50%"];
|
|
3399
3402
|
case "3": return [
|
|
@@ -3419,7 +3422,7 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3419
3422
|
r[e] = n, s.updateBlock(a.block.id, { children: r });
|
|
3420
3423
|
}
|
|
3421
3424
|
function h(e) {
|
|
3422
|
-
return
|
|
3425
|
+
return dr(e, u, r);
|
|
3423
3426
|
}
|
|
3424
3427
|
function g(e, t) {
|
|
3425
3428
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
@@ -3427,11 +3430,11 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3427
3430
|
dataSourceFetched: t.dataSourceFetched
|
|
3428
3431
|
});
|
|
3429
3432
|
}
|
|
3430
|
-
return (r, a) => (e(), w("div",
|
|
3433
|
+
return (r, a) => (e(), w("div", mo, [C("div", ho, [(e(!0), w(D, null, c(f.value, (r, a) => (e(), w("div", {
|
|
3431
3434
|
key: a,
|
|
3432
3435
|
class: v(["tpl:relative tpl:min-h-[60px] tpl:rounded", p(a).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3433
3436
|
style: A({ width: d.value[a] })
|
|
3434
|
-
}, [N(j(
|
|
3437
|
+
}, [N(j(fo), {
|
|
3435
3438
|
"model-value": p(a),
|
|
3436
3439
|
group: {
|
|
3437
3440
|
name: "blocks",
|
|
@@ -3449,13 +3452,13 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3449
3452
|
class: "tpl:min-h-[60px]",
|
|
3450
3453
|
"onUpdate:modelValue": (e) => m(a, e)
|
|
3451
3454
|
}, {
|
|
3452
|
-
default:
|
|
3455
|
+
default: ce(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [N(Tr, {
|
|
3453
3456
|
block: r,
|
|
3454
3457
|
"is-selected": j(s).state.selectedBlockId === r.id,
|
|
3455
3458
|
viewport: n.viewport,
|
|
3456
3459
|
onSelect: (e) => j(s).selectBlock(r.id)
|
|
3457
3460
|
}, {
|
|
3458
|
-
default:
|
|
3461
|
+
default: ce(() => [(e(), ne(i(h(r)), {
|
|
3459
3462
|
block: r,
|
|
3460
3463
|
viewport: n.viewport,
|
|
3461
3464
|
onFetchData: (e) => g(r, e)
|
|
@@ -3476,9 +3479,9 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3476
3479
|
"model-value",
|
|
3477
3480
|
"group",
|
|
3478
3481
|
"onUpdate:modelValue"
|
|
3479
|
-
]), p(a).length === 0 ? (e(), w("div",
|
|
3482
|
+
]), p(a).length === 0 ? (e(), w("div", go, [C("span", null, M(j(o).section.dropHere), 1)])) : O("", !0)], 6))), 128))])]));
|
|
3480
3483
|
}
|
|
3481
|
-
}),
|
|
3484
|
+
}), vo = {
|
|
3482
3485
|
facebook: {
|
|
3483
3486
|
name: "Facebook",
|
|
3484
3487
|
color: "#1877F2",
|
|
@@ -3559,11 +3562,11 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3559
3562
|
color: "#1769FF",
|
|
3560
3563
|
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"
|
|
3561
3564
|
}
|
|
3562
|
-
},
|
|
3565
|
+
}, yo = {
|
|
3563
3566
|
small: 24,
|
|
3564
3567
|
medium: 32,
|
|
3565
3568
|
large: 48
|
|
3566
|
-
},
|
|
3569
|
+
}, bo = [
|
|
3567
3570
|
"facebook",
|
|
3568
3571
|
"twitter",
|
|
3569
3572
|
"instagram",
|
|
@@ -3580,11 +3583,11 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3580
3583
|
"github",
|
|
3581
3584
|
"dribbble",
|
|
3582
3585
|
"behance"
|
|
3583
|
-
],
|
|
3586
|
+
], xo = [
|
|
3584
3587
|
"width",
|
|
3585
3588
|
"height",
|
|
3586
3589
|
"fill"
|
|
3587
|
-
],
|
|
3590
|
+
], So = ["d"], Co = /* @__PURE__ */ y({
|
|
3588
3591
|
__name: "SocialIconSvg",
|
|
3589
3592
|
props: {
|
|
3590
3593
|
platform: {},
|
|
@@ -3592,7 +3595,7 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3592
3595
|
iconSize: {}
|
|
3593
3596
|
},
|
|
3594
3597
|
setup(t) {
|
|
3595
|
-
let n = t, r = x(() =>
|
|
3598
|
+
let n = t, r = x(() => vo[n.platform]), i = x(() => yo[n.iconSize]), a = x(() => {
|
|
3596
3599
|
let e = {
|
|
3597
3600
|
display: "inline-flex",
|
|
3598
3601
|
alignItems: "center",
|
|
@@ -3636,25 +3639,25 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3636
3639
|
viewBox: "0 0 24 24",
|
|
3637
3640
|
fill: s.value,
|
|
3638
3641
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3639
|
-
}, [C("path", { d: r.value.path }, null, 8,
|
|
3642
|
+
}, [C("path", { d: r.value.path }, null, 8, So)], 8, xo))], 4));
|
|
3640
3643
|
}
|
|
3641
|
-
}),
|
|
3644
|
+
}), wo = { class: "tpl:w-full" }, To = ["href"], Eo = {
|
|
3642
3645
|
key: 1,
|
|
3643
3646
|
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)]"
|
|
3644
|
-
},
|
|
3647
|
+
}, Do = /* @__PURE__ */ y({
|
|
3645
3648
|
__name: "SocialIconsBlock",
|
|
3646
3649
|
props: {
|
|
3647
3650
|
block: {},
|
|
3648
3651
|
viewport: {}
|
|
3649
3652
|
},
|
|
3650
3653
|
setup(t) {
|
|
3651
|
-
let n = t, { t: r } =
|
|
3654
|
+
let n = t, { t: r } = lt(), i = x(() => ({
|
|
3652
3655
|
display: "flex",
|
|
3653
3656
|
flexWrap: "wrap",
|
|
3654
3657
|
gap: `${n.block.spacing}px`,
|
|
3655
3658
|
justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
|
|
3656
3659
|
})), a = x(() => n.block.icons.length > 0);
|
|
3657
|
-
return (n, o) => (e(), w("div",
|
|
3660
|
+
return (n, o) => (e(), w("div", wo, [a.value ? (e(), w("div", {
|
|
3658
3661
|
key: 0,
|
|
3659
3662
|
style: A(i.value)
|
|
3660
3663
|
}, [(e(!0), w(D, null, c(t.block.icons, (n) => (e(), w("a", {
|
|
@@ -3662,7 +3665,7 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3662
3665
|
href: n.url || "#",
|
|
3663
3666
|
class: "tpl:cursor-default",
|
|
3664
3667
|
onClick: o[0] ||= b(() => {}, ["prevent"])
|
|
3665
|
-
}, [N(
|
|
3668
|
+
}, [N(Co, {
|
|
3666
3669
|
platform: n.platform,
|
|
3667
3670
|
"icon-style": t.block.iconStyle,
|
|
3668
3671
|
"icon-size": t.block.iconSize
|
|
@@ -3670,44 +3673,44 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3670
3673
|
"platform",
|
|
3671
3674
|
"icon-style",
|
|
3672
3675
|
"icon-size"
|
|
3673
|
-
])], 8,
|
|
3676
|
+
])], 8, To))), 128))], 4)) : (e(), w("div", Eo, [N(j(cn), { size: 16 }), C("span", null, M(j(r).social.addIcons), 1)]))]));
|
|
3674
3677
|
}
|
|
3675
|
-
}),
|
|
3678
|
+
}), Oo = { class: "tpl:w-full" }, ko = {
|
|
3676
3679
|
key: 0,
|
|
3677
3680
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3678
3681
|
style: {
|
|
3679
3682
|
"background-color": "var(--tpl-bg-hover)",
|
|
3680
3683
|
color: "var(--tpl-text-dim)"
|
|
3681
3684
|
}
|
|
3682
|
-
},
|
|
3685
|
+
}, Ao = /* @__PURE__ */ y({
|
|
3683
3686
|
__name: "SpacerBlock",
|
|
3684
3687
|
props: {
|
|
3685
3688
|
block: {},
|
|
3686
3689
|
viewport: {}
|
|
3687
3690
|
},
|
|
3688
3691
|
setup(t) {
|
|
3689
|
-
let n = t, r =
|
|
3692
|
+
let n = t, r = ze(rt, "SpacerBlock"), i = x(() => ({
|
|
3690
3693
|
height: `${n.block.height}px`,
|
|
3691
3694
|
minHeight: `${n.block.height}px`,
|
|
3692
3695
|
...r.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3693
3696
|
}));
|
|
3694
|
-
return (n, a) => (e(), w("div",
|
|
3697
|
+
return (n, a) => (e(), w("div", Oo, [C("div", {
|
|
3695
3698
|
style: A(i.value),
|
|
3696
3699
|
class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(r).state.previewMode }])
|
|
3697
|
-
}, [j(r).state.previewMode ? O("", !0) : (e(), w("span",
|
|
3700
|
+
}, [j(r).state.previewMode ? O("", !0) : (e(), w("span", ko, M(t.block.height) + "px ", 1))], 6)]));
|
|
3698
3701
|
}
|
|
3699
|
-
}),
|
|
3702
|
+
}), jo = { class: "tpl:w-full" }, Mo = { key: 0 }, No = [
|
|
3700
3703
|
"aria-label",
|
|
3701
3704
|
"data-placeholder",
|
|
3702
3705
|
"onBlur"
|
|
3703
|
-
],
|
|
3706
|
+
], Po = [
|
|
3704
3707
|
"aria-label",
|
|
3705
3708
|
"data-placeholder",
|
|
3706
3709
|
"onBlur"
|
|
3707
|
-
],
|
|
3710
|
+
], Fo = {
|
|
3708
3711
|
key: 1,
|
|
3709
3712
|
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)]"
|
|
3710
|
-
},
|
|
3713
|
+
}, Io = /* @__PURE__ */ mt(/* @__PURE__ */ y({
|
|
3711
3714
|
__name: "TableBlock",
|
|
3712
3715
|
props: {
|
|
3713
3716
|
block: {},
|
|
@@ -3721,7 +3724,7 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3721
3724
|
updated(e, t) {
|
|
3722
3725
|
t.value !== t.oldValue && e.ownerDocument.activeElement !== e && (e.textContent = t.value ?? "");
|
|
3723
3726
|
}
|
|
3724
|
-
}, i = n, { t: a } =
|
|
3727
|
+
}, i = n, { t: a } = lt(), o = ze(rt, "TableBlock"), s = x(() => i.block.rows.length > 0), l = x(() => ({
|
|
3725
3728
|
width: "100%",
|
|
3726
3729
|
borderCollapse: "collapse",
|
|
3727
3730
|
fontSize: `${i.block.fontSize}px`,
|
|
@@ -3750,11 +3753,11 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3750
3753
|
} : n);
|
|
3751
3754
|
o.updateBlock(i.block.id, { rows: a });
|
|
3752
3755
|
}
|
|
3753
|
-
return (n, i) => (e(), w("div",
|
|
3756
|
+
return (n, i) => (e(), w("div", jo, [s.value ? (e(), w("table", {
|
|
3754
3757
|
key: 0,
|
|
3755
3758
|
style: A(l.value),
|
|
3756
3759
|
class: "tpl-table-editable"
|
|
3757
|
-
}, [f.value ? (e(), w("thead",
|
|
3760
|
+
}, [f.value ? (e(), w("thead", Mo, [C("tr", null, [(e(!0), w(D, null, c(f.value.cells, (n) => t((e(), w("th", {
|
|
3758
3761
|
key: n.id,
|
|
3759
3762
|
style: A(d.value),
|
|
3760
3763
|
"aria-label": j(a).table.cellPlaceholder,
|
|
@@ -3763,7 +3766,7 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3763
3766
|
onBlur: (e) => h(f.value.id, n.id, e),
|
|
3764
3767
|
onKeydown: i[0] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3765
3768
|
onClick: b(m, ["stop"])
|
|
3766
|
-
}, null, 44,
|
|
3769
|
+
}, null, 44, No)), [[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", {
|
|
3767
3770
|
key: o.id,
|
|
3768
3771
|
style: A(u.value),
|
|
3769
3772
|
"aria-label": j(a).table.cellPlaceholder,
|
|
@@ -3772,9 +3775,9 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3772
3775
|
onBlur: (e) => h(n.id, o.id, e),
|
|
3773
3776
|
onKeydown: i[1] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3774
3777
|
onClick: b(m, ["stop"])
|
|
3775
|
-
}, null, 44,
|
|
3778
|
+
}, null, 44, Po)), [[r, o.content]])), 128))]))), 128))])], 4)) : (e(), w("div", Fo, [N(j(ln), { size: 16 }), C("span", null, M(j(a).table.empty), 1)]))]));
|
|
3776
3779
|
}
|
|
3777
|
-
}), [["__scopeId", "data-v-4f49860b"]]),
|
|
3780
|
+
}), [["__scopeId", "data-v-4f49860b"]]), Lo = /* @__PURE__ */ y({
|
|
3778
3781
|
__name: "VideoPlayButton",
|
|
3779
3782
|
props: { hoverEffect: {
|
|
3780
3783
|
type: Boolean,
|
|
@@ -3792,7 +3795,7 @@ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
|
3792
3795
|
});
|
|
3793
3796
|
//#endregion
|
|
3794
3797
|
//#region src/utils/videoThumbnail.ts
|
|
3795
|
-
function
|
|
3798
|
+
function Ro(e) {
|
|
3796
3799
|
if (!e) return {
|
|
3797
3800
|
platform: "unknown",
|
|
3798
3801
|
videoId: null,
|
|
@@ -3824,31 +3827,31 @@ function Lo(e) {
|
|
|
3824
3827
|
thumbnailUrl: null
|
|
3825
3828
|
};
|
|
3826
3829
|
}
|
|
3827
|
-
function
|
|
3828
|
-
return t ||
|
|
3830
|
+
function zo(e, t) {
|
|
3831
|
+
return t || Ro(e).thumbnailUrl;
|
|
3829
3832
|
}
|
|
3830
3833
|
//#endregion
|
|
3831
3834
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3832
|
-
var
|
|
3835
|
+
var Bo = ["src", "alt"], Vo = {
|
|
3833
3836
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3834
3837
|
style: { opacity: "0.7" }
|
|
3835
|
-
},
|
|
3838
|
+
}, Ho = ["href"], Uo = ["src", "alt"], Wo = ["src", "alt"], Go = {
|
|
3836
3839
|
key: 3,
|
|
3837
3840
|
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)]"
|
|
3838
|
-
},
|
|
3841
|
+
}, Ko = /* @__PURE__ */ y({
|
|
3839
3842
|
__name: "VideoBlock",
|
|
3840
3843
|
props: {
|
|
3841
3844
|
block: {},
|
|
3842
3845
|
viewport: {}
|
|
3843
3846
|
},
|
|
3844
3847
|
setup(t) {
|
|
3845
|
-
let n = t, { t: r } =
|
|
3848
|
+
let n = t, { t: r } = lt(), { syntax: i } = ht(), a = x(() => pe(n.block.url, i) || pe(n.block.thumbnailUrl, i)), o = x(() => a.value ? null : zo(n.block.url, n.block.thumbnailUrl)), s = x(() => ({ textAlign: n.block.align })), c = x(() => ({
|
|
3846
3849
|
maxWidth: "100%",
|
|
3847
3850
|
width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
|
|
3848
3851
|
display: "block",
|
|
3849
3852
|
margin: n.block.align === "center" ? "0 auto" : void 0,
|
|
3850
3853
|
marginLeft: n.block.align === "right" ? "auto" : void 0
|
|
3851
|
-
})), l = x(() =>
|
|
3854
|
+
})), l = x(() => pe(n.block.url, i) ? n.block.url : n.block.thumbnailUrl);
|
|
3852
3855
|
return (n, i) => (e(), w("div", {
|
|
3853
3856
|
class: "tpl:w-full",
|
|
3854
3857
|
style: A(s.value)
|
|
@@ -3860,16 +3863,16 @@ var zo = ["src", "alt"], Bo = {
|
|
|
3860
3863
|
class: "tpl:w-full tpl:border-0",
|
|
3861
3864
|
src: t.block.placeholderUrl,
|
|
3862
3865
|
alt: t.block.alt
|
|
3863
|
-
}, null, 8,
|
|
3866
|
+
}, null, 8, Bo), N(Lo)], 4)) : a.value ? (e(), w("div", {
|
|
3864
3867
|
key: 1,
|
|
3865
3868
|
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)]",
|
|
3866
3869
|
style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
|
|
3867
|
-
}, [N(j(
|
|
3870
|
+
}, [N(j(un), {
|
|
3868
3871
|
size: 36,
|
|
3869
3872
|
"stroke-width": 1.5,
|
|
3870
3873
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3871
3874
|
style: { opacity: "0.5" }
|
|
3872
|
-
}), C("span",
|
|
3875
|
+
}), C("span", Vo, M(l.value), 1)], 4)) : o.value ? (e(), w(D, { key: 2 }, [t.block.url ? (e(), w("a", {
|
|
3873
3876
|
key: 0,
|
|
3874
3877
|
href: t.block.url,
|
|
3875
3878
|
target: "_blank",
|
|
@@ -3881,7 +3884,7 @@ var zo = ["src", "alt"], Bo = {
|
|
|
3881
3884
|
class: "tpl:w-full tpl:border-0",
|
|
3882
3885
|
src: o.value,
|
|
3883
3886
|
alt: t.block.alt
|
|
3884
|
-
}, null, 8,
|
|
3887
|
+
}, null, 8, Uo), N(Lo, { "hover-effect": "" })], 12, Ho)) : (e(), w("div", {
|
|
3885
3888
|
key: 1,
|
|
3886
3889
|
class: "tpl:relative tpl:inline-block",
|
|
3887
3890
|
style: A(c.value)
|
|
@@ -3889,48 +3892,48 @@ var zo = ["src", "alt"], Bo = {
|
|
|
3889
3892
|
class: "tpl:w-full tpl:border-0",
|
|
3890
3893
|
src: o.value,
|
|
3891
3894
|
alt: t.block.alt
|
|
3892
|
-
}, null, 8,
|
|
3895
|
+
}, null, 8, Wo), N(Lo)], 4))], 64)) : (e(), w("div", Go, [N(j(un), {
|
|
3893
3896
|
size: 40,
|
|
3894
3897
|
"stroke-width": 1.5,
|
|
3895
3898
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3896
3899
|
}), C("span", null, M(j(r).video.addVideo), 1)]))], 4));
|
|
3897
3900
|
}
|
|
3898
|
-
}),
|
|
3899
|
-
section:
|
|
3900
|
-
title:
|
|
3901
|
-
paragraph:
|
|
3902
|
-
image:
|
|
3903
|
-
button:
|
|
3904
|
-
divider:
|
|
3905
|
-
video:
|
|
3906
|
-
social:
|
|
3907
|
-
menu:
|
|
3908
|
-
table:
|
|
3909
|
-
spacer:
|
|
3910
|
-
html:
|
|
3911
|
-
countdown:
|
|
3901
|
+
}), qo = {
|
|
3902
|
+
section: _o,
|
|
3903
|
+
title: Dr,
|
|
3904
|
+
paragraph: ur,
|
|
3905
|
+
image: Zn,
|
|
3906
|
+
button: Xt,
|
|
3907
|
+
divider: Fn,
|
|
3908
|
+
video: Ko,
|
|
3909
|
+
social: Do,
|
|
3910
|
+
menu: tr,
|
|
3911
|
+
table: Io,
|
|
3912
|
+
spacer: Ao,
|
|
3913
|
+
html: Bn,
|
|
3914
|
+
countdown: se(() => import("./CountdownBlock-D0IiMliC.js").then((e) => e.n))
|
|
3912
3915
|
};
|
|
3913
|
-
function
|
|
3914
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } =
|
|
3916
|
+
function Jo(e) {
|
|
3917
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = lt(r);
|
|
3915
3918
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
3916
|
-
let { resolvedTheme: c } =
|
|
3919
|
+
let { resolvedTheme: c } = Lt(x(() => t.state.uiTheme)), l = h(n.theme ?? {}), { themeStyles: u } = zt({
|
|
3917
3920
|
themeOverrides: l,
|
|
3918
3921
|
resolvedTheme: c,
|
|
3919
3922
|
extraStyles: e.themeExtraStyles
|
|
3920
|
-
}), d =
|
|
3923
|
+
}), d = St({
|
|
3921
3924
|
content: t.content,
|
|
3922
3925
|
setContent: (e, n) => t.setContent(e, n),
|
|
3923
3926
|
...e.historyOptions
|
|
3924
3927
|
});
|
|
3925
|
-
|
|
3926
|
-
let f =
|
|
3928
|
+
Ot(t, d);
|
|
3929
|
+
let f = wt({
|
|
3927
3930
|
addBlock: t.addBlock,
|
|
3928
3931
|
removeBlock: t.removeBlock,
|
|
3929
3932
|
updateBlock: t.updateBlock,
|
|
3930
3933
|
selectBlock: t.selectBlock,
|
|
3931
3934
|
findBlockLocation: t.findBlockLocation,
|
|
3932
3935
|
blockDefaults: n.blockDefaults
|
|
3933
|
-
}), m =
|
|
3936
|
+
}), m = Et(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Tt({
|
|
3934
3937
|
content: t.content,
|
|
3935
3938
|
isDirty: () => t.state.isDirty,
|
|
3936
3939
|
...e.autoSaveOptions
|
|
@@ -3938,24 +3941,24 @@ function qo(e) {
|
|
|
3938
3941
|
g && (_ = s(d.isNavigating, (e) => {
|
|
3939
3942
|
e ? g.pause() : g.resume();
|
|
3940
3943
|
}));
|
|
3941
|
-
let v =
|
|
3944
|
+
let v = It(t, {
|
|
3942
3945
|
t: a,
|
|
3943
3946
|
format: o
|
|
3944
|
-
}), y =
|
|
3945
|
-
if (
|
|
3947
|
+
}), y = Ut();
|
|
3948
|
+
if (Gt(y, qo), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, Nn);
|
|
3946
3949
|
function b(e) {
|
|
3947
|
-
for (let t of e) y.registerCustom(t,
|
|
3950
|
+
for (let t of e) y.registerCustom(t, Nn);
|
|
3948
3951
|
}
|
|
3949
|
-
let S =
|
|
3952
|
+
let S = Mt();
|
|
3950
3953
|
if (p() && re(S.dispose), e.containerEl) {
|
|
3951
3954
|
let t = e.containerEl;
|
|
3952
|
-
|
|
3955
|
+
Le(document, "pointerdown", (e) => {
|
|
3953
3956
|
let n = t.value;
|
|
3954
3957
|
n && (e.composedPath?.() ?? []).includes(n) && S.claim();
|
|
3955
3958
|
}, { capture: !0 });
|
|
3956
3959
|
}
|
|
3957
3960
|
function C(r) {
|
|
3958
|
-
S.isActive() &&
|
|
3961
|
+
S.isActive() && qt(r, {
|
|
3959
3962
|
history: d,
|
|
3960
3963
|
selectBlock: (e) => t.selectBlock(e),
|
|
3961
3964
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -3964,19 +3967,19 @@ function qo(e) {
|
|
|
3964
3967
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
3965
3968
|
});
|
|
3966
3969
|
}
|
|
3967
|
-
|
|
3970
|
+
Le(document, "keydown", C);
|
|
3968
3971
|
let w = h(null);
|
|
3969
|
-
E(
|
|
3970
|
-
let T =
|
|
3971
|
-
E(
|
|
3972
|
-
let ee = n.lint
|
|
3972
|
+
E(et, e.editorRoot ?? document), E(Be, w), E(Ue, r), E(rt, t), E(Xe, d), E(Qe, f), E(at, m), E(Ze, i), E(Ve, u), E($e, c), E(Ke, n.blockDefaults), E(nt, y), E(Je, n.customBlocks ?? []);
|
|
3973
|
+
let T = be(n.mergeTags?.syntax);
|
|
3974
|
+
E(ot, n.mergeTags?.tags ?? []), E(qe, T), E(We, n.mergeTags?.onRequest ?? null), E(ct, n.mergeTags?.autocomplete !== !1), E(st, n.onRequestMedia ?? null), E(Ye, n.displayConditions?.conditions ?? []), E(tt, n.displayConditions?.allowCustom ?? !1), E(it, e.capabilities ?? {}), E(Ge, v);
|
|
3975
|
+
let ee = Nt(n.lint) ? null : Pt({
|
|
3973
3976
|
content: t.content,
|
|
3974
3977
|
options: n.lint ?? {},
|
|
3975
3978
|
updateBlock: t.updateBlock,
|
|
3976
3979
|
updateSettings: t.updateSettings,
|
|
3977
3980
|
removeBlock: t.removeBlock
|
|
3978
3981
|
});
|
|
3979
|
-
E(
|
|
3982
|
+
E(He, ee);
|
|
3980
3983
|
function D() {
|
|
3981
3984
|
_?.(), ee?.destroy(), g?.destroy(), d.destroy();
|
|
3982
3985
|
}
|
|
@@ -3999,4 +4002,4 @@ function qo(e) {
|
|
|
3999
4002
|
};
|
|
4000
4003
|
}
|
|
4001
4004
|
//#endregion
|
|
4002
|
-
export {
|
|
4005
|
+
export { tn as A, _n as C, cn as D, ln as E, Ft as F, Dt as I, vt as L, $t as M, Xt as N, on as O, Ht as P, vn as S, pn as T, Bn as _, Do as a, wn as b, _o as c, Tr as d, fr as f, Zn as g, tr as h, Ao as i, en as j, an as k, fo as l, ur as m, Ko as n, vo as o, dr as p, Io as r, bo as s, Jo as t, Dr as u, Fn as v, gn as w, Sn as x, Nn as y };
|