@templatical/editor 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-B0-U5-sb.js → AiChatSidebar-J8iO_sX7.js} +14 -14
- package/dist/{AiFeatureMenu-DxDwLS8B.js → AiFeatureMenu-F2diEDgV.js} +10 -10
- package/dist/{BlockIssueBadge-C-EPqWsh.js → BlockIssueBadge-a-qlByxF.js} +5 -5
- package/dist/{CloudEditor-DaEfipBn.js → CloudEditor-CDjtwb4i.js} +236 -234
- package/dist/{CollaboratorBar-DgwjisX2.js → CollaboratorBar-B_EnJLtW.js} +4 -4
- package/dist/{CommentsSidebar-CpRLN40c.js → CommentsSidebar-DaP9BA_r.js} +18 -18
- package/dist/{CountdownBlock-DO9fziwf.js → CountdownBlock-DtAokAVw.js} +3 -3
- package/dist/{CountdownToolbar-BeII06yJ.js → CountdownToolbar-Dtqgwy0g.js} +3 -3
- package/dist/{DesignReferenceSidebar-BgPDbOsl.js → DesignReferenceSidebar-BHRlTqlT.js} +10 -10
- package/dist/{IssuesPanel-I0z6k6-H.js → IssuesPanel-u7ee3Wrl.js} +11 -11
- package/dist/{LoadingTrack-C7mGWPHS.js → LoadingTrack-CV3ID80N.js} +1 -1
- package/dist/ModuleBrowserModal-DOsdaS6s.js +201 -0
- package/dist/{ModulePreviewCanvas-Dni9kK4j.js → ModulePreviewCanvas-Cx4MOJ0X.js} +3 -3
- package/dist/{NumberWithSuffix-D3fdj0iO.js → NumberWithSuffix-D2mW_DhT.js} +4 -4
- package/dist/{ParagraphEditor-CZ-cmhX3.js → ParagraphEditor-DMzkVnST.js} +153 -133
- package/dist/{RichTextEditorContent-Q5altsx1.js → RichTextEditorContent-CRCxCwKf.js} +7 -7
- package/dist/{SaveModuleDialog-C38VqN2T.js → SaveModuleDialog-DuEKgumL.js} +8 -8
- package/dist/{SnapshotHistory-ByloTpwh.js → SnapshotHistory-CVgiNJtE.js} +12 -12
- package/dist/{TemplateScoringPanel-CUxiPtEf.js → TemplateScoringPanel-lm0_9nYi.js} +25 -25
- package/dist/{TestEmailModal-BvZBMBad.js → TestEmailModal-WBMdiW5S.js} +5 -5
- package/dist/{TitleEditor-DbNOcvhR.js → TitleEditor-eyT0h-Sa.js} +71 -55
- package/dist/{TplModal-BYb-X5Bj.js → TplModal-tjQ7OB0g.js} +4 -4
- package/dist/{blockTypeIcons-CyAom3iI.js → blockTypeIcons-DdB3uTKD.js} +5 -5
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js → AiFeatureMenu-D7rB2SBs.js} +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js.map → AiFeatureMenu-D7rB2SBs.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js → BlockIssueBadge-DHOe0pgx.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js.map → BlockIssueBadge-DHOe0pgx.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BZuzsQOZ.js → CloudEditor-DNed_Ym0.js} +208 -206
- package/dist/cdn/chunks/CloudEditor-DNed_Ym0.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js → CollaboratorBar-sj_9Lee3.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js.map → CollaboratorBar-sj_9Lee3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js → CountdownBlock-C1Ikjpn4.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js.map → CountdownBlock-C1Ikjpn4.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js → CountdownToolbar-j1G_X8rB.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js.map → CountdownToolbar-j1G_X8rB.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js → IssuesPanel-CTOf3PsH.js} +11 -11
- package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js.map → IssuesPanel-CTOf3PsH.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-a-tZRCcD.js → ModuleBrowserModal-DCh88-rr.js} +11 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-a-tZRCcD.js.map → ModuleBrowserModal-DCh88-rr.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js → ModulePreviewCanvas-DJqvTKmg.js} +21 -21
- package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js.map → ModulePreviewCanvas-DJqvTKmg.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js → NumberWithSuffix-Bu45XWSl.js} +5 -5
- package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js.map → NumberWithSuffix-Bu45XWSl.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-pGrfSccu.js → ParagraphEditor-DwZqLJp2.js} +130 -110
- package/dist/cdn/chunks/ParagraphEditor-DwZqLJp2.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js → RichTextEditorContent-CIuZ-2DV.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js.map → RichTextEditorContent-CIuZ-2DV.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js → SaveModuleDialog-Bep0X2s_.js} +6 -6
- package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js.map → SaveModuleDialog-Bep0X2s_.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BvFbL16O.js → TitleEditor-DO1-h3RY.js} +62 -46
- package/dist/cdn/chunks/TitleEditor-DO1-h3RY.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-8o24HVJu.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-Kd1MT0u8.js.map → blockTypeIcons-8o24HVJu.js.map} +1 -1
- package/dist/{de-C2wOXoxs.js → cdn/chunks/de-LsV0u1tP.js} +19 -1
- package/dist/cdn/chunks/de-LsV0u1tP.js.map +1 -0
- package/dist/cdn/chunks/{draggable-Bci-fq8y.js → draggable-kPCz_3zM.js} +14 -5
- package/dist/cdn/chunks/{draggable-Bci-fq8y.js.map → draggable-kPCz_3zM.js.map} +1 -1
- package/dist/cdn/chunks/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +18 -2
- package/dist/cdn/chunks/en-Bb8X1bOs.js.map +1 -0
- package/dist/cdn/chunks/{extensions-CuUjSmuA.js → extensions-iwBXnEwq.js} +16 -16
- package/dist/cdn/chunks/{extensions-CuUjSmuA.js.map → extensions-iwBXnEwq.js.map} +1 -1
- package/dist/cdn/chunks/{features-DU6lA8l1.js → features-CkTMVylx.js} +940 -812
- package/dist/cdn/chunks/features-CkTMVylx.js.map +1 -0
- package/dist/cdn/chunks/{icons-BjHUZZyJ.js → icons-9zjCuoJx.js} +158 -152
- package/dist/cdn/chunks/icons-9zjCuoJx.js.map +1 -0
- package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +1 -1
- package/dist/cdn/chunks/{media-library-Byelliig.js → media-library-DMRIPx4g.js} +552 -550
- package/dist/cdn/chunks/{media-library-Byelliig.js.map → media-library-DMRIPx4g.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +18 -2
- package/dist/cdn/chunks/pt-BR-BwJY_cvb.js.map +1 -0
- package/dist/cdn/chunks/{pusher-BICWUP2j.js → pusher-CdEqyLwF.js} +6 -3
- package/dist/cdn/chunks/{pusher-BICWUP2j.js.map → pusher-CdEqyLwF.js.map} +1 -1
- package/dist/cdn/chunks/quality-CyeUgs_c.js +2176 -0
- package/dist/cdn/chunks/{quality-DNnYAntR.js.map → quality-CyeUgs_c.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-CZKO-Tav.js → renderer-BIKUEKDD.js} +39 -30
- package/dist/cdn/chunks/{renderer-CZKO-Tav.js.map → renderer-BIKUEKDD.js.map} +1 -1
- package/dist/cdn/chunks/{src-DsqSXXjk.js → src-pDy_imWG.js} +11 -11
- package/dist/cdn/chunks/{src-DsqSXXjk.js.map → src-pDy_imWG.js.map} +1 -1
- package/dist/cdn/chunks/{styles-DiAdtiz9.js → styles-D4Bd3SCx.js} +1197 -822
- package/dist/cdn/chunks/styles-D4Bd3SCx.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-CwScfbsM.js → tiptap-BlLFFU3M.js} +2233 -2213
- package/dist/cdn/chunks/tiptap-BlLFFU3M.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +117 -115
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-BRzXxFHr.js → check-CYJwFmjy.js} +1 -1
- package/dist/{chevron-down-DmEgzmYT.js → chevron-down-C5l-DzAA.js} +1 -1
- package/dist/{circle-alert-BStvZr3O.js → circle-alert-wf5HUFZY.js} +1 -1
- package/dist/{clock-Blwp_1R6.js → clock-Bj0bQw-K.js} +1 -1
- package/dist/{cloud-_olro76D.js → cloud-CoFDm9YA.js} +1 -1
- package/dist/{createLucideIcon-CmPAC-gt.js → createLucideIcon-Bad2kKE0.js} +4 -4
- package/dist/{cdn/chunks/de-C2wOXoxs.js → de-LsV0u1tP.js} +17 -3
- package/dist/{dist-BwgjpLfr.js → dist-34OcyoK1.js} +1 -1
- package/dist/{dist-Cz79qrLL.js → dist-B7w6xTU6.js} +1 -1
- package/dist/{dist-DULfKmTh.js → dist-BX3gGwL8.js} +5 -5
- package/dist/{dist-412xXefB.js → dist-Bn703mnA.js} +1 -1
- package/dist/{dist-u0iIJH3V.js → dist-CADDCv0o.js} +1 -1
- package/dist/{dist-BNEdeWub.js → dist-CGvz7vkq.js} +1 -1
- package/dist/{dist-BlG7k25W.js → dist-CLpPNKy9.js} +1 -1
- package/dist/{dist-BCQZZUE9.js → dist-ChMninLH.js} +1 -1
- package/dist/{dist-b7Ak-CuM.js → dist-CrQZ_af9.js} +1 -1
- package/dist/{dist-DhKTdU52.js → dist-CyjyYg52.js} +1426 -1406
- package/dist/{dist-D6x1cQeh.js → dist-Dd3ibRZm.js} +2 -2
- package/dist/{dist-Cgry6fNv.js → dist-DuCzdgDA.js} +1 -1
- package/dist/{dist-o73iaGqy.js → dist-U5vfDdYI.js} +1 -1
- package/dist/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +17 -1
- package/dist/{extensions-XPlNAKIL.js → extensions-J439b7y7.js} +5 -5
- package/dist/{image-up-BFPbw_Zq.js → image-up-x8-WXfsx.js} +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/{info-B_qLEBN2.js → info-RS_fGcGi.js} +1 -1
- package/dist/keys-DgYXDafq.js +10 -0
- package/dist/{list-checks-CGg7JxPm.js → list-checks-Bf7XdDyv.js} +1 -1
- package/dist/{loader-circle-CDF8eR_Q.js → loader-circle-CLZ0_FvW.js} +1 -1
- package/dist/{message-circle-C3cHsCJl.js → message-circle-B-1bN9ab.js} +1 -1
- package/dist/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +17 -1
- package/dist/{refresh-cw-Butml7Q4.js → refresh-cw-CWKWqJYG.js} +1 -1
- package/dist/scan-line-BtK5dEai.js +31 -0
- package/dist/{send-k7npFJNO.js → send-Cn1IUdzh.js} +1 -1
- package/dist/{shield-check-CV6GbmCu.js → shield-check-CrvMk4Ea.js} +1 -1
- package/dist/{sparkles-C965Xop4.js → sparkles-CgfjwvnG.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-D0RCAWhB.js → styles-BUwDOWd3.js} +1221 -846
- package/dist/templatical-editor.js +95 -93
- package/dist/{text-align-start-Bxnps8fH.js → text-align-start-C3r_Rnvy.js} +1 -1
- package/dist/{trash-2-DpGb7fIt.js → trash-2-CjERg4x9.js} +1 -1
- package/dist/{triangle-alert-BKYElAwz.js → triangle-alert-Chkny574.js} +1 -1
- package/dist/{upload-BF7sxd1_.js → upload-e5kDRkPb.js} +1 -1
- package/dist/{useAliveFlag-BinvbqQR.js → useAliveFlag-cUQj9rmB.js} +1 -1
- package/dist/{useCloudI18n-L3H2XvdW.js → useCloudI18n-CYJKqXtI.js} +2 -2
- package/dist/{useEditorCore-DKYZ7aKk.js → useEditorCore-8JxXDOA4.js} +1031 -903
- package/dist/{useI18n-CTs_bP9d.js → useI18n-BWqM8i78.js} +2 -2
- package/dist/{useMergeTag-e3RSY-s3.js → useMergeTag-NHC4ylza.js} +3 -3
- package/dist/usePopoverRoot-B1sdY4es.js +8 -0
- package/dist/{vue.runtime.esm-bundler-B2k01iQh.js → vue.runtime.esm-bundler-BPa483TZ.js} +13 -4
- package/dist/{x-CGjkjdKK.js → x-DiPIbccg.js} +1 -1
- package/package.json +12 -12
- package/dist/ModuleBrowserModal-DsZRr87F.js +0 -198
- package/dist/cdn/chunks/CloudEditor-BZuzsQOZ.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-pGrfSccu.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BvFbL16O.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-Kd1MT0u8.js +0 -22
- package/dist/cdn/chunks/de-C2wOXoxs.js.map +0 -1
- package/dist/cdn/chunks/en-dR7zfNC3.js.map +0 -1
- package/dist/cdn/chunks/features-DU6lA8l1.js.map +0 -1
- package/dist/cdn/chunks/icons-BjHUZZyJ.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BZ86xqK6.js.map +0 -1
- package/dist/cdn/chunks/quality-DNnYAntR.js +0 -2176
- package/dist/cdn/chunks/styles-DiAdtiz9.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CwScfbsM.js.map +0 -1
- package/dist/keys-mFiJ5N0_.js +0 -10
- package/dist/scan-line-XYEqim_E.js +0 -25
- package/dist/usePopoverRoot-DVh7NY1q.js +0 -8
|
@@ -1,26 +1,26 @@
|
|
|
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
|
|
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
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import "./useCloudI18n-
|
|
15
|
-
import { t as
|
|
16
|
-
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 j, q as ne, rt as M, s as re, st as N, tt as ie, v as P, w as F, x as ae, y as oe, z as se } from "./vue.runtime.esm-bundler-BPa483TZ.js";
|
|
2
|
+
import { A as ce, C as le, D as ue, E as de, M as fe, N as pe, O as me, S as he, _ as ge, b as _e, c as ve, d as ye, f as be, g as xe, h as Se, j as Ce, l as we, m as Te, n as Ee, o as De, p as Oe, r as ke, s as Ae, t as je, u as Me, v as Ne, w as Pe, x as Fe, y as Ie } from "./dist-BctFrpeA.js";
|
|
3
|
+
import { a as Le, d as Re, i as ze, l as Be, n as Ve, r as He, s as Ue, u as We } from "./dist-DuCzdgDA.js";
|
|
4
|
+
import { A as Ge, C as Ke, D as qe, E as Je, F as Ye, I as Xe, L as Ze, N as Qe, O as $e, P as et, S as tt, T as nt, _ as rt, a as it, b as at, d as ot, f as st, g as ct, h as lt, i as ut, k as dt, m as ft, n as pt, o as mt, p as ht, s as gt, u as _t, v as vt, w as yt, x as bt, y as xt } from "./keys-DgYXDafq.js";
|
|
5
|
+
import { t as St } from "./useI18n-BWqM8i78.js";
|
|
6
|
+
import { t as I } from "./createLucideIcon-Bad2kKE0.js";
|
|
7
|
+
import { t as Ct } from "./loader-circle-CLZ0_FvW.js";
|
|
8
|
+
import { t as wt } from "./message-circle-B-1bN9ab.js";
|
|
9
|
+
import { t as Tt } from "./trash-2-CjERg4x9.js";
|
|
10
|
+
import { t as Et } from "./triangle-alert-Chkny574.js";
|
|
11
|
+
import { t as Dt } from "./upload-e5kDRkPb.js";
|
|
12
|
+
import { t as Ot } from "./LoadingTrack-CV3ID80N.js";
|
|
13
|
+
import { t as kt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
14
|
+
import "./useCloudI18n-CYJKqXtI.js";
|
|
15
|
+
import { t as At } from "./useMergeTag-NHC4ylza.js";
|
|
16
|
+
import { t as jt } from "./useAliveFlag-cUQj9rmB.js";
|
|
17
17
|
//#region ../core/dist/index.js
|
|
18
|
-
function
|
|
18
|
+
function Mt(e) {
|
|
19
19
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Nt(e) {
|
|
22
22
|
let t = o({
|
|
23
|
-
content: e.content ??
|
|
23
|
+
content: e.content ?? ye(e.defaultFontFamily, e.templateDefaults),
|
|
24
24
|
selectedBlockId: null,
|
|
25
25
|
viewport: "desktop",
|
|
26
26
|
darkMode: !1,
|
|
@@ -104,17 +104,19 @@ function Ot(e) {
|
|
|
104
104
|
}, t.isDirty = !0;
|
|
105
105
|
}
|
|
106
106
|
function b(e, n, r = 0, a) {
|
|
107
|
-
if (n) {
|
|
108
|
-
if (
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
if (
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
107
|
+
if (!(n && e.type === "section")) {
|
|
108
|
+
if (n) {
|
|
109
|
+
if (c(n)) return;
|
|
110
|
+
let o = i(t.content.blocks, n);
|
|
111
|
+
if (o && o.type === "section") {
|
|
112
|
+
if (r < 0 || r >= Mt(o.columns)) return;
|
|
113
|
+
o.children[r] = o.children[r] || [];
|
|
114
|
+
let t = o.children[r];
|
|
115
|
+
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
116
|
+
}
|
|
117
|
+
} else a !== void 0 && a < t.content.blocks.length ? t.content.blocks.splice(a, 0, e) : t.content.blocks.push(e);
|
|
118
|
+
t.isDirty = !0;
|
|
119
|
+
}
|
|
118
120
|
}
|
|
119
121
|
function x(e) {
|
|
120
122
|
if (c(e)) return;
|
|
@@ -136,11 +138,11 @@ function Ot(e) {
|
|
|
136
138
|
let o = s(t.content.blocks, e);
|
|
137
139
|
if (!o) return;
|
|
138
140
|
let l = o.blocks.findIndex((t) => t.id === e);
|
|
139
|
-
if (l === -1) return;
|
|
141
|
+
if (l === -1 || r && o.blocks[l].type === "section") return;
|
|
140
142
|
let u;
|
|
141
143
|
if (r) {
|
|
142
144
|
let e = i(t.content.blocks, r);
|
|
143
|
-
if (!e || e.type !== "section" || a < 0 || a >=
|
|
145
|
+
if (!e || e.type !== "section" || a < 0 || a >= Mt(e.columns)) return;
|
|
144
146
|
e.children[a] = e.children[a] || [], u = e.children[a];
|
|
145
147
|
} else u = t.content.blocks;
|
|
146
148
|
let [d] = o.blocks.splice(l, 1);
|
|
@@ -169,11 +171,11 @@ function Ot(e) {
|
|
|
169
171
|
findBlockLocation: l
|
|
170
172
|
};
|
|
171
173
|
}
|
|
172
|
-
var
|
|
173
|
-
function
|
|
174
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
174
|
+
var Pt = 50, Ft = 300, It = 1500;
|
|
175
|
+
function Lt(e) {
|
|
176
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = Pt } = e, a = h([]), o = h([]), s = h(!1), c = null, l = null, u = m(() => a.value.length > 0), d = m(() => o.value.length > 0);
|
|
175
177
|
function f() {
|
|
176
|
-
return
|
|
178
|
+
return pe(t.value);
|
|
177
179
|
}
|
|
178
180
|
function p(e) {
|
|
179
181
|
a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
|
|
@@ -189,21 +191,21 @@ function Mt(e) {
|
|
|
189
191
|
if (l && l.blockId === e) {
|
|
190
192
|
clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
|
|
191
193
|
l = null;
|
|
192
|
-
},
|
|
194
|
+
}, Ft);
|
|
193
195
|
return;
|
|
194
196
|
}
|
|
195
197
|
g(), p(f()), o.value = [], l = {
|
|
196
198
|
blockId: e,
|
|
197
199
|
timeoutId: setTimeout(() => {
|
|
198
200
|
l = null;
|
|
199
|
-
},
|
|
201
|
+
}, Ft)
|
|
200
202
|
};
|
|
201
203
|
}
|
|
202
204
|
}
|
|
203
205
|
function y() {
|
|
204
206
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
205
207
|
s.value = !1, c = null;
|
|
206
|
-
},
|
|
208
|
+
}, It);
|
|
207
209
|
}
|
|
208
210
|
function b() {
|
|
209
211
|
if (a.value.length === 0) return;
|
|
@@ -235,23 +237,23 @@ function Mt(e) {
|
|
|
235
237
|
destroy: C
|
|
236
238
|
};
|
|
237
239
|
}
|
|
238
|
-
function
|
|
240
|
+
function Rt(e) {
|
|
239
241
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
240
242
|
...e,
|
|
241
|
-
id:
|
|
243
|
+
id: le(),
|
|
242
244
|
cells: e.cells.map((e) => ({
|
|
243
245
|
...e,
|
|
244
|
-
id:
|
|
246
|
+
id: le()
|
|
245
247
|
}))
|
|
246
248
|
})) : e.type === "social" ? e.icons = e.icons.map((e) => ({
|
|
247
249
|
...e,
|
|
248
|
-
id:
|
|
250
|
+
id: le()
|
|
249
251
|
})) : e.type === "menu" && (e.items = e.items.map((e) => ({
|
|
250
252
|
...e,
|
|
251
|
-
id:
|
|
253
|
+
id: le()
|
|
252
254
|
})));
|
|
253
255
|
}
|
|
254
|
-
function
|
|
256
|
+
function zt(e) {
|
|
255
257
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
256
258
|
function o(n, r, a) {
|
|
257
259
|
let o = Ae(n, e.blockDefaults);
|
|
@@ -259,9 +261,9 @@ function Pt(e) {
|
|
|
259
261
|
}
|
|
260
262
|
function s(e, n, r) {
|
|
261
263
|
let o = JSON.parse(JSON.stringify(e));
|
|
262
|
-
if (o.id =
|
|
264
|
+
if (o.id = le(), Rt(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
263
265
|
let t = JSON.parse(JSON.stringify(e));
|
|
264
|
-
return t.id =
|
|
266
|
+
return t.id = le(), Rt(t), t;
|
|
265
267
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
266
268
|
else {
|
|
267
269
|
let i = a?.(e.id) ?? null;
|
|
@@ -282,7 +284,7 @@ function Pt(e) {
|
|
|
282
284
|
updateBlockProperty: l
|
|
283
285
|
};
|
|
284
286
|
}
|
|
285
|
-
function
|
|
287
|
+
function Bt(e) {
|
|
286
288
|
let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
|
|
287
289
|
function c() {
|
|
288
290
|
return typeof a == "function" ? a() : a;
|
|
@@ -318,7 +320,7 @@ function Ft(e) {
|
|
|
318
320
|
destroy: h
|
|
319
321
|
};
|
|
320
322
|
}
|
|
321
|
-
function
|
|
323
|
+
function Vt(e) {
|
|
322
324
|
let t = o(/* @__PURE__ */ new Set()), n = m(() => t.size > 0);
|
|
323
325
|
function r(e) {
|
|
324
326
|
return t.has(e);
|
|
@@ -336,7 +338,7 @@ function It(e) {
|
|
|
336
338
|
hasHiddenBlocks: n
|
|
337
339
|
};
|
|
338
340
|
}
|
|
339
|
-
function
|
|
341
|
+
function Ht(e) {
|
|
340
342
|
let t = h(!1), n = h(!1), r = m(() => !!e.definition.value?.dataSource), i = m(() => r.value && !e.block.value.dataSourceFetched);
|
|
341
343
|
async function a() {
|
|
342
344
|
let r = e.definition.value;
|
|
@@ -366,7 +368,7 @@ function Lt(e) {
|
|
|
366
368
|
needsFetch: i
|
|
367
369
|
};
|
|
368
370
|
}
|
|
369
|
-
function
|
|
371
|
+
function Ut(e, t) {
|
|
370
372
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
371
373
|
e.addBlock = (r, i, a, o) => {
|
|
372
374
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -382,26 +384,26 @@ function Rt(e, t) {
|
|
|
382
384
|
}
|
|
383
385
|
//#endregion
|
|
384
386
|
//#region src/utils/activeEditorTracker.ts
|
|
385
|
-
var
|
|
386
|
-
function
|
|
387
|
-
let e = ++
|
|
388
|
-
return
|
|
387
|
+
var Wt = /* @__PURE__ */ new Set(), Gt = 0, Kt = 0;
|
|
388
|
+
function qt() {
|
|
389
|
+
let e = ++Kt;
|
|
390
|
+
return Wt.add(e), Gt === 0 && (Gt = e), {
|
|
389
391
|
id: e,
|
|
390
|
-
isActive: () =>
|
|
392
|
+
isActive: () => Wt.size <= 1 || Gt === e,
|
|
391
393
|
claim: () => {
|
|
392
|
-
|
|
394
|
+
Gt = e;
|
|
393
395
|
},
|
|
394
396
|
dispose: () => {
|
|
395
|
-
if (
|
|
396
|
-
let e = Array.from(
|
|
397
|
-
|
|
397
|
+
if (Wt.delete(e), Gt === e) {
|
|
398
|
+
let e = Array.from(Wt);
|
|
399
|
+
Gt = e[e.length - 1] ?? 0;
|
|
398
400
|
}
|
|
399
401
|
}
|
|
400
402
|
};
|
|
401
403
|
}
|
|
402
404
|
//#endregion
|
|
403
405
|
//#region src/composables/useMergeTagPicker.ts
|
|
404
|
-
function
|
|
406
|
+
function Jt() {
|
|
405
407
|
let e = h(!1), t = h([]), n = null;
|
|
406
408
|
function r(r) {
|
|
407
409
|
if (n) {
|
|
@@ -416,7 +418,7 @@ function Ut() {
|
|
|
416
418
|
let i = n;
|
|
417
419
|
n = null, e.value = !1, t.value = [], i && i(r);
|
|
418
420
|
}
|
|
419
|
-
return p() &&
|
|
421
|
+
return p() && ne(() => {
|
|
420
422
|
if (n) {
|
|
421
423
|
let e = n;
|
|
422
424
|
n = null, e(null);
|
|
@@ -430,18 +432,49 @@ function Ut() {
|
|
|
430
432
|
};
|
|
431
433
|
}
|
|
432
434
|
//#endregion
|
|
435
|
+
//#region src/composables/useLogicTagPicker.ts
|
|
436
|
+
function Yt() {
|
|
437
|
+
let e = h(!1), t = h([]), n = h([]), r = null;
|
|
438
|
+
function i(i, a) {
|
|
439
|
+
if (r) {
|
|
440
|
+
let e = r;
|
|
441
|
+
r = null, e(null);
|
|
442
|
+
}
|
|
443
|
+
return t.value = i, n.value = a, e.value = !0, new Promise((e) => {
|
|
444
|
+
r = e;
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
function a(i) {
|
|
448
|
+
let a = r;
|
|
449
|
+
r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
|
|
450
|
+
}
|
|
451
|
+
return p() && ne(() => {
|
|
452
|
+
if (r) {
|
|
453
|
+
let e = r;
|
|
454
|
+
r = null, e(null);
|
|
455
|
+
}
|
|
456
|
+
e.value = !1, t.value = [], n.value = [];
|
|
457
|
+
}), {
|
|
458
|
+
isOpen: e,
|
|
459
|
+
tags: t,
|
|
460
|
+
pairs: n,
|
|
461
|
+
open: i,
|
|
462
|
+
resolve: a
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
//#endregion
|
|
433
466
|
//#region src/composables/useTemplateLint.ts
|
|
434
|
-
function
|
|
467
|
+
function Xt(e) {
|
|
435
468
|
return e ? e.disabled === !0 ? !0 : e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
436
469
|
}
|
|
437
|
-
function
|
|
438
|
-
let t = h([]), n = h(!1), r = h(!1), i = d(null), a =
|
|
470
|
+
function Zt(e) {
|
|
471
|
+
let t = h([]), n = h(!1), r = h(!1), i = d(null), a = Xt(e.options), o = null, c = !1;
|
|
439
472
|
a || l();
|
|
440
473
|
async function l() {
|
|
441
474
|
try {
|
|
442
475
|
let t = await import("@templatical/quality");
|
|
443
476
|
if (c) return;
|
|
444
|
-
i.value = { lintTemplate: t.lintTemplate }, n.value = !0, u(), o =
|
|
477
|
+
i.value = { lintTemplate: t.lintTemplate }, n.value = !0, u(), o = Re(e.content, u, {
|
|
445
478
|
debounce: e.debounce ?? 500,
|
|
446
479
|
deep: !0
|
|
447
480
|
});
|
|
@@ -476,12 +509,12 @@ function Gt(e) {
|
|
|
476
509
|
}
|
|
477
510
|
//#endregion
|
|
478
511
|
//#region src/utils/blockTypeLabels.ts
|
|
479
|
-
function
|
|
512
|
+
function Qt(e, t) {
|
|
480
513
|
return t.blocks[e] ?? e;
|
|
481
514
|
}
|
|
482
515
|
//#endregion
|
|
483
516
|
//#region src/composables/useKeyboardReorder.ts
|
|
484
|
-
function
|
|
517
|
+
function $t(e, t) {
|
|
485
518
|
let n = h(null), r = h(""), i = null;
|
|
486
519
|
function a(t) {
|
|
487
520
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -508,7 +541,7 @@ function qt(e, t) {
|
|
|
508
541
|
let r = a(n);
|
|
509
542
|
if (!r) return "";
|
|
510
543
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
511
|
-
return i ?
|
|
544
|
+
return i ? Qt(i.type, t.t) : "";
|
|
512
545
|
}
|
|
513
546
|
function s(t, n) {
|
|
514
547
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -577,13 +610,13 @@ function qt(e, t) {
|
|
|
577
610
|
}
|
|
578
611
|
//#endregion
|
|
579
612
|
//#region src/composables/useUiTheme.ts
|
|
580
|
-
function
|
|
581
|
-
let t =
|
|
613
|
+
function en(e) {
|
|
614
|
+
let t = Le("(prefers-color-scheme: dark)");
|
|
582
615
|
return { resolvedTheme: x(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
583
616
|
}
|
|
584
617
|
//#endregion
|
|
585
618
|
//#region src/composables/useThemeStyles.ts
|
|
586
|
-
var
|
|
619
|
+
var tn = {
|
|
587
620
|
bg: "--tpl-bg",
|
|
588
621
|
bgElevated: "--tpl-bg-elevated",
|
|
589
622
|
bgHover: "--tpl-bg-hover",
|
|
@@ -607,10 +640,10 @@ var Yt = {
|
|
|
607
640
|
dangerLight: "--tpl-danger-light",
|
|
608
641
|
canvasBg: "--tpl-canvas-bg"
|
|
609
642
|
};
|
|
610
|
-
function
|
|
643
|
+
function nn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
611
644
|
return { themeStyles: x(() => {
|
|
612
645
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
613
|
-
if (a) for (let [e, t] of Object.entries(
|
|
646
|
+
if (a) for (let [e, t] of Object.entries(tn)) {
|
|
614
647
|
let n = a[e];
|
|
615
648
|
n && (r[t] = n);
|
|
616
649
|
}
|
|
@@ -619,27 +652,27 @@ function Xt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
619
652
|
}
|
|
620
653
|
//#endregion
|
|
621
654
|
//#region src/utils/logger.ts
|
|
622
|
-
var
|
|
623
|
-
function
|
|
655
|
+
var rn = "[Templatical]";
|
|
656
|
+
function an() {
|
|
624
657
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
625
658
|
}
|
|
626
|
-
var
|
|
659
|
+
var on = {
|
|
627
660
|
warn(...e) {
|
|
628
|
-
console.warn(
|
|
661
|
+
console.warn(rn, ...e);
|
|
629
662
|
},
|
|
630
663
|
error(...e) {
|
|
631
|
-
console.error(
|
|
664
|
+
console.error(rn, ...e);
|
|
632
665
|
},
|
|
633
666
|
debug(...e) {
|
|
634
|
-
|
|
667
|
+
an() || console.debug(rn, ...e);
|
|
635
668
|
},
|
|
636
669
|
info(...e) {
|
|
637
|
-
|
|
670
|
+
an() || console.info(rn, ...e);
|
|
638
671
|
}
|
|
639
672
|
};
|
|
640
673
|
//#endregion
|
|
641
674
|
//#region src/composables/useBlockRegistry.ts
|
|
642
|
-
function
|
|
675
|
+
function sn() {
|
|
643
676
|
let e = d(/* @__PURE__ */ new Map());
|
|
644
677
|
function t(t, n) {
|
|
645
678
|
e.value.set(t, n), k(e);
|
|
@@ -679,7 +712,7 @@ function en() {
|
|
|
679
712
|
strictFilters: !1
|
|
680
713
|
}).parseAndRender(t.template, e.fieldValues);
|
|
681
714
|
} catch (t) {
|
|
682
|
-
return
|
|
715
|
+
return on.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
683
716
|
}
|
|
684
717
|
}
|
|
685
718
|
function c(t) {
|
|
@@ -697,9 +730,9 @@ function en() {
|
|
|
697
730
|
}
|
|
698
731
|
//#endregion
|
|
699
732
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
700
|
-
function
|
|
733
|
+
function cn(e, t) {
|
|
701
734
|
return x(() => {
|
|
702
|
-
let n =
|
|
735
|
+
let n = ln(e.value.blocks);
|
|
703
736
|
if (n.size === 0) return [];
|
|
704
737
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
705
738
|
for (let e of n) {
|
|
@@ -711,53 +744,53 @@ function tn(e, t) {
|
|
|
711
744
|
return i;
|
|
712
745
|
});
|
|
713
746
|
}
|
|
714
|
-
function
|
|
747
|
+
function ln(e) {
|
|
715
748
|
let t = /* @__PURE__ */ new Set();
|
|
716
|
-
return
|
|
749
|
+
return un(e, t), t;
|
|
717
750
|
}
|
|
718
|
-
function
|
|
751
|
+
function un(e, t) {
|
|
719
752
|
for (let n of e) {
|
|
720
|
-
if (
|
|
753
|
+
if (ue(n)) {
|
|
721
754
|
t.add(n.customType);
|
|
722
755
|
continue;
|
|
723
756
|
}
|
|
724
757
|
if (n.type === "section") {
|
|
725
758
|
let e = n.children;
|
|
726
759
|
if (!e) continue;
|
|
727
|
-
for (let n of e)
|
|
760
|
+
for (let n of e) un(n, t);
|
|
728
761
|
}
|
|
729
762
|
}
|
|
730
763
|
}
|
|
731
764
|
//#endregion
|
|
732
765
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
733
|
-
var
|
|
766
|
+
var dn = [
|
|
734
767
|
{
|
|
735
768
|
type: "section",
|
|
736
|
-
createBlock:
|
|
769
|
+
createBlock: ge
|
|
737
770
|
},
|
|
738
771
|
{
|
|
739
772
|
type: "title",
|
|
740
|
-
createBlock:
|
|
773
|
+
createBlock: Fe
|
|
741
774
|
},
|
|
742
775
|
{
|
|
743
776
|
type: "paragraph",
|
|
744
|
-
createBlock:
|
|
777
|
+
createBlock: xe
|
|
745
778
|
},
|
|
746
779
|
{
|
|
747
780
|
type: "image",
|
|
748
|
-
createBlock:
|
|
781
|
+
createBlock: Te
|
|
749
782
|
},
|
|
750
783
|
{
|
|
751
784
|
type: "button",
|
|
752
|
-
createBlock:
|
|
785
|
+
createBlock: ve
|
|
753
786
|
},
|
|
754
787
|
{
|
|
755
788
|
type: "divider",
|
|
756
|
-
createBlock:
|
|
789
|
+
createBlock: be
|
|
757
790
|
},
|
|
758
791
|
{
|
|
759
792
|
type: "video",
|
|
760
|
-
createBlock:
|
|
793
|
+
createBlock: he
|
|
761
794
|
},
|
|
762
795
|
{
|
|
763
796
|
type: "social",
|
|
@@ -765,27 +798,27 @@ var an = [
|
|
|
765
798
|
},
|
|
766
799
|
{
|
|
767
800
|
type: "menu",
|
|
768
|
-
createBlock:
|
|
801
|
+
createBlock: Se
|
|
769
802
|
},
|
|
770
803
|
{
|
|
771
804
|
type: "table",
|
|
772
|
-
createBlock:
|
|
805
|
+
createBlock: _e
|
|
773
806
|
},
|
|
774
807
|
{
|
|
775
808
|
type: "spacer",
|
|
776
|
-
createBlock:
|
|
809
|
+
createBlock: Ie
|
|
777
810
|
},
|
|
778
811
|
{
|
|
779
812
|
type: "html",
|
|
780
|
-
createBlock:
|
|
813
|
+
createBlock: Oe
|
|
781
814
|
},
|
|
782
815
|
{
|
|
783
816
|
type: "countdown",
|
|
784
|
-
createBlock:
|
|
817
|
+
createBlock: we
|
|
785
818
|
}
|
|
786
819
|
];
|
|
787
|
-
function
|
|
788
|
-
for (let n of
|
|
820
|
+
function fn(e, t) {
|
|
821
|
+
for (let n of dn) {
|
|
789
822
|
let r = t[n.type];
|
|
790
823
|
r && e.registerBuiltIn(n.type, {
|
|
791
824
|
component: r,
|
|
@@ -795,7 +828,7 @@ function on(e, t) {
|
|
|
795
828
|
}
|
|
796
829
|
//#endregion
|
|
797
830
|
//#region src/utils/keyboardShortcuts.ts
|
|
798
|
-
function
|
|
831
|
+
function pn(e) {
|
|
799
832
|
for (let t of e.composedPath()) {
|
|
800
833
|
if (!(t instanceof HTMLElement)) continue;
|
|
801
834
|
if (t.isContentEditable) return !0;
|
|
@@ -804,14 +837,14 @@ function sn(e) {
|
|
|
804
837
|
}
|
|
805
838
|
return !1;
|
|
806
839
|
}
|
|
807
|
-
function
|
|
840
|
+
function mn(e, t) {
|
|
808
841
|
let n = e.metaKey || e.ctrlKey;
|
|
809
842
|
if (n && e.key.toLowerCase() === "s") {
|
|
810
843
|
e.preventDefault(), t.onSave?.();
|
|
811
844
|
return;
|
|
812
845
|
}
|
|
813
846
|
if (n && e.key.toLowerCase() === "z") {
|
|
814
|
-
if (
|
|
847
|
+
if (pn(e)) return;
|
|
815
848
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
816
849
|
return;
|
|
817
850
|
}
|
|
@@ -819,11 +852,11 @@ function cn(e, t) {
|
|
|
819
852
|
t.selectBlock(null);
|
|
820
853
|
return;
|
|
821
854
|
}
|
|
822
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
855
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !pn(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
823
856
|
}
|
|
824
857
|
//#endregion
|
|
825
858
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
826
|
-
var
|
|
859
|
+
var hn = { class: "tpl:text-center" }, gn = ["href"], _n = /* @__PURE__ */ y({
|
|
827
860
|
__name: "ButtonBlock",
|
|
828
861
|
props: {
|
|
829
862
|
block: {},
|
|
@@ -844,20 +877,17 @@ var ln = { class: "tpl:text-center" }, un = ["href"], dn = /* @__PURE__ */ y({
|
|
|
844
877
|
};
|
|
845
878
|
return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), n.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof n.block.width == "number" && (e.width = `${n.block.width}px`, e.boxSizing = "border-box"), e;
|
|
846
879
|
});
|
|
847
|
-
return (n, i) => (e(), w("div",
|
|
880
|
+
return (n, i) => (e(), w("div", hn, [C("a", {
|
|
848
881
|
href: t.block.url || "#",
|
|
849
882
|
style: A(r.value),
|
|
850
883
|
class: "tpl:cursor-default",
|
|
851
884
|
onClick: i[0] ||= b(() => {}, ["prevent"])
|
|
852
|
-
},
|
|
885
|
+
}, N(t.block.text), 13, gn)]));
|
|
853
886
|
}
|
|
854
|
-
}),
|
|
855
|
-
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",
|
|
856
|
-
key: "sc7q7i"
|
|
857
|
-
}]]), pn = P("bookmark", [["path", {
|
|
887
|
+
}), vn = I("bookmark", [["path", {
|
|
858
888
|
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",
|
|
859
889
|
key: "oz39mx"
|
|
860
|
-
}]]),
|
|
890
|
+
}]]), yn = I("box", [
|
|
861
891
|
["path", {
|
|
862
892
|
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",
|
|
863
893
|
key: "hh9hay"
|
|
@@ -870,13 +900,13 @@ var ln = { class: "tpl:text-center" }, un = ["href"], dn = /* @__PURE__ */ y({
|
|
|
870
900
|
d: "M12 22V12",
|
|
871
901
|
key: "d0xqtd"
|
|
872
902
|
}]
|
|
873
|
-
]),
|
|
903
|
+
]), bn = I("code", [["path", {
|
|
874
904
|
d: "m16 18 6-6-6-6",
|
|
875
905
|
key: "eg8j8"
|
|
876
906
|
}], ["path", {
|
|
877
907
|
d: "m8 6-6 6 6 6",
|
|
878
908
|
key: "ppft3o"
|
|
879
|
-
}]]),
|
|
909
|
+
}]]), xn = I("copy", [["rect", {
|
|
880
910
|
width: "14",
|
|
881
911
|
height: "14",
|
|
882
912
|
x: "8",
|
|
@@ -887,7 +917,7 @@ var ln = { class: "tpl:text-center" }, un = ["href"], dn = /* @__PURE__ */ y({
|
|
|
887
917
|
}], ["path", {
|
|
888
918
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
889
919
|
key: "zix9uf"
|
|
890
|
-
}]]),
|
|
920
|
+
}]]), Sn = I("eye-off", [
|
|
891
921
|
["path", {
|
|
892
922
|
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",
|
|
893
923
|
key: "ct8e1f"
|
|
@@ -904,7 +934,10 @@ var ln = { class: "tpl:text-center" }, un = ["href"], dn = /* @__PURE__ */ y({
|
|
|
904
934
|
d: "m2 2 20 20",
|
|
905
935
|
key: "1ooewy"
|
|
906
936
|
}]
|
|
907
|
-
]),
|
|
937
|
+
]), Cn = I("funnel", [["path", {
|
|
938
|
+
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",
|
|
939
|
+
key: "sc7q7i"
|
|
940
|
+
}]]), wn = I("grip-vertical", [
|
|
908
941
|
["circle", {
|
|
909
942
|
cx: "9",
|
|
910
943
|
cy: "12",
|
|
@@ -941,7 +974,7 @@ var ln = { class: "tpl:text-center" }, un = ["href"], dn = /* @__PURE__ */ y({
|
|
|
941
974
|
r: "1",
|
|
942
975
|
key: "f4zoj3"
|
|
943
976
|
}]
|
|
944
|
-
]),
|
|
977
|
+
]), Tn = I("image", [
|
|
945
978
|
["rect", {
|
|
946
979
|
width: "18",
|
|
947
980
|
height: "18",
|
|
@@ -961,13 +994,13 @@ var ln = { class: "tpl:text-center" }, un = ["href"], dn = /* @__PURE__ */ y({
|
|
|
961
994
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
962
995
|
key: "1xmnt7"
|
|
963
996
|
}]
|
|
964
|
-
]),
|
|
997
|
+
]), En = I("navigation", [["polygon", {
|
|
965
998
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
966
999
|
key: "1ltx0t"
|
|
967
|
-
}]]),
|
|
1000
|
+
}]]), Dn = I("puzzle", [["path", {
|
|
968
1001
|
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",
|
|
969
1002
|
key: "w46dr5"
|
|
970
|
-
}]]),
|
|
1003
|
+
}]]), On = I("share-2", [
|
|
971
1004
|
["circle", {
|
|
972
1005
|
cx: "18",
|
|
973
1006
|
cy: "5",
|
|
@@ -1000,7 +1033,7 @@ var ln = { class: "tpl:text-center" }, un = ["href"], dn = /* @__PURE__ */ y({
|
|
|
1000
1033
|
y2: "10.49",
|
|
1001
1034
|
key: "1n3mei"
|
|
1002
1035
|
}]
|
|
1003
|
-
]),
|
|
1036
|
+
]), kn = I("table", [
|
|
1004
1037
|
["path", {
|
|
1005
1038
|
d: "M12 3v18",
|
|
1006
1039
|
key: "108xh3"
|
|
@@ -1021,7 +1054,7 @@ var ln = { class: "tpl:text-center" }, un = ["href"], dn = /* @__PURE__ */ y({
|
|
|
1021
1054
|
d: "M3 15h18",
|
|
1022
1055
|
key: "5xshup"
|
|
1023
1056
|
}]
|
|
1024
|
-
]),
|
|
1057
|
+
]), An = I("video", [["path", {
|
|
1025
1058
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1026
1059
|
key: "ftymec"
|
|
1027
1060
|
}], ["rect", {
|
|
@@ -1031,11 +1064,11 @@ var ln = { class: "tpl:text-center" }, un = ["href"], dn = /* @__PURE__ */ y({
|
|
|
1031
1064
|
height: "12",
|
|
1032
1065
|
rx: "2",
|
|
1033
1066
|
key: "158x01"
|
|
1034
|
-
}]]),
|
|
1067
|
+
}]]), jn = ["innerHTML"], Mn = [
|
|
1035
1068
|
"src",
|
|
1036
1069
|
"width",
|
|
1037
1070
|
"height"
|
|
1038
|
-
],
|
|
1071
|
+
], Nn = /* @__PURE__ */ y({
|
|
1039
1072
|
__name: "CustomBlockIcon",
|
|
1040
1073
|
props: {
|
|
1041
1074
|
icon: {},
|
|
@@ -1051,14 +1084,14 @@ var ln = { class: "tpl:text-center" }, un = ["href"], dn = /* @__PURE__ */ y({
|
|
|
1051
1084
|
height: `${r.value}px`
|
|
1052
1085
|
}),
|
|
1053
1086
|
innerHTML: t.icon
|
|
1054
|
-
}, null, 12,
|
|
1087
|
+
}, null, 12, jn)) : a.value ? (e(), w("img", {
|
|
1055
1088
|
key: 1,
|
|
1056
1089
|
src: t.icon,
|
|
1057
1090
|
width: r.value,
|
|
1058
1091
|
height: r.value,
|
|
1059
1092
|
class: "tpl:inline-block",
|
|
1060
1093
|
alt: ""
|
|
1061
|
-
}, null, 8,
|
|
1094
|
+
}, null, 8, Mn)) : (e(), j(M(yn), {
|
|
1062
1095
|
key: 2,
|
|
1063
1096
|
size: r.value,
|
|
1064
1097
|
"stroke-width": 1.5
|
|
@@ -1067,16 +1100,16 @@ var ln = { class: "tpl:text-center" }, un = ["href"], dn = /* @__PURE__ */ y({
|
|
|
1067
1100
|
});
|
|
1068
1101
|
//#endregion
|
|
1069
1102
|
//#region src/composables/useEditorRoot.ts
|
|
1070
|
-
function
|
|
1071
|
-
return
|
|
1103
|
+
function Pn() {
|
|
1104
|
+
return F(lt, document) ?? document;
|
|
1072
1105
|
}
|
|
1073
1106
|
//#endregion
|
|
1074
1107
|
//#region src/composables/useFocusTrap.ts
|
|
1075
|
-
var
|
|
1076
|
-
function
|
|
1077
|
-
let n =
|
|
1108
|
+
var Fn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1109
|
+
function In(e, t) {
|
|
1110
|
+
let n = Pn(), r = null, i = null, a = null;
|
|
1078
1111
|
function o() {
|
|
1079
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1112
|
+
return e.value ? Array.from(e.value.querySelectorAll(Fn)).filter((e) => e.offsetParent !== null) : [];
|
|
1080
1113
|
}
|
|
1081
1114
|
function c(e) {
|
|
1082
1115
|
if (e.key !== "Tab") return;
|
|
@@ -1091,7 +1124,7 @@ function An(e, t) {
|
|
|
1091
1124
|
a = null;
|
|
1092
1125
|
let t = o();
|
|
1093
1126
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1094
|
-
}), i =
|
|
1127
|
+
}), i = ze(e, "keydown", c);
|
|
1095
1128
|
}
|
|
1096
1129
|
function u(e = {}) {
|
|
1097
1130
|
let t = e.restoreFocus !== !1;
|
|
@@ -1100,15 +1133,15 @@ function An(e, t) {
|
|
|
1100
1133
|
let d = s([t, e], ([e, t]) => {
|
|
1101
1134
|
e && t ? l() : u();
|
|
1102
1135
|
}, { flush: "post" });
|
|
1103
|
-
|
|
1136
|
+
ne(() => {
|
|
1104
1137
|
d(), u();
|
|
1105
1138
|
});
|
|
1106
1139
|
}
|
|
1107
1140
|
//#endregion
|
|
1108
1141
|
//#region src/composables/useEmoji.ts
|
|
1109
|
-
function
|
|
1110
|
-
let [e, t] =
|
|
1111
|
-
|
|
1142
|
+
function Ln() {
|
|
1143
|
+
let [e, t] = We(!1), n = d([]), r = !1;
|
|
1144
|
+
ne(() => {
|
|
1112
1145
|
r = !0;
|
|
1113
1146
|
}), s(e, async (e) => {
|
|
1114
1147
|
if (e && n.value.length === 0) {
|
|
@@ -1132,7 +1165,7 @@ function jn() {
|
|
|
1132
1165
|
}
|
|
1133
1166
|
//#endregion
|
|
1134
1167
|
//#region src/composables/useDragDrop.ts
|
|
1135
|
-
function
|
|
1168
|
+
function Rn(e) {
|
|
1136
1169
|
let { onBlockMove: t, onBlockAdd: n } = e, r = h(!1), i = h(null), a = h(null);
|
|
1137
1170
|
function o(e) {
|
|
1138
1171
|
r.value = !0, i.value = e;
|
|
@@ -1182,7 +1215,7 @@ function Mn(e) {
|
|
|
1182
1215
|
}
|
|
1183
1216
|
//#endregion
|
|
1184
1217
|
//#region src/composables/useFonts.ts
|
|
1185
|
-
var
|
|
1218
|
+
var zn = [
|
|
1186
1219
|
{
|
|
1187
1220
|
value: "Arial",
|
|
1188
1221
|
label: "Arial"
|
|
@@ -1211,7 +1244,7 @@ var Nn = [
|
|
|
1211
1244
|
value: "Courier New",
|
|
1212
1245
|
label: "Courier New"
|
|
1213
1246
|
}
|
|
1214
|
-
],
|
|
1247
|
+
], Bn = {
|
|
1215
1248
|
arial: "Arial, sans-serif",
|
|
1216
1249
|
helvetica: "Helvetica, sans-serif",
|
|
1217
1250
|
georgia: "Georgia, serif",
|
|
@@ -1219,14 +1252,14 @@ var Nn = [
|
|
|
1219
1252
|
verdana: "Verdana, sans-serif",
|
|
1220
1253
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1221
1254
|
"courier new": "'Courier New', monospace"
|
|
1222
|
-
},
|
|
1223
|
-
function
|
|
1224
|
-
let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ??
|
|
1255
|
+
}, Vn = "Arial, sans-serif";
|
|
1256
|
+
function Hn(e) {
|
|
1257
|
+
let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ?? Vn);
|
|
1225
1258
|
function a(e) {
|
|
1226
1259
|
n.value = e;
|
|
1227
1260
|
}
|
|
1228
1261
|
let o = x(() => {
|
|
1229
|
-
let e = [...
|
|
1262
|
+
let e = [...zn];
|
|
1230
1263
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
1231
1264
|
let r = t.value.map((e) => ({
|
|
1232
1265
|
value: e.name,
|
|
@@ -1239,17 +1272,17 @@ function In(e) {
|
|
|
1239
1272
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1240
1273
|
}
|
|
1241
1274
|
function c(e) {
|
|
1242
|
-
return
|
|
1275
|
+
return zn.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1243
1276
|
}
|
|
1244
1277
|
function l() {
|
|
1245
1278
|
if (e?.defaultFont) {
|
|
1246
|
-
if (!n.value && !c(e.defaultFont)) return
|
|
1279
|
+
if (!n.value && !c(e.defaultFont)) return Vn;
|
|
1247
1280
|
if (s(e.defaultFont)) {
|
|
1248
1281
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1249
1282
|
if (t) return t.value;
|
|
1250
1283
|
}
|
|
1251
1284
|
}
|
|
1252
|
-
return
|
|
1285
|
+
return Vn;
|
|
1253
1286
|
}
|
|
1254
1287
|
let u = x(() => l());
|
|
1255
1288
|
function d(e) {
|
|
@@ -1259,7 +1292,7 @@ function In(e) {
|
|
|
1259
1292
|
let e = n.fallback ?? i.value;
|
|
1260
1293
|
return `'${n.name}', ${e}`;
|
|
1261
1294
|
}
|
|
1262
|
-
return
|
|
1295
|
+
return Bn[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1263
1296
|
}
|
|
1264
1297
|
let f = [], m = !1;
|
|
1265
1298
|
async function g() {
|
|
@@ -1275,7 +1308,7 @@ function In(e) {
|
|
|
1275
1308
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1276
1309
|
});
|
|
1277
1310
|
} catch (t) {
|
|
1278
|
-
|
|
1311
|
+
on.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1279
1312
|
}
|
|
1280
1313
|
});
|
|
1281
1314
|
await Promise.allSettled(e), !m && (r.value = !0);
|
|
@@ -1284,7 +1317,7 @@ function In(e) {
|
|
|
1284
1317
|
for (let e of f) e.remove();
|
|
1285
1318
|
f.length = 0;
|
|
1286
1319
|
}
|
|
1287
|
-
return p() &&
|
|
1320
|
+
return p() && ne(() => {
|
|
1288
1321
|
m = !0, _();
|
|
1289
1322
|
}), {
|
|
1290
1323
|
fonts: o,
|
|
@@ -1301,12 +1334,79 @@ function In(e) {
|
|
|
1301
1334
|
};
|
|
1302
1335
|
}
|
|
1303
1336
|
//#endregion
|
|
1337
|
+
//#region src/composables/useLogicTag.ts
|
|
1338
|
+
function Un() {
|
|
1339
|
+
let e = F(at, []), t = F(xt, []), n = F(nt, ke.liquid), r = F(Je, null), i = F(bt, null), a = h(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
|
|
1340
|
+
async function c() {
|
|
1341
|
+
if (r) {
|
|
1342
|
+
a.value = !0;
|
|
1343
|
+
try {
|
|
1344
|
+
return await r();
|
|
1345
|
+
} finally {
|
|
1346
|
+
a.value = !1;
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
if (i && s) {
|
|
1350
|
+
a.value = !0;
|
|
1351
|
+
try {
|
|
1352
|
+
return await i.open(e, t);
|
|
1353
|
+
} finally {
|
|
1354
|
+
a.value = !1;
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
return null;
|
|
1358
|
+
}
|
|
1359
|
+
return {
|
|
1360
|
+
logicTags: e,
|
|
1361
|
+
logicPairs: t,
|
|
1362
|
+
syntax: n,
|
|
1363
|
+
canInsertLogicTag: o,
|
|
1364
|
+
isRequesting: a,
|
|
1365
|
+
requestLogicTag: c
|
|
1366
|
+
};
|
|
1367
|
+
}
|
|
1368
|
+
//#endregion
|
|
1369
|
+
//#region src/utils/mergeTagNodeSpec.ts
|
|
1370
|
+
function Wn(e, t, n) {
|
|
1371
|
+
return me(e, n) ? {
|
|
1372
|
+
type: "logicMergeTagNode",
|
|
1373
|
+
attrs: {
|
|
1374
|
+
value: e,
|
|
1375
|
+
keyword: Pe(e, n)
|
|
1376
|
+
}
|
|
1377
|
+
} : {
|
|
1378
|
+
type: "mergeTagNode",
|
|
1379
|
+
attrs: {
|
|
1380
|
+
label: t,
|
|
1381
|
+
value: e
|
|
1382
|
+
}
|
|
1383
|
+
};
|
|
1384
|
+
}
|
|
1385
|
+
//#endregion
|
|
1386
|
+
//#region src/utils/insertLogicTag.ts
|
|
1387
|
+
function Gn(e) {
|
|
1388
|
+
return "before" in e && "after" in e;
|
|
1389
|
+
}
|
|
1390
|
+
function Kn(e, t, n) {
|
|
1391
|
+
if (!Gn(t)) {
|
|
1392
|
+
e.chain().focus().insertContent(Wn(t.value, t.label, n)).run();
|
|
1393
|
+
return;
|
|
1394
|
+
}
|
|
1395
|
+
let r = Wn(t.before, t.label, n), i = Wn(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1396
|
+
if (a !== o) {
|
|
1397
|
+
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1398
|
+
return;
|
|
1399
|
+
}
|
|
1400
|
+
e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run();
|
|
1401
|
+
}
|
|
1402
|
+
//#endregion
|
|
1304
1403
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1305
|
-
function
|
|
1404
|
+
function qn(e) {
|
|
1306
1405
|
let t = h(!1), n = h(""), r = h(null);
|
|
1307
|
-
|
|
1406
|
+
In(r, t);
|
|
1308
1407
|
function i() {
|
|
1309
|
-
|
|
1408
|
+
let r = e.value?.getAttributes("link").href || "";
|
|
1409
|
+
n.value = r, t.value = !0;
|
|
1310
1410
|
}
|
|
1311
1411
|
function a() {
|
|
1312
1412
|
if (n.value) {
|
|
@@ -1355,20 +1455,20 @@ function Ln(e) {
|
|
|
1355
1455
|
}
|
|
1356
1456
|
//#endregion
|
|
1357
1457
|
//#region src/composables/useRichTextEditor.ts
|
|
1358
|
-
function
|
|
1359
|
-
let t =
|
|
1360
|
-
async function
|
|
1361
|
-
|
|
1458
|
+
function Jn(e) {
|
|
1459
|
+
let t = F(ft, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = At(), { canInsertLogicTag: f, isRequesting: p, requestLogicTag: m } = Un(), g = F(Ye, null), _ = (a(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", v = de(l), y = d(null), { showLinkDialog: b, linkUrl: x, linkDialogRef: S, openLinkDialog: C, insertLink: w, removeLink: T, closeLinkDialog: E, handleLinkKeydown: ee } = qn(y), { start: D, stop: O } = Be(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), k = d(null), te = h(!0), A = h(null), j = !1;
|
|
1460
|
+
async function ne() {
|
|
1461
|
+
A.value = null, te.value = !0;
|
|
1362
1462
|
try {
|
|
1363
1463
|
let { TiptapEditor: n, EC: i, extensions: a } = await e.loadExtensions({
|
|
1364
1464
|
mergeTags: r,
|
|
1365
1465
|
syntax: l,
|
|
1366
|
-
triggerChar:
|
|
1466
|
+
triggerChar: v,
|
|
1367
1467
|
autocompleteEnabled: u,
|
|
1368
|
-
suggestionEmptyText:
|
|
1468
|
+
suggestionEmptyText: _
|
|
1369
1469
|
});
|
|
1370
|
-
if (
|
|
1371
|
-
|
|
1470
|
+
if (j) return;
|
|
1471
|
+
k.value = i;
|
|
1372
1472
|
let o = /* @__PURE__ */ new Map();
|
|
1373
1473
|
a.forEach((e, t) => o.set(e.name, t));
|
|
1374
1474
|
let s = new n({
|
|
@@ -1376,88 +1476,95 @@ function Rn(e) {
|
|
|
1376
1476
|
content: e.blockContent(),
|
|
1377
1477
|
editable: !0,
|
|
1378
1478
|
onUpdate: ({ editor: n }) => {
|
|
1379
|
-
|
|
1479
|
+
j || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
|
|
1380
1480
|
}
|
|
1381
1481
|
});
|
|
1382
|
-
if (
|
|
1482
|
+
if (j) {
|
|
1383
1483
|
s.destroy();
|
|
1384
1484
|
return;
|
|
1385
1485
|
}
|
|
1386
|
-
|
|
1486
|
+
y.value = s, te.value = !1, D();
|
|
1387
1487
|
} catch (t) {
|
|
1388
|
-
if (
|
|
1389
|
-
|
|
1488
|
+
if (j) return;
|
|
1489
|
+
on.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), A.value = t instanceof Error ? t.message : "Failed to load editor", te.value = !1;
|
|
1390
1490
|
}
|
|
1391
1491
|
}
|
|
1392
|
-
function
|
|
1393
|
-
|
|
1492
|
+
function M() {
|
|
1493
|
+
y.value?.destroy(), y.value = null, ne();
|
|
1394
1494
|
}
|
|
1395
|
-
|
|
1396
|
-
let
|
|
1397
|
-
|
|
1495
|
+
ne();
|
|
1496
|
+
let re = s(() => e.blockContent(), (e) => {
|
|
1497
|
+
y.value && y.value.getHTML() !== e && y.value.commands.setContent(e, { emitUpdate: !1 });
|
|
1398
1498
|
});
|
|
1399
|
-
function
|
|
1400
|
-
if (o.value) return;
|
|
1499
|
+
function N(t) {
|
|
1500
|
+
if (o.value || p.value) return;
|
|
1401
1501
|
let n = t.composedPath().find((e) => e instanceof HTMLElement);
|
|
1402
1502
|
n && (e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone());
|
|
1403
1503
|
}
|
|
1404
|
-
|
|
1405
|
-
|
|
1504
|
+
ze(document, "mousedown", N), n(() => {
|
|
1505
|
+
j = !0, re(), O(), y.value?.destroy();
|
|
1406
1506
|
});
|
|
1407
|
-
async function
|
|
1507
|
+
async function ie() {
|
|
1408
1508
|
let e = await c();
|
|
1409
|
-
|
|
1509
|
+
j || (e && y.value ? y.value.chain().focus().insertMergeTag({
|
|
1410
1510
|
label: e.label,
|
|
1411
1511
|
value: e.value
|
|
1412
|
-
}).run() :
|
|
1512
|
+
}).run() : y.value?.commands.focus());
|
|
1513
|
+
}
|
|
1514
|
+
async function P() {
|
|
1515
|
+
let e = await m();
|
|
1516
|
+
j || (e && y.value ? Kn(y.value, e, l) : y.value?.commands.focus());
|
|
1413
1517
|
}
|
|
1414
1518
|
return {
|
|
1415
|
-
editor:
|
|
1416
|
-
EditorContent:
|
|
1417
|
-
isLoading:
|
|
1418
|
-
initError:
|
|
1419
|
-
retry:
|
|
1420
|
-
showLinkDialog:
|
|
1421
|
-
linkUrl:
|
|
1422
|
-
linkDialogRef:
|
|
1519
|
+
editor: y,
|
|
1520
|
+
EditorContent: k,
|
|
1521
|
+
isLoading: te,
|
|
1522
|
+
initError: A,
|
|
1523
|
+
retry: M,
|
|
1524
|
+
showLinkDialog: b,
|
|
1525
|
+
linkUrl: x,
|
|
1526
|
+
linkDialogRef: S,
|
|
1423
1527
|
mergeTags: r,
|
|
1424
1528
|
canRequestMergeTag: i,
|
|
1425
1529
|
isRequestingMergeTag: o,
|
|
1426
1530
|
syntax: l,
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1531
|
+
canInsertLogicTag: f,
|
|
1532
|
+
isRequestingLogicTag: p,
|
|
1533
|
+
openLinkDialog: C,
|
|
1534
|
+
insertLink: w,
|
|
1535
|
+
removeLink: T,
|
|
1536
|
+
closeLinkDialog: E,
|
|
1537
|
+
handleLinkKeydown: ee,
|
|
1538
|
+
handleAddMergeTag: ie,
|
|
1539
|
+
handleAddLogicTag: P
|
|
1433
1540
|
};
|
|
1434
1541
|
}
|
|
1435
1542
|
//#endregion
|
|
1436
1543
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1437
|
-
var
|
|
1438
|
-
function
|
|
1439
|
-
let t =
|
|
1544
|
+
var Yn = "(max-width: 767px)";
|
|
1545
|
+
function Xn(e) {
|
|
1546
|
+
let t = Le(Yn);
|
|
1440
1547
|
return {
|
|
1441
1548
|
isSmallScreen: t,
|
|
1442
|
-
showNotice: x(() => (
|
|
1549
|
+
showNotice: x(() => (ie(e) ?? !0) && t.value)
|
|
1443
1550
|
};
|
|
1444
1551
|
}
|
|
1445
1552
|
//#endregion
|
|
1446
1553
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1447
|
-
var
|
|
1554
|
+
var Zn = { class: "tpl:w-full" }, Qn = {
|
|
1448
1555
|
key: 0,
|
|
1449
1556
|
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)]"
|
|
1450
|
-
},
|
|
1557
|
+
}, $n = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, er = {
|
|
1451
1558
|
key: 1,
|
|
1452
1559
|
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)]"
|
|
1453
|
-
},
|
|
1560
|
+
}, tr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, nr = {
|
|
1454
1561
|
key: 2,
|
|
1455
1562
|
class: "tpl:relative"
|
|
1456
|
-
},
|
|
1563
|
+
}, rr = ["innerHTML"], ir = {
|
|
1457
1564
|
key: 0,
|
|
1458
1565
|
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]",
|
|
1459
1566
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1460
|
-
},
|
|
1567
|
+
}, ar = /* @__PURE__ */ y({
|
|
1461
1568
|
__name: "CustomBlock",
|
|
1462
1569
|
props: {
|
|
1463
1570
|
block: {},
|
|
@@ -1465,7 +1572,7 @@ var Vn = { class: "tpl:w-full" }, Hn = {
|
|
|
1465
1572
|
},
|
|
1466
1573
|
emits: ["fetchData"],
|
|
1467
1574
|
setup(t, { emit: n }) {
|
|
1468
|
-
let r = t, i = n, { t: a } =
|
|
1575
|
+
let r = t, i = n, { t: a } = St(), o = F(mt, 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 } = Ht({
|
|
1469
1576
|
definition: d,
|
|
1470
1577
|
block: x(() => r.block),
|
|
1471
1578
|
onUpdate: (e, t) => {
|
|
@@ -1486,32 +1593,32 @@ var Vn = { class: "tpl:w-full" }, Hn = {
|
|
|
1486
1593
|
}
|
|
1487
1594
|
}
|
|
1488
1595
|
}
|
|
1489
|
-
let S =
|
|
1596
|
+
let S = Ue(y, 150);
|
|
1490
1597
|
return u(() => {
|
|
1491
1598
|
y();
|
|
1492
1599
|
}), s(() => r.block.fieldValues, () => {
|
|
1493
1600
|
S();
|
|
1494
|
-
}, { deep: !0 }), (t, n) => (e(), w("div",
|
|
1601
|
+
}, { deep: !0 }), (t, n) => (e(), w("div", Zn, [f.value ? l.value ? (e(), w("div", er, [P(M(Et), {
|
|
1495
1602
|
size: 24,
|
|
1496
1603
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1497
|
-
}), C("span",
|
|
1604
|
+
}), C("span", tr, N(M(a).customBlocks.renderError), 1)])) : (e(), w("div", nr, [C("div", { innerHTML: c.value }, null, 8, rr), M(v) && M(g) ? (e(), w("div", ir, [M(p) ? (e(), j(Ot, {
|
|
1498
1605
|
key: 1,
|
|
1499
1606
|
class: "tpl:w-48"
|
|
1500
1607
|
})) : (e(), w("button", {
|
|
1501
1608
|
key: 0,
|
|
1502
1609
|
type: "button",
|
|
1503
1610
|
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)]",
|
|
1504
|
-
onClick: n[0] ||= b((...e) =>
|
|
1505
|
-
}, [d.value?.icon ? (e(),
|
|
1611
|
+
onClick: n[0] ||= b((...e) => M(m) && M(m)(...e), ["stop"])
|
|
1612
|
+
}, [d.value?.icon ? (e(), j(Nn, {
|
|
1506
1613
|
key: 0,
|
|
1507
1614
|
icon: d.value.icon,
|
|
1508
1615
|
size: 16
|
|
1509
|
-
}, null, 8, ["icon"])) : O("", !0), _(" " +
|
|
1616
|
+
}, null, 8, ["icon"])) : O("", !0), _(" " + N(d.value?.dataSource?.label || M(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div", Qn, [P(M(Dn), {
|
|
1510
1617
|
size: 24,
|
|
1511
1618
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1512
|
-
}), C("span",
|
|
1619
|
+
}), C("span", $n, N(M(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1513
1620
|
}
|
|
1514
|
-
}),
|
|
1621
|
+
}), or = { class: "tpl:w-full" }, sr = /* @__PURE__ */ y({
|
|
1515
1622
|
__name: "DividerBlock",
|
|
1516
1623
|
props: {
|
|
1517
1624
|
block: {},
|
|
@@ -1523,37 +1630,37 @@ var Vn = { class: "tpl:w-full" }, Hn = {
|
|
|
1523
1630
|
width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
|
|
1524
1631
|
margin: n.block.width === "full" ? "0" : "0 auto"
|
|
1525
1632
|
}));
|
|
1526
|
-
return (t, n) => (e(), w("div",
|
|
1633
|
+
return (t, n) => (e(), w("div", or, [C("hr", {
|
|
1527
1634
|
class: "tpl:m-0 tpl:border-none",
|
|
1528
1635
|
style: A(r.value)
|
|
1529
1636
|
}, null, 4)]));
|
|
1530
1637
|
}
|
|
1531
|
-
}),
|
|
1638
|
+
}), cr = { class: "tpl:w-full" }, lr = { 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)]" }, ur = {
|
|
1532
1639
|
key: 0,
|
|
1533
1640
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1534
|
-
},
|
|
1641
|
+
}, dr = {
|
|
1535
1642
|
key: 1,
|
|
1536
1643
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1537
|
-
},
|
|
1644
|
+
}, fr = /* @__PURE__ */ y({
|
|
1538
1645
|
__name: "HtmlBlock",
|
|
1539
1646
|
props: {
|
|
1540
1647
|
block: {},
|
|
1541
1648
|
viewport: {}
|
|
1542
1649
|
},
|
|
1543
1650
|
setup(t) {
|
|
1544
|
-
let n = t, { t: r } =
|
|
1545
|
-
return (t, n) => (e(), w("div",
|
|
1651
|
+
let n = t, { t: r } = St(), i = x(() => n.block.content.trim().length > 0);
|
|
1652
|
+
return (t, n) => (e(), w("div", cr, [C("div", lr, [P(M(bn), {
|
|
1546
1653
|
size: 24,
|
|
1547
1654
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1548
|
-
}), i.value ? (e(), w("span",
|
|
1655
|
+
}), i.value ? (e(), w("span", ur, N(M(r).html.preview), 1)) : (e(), w("span", dr, N(M(r).html.empty), 1))])]));
|
|
1549
1656
|
}
|
|
1550
|
-
}),
|
|
1551
|
-
function
|
|
1552
|
-
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 ? !0 :
|
|
1657
|
+
}), pr = "image/";
|
|
1658
|
+
function mr(e) {
|
|
1659
|
+
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 ? !0 : ie(r), { isOverDropZone: a } = Ve(t, {
|
|
1553
1660
|
preventDefaultForUnhandled: !0,
|
|
1554
1661
|
onDrop: (e) => {
|
|
1555
1662
|
if (!i()) return;
|
|
1556
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
1663
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(pr));
|
|
1557
1664
|
t.length > 0 && n([t[0]]);
|
|
1558
1665
|
}
|
|
1559
1666
|
});
|
|
@@ -1561,17 +1668,17 @@ function ir(e) {
|
|
|
1561
1668
|
}
|
|
1562
1669
|
//#endregion
|
|
1563
1670
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1564
|
-
var
|
|
1671
|
+
var hr = {
|
|
1565
1672
|
key: 0,
|
|
1566
1673
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
1567
1674
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
1568
|
-
},
|
|
1675
|
+
}, gr = ["href"], _r = ["src", "alt"], vr = ["src", "alt"], yr = {
|
|
1569
1676
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1570
1677
|
style: { opacity: "0.7" }
|
|
1571
|
-
},
|
|
1678
|
+
}, br = ["href"], xr = ["src", "alt"], Sr = ["src", "alt"], Cr = {
|
|
1572
1679
|
key: 4,
|
|
1573
1680
|
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)]"
|
|
1574
|
-
},
|
|
1681
|
+
}, wr = ["aria-label"], Tr = { key: 1 }, Er = /* @__PURE__ */ y({
|
|
1575
1682
|
__name: "ImageBlock",
|
|
1576
1683
|
props: {
|
|
1577
1684
|
block: {},
|
|
@@ -1579,7 +1686,7 @@ var ar = {
|
|
|
1579
1686
|
},
|
|
1580
1687
|
emits: ["update"],
|
|
1581
1688
|
setup(t, { emit: n }) {
|
|
1582
|
-
let r = t, i = n, { t: a } =
|
|
1689
|
+
let r = t, i = n, { t: a } = St(), { syntax: o } = At(), s = F(qe, null), c = x(() => !!s), l = jt();
|
|
1583
1690
|
async function u() {
|
|
1584
1691
|
let e = await s?.({ accept: ["images"] });
|
|
1585
1692
|
if (l.alive && e) {
|
|
@@ -1606,7 +1713,7 @@ var ar = {
|
|
|
1606
1713
|
}
|
|
1607
1714
|
}
|
|
1608
1715
|
}
|
|
1609
|
-
let { isOver: g } =
|
|
1716
|
+
let { isOver: g } = mr({
|
|
1610
1717
|
target: d,
|
|
1611
1718
|
enabled: p,
|
|
1612
1719
|
onFiles: m
|
|
@@ -1619,21 +1726,21 @@ var ar = {
|
|
|
1619
1726
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1620
1727
|
marginRight: e === "center" ? "auto" : void 0
|
|
1621
1728
|
};
|
|
1622
|
-
}), S = x(() =>
|
|
1729
|
+
}), S = x(() => De(r.block.src, o));
|
|
1623
1730
|
return (n, r) => (e(), w("div", {
|
|
1624
1731
|
ref_key: "dropZoneRef",
|
|
1625
1732
|
ref: d,
|
|
1626
1733
|
"data-testid": "image-drop-zone",
|
|
1627
1734
|
class: "tpl:relative tpl:w-full",
|
|
1628
1735
|
style: A(v.value)
|
|
1629
|
-
}, [p.value && (
|
|
1736
|
+
}, [p.value && (M(g) || f.value) ? (e(), w("div", hr, [f.value ? (e(), w(D, { key: 0 }, [P(M(Ct), {
|
|
1630
1737
|
class: "tpl-spinner",
|
|
1631
1738
|
size: 20,
|
|
1632
1739
|
"stroke-width": 2
|
|
1633
|
-
}), _(" " + M(
|
|
1740
|
+
}), _(" " + N(M(a).image.uploading), 1)], 64)) : (e(), w(D, { key: 1 }, [P(M(Dt), {
|
|
1634
1741
|
size: 20,
|
|
1635
1742
|
"stroke-width": 1.5
|
|
1636
|
-
}), _(" " + M(
|
|
1743
|
+
}), _(" " + N(M(a).image.dropToUpload), 1)], 64))])) : O("", !0), t.block.src && S.value && t.block.placeholderUrl ? (e(), w(D, { key: 1 }, [t.block.linkUrl ? (e(), w("a", {
|
|
1637
1744
|
key: 0,
|
|
1638
1745
|
href: t.block.linkUrl,
|
|
1639
1746
|
target: "_blank",
|
|
@@ -1643,24 +1750,24 @@ var ar = {
|
|
|
1643
1750
|
class: "tpl:border-0",
|
|
1644
1751
|
loading: "lazy",
|
|
1645
1752
|
src: t.block.placeholderUrl,
|
|
1646
|
-
alt: t.block.alt ||
|
|
1753
|
+
alt: t.block.alt || M(a).image.altTextPlaceholder,
|
|
1647
1754
|
style: A(y.value)
|
|
1648
|
-
}, null, 12,
|
|
1755
|
+
}, null, 12, _r)], 8, gr)) : (e(), w("img", {
|
|
1649
1756
|
key: 1,
|
|
1650
1757
|
class: "tpl:border-0",
|
|
1651
1758
|
src: t.block.placeholderUrl,
|
|
1652
1759
|
alt: t.block.alt,
|
|
1653
1760
|
style: A(y.value)
|
|
1654
|
-
}, null, 12,
|
|
1761
|
+
}, null, 12, vr))], 64)) : t.block.src && S.value ? (e(), w("div", {
|
|
1655
1762
|
key: 2,
|
|
1656
1763
|
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)]",
|
|
1657
1764
|
style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, y.value])
|
|
1658
|
-
}, [
|
|
1765
|
+
}, [P(M(Tn), {
|
|
1659
1766
|
size: 32,
|
|
1660
1767
|
"stroke-width": 1.5,
|
|
1661
1768
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1662
1769
|
style: { opacity: "0.5" }
|
|
1663
|
-
}), C("span",
|
|
1770
|
+
}), C("span", yr, N(t.block.src), 1)], 4)) : t.block.src ? (e(), w(D, { key: 3 }, [t.block.linkUrl ? (e(), w("a", {
|
|
1664
1771
|
key: 0,
|
|
1665
1772
|
href: t.block.linkUrl,
|
|
1666
1773
|
target: "_blank",
|
|
@@ -1670,35 +1777,35 @@ var ar = {
|
|
|
1670
1777
|
class: "tpl:border-0",
|
|
1671
1778
|
loading: "lazy",
|
|
1672
1779
|
src: t.block.src,
|
|
1673
|
-
alt: t.block.alt ||
|
|
1780
|
+
alt: t.block.alt || M(a).image.altTextPlaceholder,
|
|
1674
1781
|
style: A(y.value)
|
|
1675
|
-
}, null, 12,
|
|
1782
|
+
}, null, 12, xr)], 8, br)) : (e(), w("img", {
|
|
1676
1783
|
key: 1,
|
|
1677
1784
|
class: "tpl:border-0",
|
|
1678
1785
|
src: t.block.src,
|
|
1679
1786
|
alt: t.block.alt,
|
|
1680
1787
|
style: A(y.value)
|
|
1681
|
-
}, null, 12,
|
|
1788
|
+
}, null, 12, Sr))], 64)) : (e(), w("div", Cr, [c.value ? (e(), w("button", {
|
|
1682
1789
|
key: 0,
|
|
1683
|
-
"aria-label":
|
|
1790
|
+
"aria-label": M(a).image.browseMedia,
|
|
1684
1791
|
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)]",
|
|
1685
1792
|
onClick: b(u, ["stop"])
|
|
1686
|
-
}, [
|
|
1793
|
+
}, [P(M(Tn), {
|
|
1687
1794
|
size: 14,
|
|
1688
1795
|
"stroke-width": 1.5
|
|
1689
|
-
}), _(" " + M(
|
|
1796
|
+
}), _(" " + N(M(a).image.browseMedia), 1)], 8, wr)) : (e(), w("span", Tr, N(M(a).image.clickToAdd), 1))]))], 4));
|
|
1690
1797
|
}
|
|
1691
|
-
}),
|
|
1798
|
+
}), Dr = { class: "tpl:w-full" }, Or = ["href"], kr = {
|
|
1692
1799
|
key: 1,
|
|
1693
1800
|
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)]"
|
|
1694
|
-
},
|
|
1801
|
+
}, Ar = /* @__PURE__ */ y({
|
|
1695
1802
|
__name: "MenuBlock",
|
|
1696
1803
|
props: {
|
|
1697
1804
|
block: {},
|
|
1698
1805
|
viewport: {}
|
|
1699
1806
|
},
|
|
1700
1807
|
setup(t) {
|
|
1701
|
-
let n = t, { t: r } =
|
|
1808
|
+
let n = t, { t: r } = St(), i = x(() => ({
|
|
1702
1809
|
display: "flex",
|
|
1703
1810
|
flexWrap: "wrap",
|
|
1704
1811
|
gap: `0 ${n.block.spacing}px`,
|
|
@@ -1710,7 +1817,7 @@ var ar = {
|
|
|
1710
1817
|
function o(e) {
|
|
1711
1818
|
return e || n.block.linkColor || n.block.color;
|
|
1712
1819
|
}
|
|
1713
|
-
return (n, s) => (e(), w("div",
|
|
1820
|
+
return (n, s) => (e(), w("div", Dr, [a.value ? (e(), w("div", {
|
|
1714
1821
|
key: 0,
|
|
1715
1822
|
style: A(i.value)
|
|
1716
1823
|
}, [(e(!0), w(D, null, c(t.block.items, (n, r) => (e(), w(D, { key: n.id }, [C("a", {
|
|
@@ -1722,15 +1829,15 @@ var ar = {
|
|
|
1722
1829
|
textDecoration: n.underline ? "underline" : "none"
|
|
1723
1830
|
}),
|
|
1724
1831
|
onClick: s[0] ||= b(() => {}, ["prevent"])
|
|
1725
|
-
},
|
|
1832
|
+
}, N(n.text || "..."), 13, Or), r < t.block.items.length - 1 ? (e(), w("span", {
|
|
1726
1833
|
key: 0,
|
|
1727
1834
|
style: A({
|
|
1728
1835
|
color: t.block.separatorColor,
|
|
1729
1836
|
padding: `0 ${t.block.spacing}px`
|
|
1730
1837
|
})
|
|
1731
|
-
},
|
|
1838
|
+
}, N(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div", kr, [P(M(En), { size: 16 }), C("span", null, N(M(r).menu.addLinks), 1)]))]));
|
|
1732
1839
|
}
|
|
1733
|
-
}),
|
|
1840
|
+
}), jr = /* @__PURE__ */ new Set([
|
|
1734
1841
|
"http",
|
|
1735
1842
|
"https",
|
|
1736
1843
|
"mailto",
|
|
@@ -1740,7 +1847,7 @@ var ar = {
|
|
|
1740
1847
|
"sms",
|
|
1741
1848
|
"xmpp",
|
|
1742
1849
|
"cid"
|
|
1743
|
-
]),
|
|
1850
|
+
]), Mr = /* @__PURE__ */ new Set([
|
|
1744
1851
|
"SCRIPT",
|
|
1745
1852
|
"STYLE",
|
|
1746
1853
|
"IFRAME",
|
|
@@ -1750,7 +1857,7 @@ var ar = {
|
|
|
1750
1857
|
"META",
|
|
1751
1858
|
"BASE",
|
|
1752
1859
|
"FORM"
|
|
1753
|
-
]),
|
|
1860
|
+
]), Nr = /* @__PURE__ */ new Set([
|
|
1754
1861
|
"href",
|
|
1755
1862
|
"xlink:href",
|
|
1756
1863
|
"formaction",
|
|
@@ -1759,16 +1866,16 @@ var ar = {
|
|
|
1759
1866
|
"background",
|
|
1760
1867
|
"poster"
|
|
1761
1868
|
]);
|
|
1762
|
-
function
|
|
1869
|
+
function Pr(e, t) {
|
|
1763
1870
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
1764
1871
|
if (!n || n.startsWith("#")) return !0;
|
|
1765
1872
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1766
1873
|
if (!r) return !0;
|
|
1767
1874
|
let i = r[1].toLowerCase();
|
|
1768
|
-
return
|
|
1875
|
+
return jr.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1769
1876
|
}
|
|
1770
|
-
function
|
|
1771
|
-
if (
|
|
1877
|
+
function Fr(e) {
|
|
1878
|
+
if (Mr.has(e.tagName)) {
|
|
1772
1879
|
e.remove();
|
|
1773
1880
|
return;
|
|
1774
1881
|
}
|
|
@@ -1780,29 +1887,29 @@ function Tr(e) {
|
|
|
1780
1887
|
e.removeAttribute(n);
|
|
1781
1888
|
continue;
|
|
1782
1889
|
}
|
|
1783
|
-
if (
|
|
1784
|
-
|
|
1890
|
+
if (Nr.has(t)) {
|
|
1891
|
+
Pr(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
1785
1892
|
continue;
|
|
1786
1893
|
}
|
|
1787
1894
|
if (t === "src") {
|
|
1788
|
-
|
|
1895
|
+
Pr(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
1789
1896
|
continue;
|
|
1790
1897
|
}
|
|
1791
1898
|
t === "srcdoc" && e.removeAttribute(n);
|
|
1792
1899
|
}
|
|
1793
1900
|
let n = Array.from(e.children);
|
|
1794
|
-
for (let e of n)
|
|
1901
|
+
for (let e of n) Fr(e);
|
|
1795
1902
|
}
|
|
1796
|
-
function
|
|
1903
|
+
function Ir(e) {
|
|
1797
1904
|
if (typeof DOMParser > "u") return e;
|
|
1798
1905
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1799
|
-
for (let e of n)
|
|
1906
|
+
for (let e of n) Fr(e);
|
|
1800
1907
|
return t.innerHTML;
|
|
1801
1908
|
}
|
|
1802
1909
|
//#endregion
|
|
1803
1910
|
//#region src/composables/useEditableTextBlock.ts
|
|
1804
|
-
function
|
|
1805
|
-
let t =
|
|
1911
|
+
function Lr(e) {
|
|
1912
|
+
let t = F(tt, []), { syntax: n } = At(), r = x(() => Ir(ce(Ce(e(), t), n))), i = h(!1), a = h(null), { top: o, left: s } = He(a), c = x(() => ({
|
|
1806
1913
|
top: o.value - 8,
|
|
1807
1914
|
left: s.value
|
|
1808
1915
|
}));
|
|
@@ -1823,24 +1930,24 @@ function Dr(e) {
|
|
|
1823
1930
|
}
|
|
1824
1931
|
//#endregion
|
|
1825
1932
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1826
|
-
var
|
|
1933
|
+
var Rr = ["innerHTML"], zr = /* @__PURE__ */ y({
|
|
1827
1934
|
__name: "ParagraphBlock",
|
|
1828
1935
|
props: {
|
|
1829
1936
|
block: {},
|
|
1830
1937
|
viewport: {}
|
|
1831
1938
|
},
|
|
1832
1939
|
setup(t) {
|
|
1833
|
-
let n = t, r =
|
|
1940
|
+
let n = t, r = oe(() => import("./ParagraphEditor-DMzkVnST.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Lr(() => n.block.content);
|
|
1834
1941
|
return (n, u) => (e(), w("div", {
|
|
1835
1942
|
ref_key: "blockRef",
|
|
1836
1943
|
ref: a,
|
|
1837
1944
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1838
|
-
onDblclick: u[0] ||= (...e) =>
|
|
1839
|
-
}, [
|
|
1945
|
+
onDblclick: u[0] ||= (...e) => M(c) && M(c)(...e)
|
|
1946
|
+
}, [M(i) ? (e(), j(M(r), {
|
|
1840
1947
|
key: 0,
|
|
1841
1948
|
block: t.block,
|
|
1842
|
-
"toolbar-position":
|
|
1843
|
-
onDone:
|
|
1949
|
+
"toolbar-position": M(o),
|
|
1950
|
+
onDone: M(l)
|
|
1844
1951
|
}, null, 8, [
|
|
1845
1952
|
"block",
|
|
1846
1953
|
"toolbar-position",
|
|
@@ -1848,42 +1955,47 @@ var Or = ["innerHTML"], kr = /* @__PURE__ */ y({
|
|
|
1848
1955
|
])) : (e(), w("div", {
|
|
1849
1956
|
key: 1,
|
|
1850
1957
|
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",
|
|
1851
|
-
innerHTML:
|
|
1852
|
-
}, null, 8,
|
|
1958
|
+
innerHTML: M(s)
|
|
1959
|
+
}, null, 8, Rr))], 544));
|
|
1853
1960
|
}
|
|
1854
1961
|
});
|
|
1855
1962
|
//#endregion
|
|
1856
1963
|
//#region src/utils/blockComponentResolver.ts
|
|
1857
|
-
function
|
|
1964
|
+
function Br(e, t, n) {
|
|
1858
1965
|
if (t) {
|
|
1859
1966
|
let n = t.getComponent(e);
|
|
1860
1967
|
if (n) return n;
|
|
1861
1968
|
}
|
|
1862
1969
|
return n[e.type] ?? null;
|
|
1863
1970
|
}
|
|
1864
|
-
function
|
|
1865
|
-
let { padding: t, backgroundColor: n } = e.styles
|
|
1866
|
-
return {
|
|
1971
|
+
function Vr(e) {
|
|
1972
|
+
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
1867
1973
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
1868
1974
|
backgroundColor: n || "transparent"
|
|
1869
1975
|
};
|
|
1976
|
+
return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
1977
|
+
}
|
|
1978
|
+
function Hr(e) {
|
|
1979
|
+
if (e.type !== "section" || !e.wrapper) return null;
|
|
1980
|
+
let t = e.wrapper, n = {};
|
|
1981
|
+
return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
|
|
1870
1982
|
}
|
|
1871
1983
|
//#endregion
|
|
1872
1984
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
1873
|
-
var
|
|
1985
|
+
var Ur = ["data-block-id", "data-block-type"], Wr = ["aria-label"], Gr = [
|
|
1874
1986
|
"aria-label",
|
|
1875
1987
|
"aria-pressed",
|
|
1876
1988
|
"title"
|
|
1877
|
-
],
|
|
1989
|
+
], Kr = ["aria-label", "title"], qr = ["aria-label", "title"], Jr = ["aria-label", "title"], Yr = {
|
|
1878
1990
|
key: 1,
|
|
1879
1991
|
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"
|
|
1880
|
-
},
|
|
1992
|
+
}, Xr = { 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)]" }, Zr = {
|
|
1881
1993
|
key: 2,
|
|
1882
1994
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1883
|
-
},
|
|
1995
|
+
}, Qr = ["aria-label", "title"], $r = {
|
|
1884
1996
|
key: 3,
|
|
1885
1997
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1886
|
-
},
|
|
1998
|
+
}, ei = ["aria-label"], ti = /*#__PURE__*/ kt(/* @__PURE__ */ y({
|
|
1887
1999
|
__name: "BlockWrapper",
|
|
1888
2000
|
props: {
|
|
1889
2001
|
block: {},
|
|
@@ -1893,7 +2005,7 @@ var Mr = ["data-block-id", "data-block-type"], Nr = ["aria-label"], Pr = [
|
|
|
1893
2005
|
},
|
|
1894
2006
|
emits: ["select"],
|
|
1895
2007
|
setup(t, { emit: n }) {
|
|
1896
|
-
let i =
|
|
2008
|
+
let i = oe(() => import("./BlockIssueBadge-a-qlByxF.js")), a = t, o = n, { t: s, format: c } = St(), u = F(vt, 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);
|
|
1897
2009
|
async function m() {
|
|
1898
2010
|
await r(), d.value?.focus();
|
|
1899
2011
|
}
|
|
@@ -1919,13 +2031,13 @@ var Mr = ["data-block-id", "data-block-type"], Nr = ["aria-label"], Pr = [
|
|
|
1919
2031
|
let y = x(() => !a.viewport || !a.block.visibility ? !1 : a.block.visibility[a.viewport] === !1), S = x(() => a.previewMode === !0 && y.value), T = x(() => a.viewport ? {
|
|
1920
2032
|
desktop: s.viewport.desktop,
|
|
1921
2033
|
mobile: s.viewport.mobile
|
|
1922
|
-
}[a.viewport] ?? a.viewport : ""), E = x(() => !!a.block.displayCondition), ee =
|
|
1923
|
-
let e =
|
|
1924
|
-
return {
|
|
2034
|
+
}[a.viewport] ?? a.viewport : ""), E = x(() => !!a.block.displayCondition), ee = F(ut, null), D = F(_t, null), k = F(gt, {}), te = x(() => !!k.savedModules), j = x(() => k.comments?.getBlockCount(a.block.id) ?? 0), ne = x(() => {
|
|
2035
|
+
let e = Vr(a.block), t = {
|
|
1925
2036
|
padding: e.padding,
|
|
1926
2037
|
backgroundColor: e.backgroundColor
|
|
1927
2038
|
};
|
|
1928
|
-
|
|
2039
|
+
return e.borderRadius && (t.borderRadius = e.borderRadius), t;
|
|
2040
|
+
}), re = x(() => Hr(a.block));
|
|
1929
2041
|
function ie(e) {
|
|
1930
2042
|
a.previewMode || (e.stopPropagation(), o("select"));
|
|
1931
2043
|
}
|
|
@@ -1935,10 +2047,10 @@ var Mr = ["data-block-id", "data-block-type"], Nr = ["aria-label"], Pr = [
|
|
|
1935
2047
|
function se() {
|
|
1936
2048
|
ee?.duplicateBlock(a.block);
|
|
1937
2049
|
}
|
|
1938
|
-
function
|
|
2050
|
+
function ce() {
|
|
1939
2051
|
k.savedModules?.openSaveDialog(a.block.id);
|
|
1940
2052
|
}
|
|
1941
|
-
function
|
|
2053
|
+
function le() {
|
|
1942
2054
|
D?.toggleBlock(a.block.id);
|
|
1943
2055
|
}
|
|
1944
2056
|
return (n, r) => S.value ? O("", !0) : (e(), w("div", {
|
|
@@ -1952,11 +2064,11 @@ var Mr = ["data-block-id", "data-block-type"], Nr = ["aria-label"], Pr = [
|
|
|
1952
2064
|
"data-block-type": t.block.type,
|
|
1953
2065
|
onClick: ie
|
|
1954
2066
|
}, [
|
|
1955
|
-
|
|
2067
|
+
P(M(i), { "block-id": t.block.id }, null, 8, ["block-id"]),
|
|
1956
2068
|
t.isSelected ? (e(), w("div", {
|
|
1957
2069
|
key: 0,
|
|
1958
2070
|
role: "toolbar",
|
|
1959
|
-
"aria-label":
|
|
2071
|
+
"aria-label": M(s).blockActions.drag,
|
|
1960
2072
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
1961
2073
|
}, [
|
|
1962
2074
|
C("button", {
|
|
@@ -1966,191 +2078,207 @@ var Mr = ["data-block-id", "data-block-type"], Nr = ["aria-label"], Pr = [
|
|
|
1966
2078
|
"aria-label": p.value,
|
|
1967
2079
|
"aria-pressed": f.value,
|
|
1968
2080
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1969
|
-
title:
|
|
2081
|
+
title: M(s).blockActions.drag,
|
|
1970
2082
|
onKeydown: g
|
|
1971
|
-
}, [
|
|
2083
|
+
}, [P(M(wn), {
|
|
1972
2084
|
size: 14,
|
|
1973
2085
|
"stroke-width": 1.5
|
|
1974
|
-
})], 40,
|
|
2086
|
+
})], 40, Gr),
|
|
1975
2087
|
C("button", {
|
|
1976
2088
|
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",
|
|
1977
|
-
"aria-label":
|
|
1978
|
-
title:
|
|
2089
|
+
"aria-label": M(s).blockActions.duplicate,
|
|
2090
|
+
title: M(s).blockActions.duplicate,
|
|
1979
2091
|
onClick: b(se, ["stop"])
|
|
1980
|
-
}, [
|
|
2092
|
+
}, [P(M(xn), {
|
|
1981
2093
|
size: 14,
|
|
1982
2094
|
"stroke-width": 1.5
|
|
1983
|
-
})], 8,
|
|
2095
|
+
})], 8, Kr),
|
|
1984
2096
|
te.value ? (e(), w("button", {
|
|
1985
2097
|
key: 0,
|
|
1986
2098
|
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",
|
|
1987
|
-
"aria-label":
|
|
1988
|
-
title:
|
|
1989
|
-
onClick: b(
|
|
1990
|
-
}, [
|
|
2099
|
+
"aria-label": M(s).blockActions.saveAsModule,
|
|
2100
|
+
title: M(s).blockActions.saveAsModule,
|
|
2101
|
+
onClick: b(ce, ["stop"])
|
|
2102
|
+
}, [P(M(vn), {
|
|
1991
2103
|
size: 14,
|
|
1992
2104
|
"stroke-width": 1.5
|
|
1993
|
-
})], 8,
|
|
2105
|
+
})], 8, qr)) : O("", !0),
|
|
1994
2106
|
C("button", {
|
|
1995
2107
|
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",
|
|
1996
|
-
"aria-label":
|
|
1997
|
-
title:
|
|
2108
|
+
"aria-label": M(s).blockActions.delete,
|
|
2109
|
+
title: M(s).blockActions.delete,
|
|
1998
2110
|
onClick: b(ae, ["stop"])
|
|
1999
|
-
}, [
|
|
2111
|
+
}, [P(M(Tt), {
|
|
2000
2112
|
size: 14,
|
|
2001
2113
|
"stroke-width": 1.5
|
|
2002
|
-
})], 8,
|
|
2003
|
-
], 8,
|
|
2004
|
-
y.value ? (e(), w("div",
|
|
2114
|
+
})], 8, Jr)
|
|
2115
|
+
], 8, Wr)) : O("", !0),
|
|
2116
|
+
y.value ? (e(), w("div", Yr, [C("span", Xr, [P(M(Sn), {
|
|
2005
2117
|
size: 12,
|
|
2006
2118
|
"stroke-width": 1.5
|
|
2007
|
-
}), _(" " + M(
|
|
2008
|
-
E.value && !y.value ? (e(), w("div",
|
|
2119
|
+
}), _(" " + N(M(c)(M(s).blockActions.hiddenOnViewport, { viewport: T.value })), 1)])])) : O("", !0),
|
|
2120
|
+
E.value && !y.value ? (e(), w("div", Zr, [C("button", {
|
|
2009
2121
|
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)]",
|
|
2010
|
-
"aria-label":
|
|
2122
|
+
"aria-label": M(s).blockActions.conditionToggle,
|
|
2011
2123
|
title: t.block.displayCondition?.label,
|
|
2012
|
-
onClick: b(
|
|
2013
|
-
}, [
|
|
2124
|
+
onClick: b(le, ["stop"])
|
|
2125
|
+
}, [P(M(Cn), {
|
|
2014
2126
|
size: 12,
|
|
2015
2127
|
"stroke-width": 2
|
|
2016
|
-
})], 8,
|
|
2017
|
-
|
|
2128
|
+
})], 8, Qr)])) : O("", !0),
|
|
2129
|
+
j.value > 0 && !y.value ? (e(), w("div", $r, [C("button", {
|
|
2018
2130
|
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)]",
|
|
2019
|
-
"aria-label":
|
|
2020
|
-
onClick: r[0] ||= b((e) =>
|
|
2021
|
-
}, [
|
|
2131
|
+
"aria-label": M(c)(M(s).blockActions.comments, { count: String(j.value) }),
|
|
2132
|
+
onClick: r[0] ||= b((e) => M(k).comments?.openForBlock(t.block.id), ["stop"])
|
|
2133
|
+
}, [P(M(wt), {
|
|
2022
2134
|
size: 12,
|
|
2023
2135
|
"stroke-width": 2.5
|
|
2024
|
-
}), _(" " +
|
|
2025
|
-
|
|
2026
|
-
|
|
2136
|
+
}), _(" " + N(j.value), 1)], 8, ei)])) : O("", !0),
|
|
2137
|
+
re.value ? (e(), w("div", {
|
|
2138
|
+
key: 4,
|
|
2139
|
+
class: "tpl-section-wrapper",
|
|
2027
2140
|
style: A(re.value)
|
|
2028
|
-
}, [
|
|
2029
|
-
|
|
2141
|
+
}, [C("div", {
|
|
2142
|
+
class: "tpl-block-content",
|
|
2143
|
+
style: A(ne.value)
|
|
2144
|
+
}, [l(n.$slots, "default", {}, void 0, !0)], 4)], 4)) : (e(), w("div", {
|
|
2145
|
+
key: 5,
|
|
2146
|
+
class: "tpl-block-content",
|
|
2147
|
+
style: A(ne.value)
|
|
2148
|
+
}, [l(n.$slots, "default", {}, void 0, !0)], 4))
|
|
2149
|
+
], 10, Ur));
|
|
2030
2150
|
}
|
|
2031
|
-
}), [["__scopeId", "data-v-
|
|
2151
|
+
}), [["__scopeId", "data-v-7aeef19d"]]);
|
|
2032
2152
|
//#endregion
|
|
2033
2153
|
//#region src/utils/unwrapParagraph.ts
|
|
2034
|
-
function
|
|
2154
|
+
function ni(e) {
|
|
2035
2155
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2036
2156
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2037
2157
|
}
|
|
2038
2158
|
//#endregion
|
|
2039
2159
|
//#region src/components/blocks/TitleBlock.vue
|
|
2040
|
-
var
|
|
2160
|
+
var ri = /* @__PURE__ */ y({
|
|
2041
2161
|
__name: "TitleBlock",
|
|
2042
2162
|
props: {
|
|
2043
2163
|
block: {},
|
|
2044
2164
|
viewport: {}
|
|
2045
2165
|
},
|
|
2046
2166
|
setup(t) {
|
|
2047
|
-
let n = t, r =
|
|
2167
|
+
let n = t, r = oe(() => import("./TitleEditor-eyT0h-Sa.js")), { isEditing: a, blockRef: o, toolbarPosition: s, resolvedContent: c, handleDoubleClick: l, handleEditorDone: u } = Lr(() => n.block.content), d = x(() => {
|
|
2048
2168
|
let e = {
|
|
2049
2169
|
fontSize: `${je[n.block.level]}px`,
|
|
2050
2170
|
color: n.block.color,
|
|
2051
2171
|
textAlign: n.block.textAlign
|
|
2052
2172
|
};
|
|
2053
2173
|
return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
|
|
2054
|
-
}), f = x(() => `h${n.block.level}`), p = x(() =>
|
|
2174
|
+
}), f = x(() => `h${n.block.level}`), p = x(() => ni(c.value));
|
|
2055
2175
|
return (n, c) => (e(), w("div", {
|
|
2056
2176
|
ref_key: "blockRef",
|
|
2057
2177
|
ref: o,
|
|
2058
2178
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2059
2179
|
style: A(d.value),
|
|
2060
|
-
onDblclick: c[0] ||= (...e) =>
|
|
2061
|
-
}, [
|
|
2180
|
+
onDblclick: c[0] ||= (...e) => M(l) && M(l)(...e)
|
|
2181
|
+
}, [M(a) ? (e(), j(M(r), {
|
|
2062
2182
|
key: 0,
|
|
2063
2183
|
block: t.block,
|
|
2064
|
-
"toolbar-position":
|
|
2065
|
-
onDone:
|
|
2184
|
+
"toolbar-position": M(s),
|
|
2185
|
+
onDone: M(u)
|
|
2066
2186
|
}, null, 8, [
|
|
2067
2187
|
"block",
|
|
2068
2188
|
"toolbar-position",
|
|
2069
2189
|
"onDone"
|
|
2070
|
-
])) : (e(),
|
|
2190
|
+
])) : (e(), j(i(f.value), {
|
|
2071
2191
|
key: 1,
|
|
2072
2192
|
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-tight tpl:outline-none [&_a]:tpl:underline [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0",
|
|
2073
2193
|
style: { color: "inherit" },
|
|
2074
2194
|
innerHTML: p.value
|
|
2075
2195
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2076
2196
|
}
|
|
2077
|
-
})
|
|
2197
|
+
});
|
|
2198
|
+
//#endregion
|
|
2199
|
+
//#region src/utils/sectionColumnDrop.ts
|
|
2200
|
+
function ii(e) {
|
|
2201
|
+
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2202
|
+
}
|
|
2203
|
+
//#endregion
|
|
2204
|
+
//#region ../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
|
|
2205
|
+
var ai = Object.defineProperty, oi = Object.getOwnPropertySymbols, si = Object.prototype.hasOwnProperty, ci = Object.prototype.propertyIsEnumerable, li = (e, t, n) => t in e ? ai(e, t, {
|
|
2078
2206
|
enumerable: !0,
|
|
2079
2207
|
configurable: !0,
|
|
2080
2208
|
writable: !0,
|
|
2081
2209
|
value: n
|
|
2082
|
-
}) : e[t] = n,
|
|
2083
|
-
for (var n in t ||= {})
|
|
2084
|
-
if (
|
|
2210
|
+
}) : e[t] = n, ui = (e, t) => {
|
|
2211
|
+
for (var n in t ||= {}) si.call(t, n) && li(e, n, t[n]);
|
|
2212
|
+
if (oi) for (var n of oi(t)) ci.call(t, n) && li(e, n, t[n]);
|
|
2085
2213
|
return e;
|
|
2086
|
-
},
|
|
2214
|
+
}, di = (e, t) => {
|
|
2087
2215
|
var n = {};
|
|
2088
|
-
for (var r in e)
|
|
2089
|
-
if (e != null &&
|
|
2216
|
+
for (var r in e) si.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2217
|
+
if (e != null && oi) for (var r of oi(e)) t.indexOf(r) < 0 && ci.call(e, r) && (n[r] = e[r]);
|
|
2090
2218
|
return n;
|
|
2091
|
-
},
|
|
2092
|
-
function
|
|
2093
|
-
console.warn(
|
|
2219
|
+
}, fi = "[vue-draggable-plus]: ";
|
|
2220
|
+
function pi(e) {
|
|
2221
|
+
console.warn(fi + e);
|
|
2094
2222
|
}
|
|
2095
|
-
function
|
|
2096
|
-
console.error(
|
|
2223
|
+
function mi(e) {
|
|
2224
|
+
console.error(fi + e);
|
|
2097
2225
|
}
|
|
2098
|
-
function
|
|
2226
|
+
function hi(e, t, n) {
|
|
2099
2227
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2100
2228
|
}
|
|
2101
|
-
function
|
|
2229
|
+
function gi(e) {
|
|
2102
2230
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2103
2231
|
}
|
|
2104
|
-
function
|
|
2105
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2232
|
+
function _i(e) {
|
|
2233
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[gi(n)] = e[n]), t), {});
|
|
2106
2234
|
}
|
|
2107
|
-
function
|
|
2235
|
+
function vi(e, t) {
|
|
2108
2236
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2109
2237
|
}
|
|
2110
|
-
function
|
|
2238
|
+
function yi(e, t, n) {
|
|
2111
2239
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2112
2240
|
}
|
|
2113
|
-
function
|
|
2241
|
+
function bi(e) {
|
|
2114
2242
|
return e === void 0;
|
|
2115
2243
|
}
|
|
2116
|
-
function
|
|
2244
|
+
function xi(e) {
|
|
2117
2245
|
return typeof e == "string";
|
|
2118
2246
|
}
|
|
2119
|
-
function
|
|
2247
|
+
function Si(e, t, n) {
|
|
2120
2248
|
let r = e.children[n];
|
|
2121
2249
|
e.insertBefore(t, r);
|
|
2122
2250
|
}
|
|
2123
|
-
function
|
|
2251
|
+
function Ci(e) {
|
|
2124
2252
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2125
2253
|
}
|
|
2126
|
-
function
|
|
2254
|
+
function wi(e, t = document) {
|
|
2127
2255
|
let n = null;
|
|
2128
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2256
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || pi(`Element not found: ${e}`), n;
|
|
2129
2257
|
}
|
|
2130
|
-
function
|
|
2258
|
+
function Ti(e, t, n = null) {
|
|
2131
2259
|
return function(...r) {
|
|
2132
2260
|
return e.apply(n, r), t.apply(n, r);
|
|
2133
2261
|
};
|
|
2134
2262
|
}
|
|
2135
|
-
function
|
|
2136
|
-
let n =
|
|
2263
|
+
function Ei(e, t) {
|
|
2264
|
+
let n = ui({}, e);
|
|
2137
2265
|
return Object.keys(t).forEach((r) => {
|
|
2138
|
-
n[r] ? n[r] =
|
|
2266
|
+
n[r] ? n[r] = Ti(e[r], t[r]) : n[r] = t[r];
|
|
2139
2267
|
}), n;
|
|
2140
2268
|
}
|
|
2141
|
-
function
|
|
2269
|
+
function Di(e) {
|
|
2142
2270
|
return e instanceof HTMLElement;
|
|
2143
2271
|
}
|
|
2144
|
-
function
|
|
2272
|
+
function Oi(e, t) {
|
|
2145
2273
|
Object.keys(e).forEach((n) => {
|
|
2146
2274
|
t(n, e[n]);
|
|
2147
2275
|
});
|
|
2148
2276
|
}
|
|
2149
|
-
function
|
|
2277
|
+
function ki(e) {
|
|
2150
2278
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2151
2279
|
}
|
|
2152
|
-
var
|
|
2153
|
-
function
|
|
2280
|
+
var Ai = Object.assign;
|
|
2281
|
+
function ji(e, t) {
|
|
2154
2282
|
var n = Object.keys(e);
|
|
2155
2283
|
if (Object.getOwnPropertySymbols) {
|
|
2156
2284
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2160,26 +2288,26 @@ function yi(e, t) {
|
|
|
2160
2288
|
}
|
|
2161
2289
|
return n;
|
|
2162
2290
|
}
|
|
2163
|
-
function
|
|
2291
|
+
function Mi(e) {
|
|
2164
2292
|
for (var t = 1; t < arguments.length; t++) {
|
|
2165
2293
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2166
|
-
t % 2 ?
|
|
2167
|
-
|
|
2168
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2294
|
+
t % 2 ? ji(Object(n), !0).forEach(function(t) {
|
|
2295
|
+
Pi(e, t, n[t]);
|
|
2296
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ji(Object(n)).forEach(function(t) {
|
|
2169
2297
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2170
2298
|
});
|
|
2171
2299
|
}
|
|
2172
2300
|
return e;
|
|
2173
2301
|
}
|
|
2174
|
-
function
|
|
2302
|
+
function Ni(e) {
|
|
2175
2303
|
"@babel/helpers - typeof";
|
|
2176
|
-
return
|
|
2304
|
+
return Ni = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2177
2305
|
return typeof e;
|
|
2178
2306
|
} : function(e) {
|
|
2179
2307
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2180
|
-
},
|
|
2308
|
+
}, Ni(e);
|
|
2181
2309
|
}
|
|
2182
|
-
function
|
|
2310
|
+
function Pi(e, t, n) {
|
|
2183
2311
|
return t in e ? Object.defineProperty(e, t, {
|
|
2184
2312
|
value: n,
|
|
2185
2313
|
enumerable: !0,
|
|
@@ -2187,45 +2315,45 @@ function Si(e, t, n) {
|
|
|
2187
2315
|
writable: !0
|
|
2188
2316
|
}) : e[t] = n, e;
|
|
2189
2317
|
}
|
|
2190
|
-
function
|
|
2191
|
-
return
|
|
2318
|
+
function Fi() {
|
|
2319
|
+
return Fi = Object.assign || function(e) {
|
|
2192
2320
|
for (var t = 1; t < arguments.length; t++) {
|
|
2193
2321
|
var n = arguments[t];
|
|
2194
2322
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2195
2323
|
}
|
|
2196
2324
|
return e;
|
|
2197
|
-
},
|
|
2325
|
+
}, Fi.apply(this, arguments);
|
|
2198
2326
|
}
|
|
2199
|
-
function
|
|
2327
|
+
function Ii(e, t) {
|
|
2200
2328
|
if (e == null) return {};
|
|
2201
2329
|
var n = {}, r = Object.keys(e), i, a;
|
|
2202
2330
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2203
2331
|
return n;
|
|
2204
2332
|
}
|
|
2205
|
-
function
|
|
2333
|
+
function Li(e, t) {
|
|
2206
2334
|
if (e == null) return {};
|
|
2207
|
-
var n =
|
|
2335
|
+
var n = Ii(e, t), r, i;
|
|
2208
2336
|
if (Object.getOwnPropertySymbols) {
|
|
2209
2337
|
var a = Object.getOwnPropertySymbols(e);
|
|
2210
2338
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2211
2339
|
}
|
|
2212
2340
|
return n;
|
|
2213
2341
|
}
|
|
2214
|
-
var
|
|
2215
|
-
function
|
|
2342
|
+
var Ri = "1.15.2";
|
|
2343
|
+
function zi(e) {
|
|
2216
2344
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2217
2345
|
}
|
|
2218
|
-
var
|
|
2346
|
+
var Bi = zi(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Vi = zi(/Edge/i), Hi = zi(/firefox/i), Ui = zi(/safari/i) && !zi(/chrome/i) && !zi(/android/i), Wi = zi(/iP(ad|od|hone)/i), Gi = zi(/chrome/i) && zi(/android/i), Ki = {
|
|
2219
2347
|
capture: !1,
|
|
2220
2348
|
passive: !1
|
|
2221
2349
|
};
|
|
2222
|
-
function
|
|
2223
|
-
e.addEventListener(t, n, !
|
|
2350
|
+
function L(e, t, n) {
|
|
2351
|
+
e.addEventListener(t, n, !Bi && Ki);
|
|
2224
2352
|
}
|
|
2225
|
-
function
|
|
2226
|
-
e.removeEventListener(t, n, !
|
|
2353
|
+
function R(e, t, n) {
|
|
2354
|
+
e.removeEventListener(t, n, !Bi && Ki);
|
|
2227
2355
|
}
|
|
2228
|
-
function
|
|
2356
|
+
function qi(e, t) {
|
|
2229
2357
|
if (t) {
|
|
2230
2358
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2231
2359
|
if (e.matches) return e.matches(t);
|
|
@@ -2237,41 +2365,41 @@ function Fi(e, t) {
|
|
|
2237
2365
|
return !1;
|
|
2238
2366
|
}
|
|
2239
2367
|
}
|
|
2240
|
-
function
|
|
2368
|
+
function Ji(e) {
|
|
2241
2369
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2242
2370
|
}
|
|
2243
|
-
function
|
|
2371
|
+
function Yi(e, t, n, r) {
|
|
2244
2372
|
if (e) {
|
|
2245
2373
|
n ||= document;
|
|
2246
2374
|
do {
|
|
2247
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2375
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && qi(e, t) : qi(e, t)) || r && e === n) return e;
|
|
2248
2376
|
if (e === n) break;
|
|
2249
|
-
} while (e =
|
|
2377
|
+
} while (e = Ji(e));
|
|
2250
2378
|
}
|
|
2251
2379
|
return null;
|
|
2252
2380
|
}
|
|
2253
|
-
var
|
|
2254
|
-
function
|
|
2255
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2381
|
+
var Xi = /\s+/g;
|
|
2382
|
+
function z(e, t, n) {
|
|
2383
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Xi, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Xi, " "));
|
|
2256
2384
|
}
|
|
2257
|
-
function
|
|
2385
|
+
function B(e, t, n) {
|
|
2258
2386
|
var r = e && e.style;
|
|
2259
2387
|
if (r) {
|
|
2260
2388
|
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];
|
|
2261
2389
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2262
2390
|
}
|
|
2263
2391
|
}
|
|
2264
|
-
function
|
|
2392
|
+
function Zi(e, t) {
|
|
2265
2393
|
var n = "";
|
|
2266
2394
|
if (typeof e == "string") n = e;
|
|
2267
2395
|
else do {
|
|
2268
|
-
var r =
|
|
2396
|
+
var r = B(e, "transform");
|
|
2269
2397
|
r && r !== "none" && (n = r + " " + n);
|
|
2270
2398
|
} while (!t && (e = e.parentNode));
|
|
2271
2399
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2272
2400
|
return i && new i(n);
|
|
2273
2401
|
}
|
|
2274
|
-
function
|
|
2402
|
+
function Qi(e, t, n) {
|
|
2275
2403
|
if (e) {
|
|
2276
2404
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2277
2405
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2279,21 +2407,21 @@ function Bi(e, t, n) {
|
|
|
2279
2407
|
}
|
|
2280
2408
|
return [];
|
|
2281
2409
|
}
|
|
2282
|
-
function
|
|
2410
|
+
function $i() {
|
|
2283
2411
|
return document.scrollingElement || document.documentElement;
|
|
2284
2412
|
}
|
|
2285
|
-
function
|
|
2413
|
+
function V(e, t, n, r, i) {
|
|
2286
2414
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2287
2415
|
var a, o, s, c, l, u, d;
|
|
2288
|
-
if (e !== window && e.parentNode && e !==
|
|
2289
|
-
if (i && i.getBoundingClientRect && (
|
|
2416
|
+
if (e !== window && e.parentNode && e !== $i() ? (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, !Bi)) do
|
|
2417
|
+
if (i && i.getBoundingClientRect && (B(i, "transform") !== "none" || n && B(i, "position") !== "static")) {
|
|
2290
2418
|
var f = i.getBoundingClientRect();
|
|
2291
|
-
o -= f.top + parseInt(
|
|
2419
|
+
o -= f.top + parseInt(B(i, "border-top-width")), s -= f.left + parseInt(B(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
2292
2420
|
break;
|
|
2293
2421
|
}
|
|
2294
2422
|
while (i = i.parentNode);
|
|
2295
2423
|
if (r && e !== window) {
|
|
2296
|
-
var p =
|
|
2424
|
+
var p = Zi(i || e), m = p && p.a, h = p && p.d;
|
|
2297
2425
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2298
2426
|
}
|
|
2299
2427
|
return {
|
|
@@ -2306,18 +2434,18 @@ function z(e, t, n, r, i) {
|
|
|
2306
2434
|
};
|
|
2307
2435
|
}
|
|
2308
2436
|
}
|
|
2309
|
-
function
|
|
2310
|
-
for (var r =
|
|
2311
|
-
var a =
|
|
2437
|
+
function ea(e, t, n) {
|
|
2438
|
+
for (var r = oa(e, !0), i = V(e)[t]; r;) {
|
|
2439
|
+
var a = V(r)[n], o = void 0;
|
|
2312
2440
|
if (o = i >= a, !o) return r;
|
|
2313
|
-
if (r ===
|
|
2314
|
-
r =
|
|
2441
|
+
if (r === $i()) break;
|
|
2442
|
+
r = oa(r, !1);
|
|
2315
2443
|
}
|
|
2316
2444
|
return !1;
|
|
2317
2445
|
}
|
|
2318
|
-
function
|
|
2446
|
+
function ta(e, t, n, r) {
|
|
2319
2447
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2320
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2448
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Yi(o[a], n.draggable, e, !1)) {
|
|
2321
2449
|
if (i === t) return o[a];
|
|
2322
2450
|
i++;
|
|
2323
2451
|
}
|
|
@@ -2325,96 +2453,96 @@ function Ui(e, t, n, r) {
|
|
|
2325
2453
|
}
|
|
2326
2454
|
return null;
|
|
2327
2455
|
}
|
|
2328
|
-
function
|
|
2329
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost ||
|
|
2456
|
+
function na(e, t) {
|
|
2457
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || B(n, "display") === "none" || t && !qi(n, t));) n = n.previousElementSibling;
|
|
2330
2458
|
return n || null;
|
|
2331
2459
|
}
|
|
2332
|
-
function
|
|
2460
|
+
function ra(e, t) {
|
|
2333
2461
|
var n = 0;
|
|
2334
2462
|
if (!e || !e.parentNode) return -1;
|
|
2335
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2463
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || qi(e, t)) && n++;
|
|
2336
2464
|
return n;
|
|
2337
2465
|
}
|
|
2338
|
-
function
|
|
2339
|
-
var t = 0, n = 0, r =
|
|
2466
|
+
function ia(e) {
|
|
2467
|
+
var t = 0, n = 0, r = $i();
|
|
2340
2468
|
if (e) do {
|
|
2341
|
-
var i =
|
|
2469
|
+
var i = Zi(e), a = i.a, o = i.d;
|
|
2342
2470
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2343
2471
|
} while (e !== r && (e = e.parentNode));
|
|
2344
2472
|
return [t, n];
|
|
2345
2473
|
}
|
|
2346
|
-
function
|
|
2474
|
+
function aa(e, t) {
|
|
2347
2475
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2348
2476
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2349
2477
|
}
|
|
2350
2478
|
return -1;
|
|
2351
2479
|
}
|
|
2352
|
-
function
|
|
2353
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2480
|
+
function oa(e, t) {
|
|
2481
|
+
if (!e || !e.getBoundingClientRect) return $i();
|
|
2354
2482
|
var n = e, r = !1;
|
|
2355
2483
|
do
|
|
2356
2484
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2357
|
-
var i =
|
|
2485
|
+
var i = B(n);
|
|
2358
2486
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2359
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2487
|
+
if (!n.getBoundingClientRect || n === document.body) return $i();
|
|
2360
2488
|
if (r || t) return n;
|
|
2361
2489
|
r = !0;
|
|
2362
2490
|
}
|
|
2363
2491
|
}
|
|
2364
2492
|
while (n = n.parentNode);
|
|
2365
|
-
return
|
|
2493
|
+
return $i();
|
|
2366
2494
|
}
|
|
2367
|
-
function
|
|
2495
|
+
function sa(e, t) {
|
|
2368
2496
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2369
2497
|
return e;
|
|
2370
2498
|
}
|
|
2371
|
-
function
|
|
2499
|
+
function ca(e, t) {
|
|
2372
2500
|
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);
|
|
2373
2501
|
}
|
|
2374
|
-
var
|
|
2375
|
-
function
|
|
2502
|
+
var la;
|
|
2503
|
+
function ua(e, t) {
|
|
2376
2504
|
return function() {
|
|
2377
|
-
if (!
|
|
2505
|
+
if (!la) {
|
|
2378
2506
|
var n = arguments, r = this;
|
|
2379
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2380
|
-
|
|
2507
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), la = setTimeout(function() {
|
|
2508
|
+
la = void 0;
|
|
2381
2509
|
}, t);
|
|
2382
2510
|
}
|
|
2383
2511
|
};
|
|
2384
2512
|
}
|
|
2385
|
-
function
|
|
2386
|
-
clearTimeout(
|
|
2513
|
+
function da() {
|
|
2514
|
+
clearTimeout(la), la = void 0;
|
|
2387
2515
|
}
|
|
2388
|
-
function
|
|
2516
|
+
function fa(e, t, n) {
|
|
2389
2517
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2390
2518
|
}
|
|
2391
|
-
function
|
|
2519
|
+
function pa(e) {
|
|
2392
2520
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2393
2521
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2394
2522
|
}
|
|
2395
|
-
function
|
|
2523
|
+
function ma(e, t, n) {
|
|
2396
2524
|
var r = {};
|
|
2397
2525
|
return Array.from(e.children).forEach(function(i) {
|
|
2398
|
-
if (!(!
|
|
2399
|
-
var a =
|
|
2526
|
+
if (!(!Yi(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
2527
|
+
var a = V(i);
|
|
2400
2528
|
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);
|
|
2401
2529
|
}
|
|
2402
2530
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2403
2531
|
}
|
|
2404
|
-
var
|
|
2405
|
-
function
|
|
2532
|
+
var H = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2533
|
+
function ha() {
|
|
2406
2534
|
var e = [], t;
|
|
2407
2535
|
return {
|
|
2408
2536
|
captureAnimationState: function() {
|
|
2409
2537
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
2410
|
-
if (!(
|
|
2538
|
+
if (!(B(t, "display") === "none" || t === Q.ghost)) {
|
|
2411
2539
|
e.push({
|
|
2412
2540
|
target: t,
|
|
2413
|
-
rect:
|
|
2541
|
+
rect: V(t)
|
|
2414
2542
|
});
|
|
2415
|
-
var n =
|
|
2543
|
+
var n = Mi({}, e[e.length - 1].rect);
|
|
2416
2544
|
if (t.thisAnimationDuration) {
|
|
2417
|
-
var r =
|
|
2545
|
+
var r = Zi(t, !0);
|
|
2418
2546
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2419
2547
|
}
|
|
2420
2548
|
t.fromRect = n;
|
|
@@ -2425,7 +2553,7 @@ function na() {
|
|
|
2425
2553
|
e.push(t);
|
|
2426
2554
|
},
|
|
2427
2555
|
removeAnimationState: function(t) {
|
|
2428
|
-
e.splice(
|
|
2556
|
+
e.splice(aa(e, { target: t }), 1);
|
|
2429
2557
|
},
|
|
2430
2558
|
animateAll: function(n) {
|
|
2431
2559
|
var r = this;
|
|
@@ -2435,8 +2563,8 @@ function na() {
|
|
|
2435
2563
|
}
|
|
2436
2564
|
var i = !1, a = 0;
|
|
2437
2565
|
e.forEach(function(e) {
|
|
2438
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
2439
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2566
|
+
var t = 0, n = e.target, o = n.fromRect, s = V(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Zi(n, !0);
|
|
2567
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && ca(c, s) && !ca(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = _a(u, c, l, r.options)), ca(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() {
|
|
2440
2568
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2441
2569
|
}, t), n.thisAnimationDuration = t);
|
|
2442
2570
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2445,27 +2573,27 @@ function na() {
|
|
|
2445
2573
|
},
|
|
2446
2574
|
animate: function(e, t, n, r) {
|
|
2447
2575
|
if (r) {
|
|
2448
|
-
|
|
2449
|
-
var i =
|
|
2450
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
2451
|
-
|
|
2576
|
+
B(e, "transition", ""), B(e, "transform", "");
|
|
2577
|
+
var i = Zi(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2578
|
+
e.animatingX = !!s, e.animatingY = !!c, B(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = ga(e), B(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), B(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2579
|
+
B(e, "transition", ""), B(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2452
2580
|
}, r);
|
|
2453
2581
|
}
|
|
2454
2582
|
}
|
|
2455
2583
|
};
|
|
2456
2584
|
}
|
|
2457
|
-
function
|
|
2585
|
+
function ga(e) {
|
|
2458
2586
|
return e.offsetWidth;
|
|
2459
2587
|
}
|
|
2460
|
-
function
|
|
2588
|
+
function _a(e, t, n, r) {
|
|
2461
2589
|
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;
|
|
2462
2590
|
}
|
|
2463
|
-
var
|
|
2591
|
+
var va = [], ya = { initializeByDefault: !0 }, ba = {
|
|
2464
2592
|
mount: function(e) {
|
|
2465
|
-
for (var t in
|
|
2466
|
-
|
|
2593
|
+
for (var t in ya) ya.hasOwnProperty(t) && !(t in e) && (e[t] = ya[t]);
|
|
2594
|
+
va.forEach(function(t) {
|
|
2467
2595
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2468
|
-
}),
|
|
2596
|
+
}), va.push(e);
|
|
2469
2597
|
},
|
|
2470
2598
|
pluginEvent: function(e, t, n) {
|
|
2471
2599
|
var r = this;
|
|
@@ -2473,16 +2601,16 @@ var aa = [], oa = { initializeByDefault: !0 }, sa = {
|
|
|
2473
2601
|
r.eventCanceled = !0;
|
|
2474
2602
|
};
|
|
2475
2603
|
var i = e + "Global";
|
|
2476
|
-
|
|
2477
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2604
|
+
va.forEach(function(r) {
|
|
2605
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Mi({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Mi({ sortable: t }, n)));
|
|
2478
2606
|
});
|
|
2479
2607
|
},
|
|
2480
2608
|
initializePlugins: function(e, t, n, r) {
|
|
2481
|
-
for (var i in
|
|
2609
|
+
for (var i in va.forEach(function(r) {
|
|
2482
2610
|
var i = r.pluginName;
|
|
2483
2611
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2484
2612
|
var a = new r(e, t, e.options);
|
|
2485
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2613
|
+
a.sortable = e, a.options = e.options, e[i] = a, Fi(n, a.defaults);
|
|
2486
2614
|
}
|
|
2487
2615
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2488
2616
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2491,59 +2619,59 @@ var aa = [], oa = { initializeByDefault: !0 }, sa = {
|
|
|
2491
2619
|
},
|
|
2492
2620
|
getEventProperties: function(e, t) {
|
|
2493
2621
|
var n = {};
|
|
2494
|
-
return
|
|
2495
|
-
typeof r.eventProperties == "function" &&
|
|
2622
|
+
return va.forEach(function(r) {
|
|
2623
|
+
typeof r.eventProperties == "function" && Fi(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2496
2624
|
}), n;
|
|
2497
2625
|
},
|
|
2498
2626
|
modifyOption: function(e, t, n) {
|
|
2499
2627
|
var r;
|
|
2500
|
-
return
|
|
2628
|
+
return va.forEach(function(i) {
|
|
2501
2629
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2502
2630
|
}), r;
|
|
2503
2631
|
}
|
|
2504
2632
|
};
|
|
2505
|
-
function
|
|
2633
|
+
function xa(e) {
|
|
2506
2634
|
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;
|
|
2507
|
-
if (t ||= n && n[
|
|
2635
|
+
if (t ||= n && n[H], t) {
|
|
2508
2636
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2509
|
-
window.CustomEvent && !
|
|
2637
|
+
window.CustomEvent && !Bi && !Vi ? h = new CustomEvent(r, {
|
|
2510
2638
|
bubbles: !0,
|
|
2511
2639
|
cancelable: !0
|
|
2512
2640
|
}) : (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;
|
|
2513
|
-
var v =
|
|
2641
|
+
var v = Mi(Mi({}, m), ba.getEventProperties(r, t));
|
|
2514
2642
|
for (var y in v) h[y] = v[y];
|
|
2515
2643
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2516
2644
|
}
|
|
2517
2645
|
}
|
|
2518
|
-
var
|
|
2519
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2520
|
-
|
|
2521
|
-
dragEl:
|
|
2522
|
-
parentEl:
|
|
2523
|
-
ghostEl:
|
|
2524
|
-
rootEl:
|
|
2525
|
-
nextEl:
|
|
2526
|
-
lastDownEl:
|
|
2527
|
-
cloneEl:
|
|
2528
|
-
cloneHidden:
|
|
2529
|
-
dragStarted:
|
|
2646
|
+
var Sa = ["evt"], U = function(e, t) {
|
|
2647
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Li(n, Sa);
|
|
2648
|
+
ba.pluginEvent.bind(Q)(e, t, Mi({
|
|
2649
|
+
dragEl: G,
|
|
2650
|
+
parentEl: K,
|
|
2651
|
+
ghostEl: q,
|
|
2652
|
+
rootEl: J,
|
|
2653
|
+
nextEl: Ca,
|
|
2654
|
+
lastDownEl: wa,
|
|
2655
|
+
cloneEl: Y,
|
|
2656
|
+
cloneHidden: Ta,
|
|
2657
|
+
dragStarted: Ba,
|
|
2530
2658
|
putSortable: X,
|
|
2531
2659
|
activeSortable: Q.active,
|
|
2532
2660
|
originalEvent: r,
|
|
2533
|
-
oldIndex:
|
|
2534
|
-
oldDraggableIndex:
|
|
2535
|
-
newIndex:
|
|
2536
|
-
newDraggableIndex:
|
|
2537
|
-
hideGhostForTarget:
|
|
2538
|
-
unhideGhostForTarget:
|
|
2661
|
+
oldIndex: Ea,
|
|
2662
|
+
oldDraggableIndex: Oa,
|
|
2663
|
+
newIndex: Da,
|
|
2664
|
+
newDraggableIndex: ka,
|
|
2665
|
+
hideGhostForTarget: io,
|
|
2666
|
+
unhideGhostForTarget: ao,
|
|
2539
2667
|
cloneNowHidden: function() {
|
|
2540
|
-
|
|
2668
|
+
Ta = !0;
|
|
2541
2669
|
},
|
|
2542
2670
|
cloneNowShown: function() {
|
|
2543
|
-
|
|
2671
|
+
Ta = !1;
|
|
2544
2672
|
},
|
|
2545
2673
|
dispatchSortableEvent: function(e) {
|
|
2546
|
-
|
|
2674
|
+
W({
|
|
2547
2675
|
sortable: t,
|
|
2548
2676
|
name: e,
|
|
2549
2677
|
originalEvent: r
|
|
@@ -2551,46 +2679,46 @@ var la = ["evt"], H = function(e, t) {
|
|
|
2551
2679
|
}
|
|
2552
2680
|
}, i));
|
|
2553
2681
|
};
|
|
2554
|
-
function
|
|
2555
|
-
|
|
2682
|
+
function W(e) {
|
|
2683
|
+
xa(Mi({
|
|
2556
2684
|
putSortable: X,
|
|
2557
|
-
cloneEl:
|
|
2558
|
-
targetEl:
|
|
2559
|
-
rootEl:
|
|
2560
|
-
oldIndex:
|
|
2561
|
-
oldDraggableIndex:
|
|
2562
|
-
newIndex:
|
|
2563
|
-
newDraggableIndex:
|
|
2685
|
+
cloneEl: Y,
|
|
2686
|
+
targetEl: G,
|
|
2687
|
+
rootEl: J,
|
|
2688
|
+
oldIndex: Ea,
|
|
2689
|
+
oldDraggableIndex: Oa,
|
|
2690
|
+
newIndex: Da,
|
|
2691
|
+
newDraggableIndex: ka
|
|
2564
2692
|
}, e));
|
|
2565
2693
|
}
|
|
2566
|
-
var
|
|
2567
|
-
if (
|
|
2568
|
-
if (
|
|
2694
|
+
var G, K, q, J, Ca, wa, Y, Ta, Ea, Da, Oa, ka, Aa, X, ja = !1, Ma = !1, Na = [], Pa, Fa, Ia, La, Ra, za, Ba, Va, Ha, Ua = !1, Wa = !1, Ga, Z, Ka = [], qa = !1, Ja = [], Ya = typeof document < "u", Xa = Wi, Za = Vi || Bi ? "cssFloat" : "float", Qa = Ya && !Gi && !Wi && "draggable" in document.createElement("div"), $a = function() {
|
|
2695
|
+
if (Ya) {
|
|
2696
|
+
if (Bi) return !1;
|
|
2569
2697
|
var e = document.createElement("x");
|
|
2570
2698
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2571
2699
|
}
|
|
2572
|
-
}(),
|
|
2573
|
-
var n =
|
|
2700
|
+
}(), eo = function(e, t) {
|
|
2701
|
+
var n = B(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = ta(e, 0, t), a = ta(e, 1, t), o = i && B(i), s = a && B(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + V(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + V(a).width;
|
|
2574
2702
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2575
2703
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2576
2704
|
if (i && o.float && o.float !== "none") {
|
|
2577
2705
|
var u = o.float === "left" ? "left" : "right";
|
|
2578
2706
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2579
2707
|
}
|
|
2580
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2581
|
-
},
|
|
2708
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Za] === "none" || a && n[Za] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2709
|
+
}, to = function(e, t, n) {
|
|
2582
2710
|
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;
|
|
2583
2711
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2584
|
-
},
|
|
2712
|
+
}, no = function(e, t) {
|
|
2585
2713
|
var n;
|
|
2586
|
-
return
|
|
2587
|
-
var i = r[
|
|
2588
|
-
if (!(!i ||
|
|
2589
|
-
var a =
|
|
2714
|
+
return Na.some(function(r) {
|
|
2715
|
+
var i = r[H].options.emptyInsertThreshold;
|
|
2716
|
+
if (!(!i || na(r))) {
|
|
2717
|
+
var a = V(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2590
2718
|
if (o && s) return n = r;
|
|
2591
2719
|
}
|
|
2592
2720
|
}), n;
|
|
2593
|
-
},
|
|
2721
|
+
}, ro = function(e) {
|
|
2594
2722
|
function t(e, n) {
|
|
2595
2723
|
return function(r, i, a, o) {
|
|
2596
2724
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2603,31 +2731,31 @@ var W, G, K, q, ua, da, J, fa, pa, Y, ma, ha, ga, X, _a = !1, va = !1, ya = [],
|
|
|
2603
2731
|
};
|
|
2604
2732
|
}
|
|
2605
2733
|
var n = {}, r = e.group;
|
|
2606
|
-
(!r ||
|
|
2607
|
-
},
|
|
2608
|
-
|
|
2609
|
-
},
|
|
2610
|
-
|
|
2734
|
+
(!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;
|
|
2735
|
+
}, io = function() {
|
|
2736
|
+
!$a && q && B(q, "display", "none");
|
|
2737
|
+
}, ao = function() {
|
|
2738
|
+
!$a && q && B(q, "display", "");
|
|
2611
2739
|
};
|
|
2612
|
-
|
|
2613
|
-
if (
|
|
2740
|
+
Ya && !Gi && document.addEventListener("click", function(e) {
|
|
2741
|
+
if (Ma) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Ma = !1, !1;
|
|
2614
2742
|
}, !0);
|
|
2615
|
-
var
|
|
2616
|
-
if (
|
|
2743
|
+
var oo = function(e) {
|
|
2744
|
+
if (G) {
|
|
2617
2745
|
e = e.touches ? e.touches[0] : e;
|
|
2618
|
-
var t =
|
|
2746
|
+
var t = no(e.clientX, e.clientY);
|
|
2619
2747
|
if (t) {
|
|
2620
2748
|
var n = {};
|
|
2621
2749
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2622
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
2750
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[H]._onDragOver(n);
|
|
2623
2751
|
}
|
|
2624
2752
|
}
|
|
2625
|
-
},
|
|
2626
|
-
|
|
2753
|
+
}, so = function(e) {
|
|
2754
|
+
G && G.parentNode[H]._isOutsideThisEl(e.target);
|
|
2627
2755
|
};
|
|
2628
2756
|
function Q(e, t) {
|
|
2629
2757
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2630
|
-
this.el = e, this.options = t =
|
|
2758
|
+
this.el = e, this.options = t = Fi({}, t), e[H] = this;
|
|
2631
2759
|
var n = {
|
|
2632
2760
|
group: null,
|
|
2633
2761
|
sort: !0,
|
|
@@ -2640,7 +2768,7 @@ function Q(e, t) {
|
|
|
2640
2768
|
invertedSwapThreshold: null,
|
|
2641
2769
|
removeCloneOnHide: !0,
|
|
2642
2770
|
direction: function() {
|
|
2643
|
-
return
|
|
2771
|
+
return eo(e, this.options);
|
|
2644
2772
|
},
|
|
2645
2773
|
ghostClass: "sortable-ghost",
|
|
2646
2774
|
chosenClass: "sortable-chosen",
|
|
@@ -2667,80 +2795,80 @@ function Q(e, t) {
|
|
|
2667
2795
|
x: 0,
|
|
2668
2796
|
y: 0
|
|
2669
2797
|
},
|
|
2670
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2798
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Ui,
|
|
2671
2799
|
emptyInsertThreshold: 5
|
|
2672
2800
|
};
|
|
2673
|
-
for (var r in
|
|
2674
|
-
for (var i in
|
|
2675
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
2801
|
+
for (var r in ba.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2802
|
+
for (var i in ro(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2803
|
+
this.nativeDraggable = t.forceFallback ? !1 : Qa, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? L(e, "pointerdown", this._onTapStart) : (L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart)), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), Na.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Fi(this, ha());
|
|
2676
2804
|
}
|
|
2677
2805
|
Q.prototype = {
|
|
2678
2806
|
constructor: Q,
|
|
2679
2807
|
_isOutsideThisEl: function(e) {
|
|
2680
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2808
|
+
!this.el.contains(e) && e !== this.el && (Va = null);
|
|
2681
2809
|
},
|
|
2682
2810
|
_getDirection: function(e, t) {
|
|
2683
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t,
|
|
2811
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, G) : this.options.direction;
|
|
2684
2812
|
},
|
|
2685
2813
|
_onTapStart: function(e) {
|
|
2686
2814
|
if (e.cancelable) {
|
|
2687
2815
|
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;
|
|
2688
|
-
if (
|
|
2689
|
-
if (
|
|
2816
|
+
if (vo(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Ui && s && s.tagName.toUpperCase() === "SELECT") && (s = Yi(s, r.draggable, n, !1), !(s && s.animated) && wa !== s)) {
|
|
2817
|
+
if (Ea = ra(s), Oa = ra(s, r.draggable), typeof l == "function") {
|
|
2690
2818
|
if (l.call(this, e, s, this)) {
|
|
2691
|
-
|
|
2819
|
+
W({
|
|
2692
2820
|
sortable: t,
|
|
2693
2821
|
rootEl: c,
|
|
2694
2822
|
name: "filter",
|
|
2695
2823
|
targetEl: s,
|
|
2696
2824
|
toEl: n,
|
|
2697
2825
|
fromEl: n
|
|
2698
|
-
}),
|
|
2826
|
+
}), U("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
2699
2827
|
return;
|
|
2700
2828
|
}
|
|
2701
2829
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2702
|
-
if (r =
|
|
2830
|
+
if (r = Yi(c, r.trim(), n, !1), r) return W({
|
|
2703
2831
|
sortable: t,
|
|
2704
2832
|
rootEl: r,
|
|
2705
2833
|
name: "filter",
|
|
2706
2834
|
targetEl: s,
|
|
2707
2835
|
fromEl: n,
|
|
2708
2836
|
toEl: n
|
|
2709
|
-
}),
|
|
2837
|
+
}), U("filter", t, { evt: e }), !0;
|
|
2710
2838
|
}), l)) {
|
|
2711
2839
|
i && e.cancelable && e.preventDefault();
|
|
2712
2840
|
return;
|
|
2713
2841
|
}
|
|
2714
|
-
r.handle && !
|
|
2842
|
+
r.handle && !Yi(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2715
2843
|
}
|
|
2716
2844
|
}
|
|
2717
2845
|
},
|
|
2718
2846
|
_prepareDragStart: function(e, t, n) {
|
|
2719
2847
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2720
|
-
if (n && !
|
|
2721
|
-
var c =
|
|
2722
|
-
if (
|
|
2723
|
-
target:
|
|
2848
|
+
if (n && !G && n.parentNode === i) {
|
|
2849
|
+
var c = V(n);
|
|
2850
|
+
if (J = i, G = n, K = G.parentNode, Ca = G.nextSibling, wa = n, Aa = a.group, Q.dragged = G, Pa = {
|
|
2851
|
+
target: G,
|
|
2724
2852
|
clientX: (t || e).clientX,
|
|
2725
2853
|
clientY: (t || e).clientY
|
|
2726
|
-
},
|
|
2727
|
-
if (
|
|
2854
|
+
}, Ra = Pa.clientX - c.left, za = Pa.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
|
|
2855
|
+
if (U("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
2728
2856
|
r._onDrop();
|
|
2729
2857
|
return;
|
|
2730
2858
|
}
|
|
2731
|
-
r._disableDelayedDragEvents(), !
|
|
2859
|
+
r._disableDelayedDragEvents(), !Hi && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), W({
|
|
2732
2860
|
sortable: r,
|
|
2733
2861
|
name: "choose",
|
|
2734
2862
|
originalEvent: e
|
|
2735
|
-
}),
|
|
2863
|
+
}), z(G, a.chosenClass, !0);
|
|
2736
2864
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2737
|
-
|
|
2738
|
-
}),
|
|
2865
|
+
Qi(G, e.trim(), uo);
|
|
2866
|
+
}), L(o, "dragover", oo), L(o, "mousemove", oo), L(o, "touchmove", oo), L(o, "mouseup", r._onDrop), L(o, "touchend", r._onDrop), L(o, "touchcancel", r._onDrop), Hi && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), U("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Vi || Bi))) {
|
|
2739
2867
|
if (Q.eventCanceled) {
|
|
2740
2868
|
this._onDrop();
|
|
2741
2869
|
return;
|
|
2742
2870
|
}
|
|
2743
|
-
|
|
2871
|
+
L(o, "mouseup", r._disableDelayedDrag), L(o, "touchend", r._disableDelayedDrag), L(o, "touchcancel", r._disableDelayedDrag), L(o, "mousemove", r._delayedDragTouchMoveHandler), L(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && L(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
2744
2872
|
} else s();
|
|
2745
2873
|
}
|
|
2746
2874
|
},
|
|
@@ -2749,25 +2877,25 @@ Q.prototype = {
|
|
|
2749
2877
|
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();
|
|
2750
2878
|
},
|
|
2751
2879
|
_disableDelayedDrag: function() {
|
|
2752
|
-
|
|
2880
|
+
G && uo(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2753
2881
|
},
|
|
2754
2882
|
_disableDelayedDragEvents: function() {
|
|
2755
2883
|
var e = this.el.ownerDocument;
|
|
2756
|
-
|
|
2884
|
+
R(e, "mouseup", this._disableDelayedDrag), R(e, "touchend", this._disableDelayedDrag), R(e, "touchcancel", this._disableDelayedDrag), R(e, "mousemove", this._delayedDragTouchMoveHandler), R(e, "touchmove", this._delayedDragTouchMoveHandler), R(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
2757
2885
|
},
|
|
2758
2886
|
_triggerDragStart: function(e, t) {
|
|
2759
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
2887
|
+
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? L(document, "pointermove", this._onTouchMove) : t ? L(document, "touchmove", this._onTouchMove) : L(document, "mousemove", this._onTouchMove) : (L(G, "dragend", this), L(J, "dragstart", this._onDragStart));
|
|
2760
2888
|
try {
|
|
2761
|
-
document.selection ?
|
|
2889
|
+
document.selection ? yo(function() {
|
|
2762
2890
|
document.selection.empty();
|
|
2763
2891
|
}) : window.getSelection().removeAllRanges();
|
|
2764
2892
|
} catch {}
|
|
2765
2893
|
},
|
|
2766
2894
|
_dragStarted: function(e, t) {
|
|
2767
|
-
if (
|
|
2768
|
-
|
|
2895
|
+
if (ja = !1, J && G) {
|
|
2896
|
+
U("dragStarted", this, { evt: t }), this.nativeDraggable && L(document, "dragover", so);
|
|
2769
2897
|
var n = this.options;
|
|
2770
|
-
!e &&
|
|
2898
|
+
!e && z(G, n.dragClass, !1), z(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), W({
|
|
2771
2899
|
sortable: this,
|
|
2772
2900
|
name: "start",
|
|
2773
2901
|
originalEvent: t
|
|
@@ -2775,33 +2903,33 @@ Q.prototype = {
|
|
|
2775
2903
|
} else this._nulling();
|
|
2776
2904
|
},
|
|
2777
2905
|
_emulateDragOver: function() {
|
|
2778
|
-
if (
|
|
2779
|
-
this._lastX =
|
|
2780
|
-
for (var e = document.elementFromPoint(
|
|
2781
|
-
if (
|
|
2782
|
-
if (t[
|
|
2906
|
+
if (Fa) {
|
|
2907
|
+
this._lastX = Fa.clientX, this._lastY = Fa.clientY, io();
|
|
2908
|
+
for (var e = document.elementFromPoint(Fa.clientX, Fa.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Fa.clientX, Fa.clientY), e !== t);) t = e;
|
|
2909
|
+
if (G.parentNode[H]._isOutsideThisEl(e), t) do {
|
|
2910
|
+
if (t[H]) {
|
|
2783
2911
|
var n = void 0;
|
|
2784
|
-
if (n = t[
|
|
2785
|
-
clientX:
|
|
2786
|
-
clientY:
|
|
2912
|
+
if (n = t[H]._onDragOver({
|
|
2913
|
+
clientX: Fa.clientX,
|
|
2914
|
+
clientY: Fa.clientY,
|
|
2787
2915
|
target: e,
|
|
2788
2916
|
rootEl: t
|
|
2789
2917
|
}), n && !this.options.dragoverBubble) break;
|
|
2790
2918
|
}
|
|
2791
2919
|
e = t;
|
|
2792
2920
|
} while (t = t.parentNode);
|
|
2793
|
-
|
|
2921
|
+
ao();
|
|
2794
2922
|
}
|
|
2795
2923
|
},
|
|
2796
2924
|
_onTouchMove: function(e) {
|
|
2797
|
-
if (
|
|
2798
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a =
|
|
2799
|
-
if (!Q.active && !
|
|
2925
|
+
if (Pa) {
|
|
2926
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && Zi(q, !0), o = q && a && a.a, s = q && a && a.d, c = Xa && Z && ia(Z), l = (i.clientX - Pa.clientX + r.x) / (o || 1) + (c ? c[0] - Ka[0] : 0) / (o || 1), u = (i.clientY - Pa.clientY + r.y) / (s || 1) + (c ? c[1] - Ka[1] : 0) / (s || 1);
|
|
2927
|
+
if (!Q.active && !ja) {
|
|
2800
2928
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2801
2929
|
this._onDragStart(e, !0);
|
|
2802
2930
|
}
|
|
2803
|
-
if (
|
|
2804
|
-
a ? (a.e += l - (
|
|
2931
|
+
if (q) {
|
|
2932
|
+
a ? (a.e += l - (Ia || 0), a.f += u - (La || 0)) : a = {
|
|
2805
2933
|
a: 1,
|
|
2806
2934
|
b: 0,
|
|
2807
2935
|
c: 0,
|
|
@@ -2810,39 +2938,39 @@ Q.prototype = {
|
|
|
2810
2938
|
f: u
|
|
2811
2939
|
};
|
|
2812
2940
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2813
|
-
|
|
2941
|
+
B(q, "webkitTransform", d), B(q, "mozTransform", d), B(q, "msTransform", d), B(q, "transform", d), Ia = l, La = u, Fa = i;
|
|
2814
2942
|
}
|
|
2815
2943
|
e.cancelable && e.preventDefault();
|
|
2816
2944
|
}
|
|
2817
2945
|
},
|
|
2818
2946
|
_appendGhost: function() {
|
|
2819
|
-
if (!
|
|
2820
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
2821
|
-
if (
|
|
2822
|
-
for (Z = e;
|
|
2823
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
2947
|
+
if (!q) {
|
|
2948
|
+
var e = this.options.fallbackOnBody ? document.body : J, t = V(G, !0, Xa, !0, e), n = this.options;
|
|
2949
|
+
if (Xa) {
|
|
2950
|
+
for (Z = e; B(Z, "position") === "static" && B(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
2951
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = $i()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = $i(), Ka = ia(Z);
|
|
2824
2952
|
}
|
|
2825
|
-
|
|
2953
|
+
q = G.cloneNode(!0), z(q, n.ghostClass, !1), z(q, n.fallbackClass, !0), z(q, n.dragClass, !0), B(q, "transition", ""), B(q, "transform", ""), B(q, "box-sizing", "border-box"), B(q, "margin", 0), B(q, "top", t.top), B(q, "left", t.left), B(q, "width", t.width), B(q, "height", t.height), B(q, "opacity", "0.8"), B(q, "position", Xa ? "absolute" : "fixed"), B(q, "zIndex", "100000"), B(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), B(q, "transform-origin", Ra / parseInt(q.style.width) * 100 + "% " + za / parseInt(q.style.height) * 100 + "%");
|
|
2826
2954
|
}
|
|
2827
2955
|
},
|
|
2828
2956
|
_onDragStart: function(e, t) {
|
|
2829
2957
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
2830
|
-
if (
|
|
2958
|
+
if (U("dragStart", this, { evt: e }), Q.eventCanceled) {
|
|
2831
2959
|
this._onDrop();
|
|
2832
2960
|
return;
|
|
2833
2961
|
}
|
|
2834
|
-
|
|
2835
|
-
|
|
2962
|
+
U("setupClone", this), Q.eventCanceled || (Y = pa(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), z(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = yo(function() {
|
|
2963
|
+
U("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || J.insertBefore(Y, G), n._hideClone(), W({
|
|
2836
2964
|
sortable: n,
|
|
2837
2965
|
name: "clone"
|
|
2838
2966
|
}));
|
|
2839
|
-
}), !t &&
|
|
2967
|
+
}), !t && z(G, i.dragClass, !0), t ? (Ma = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (R(document, "mouseup", n._onDrop), R(document, "touchend", n._onDrop), R(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, G)), L(document, "drop", n), B(G, "transform", "translateZ(0)")), ja = !0, n._dragStartId = yo(n._dragStarted.bind(n, t, e)), L(document, "selectstart", n), Ba = !0, Ui && B(document.body, "user-select", "none");
|
|
2840
2968
|
},
|
|
2841
2969
|
_onDragOver: function(e) {
|
|
2842
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
2843
|
-
if (
|
|
2970
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Aa === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
2971
|
+
if (qa) return;
|
|
2844
2972
|
function h(o, s) {
|
|
2845
|
-
|
|
2973
|
+
U(o, p, Mi({
|
|
2846
2974
|
evt: e,
|
|
2847
2975
|
isOwner: l,
|
|
2848
2976
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2854,7 +2982,7 @@ Q.prototype = {
|
|
|
2854
2982
|
target: n,
|
|
2855
2983
|
completed: _,
|
|
2856
2984
|
onMove: function(n, i) {
|
|
2857
|
-
return
|
|
2985
|
+
return lo(J, t, G, r, n, V(n), e, i);
|
|
2858
2986
|
},
|
|
2859
2987
|
changed: v
|
|
2860
2988
|
}, s));
|
|
@@ -2863,119 +2991,119 @@ Q.prototype = {
|
|
|
2863
2991
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
2864
2992
|
}
|
|
2865
2993
|
function _(r) {
|
|
2866
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
2994
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (z(G, X ? X.options.ghostClass : c.options.ghostClass, !1), z(G, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
2867
2995
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2868
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n ===
|
|
2996
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (Va = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[H]._isOutsideThisEl(e.target), !r && oo(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2869
2997
|
}
|
|
2870
2998
|
function v() {
|
|
2871
|
-
|
|
2999
|
+
Da = ra(G), ka = ra(G, o.draggable), W({
|
|
2872
3000
|
sortable: p,
|
|
2873
3001
|
name: "change",
|
|
2874
3002
|
toEl: t,
|
|
2875
|
-
newIndex:
|
|
2876
|
-
newDraggableIndex:
|
|
3003
|
+
newIndex: Da,
|
|
3004
|
+
newDraggableIndex: ka,
|
|
2877
3005
|
originalEvent: e
|
|
2878
3006
|
});
|
|
2879
3007
|
}
|
|
2880
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
2881
|
-
if (
|
|
2882
|
-
if (
|
|
2883
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
2884
|
-
if (a) return
|
|
2885
|
-
var y =
|
|
2886
|
-
if (!y ||
|
|
2887
|
-
if (y ===
|
|
2888
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
2889
|
-
} else if (y &&
|
|
2890
|
-
var b =
|
|
2891
|
-
if (b ===
|
|
2892
|
-
if (n = b, i =
|
|
3008
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Yi(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3009
|
+
if (G.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3010
|
+
if (Ma = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = Aa.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
|
|
3011
|
+
if (f = this._getDirection(e, n) === "vertical", r = V(G), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3012
|
+
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Ca ? J.insertBefore(G, Ca) : J.appendChild(G)), _(!0);
|
|
3013
|
+
var y = na(t, o.draggable);
|
|
3014
|
+
if (!y || mo(e, f, this) && !y.animated) {
|
|
3015
|
+
if (y === G) return _(!1);
|
|
3016
|
+
if (y && t === e.target && (n = y), n && (i = V(n)), lo(J, t, G, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(G, y.nextSibling) : t.appendChild(G), K = t, v(), _(!0);
|
|
3017
|
+
} else if (y && po(e, f, this)) {
|
|
3018
|
+
var b = ta(t, 0, o, !0);
|
|
3019
|
+
if (b === G) return _(!1);
|
|
3020
|
+
if (n = b, i = V(n), lo(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
|
|
2893
3021
|
} else if (n.parentNode === t) {
|
|
2894
|
-
i =
|
|
2895
|
-
var x = 0, S, C =
|
|
2896
|
-
|
|
3022
|
+
i = V(n);
|
|
3023
|
+
var x = 0, S, C = G.parentNode !== t, w = !to(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = ea(n, "top", "top") || ea(G, "top", "top"), ee = E ? E.scrollTop : void 0;
|
|
3024
|
+
Va !== n && (S = i[T], Ua = !1, Wa = !w && o.invertSwap || C), x = ho(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Wa, Va === n);
|
|
2897
3025
|
var D;
|
|
2898
3026
|
if (x !== 0) {
|
|
2899
|
-
var O =
|
|
3027
|
+
var O = ra(G);
|
|
2900
3028
|
do
|
|
2901
|
-
O -= x, D =
|
|
2902
|
-
while (D && (
|
|
3029
|
+
O -= x, D = K.children[O];
|
|
3030
|
+
while (D && (B(D, "display") === "none" || D === q));
|
|
2903
3031
|
}
|
|
2904
3032
|
if (x === 0 || D === n) return _(!1);
|
|
2905
|
-
|
|
3033
|
+
Va = n, Ha = x;
|
|
2906
3034
|
var k = n.nextElementSibling, te = !1;
|
|
2907
3035
|
te = x === 1;
|
|
2908
|
-
var A =
|
|
2909
|
-
if (A !== !1) return (A === 1 || A === -1) && (te = A === 1),
|
|
3036
|
+
var A = lo(J, t, G, r, n, i, e, te);
|
|
3037
|
+
if (A !== !1) return (A === 1 || A === -1) && (te = A === 1), qa = !0, setTimeout(fo, 30), g(), te && !k ? t.appendChild(G) : n.parentNode.insertBefore(G, te ? k : n), E && fa(E, 0, ee - E.scrollTop), K = G.parentNode, S !== void 0 && !Wa && (Ga = Math.abs(S - V(n)[T])), v(), _(!0);
|
|
2910
3038
|
}
|
|
2911
|
-
if (t.contains(
|
|
3039
|
+
if (t.contains(G)) return _(!1);
|
|
2912
3040
|
}
|
|
2913
3041
|
return !1;
|
|
2914
3042
|
},
|
|
2915
3043
|
_ignoreWhileAnimating: null,
|
|
2916
3044
|
_offMoveEvents: function() {
|
|
2917
|
-
|
|
3045
|
+
R(document, "mousemove", this._onTouchMove), R(document, "touchmove", this._onTouchMove), R(document, "pointermove", this._onTouchMove), R(document, "dragover", oo), R(document, "mousemove", oo), R(document, "touchmove", oo);
|
|
2918
3046
|
},
|
|
2919
3047
|
_offUpEvents: function() {
|
|
2920
3048
|
var e = this.el.ownerDocument;
|
|
2921
|
-
|
|
3049
|
+
R(e, "mouseup", this._onDrop), R(e, "touchend", this._onDrop), R(e, "pointerup", this._onDrop), R(e, "touchcancel", this._onDrop), R(document, "selectstart", this);
|
|
2922
3050
|
},
|
|
2923
3051
|
_onDrop: function(e) {
|
|
2924
3052
|
var t = this.el, n = this.options;
|
|
2925
|
-
if (
|
|
3053
|
+
if (Da = ra(G), ka = ra(G, n.draggable), U("drop", this, { evt: e }), K = G && G.parentNode, Da = ra(G), ka = ra(G, n.draggable), Q.eventCanceled) {
|
|
2926
3054
|
this._nulling();
|
|
2927
3055
|
return;
|
|
2928
3056
|
}
|
|
2929
|
-
|
|
3057
|
+
ja = !1, Wa = !1, Ua = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), bo(this.cloneId), bo(this._dragStartId), this.nativeDraggable && (R(document, "drop", this), R(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ui && B(document.body, "user-select", ""), B(G, "transform", ""), e && (Ba && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), q && q.parentNode && q.parentNode.removeChild(q), (J === K || X && X.lastPutMode !== "clone") && Y && Y.parentNode && Y.parentNode.removeChild(Y), G && (this.nativeDraggable && R(G, "dragend", this), uo(G), G.style["will-change"] = "", Ba && !ja && z(G, X ? X.options.ghostClass : this.options.ghostClass, !1), z(G, this.options.chosenClass, !1), W({
|
|
2930
3058
|
sortable: this,
|
|
2931
3059
|
name: "unchoose",
|
|
2932
|
-
toEl:
|
|
3060
|
+
toEl: K,
|
|
2933
3061
|
newIndex: null,
|
|
2934
3062
|
newDraggableIndex: null,
|
|
2935
3063
|
originalEvent: e
|
|
2936
|
-
}),
|
|
3064
|
+
}), J === K ? Da !== Ea && Da >= 0 && (W({
|
|
2937
3065
|
sortable: this,
|
|
2938
3066
|
name: "update",
|
|
2939
|
-
toEl:
|
|
3067
|
+
toEl: K,
|
|
2940
3068
|
originalEvent: e
|
|
2941
|
-
}),
|
|
3069
|
+
}), W({
|
|
2942
3070
|
sortable: this,
|
|
2943
3071
|
name: "sort",
|
|
2944
|
-
toEl:
|
|
3072
|
+
toEl: K,
|
|
2945
3073
|
originalEvent: e
|
|
2946
|
-
})) : (
|
|
2947
|
-
rootEl:
|
|
3074
|
+
})) : (Da >= 0 && (W({
|
|
3075
|
+
rootEl: K,
|
|
2948
3076
|
name: "add",
|
|
2949
|
-
toEl:
|
|
2950
|
-
fromEl:
|
|
3077
|
+
toEl: K,
|
|
3078
|
+
fromEl: J,
|
|
2951
3079
|
originalEvent: e
|
|
2952
|
-
}),
|
|
3080
|
+
}), W({
|
|
2953
3081
|
sortable: this,
|
|
2954
3082
|
name: "remove",
|
|
2955
|
-
toEl:
|
|
3083
|
+
toEl: K,
|
|
2956
3084
|
originalEvent: e
|
|
2957
|
-
}),
|
|
2958
|
-
rootEl:
|
|
3085
|
+
}), W({
|
|
3086
|
+
rootEl: K,
|
|
2959
3087
|
name: "sort",
|
|
2960
|
-
toEl:
|
|
2961
|
-
fromEl:
|
|
3088
|
+
toEl: K,
|
|
3089
|
+
fromEl: J,
|
|
2962
3090
|
originalEvent: e
|
|
2963
|
-
}),
|
|
3091
|
+
}), W({
|
|
2964
3092
|
sortable: this,
|
|
2965
3093
|
name: "sort",
|
|
2966
|
-
toEl:
|
|
3094
|
+
toEl: K,
|
|
2967
3095
|
originalEvent: e
|
|
2968
|
-
})), X && X.save()), Q.active && ((
|
|
3096
|
+
})), X && X.save()), Q.active && ((Da == null || Da === -1) && (Da = Ea, ka = Oa), W({
|
|
2969
3097
|
sortable: this,
|
|
2970
3098
|
name: "end",
|
|
2971
|
-
toEl:
|
|
3099
|
+
toEl: K,
|
|
2972
3100
|
originalEvent: e
|
|
2973
3101
|
}), this.save()))), this._nulling();
|
|
2974
3102
|
},
|
|
2975
3103
|
_nulling: function() {
|
|
2976
|
-
|
|
3104
|
+
U("nulling", this), J = G = K = q = Ca = Y = wa = Ta = Pa = Fa = Ba = Da = ka = Ea = Oa = Va = Ha = X = Aa = Q.dragged = Q.ghost = Q.clone = Q.active = null, Ja.forEach(function(e) {
|
|
2977
3105
|
e.checked = !0;
|
|
2978
|
-
}),
|
|
3106
|
+
}), Ja.length = Ia = La = 0;
|
|
2979
3107
|
},
|
|
2980
3108
|
handleEvent: function(e) {
|
|
2981
3109
|
switch (e.type) {
|
|
@@ -2985,7 +3113,7 @@ Q.prototype = {
|
|
|
2985
3113
|
break;
|
|
2986
3114
|
case "dragenter":
|
|
2987
3115
|
case "dragover":
|
|
2988
|
-
|
|
3116
|
+
G && (this._onDragOver(e), co(e));
|
|
2989
3117
|
break;
|
|
2990
3118
|
case "selectstart":
|
|
2991
3119
|
e.preventDefault();
|
|
@@ -2993,14 +3121,14 @@ Q.prototype = {
|
|
|
2993
3121
|
}
|
|
2994
3122
|
},
|
|
2995
3123
|
toArray: function() {
|
|
2996
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3124
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Yi(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || _o(t));
|
|
2997
3125
|
return e;
|
|
2998
3126
|
},
|
|
2999
3127
|
sort: function(e, t) {
|
|
3000
3128
|
var n = {}, r = this.el;
|
|
3001
3129
|
this.toArray().forEach(function(e, t) {
|
|
3002
3130
|
var i = r.children[t];
|
|
3003
|
-
|
|
3131
|
+
Yi(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3004
3132
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3005
3133
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3006
3134
|
}), t && this.animateAll();
|
|
@@ -3010,25 +3138,25 @@ Q.prototype = {
|
|
|
3010
3138
|
e && e.set && e.set(this);
|
|
3011
3139
|
},
|
|
3012
3140
|
closest: function(e, t) {
|
|
3013
|
-
return
|
|
3141
|
+
return Yi(e, t || this.options.draggable, this.el, !1);
|
|
3014
3142
|
},
|
|
3015
3143
|
option: function(e, t) {
|
|
3016
3144
|
var n = this.options;
|
|
3017
3145
|
if (t === void 0) return n[e];
|
|
3018
|
-
var r =
|
|
3019
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
3146
|
+
var r = ba.modifyOption(this, e, t);
|
|
3147
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && ro(n);
|
|
3020
3148
|
},
|
|
3021
3149
|
destroy: function() {
|
|
3022
|
-
|
|
3150
|
+
U("destroy", this);
|
|
3023
3151
|
var e = this.el;
|
|
3024
|
-
e[
|
|
3152
|
+
e[H] = null, R(e, "mousedown", this._onTapStart), R(e, "touchstart", this._onTapStart), R(e, "pointerdown", this._onTapStart), this.nativeDraggable && (R(e, "dragover", this), R(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3025
3153
|
e.removeAttribute("draggable");
|
|
3026
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3154
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Na.splice(Na.indexOf(this.el), 1), this.el = e = null;
|
|
3027
3155
|
},
|
|
3028
3156
|
_hideClone: function() {
|
|
3029
|
-
if (!
|
|
3030
|
-
if (
|
|
3031
|
-
|
|
3157
|
+
if (!Ta) {
|
|
3158
|
+
if (U("hideClone", this), Q.eventCanceled) return;
|
|
3159
|
+
B(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), Ta = !0;
|
|
3032
3160
|
}
|
|
3033
3161
|
},
|
|
3034
3162
|
_showClone: function(e) {
|
|
@@ -3036,99 +3164,99 @@ Q.prototype = {
|
|
|
3036
3164
|
this._hideClone();
|
|
3037
3165
|
return;
|
|
3038
3166
|
}
|
|
3039
|
-
if (
|
|
3040
|
-
if (
|
|
3041
|
-
|
|
3167
|
+
if (Ta) {
|
|
3168
|
+
if (U("showClone", this), Q.eventCanceled) return;
|
|
3169
|
+
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : Ca ? J.insertBefore(Y, Ca) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), B(Y, "display", ""), Ta = !1;
|
|
3042
3170
|
}
|
|
3043
3171
|
}
|
|
3044
3172
|
};
|
|
3045
|
-
function
|
|
3173
|
+
function co(e) {
|
|
3046
3174
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3047
3175
|
}
|
|
3048
|
-
function
|
|
3049
|
-
var c, l = e[
|
|
3050
|
-
return window.CustomEvent && !
|
|
3176
|
+
function lo(e, t, n, r, i, a, o, s) {
|
|
3177
|
+
var c, l = e[H], u = l.options.onMove, d;
|
|
3178
|
+
return window.CustomEvent && !Bi && !Vi ? c = new CustomEvent("move", {
|
|
3051
3179
|
bubbles: !0,
|
|
3052
3180
|
cancelable: !0
|
|
3053
|
-
}) : (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 ||
|
|
3181
|
+
}) : (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 || V(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3054
3182
|
}
|
|
3055
|
-
function
|
|
3183
|
+
function uo(e) {
|
|
3056
3184
|
e.draggable = !1;
|
|
3057
3185
|
}
|
|
3058
|
-
function
|
|
3059
|
-
|
|
3186
|
+
function fo() {
|
|
3187
|
+
qa = !1;
|
|
3060
3188
|
}
|
|
3061
|
-
function
|
|
3062
|
-
var r =
|
|
3189
|
+
function po(e, t, n) {
|
|
3190
|
+
var r = V(ta(n.el, 0, n.options, !0)), i = ma(n.el, n.options, q), a = 10;
|
|
3063
3191
|
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;
|
|
3064
3192
|
}
|
|
3065
|
-
function
|
|
3066
|
-
var r =
|
|
3193
|
+
function mo(e, t, n) {
|
|
3194
|
+
var r = V(na(n.el, n.options.draggable)), i = ma(n.el, n.options, q), a = 10;
|
|
3067
3195
|
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;
|
|
3068
3196
|
}
|
|
3069
|
-
function
|
|
3197
|
+
function ho(e, t, n, r, i, a, o, s) {
|
|
3070
3198
|
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;
|
|
3071
3199
|
if (!o) {
|
|
3072
|
-
if (s &&
|
|
3073
|
-
if (!
|
|
3074
|
-
else if (
|
|
3075
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3200
|
+
if (s && Ga < l * i) {
|
|
3201
|
+
if (!Ua && (Ha === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Ua = !0), Ua) f = !0;
|
|
3202
|
+
else if (Ha === 1 ? c < u + Ga : c > d - Ga) return -Ha;
|
|
3203
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return go(t);
|
|
3076
3204
|
}
|
|
3077
3205
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3078
3206
|
}
|
|
3079
|
-
function
|
|
3080
|
-
return
|
|
3207
|
+
function go(e) {
|
|
3208
|
+
return ra(G) < ra(e) ? 1 : -1;
|
|
3081
3209
|
}
|
|
3082
|
-
function
|
|
3210
|
+
function _o(e) {
|
|
3083
3211
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3084
3212
|
return r.toString(36);
|
|
3085
3213
|
}
|
|
3086
|
-
function
|
|
3087
|
-
|
|
3214
|
+
function vo(e) {
|
|
3215
|
+
Ja.length = 0;
|
|
3088
3216
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3089
3217
|
var r = t[n];
|
|
3090
|
-
r.checked &&
|
|
3218
|
+
r.checked && Ja.push(r);
|
|
3091
3219
|
}
|
|
3092
3220
|
}
|
|
3093
|
-
function
|
|
3221
|
+
function yo(e) {
|
|
3094
3222
|
return setTimeout(e, 0);
|
|
3095
3223
|
}
|
|
3096
|
-
function
|
|
3224
|
+
function bo(e) {
|
|
3097
3225
|
return clearTimeout(e);
|
|
3098
3226
|
}
|
|
3099
|
-
|
|
3100
|
-
(Q.active ||
|
|
3227
|
+
Ya && L(document, "touchmove", function(e) {
|
|
3228
|
+
(Q.active || ja) && e.cancelable && e.preventDefault();
|
|
3101
3229
|
}), Q.utils = {
|
|
3102
|
-
on:
|
|
3103
|
-
off:
|
|
3104
|
-
css:
|
|
3105
|
-
find:
|
|
3230
|
+
on: L,
|
|
3231
|
+
off: R,
|
|
3232
|
+
css: B,
|
|
3233
|
+
find: Qi,
|
|
3106
3234
|
is: function(e, t) {
|
|
3107
|
-
return !!
|
|
3108
|
-
},
|
|
3109
|
-
extend:
|
|
3110
|
-
throttle:
|
|
3111
|
-
closest:
|
|
3112
|
-
toggleClass:
|
|
3113
|
-
clone:
|
|
3114
|
-
index:
|
|
3115
|
-
nextTick:
|
|
3116
|
-
cancelNextTick:
|
|
3117
|
-
detectDirection:
|
|
3118
|
-
getChild:
|
|
3235
|
+
return !!Yi(e, t, e, !1);
|
|
3236
|
+
},
|
|
3237
|
+
extend: sa,
|
|
3238
|
+
throttle: ua,
|
|
3239
|
+
closest: Yi,
|
|
3240
|
+
toggleClass: z,
|
|
3241
|
+
clone: pa,
|
|
3242
|
+
index: ra,
|
|
3243
|
+
nextTick: yo,
|
|
3244
|
+
cancelNextTick: bo,
|
|
3245
|
+
detectDirection: eo,
|
|
3246
|
+
getChild: ta
|
|
3119
3247
|
}, Q.get = function(e) {
|
|
3120
|
-
return e[
|
|
3248
|
+
return e[H];
|
|
3121
3249
|
}, Q.mount = function() {
|
|
3122
3250
|
var e = [...arguments];
|
|
3123
3251
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3124
3252
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3125
|
-
e.utils && (Q.utils =
|
|
3253
|
+
e.utils && (Q.utils = Mi(Mi({}, Q.utils), e.utils)), ba.mount(e);
|
|
3126
3254
|
});
|
|
3127
3255
|
}, Q.create = function(e, t) {
|
|
3128
3256
|
return new Q(e, t);
|
|
3129
|
-
}, Q.version =
|
|
3130
|
-
var $ = [],
|
|
3131
|
-
function
|
|
3257
|
+
}, Q.version = Ri;
|
|
3258
|
+
var $ = [], xo, So, Co = !1, wo, To, Eo, Do;
|
|
3259
|
+
function Oo() {
|
|
3132
3260
|
function e() {
|
|
3133
3261
|
for (var e in this.defaults = {
|
|
3134
3262
|
scroll: !0,
|
|
@@ -3141,70 +3269,70 @@ function mo() {
|
|
|
3141
3269
|
return e.prototype = {
|
|
3142
3270
|
dragStarted: function(e) {
|
|
3143
3271
|
var t = e.originalEvent;
|
|
3144
|
-
this.sortable.nativeDraggable ?
|
|
3272
|
+
this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? L(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? L(document, "touchmove", this._handleFallbackAutoScroll) : L(document, "mousemove", this._handleFallbackAutoScroll);
|
|
3145
3273
|
},
|
|
3146
3274
|
dragOverCompleted: function(e) {
|
|
3147
3275
|
var t = e.originalEvent;
|
|
3148
3276
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3149
3277
|
},
|
|
3150
3278
|
drop: function() {
|
|
3151
|
-
this.sortable.nativeDraggable ?
|
|
3279
|
+
this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : (R(document, "pointermove", this._handleFallbackAutoScroll), R(document, "touchmove", this._handleFallbackAutoScroll), R(document, "mousemove", this._handleFallbackAutoScroll)), Ao(), ko(), da();
|
|
3152
3280
|
},
|
|
3153
3281
|
nulling: function() {
|
|
3154
|
-
|
|
3282
|
+
Eo = So = xo = Co = Do = wo = To = null, $.length = 0;
|
|
3155
3283
|
},
|
|
3156
3284
|
_handleFallbackAutoScroll: function(e) {
|
|
3157
3285
|
this._handleAutoScroll(e, !0);
|
|
3158
3286
|
},
|
|
3159
3287
|
_handleAutoScroll: function(e, t) {
|
|
3160
3288
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3161
|
-
if (
|
|
3162
|
-
|
|
3163
|
-
var o =
|
|
3164
|
-
|
|
3165
|
-
var a =
|
|
3166
|
-
a !== o && (o = a,
|
|
3167
|
-
}, 10),
|
|
3289
|
+
if (Eo = e, t || this.options.forceAutoScrollFallback || Vi || Bi || Ui) {
|
|
3290
|
+
jo(e, this.options, a, t);
|
|
3291
|
+
var o = oa(a, !0);
|
|
3292
|
+
Co && (!Do || r !== wo || i !== To) && (Do && Ao(), Do = setInterval(function() {
|
|
3293
|
+
var a = oa(document.elementFromPoint(r, i), !0);
|
|
3294
|
+
a !== o && (o = a, ko()), jo(e, n.options, a, t);
|
|
3295
|
+
}, 10), wo = r, To = i);
|
|
3168
3296
|
} else {
|
|
3169
|
-
if (!this.options.bubbleScroll ||
|
|
3170
|
-
|
|
3297
|
+
if (!this.options.bubbleScroll || oa(a, !0) === $i()) {
|
|
3298
|
+
ko();
|
|
3171
3299
|
return;
|
|
3172
3300
|
}
|
|
3173
|
-
|
|
3301
|
+
jo(e, this.options, oa(a, !1), !1);
|
|
3174
3302
|
}
|
|
3175
3303
|
}
|
|
3176
|
-
},
|
|
3304
|
+
}, Fi(e, {
|
|
3177
3305
|
pluginName: "scroll",
|
|
3178
3306
|
initializeByDefault: !0
|
|
3179
3307
|
});
|
|
3180
3308
|
}
|
|
3181
|
-
function
|
|
3309
|
+
function ko() {
|
|
3182
3310
|
$.forEach(function(e) {
|
|
3183
3311
|
clearInterval(e.pid);
|
|
3184
3312
|
}), $ = [];
|
|
3185
3313
|
}
|
|
3186
|
-
function
|
|
3187
|
-
clearInterval(
|
|
3314
|
+
function Ao() {
|
|
3315
|
+
clearInterval(Do);
|
|
3188
3316
|
}
|
|
3189
|
-
var
|
|
3317
|
+
var jo = ua(function(e, t, n, r) {
|
|
3190
3318
|
if (t.scroll) {
|
|
3191
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3192
|
-
|
|
3193
|
-
var d = 0, f =
|
|
3319
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = $i(), l = !1, u;
|
|
3320
|
+
So !== n && (So = n, ko(), xo = t.scroll, u = t.scrollFn, xo === !0 && (xo = oa(n, !0)));
|
|
3321
|
+
var d = 0, f = xo;
|
|
3194
3322
|
do {
|
|
3195
|
-
var p = f, m =
|
|
3323
|
+
var p = f, m = V(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 = B(p), E = p.scrollLeft, ee = p.scrollTop;
|
|
3196
3324
|
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"));
|
|
3197
3325
|
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);
|
|
3198
3326
|
if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
|
|
3199
3327
|
($[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() {
|
|
3200
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3328
|
+
r && this.layer === 0 && Q.active._onTouchMove(Eo);
|
|
3201
3329
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3202
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
3330
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[H], n, t, e, Eo, $[this.layer].el) !== "continue" || fa($[this.layer].el, n, t);
|
|
3203
3331
|
}.bind({ layer: d }), 24))), d++;
|
|
3204
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3205
|
-
|
|
3332
|
+
} while (t.bubbleScroll && f !== c && (f = oa(f, !1)));
|
|
3333
|
+
Co = l;
|
|
3206
3334
|
}
|
|
3207
|
-
}, 30),
|
|
3335
|
+
}, 30), Mo = function(e) {
|
|
3208
3336
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3209
3337
|
if (t) {
|
|
3210
3338
|
var c = n || i;
|
|
@@ -3216,8 +3344,8 @@ var _o = Zi(function(e, t, n, r) {
|
|
|
3216
3344
|
}));
|
|
3217
3345
|
}
|
|
3218
3346
|
};
|
|
3219
|
-
function
|
|
3220
|
-
|
|
3347
|
+
function No() {}
|
|
3348
|
+
No.prototype = {
|
|
3221
3349
|
startIndex: null,
|
|
3222
3350
|
dragStart: function(e) {
|
|
3223
3351
|
var t = e.oldDraggableIndex;
|
|
@@ -3226,72 +3354,72 @@ yo.prototype = {
|
|
|
3226
3354
|
onSpill: function(e) {
|
|
3227
3355
|
var t = e.dragEl, n = e.putSortable;
|
|
3228
3356
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3229
|
-
var r =
|
|
3357
|
+
var r = ta(this.sortable.el, this.startIndex, this.options);
|
|
3230
3358
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3231
3359
|
},
|
|
3232
|
-
drop:
|
|
3233
|
-
},
|
|
3234
|
-
function
|
|
3235
|
-
|
|
3360
|
+
drop: Mo
|
|
3361
|
+
}, Fi(No, { pluginName: "revertOnSpill" });
|
|
3362
|
+
function Po() {}
|
|
3363
|
+
Po.prototype = {
|
|
3236
3364
|
onSpill: function(e) {
|
|
3237
3365
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3238
3366
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3239
3367
|
},
|
|
3240
|
-
drop:
|
|
3241
|
-
},
|
|
3242
|
-
function
|
|
3368
|
+
drop: Mo
|
|
3369
|
+
}, Fi(Po, { pluginName: "removeOnSpill" }), Q.mount(new Oo()), Q.mount(Po, No);
|
|
3370
|
+
function Fo(e) {
|
|
3243
3371
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3244
3372
|
}
|
|
3245
|
-
function
|
|
3246
|
-
|
|
3373
|
+
function Io(e) {
|
|
3374
|
+
ae() && ee(e);
|
|
3247
3375
|
}
|
|
3248
|
-
function
|
|
3249
|
-
|
|
3376
|
+
function Lo(e) {
|
|
3377
|
+
ae() ? u(e) : r(e);
|
|
3250
3378
|
}
|
|
3251
|
-
var
|
|
3252
|
-
function
|
|
3253
|
-
|
|
3379
|
+
var Ro = null, zo = null;
|
|
3380
|
+
function Bo(e = null, t = null) {
|
|
3381
|
+
Ro = e, zo = t;
|
|
3254
3382
|
}
|
|
3255
|
-
function
|
|
3383
|
+
function Vo() {
|
|
3256
3384
|
return {
|
|
3257
|
-
data:
|
|
3258
|
-
clonedData:
|
|
3385
|
+
data: Ro,
|
|
3386
|
+
clonedData: zo
|
|
3259
3387
|
};
|
|
3260
3388
|
}
|
|
3261
|
-
var
|
|
3262
|
-
function
|
|
3263
|
-
let t =
|
|
3264
|
-
Array.isArray(
|
|
3265
|
-
let l = null, { immediate: u = !0, clone: d =
|
|
3389
|
+
var Ho = Symbol("cloneElement");
|
|
3390
|
+
function Uo(...e) {
|
|
3391
|
+
let t = ae()?.proxy, n = null, i = e[0], [, o, c] = e;
|
|
3392
|
+
Array.isArray(M(o)) || (c = o, o = null);
|
|
3393
|
+
let l = null, { immediate: u = !0, clone: d = Fo, forceFallback: f, fallbackOnBody: p, customUpdate: m } = M(c) ?? {};
|
|
3266
3394
|
function h(e) {
|
|
3267
3395
|
let { from: t, oldIndex: r, item: i } = e, a = Array.from(t.childNodes);
|
|
3268
3396
|
n = f && !p ? a.slice(0, -1) : a;
|
|
3269
|
-
let s =
|
|
3270
|
-
|
|
3397
|
+
let s = M(M(o)?.[r]), c = d(s);
|
|
3398
|
+
Bo(s, c), i[Ho] = c;
|
|
3271
3399
|
}
|
|
3272
3400
|
function g(e) {
|
|
3273
|
-
let t = e.item[
|
|
3274
|
-
if (!
|
|
3275
|
-
if (
|
|
3276
|
-
let n = [...
|
|
3277
|
-
o.value =
|
|
3401
|
+
let t = e.item[Ho];
|
|
3402
|
+
if (!bi(t)) {
|
|
3403
|
+
if (Ci(e.item), a(o)) {
|
|
3404
|
+
let n = [...M(o)];
|
|
3405
|
+
o.value = yi(n, e.newDraggableIndex, t);
|
|
3278
3406
|
return;
|
|
3279
3407
|
}
|
|
3280
|
-
|
|
3408
|
+
yi(M(o), e.newDraggableIndex, t);
|
|
3281
3409
|
}
|
|
3282
3410
|
}
|
|
3283
3411
|
function _(e) {
|
|
3284
3412
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, pullMode: s, clone: c } = e;
|
|
3285
|
-
if (
|
|
3286
|
-
|
|
3413
|
+
if (Si(t, n, r), s === "clone") {
|
|
3414
|
+
Ci(c);
|
|
3287
3415
|
return;
|
|
3288
3416
|
}
|
|
3289
3417
|
if (a(o)) {
|
|
3290
|
-
let e = [...
|
|
3291
|
-
o.value =
|
|
3418
|
+
let e = [...M(o)];
|
|
3419
|
+
o.value = vi(e, i);
|
|
3292
3420
|
return;
|
|
3293
3421
|
}
|
|
3294
|
-
|
|
3422
|
+
vi(M(o), i);
|
|
3295
3423
|
}
|
|
3296
3424
|
function v(e) {
|
|
3297
3425
|
if (m) {
|
|
@@ -3299,12 +3427,12 @@ function ko(...e) {
|
|
|
3299
3427
|
return;
|
|
3300
3428
|
}
|
|
3301
3429
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, newDraggableIndex: s } = e;
|
|
3302
|
-
if (
|
|
3303
|
-
let e = [...
|
|
3304
|
-
o.value =
|
|
3430
|
+
if (Ci(n), Si(t, n, r), a(o)) {
|
|
3431
|
+
let e = [...M(o)];
|
|
3432
|
+
o.value = hi(e, i, s);
|
|
3305
3433
|
return;
|
|
3306
3434
|
}
|
|
3307
|
-
|
|
3435
|
+
hi(M(o), i, s);
|
|
3308
3436
|
}
|
|
3309
3437
|
function y(e) {
|
|
3310
3438
|
let { newIndex: t, oldIndex: i, from: a, to: o } = e, s = null, c = t === i && a === o;
|
|
@@ -3323,7 +3451,7 @@ function ko(...e) {
|
|
|
3323
3451
|
n = null;
|
|
3324
3452
|
}
|
|
3325
3453
|
r(() => {
|
|
3326
|
-
if (
|
|
3454
|
+
if (Bo(), s) throw s;
|
|
3327
3455
|
});
|
|
3328
3456
|
}
|
|
3329
3457
|
let b = {
|
|
@@ -3334,20 +3462,20 @@ function ko(...e) {
|
|
|
3334
3462
|
onEnd: y
|
|
3335
3463
|
};
|
|
3336
3464
|
function x(e) {
|
|
3337
|
-
let n =
|
|
3338
|
-
return e ||=
|
|
3465
|
+
let n = M(i);
|
|
3466
|
+
return e ||= xi(n) ? wi(n, t?.$el) : n, e && !Di(e) && (e = e.$el), e || mi("Root element not found"), e;
|
|
3339
3467
|
}
|
|
3340
3468
|
function S() {
|
|
3341
|
-
let e =
|
|
3342
|
-
return
|
|
3343
|
-
|
|
3344
|
-
}),
|
|
3469
|
+
let e = M(c) ?? {}, { immediate: t, clone: n } = e, r = di(e, ["immediate", "clone"]);
|
|
3470
|
+
return Oi(r, (e, t) => {
|
|
3471
|
+
ki(e) && (r[e] = (e, ...n) => (Ai(e, Vo()), t(e, ...n)));
|
|
3472
|
+
}), Ei(o === null ? {} : b, r);
|
|
3345
3473
|
}
|
|
3346
3474
|
let C = (e) => {
|
|
3347
3475
|
e = x(e), l && w.destroy(), l = new Q(e, S());
|
|
3348
3476
|
};
|
|
3349
3477
|
s(() => c, () => {
|
|
3350
|
-
l &&
|
|
3478
|
+
l && Oi(S(), (e, t) => {
|
|
3351
3479
|
l?.option(e, t);
|
|
3352
3480
|
});
|
|
3353
3481
|
}, { deep: !0 });
|
|
@@ -3360,15 +3488,15 @@ function ko(...e) {
|
|
|
3360
3488
|
toArray: () => l?.toArray(),
|
|
3361
3489
|
closest: (...e) => l?.closest(...e)
|
|
3362
3490
|
};
|
|
3363
|
-
return
|
|
3491
|
+
return Lo(() => {
|
|
3364
3492
|
u && C();
|
|
3365
|
-
}),
|
|
3493
|
+
}), Io(w.destroy), ui({
|
|
3366
3494
|
start: C,
|
|
3367
3495
|
pause: () => w?.option("disabled", !0),
|
|
3368
3496
|
resume: () => w?.option("disabled", !1)
|
|
3369
3497
|
}, w);
|
|
3370
3498
|
}
|
|
3371
|
-
var
|
|
3499
|
+
var Wo = [
|
|
3372
3500
|
"update",
|
|
3373
3501
|
"start",
|
|
3374
3502
|
"add",
|
|
@@ -3381,7 +3509,7 @@ var Ao = [
|
|
|
3381
3509
|
"clone",
|
|
3382
3510
|
"move",
|
|
3383
3511
|
"change"
|
|
3384
|
-
],
|
|
3512
|
+
], Go = y({
|
|
3385
3513
|
name: "VueDraggable",
|
|
3386
3514
|
model: {
|
|
3387
3515
|
prop: "modelValue",
|
|
@@ -3431,37 +3559,37 @@ var Ao = [
|
|
|
3431
3559
|
"tag",
|
|
3432
3560
|
"target",
|
|
3433
3561
|
"customUpdate",
|
|
3434
|
-
...
|
|
3562
|
+
...Wo.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3435
3563
|
],
|
|
3436
|
-
emits: ["update:modelValue", ...
|
|
3564
|
+
emits: ["update:modelValue", ...Wo],
|
|
3437
3565
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3438
|
-
let a =
|
|
3566
|
+
let a = Wo.reduce((e, t) => {
|
|
3439
3567
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3440
3568
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3441
3569
|
}, {}), s = x(() => {
|
|
3442
|
-
let t = S(e), { modelValue: n } = t, r =
|
|
3443
|
-
let r =
|
|
3570
|
+
let t = S(e), { modelValue: n } = t, r = di(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3571
|
+
let r = M(n);
|
|
3444
3572
|
return r !== void 0 && (e[t] = r), e;
|
|
3445
3573
|
}, {});
|
|
3446
|
-
return
|
|
3574
|
+
return ui(ui({}, a), _i(ui(ui({}, i), o)));
|
|
3447
3575
|
}), c = x({
|
|
3448
3576
|
get: () => e.modelValue,
|
|
3449
3577
|
set: (e) => n("update:modelValue", e)
|
|
3450
|
-
}), l = h(), u = o(
|
|
3578
|
+
}), l = h(), u = o(Uo(e.target || l, c, s));
|
|
3451
3579
|
return r(u), () => f(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
|
|
3452
3580
|
}
|
|
3453
|
-
}),
|
|
3581
|
+
}), Ko = {
|
|
3454
3582
|
mounted: "mounted",
|
|
3455
3583
|
unmounted: "unmounted"
|
|
3456
3584
|
};
|
|
3457
|
-
|
|
3585
|
+
Ko.mounted, Ko.unmounted;
|
|
3458
3586
|
//#endregion
|
|
3459
3587
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3460
|
-
var
|
|
3588
|
+
var qo = { class: "tpl:w-full" }, Jo = { class: "tpl:flex tpl:gap-0" }, Yo = {
|
|
3461
3589
|
key: 0,
|
|
3462
3590
|
"data-testid": "section-drop-hint",
|
|
3463
3591
|
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)]"
|
|
3464
|
-
},
|
|
3592
|
+
}, Xo = /* @__PURE__ */ y({
|
|
3465
3593
|
__name: "SectionBlock",
|
|
3466
3594
|
props: {
|
|
3467
3595
|
block: {},
|
|
@@ -3469,13 +3597,13 @@ var No = { class: "tpl:w-full" }, Po = { class: "tpl:flex tpl:gap-0" }, Fo = {
|
|
|
3469
3597
|
},
|
|
3470
3598
|
setup(n) {
|
|
3471
3599
|
let r = {
|
|
3472
|
-
title:
|
|
3473
|
-
paragraph:
|
|
3474
|
-
image:
|
|
3475
|
-
button:
|
|
3476
|
-
divider:
|
|
3477
|
-
custom:
|
|
3478
|
-
}, a = n, { t: o } =
|
|
3600
|
+
title: ri,
|
|
3601
|
+
paragraph: zr,
|
|
3602
|
+
image: Er,
|
|
3603
|
+
button: _n,
|
|
3604
|
+
divider: sr,
|
|
3605
|
+
custom: ar
|
|
3606
|
+
}, a = n, { t: o } = St(), s = Ze(ft, "SectionBlock"), l = F(_t, null), u = F(mt, null), d = x(() => {
|
|
3479
3607
|
switch (a.block.columns) {
|
|
3480
3608
|
case "2": return ["50%", "50%"];
|
|
3481
3609
|
case "3": return [
|
|
@@ -3501,7 +3629,7 @@ var No = { class: "tpl:w-full" }, Po = { class: "tpl:flex tpl:gap-0" }, Fo = {
|
|
|
3501
3629
|
r[e] = n, s.updateBlock(a.block.id, { children: r });
|
|
3502
3630
|
}
|
|
3503
3631
|
function h(e) {
|
|
3504
|
-
return
|
|
3632
|
+
return Br(e, u, r);
|
|
3505
3633
|
}
|
|
3506
3634
|
function g(e, t) {
|
|
3507
3635
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
@@ -3509,16 +3637,16 @@ var No = { class: "tpl:w-full" }, Po = { class: "tpl:flex tpl:gap-0" }, Fo = {
|
|
|
3509
3637
|
dataSourceFetched: t.dataSourceFetched
|
|
3510
3638
|
});
|
|
3511
3639
|
}
|
|
3512
|
-
return (r, a) => (e(), w("div",
|
|
3640
|
+
return (r, a) => (e(), w("div", qo, [C("div", Jo, [(e(!0), w(D, null, c(f.value, (r, a) => (e(), w("div", {
|
|
3513
3641
|
key: a,
|
|
3514
3642
|
class: v(["tpl:relative tpl:min-h-[60px] tpl:rounded", p(a).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3515
3643
|
style: A({ width: d.value[a] })
|
|
3516
|
-
}, [
|
|
3644
|
+
}, [P(M(Go), {
|
|
3517
3645
|
"model-value": p(a),
|
|
3518
3646
|
group: {
|
|
3519
3647
|
name: "blocks",
|
|
3520
3648
|
pull: !0,
|
|
3521
|
-
put: (e, t, n) => n
|
|
3649
|
+
put: (e, t, n) => M(ii)(n)
|
|
3522
3650
|
},
|
|
3523
3651
|
animation: 150,
|
|
3524
3652
|
"ghost-class": "tpl-ghost",
|
|
@@ -3531,18 +3659,18 @@ var No = { class: "tpl:w-full" }, Po = { class: "tpl:flex tpl:gap-0" }, Fo = {
|
|
|
3531
3659
|
class: "tpl:min-h-[60px]",
|
|
3532
3660
|
"onUpdate:modelValue": (e) => m(a, e)
|
|
3533
3661
|
}, {
|
|
3534
|
-
default:
|
|
3662
|
+
default: se(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [P(ti, {
|
|
3535
3663
|
block: r,
|
|
3536
|
-
"is-selected":
|
|
3664
|
+
"is-selected": M(s).state.selectedBlockId === r.id,
|
|
3537
3665
|
viewport: n.viewport,
|
|
3538
|
-
"preview-mode":
|
|
3539
|
-
onSelect: (e) =>
|
|
3666
|
+
"preview-mode": M(s).state.previewMode,
|
|
3667
|
+
onSelect: (e) => M(s).selectBlock(r.id)
|
|
3540
3668
|
}, {
|
|
3541
|
-
default:
|
|
3669
|
+
default: se(() => [(e(), j(i(h(r)), {
|
|
3542
3670
|
block: r,
|
|
3543
3671
|
viewport: n.viewport,
|
|
3544
3672
|
onFetchData: (e) => g(r, e),
|
|
3545
|
-
onUpdate: (e) =>
|
|
3673
|
+
onUpdate: (e) => M(s).updateBlock(r.id, e)
|
|
3546
3674
|
}, null, 40, [
|
|
3547
3675
|
"block",
|
|
3548
3676
|
"viewport",
|
|
@@ -3556,19 +3684,19 @@ var No = { class: "tpl:w-full" }, Po = { class: "tpl:flex tpl:gap-0" }, Fo = {
|
|
|
3556
3684
|
"viewport",
|
|
3557
3685
|
"preview-mode",
|
|
3558
3686
|
"onSelect"
|
|
3559
|
-
])])), [[te, !
|
|
3687
|
+
])])), [[te, !M(l)?.isHidden(r.id)]])), 128))]),
|
|
3560
3688
|
_: 2
|
|
3561
3689
|
}, 1032, [
|
|
3562
3690
|
"model-value",
|
|
3563
3691
|
"group",
|
|
3564
3692
|
"onUpdate:modelValue"
|
|
3565
|
-
]), p(a).length === 0 ? (e(), w("div",
|
|
3693
|
+
]), p(a).length === 0 ? (e(), w("div", Yo, [C("span", null, N(M(o).section.dropHere), 1)])) : O("", !0)], 6))), 128))])]));
|
|
3566
3694
|
}
|
|
3567
|
-
}),
|
|
3695
|
+
}), Zo = Ee, Qo = {
|
|
3568
3696
|
small: 24,
|
|
3569
3697
|
medium: 32,
|
|
3570
3698
|
large: 48
|
|
3571
|
-
},
|
|
3699
|
+
}, $o = [
|
|
3572
3700
|
"facebook",
|
|
3573
3701
|
"twitter",
|
|
3574
3702
|
"instagram",
|
|
@@ -3586,11 +3714,11 @@ var No = { class: "tpl:w-full" }, Po = { class: "tpl:flex tpl:gap-0" }, Fo = {
|
|
|
3586
3714
|
"github",
|
|
3587
3715
|
"dribbble",
|
|
3588
3716
|
"behance"
|
|
3589
|
-
],
|
|
3717
|
+
], es = [
|
|
3590
3718
|
"width",
|
|
3591
3719
|
"height",
|
|
3592
3720
|
"fill"
|
|
3593
|
-
],
|
|
3721
|
+
], ts = ["d"], ns = /* @__PURE__ */ y({
|
|
3594
3722
|
__name: "SocialIconSvg",
|
|
3595
3723
|
props: {
|
|
3596
3724
|
platform: {},
|
|
@@ -3598,7 +3726,7 @@ var No = { class: "tpl:w-full" }, Po = { class: "tpl:flex tpl:gap-0" }, Fo = {
|
|
|
3598
3726
|
iconSize: {}
|
|
3599
3727
|
},
|
|
3600
3728
|
setup(t) {
|
|
3601
|
-
let n = t, r = x(() =>
|
|
3729
|
+
let n = t, r = x(() => Zo[n.platform]), i = x(() => Qo[n.iconSize]), a = x(() => {
|
|
3602
3730
|
let e = {
|
|
3603
3731
|
display: "inline-flex",
|
|
3604
3732
|
alignItems: "center",
|
|
@@ -3642,25 +3770,25 @@ var No = { class: "tpl:w-full" }, Po = { class: "tpl:flex tpl:gap-0" }, Fo = {
|
|
|
3642
3770
|
viewBox: "0 0 24 24",
|
|
3643
3771
|
fill: s.value,
|
|
3644
3772
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3645
|
-
}, [C("path", { d: r.value.path }, null, 8,
|
|
3773
|
+
}, [C("path", { d: r.value.path }, null, 8, ts)], 8, es))], 4));
|
|
3646
3774
|
}
|
|
3647
|
-
}),
|
|
3775
|
+
}), rs = { class: "tpl:w-full" }, is = ["href"], as = {
|
|
3648
3776
|
key: 1,
|
|
3649
3777
|
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)]"
|
|
3650
|
-
},
|
|
3778
|
+
}, os = /* @__PURE__ */ y({
|
|
3651
3779
|
__name: "SocialIconsBlock",
|
|
3652
3780
|
props: {
|
|
3653
3781
|
block: {},
|
|
3654
3782
|
viewport: {}
|
|
3655
3783
|
},
|
|
3656
3784
|
setup(t) {
|
|
3657
|
-
let n = t, { t: r } =
|
|
3785
|
+
let n = t, { t: r } = St(), i = x(() => ({
|
|
3658
3786
|
display: "flex",
|
|
3659
3787
|
flexWrap: "wrap",
|
|
3660
3788
|
gap: `${n.block.spacing}px`,
|
|
3661
3789
|
justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
|
|
3662
3790
|
})), a = x(() => n.block.icons.length > 0);
|
|
3663
|
-
return (n, o) => (e(), w("div",
|
|
3791
|
+
return (n, o) => (e(), w("div", rs, [a.value ? (e(), w("div", {
|
|
3664
3792
|
key: 0,
|
|
3665
3793
|
style: A(i.value)
|
|
3666
3794
|
}, [(e(!0), w(D, null, c(t.block.icons, (n) => (e(), w("a", {
|
|
@@ -3668,7 +3796,7 @@ var No = { class: "tpl:w-full" }, Po = { class: "tpl:flex tpl:gap-0" }, Fo = {
|
|
|
3668
3796
|
href: n.url || "#",
|
|
3669
3797
|
class: "tpl:cursor-default",
|
|
3670
3798
|
onClick: o[0] ||= b(() => {}, ["prevent"])
|
|
3671
|
-
}, [
|
|
3799
|
+
}, [P(ns, {
|
|
3672
3800
|
platform: n.platform,
|
|
3673
3801
|
"icon-style": t.block.iconStyle,
|
|
3674
3802
|
"icon-size": t.block.iconSize
|
|
@@ -3676,44 +3804,44 @@ var No = { class: "tpl:w-full" }, Po = { class: "tpl:flex tpl:gap-0" }, Fo = {
|
|
|
3676
3804
|
"platform",
|
|
3677
3805
|
"icon-style",
|
|
3678
3806
|
"icon-size"
|
|
3679
|
-
])], 8,
|
|
3807
|
+
])], 8, is))), 128))], 4)) : (e(), w("div", as, [P(M(On), { size: 16 }), C("span", null, N(M(r).social.addIcons), 1)]))]));
|
|
3680
3808
|
}
|
|
3681
|
-
}),
|
|
3809
|
+
}), ss = { class: "tpl:w-full" }, cs = {
|
|
3682
3810
|
key: 0,
|
|
3683
3811
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3684
3812
|
style: {
|
|
3685
3813
|
"background-color": "var(--tpl-bg-hover)",
|
|
3686
3814
|
color: "var(--tpl-text-dim)"
|
|
3687
3815
|
}
|
|
3688
|
-
},
|
|
3816
|
+
}, ls = /* @__PURE__ */ y({
|
|
3689
3817
|
__name: "SpacerBlock",
|
|
3690
3818
|
props: {
|
|
3691
3819
|
block: {},
|
|
3692
3820
|
viewport: {}
|
|
3693
3821
|
},
|
|
3694
3822
|
setup(t) {
|
|
3695
|
-
let n = t, r =
|
|
3823
|
+
let n = t, r = Ze(ft, "SpacerBlock"), i = x(() => ({
|
|
3696
3824
|
height: `${n.block.height}px`,
|
|
3697
3825
|
minHeight: `${n.block.height}px`,
|
|
3698
3826
|
...r.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3699
3827
|
}));
|
|
3700
|
-
return (n, a) => (e(), w("div",
|
|
3828
|
+
return (n, a) => (e(), w("div", ss, [C("div", {
|
|
3701
3829
|
style: A(i.value),
|
|
3702
|
-
class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !
|
|
3703
|
-
}, [
|
|
3830
|
+
class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !M(r).state.previewMode }])
|
|
3831
|
+
}, [M(r).state.previewMode ? O("", !0) : (e(), w("span", cs, N(t.block.height) + "px ", 1))], 6)]));
|
|
3704
3832
|
}
|
|
3705
|
-
}),
|
|
3833
|
+
}), us = { class: "tpl:w-full" }, ds = { key: 0 }, fs = [
|
|
3706
3834
|
"aria-label",
|
|
3707
3835
|
"data-placeholder",
|
|
3708
3836
|
"onBlur"
|
|
3709
|
-
],
|
|
3837
|
+
], ps = [
|
|
3710
3838
|
"aria-label",
|
|
3711
3839
|
"data-placeholder",
|
|
3712
3840
|
"onBlur"
|
|
3713
|
-
],
|
|
3841
|
+
], ms = {
|
|
3714
3842
|
key: 1,
|
|
3715
3843
|
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)]"
|
|
3716
|
-
},
|
|
3844
|
+
}, hs = /*#__PURE__*/ kt(/* @__PURE__ */ y({
|
|
3717
3845
|
__name: "TableBlock",
|
|
3718
3846
|
props: {
|
|
3719
3847
|
block: {},
|
|
@@ -3727,7 +3855,7 @@ var No = { class: "tpl:w-full" }, Po = { class: "tpl:flex tpl:gap-0" }, Fo = {
|
|
|
3727
3855
|
updated(e, t) {
|
|
3728
3856
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
3729
3857
|
}
|
|
3730
|
-
}, i = n, { t: a } =
|
|
3858
|
+
}, i = n, { t: a } = St(), o = Ze(ft, "TableBlock"), s = x(() => i.block.rows.length > 0), l = x(() => ({
|
|
3731
3859
|
width: "100%",
|
|
3732
3860
|
borderCollapse: "collapse",
|
|
3733
3861
|
fontSize: `${i.block.fontSize}px`,
|
|
@@ -3756,31 +3884,31 @@ var No = { class: "tpl:w-full" }, Po = { class: "tpl:flex tpl:gap-0" }, Fo = {
|
|
|
3756
3884
|
} : n);
|
|
3757
3885
|
o.updateBlock(i.block.id, { rows: a });
|
|
3758
3886
|
}
|
|
3759
|
-
return (n, i) => (e(), w("div",
|
|
3887
|
+
return (n, i) => (e(), w("div", us, [s.value ? (e(), w("table", {
|
|
3760
3888
|
key: 0,
|
|
3761
3889
|
style: A(l.value),
|
|
3762
3890
|
class: "tpl-table-editable"
|
|
3763
|
-
}, [f.value ? (e(), w("thead",
|
|
3891
|
+
}, [f.value ? (e(), w("thead", ds, [C("tr", null, [(e(!0), w(D, null, c(f.value.cells, (n) => t((e(), w("th", {
|
|
3764
3892
|
key: n.id,
|
|
3765
3893
|
style: A(d.value),
|
|
3766
|
-
"aria-label":
|
|
3894
|
+
"aria-label": M(a).table.cellPlaceholder,
|
|
3767
3895
|
contenteditable: "true",
|
|
3768
|
-
"data-placeholder":
|
|
3896
|
+
"data-placeholder": M(a).table.cellPlaceholder,
|
|
3769
3897
|
onBlur: (e) => h(f.value.id, n.id, e),
|
|
3770
|
-
onKeydown: i[0] ||=
|
|
3898
|
+
onKeydown: i[0] ||= re(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3771
3899
|
onClick: b(m, ["stop"])
|
|
3772
|
-
}, null, 44,
|
|
3900
|
+
}, null, 44, fs)), [[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", {
|
|
3773
3901
|
key: o.id,
|
|
3774
3902
|
style: A(u.value),
|
|
3775
|
-
"aria-label":
|
|
3903
|
+
"aria-label": M(a).table.cellPlaceholder,
|
|
3776
3904
|
contenteditable: "true",
|
|
3777
|
-
"data-placeholder":
|
|
3905
|
+
"data-placeholder": M(a).table.cellPlaceholder,
|
|
3778
3906
|
onBlur: (e) => h(n.id, o.id, e),
|
|
3779
|
-
onKeydown: i[1] ||=
|
|
3907
|
+
onKeydown: i[1] ||= re(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3780
3908
|
onClick: b(m, ["stop"])
|
|
3781
|
-
}, null, 44,
|
|
3909
|
+
}, null, 44, ps)), [[r, o.content]])), 128))]))), 128))])], 4)) : (e(), w("div", ms, [P(M(kn), { size: 16 }), C("span", null, N(M(a).table.empty), 1)]))]));
|
|
3782
3910
|
}
|
|
3783
|
-
}), [["__scopeId", "data-v-f065872a"]]),
|
|
3911
|
+
}), [["__scopeId", "data-v-f065872a"]]), gs = /* @__PURE__ */ y({
|
|
3784
3912
|
__name: "VideoPlayButton",
|
|
3785
3913
|
props: { hoverEffect: {
|
|
3786
3914
|
type: Boolean,
|
|
@@ -3798,7 +3926,7 @@ var No = { class: "tpl:w-full" }, Po = { class: "tpl:flex tpl:gap-0" }, Fo = {
|
|
|
3798
3926
|
});
|
|
3799
3927
|
//#endregion
|
|
3800
3928
|
//#region src/utils/videoThumbnail.ts
|
|
3801
|
-
function
|
|
3929
|
+
function _s(e) {
|
|
3802
3930
|
if (!e) return {
|
|
3803
3931
|
platform: "unknown",
|
|
3804
3932
|
videoId: null,
|
|
@@ -3830,25 +3958,25 @@ function rs(e) {
|
|
|
3830
3958
|
thumbnailUrl: null
|
|
3831
3959
|
};
|
|
3832
3960
|
}
|
|
3833
|
-
function
|
|
3834
|
-
return t ||
|
|
3961
|
+
function vs(e, t) {
|
|
3962
|
+
return t || _s(e).thumbnailUrl;
|
|
3835
3963
|
}
|
|
3836
3964
|
//#endregion
|
|
3837
3965
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3838
|
-
var
|
|
3966
|
+
var ys = ["src", "alt"], bs = {
|
|
3839
3967
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3840
3968
|
style: { opacity: "0.7" }
|
|
3841
|
-
},
|
|
3969
|
+
}, xs = ["href"], Ss = ["src", "alt"], Cs = ["src", "alt"], ws = {
|
|
3842
3970
|
key: 3,
|
|
3843
3971
|
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)]"
|
|
3844
|
-
},
|
|
3972
|
+
}, Ts = /* @__PURE__ */ y({
|
|
3845
3973
|
__name: "VideoBlock",
|
|
3846
3974
|
props: {
|
|
3847
3975
|
block: {},
|
|
3848
3976
|
viewport: {}
|
|
3849
3977
|
},
|
|
3850
3978
|
setup(t) {
|
|
3851
|
-
let n = t, { t: r } =
|
|
3979
|
+
let n = t, { t: r } = St(), { syntax: i } = At(), a = x(() => De(n.block.url, i) || De(n.block.thumbnailUrl, i)), o = x(() => a.value ? null : vs(n.block.url, n.block.thumbnailUrl)), s = x(() => ({ textAlign: n.block.align })), c = x(() => {
|
|
3852
3980
|
let e = n.block.align;
|
|
3853
3981
|
return {
|
|
3854
3982
|
maxWidth: "100%",
|
|
@@ -3857,7 +3985,7 @@ var as = ["src", "alt"], os = {
|
|
|
3857
3985
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
3858
3986
|
marginRight: e === "center" ? "auto" : void 0
|
|
3859
3987
|
};
|
|
3860
|
-
}), l = x(() =>
|
|
3988
|
+
}), l = x(() => De(n.block.url, i) ? n.block.url : n.block.thumbnailUrl);
|
|
3861
3989
|
return (n, i) => (e(), w("div", {
|
|
3862
3990
|
class: "tpl:w-full",
|
|
3863
3991
|
style: A(s.value)
|
|
@@ -3869,16 +3997,16 @@ var as = ["src", "alt"], os = {
|
|
|
3869
3997
|
class: "tpl:w-full tpl:border-0",
|
|
3870
3998
|
src: t.block.placeholderUrl,
|
|
3871
3999
|
alt: t.block.alt
|
|
3872
|
-
}, null, 8,
|
|
4000
|
+
}, null, 8, ys), P(gs)], 4)) : a.value ? (e(), w("div", {
|
|
3873
4001
|
key: 1,
|
|
3874
4002
|
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)]",
|
|
3875
4003
|
style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
|
|
3876
|
-
}, [
|
|
4004
|
+
}, [P(M(An), {
|
|
3877
4005
|
size: 36,
|
|
3878
4006
|
"stroke-width": 1.5,
|
|
3879
4007
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3880
4008
|
style: { opacity: "0.5" }
|
|
3881
|
-
}), C("span",
|
|
4009
|
+
}), C("span", bs, N(l.value), 1)], 4)) : o.value ? (e(), w(D, { key: 2 }, [t.block.url ? (e(), w("a", {
|
|
3882
4010
|
key: 0,
|
|
3883
4011
|
href: t.block.url,
|
|
3884
4012
|
target: "_blank",
|
|
@@ -3890,7 +4018,7 @@ var as = ["src", "alt"], os = {
|
|
|
3890
4018
|
class: "tpl:w-full tpl:border-0",
|
|
3891
4019
|
src: o.value,
|
|
3892
4020
|
alt: t.block.alt
|
|
3893
|
-
}, null, 8,
|
|
4021
|
+
}, null, 8, Ss), P(gs, { "hover-effect": "" })], 12, xs)) : (e(), w("div", {
|
|
3894
4022
|
key: 1,
|
|
3895
4023
|
class: "tpl:relative tpl:inline-block",
|
|
3896
4024
|
style: A(c.value)
|
|
@@ -3898,48 +4026,48 @@ var as = ["src", "alt"], os = {
|
|
|
3898
4026
|
class: "tpl:w-full tpl:border-0",
|
|
3899
4027
|
src: o.value,
|
|
3900
4028
|
alt: t.block.alt
|
|
3901
|
-
}, null, 8,
|
|
4029
|
+
}, null, 8, Cs), P(gs)], 4))], 64)) : (e(), w("div", ws, [P(M(An), {
|
|
3902
4030
|
size: 40,
|
|
3903
4031
|
"stroke-width": 1.5,
|
|
3904
4032
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3905
|
-
}), C("span", null, M(
|
|
3906
|
-
}
|
|
3907
|
-
}),
|
|
3908
|
-
section:
|
|
3909
|
-
title:
|
|
3910
|
-
paragraph:
|
|
3911
|
-
image:
|
|
3912
|
-
button:
|
|
3913
|
-
divider:
|
|
3914
|
-
video:
|
|
3915
|
-
social:
|
|
3916
|
-
menu:
|
|
3917
|
-
table:
|
|
3918
|
-
spacer:
|
|
3919
|
-
html:
|
|
3920
|
-
countdown:
|
|
4033
|
+
}), C("span", null, N(M(r).video.addVideo), 1)]))], 4));
|
|
4034
|
+
}
|
|
4035
|
+
}), Es = {
|
|
4036
|
+
section: Xo,
|
|
4037
|
+
title: ri,
|
|
4038
|
+
paragraph: zr,
|
|
4039
|
+
image: Er,
|
|
4040
|
+
button: _n,
|
|
4041
|
+
divider: sr,
|
|
4042
|
+
video: Ts,
|
|
4043
|
+
social: os,
|
|
4044
|
+
menu: Ar,
|
|
4045
|
+
table: hs,
|
|
4046
|
+
spacer: ls,
|
|
4047
|
+
html: fr,
|
|
4048
|
+
countdown: oe(() => import("./CountdownBlock-DtAokAVw.js").then((e) => e.n))
|
|
3921
4049
|
};
|
|
3922
|
-
function
|
|
3923
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } =
|
|
4050
|
+
function Ds(e) {
|
|
4051
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = St(r);
|
|
3924
4052
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
3925
|
-
let { resolvedTheme: c } =
|
|
4053
|
+
let { resolvedTheme: c } = en(x(() => t.state.uiTheme)), l = h(n.theme ?? {}), { themeStyles: u } = nn({
|
|
3926
4054
|
themeOverrides: l,
|
|
3927
4055
|
resolvedTheme: c,
|
|
3928
4056
|
extraStyles: e.themeExtraStyles
|
|
3929
|
-
}), d =
|
|
4057
|
+
}), d = Lt({
|
|
3930
4058
|
content: t.content,
|
|
3931
4059
|
setContent: (e, n) => t.setContent(e, n),
|
|
3932
4060
|
...e.historyOptions
|
|
3933
4061
|
});
|
|
3934
|
-
|
|
3935
|
-
let f =
|
|
4062
|
+
Ut(t, d);
|
|
4063
|
+
let f = zt({
|
|
3936
4064
|
addBlock: t.addBlock,
|
|
3937
4065
|
removeBlock: t.removeBlock,
|
|
3938
4066
|
updateBlock: t.updateBlock,
|
|
3939
4067
|
selectBlock: t.selectBlock,
|
|
3940
4068
|
findBlockLocation: t.findBlockLocation,
|
|
3941
4069
|
blockDefaults: n.blockDefaults
|
|
3942
|
-
}), m =
|
|
4070
|
+
}), m = Vt(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Bt({
|
|
3943
4071
|
content: t.content,
|
|
3944
4072
|
isDirty: () => t.state.isDirty,
|
|
3945
4073
|
...e.autoSaveOptions
|
|
@@ -3947,24 +4075,24 @@ function ps(e) {
|
|
|
3947
4075
|
g && (_ = s(d.isNavigating, (e) => {
|
|
3948
4076
|
e ? g.pause() : g.resume();
|
|
3949
4077
|
}));
|
|
3950
|
-
let v =
|
|
4078
|
+
let v = $t(t, {
|
|
3951
4079
|
t: a,
|
|
3952
4080
|
format: o
|
|
3953
|
-
}), y =
|
|
3954
|
-
if (
|
|
4081
|
+
}), y = sn();
|
|
4082
|
+
if (fn(y, Es), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, ar);
|
|
3955
4083
|
function b(e) {
|
|
3956
|
-
for (let t of e) y.registerCustom(t,
|
|
4084
|
+
for (let t of e) y.registerCustom(t, ar);
|
|
3957
4085
|
}
|
|
3958
|
-
let S =
|
|
3959
|
-
if (p() &&
|
|
4086
|
+
let S = qt();
|
|
4087
|
+
if (p() && ne(S.dispose), e.containerEl) {
|
|
3960
4088
|
let t = e.containerEl;
|
|
3961
|
-
|
|
4089
|
+
ze(document, "pointerdown", (e) => {
|
|
3962
4090
|
let n = t.value;
|
|
3963
4091
|
n && (e.composedPath?.() ?? []).includes(n) && S.claim();
|
|
3964
4092
|
}, { capture: !0 });
|
|
3965
4093
|
}
|
|
3966
4094
|
function C(r) {
|
|
3967
|
-
S.isActive() &&
|
|
4095
|
+
S.isActive() && mn(r, {
|
|
3968
4096
|
history: d,
|
|
3969
4097
|
selectBlock: (e) => t.selectBlock(e),
|
|
3970
4098
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -3973,19 +4101,19 @@ function ps(e) {
|
|
|
3973
4101
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
3974
4102
|
});
|
|
3975
4103
|
}
|
|
3976
|
-
|
|
4104
|
+
ze(document, "keydown", C);
|
|
3977
4105
|
let w = h(null);
|
|
3978
|
-
E(
|
|
3979
|
-
let T =
|
|
3980
|
-
E(
|
|
3981
|
-
let ee =
|
|
4106
|
+
E(lt, e.editorRoot ?? document), E(Ge, w), E(Ye, r), E(ft, t), E(rt, d), E(ut, f), E(_t, m), E(ct, i), E(et, u), E(Xe, c), E(it, n.blockDefaults), E(mt, y), E(ot, n.customBlocks ?? []), E(dt, n.paletteBlocks), E(st, cn(t.content, y));
|
|
4107
|
+
let T = fe(n.mergeTags?.syntax);
|
|
4108
|
+
E(tt, n.mergeTags?.tags ?? []), E(nt, T), E($e, n.mergeTags?.onRequest ?? null), E(Ke, n.mergeTags?.autocomplete !== !1), E(yt, Jt()), E(at, n.logicTags?.tags ?? []), E(xt, n.logicTags?.pairs ?? []), E(Je, n.logicTags?.onRequest ?? null), E(bt, Yt()), E(qe, n.onRequestMedia ?? null), E(ht, n.displayConditions?.conditions ?? []), E(pt, n.displayConditions?.allowCustom ?? !1), E(gt, e.capabilities ?? {}), E(vt, v);
|
|
4109
|
+
let ee = Xt(n.lint) ? null : Zt({
|
|
3982
4110
|
content: t.content,
|
|
3983
4111
|
options: n.lint ?? {},
|
|
3984
4112
|
updateBlock: t.updateBlock,
|
|
3985
4113
|
updateSettings: t.updateSettings,
|
|
3986
4114
|
removeBlock: t.removeBlock
|
|
3987
4115
|
});
|
|
3988
|
-
E(
|
|
4116
|
+
E(Qe, ee);
|
|
3989
4117
|
function D() {
|
|
3990
4118
|
_?.(), ee?.destroy(), g?.destroy(), d.destroy();
|
|
3991
4119
|
}
|
|
@@ -4008,4 +4136,4 @@ function ps(e) {
|
|
|
4008
4136
|
};
|
|
4009
4137
|
}
|
|
4010
4138
|
//#endregion
|
|
4011
|
-
export {
|
|
4139
|
+
export { En as A, Hn as C, Nn as D, In as E, _n as F, on as I, Qt as L, Sn as M, xn as N, kn as O, bn as P, Ht as R, Un as S, Ln as T, fr as _, os as a, Xn as b, Go as c, Vr as d, Br as f, mr as g, Er as h, ls as i, Tn as j, On as k, ri as l, Ar as m, Ts as n, $o as o, zr as p, hs as r, Xo as s, Ds as t, ti as u, sr as v, Rn as w, Jn as x, ar as y, Nt as z };
|