@templatical/editor 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-B-k_Sdas.js → AiChatSidebar-EaPCeDXr.js} +14 -14
- package/dist/{AiFeatureMenu-B5_IKOlI.js → AiFeatureMenu-Rb8G3EBo.js} +7 -7
- package/dist/{BlockIssueBadge-B3xVgMTh.js → BlockIssueBadge-CZYgn-qg.js} +5 -5
- package/dist/{CloudEditor-BUJk4vXS.js → CloudEditor-D88gLBXp.js} +24 -24
- package/dist/{CollaboratorBar-BAUQfXUk.js → CollaboratorBar-dxCD8jSi.js} +4 -4
- package/dist/ColorPicker-CAgMCX3A.js +442 -0
- package/dist/{CommentsSidebar-D_tSGvTX.js → CommentsSidebar-DDKiFsSq.js} +13 -13
- package/dist/{CountdownBlock-apiYUhkQ.js → CountdownBlock-173fiO5Z.js} +3 -3
- package/dist/{CountdownToolbar-CS0axcjz.js → CountdownToolbar-8XVTOuGX.js} +4 -4
- package/dist/{DesignReferenceSidebar-BYQcuaL4.js → DesignReferenceSidebar-D6TfC176.js} +11 -11
- package/dist/{IssuesPanel-CR1MPaDE.js → IssuesPanel-CQQipLQP.js} +8 -8
- package/dist/{LoadingTrack-DsecR8Rw.js → LoadingTrack-KIcREPlS.js} +1 -1
- package/dist/{MergeTagSuggestion-DLVykS0K.js → MergeTagSuggestion-DrT3LiZ4.js} +4 -4
- package/dist/{ModuleBrowserModal-BzDuagt5.js → ModuleBrowserModal-l4_RCC8m.js} +11 -11
- package/dist/{ModulePreviewCanvas-CK11BX4i.js → ModulePreviewCanvas-BqYAr4fz.js} +3 -3
- package/dist/NumberWithSuffix-Di-cDy_m.js +89 -0
- package/dist/{ParagraphEditor-fg9Ljy_Z.js → ParagraphEditor-DIQ1jmSP.js} +230 -195
- package/dist/{RichTextEditorContent-BqLHIZY7.js → RichTextEditorContent-DkTJ6KK8.js} +56 -45
- package/dist/{SaveModuleDialog-D27ufH5q.js → SaveModuleDialog-DPo3Raon.js} +8 -8
- package/dist/{SnapshotHistory-Cymqkk9_.js → SnapshotHistory-m7brKV7C.js} +10 -10
- package/dist/{TemplateScoringPanel-CZ62rGHz.js → TemplateScoringPanel-C8VOC6gn.js} +15 -15
- package/dist/{TestEmailModal-BIvdHidU.js → TestEmailModal-BE9sFEIl.js} +6 -6
- package/dist/{TitleEditor-D0a4NdOn.js → TitleEditor-BATN-k-Q.js} +38 -35
- package/dist/{TplModal-dYXt3vyd.js → TplModal-DHBcZ1gq.js} +5 -5
- package/dist/{blockTypeIcons-JSBvsa0M.js → blockTypeIcons-wRchKKx0.js} +7 -7
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-C58VqAgo.js → ca-B3eR47lE.js} +2 -1
- package/dist/cdn/chunks/{AiFeatureMenu-B6V5CzCc.js → AiFeatureMenu-W7VQFAwq.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-B6V5CzCc.js.map → AiFeatureMenu-W7VQFAwq.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-C6Xpl1KK.js → BlockIssueBadge-ww2vNIfJ.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-C6Xpl1KK.js.map → BlockIssueBadge-ww2vNIfJ.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-C-npgK-l.js → CloudEditor-BVSJ1kvB.js} +161 -161
- package/dist/cdn/chunks/{CloudEditor-C-npgK-l.js.map → CloudEditor-BVSJ1kvB.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-BSKXgw9D.js → CollaboratorBar-BFrAua9a.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-BSKXgw9D.js.map → CollaboratorBar-BFrAua9a.js.map} +1 -1
- package/dist/cdn/chunks/ColorPicker-DmxMDn-t.js +439 -0
- package/dist/cdn/chunks/ColorPicker-DmxMDn-t.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-Y-nycxv2.js → CountdownBlock-MC-mhtQD.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-Y-nycxv2.js.map → CountdownBlock-MC-mhtQD.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-9LqnhGyh.js → CountdownToolbar-dXyr7tz-.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-9LqnhGyh.js.map → CountdownToolbar-dXyr7tz-.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BYfGf1rC.js → IssuesPanel-CTxSgViL.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-BYfGf1rC.js.map → IssuesPanel-CTxSgViL.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-DQzKlLH7.js → MergeTagSuggestion-jesxS7An.js} +3 -3
- package/dist/cdn/chunks/{MergeTagSuggestion-DQzKlLH7.js.map → MergeTagSuggestion-jesxS7An.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-EzKgW5TG.js → ModuleBrowserModal-B5sCsrud.js} +9 -9
- package/dist/cdn/chunks/{ModuleBrowserModal-EzKgW5TG.js.map → ModuleBrowserModal-B5sCsrud.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DxbSzXm8.js → ModulePreviewCanvas-DGTGo8kg.js} +11 -11
- package/dist/cdn/chunks/{ModulePreviewCanvas-DxbSzXm8.js.map → ModulePreviewCanvas-DGTGo8kg.js.map} +1 -1
- package/dist/cdn/chunks/NumberWithSuffix-tAHfui6k.js +91 -0
- package/dist/cdn/chunks/NumberWithSuffix-tAHfui6k.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-CJNgRMhw.js → ParagraphEditor-CB5FGRs3.js} +213 -179
- package/dist/cdn/chunks/ParagraphEditor-CB5FGRs3.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-Cebdzomd.js → RichTextEditorContent-CPelbtck.js} +53 -42
- package/dist/cdn/chunks/RichTextEditorContent-CPelbtck.js.map +1 -0
- package/dist/cdn/chunks/{SaveModuleDialog-Cufwqoln.js → SaveModuleDialog-7f9uUUEC.js} +6 -6
- package/dist/cdn/chunks/{SaveModuleDialog-Cufwqoln.js.map → SaveModuleDialog-7f9uUUEC.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-7BhmKL-_.js → TitleEditor-C0mYpgs4.js} +46 -43
- package/dist/cdn/chunks/TitleEditor-C0mYpgs4.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-d4Sb61H-.js → blockTypeIcons-BtxaUtlx.js} +5 -5
- package/dist/cdn/chunks/{blockTypeIcons-d4Sb61H-.js.map → blockTypeIcons-BtxaUtlx.js.map} +1 -1
- package/dist/cdn/chunks/{ca-C58VqAgo.js → ca-B3eR47lE.js} +3 -2
- package/dist/cdn/chunks/ca-B3eR47lE.js.map +1 -0
- package/dist/cdn/chunks/{de-C0sMmfic.js → de-Cy8FB-Ii.js} +3 -2
- package/dist/cdn/chunks/de-Cy8FB-Ii.js.map +1 -0
- package/dist/cdn/chunks/{draggable-kG-D5Xsm.js → draggable-D840DIZB.js} +52 -39
- package/dist/cdn/chunks/draggable-D840DIZB.js.map +1 -0
- package/dist/cdn/chunks/{en-CsGBTBOf.js → en-Bu-zS_5o.js} +3 -2
- package/dist/cdn/chunks/en-Bu-zS_5o.js.map +1 -0
- package/dist/cdn/chunks/{es-DgjbcPIu.js → es-CD3ZD6hK.js} +3 -2
- package/dist/cdn/chunks/es-CD3ZD6hK.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BeAsz_mp.js → extensions-BJ7vaBol.js} +28 -28
- package/dist/cdn/chunks/{extensions-BeAsz_mp.js.map → extensions-BJ7vaBol.js.map} +1 -1
- package/dist/cdn/chunks/{features-DO71hPJr.js → features-CgbSSCgv.js} +589 -553
- package/dist/cdn/chunks/features-CgbSSCgv.js.map +1 -0
- package/dist/cdn/chunks/{icons-BfP1cRNb.js → icons-Dlx5MT1V.js} +2 -2
- package/dist/cdn/chunks/{icons-BfP1cRNb.js.map → icons-Dlx5MT1V.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-0S3e0i8G.js → media-library-BMlykZGq.js} +104 -104
- package/dist/cdn/chunks/{media-library-0S3e0i8G.js.map → media-library-BMlykZGq.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-DXaP5lMJ.js → pt-BR-CgICL-CQ.js} +3 -2
- package/dist/cdn/chunks/pt-BR-CgICL-CQ.js.map +1 -0
- package/dist/cdn/chunks/quality-DsVgXk_j.js +2180 -0
- package/dist/cdn/chunks/{quality-B6V4R_df.js.map → quality-DsVgXk_j.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-Dhn1J4H4.js → renderer-DPvEtVGO.js} +17 -17
- package/dist/cdn/chunks/{renderer-Dhn1J4H4.js.map → renderer-DPvEtVGO.js.map} +1 -1
- package/dist/cdn/chunks/{src-DoKjbqU2.js → src-CAdirukY.js} +5 -5
- package/dist/cdn/chunks/{src-DoKjbqU2.js.map → src-CAdirukY.js.map} +1 -1
- package/dist/cdn/chunks/{styles-CSqligXJ.js → styles-D7u4vCpH.js} +820 -820
- package/dist/cdn/chunks/{styles-CSqligXJ.js.map → styles-D7u4vCpH.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-DVHUKGZf.js → tiptap-zpXk5mN4.js} +1131 -1134
- package/dist/cdn/chunks/{tiptap-DVHUKGZf.js.map → tiptap-zpXk5mN4.js.map} +1 -1
- package/dist/cdn/editor.js +74 -74
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-rl7ok6uJ.js → check-D1zYtCPK.js} +1 -1
- package/dist/{chevron-down-BKe__NOD.js → chevron-down-ByXpufZD.js} +1 -1
- package/dist/{circle-alert-C8xmpMsK.js → circle-alert-CjcAORUw.js} +1 -1
- package/dist/{clock-BW4JuDCN.js → clock-5lWLadUn.js} +1 -1
- package/dist/{cloud-CFpaFRCV.js → cloud-BogxOeZu.js} +1 -1
- package/dist/{createLucideIcon-Dx-EjR9r.js → createLucideIcon-Bh9xOmlW.js} +3 -3
- package/dist/{de-C0sMmfic.js → de-Cy8FB-Ii.js} +2 -1
- package/dist/dist-BE9m_i60.js +5 -0
- package/dist/{dist-C5-0GG3g.js → dist-BPPeDw62.js} +2 -2
- package/dist/{dist-DEcNpSJi.js → dist-BReUTadj.js} +4 -4
- package/dist/dist-BXR1aBJV.js +5 -0
- package/dist/{dist-r_2rJCMg.js → dist-Bm07Z3Es.js} +2 -2
- package/dist/{dist-BEWiuOMi.js → dist-CFOQvhSC.js} +3 -3
- package/dist/{dist-Ci5GHd96.js → dist-CHLoeloJ.js} +2 -2
- package/dist/{dist-0VHbLR6h.js → dist-D1WmF8BF.js} +2 -2
- package/dist/{dist-DrlHbc8g.js → dist-D9g4CSnm.js} +1 -1
- package/dist/{dist-Drm7i-yw.js → dist-DGEaAAIb.js} +2 -2
- package/dist/{dist-CTT6WYJ6.js → dist-DYv_Pttj.js} +2 -2
- package/dist/{dist-Dsoq4knU.js → dist-DcKlLQ8d.js} +2 -2
- package/dist/{dist-D_-AsMP4.js → dist-DhY2di4U.js} +2 -2
- package/dist/{dist-FVawx7ou.js → dist-i_Z7t67A.js} +260 -263
- package/dist/{en-CsGBTBOf.js → en-Bu-zS_5o.js} +2 -1
- package/dist/{es-DgjbcPIu.js → es-CD3ZD6hK.js} +2 -1
- package/dist/{extensions-3jhgwhV-.js → extensions-B2poxDIo.js} +7 -7
- package/dist/{image-up-BwBCmQ4P.js → image-up-Bj_nes3f.js} +1 -1
- package/dist/{info-TCn7uWR5.js → info-BhSQCxBV.js} +1 -1
- package/dist/{keys-Cv8-8GsD.js → keys-BbDgCU6K.js} +1 -1
- package/dist/{list-checks-CSrOWNgq.js → list-checks-CgxyUg7i.js} +1 -1
- package/dist/{loader-circle-BLmicnPG.js → loader-circle-DFU0HPAa.js} +1 -1
- package/dist/{message-circle-C9hHMQCI.js → message-circle-BEBsCHnk.js} +1 -1
- package/dist/{pt-BR-DXaP5lMJ.js → pt-BR-CgICL-CQ.js} +2 -1
- package/dist/{refresh-cw-D1JQ1LNa.js → refresh-cw--lvWGy0_.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-BzuoCyNp.js → runtime-dom.esm-bundler-GdMI8WqG.js} +6 -7
- package/dist/{scan-line-DgijVq9y.js → scan-line-QgyDIgn_.js} +1 -1
- package/dist/{send-DjPdq69F.js → send-BMyisUim.js} +1 -1
- package/dist/{shield-check-Bqluu8FS.js → shield-check-C49M20le.js} +1 -1
- package/dist/{sparkles-M4azPVSP.js → sparkles-DV7Dman6.js} +1 -1
- package/dist/{styles-5sGbDIA2.js → styles-B-yhoJnH.js} +78 -78
- package/dist/templatical-editor.js +61 -61
- package/dist/{text-align-start-CMya5pCQ.js → text-align-start-BMU70uAm.js} +1 -1
- package/dist/{trash-2-C-81rkLS.js → trash-2-B6M659Ey.js} +1 -1
- package/dist/{triangle-alert-BuRWnynk.js → triangle-alert-D1lzx6ds.js} +1 -1
- package/dist/{upload-CWBIoLd4.js → upload-3A1oZtOR.js} +1 -1
- package/dist/{useAliveFlag-CECL_OUb.js → useAliveFlag-C43EhZFY.js} +1 -1
- package/dist/{useCloudI18n-AKCy98qD.js → useCloudI18n-WbfVWq5k.js} +2 -2
- package/dist/{useEditorCore-AQ0BN1ug.js → useEditorCore-CV1ct_17.js} +616 -580
- package/dist/{useI18n-C-TDeJBt.js → useI18n-eR1yVW0v.js} +2 -2
- package/dist/{useMergeTag-D0aZw7Q5.js → useMergeTag-C3GfSktg.js} +2 -2
- package/dist/usePopoverRoot-C1j0D7cc.js +8 -0
- package/dist/{vue.runtime.esm-bundler-l0XAqiyv.js → vue.runtime.esm-bundler-B0xoGkDv.js} +84 -70
- package/dist/{x-CQSvXnGR.js → x-CG_NV3nP.js} +1 -1
- package/package.json +22 -22
- package/dist/NumberWithSuffix-CrA6quxx.js +0 -445
- package/dist/cdn/chunks/NumberWithSuffix-Conp_Pki.js +0 -444
- package/dist/cdn/chunks/NumberWithSuffix-Conp_Pki.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-CJNgRMhw.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-Cebdzomd.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-7BhmKL-_.js.map +0 -1
- package/dist/cdn/chunks/ca-C58VqAgo.js.map +0 -1
- package/dist/cdn/chunks/de-C0sMmfic.js.map +0 -1
- package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +0 -1
- package/dist/cdn/chunks/en-CsGBTBOf.js.map +0 -1
- package/dist/cdn/chunks/es-DgjbcPIu.js.map +0 -1
- package/dist/cdn/chunks/features-DO71hPJr.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DXaP5lMJ.js.map +0 -1
- package/dist/cdn/chunks/quality-B6V4R_df.js +0 -2180
- package/dist/cdn/chunks/styleConstants-lGobwiLH.js +0 -57
- package/dist/cdn/chunks/styleConstants-lGobwiLH.js.map +0 -1
- package/dist/dist-DR-6IpV6.js +0 -5
- package/dist/dist-DW8b0TO6.js +0 -5
- package/dist/styleConstants-lGobwiLH.js +0 -55
- package/dist/usePopoverRoot-DKUDnr55.js +0 -8
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, D as r, Dt as i, E as a, Et as o, H as s, I as c, J as l, K as u, N as d, O as f, Ot as p, R as m, T as h, W as g, Y as _, Z as v, _ as y, c as b, d as x, et as S, g as C, h as w, j as T, k as E, l as D, m as O, nt as k, q as ee, r as A, rt as te, s as j, tt as ne, u as M, v as re, w as ie, x as N, y as ae, z as oe } from "./vue.runtime.esm-bundler-
|
|
2
|
-
import { c as P, o as se, s as ce } from "./runtime-dom.esm-bundler-
|
|
1
|
+
import { $ as e, A as t, B as n, D as r, Dt as i, E as a, Et as o, H as s, I as c, J as l, K as u, N as d, O as f, Ot as p, R as m, T as h, W as g, Y as _, Z as v, _ as y, c as b, d as x, et as S, g as C, h as w, j as T, k as E, l as D, m as O, nt as k, q as ee, r as A, rt as te, s as j, tt as ne, u as M, v as re, w as ie, x as N, y as ae, z as oe } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
|
+
import { c as P, o as se, s as ce } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
3
|
import { A as le, C as ue, D as de, M as fe, N as pe, O as me, P as he, S as ge, T as _e, _ as ve, b as ye, c as be, d as xe, f as Se, g as Ce, h as we, j as Te, k as Ee, l as De, m as Oe, n as ke, o as Ae, p as je, r as Me, s as Ne, t as Pe, u as Fe, v as Ie, w as Le, x as Re, y as ze } from "./dist-DoRIUsfz.js";
|
|
4
|
-
import { f as Be, g as Ve, h as He, m as Ue } from "./dist-
|
|
5
|
-
import { a as We, i as Ge, n as Ke, r as qe } from "./dist-
|
|
6
|
-
import { A as Je, C as Ye, D as Xe, E as Ze, F as Qe, I as $e, L as et, N as tt, O as nt, P as rt, S as it, T as at, _ as ot, a as st, b as ct, d as lt, f as ut, g as dt, h as ft, i as pt, k as mt, m as ht, n as gt, o as _t, p as vt, s as yt, u as bt, v as xt, w as St, x as Ct, y as wt } from "./keys-
|
|
7
|
-
import { t as Tt } from "./useI18n-
|
|
8
|
-
import { t as F } from "./createLucideIcon-
|
|
9
|
-
import { t as Et } from "./loader-circle-
|
|
10
|
-
import { t as Dt } from "./message-circle-
|
|
11
|
-
import { t as Ot } from "./trash-2-
|
|
12
|
-
import { t as kt } from "./triangle-alert-
|
|
13
|
-
import { t as At } from "./upload-
|
|
14
|
-
import { t as jt } from "./LoadingTrack-
|
|
4
|
+
import { f as Be, g as Ve, h as He, m as Ue } from "./dist-DYv_Pttj.js";
|
|
5
|
+
import { a as We, i as Ge, n as Ke, r as qe } from "./dist-CFOQvhSC.js";
|
|
6
|
+
import { A as Je, C as Ye, D as Xe, E as Ze, F as Qe, I as $e, L as et, N as tt, O as nt, P as rt, S as it, T as at, _ as ot, a as st, b as ct, d as lt, f as ut, g as dt, h as ft, i as pt, k as mt, m as ht, n as gt, o as _t, p as vt, s as yt, u as bt, v as xt, w as St, x as Ct, y as wt } from "./keys-BbDgCU6K.js";
|
|
7
|
+
import { t as Tt } from "./useI18n-eR1yVW0v.js";
|
|
8
|
+
import { t as F } from "./createLucideIcon-Bh9xOmlW.js";
|
|
9
|
+
import { t as Et } from "./loader-circle-DFU0HPAa.js";
|
|
10
|
+
import { t as Dt } from "./message-circle-BEBsCHnk.js";
|
|
11
|
+
import { t as Ot } from "./trash-2-B6M659Ey.js";
|
|
12
|
+
import { t as kt } from "./triangle-alert-D1lzx6ds.js";
|
|
13
|
+
import { t as At } from "./upload-3A1oZtOR.js";
|
|
14
|
+
import { t as jt } from "./LoadingTrack-KIcREPlS.js";
|
|
15
15
|
import { t as Mt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
16
|
-
import "./useCloudI18n-
|
|
17
|
-
import { t as Nt } from "./useMergeTag-
|
|
18
|
-
import { t as Pt } from "./useAliveFlag-
|
|
16
|
+
import "./useCloudI18n-WbfVWq5k.js";
|
|
17
|
+
import { t as Nt } from "./useMergeTag-C3GfSktg.js";
|
|
18
|
+
import { t as Pt } from "./useAliveFlag-C43EhZFY.js";
|
|
19
19
|
//#region ../core/dist/index.js
|
|
20
20
|
function Ft(e) {
|
|
21
21
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
@@ -1442,22 +1442,53 @@ function Zn(e, t, n) {
|
|
|
1442
1442
|
e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run();
|
|
1443
1443
|
}
|
|
1444
1444
|
//#endregion
|
|
1445
|
-
//#region src/
|
|
1445
|
+
//#region src/utils/linkColorExtension.ts
|
|
1446
1446
|
function Qn(e) {
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1447
|
+
if (!e) return null;
|
|
1448
|
+
let t = e.trim();
|
|
1449
|
+
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
1450
|
+
}
|
|
1451
|
+
function $n(e) {
|
|
1452
|
+
let t = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i.exec(e.trim());
|
|
1453
|
+
if (!t) return e;
|
|
1454
|
+
let n = (e) => Number(e).toString(16).padStart(2, "0");
|
|
1455
|
+
return `#${n(t[1])}${n(t[2])}${n(t[3])}`;
|
|
1456
|
+
}
|
|
1457
|
+
function er(e) {
|
|
1458
|
+
return e.extend({ addAttributes() {
|
|
1459
|
+
return {
|
|
1460
|
+
...this.parent?.(),
|
|
1461
|
+
color: {
|
|
1462
|
+
default: null,
|
|
1463
|
+
parseHTML: (e) => Qn($n(e.style.color)),
|
|
1464
|
+
renderHTML: (e) => {
|
|
1465
|
+
let t = Qn(e.color);
|
|
1466
|
+
return t ? { style: `color: ${t}` } : {};
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
};
|
|
1470
|
+
} });
|
|
1471
|
+
}
|
|
1472
|
+
//#endregion
|
|
1473
|
+
//#region src/composables/useRichTextLinkDialog.ts
|
|
1474
|
+
function tr(e) {
|
|
1475
|
+
let t = _(!1), n = _(""), r = _(""), i = _(null);
|
|
1476
|
+
Vn(i, t);
|
|
1453
1477
|
function a() {
|
|
1478
|
+
let i = e.value?.getAttributes("link") ?? {};
|
|
1479
|
+
n.value = i.href || "", r.value = i.color || "", t.value = !0;
|
|
1480
|
+
}
|
|
1481
|
+
function o() {
|
|
1454
1482
|
if (n.value) {
|
|
1455
|
-
let t =
|
|
1456
|
-
t !== null
|
|
1483
|
+
let t = c(n.value);
|
|
1484
|
+
if (t !== null) {
|
|
1485
|
+
let n = Qn(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1486
|
+
n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
|
|
1487
|
+
}
|
|
1457
1488
|
}
|
|
1458
|
-
|
|
1489
|
+
u();
|
|
1459
1490
|
}
|
|
1460
|
-
let
|
|
1491
|
+
let s = /* @__PURE__ */ new Set([
|
|
1461
1492
|
"http",
|
|
1462
1493
|
"https",
|
|
1463
1494
|
"mailto",
|
|
@@ -1468,39 +1499,40 @@ function Qn(e) {
|
|
|
1468
1499
|
"xmpp",
|
|
1469
1500
|
"cid"
|
|
1470
1501
|
]);
|
|
1471
|
-
function
|
|
1502
|
+
function c(e) {
|
|
1472
1503
|
let t = e.trim();
|
|
1473
1504
|
if (!t) return null;
|
|
1474
1505
|
if (t.startsWith("#")) return t;
|
|
1475
1506
|
let n = /^([a-z][a-z0-9+.-]*):/i.exec(t);
|
|
1476
|
-
return n ?
|
|
1477
|
-
}
|
|
1478
|
-
function c() {
|
|
1479
|
-
e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), l();
|
|
1507
|
+
return n ? s.has(n[1].toLowerCase()) ? t : null : `https://${t}`;
|
|
1480
1508
|
}
|
|
1481
1509
|
function l() {
|
|
1482
|
-
|
|
1510
|
+
e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), u();
|
|
1483
1511
|
}
|
|
1484
|
-
function u(
|
|
1485
|
-
|
|
1512
|
+
function u() {
|
|
1513
|
+
t.value = !1, n.value = "", r.value = "";
|
|
1514
|
+
}
|
|
1515
|
+
function d(e) {
|
|
1516
|
+
e.key === "Enter" ? (e.preventDefault(), o()) : e.key === "Escape" && u();
|
|
1486
1517
|
}
|
|
1487
1518
|
return {
|
|
1488
1519
|
showLinkDialog: t,
|
|
1489
1520
|
linkUrl: n,
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1521
|
+
linkColor: r,
|
|
1522
|
+
linkDialogRef: i,
|
|
1523
|
+
openLinkDialog: a,
|
|
1524
|
+
insertLink: o,
|
|
1525
|
+
removeLink: l,
|
|
1526
|
+
closeLinkDialog: u,
|
|
1527
|
+
handleLinkKeydown: d
|
|
1496
1528
|
};
|
|
1497
1529
|
}
|
|
1498
1530
|
//#endregion
|
|
1499
1531
|
//#region src/composables/useRichTextEditor.ts
|
|
1500
|
-
function
|
|
1501
|
-
let t = N(ht, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: i, requestMergeTag: a, syntax: o, autocomplete: s } = Nt(), { canInsertLogicTag: l, isRequesting: u, requestLogicTag: d } = Jn(), f = N(Qe, null), p = (g(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = de(o), y = v(null), { showLinkDialog: b, linkUrl: x,
|
|
1502
|
-
async function
|
|
1503
|
-
|
|
1532
|
+
function nr(e) {
|
|
1533
|
+
let t = N(ht, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: i, requestMergeTag: a, syntax: o, autocomplete: s } = Nt(), { canInsertLogicTag: l, isRequesting: u, requestLogicTag: d } = Jn(), f = N(Qe, null), p = (g(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = de(o), y = v(null), { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: E, closeLinkDialog: D, handleLinkKeydown: O } = tr(y), { start: k, stop: ee } = Ue(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), A = v(null), te = _(!0), j = _(null), ne = !1;
|
|
1534
|
+
async function M() {
|
|
1535
|
+
j.value = null, te.value = !0;
|
|
1504
1536
|
try {
|
|
1505
1537
|
let { TiptapEditor: r, EC: i, extensions: a } = await e.loadExtensions({
|
|
1506
1538
|
mergeTags: n,
|
|
@@ -1509,8 +1541,8 @@ function $n(e) {
|
|
|
1509
1541
|
autocompleteEnabled: s,
|
|
1510
1542
|
suggestionEmptyText: p
|
|
1511
1543
|
});
|
|
1512
|
-
if (
|
|
1513
|
-
|
|
1544
|
+
if (ne) return;
|
|
1545
|
+
A.value = i;
|
|
1514
1546
|
let c = /* @__PURE__ */ new Map();
|
|
1515
1547
|
a.forEach((e, t) => c.set(e.name, t));
|
|
1516
1548
|
let l = new r({
|
|
@@ -1518,74 +1550,78 @@ function $n(e) {
|
|
|
1518
1550
|
content: e.blockContent(),
|
|
1519
1551
|
editable: !0,
|
|
1520
1552
|
onUpdate: ({ editor: n }) => {
|
|
1521
|
-
|
|
1553
|
+
ne || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
|
|
1522
1554
|
}
|
|
1523
1555
|
});
|
|
1524
|
-
if (
|
|
1556
|
+
if (ne) {
|
|
1525
1557
|
l.destroy();
|
|
1526
1558
|
return;
|
|
1527
1559
|
}
|
|
1528
|
-
y.value = l,
|
|
1560
|
+
y.value = l, te.value = !1, k();
|
|
1529
1561
|
} catch (t) {
|
|
1530
|
-
if (
|
|
1531
|
-
ln.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t),
|
|
1562
|
+
if (ne) return;
|
|
1563
|
+
ln.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), j.value = t instanceof Error ? t.message : "Failed to load editor", te.value = !1;
|
|
1532
1564
|
}
|
|
1533
1565
|
}
|
|
1534
|
-
function
|
|
1535
|
-
y.value?.destroy(), y.value = null,
|
|
1566
|
+
function re() {
|
|
1567
|
+
y.value?.destroy(), y.value = null, M();
|
|
1536
1568
|
}
|
|
1537
|
-
|
|
1538
|
-
let
|
|
1569
|
+
M();
|
|
1570
|
+
let ie = c(() => e.blockContent(), (e) => {
|
|
1539
1571
|
y.value && y.value.getHTML() !== e && y.value.commands.setContent(e, { emitUpdate: !1 });
|
|
1540
1572
|
});
|
|
1541
|
-
function
|
|
1573
|
+
function ae(t) {
|
|
1542
1574
|
if (i.value || u.value) return;
|
|
1543
|
-
let n = t.composedPath().find((e) => e instanceof HTMLElement);
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1575
|
+
let n = t.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
1576
|
+
if (!r) return;
|
|
1577
|
+
e.onClickOutsideSideEffect?.(r);
|
|
1578
|
+
let a = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1579
|
+
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || a || e.onDone();
|
|
1580
|
+
}
|
|
1581
|
+
Ge(document, "mousedown", ae), h(() => {
|
|
1582
|
+
ne = !0, ie(), ee(), y.value?.destroy();
|
|
1548
1583
|
});
|
|
1549
|
-
async function
|
|
1584
|
+
async function oe() {
|
|
1550
1585
|
let e = await a();
|
|
1551
|
-
|
|
1586
|
+
ne || (e && y.value ? y.value.chain().focus().insertMergeTag({
|
|
1552
1587
|
label: e.label,
|
|
1553
1588
|
value: e.value
|
|
1554
1589
|
}).run() : y.value?.commands.focus());
|
|
1555
1590
|
}
|
|
1556
|
-
async function
|
|
1591
|
+
async function P() {
|
|
1557
1592
|
let e = await d();
|
|
1558
|
-
|
|
1593
|
+
ne || (e && y.value ? Zn(y.value, e, o) : y.value?.commands.focus());
|
|
1559
1594
|
}
|
|
1560
1595
|
return {
|
|
1561
1596
|
editor: y,
|
|
1562
|
-
EditorContent:
|
|
1563
|
-
isLoading:
|
|
1564
|
-
initError:
|
|
1565
|
-
retry:
|
|
1597
|
+
EditorContent: A,
|
|
1598
|
+
isLoading: te,
|
|
1599
|
+
initError: j,
|
|
1600
|
+
retry: re,
|
|
1566
1601
|
showLinkDialog: b,
|
|
1567
1602
|
linkUrl: x,
|
|
1568
|
-
|
|
1603
|
+
linkColor: S,
|
|
1604
|
+
linkDialogRef: C,
|
|
1569
1605
|
mergeTags: n,
|
|
1570
1606
|
canRequestMergeTag: r,
|
|
1571
1607
|
isRequestingMergeTag: i,
|
|
1572
1608
|
syntax: o,
|
|
1573
1609
|
canInsertLogicTag: l,
|
|
1574
1610
|
isRequestingLogicTag: u,
|
|
1575
|
-
openLinkDialog:
|
|
1576
|
-
insertLink:
|
|
1577
|
-
removeLink:
|
|
1578
|
-
closeLinkDialog:
|
|
1579
|
-
handleLinkKeydown:
|
|
1580
|
-
handleAddMergeTag:
|
|
1581
|
-
handleAddLogicTag:
|
|
1611
|
+
openLinkDialog: w,
|
|
1612
|
+
insertLink: T,
|
|
1613
|
+
removeLink: E,
|
|
1614
|
+
closeLinkDialog: D,
|
|
1615
|
+
handleLinkKeydown: O,
|
|
1616
|
+
handleAddMergeTag: oe,
|
|
1617
|
+
handleAddLogicTag: P
|
|
1582
1618
|
};
|
|
1583
1619
|
}
|
|
1584
1620
|
//#endregion
|
|
1585
1621
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1586
|
-
var
|
|
1587
|
-
function
|
|
1588
|
-
let t = We(
|
|
1622
|
+
var rr = "(max-width: 767px)";
|
|
1623
|
+
function ir(e) {
|
|
1624
|
+
let t = We(rr);
|
|
1589
1625
|
return {
|
|
1590
1626
|
isSmallScreen: t,
|
|
1591
1627
|
showNotice: j(() => (S(e) ?? !0) && t.value)
|
|
@@ -1593,20 +1629,20 @@ function tr(e) {
|
|
|
1593
1629
|
}
|
|
1594
1630
|
//#endregion
|
|
1595
1631
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1596
|
-
var
|
|
1632
|
+
var ar = { class: "tpl:w-full" }, or = {
|
|
1597
1633
|
key: 0,
|
|
1598
1634
|
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)]"
|
|
1599
|
-
},
|
|
1635
|
+
}, sr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, cr = {
|
|
1600
1636
|
key: 1,
|
|
1601
1637
|
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)]"
|
|
1602
|
-
},
|
|
1638
|
+
}, lr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ur = {
|
|
1603
1639
|
key: 2,
|
|
1604
1640
|
class: "tpl:relative"
|
|
1605
|
-
},
|
|
1641
|
+
}, dr = ["innerHTML"], fr = {
|
|
1606
1642
|
key: 0,
|
|
1607
1643
|
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]",
|
|
1608
1644
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1609
|
-
},
|
|
1645
|
+
}, pr = /* @__PURE__ */ y({
|
|
1610
1646
|
__name: "CustomBlock",
|
|
1611
1647
|
props: {
|
|
1612
1648
|
block: {},
|
|
@@ -1640,10 +1676,10 @@ var nr = { class: "tpl:w-full" }, rr = {
|
|
|
1640
1676
|
y();
|
|
1641
1677
|
}), c(() => n.block.fieldValues, () => {
|
|
1642
1678
|
S();
|
|
1643
|
-
}, { deep: !0 }), (e, t) => (f(), x("div",
|
|
1679
|
+
}, { deep: !0 }), (e, t) => (f(), x("div", ar, [d.value ? l.value ? (f(), x("div", cr, [w(k(kt), {
|
|
1644
1680
|
size: 24,
|
|
1645
1681
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1646
|
-
}), b("span",
|
|
1682
|
+
}), b("span", lr, p(k(i).customBlocks.renderError), 1)])) : (f(), x("div", ur, [b("div", { innerHTML: s.value }, null, 8, dr), k(v) && k(g) ? (f(), x("div", fr, [k(m) ? (f(), D(jt, {
|
|
1647
1683
|
key: 1,
|
|
1648
1684
|
class: "tpl:w-48"
|
|
1649
1685
|
})) : (f(), x("button", {
|
|
@@ -1655,12 +1691,12 @@ var nr = { class: "tpl:w-full" }, rr = {
|
|
|
1655
1691
|
key: 0,
|
|
1656
1692
|
icon: u.value.icon,
|
|
1657
1693
|
size: 16
|
|
1658
|
-
}, null, 8, ["icon"])) : M("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : M("", !0)])) : (f(), x("div",
|
|
1694
|
+
}, null, 8, ["icon"])) : M("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : M("", !0)])) : (f(), x("div", or, [w(k(Mn), {
|
|
1659
1695
|
size: 24,
|
|
1660
1696
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1661
|
-
}), b("span",
|
|
1697
|
+
}), b("span", sr, p(k(i).customBlocks.definitionNotFound), 1)]))]));
|
|
1662
1698
|
}
|
|
1663
|
-
}),
|
|
1699
|
+
}), mr = { class: "tpl:w-full" }, hr = /* @__PURE__ */ y({
|
|
1664
1700
|
__name: "DividerBlock",
|
|
1665
1701
|
props: {
|
|
1666
1702
|
block: {},
|
|
@@ -1672,18 +1708,18 @@ var nr = { class: "tpl:w-full" }, rr = {
|
|
|
1672
1708
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
1673
1709
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1674
1710
|
}));
|
|
1675
|
-
return (e, t) => (f(), x("div",
|
|
1711
|
+
return (e, t) => (f(), x("div", mr, [b("hr", {
|
|
1676
1712
|
class: "tpl:m-0 tpl:border-none",
|
|
1677
1713
|
style: i(n.value)
|
|
1678
1714
|
}, null, 4)]));
|
|
1679
1715
|
}
|
|
1680
|
-
}),
|
|
1716
|
+
}), gr = { class: "tpl:w-full" }, _r = { 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)]" }, vr = {
|
|
1681
1717
|
key: 0,
|
|
1682
1718
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1683
|
-
},
|
|
1719
|
+
}, yr = {
|
|
1684
1720
|
key: 1,
|
|
1685
1721
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1686
|
-
},
|
|
1722
|
+
}, br = /* @__PURE__ */ y({
|
|
1687
1723
|
__name: "HtmlBlock",
|
|
1688
1724
|
props: {
|
|
1689
1725
|
block: {},
|
|
@@ -1691,18 +1727,18 @@ var nr = { class: "tpl:w-full" }, rr = {
|
|
|
1691
1727
|
},
|
|
1692
1728
|
setup(e) {
|
|
1693
1729
|
let t = e, { t: n } = Tt(), r = j(() => t.block.content.trim().length > 0);
|
|
1694
|
-
return (e, t) => (f(), x("div",
|
|
1730
|
+
return (e, t) => (f(), x("div", gr, [b("div", _r, [w(k(Tn), {
|
|
1695
1731
|
size: 24,
|
|
1696
1732
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1697
|
-
}), r.value ? (f(), x("span",
|
|
1733
|
+
}), r.value ? (f(), x("span", vr, p(k(n).html.preview), 1)) : (f(), x("span", yr, p(k(n).html.empty), 1))])]));
|
|
1698
1734
|
}
|
|
1699
|
-
}),
|
|
1700
|
-
function
|
|
1735
|
+
}), xr = "image/";
|
|
1736
|
+
function Sr(e) {
|
|
1701
1737
|
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || S(r), { isOverDropZone: a } = Ke(t, {
|
|
1702
1738
|
preventDefaultForUnhandled: !0,
|
|
1703
1739
|
onDrop: (e) => {
|
|
1704
1740
|
if (!i()) return;
|
|
1705
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
1741
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(xr));
|
|
1706
1742
|
t.length > 0 && n([t[0]]);
|
|
1707
1743
|
}
|
|
1708
1744
|
});
|
|
@@ -1710,17 +1746,17 @@ function yr(e) {
|
|
|
1710
1746
|
}
|
|
1711
1747
|
//#endregion
|
|
1712
1748
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1713
|
-
var
|
|
1749
|
+
var Cr = {
|
|
1714
1750
|
key: 0,
|
|
1715
1751
|
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)]",
|
|
1716
1752
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
1717
|
-
},
|
|
1753
|
+
}, wr = ["href"], Tr = ["src", "alt"], Er = ["src", "alt"], Dr = {
|
|
1718
1754
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1719
1755
|
style: { opacity: "0.7" }
|
|
1720
|
-
},
|
|
1756
|
+
}, Or = ["href"], kr = ["src", "alt"], Ar = ["src", "alt"], jr = {
|
|
1721
1757
|
key: 4,
|
|
1722
1758
|
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)]"
|
|
1723
|
-
},
|
|
1759
|
+
}, Mr = ["aria-label"], Nr = { key: 1 }, Pr = /* @__PURE__ */ y({
|
|
1724
1760
|
__name: "ImageBlock",
|
|
1725
1761
|
props: {
|
|
1726
1762
|
block: {},
|
|
@@ -1755,7 +1791,7 @@ var br = {
|
|
|
1755
1791
|
}
|
|
1756
1792
|
}
|
|
1757
1793
|
}
|
|
1758
|
-
let { isOver: v } =
|
|
1794
|
+
let { isOver: v } = Sr({
|
|
1759
1795
|
target: d,
|
|
1760
1796
|
enabled: h,
|
|
1761
1797
|
onFiles: g
|
|
@@ -1775,7 +1811,7 @@ var br = {
|
|
|
1775
1811
|
"data-testid": "image-drop-zone",
|
|
1776
1812
|
class: "tpl:relative tpl:w-full",
|
|
1777
1813
|
style: i(y.value)
|
|
1778
|
-
}, [h.value && (k(v) || m.value) ? (f(), x("div",
|
|
1814
|
+
}, [h.value && (k(v) || m.value) ? (f(), x("div", Cr, [m.value ? (f(), x(A, { key: 0 }, [w(k(Et), {
|
|
1779
1815
|
class: "tpl-spinner",
|
|
1780
1816
|
size: 20,
|
|
1781
1817
|
"stroke-width": 2
|
|
@@ -1794,13 +1830,13 @@ var br = {
|
|
|
1794
1830
|
src: e.block.placeholderUrl,
|
|
1795
1831
|
alt: e.block.alt || k(a).image.altTextPlaceholder,
|
|
1796
1832
|
style: i(S.value)
|
|
1797
|
-
}, null, 12,
|
|
1833
|
+
}, null, 12, Tr)], 8, wr)) : (f(), x("img", {
|
|
1798
1834
|
key: 1,
|
|
1799
1835
|
class: "tpl:border-0",
|
|
1800
1836
|
src: e.block.placeholderUrl,
|
|
1801
1837
|
alt: e.block.alt,
|
|
1802
1838
|
style: i(S.value)
|
|
1803
|
-
}, null, 12,
|
|
1839
|
+
}, null, 12, Er))], 64)) : e.block.src && C.value ? (f(), x("div", {
|
|
1804
1840
|
key: 2,
|
|
1805
1841
|
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)]",
|
|
1806
1842
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, S.value])
|
|
@@ -1809,7 +1845,7 @@ var br = {
|
|
|
1809
1845
|
"stroke-width": 1.5,
|
|
1810
1846
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1811
1847
|
style: { opacity: "0.5" }
|
|
1812
|
-
}), b("span",
|
|
1848
|
+
}), b("span", Dr, [w(yn, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (f(), x(A, { key: 3 }, [e.block.linkUrl ? (f(), x("a", {
|
|
1813
1849
|
key: 0,
|
|
1814
1850
|
href: e.block.linkUrl,
|
|
1815
1851
|
target: "_blank",
|
|
@@ -1821,13 +1857,13 @@ var br = {
|
|
|
1821
1857
|
src: e.block.src,
|
|
1822
1858
|
alt: e.block.alt || k(a).image.altTextPlaceholder,
|
|
1823
1859
|
style: i(S.value)
|
|
1824
|
-
}, null, 12,
|
|
1860
|
+
}, null, 12, kr)], 8, Or)) : (f(), x("img", {
|
|
1825
1861
|
key: 1,
|
|
1826
1862
|
class: "tpl:border-0",
|
|
1827
1863
|
src: e.block.src,
|
|
1828
1864
|
alt: e.block.alt,
|
|
1829
1865
|
style: i(S.value)
|
|
1830
|
-
}, null, 12,
|
|
1866
|
+
}, null, 12, Ar))], 64)) : (f(), x("div", jr, [c.value ? (f(), x("button", {
|
|
1831
1867
|
key: 0,
|
|
1832
1868
|
"aria-label": k(a).image.browseMedia,
|
|
1833
1869
|
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)]",
|
|
@@ -1835,12 +1871,12 @@ var br = {
|
|
|
1835
1871
|
}, [w(k(An), {
|
|
1836
1872
|
size: 14,
|
|
1837
1873
|
"stroke-width": 1.5
|
|
1838
|
-
}), O(" " + p(k(a).image.browseMedia), 1)], 8,
|
|
1874
|
+
}), O(" " + p(k(a).image.browseMedia), 1)], 8, Mr)) : (f(), x("span", Nr, p(k(a).image.clickToAdd), 1))]))], 4));
|
|
1839
1875
|
}
|
|
1840
|
-
}),
|
|
1876
|
+
}), Fr = { class: "tpl:w-full" }, Ir = ["href"], Lr = {
|
|
1841
1877
|
key: 1,
|
|
1842
1878
|
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)]"
|
|
1843
|
-
},
|
|
1879
|
+
}, Rr = /* @__PURE__ */ y({
|
|
1844
1880
|
__name: "MenuBlock",
|
|
1845
1881
|
props: {
|
|
1846
1882
|
block: {},
|
|
@@ -1859,7 +1895,7 @@ var br = {
|
|
|
1859
1895
|
function s(e) {
|
|
1860
1896
|
return e || n.block.linkColor || n.block.color;
|
|
1861
1897
|
}
|
|
1862
|
-
return (n, c) => (f(), x("div",
|
|
1898
|
+
return (n, c) => (f(), x("div", Fr, [o.value ? (f(), x("div", {
|
|
1863
1899
|
key: 0,
|
|
1864
1900
|
style: i(a.value)
|
|
1865
1901
|
}, [(f(!0), x(A, null, t(e.block.items, (t, n) => (f(), x(A, { key: t.id }, [b("a", {
|
|
@@ -1871,15 +1907,15 @@ var br = {
|
|
|
1871
1907
|
textDecoration: t.underline ? "underline" : "none"
|
|
1872
1908
|
}),
|
|
1873
1909
|
onClick: c[0] ||= P(() => {}, ["prevent"])
|
|
1874
|
-
}, [w(yn, { text: t.text || "..." }, null, 8, ["text"])], 12,
|
|
1910
|
+
}, [w(yn, { text: t.text || "..." }, null, 8, ["text"])], 12, Ir), n < e.block.items.length - 1 ? (f(), x("span", {
|
|
1875
1911
|
key: 0,
|
|
1876
1912
|
style: i({
|
|
1877
1913
|
color: e.block.separatorColor,
|
|
1878
1914
|
padding: `0 ${e.block.spacing}px`
|
|
1879
1915
|
})
|
|
1880
|
-
}, p(e.block.separator), 5)) : M("", !0)], 64))), 128))], 4)) : (f(), x("div",
|
|
1916
|
+
}, p(e.block.separator), 5)) : M("", !0)], 64))), 128))], 4)) : (f(), x("div", Lr, [w(k(jn), { size: 16 }), b("span", null, p(k(r).menu.addLinks), 1)]))]));
|
|
1881
1917
|
}
|
|
1882
|
-
}),
|
|
1918
|
+
}), zr = /* @__PURE__ */ new Set([
|
|
1883
1919
|
"http",
|
|
1884
1920
|
"https",
|
|
1885
1921
|
"mailto",
|
|
@@ -1889,7 +1925,7 @@ var br = {
|
|
|
1889
1925
|
"sms",
|
|
1890
1926
|
"xmpp",
|
|
1891
1927
|
"cid"
|
|
1892
|
-
]),
|
|
1928
|
+
]), Br = /* @__PURE__ */ new Set([
|
|
1893
1929
|
"SCRIPT",
|
|
1894
1930
|
"STYLE",
|
|
1895
1931
|
"IFRAME",
|
|
@@ -1899,7 +1935,7 @@ var br = {
|
|
|
1899
1935
|
"META",
|
|
1900
1936
|
"BASE",
|
|
1901
1937
|
"FORM"
|
|
1902
|
-
]),
|
|
1938
|
+
]), Vr = /* @__PURE__ */ new Set([
|
|
1903
1939
|
"href",
|
|
1904
1940
|
"xlink:href",
|
|
1905
1941
|
"formaction",
|
|
@@ -1908,16 +1944,16 @@ var br = {
|
|
|
1908
1944
|
"background",
|
|
1909
1945
|
"poster"
|
|
1910
1946
|
]);
|
|
1911
|
-
function
|
|
1947
|
+
function Hr(e, t) {
|
|
1912
1948
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
1913
1949
|
if (!n || n.startsWith("#")) return !0;
|
|
1914
1950
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1915
1951
|
if (!r) return !0;
|
|
1916
1952
|
let i = r[1].toLowerCase();
|
|
1917
|
-
return
|
|
1953
|
+
return zr.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1918
1954
|
}
|
|
1919
|
-
function
|
|
1920
|
-
if (
|
|
1955
|
+
function Ur(e) {
|
|
1956
|
+
if (Br.has(e.tagName)) {
|
|
1921
1957
|
e.remove();
|
|
1922
1958
|
return;
|
|
1923
1959
|
}
|
|
@@ -1929,29 +1965,29 @@ function Br(e) {
|
|
|
1929
1965
|
e.removeAttribute(n);
|
|
1930
1966
|
continue;
|
|
1931
1967
|
}
|
|
1932
|
-
if (
|
|
1933
|
-
|
|
1968
|
+
if (Vr.has(t)) {
|
|
1969
|
+
Hr(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
1934
1970
|
continue;
|
|
1935
1971
|
}
|
|
1936
1972
|
if (t === "src") {
|
|
1937
|
-
|
|
1973
|
+
Hr(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
1938
1974
|
continue;
|
|
1939
1975
|
}
|
|
1940
1976
|
t === "srcdoc" && e.removeAttribute(n);
|
|
1941
1977
|
}
|
|
1942
1978
|
let n = Array.from(e.children);
|
|
1943
|
-
for (let e of n)
|
|
1979
|
+
for (let e of n) Ur(e);
|
|
1944
1980
|
}
|
|
1945
|
-
function
|
|
1981
|
+
function Wr(e) {
|
|
1946
1982
|
if (typeof DOMParser > "u") return e;
|
|
1947
1983
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1948
|
-
for (let e of n)
|
|
1984
|
+
for (let e of n) Ur(e);
|
|
1949
1985
|
return t.innerHTML;
|
|
1950
1986
|
}
|
|
1951
1987
|
//#endregion
|
|
1952
1988
|
//#region src/composables/useEditableTextBlock.ts
|
|
1953
|
-
function
|
|
1954
|
-
let t = N(it, []), { syntax: n } = Nt(), r = j(() =>
|
|
1989
|
+
function Gr(e) {
|
|
1990
|
+
let t = N(it, []), { syntax: n } = Nt(), r = j(() => Wr(Te(fe(e(), t), n))), i = _(!1), a = _(null), { top: o, left: s } = qe(a), c = j(() => ({
|
|
1955
1991
|
top: o.value - 8,
|
|
1956
1992
|
left: s.value
|
|
1957
1993
|
}));
|
|
@@ -1972,14 +2008,14 @@ function Hr(e) {
|
|
|
1972
2008
|
}
|
|
1973
2009
|
//#endregion
|
|
1974
2010
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1975
|
-
var
|
|
2011
|
+
var Kr = ["innerHTML"], qr = /* @__PURE__ */ y({
|
|
1976
2012
|
__name: "ParagraphBlock",
|
|
1977
2013
|
props: {
|
|
1978
2014
|
block: {},
|
|
1979
2015
|
viewport: {}
|
|
1980
2016
|
},
|
|
1981
2017
|
setup(e) {
|
|
1982
|
-
let t = e, n = C(() => import("./ParagraphEditor-
|
|
2018
|
+
let t = e, n = C(() => import("./ParagraphEditor-DIQ1jmSP.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Gr(() => t.block.content);
|
|
1983
2019
|
return (t, l) => (f(), x("div", {
|
|
1984
2020
|
ref_key: "blockRef",
|
|
1985
2021
|
ref: i,
|
|
@@ -1998,46 +2034,46 @@ var Ur = ["innerHTML"], Wr = /* @__PURE__ */ y({
|
|
|
1998
2034
|
key: 1,
|
|
1999
2035
|
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",
|
|
2000
2036
|
innerHTML: k(o)
|
|
2001
|
-
}, null, 8,
|
|
2037
|
+
}, null, 8, Kr))], 544));
|
|
2002
2038
|
}
|
|
2003
2039
|
});
|
|
2004
2040
|
//#endregion
|
|
2005
2041
|
//#region src/utils/blockComponentResolver.ts
|
|
2006
|
-
function
|
|
2042
|
+
function Jr(e, t, n) {
|
|
2007
2043
|
if (t) {
|
|
2008
2044
|
let n = t.getComponent(e);
|
|
2009
2045
|
if (n) return n;
|
|
2010
2046
|
}
|
|
2011
2047
|
return n[e.type] ?? null;
|
|
2012
2048
|
}
|
|
2013
|
-
function
|
|
2049
|
+
function Yr(e) {
|
|
2014
2050
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
2015
2051
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
2016
2052
|
backgroundColor: n || "transparent"
|
|
2017
2053
|
};
|
|
2018
2054
|
return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
2019
2055
|
}
|
|
2020
|
-
function
|
|
2056
|
+
function Xr(e) {
|
|
2021
2057
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
2022
2058
|
let t = e.wrapper, n = {};
|
|
2023
2059
|
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;
|
|
2024
2060
|
}
|
|
2025
2061
|
//#endregion
|
|
2026
2062
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2027
|
-
var
|
|
2063
|
+
var Zr = ["data-block-id", "data-block-type"], Qr = ["aria-label"], $r = [
|
|
2028
2064
|
"aria-label",
|
|
2029
2065
|
"aria-pressed",
|
|
2030
2066
|
"title"
|
|
2031
|
-
],
|
|
2067
|
+
], ei = ["aria-label", "title"], ti = ["aria-label", "title"], ni = ["aria-label", "title"], ri = {
|
|
2032
2068
|
key: 1,
|
|
2033
2069
|
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"
|
|
2034
|
-
},
|
|
2070
|
+
}, ii = { 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)]" }, ai = {
|
|
2035
2071
|
key: 2,
|
|
2036
2072
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2037
|
-
},
|
|
2073
|
+
}, oi = ["aria-label", "title"], si = {
|
|
2038
2074
|
key: 3,
|
|
2039
2075
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2040
|
-
},
|
|
2076
|
+
}, ci = ["aria-label"], li = /*#__PURE__*/ Mt(/* @__PURE__ */ y({
|
|
2041
2077
|
__name: "BlockWrapper",
|
|
2042
2078
|
props: {
|
|
2043
2079
|
block: {},
|
|
@@ -2047,7 +2083,7 @@ var Jr = ["data-block-id", "data-block-type"], Yr = ["aria-label"], Xr = [
|
|
|
2047
2083
|
},
|
|
2048
2084
|
emits: ["select"],
|
|
2049
2085
|
setup(e, { emit: t }) {
|
|
2050
|
-
let n = C(() => import("./BlockIssueBadge-
|
|
2086
|
+
let n = C(() => import("./BlockIssueBadge-CZYgn-qg.js")), r = e, a = t, { t: s, format: c } = Tt(), l = N(xt, null), u = _(null), d = j(() => l?.liftedBlockId.value === r.block.id), m = j(() => d.value ? c(s.blockActions.dragLifted, { block: r.block.type }) : s.blockActions.drag);
|
|
2051
2087
|
async function h() {
|
|
2052
2088
|
await ie(), u.value?.focus();
|
|
2053
2089
|
}
|
|
@@ -2074,12 +2110,12 @@ var Jr = ["data-block-id", "data-block-type"], Yr = ["aria-label"], Xr = [
|
|
|
2074
2110
|
desktop: s.viewport.desktop,
|
|
2075
2111
|
mobile: s.viewport.mobile
|
|
2076
2112
|
}[r.viewport] ?? r.viewport : ""), E = j(() => !!r.block.displayCondition), D = N(pt, null), ee = N(bt, null), A = N(yt, {}), te = j(() => !!A.savedModules), ne = j(() => A.comments?.getBlockCount(r.block.id) ?? 0), re = j(() => {
|
|
2077
|
-
let e =
|
|
2113
|
+
let e = Yr(r.block), t = {
|
|
2078
2114
|
padding: e.padding,
|
|
2079
2115
|
backgroundColor: e.backgroundColor
|
|
2080
2116
|
};
|
|
2081
2117
|
return e.borderRadius && (t.borderRadius = e.borderRadius), t;
|
|
2082
|
-
}), ae = j(() =>
|
|
2118
|
+
}), ae = j(() => Xr(r.block));
|
|
2083
2119
|
function oe(e) {
|
|
2084
2120
|
r.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), a("select"));
|
|
2085
2121
|
}
|
|
@@ -2125,7 +2161,7 @@ var Jr = ["data-block-id", "data-block-type"], Yr = ["aria-label"], Xr = [
|
|
|
2125
2161
|
}, [w(k(kn), {
|
|
2126
2162
|
size: 14,
|
|
2127
2163
|
"stroke-width": 1.5
|
|
2128
|
-
})], 40,
|
|
2164
|
+
})], 40, $r),
|
|
2129
2165
|
b("button", {
|
|
2130
2166
|
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",
|
|
2131
2167
|
"aria-label": k(s).blockActions.duplicate,
|
|
@@ -2134,7 +2170,7 @@ var Jr = ["data-block-id", "data-block-type"], Yr = ["aria-label"], Xr = [
|
|
|
2134
2170
|
}, [w(k(En), {
|
|
2135
2171
|
size: 14,
|
|
2136
2172
|
"stroke-width": 1.5
|
|
2137
|
-
})], 8,
|
|
2173
|
+
})], 8, ei),
|
|
2138
2174
|
te.value ? (f(), x("button", {
|
|
2139
2175
|
key: 0,
|
|
2140
2176
|
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",
|
|
@@ -2144,7 +2180,7 @@ var Jr = ["data-block-id", "data-block-type"], Yr = ["aria-label"], Xr = [
|
|
|
2144
2180
|
}, [w(k(Cn), {
|
|
2145
2181
|
size: 14,
|
|
2146
2182
|
"stroke-width": 1.5
|
|
2147
|
-
})], 8,
|
|
2183
|
+
})], 8, ti)) : M("", !0),
|
|
2148
2184
|
b("button", {
|
|
2149
2185
|
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",
|
|
2150
2186
|
"aria-label": k(s).blockActions.delete,
|
|
@@ -2153,13 +2189,13 @@ var Jr = ["data-block-id", "data-block-type"], Yr = ["aria-label"], Xr = [
|
|
|
2153
2189
|
}, [w(k(Ot), {
|
|
2154
2190
|
size: 14,
|
|
2155
2191
|
"stroke-width": 1.5
|
|
2156
|
-
})], 8,
|
|
2157
|
-
], 8,
|
|
2158
|
-
v.value ? (f(), x("div",
|
|
2192
|
+
})], 8, ni)
|
|
2193
|
+
], 8, Qr)) : M("", !0),
|
|
2194
|
+
v.value ? (f(), x("div", ri, [b("span", ii, [w(k(Dn), {
|
|
2159
2195
|
size: 12,
|
|
2160
2196
|
"stroke-width": 1.5
|
|
2161
2197
|
}), O(" " + p(k(c)(k(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : M("", !0),
|
|
2162
|
-
E.value && !v.value ? (f(), x("div",
|
|
2198
|
+
E.value && !v.value ? (f(), x("div", ai, [b("button", {
|
|
2163
2199
|
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)]",
|
|
2164
2200
|
"aria-label": k(s).blockActions.conditionToggle,
|
|
2165
2201
|
title: e.block.displayCondition?.label,
|
|
@@ -2167,15 +2203,15 @@ var Jr = ["data-block-id", "data-block-type"], Yr = ["aria-label"], Xr = [
|
|
|
2167
2203
|
}, [w(k(On), {
|
|
2168
2204
|
size: 12,
|
|
2169
2205
|
"stroke-width": 2
|
|
2170
|
-
})], 8,
|
|
2171
|
-
ne.value > 0 && !v.value ? (f(), x("div",
|
|
2206
|
+
})], 8, oi)])) : M("", !0),
|
|
2207
|
+
ne.value > 0 && !v.value ? (f(), x("div", si, [b("button", {
|
|
2172
2208
|
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)]",
|
|
2173
2209
|
"aria-label": k(c)(k(s).blockActions.comments, { count: String(ne.value) }),
|
|
2174
2210
|
onClick: r[0] ||= P((t) => k(A).comments?.openForBlock(e.block.id), ["stop"])
|
|
2175
2211
|
}, [w(k(Dt), {
|
|
2176
2212
|
size: 12,
|
|
2177
2213
|
"stroke-width": 2.5
|
|
2178
|
-
}), O(" " + p(ne.value), 1)], 8,
|
|
2214
|
+
}), O(" " + p(ne.value), 1)], 8, ci)])) : M("", !0),
|
|
2179
2215
|
ae.value ? (f(), x("div", {
|
|
2180
2216
|
key: 4,
|
|
2181
2217
|
class: "tpl-section-wrapper",
|
|
@@ -2188,31 +2224,31 @@ var Jr = ["data-block-id", "data-block-type"], Yr = ["aria-label"], Xr = [
|
|
|
2188
2224
|
class: "tpl-block-content",
|
|
2189
2225
|
style: i(re.value)
|
|
2190
2226
|
}, [T(t.$slots, "default", {}, void 0, !0)], 4))
|
|
2191
|
-
], 10,
|
|
2227
|
+
], 10, Zr));
|
|
2192
2228
|
}
|
|
2193
2229
|
}), [["__scopeId", "data-v-7d9e7893"]]);
|
|
2194
2230
|
//#endregion
|
|
2195
2231
|
//#region src/utils/unwrapParagraph.ts
|
|
2196
|
-
function
|
|
2232
|
+
function ui(e) {
|
|
2197
2233
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2198
2234
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2199
2235
|
}
|
|
2200
2236
|
//#endregion
|
|
2201
2237
|
//#region src/components/blocks/TitleBlock.vue
|
|
2202
|
-
var
|
|
2238
|
+
var di = /* @__PURE__ */ y({
|
|
2203
2239
|
__name: "TitleBlock",
|
|
2204
2240
|
props: {
|
|
2205
2241
|
block: {},
|
|
2206
2242
|
viewport: {}
|
|
2207
2243
|
},
|
|
2208
2244
|
setup(e) {
|
|
2209
|
-
let t = e, n = C(() => import("./TitleEditor-
|
|
2245
|
+
let t = e, n = C(() => import("./TitleEditor-BATN-k-Q.js")), { isEditing: r, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Gr(() => t.block.content), u = j(() => {
|
|
2210
2246
|
let e = {
|
|
2211
2247
|
fontSize: `${Pe[t.block.level]}px`,
|
|
2212
2248
|
textAlign: t.block.textAlign
|
|
2213
2249
|
};
|
|
2214
2250
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2215
|
-
}), p = j(() => `h${t.block.level}`), m = j(() =>
|
|
2251
|
+
}), p = j(() => `h${t.block.level}`), m = j(() => ui(s.value));
|
|
2216
2252
|
return (t, s) => (f(), x("div", {
|
|
2217
2253
|
ref_key: "blockRef",
|
|
2218
2254
|
ref: a,
|
|
@@ -2238,88 +2274,88 @@ var ci = /* @__PURE__ */ y({
|
|
|
2238
2274
|
});
|
|
2239
2275
|
//#endregion
|
|
2240
2276
|
//#region src/utils/sectionColumnDrop.ts
|
|
2241
|
-
function
|
|
2277
|
+
function fi(e) {
|
|
2242
2278
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2243
2279
|
}
|
|
2244
2280
|
//#endregion
|
|
2245
2281
|
//#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
|
|
2246
|
-
var
|
|
2282
|
+
var pi = Object.defineProperty, mi = Object.getOwnPropertySymbols, hi = Object.prototype.hasOwnProperty, gi = Object.prototype.propertyIsEnumerable, _i = (e, t, n) => t in e ? pi(e, t, {
|
|
2247
2283
|
enumerable: !0,
|
|
2248
2284
|
configurable: !0,
|
|
2249
2285
|
writable: !0,
|
|
2250
2286
|
value: n
|
|
2251
|
-
}) : e[t] = n,
|
|
2252
|
-
for (var n in t ||= {})
|
|
2253
|
-
if (
|
|
2287
|
+
}) : e[t] = n, vi = (e, t) => {
|
|
2288
|
+
for (var n in t ||= {}) hi.call(t, n) && _i(e, n, t[n]);
|
|
2289
|
+
if (mi) for (var n of mi(t)) gi.call(t, n) && _i(e, n, t[n]);
|
|
2254
2290
|
return e;
|
|
2255
|
-
},
|
|
2291
|
+
}, yi = (e, t) => {
|
|
2256
2292
|
var n = {};
|
|
2257
|
-
for (var r in e)
|
|
2258
|
-
if (e != null &&
|
|
2293
|
+
for (var r in e) hi.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2294
|
+
if (e != null && mi) for (var r of mi(e)) t.indexOf(r) < 0 && gi.call(e, r) && (n[r] = e[r]);
|
|
2259
2295
|
return n;
|
|
2260
|
-
},
|
|
2261
|
-
function
|
|
2262
|
-
console.warn(
|
|
2296
|
+
}, bi = "[vue-draggable-plus]: ";
|
|
2297
|
+
function xi(e) {
|
|
2298
|
+
console.warn(bi + e);
|
|
2263
2299
|
}
|
|
2264
|
-
function
|
|
2265
|
-
console.error(
|
|
2300
|
+
function Si(e) {
|
|
2301
|
+
console.error(bi + e);
|
|
2266
2302
|
}
|
|
2267
|
-
function
|
|
2303
|
+
function Ci(e, t, n) {
|
|
2268
2304
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2269
2305
|
}
|
|
2270
|
-
function
|
|
2306
|
+
function wi(e) {
|
|
2271
2307
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2272
2308
|
}
|
|
2273
|
-
function
|
|
2274
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2309
|
+
function Ti(e) {
|
|
2310
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[wi(n)] = e[n]), t), {});
|
|
2275
2311
|
}
|
|
2276
|
-
function
|
|
2312
|
+
function Ei(e, t) {
|
|
2277
2313
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2278
2314
|
}
|
|
2279
|
-
function
|
|
2315
|
+
function Di(e, t, n) {
|
|
2280
2316
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2281
2317
|
}
|
|
2282
|
-
function
|
|
2318
|
+
function Oi(e) {
|
|
2283
2319
|
return e === void 0;
|
|
2284
2320
|
}
|
|
2285
|
-
function
|
|
2321
|
+
function ki(e) {
|
|
2286
2322
|
return typeof e == "string";
|
|
2287
2323
|
}
|
|
2288
|
-
function
|
|
2324
|
+
function Ai(e, t, n) {
|
|
2289
2325
|
let r = e.children[n];
|
|
2290
2326
|
e.insertBefore(t, r);
|
|
2291
2327
|
}
|
|
2292
|
-
function
|
|
2328
|
+
function ji(e) {
|
|
2293
2329
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2294
2330
|
}
|
|
2295
|
-
function
|
|
2331
|
+
function Mi(e, t = document) {
|
|
2296
2332
|
let n = null;
|
|
2297
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2333
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || xi(`Element not found: ${e}`), n;
|
|
2298
2334
|
}
|
|
2299
|
-
function
|
|
2335
|
+
function Ni(e, t, n = null) {
|
|
2300
2336
|
return function(...r) {
|
|
2301
2337
|
return e.apply(n, r), t.apply(n, r);
|
|
2302
2338
|
};
|
|
2303
2339
|
}
|
|
2304
|
-
function
|
|
2305
|
-
let n =
|
|
2340
|
+
function Pi(e, t) {
|
|
2341
|
+
let n = vi({}, e);
|
|
2306
2342
|
return Object.keys(t).forEach((r) => {
|
|
2307
|
-
n[r] ? n[r] =
|
|
2343
|
+
n[r] ? n[r] = Ni(e[r], t[r]) : n[r] = t[r];
|
|
2308
2344
|
}), n;
|
|
2309
2345
|
}
|
|
2310
|
-
function
|
|
2346
|
+
function Fi(e) {
|
|
2311
2347
|
return e instanceof HTMLElement;
|
|
2312
2348
|
}
|
|
2313
|
-
function
|
|
2349
|
+
function Ii(e, t) {
|
|
2314
2350
|
Object.keys(e).forEach((n) => {
|
|
2315
2351
|
t(n, e[n]);
|
|
2316
2352
|
});
|
|
2317
2353
|
}
|
|
2318
|
-
function
|
|
2354
|
+
function Li(e) {
|
|
2319
2355
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2320
2356
|
}
|
|
2321
|
-
var
|
|
2322
|
-
function
|
|
2357
|
+
var Ri = Object.assign;
|
|
2358
|
+
function zi(e, t) {
|
|
2323
2359
|
var n = Object.keys(e);
|
|
2324
2360
|
if (Object.getOwnPropertySymbols) {
|
|
2325
2361
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2329,26 +2365,26 @@ function Ii(e, t) {
|
|
|
2329
2365
|
}
|
|
2330
2366
|
return n;
|
|
2331
2367
|
}
|
|
2332
|
-
function
|
|
2368
|
+
function Bi(e) {
|
|
2333
2369
|
for (var t = 1; t < arguments.length; t++) {
|
|
2334
2370
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2335
|
-
t % 2 ?
|
|
2336
|
-
|
|
2337
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2371
|
+
t % 2 ? zi(Object(n), !0).forEach(function(t) {
|
|
2372
|
+
Hi(e, t, n[t]);
|
|
2373
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : zi(Object(n)).forEach(function(t) {
|
|
2338
2374
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2339
2375
|
});
|
|
2340
2376
|
}
|
|
2341
2377
|
return e;
|
|
2342
2378
|
}
|
|
2343
|
-
function
|
|
2379
|
+
function Vi(e) {
|
|
2344
2380
|
"@babel/helpers - typeof";
|
|
2345
|
-
return
|
|
2381
|
+
return Vi = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2346
2382
|
return typeof e;
|
|
2347
2383
|
} : function(e) {
|
|
2348
2384
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2349
|
-
},
|
|
2385
|
+
}, Vi(e);
|
|
2350
2386
|
}
|
|
2351
|
-
function
|
|
2387
|
+
function Hi(e, t, n) {
|
|
2352
2388
|
return t in e ? Object.defineProperty(e, t, {
|
|
2353
2389
|
value: n,
|
|
2354
2390
|
enumerable: !0,
|
|
@@ -2356,45 +2392,45 @@ function zi(e, t, n) {
|
|
|
2356
2392
|
writable: !0
|
|
2357
2393
|
}) : e[t] = n, e;
|
|
2358
2394
|
}
|
|
2359
|
-
function
|
|
2360
|
-
return
|
|
2395
|
+
function Ui() {
|
|
2396
|
+
return Ui = Object.assign || function(e) {
|
|
2361
2397
|
for (var t = 1; t < arguments.length; t++) {
|
|
2362
2398
|
var n = arguments[t];
|
|
2363
2399
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2364
2400
|
}
|
|
2365
2401
|
return e;
|
|
2366
|
-
},
|
|
2402
|
+
}, Ui.apply(this, arguments);
|
|
2367
2403
|
}
|
|
2368
|
-
function
|
|
2404
|
+
function Wi(e, t) {
|
|
2369
2405
|
if (e == null) return {};
|
|
2370
2406
|
var n = {}, r = Object.keys(e), i, a;
|
|
2371
2407
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2372
2408
|
return n;
|
|
2373
2409
|
}
|
|
2374
|
-
function
|
|
2410
|
+
function Gi(e, t) {
|
|
2375
2411
|
if (e == null) return {};
|
|
2376
|
-
var n =
|
|
2412
|
+
var n = Wi(e, t), r, i;
|
|
2377
2413
|
if (Object.getOwnPropertySymbols) {
|
|
2378
2414
|
var a = Object.getOwnPropertySymbols(e);
|
|
2379
2415
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2380
2416
|
}
|
|
2381
2417
|
return n;
|
|
2382
2418
|
}
|
|
2383
|
-
var
|
|
2384
|
-
function
|
|
2419
|
+
var Ki = "1.15.2";
|
|
2420
|
+
function qi(e) {
|
|
2385
2421
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2386
2422
|
}
|
|
2387
|
-
var
|
|
2423
|
+
var Ji = qi(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Yi = qi(/Edge/i), Xi = qi(/firefox/i), Zi = qi(/safari/i) && !qi(/chrome/i) && !qi(/android/i), Qi = qi(/iP(ad|od|hone)/i), $i = qi(/chrome/i) && qi(/android/i), ea = {
|
|
2388
2424
|
capture: !1,
|
|
2389
2425
|
passive: !1
|
|
2390
2426
|
};
|
|
2391
2427
|
function I(e, t, n) {
|
|
2392
|
-
e.addEventListener(t, n, !
|
|
2428
|
+
e.addEventListener(t, n, !Ji && ea);
|
|
2393
2429
|
}
|
|
2394
2430
|
function L(e, t, n) {
|
|
2395
|
-
e.removeEventListener(t, n, !
|
|
2431
|
+
e.removeEventListener(t, n, !Ji && ea);
|
|
2396
2432
|
}
|
|
2397
|
-
function
|
|
2433
|
+
function ta(e, t) {
|
|
2398
2434
|
if (t) {
|
|
2399
2435
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2400
2436
|
if (e.matches) return e.matches(t);
|
|
@@ -2406,22 +2442,22 @@ function Qi(e, t) {
|
|
|
2406
2442
|
return !1;
|
|
2407
2443
|
}
|
|
2408
2444
|
}
|
|
2409
|
-
function
|
|
2445
|
+
function na(e) {
|
|
2410
2446
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2411
2447
|
}
|
|
2412
|
-
function
|
|
2448
|
+
function ra(e, t, n, r) {
|
|
2413
2449
|
if (e) {
|
|
2414
2450
|
n ||= document;
|
|
2415
2451
|
do {
|
|
2416
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2452
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && ta(e, t) : ta(e, t)) || r && e === n) return e;
|
|
2417
2453
|
if (e === n) break;
|
|
2418
|
-
} while (e =
|
|
2454
|
+
} while (e = na(e));
|
|
2419
2455
|
}
|
|
2420
2456
|
return null;
|
|
2421
2457
|
}
|
|
2422
|
-
var
|
|
2458
|
+
var ia = /\s+/g;
|
|
2423
2459
|
function R(e, t, n) {
|
|
2424
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2460
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(ia, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(ia, " "));
|
|
2425
2461
|
}
|
|
2426
2462
|
function z(e, t, n) {
|
|
2427
2463
|
var r = e && e.style;
|
|
@@ -2430,7 +2466,7 @@ function z(e, t, n) {
|
|
|
2430
2466
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2431
2467
|
}
|
|
2432
2468
|
}
|
|
2433
|
-
function
|
|
2469
|
+
function aa(e, t) {
|
|
2434
2470
|
var n = "";
|
|
2435
2471
|
if (typeof e == "string") n = e;
|
|
2436
2472
|
else do {
|
|
@@ -2440,7 +2476,7 @@ function na(e, t) {
|
|
|
2440
2476
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2441
2477
|
return i && new i(n);
|
|
2442
2478
|
}
|
|
2443
|
-
function
|
|
2479
|
+
function oa(e, t, n) {
|
|
2444
2480
|
if (e) {
|
|
2445
2481
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2446
2482
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2448,13 +2484,13 @@ function ra(e, t, n) {
|
|
|
2448
2484
|
}
|
|
2449
2485
|
return [];
|
|
2450
2486
|
}
|
|
2451
|
-
function
|
|
2487
|
+
function sa() {
|
|
2452
2488
|
return document.scrollingElement || document.documentElement;
|
|
2453
2489
|
}
|
|
2454
2490
|
function B(e, t, n, r, i) {
|
|
2455
2491
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2456
2492
|
var a, o, s, c, l, u, d;
|
|
2457
|
-
if (e !== window && e.parentNode && e !==
|
|
2493
|
+
if (e !== window && e.parentNode && e !== sa() ? (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, !Ji)) do
|
|
2458
2494
|
if (i && i.getBoundingClientRect && (z(i, "transform") !== "none" || n && z(i, "position") !== "static")) {
|
|
2459
2495
|
var f = i.getBoundingClientRect();
|
|
2460
2496
|
o -= f.top + parseInt(z(i, "border-top-width")), s -= f.left + parseInt(z(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
@@ -2462,7 +2498,7 @@ function B(e, t, n, r, i) {
|
|
|
2462
2498
|
}
|
|
2463
2499
|
while (i = i.parentNode);
|
|
2464
2500
|
if (r && e !== window) {
|
|
2465
|
-
var p =
|
|
2501
|
+
var p = aa(i || e), m = p && p.a, h = p && p.d;
|
|
2466
2502
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2467
2503
|
}
|
|
2468
2504
|
return {
|
|
@@ -2475,18 +2511,18 @@ function B(e, t, n, r, i) {
|
|
|
2475
2511
|
};
|
|
2476
2512
|
}
|
|
2477
2513
|
}
|
|
2478
|
-
function
|
|
2479
|
-
for (var r =
|
|
2514
|
+
function ca(e, t, n) {
|
|
2515
|
+
for (var r = ma(e, !0), i = B(e)[t]; r;) {
|
|
2480
2516
|
var a = B(r)[n], o = void 0;
|
|
2481
2517
|
if (o = i >= a, !o) return r;
|
|
2482
|
-
if (r ===
|
|
2483
|
-
r =
|
|
2518
|
+
if (r === sa()) break;
|
|
2519
|
+
r = ma(r, !1);
|
|
2484
2520
|
}
|
|
2485
2521
|
return !1;
|
|
2486
2522
|
}
|
|
2487
|
-
function
|
|
2523
|
+
function la(e, t, n, r) {
|
|
2488
2524
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2489
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2525
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && ra(o[a], n.draggable, e, !1)) {
|
|
2490
2526
|
if (i === t) return o[a];
|
|
2491
2527
|
i++;
|
|
2492
2528
|
}
|
|
@@ -2494,84 +2530,84 @@ function oa(e, t, n, r) {
|
|
|
2494
2530
|
}
|
|
2495
2531
|
return null;
|
|
2496
2532
|
}
|
|
2497
|
-
function
|
|
2498
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || z(n, "display") === "none" || t && !
|
|
2533
|
+
function ua(e, t) {
|
|
2534
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || z(n, "display") === "none" || t && !ta(n, t));) n = n.previousElementSibling;
|
|
2499
2535
|
return n || null;
|
|
2500
2536
|
}
|
|
2501
|
-
function
|
|
2537
|
+
function da(e, t) {
|
|
2502
2538
|
var n = 0;
|
|
2503
2539
|
if (!e || !e.parentNode) return -1;
|
|
2504
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2540
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || ta(e, t)) && n++;
|
|
2505
2541
|
return n;
|
|
2506
2542
|
}
|
|
2507
|
-
function
|
|
2508
|
-
var t = 0, n = 0, r =
|
|
2543
|
+
function fa(e) {
|
|
2544
|
+
var t = 0, n = 0, r = sa();
|
|
2509
2545
|
if (e) do {
|
|
2510
|
-
var i =
|
|
2546
|
+
var i = aa(e), a = i.a, o = i.d;
|
|
2511
2547
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2512
2548
|
} while (e !== r && (e = e.parentNode));
|
|
2513
2549
|
return [t, n];
|
|
2514
2550
|
}
|
|
2515
|
-
function
|
|
2551
|
+
function pa(e, t) {
|
|
2516
2552
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2517
2553
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2518
2554
|
}
|
|
2519
2555
|
return -1;
|
|
2520
2556
|
}
|
|
2521
|
-
function
|
|
2522
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2557
|
+
function ma(e, t) {
|
|
2558
|
+
if (!e || !e.getBoundingClientRect) return sa();
|
|
2523
2559
|
var n = e, r = !1;
|
|
2524
2560
|
do
|
|
2525
2561
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2526
2562
|
var i = z(n);
|
|
2527
2563
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2528
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2564
|
+
if (!n.getBoundingClientRect || n === document.body) return sa();
|
|
2529
2565
|
if (r || t) return n;
|
|
2530
2566
|
r = !0;
|
|
2531
2567
|
}
|
|
2532
2568
|
}
|
|
2533
2569
|
while (n = n.parentNode);
|
|
2534
|
-
return
|
|
2570
|
+
return sa();
|
|
2535
2571
|
}
|
|
2536
|
-
function
|
|
2572
|
+
function ha(e, t) {
|
|
2537
2573
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2538
2574
|
return e;
|
|
2539
2575
|
}
|
|
2540
|
-
function
|
|
2576
|
+
function ga(e, t) {
|
|
2541
2577
|
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);
|
|
2542
2578
|
}
|
|
2543
|
-
var
|
|
2544
|
-
function
|
|
2579
|
+
var _a;
|
|
2580
|
+
function va(e, t) {
|
|
2545
2581
|
return function() {
|
|
2546
|
-
if (!
|
|
2582
|
+
if (!_a) {
|
|
2547
2583
|
var n = arguments, r = this;
|
|
2548
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2549
|
-
|
|
2584
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), _a = setTimeout(function() {
|
|
2585
|
+
_a = void 0;
|
|
2550
2586
|
}, t);
|
|
2551
2587
|
}
|
|
2552
2588
|
};
|
|
2553
2589
|
}
|
|
2554
|
-
function
|
|
2555
|
-
clearTimeout(
|
|
2590
|
+
function ya() {
|
|
2591
|
+
clearTimeout(_a), _a = void 0;
|
|
2556
2592
|
}
|
|
2557
|
-
function
|
|
2593
|
+
function ba(e, t, n) {
|
|
2558
2594
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2559
2595
|
}
|
|
2560
|
-
function
|
|
2596
|
+
function xa(e) {
|
|
2561
2597
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2562
2598
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2563
2599
|
}
|
|
2564
|
-
function
|
|
2600
|
+
function Sa(e, t, n) {
|
|
2565
2601
|
var r = {};
|
|
2566
2602
|
return Array.from(e.children).forEach(function(i) {
|
|
2567
|
-
if (!(!
|
|
2603
|
+
if (!(!ra(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
2568
2604
|
var a = B(i);
|
|
2569
2605
|
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);
|
|
2570
2606
|
}
|
|
2571
2607
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2572
2608
|
}
|
|
2573
2609
|
var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2574
|
-
function
|
|
2610
|
+
function Ca() {
|
|
2575
2611
|
var e = [], t;
|
|
2576
2612
|
return {
|
|
2577
2613
|
captureAnimationState: function() {
|
|
@@ -2581,9 +2617,9 @@ function ba() {
|
|
|
2581
2617
|
target: t,
|
|
2582
2618
|
rect: B(t)
|
|
2583
2619
|
});
|
|
2584
|
-
var n =
|
|
2620
|
+
var n = Bi({}, e[e.length - 1].rect);
|
|
2585
2621
|
if (t.thisAnimationDuration) {
|
|
2586
|
-
var r =
|
|
2622
|
+
var r = aa(t, !0);
|
|
2587
2623
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2588
2624
|
}
|
|
2589
2625
|
t.fromRect = n;
|
|
@@ -2594,7 +2630,7 @@ function ba() {
|
|
|
2594
2630
|
e.push(t);
|
|
2595
2631
|
},
|
|
2596
2632
|
removeAnimationState: function(t) {
|
|
2597
|
-
e.splice(
|
|
2633
|
+
e.splice(pa(e, { target: t }), 1);
|
|
2598
2634
|
},
|
|
2599
2635
|
animateAll: function(n) {
|
|
2600
2636
|
var r = this;
|
|
@@ -2604,8 +2640,8 @@ function ba() {
|
|
|
2604
2640
|
}
|
|
2605
2641
|
var i = !1, a = 0;
|
|
2606
2642
|
e.forEach(function(e) {
|
|
2607
|
-
var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2608
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2643
|
+
var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = aa(n, !0);
|
|
2644
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && ga(c, s) && !ga(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ta(u, c, l, r.options)), ga(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() {
|
|
2609
2645
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2610
2646
|
}, t), n.thisAnimationDuration = t);
|
|
2611
2647
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2615,26 +2651,26 @@ function ba() {
|
|
|
2615
2651
|
animate: function(e, t, n, r) {
|
|
2616
2652
|
if (r) {
|
|
2617
2653
|
z(e, "transition", ""), z(e, "transform", "");
|
|
2618
|
-
var i =
|
|
2619
|
-
e.animatingX = !!s, e.animatingY = !!c, z(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
2654
|
+
var i = aa(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2655
|
+
e.animatingX = !!s, e.animatingY = !!c, z(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = wa(e), z(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), z(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2620
2656
|
z(e, "transition", ""), z(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2621
2657
|
}, r);
|
|
2622
2658
|
}
|
|
2623
2659
|
}
|
|
2624
2660
|
};
|
|
2625
2661
|
}
|
|
2626
|
-
function
|
|
2662
|
+
function wa(e) {
|
|
2627
2663
|
return e.offsetWidth;
|
|
2628
2664
|
}
|
|
2629
|
-
function
|
|
2665
|
+
function Ta(e, t, n, r) {
|
|
2630
2666
|
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;
|
|
2631
2667
|
}
|
|
2632
|
-
var
|
|
2668
|
+
var Ea = [], Da = { initializeByDefault: !0 }, Oa = {
|
|
2633
2669
|
mount: function(e) {
|
|
2634
|
-
for (var t in
|
|
2635
|
-
|
|
2670
|
+
for (var t in Da) Da.hasOwnProperty(t) && !(t in e) && (e[t] = Da[t]);
|
|
2671
|
+
Ea.forEach(function(t) {
|
|
2636
2672
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2637
|
-
}),
|
|
2673
|
+
}), Ea.push(e);
|
|
2638
2674
|
},
|
|
2639
2675
|
pluginEvent: function(e, t, n) {
|
|
2640
2676
|
var r = this;
|
|
@@ -2642,16 +2678,16 @@ var Ca = [], wa = { initializeByDefault: !0 }, Ta = {
|
|
|
2642
2678
|
r.eventCanceled = !0;
|
|
2643
2679
|
};
|
|
2644
2680
|
var i = e + "Global";
|
|
2645
|
-
|
|
2646
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2681
|
+
Ea.forEach(function(r) {
|
|
2682
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Bi({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Bi({ sortable: t }, n)));
|
|
2647
2683
|
});
|
|
2648
2684
|
},
|
|
2649
2685
|
initializePlugins: function(e, t, n, r) {
|
|
2650
|
-
for (var i in
|
|
2686
|
+
for (var i in Ea.forEach(function(r) {
|
|
2651
2687
|
var i = r.pluginName;
|
|
2652
2688
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2653
2689
|
var a = new r(e, t, e.options);
|
|
2654
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2690
|
+
a.sortable = e, a.options = e.options, e[i] = a, Ui(n, a.defaults);
|
|
2655
2691
|
}
|
|
2656
2692
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2657
2693
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2660,56 +2696,56 @@ var Ca = [], wa = { initializeByDefault: !0 }, Ta = {
|
|
|
2660
2696
|
},
|
|
2661
2697
|
getEventProperties: function(e, t) {
|
|
2662
2698
|
var n = {};
|
|
2663
|
-
return
|
|
2664
|
-
typeof r.eventProperties == "function" &&
|
|
2699
|
+
return Ea.forEach(function(r) {
|
|
2700
|
+
typeof r.eventProperties == "function" && Ui(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2665
2701
|
}), n;
|
|
2666
2702
|
},
|
|
2667
2703
|
modifyOption: function(e, t, n) {
|
|
2668
2704
|
var r;
|
|
2669
|
-
return
|
|
2705
|
+
return Ea.forEach(function(i) {
|
|
2670
2706
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2671
2707
|
}), r;
|
|
2672
2708
|
}
|
|
2673
2709
|
};
|
|
2674
|
-
function
|
|
2710
|
+
function ka(e) {
|
|
2675
2711
|
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;
|
|
2676
2712
|
if (t ||= n && n[V], t) {
|
|
2677
2713
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2678
|
-
window.CustomEvent && !
|
|
2714
|
+
window.CustomEvent && !Ji && !Yi ? h = new CustomEvent(r, {
|
|
2679
2715
|
bubbles: !0,
|
|
2680
2716
|
cancelable: !0
|
|
2681
2717
|
}) : (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;
|
|
2682
|
-
var v =
|
|
2718
|
+
var v = Bi(Bi({}, m), Oa.getEventProperties(r, t));
|
|
2683
2719
|
for (var y in v) h[y] = v[y];
|
|
2684
2720
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2685
2721
|
}
|
|
2686
2722
|
}
|
|
2687
|
-
var
|
|
2688
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2689
|
-
|
|
2723
|
+
var Aa = ["evt"], H = function(e, t) {
|
|
2724
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Gi(n, Aa);
|
|
2725
|
+
Oa.pluginEvent.bind(Q)(e, t, Bi({
|
|
2690
2726
|
dragEl: W,
|
|
2691
2727
|
parentEl: G,
|
|
2692
2728
|
ghostEl: K,
|
|
2693
2729
|
rootEl: q,
|
|
2694
|
-
nextEl:
|
|
2695
|
-
lastDownEl:
|
|
2730
|
+
nextEl: ja,
|
|
2731
|
+
lastDownEl: Ma,
|
|
2696
2732
|
cloneEl: J,
|
|
2697
|
-
cloneHidden:
|
|
2698
|
-
dragStarted:
|
|
2733
|
+
cloneHidden: Na,
|
|
2734
|
+
dragStarted: qa,
|
|
2699
2735
|
putSortable: X,
|
|
2700
2736
|
activeSortable: Q.active,
|
|
2701
2737
|
originalEvent: r,
|
|
2702
|
-
oldIndex:
|
|
2703
|
-
oldDraggableIndex:
|
|
2738
|
+
oldIndex: Pa,
|
|
2739
|
+
oldDraggableIndex: Fa,
|
|
2704
2740
|
newIndex: Y,
|
|
2705
|
-
newDraggableIndex:
|
|
2706
|
-
hideGhostForTarget:
|
|
2707
|
-
unhideGhostForTarget:
|
|
2741
|
+
newDraggableIndex: Ia,
|
|
2742
|
+
hideGhostForTarget: fo,
|
|
2743
|
+
unhideGhostForTarget: po,
|
|
2708
2744
|
cloneNowHidden: function() {
|
|
2709
|
-
|
|
2745
|
+
Na = !0;
|
|
2710
2746
|
},
|
|
2711
2747
|
cloneNowShown: function() {
|
|
2712
|
-
|
|
2748
|
+
Na = !1;
|
|
2713
2749
|
},
|
|
2714
2750
|
dispatchSortableEvent: function(e) {
|
|
2715
2751
|
U({
|
|
@@ -2721,45 +2757,45 @@ var Da = ["evt"], H = function(e, t) {
|
|
|
2721
2757
|
}, i));
|
|
2722
2758
|
};
|
|
2723
2759
|
function U(e) {
|
|
2724
|
-
|
|
2760
|
+
ka(Bi({
|
|
2725
2761
|
putSortable: X,
|
|
2726
2762
|
cloneEl: J,
|
|
2727
2763
|
targetEl: W,
|
|
2728
2764
|
rootEl: q,
|
|
2729
|
-
oldIndex:
|
|
2730
|
-
oldDraggableIndex:
|
|
2765
|
+
oldIndex: Pa,
|
|
2766
|
+
oldDraggableIndex: Fa,
|
|
2731
2767
|
newIndex: Y,
|
|
2732
|
-
newDraggableIndex:
|
|
2768
|
+
newDraggableIndex: Ia
|
|
2733
2769
|
}, e));
|
|
2734
2770
|
}
|
|
2735
|
-
var W, G, K, q,
|
|
2736
|
-
if (
|
|
2737
|
-
if (
|
|
2771
|
+
var W, G, K, q, ja, Ma, J, Na, Pa, Y, Fa, Ia, La, X, Ra = !1, za = !1, Ba = [], Va, Ha, Ua, Wa, Ga, Ka, qa, Ja, Ya, Xa = !1, Za = !1, Qa, Z, $a = [], eo = !1, to = [], no = typeof document < "u", ro = Qi, io = Yi || Ji ? "cssFloat" : "float", ao = no && !$i && !Qi && "draggable" in document.createElement("div"), oo = function() {
|
|
2772
|
+
if (no) {
|
|
2773
|
+
if (Ji) return !1;
|
|
2738
2774
|
var e = document.createElement("x");
|
|
2739
2775
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2740
2776
|
}
|
|
2741
|
-
}(),
|
|
2742
|
-
var n = z(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
2777
|
+
}(), so = function(e, t) {
|
|
2778
|
+
var n = z(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = la(e, 0, t), a = la(e, 1, t), o = i && z(i), s = a && z(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + B(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + B(a).width;
|
|
2743
2779
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2744
2780
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2745
2781
|
if (i && o.float && o.float !== "none") {
|
|
2746
2782
|
var u = o.float === "left" ? "left" : "right";
|
|
2747
2783
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2748
2784
|
}
|
|
2749
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2750
|
-
},
|
|
2785
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[io] === "none" || a && n[io] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2786
|
+
}, co = function(e, t, n) {
|
|
2751
2787
|
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;
|
|
2752
2788
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2753
|
-
},
|
|
2789
|
+
}, lo = function(e, t) {
|
|
2754
2790
|
var n;
|
|
2755
|
-
return
|
|
2791
|
+
return Ba.some(function(r) {
|
|
2756
2792
|
var i = r[V].options.emptyInsertThreshold;
|
|
2757
|
-
if (!(!i ||
|
|
2793
|
+
if (!(!i || ua(r))) {
|
|
2758
2794
|
var a = B(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2759
2795
|
if (o && s) return n = r;
|
|
2760
2796
|
}
|
|
2761
2797
|
}), n;
|
|
2762
|
-
},
|
|
2798
|
+
}, uo = function(e) {
|
|
2763
2799
|
function t(e, n) {
|
|
2764
2800
|
return function(r, i, a, o) {
|
|
2765
2801
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2772,31 +2808,31 @@ var W, G, K, q, Oa, ka, J, Aa, ja, Y, Ma, Na, Pa, X, Fa = !1, Ia = !1, La = [],
|
|
|
2772
2808
|
};
|
|
2773
2809
|
}
|
|
2774
2810
|
var n = {}, r = e.group;
|
|
2775
|
-
(!r ||
|
|
2776
|
-
},
|
|
2777
|
-
!
|
|
2778
|
-
},
|
|
2779
|
-
!
|
|
2811
|
+
(!r || Vi(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;
|
|
2812
|
+
}, fo = function() {
|
|
2813
|
+
!oo && K && z(K, "display", "none");
|
|
2814
|
+
}, po = function() {
|
|
2815
|
+
!oo && K && z(K, "display", "");
|
|
2780
2816
|
};
|
|
2781
|
-
|
|
2782
|
-
if (
|
|
2817
|
+
no && !$i && document.addEventListener("click", function(e) {
|
|
2818
|
+
if (za) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), za = !1, !1;
|
|
2783
2819
|
}, !0);
|
|
2784
|
-
var
|
|
2820
|
+
var mo = function(e) {
|
|
2785
2821
|
if (W) {
|
|
2786
2822
|
e = e.touches ? e.touches[0] : e;
|
|
2787
|
-
var t =
|
|
2823
|
+
var t = lo(e.clientX, e.clientY);
|
|
2788
2824
|
if (t) {
|
|
2789
2825
|
var n = {};
|
|
2790
2826
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2791
2827
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
|
|
2792
2828
|
}
|
|
2793
2829
|
}
|
|
2794
|
-
},
|
|
2830
|
+
}, ho = function(e) {
|
|
2795
2831
|
W && W.parentNode[V]._isOutsideThisEl(e.target);
|
|
2796
2832
|
};
|
|
2797
2833
|
function Q(e, t) {
|
|
2798
2834
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2799
|
-
this.el = e, this.options = t =
|
|
2835
|
+
this.el = e, this.options = t = Ui({}, t), e[V] = this;
|
|
2800
2836
|
var n = {
|
|
2801
2837
|
group: null,
|
|
2802
2838
|
sort: !0,
|
|
@@ -2809,7 +2845,7 @@ function Q(e, t) {
|
|
|
2809
2845
|
invertedSwapThreshold: null,
|
|
2810
2846
|
removeCloneOnHide: !0,
|
|
2811
2847
|
direction: function() {
|
|
2812
|
-
return
|
|
2848
|
+
return so(e, this.options);
|
|
2813
2849
|
},
|
|
2814
2850
|
ghostClass: "sortable-ghost",
|
|
2815
2851
|
chosenClass: "sortable-chosen",
|
|
@@ -2836,17 +2872,17 @@ function Q(e, t) {
|
|
|
2836
2872
|
x: 0,
|
|
2837
2873
|
y: 0
|
|
2838
2874
|
},
|
|
2839
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2875
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Zi,
|
|
2840
2876
|
emptyInsertThreshold: 5
|
|
2841
2877
|
};
|
|
2842
|
-
for (var r in
|
|
2843
|
-
for (var i in
|
|
2844
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
2878
|
+
for (var r in Oa.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2879
|
+
for (var i in uo(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2880
|
+
this.nativeDraggable = !t.forceFallback && ao, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? I(e, "pointerdown", this._onTapStart) : (I(e, "mousedown", this._onTapStart), I(e, "touchstart", this._onTapStart)), this.nativeDraggable && (I(e, "dragover", this), I(e, "dragenter", this)), Ba.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Ui(this, Ca());
|
|
2845
2881
|
}
|
|
2846
2882
|
Q.prototype = {
|
|
2847
2883
|
constructor: Q,
|
|
2848
2884
|
_isOutsideThisEl: function(e) {
|
|
2849
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2885
|
+
!this.el.contains(e) && e !== this.el && (Ja = null);
|
|
2850
2886
|
},
|
|
2851
2887
|
_getDirection: function(e, t) {
|
|
2852
2888
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
|
|
@@ -2854,8 +2890,8 @@ Q.prototype = {
|
|
|
2854
2890
|
_onTapStart: function(e) {
|
|
2855
2891
|
if (e.cancelable) {
|
|
2856
2892
|
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;
|
|
2857
|
-
if (
|
|
2858
|
-
if (
|
|
2893
|
+
if (To(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Zi && s && s.tagName.toUpperCase() === "SELECT") && (s = ra(s, r.draggable, n, !1), !(s && s.animated) && Ma !== s)) {
|
|
2894
|
+
if (Pa = da(s), Fa = da(s, r.draggable), typeof l == "function") {
|
|
2859
2895
|
if (l.call(this, e, s, this)) {
|
|
2860
2896
|
U({
|
|
2861
2897
|
sortable: t,
|
|
@@ -2868,7 +2904,7 @@ Q.prototype = {
|
|
|
2868
2904
|
return;
|
|
2869
2905
|
}
|
|
2870
2906
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2871
|
-
if (r =
|
|
2907
|
+
if (r = ra(c, r.trim(), n, !1), r) return U({
|
|
2872
2908
|
sortable: t,
|
|
2873
2909
|
rootEl: r,
|
|
2874
2910
|
name: "filter",
|
|
@@ -2880,7 +2916,7 @@ Q.prototype = {
|
|
|
2880
2916
|
i && e.cancelable && e.preventDefault();
|
|
2881
2917
|
return;
|
|
2882
2918
|
}
|
|
2883
|
-
r.handle && !
|
|
2919
|
+
r.handle && !ra(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2884
2920
|
}
|
|
2885
2921
|
}
|
|
2886
2922
|
},
|
|
@@ -2888,23 +2924,23 @@ Q.prototype = {
|
|
|
2888
2924
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2889
2925
|
if (n && !W && n.parentNode === i) {
|
|
2890
2926
|
var c = B(n);
|
|
2891
|
-
if (q = i, W = n, G = W.parentNode,
|
|
2927
|
+
if (q = i, W = n, G = W.parentNode, ja = W.nextSibling, Ma = n, La = a.group, Q.dragged = W, Va = {
|
|
2892
2928
|
target: W,
|
|
2893
2929
|
clientX: (t || e).clientX,
|
|
2894
2930
|
clientY: (t || e).clientY
|
|
2895
|
-
},
|
|
2931
|
+
}, Ga = Va.clientX - c.left, Ka = Va.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
|
|
2896
2932
|
if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
2897
2933
|
r._onDrop();
|
|
2898
2934
|
return;
|
|
2899
2935
|
}
|
|
2900
|
-
r._disableDelayedDragEvents(), !
|
|
2936
|
+
r._disableDelayedDragEvents(), !Xi && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
2901
2937
|
sortable: r,
|
|
2902
2938
|
name: "choose",
|
|
2903
2939
|
originalEvent: e
|
|
2904
2940
|
}), R(W, a.chosenClass, !0);
|
|
2905
2941
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2906
|
-
|
|
2907
|
-
}), I(o, "dragover",
|
|
2942
|
+
oa(W, e.trim(), vo);
|
|
2943
|
+
}), I(o, "dragover", mo), I(o, "mousemove", mo), I(o, "touchmove", mo), I(o, "mouseup", r._onDrop), I(o, "touchend", r._onDrop), I(o, "touchcancel", r._onDrop), Xi && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Yi || Ji))) {
|
|
2908
2944
|
if (Q.eventCanceled) {
|
|
2909
2945
|
this._onDrop();
|
|
2910
2946
|
return;
|
|
@@ -2918,7 +2954,7 @@ Q.prototype = {
|
|
|
2918
2954
|
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();
|
|
2919
2955
|
},
|
|
2920
2956
|
_disableDelayedDrag: function() {
|
|
2921
|
-
W &&
|
|
2957
|
+
W && vo(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2922
2958
|
},
|
|
2923
2959
|
_disableDelayedDragEvents: function() {
|
|
2924
2960
|
var e = this.el.ownerDocument;
|
|
@@ -2927,14 +2963,14 @@ Q.prototype = {
|
|
|
2927
2963
|
_triggerDragStart: function(e, t) {
|
|
2928
2964
|
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? I(document, "pointermove", this._onTouchMove) : t ? I(document, "touchmove", this._onTouchMove) : I(document, "mousemove", this._onTouchMove) : (I(W, "dragend", this), I(q, "dragstart", this._onDragStart));
|
|
2929
2965
|
try {
|
|
2930
|
-
document.selection ?
|
|
2966
|
+
document.selection ? Eo(function() {
|
|
2931
2967
|
document.selection.empty();
|
|
2932
2968
|
}) : window.getSelection().removeAllRanges();
|
|
2933
2969
|
} catch {}
|
|
2934
2970
|
},
|
|
2935
2971
|
_dragStarted: function(e, t) {
|
|
2936
|
-
if (
|
|
2937
|
-
H("dragStarted", this, { evt: t }), this.nativeDraggable && I(document, "dragover",
|
|
2972
|
+
if (Ra = !1, q && W) {
|
|
2973
|
+
H("dragStarted", this, { evt: t }), this.nativeDraggable && I(document, "dragover", ho);
|
|
2938
2974
|
var n = this.options;
|
|
2939
2975
|
!e && R(W, n.dragClass, !1), R(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
2940
2976
|
sortable: this,
|
|
@@ -2944,33 +2980,33 @@ Q.prototype = {
|
|
|
2944
2980
|
} else this._nulling();
|
|
2945
2981
|
},
|
|
2946
2982
|
_emulateDragOver: function() {
|
|
2947
|
-
if (
|
|
2948
|
-
this._lastX =
|
|
2949
|
-
for (var e = document.elementFromPoint(
|
|
2983
|
+
if (Ha) {
|
|
2984
|
+
this._lastX = Ha.clientX, this._lastY = Ha.clientY, fo();
|
|
2985
|
+
for (var e = document.elementFromPoint(Ha.clientX, Ha.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Ha.clientX, Ha.clientY), e !== t);) t = e;
|
|
2950
2986
|
if (W.parentNode[V]._isOutsideThisEl(e), t) do {
|
|
2951
2987
|
if (t[V]) {
|
|
2952
2988
|
var n = void 0;
|
|
2953
2989
|
if (n = t[V]._onDragOver({
|
|
2954
|
-
clientX:
|
|
2955
|
-
clientY:
|
|
2990
|
+
clientX: Ha.clientX,
|
|
2991
|
+
clientY: Ha.clientY,
|
|
2956
2992
|
target: e,
|
|
2957
2993
|
rootEl: t
|
|
2958
2994
|
}), n && !this.options.dragoverBubble) break;
|
|
2959
2995
|
}
|
|
2960
2996
|
e = t;
|
|
2961
2997
|
} while (t = t.parentNode);
|
|
2962
|
-
|
|
2998
|
+
po();
|
|
2963
2999
|
}
|
|
2964
3000
|
},
|
|
2965
3001
|
_onTouchMove: function(e) {
|
|
2966
|
-
if (
|
|
2967
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K &&
|
|
2968
|
-
if (!Q.active && !
|
|
3002
|
+
if (Va) {
|
|
3003
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && aa(K, !0), o = K && a && a.a, s = K && a && a.d, c = ro && Z && fa(Z), l = (i.clientX - Va.clientX + r.x) / (o || 1) + (c ? c[0] - $a[0] : 0) / (o || 1), u = (i.clientY - Va.clientY + r.y) / (s || 1) + (c ? c[1] - $a[1] : 0) / (s || 1);
|
|
3004
|
+
if (!Q.active && !Ra) {
|
|
2969
3005
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2970
3006
|
this._onDragStart(e, !0);
|
|
2971
3007
|
}
|
|
2972
3008
|
if (K) {
|
|
2973
|
-
a ? (a.e += l - (
|
|
3009
|
+
a ? (a.e += l - (Ua || 0), a.f += u - (Wa || 0)) : a = {
|
|
2974
3010
|
a: 1,
|
|
2975
3011
|
b: 0,
|
|
2976
3012
|
c: 0,
|
|
@@ -2979,19 +3015,19 @@ Q.prototype = {
|
|
|
2979
3015
|
f: u
|
|
2980
3016
|
};
|
|
2981
3017
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2982
|
-
z(K, "webkitTransform", d), z(K, "mozTransform", d), z(K, "msTransform", d), z(K, "transform", d),
|
|
3018
|
+
z(K, "webkitTransform", d), z(K, "mozTransform", d), z(K, "msTransform", d), z(K, "transform", d), Ua = l, Wa = u, Ha = i;
|
|
2983
3019
|
}
|
|
2984
3020
|
e.cancelable && e.preventDefault();
|
|
2985
3021
|
}
|
|
2986
3022
|
},
|
|
2987
3023
|
_appendGhost: function() {
|
|
2988
3024
|
if (!K) {
|
|
2989
|
-
var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0,
|
|
2990
|
-
if (
|
|
3025
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0, ro, !0, e), n = this.options;
|
|
3026
|
+
if (ro) {
|
|
2991
3027
|
for (Z = e; z(Z, "position") === "static" && z(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
2992
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
3028
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = sa()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = sa(), $a = fa(Z);
|
|
2993
3029
|
}
|
|
2994
|
-
K = W.cloneNode(!0), R(K, n.ghostClass, !1), R(K, n.fallbackClass, !0), R(K, n.dragClass, !0), z(K, "transition", ""), z(K, "transform", ""), z(K, "box-sizing", "border-box"), z(K, "margin", 0), z(K, "top", t.top), z(K, "left", t.left), z(K, "width", t.width), z(K, "height", t.height), z(K, "opacity", "0.8"), z(K, "position",
|
|
3030
|
+
K = W.cloneNode(!0), R(K, n.ghostClass, !1), R(K, n.fallbackClass, !0), R(K, n.dragClass, !0), z(K, "transition", ""), z(K, "transform", ""), z(K, "box-sizing", "border-box"), z(K, "margin", 0), z(K, "top", t.top), z(K, "left", t.left), z(K, "width", t.width), z(K, "height", t.height), z(K, "opacity", "0.8"), z(K, "position", ro ? "absolute" : "fixed"), z(K, "zIndex", "100000"), z(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), z(K, "transform-origin", Ga / parseInt(K.style.width) * 100 + "% " + Ka / parseInt(K.style.height) * 100 + "%");
|
|
2995
3031
|
}
|
|
2996
3032
|
},
|
|
2997
3033
|
_onDragStart: function(e, t) {
|
|
@@ -3000,18 +3036,18 @@ Q.prototype = {
|
|
|
3000
3036
|
this._onDrop();
|
|
3001
3037
|
return;
|
|
3002
3038
|
}
|
|
3003
|
-
H("setupClone", this), Q.eventCanceled || (J =
|
|
3039
|
+
H("setupClone", this), Q.eventCanceled || (J = xa(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), R(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Eo(function() {
|
|
3004
3040
|
H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
3005
3041
|
sortable: n,
|
|
3006
3042
|
name: "clone"
|
|
3007
3043
|
}));
|
|
3008
|
-
}), !t && R(W, i.dragClass, !0), t ? (
|
|
3044
|
+
}), !t && R(W, i.dragClass, !0), t ? (za = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (L(document, "mouseup", n._onDrop), L(document, "touchend", n._onDrop), L(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, W)), I(document, "drop", n), z(W, "transform", "translateZ(0)")), Ra = !0, n._dragStartId = Eo(n._dragStarted.bind(n, t, e)), I(document, "selectstart", n), qa = !0, Zi && z(document.body, "user-select", "none");
|
|
3009
3045
|
},
|
|
3010
3046
|
_onDragOver: function(e) {
|
|
3011
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3012
|
-
if (
|
|
3047
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = La === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
3048
|
+
if (eo) return;
|
|
3013
3049
|
function h(o, s) {
|
|
3014
|
-
H(o, p,
|
|
3050
|
+
H(o, p, Bi({
|
|
3015
3051
|
evt: e,
|
|
3016
3052
|
isOwner: l,
|
|
3017
3053
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3023,7 +3059,7 @@ Q.prototype = {
|
|
|
3023
3059
|
target: n,
|
|
3024
3060
|
completed: _,
|
|
3025
3061
|
onMove: function(n, i) {
|
|
3026
|
-
return
|
|
3062
|
+
return _o(q, t, W, r, n, B(n), e, i);
|
|
3027
3063
|
},
|
|
3028
3064
|
changed: v
|
|
3029
3065
|
}, s));
|
|
@@ -3034,48 +3070,48 @@ Q.prototype = {
|
|
|
3034
3070
|
function _(r) {
|
|
3035
3071
|
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (R(W, X ? X.options.ghostClass : c.options.ghostClass, !1), R(W, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
3036
3072
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3037
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (
|
|
3073
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (Ja = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && mo(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3038
3074
|
}
|
|
3039
3075
|
function v() {
|
|
3040
|
-
Y =
|
|
3076
|
+
Y = da(W), Ia = da(W, o.draggable), U({
|
|
3041
3077
|
sortable: p,
|
|
3042
3078
|
name: "change",
|
|
3043
3079
|
toEl: t,
|
|
3044
3080
|
newIndex: Y,
|
|
3045
|
-
newDraggableIndex:
|
|
3081
|
+
newDraggableIndex: Ia,
|
|
3046
3082
|
originalEvent: e
|
|
3047
3083
|
});
|
|
3048
3084
|
}
|
|
3049
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3085
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = ra(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3050
3086
|
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3051
|
-
if (
|
|
3087
|
+
if (za = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = La.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
|
|
3052
3088
|
if (f = this._getDirection(e, n) === "vertical", r = B(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3053
|
-
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
3054
|
-
var y =
|
|
3055
|
-
if (!y ||
|
|
3089
|
+
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (ja ? q.insertBefore(W, ja) : q.appendChild(W)), _(!0);
|
|
3090
|
+
var y = ua(t, o.draggable);
|
|
3091
|
+
if (!y || xo(e, f, this) && !y.animated) {
|
|
3056
3092
|
if (y === W) return _(!1);
|
|
3057
|
-
if (y && t === e.target && (n = y), n && (i = B(n)),
|
|
3058
|
-
} else if (y &&
|
|
3059
|
-
var b =
|
|
3093
|
+
if (y && t === e.target && (n = y), n && (i = B(n)), _o(q, t, W, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(W, y.nextSibling) : t.appendChild(W), G = t, v(), _(!0);
|
|
3094
|
+
} else if (y && bo(e, f, this)) {
|
|
3095
|
+
var b = la(t, 0, o, !0);
|
|
3060
3096
|
if (b === W) return _(!1);
|
|
3061
|
-
if (n = b, i = B(n),
|
|
3097
|
+
if (n = b, i = B(n), _o(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
|
|
3062
3098
|
} else if (n.parentNode === t) {
|
|
3063
3099
|
i = B(n);
|
|
3064
|
-
var x = 0, S, C = W.parentNode !== t, w = !
|
|
3065
|
-
|
|
3100
|
+
var x = 0, S, C = W.parentNode !== t, w = !co(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = ca(n, "top", "top") || ca(W, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
3101
|
+
Ja !== n && (S = i[T], Xa = !1, Za = !w && o.invertSwap || C), x = So(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Za, Ja === n);
|
|
3066
3102
|
var O;
|
|
3067
3103
|
if (x !== 0) {
|
|
3068
|
-
var k =
|
|
3104
|
+
var k = da(W);
|
|
3069
3105
|
do
|
|
3070
3106
|
k -= x, O = G.children[k];
|
|
3071
3107
|
while (O && (z(O, "display") === "none" || O === K));
|
|
3072
3108
|
}
|
|
3073
3109
|
if (x === 0 || O === n) return _(!1);
|
|
3074
|
-
|
|
3110
|
+
Ja = n, Ya = x;
|
|
3075
3111
|
var ee = n.nextElementSibling, A = !1;
|
|
3076
3112
|
A = x === 1;
|
|
3077
|
-
var te =
|
|
3078
|
-
if (te !== !1) return (te === 1 || te === -1) && (A = te === 1),
|
|
3113
|
+
var te = _o(q, t, W, r, n, i, e, A);
|
|
3114
|
+
if (te !== !1) return (te === 1 || te === -1) && (A = te === 1), eo = !0, setTimeout(yo, 30), g(), A && !ee ? t.appendChild(W) : n.parentNode.insertBefore(W, A ? ee : n), E && ba(E, 0, D - E.scrollTop), G = W.parentNode, S !== void 0 && !Za && (Qa = Math.abs(S - B(n)[T])), v(), _(!0);
|
|
3079
3115
|
}
|
|
3080
3116
|
if (t.contains(W)) return _(!1);
|
|
3081
3117
|
}
|
|
@@ -3083,7 +3119,7 @@ Q.prototype = {
|
|
|
3083
3119
|
},
|
|
3084
3120
|
_ignoreWhileAnimating: null,
|
|
3085
3121
|
_offMoveEvents: function() {
|
|
3086
|
-
L(document, "mousemove", this._onTouchMove), L(document, "touchmove", this._onTouchMove), L(document, "pointermove", this._onTouchMove), L(document, "dragover",
|
|
3122
|
+
L(document, "mousemove", this._onTouchMove), L(document, "touchmove", this._onTouchMove), L(document, "pointermove", this._onTouchMove), L(document, "dragover", mo), L(document, "mousemove", mo), L(document, "touchmove", mo);
|
|
3087
3123
|
},
|
|
3088
3124
|
_offUpEvents: function() {
|
|
3089
3125
|
var e = this.el.ownerDocument;
|
|
@@ -3091,18 +3127,18 @@ Q.prototype = {
|
|
|
3091
3127
|
},
|
|
3092
3128
|
_onDrop: function(e) {
|
|
3093
3129
|
var t = this.el, n = this.options;
|
|
3094
|
-
if (Y =
|
|
3130
|
+
if (Y = da(W), Ia = da(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = da(W), Ia = da(W, n.draggable), Q.eventCanceled) {
|
|
3095
3131
|
this._nulling();
|
|
3096
3132
|
return;
|
|
3097
3133
|
}
|
|
3098
|
-
|
|
3134
|
+
Ra = !1, Za = !1, Xa = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Do(this.cloneId), Do(this._dragStartId), this.nativeDraggable && (L(document, "drop", this), L(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Zi && z(document.body, "user-select", ""), z(W, "transform", ""), e && (qa && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), K && K.parentNode && K.parentNode.removeChild(K), (q === G || X && X.lastPutMode !== "clone") && J && J.parentNode && J.parentNode.removeChild(J), W && (this.nativeDraggable && L(W, "dragend", this), vo(W), W.style["will-change"] = "", qa && !Ra && R(W, X ? X.options.ghostClass : this.options.ghostClass, !1), R(W, this.options.chosenClass, !1), U({
|
|
3099
3135
|
sortable: this,
|
|
3100
3136
|
name: "unchoose",
|
|
3101
3137
|
toEl: G,
|
|
3102
3138
|
newIndex: null,
|
|
3103
3139
|
newDraggableIndex: null,
|
|
3104
3140
|
originalEvent: e
|
|
3105
|
-
}), q === G ? Y !==
|
|
3141
|
+
}), q === G ? Y !== Pa && Y >= 0 && (U({
|
|
3106
3142
|
sortable: this,
|
|
3107
3143
|
name: "update",
|
|
3108
3144
|
toEl: G,
|
|
@@ -3134,7 +3170,7 @@ Q.prototype = {
|
|
|
3134
3170
|
name: "sort",
|
|
3135
3171
|
toEl: G,
|
|
3136
3172
|
originalEvent: e
|
|
3137
|
-
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y =
|
|
3173
|
+
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = Pa, Ia = Fa), U({
|
|
3138
3174
|
sortable: this,
|
|
3139
3175
|
name: "end",
|
|
3140
3176
|
toEl: G,
|
|
@@ -3142,9 +3178,9 @@ Q.prototype = {
|
|
|
3142
3178
|
}), this.save()))), this._nulling();
|
|
3143
3179
|
},
|
|
3144
3180
|
_nulling: function() {
|
|
3145
|
-
H("nulling", this), q = W = G = K =
|
|
3181
|
+
H("nulling", this), q = W = G = K = ja = J = Ma = Na = Va = Ha = qa = Y = Ia = Pa = Fa = Ja = Ya = X = La = Q.dragged = Q.ghost = Q.clone = Q.active = null, to.forEach(function(e) {
|
|
3146
3182
|
e.checked = !0;
|
|
3147
|
-
}),
|
|
3183
|
+
}), to.length = Ua = Wa = 0;
|
|
3148
3184
|
},
|
|
3149
3185
|
handleEvent: function(e) {
|
|
3150
3186
|
switch (e.type) {
|
|
@@ -3154,7 +3190,7 @@ Q.prototype = {
|
|
|
3154
3190
|
break;
|
|
3155
3191
|
case "dragenter":
|
|
3156
3192
|
case "dragover":
|
|
3157
|
-
W && (this._onDragOver(e),
|
|
3193
|
+
W && (this._onDragOver(e), go(e));
|
|
3158
3194
|
break;
|
|
3159
3195
|
case "selectstart":
|
|
3160
3196
|
e.preventDefault();
|
|
@@ -3162,14 +3198,14 @@ Q.prototype = {
|
|
|
3162
3198
|
}
|
|
3163
3199
|
},
|
|
3164
3200
|
toArray: function() {
|
|
3165
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3201
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], ra(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || wo(t));
|
|
3166
3202
|
return e;
|
|
3167
3203
|
},
|
|
3168
3204
|
sort: function(e, t) {
|
|
3169
3205
|
var n = {}, r = this.el;
|
|
3170
3206
|
this.toArray().forEach(function(e, t) {
|
|
3171
3207
|
var i = r.children[t];
|
|
3172
|
-
|
|
3208
|
+
ra(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3173
3209
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3174
3210
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3175
3211
|
}), t && this.animateAll();
|
|
@@ -3179,25 +3215,25 @@ Q.prototype = {
|
|
|
3179
3215
|
e && e.set && e.set(this);
|
|
3180
3216
|
},
|
|
3181
3217
|
closest: function(e, t) {
|
|
3182
|
-
return
|
|
3218
|
+
return ra(e, t || this.options.draggable, this.el, !1);
|
|
3183
3219
|
},
|
|
3184
3220
|
option: function(e, t) {
|
|
3185
3221
|
var n = this.options;
|
|
3186
3222
|
if (t === void 0) return n[e];
|
|
3187
|
-
var r =
|
|
3188
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
3223
|
+
var r = Oa.modifyOption(this, e, t);
|
|
3224
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && uo(n);
|
|
3189
3225
|
},
|
|
3190
3226
|
destroy: function() {
|
|
3191
3227
|
H("destroy", this);
|
|
3192
3228
|
var e = this.el;
|
|
3193
3229
|
e[V] = null, L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart), L(e, "pointerdown", this._onTapStart), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3194
3230
|
e.removeAttribute("draggable");
|
|
3195
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3231
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Ba.splice(Ba.indexOf(this.el), 1), this.el = e = null;
|
|
3196
3232
|
},
|
|
3197
3233
|
_hideClone: function() {
|
|
3198
|
-
if (!
|
|
3234
|
+
if (!Na) {
|
|
3199
3235
|
if (H("hideClone", this), Q.eventCanceled) return;
|
|
3200
|
-
z(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J),
|
|
3236
|
+
z(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Na = !0;
|
|
3201
3237
|
}
|
|
3202
3238
|
},
|
|
3203
3239
|
_showClone: function(e) {
|
|
@@ -3205,99 +3241,99 @@ Q.prototype = {
|
|
|
3205
3241
|
this._hideClone();
|
|
3206
3242
|
return;
|
|
3207
3243
|
}
|
|
3208
|
-
if (
|
|
3244
|
+
if (Na) {
|
|
3209
3245
|
if (H("showClone", this), Q.eventCanceled) return;
|
|
3210
|
-
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) :
|
|
3246
|
+
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : ja ? q.insertBefore(J, ja) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), z(J, "display", ""), Na = !1;
|
|
3211
3247
|
}
|
|
3212
3248
|
}
|
|
3213
3249
|
};
|
|
3214
|
-
function
|
|
3250
|
+
function go(e) {
|
|
3215
3251
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3216
3252
|
}
|
|
3217
|
-
function
|
|
3253
|
+
function _o(e, t, n, r, i, a, o, s) {
|
|
3218
3254
|
var c, l = e[V], u = l.options.onMove, d;
|
|
3219
|
-
return window.CustomEvent && !
|
|
3255
|
+
return window.CustomEvent && !Ji && !Yi ? c = new CustomEvent("move", {
|
|
3220
3256
|
bubbles: !0,
|
|
3221
3257
|
cancelable: !0
|
|
3222
3258
|
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || B(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3223
3259
|
}
|
|
3224
|
-
function
|
|
3260
|
+
function vo(e) {
|
|
3225
3261
|
e.draggable = !1;
|
|
3226
3262
|
}
|
|
3227
|
-
function
|
|
3228
|
-
|
|
3263
|
+
function yo() {
|
|
3264
|
+
eo = !1;
|
|
3229
3265
|
}
|
|
3230
|
-
function
|
|
3231
|
-
var r = B(
|
|
3266
|
+
function bo(e, t, n) {
|
|
3267
|
+
var r = B(la(n.el, 0, n.options, !0)), i = Sa(n.el, n.options, K), a = 10;
|
|
3232
3268
|
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;
|
|
3233
3269
|
}
|
|
3234
|
-
function
|
|
3235
|
-
var r = B(
|
|
3270
|
+
function xo(e, t, n) {
|
|
3271
|
+
var r = B(ua(n.el, n.options.draggable)), i = Sa(n.el, n.options, K), a = 10;
|
|
3236
3272
|
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;
|
|
3237
3273
|
}
|
|
3238
|
-
function
|
|
3274
|
+
function So(e, t, n, r, i, a, o, s) {
|
|
3239
3275
|
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;
|
|
3240
3276
|
if (!o) {
|
|
3241
|
-
if (s &&
|
|
3242
|
-
if (!
|
|
3243
|
-
else if (
|
|
3244
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3277
|
+
if (s && Qa < l * i) {
|
|
3278
|
+
if (!Xa && (Ya === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Xa = !0), Xa) f = !0;
|
|
3279
|
+
else if (Ya === 1 ? c < u + Qa : c > d - Qa) return -Ya;
|
|
3280
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Co(t);
|
|
3245
3281
|
}
|
|
3246
3282
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3247
3283
|
}
|
|
3248
|
-
function
|
|
3249
|
-
return
|
|
3284
|
+
function Co(e) {
|
|
3285
|
+
return da(W) < da(e) ? 1 : -1;
|
|
3250
3286
|
}
|
|
3251
|
-
function
|
|
3287
|
+
function wo(e) {
|
|
3252
3288
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3253
3289
|
return r.toString(36);
|
|
3254
3290
|
}
|
|
3255
|
-
function
|
|
3256
|
-
|
|
3291
|
+
function To(e) {
|
|
3292
|
+
to.length = 0;
|
|
3257
3293
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3258
3294
|
var r = t[n];
|
|
3259
|
-
r.checked &&
|
|
3295
|
+
r.checked && to.push(r);
|
|
3260
3296
|
}
|
|
3261
3297
|
}
|
|
3262
|
-
function
|
|
3298
|
+
function Eo(e) {
|
|
3263
3299
|
return setTimeout(e, 0);
|
|
3264
3300
|
}
|
|
3265
|
-
function
|
|
3301
|
+
function Do(e) {
|
|
3266
3302
|
return clearTimeout(e);
|
|
3267
3303
|
}
|
|
3268
|
-
|
|
3269
|
-
(Q.active ||
|
|
3304
|
+
no && I(document, "touchmove", function(e) {
|
|
3305
|
+
(Q.active || Ra) && e.cancelable && e.preventDefault();
|
|
3270
3306
|
}), Q.utils = {
|
|
3271
3307
|
on: I,
|
|
3272
3308
|
off: L,
|
|
3273
3309
|
css: z,
|
|
3274
|
-
find:
|
|
3310
|
+
find: oa,
|
|
3275
3311
|
is: function(e, t) {
|
|
3276
|
-
return !!
|
|
3312
|
+
return !!ra(e, t, e, !1);
|
|
3277
3313
|
},
|
|
3278
|
-
extend:
|
|
3279
|
-
throttle:
|
|
3280
|
-
closest:
|
|
3314
|
+
extend: ha,
|
|
3315
|
+
throttle: va,
|
|
3316
|
+
closest: ra,
|
|
3281
3317
|
toggleClass: R,
|
|
3282
|
-
clone:
|
|
3283
|
-
index:
|
|
3284
|
-
nextTick:
|
|
3285
|
-
cancelNextTick:
|
|
3286
|
-
detectDirection:
|
|
3287
|
-
getChild:
|
|
3318
|
+
clone: xa,
|
|
3319
|
+
index: da,
|
|
3320
|
+
nextTick: Eo,
|
|
3321
|
+
cancelNextTick: Do,
|
|
3322
|
+
detectDirection: so,
|
|
3323
|
+
getChild: la
|
|
3288
3324
|
}, Q.get = function(e) {
|
|
3289
3325
|
return e[V];
|
|
3290
3326
|
}, Q.mount = function() {
|
|
3291
3327
|
var e = [...arguments];
|
|
3292
3328
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3293
3329
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3294
|
-
e.utils && (Q.utils =
|
|
3330
|
+
e.utils && (Q.utils = Bi(Bi({}, Q.utils), e.utils)), Oa.mount(e);
|
|
3295
3331
|
});
|
|
3296
3332
|
}, Q.create = function(e, t) {
|
|
3297
3333
|
return new Q(e, t);
|
|
3298
|
-
}, Q.version =
|
|
3299
|
-
var $ = [],
|
|
3300
|
-
function
|
|
3334
|
+
}, Q.version = Ki;
|
|
3335
|
+
var $ = [], Oo, ko, Ao = !1, jo, Mo, No, Po;
|
|
3336
|
+
function Fo() {
|
|
3301
3337
|
function e() {
|
|
3302
3338
|
for (var e in this.defaults = {
|
|
3303
3339
|
scroll: !0,
|
|
@@ -3317,63 +3353,63 @@ function Mo() {
|
|
|
3317
3353
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3318
3354
|
},
|
|
3319
3355
|
drop: function() {
|
|
3320
|
-
this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3356
|
+
this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)), Lo(), Io(), ya();
|
|
3321
3357
|
},
|
|
3322
3358
|
nulling: function() {
|
|
3323
|
-
|
|
3359
|
+
No = ko = Oo = Ao = Po = jo = Mo = null, $.length = 0;
|
|
3324
3360
|
},
|
|
3325
3361
|
_handleFallbackAutoScroll: function(e) {
|
|
3326
3362
|
this._handleAutoScroll(e, !0);
|
|
3327
3363
|
},
|
|
3328
3364
|
_handleAutoScroll: function(e, t) {
|
|
3329
3365
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3330
|
-
if (
|
|
3331
|
-
|
|
3332
|
-
var o =
|
|
3333
|
-
|
|
3334
|
-
var a =
|
|
3335
|
-
a !== o && (o = a,
|
|
3336
|
-
}, 10),
|
|
3366
|
+
if (No = e, t || this.options.forceAutoScrollFallback || Yi || Ji || Zi) {
|
|
3367
|
+
Ro(e, this.options, a, t);
|
|
3368
|
+
var o = ma(a, !0);
|
|
3369
|
+
Ao && (!Po || r !== jo || i !== Mo) && (Po && Lo(), Po = setInterval(function() {
|
|
3370
|
+
var a = ma(document.elementFromPoint(r, i), !0);
|
|
3371
|
+
a !== o && (o = a, Io()), Ro(e, n.options, a, t);
|
|
3372
|
+
}, 10), jo = r, Mo = i);
|
|
3337
3373
|
} else {
|
|
3338
|
-
if (!this.options.bubbleScroll ||
|
|
3339
|
-
|
|
3374
|
+
if (!this.options.bubbleScroll || ma(a, !0) === sa()) {
|
|
3375
|
+
Io();
|
|
3340
3376
|
return;
|
|
3341
3377
|
}
|
|
3342
|
-
|
|
3378
|
+
Ro(e, this.options, ma(a, !1), !1);
|
|
3343
3379
|
}
|
|
3344
3380
|
}
|
|
3345
|
-
},
|
|
3381
|
+
}, Ui(e, {
|
|
3346
3382
|
pluginName: "scroll",
|
|
3347
3383
|
initializeByDefault: !0
|
|
3348
3384
|
});
|
|
3349
3385
|
}
|
|
3350
|
-
function
|
|
3386
|
+
function Io() {
|
|
3351
3387
|
$.forEach(function(e) {
|
|
3352
3388
|
clearInterval(e.pid);
|
|
3353
3389
|
}), $ = [];
|
|
3354
3390
|
}
|
|
3355
|
-
function
|
|
3356
|
-
clearInterval(
|
|
3391
|
+
function Lo() {
|
|
3392
|
+
clearInterval(Po);
|
|
3357
3393
|
}
|
|
3358
|
-
var
|
|
3394
|
+
var Ro = va(function(e, t, n, r) {
|
|
3359
3395
|
if (t.scroll) {
|
|
3360
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3361
|
-
|
|
3362
|
-
var d = 0, f =
|
|
3396
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = sa(), l = !1, u;
|
|
3397
|
+
ko !== n && (ko = n, Io(), Oo = t.scroll, u = t.scrollFn, Oo === !0 && (Oo = ma(n, !0)));
|
|
3398
|
+
var d = 0, f = Oo;
|
|
3363
3399
|
do {
|
|
3364
3400
|
var p = f, m = B(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = z(p), E = p.scrollLeft, D = p.scrollTop;
|
|
3365
3401
|
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"));
|
|
3366
3402
|
var O = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), k = S && (Math.abs(g - a) <= o && D + b < w) - (Math.abs(h - a) <= o && !!D);
|
|
3367
3403
|
if (!$[d]) for (var ee = 0; ee <= d; ee++) $[ee] || ($[ee] = {});
|
|
3368
3404
|
($[d].vx != O || $[d].vy != k || $[d].el !== p) && ($[d].el = p, $[d].vx = O, $[d].vy = k, clearInterval($[d].pid), (O != 0 || k != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
3369
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3405
|
+
r && this.layer === 0 && Q.active._onTouchMove(No);
|
|
3370
3406
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3371
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e,
|
|
3407
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, No, $[this.layer].el) !== "continue" || ba($[this.layer].el, n, t);
|
|
3372
3408
|
}.bind({ layer: d }), 24))), d++;
|
|
3373
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3374
|
-
|
|
3409
|
+
} while (t.bubbleScroll && f !== c && (f = ma(f, !1)));
|
|
3410
|
+
Ao = l;
|
|
3375
3411
|
}
|
|
3376
|
-
}, 30),
|
|
3412
|
+
}, 30), zo = function(e) {
|
|
3377
3413
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3378
3414
|
if (t) {
|
|
3379
3415
|
var c = n || i;
|
|
@@ -3385,8 +3421,8 @@ var Fo = ha(function(e, t, n, r) {
|
|
|
3385
3421
|
}));
|
|
3386
3422
|
}
|
|
3387
3423
|
};
|
|
3388
|
-
function
|
|
3389
|
-
|
|
3424
|
+
function Bo() {}
|
|
3425
|
+
Bo.prototype = {
|
|
3390
3426
|
startIndex: null,
|
|
3391
3427
|
dragStart: function(e) {
|
|
3392
3428
|
var t = e.oldDraggableIndex;
|
|
@@ -3395,72 +3431,72 @@ Lo.prototype = {
|
|
|
3395
3431
|
onSpill: function(e) {
|
|
3396
3432
|
var t = e.dragEl, n = e.putSortable;
|
|
3397
3433
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3398
|
-
var r =
|
|
3434
|
+
var r = la(this.sortable.el, this.startIndex, this.options);
|
|
3399
3435
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3400
3436
|
},
|
|
3401
|
-
drop:
|
|
3402
|
-
},
|
|
3403
|
-
function
|
|
3404
|
-
|
|
3437
|
+
drop: zo
|
|
3438
|
+
}, Ui(Bo, { pluginName: "revertOnSpill" });
|
|
3439
|
+
function Vo() {}
|
|
3440
|
+
Vo.prototype = {
|
|
3405
3441
|
onSpill: function(e) {
|
|
3406
3442
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3407
3443
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3408
3444
|
},
|
|
3409
|
-
drop:
|
|
3410
|
-
},
|
|
3411
|
-
function
|
|
3445
|
+
drop: zo
|
|
3446
|
+
}, Ui(Vo, { pluginName: "removeOnSpill" }), Q.mount(new Fo()), Q.mount(Vo, Bo);
|
|
3447
|
+
function Ho(e) {
|
|
3412
3448
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3413
3449
|
}
|
|
3414
|
-
function
|
|
3450
|
+
function Uo(e) {
|
|
3415
3451
|
re() && r(e);
|
|
3416
3452
|
}
|
|
3417
|
-
function
|
|
3453
|
+
function Wo(e) {
|
|
3418
3454
|
re() ? a(e) : ie(e);
|
|
3419
3455
|
}
|
|
3420
|
-
var
|
|
3421
|
-
function
|
|
3422
|
-
|
|
3456
|
+
var Go = null, Ko = null;
|
|
3457
|
+
function qo(e = null, t = null) {
|
|
3458
|
+
Go = e, Ko = t;
|
|
3423
3459
|
}
|
|
3424
|
-
function
|
|
3460
|
+
function Jo() {
|
|
3425
3461
|
return {
|
|
3426
|
-
data:
|
|
3427
|
-
clonedData:
|
|
3462
|
+
data: Go,
|
|
3463
|
+
clonedData: Ko
|
|
3428
3464
|
};
|
|
3429
3465
|
}
|
|
3430
|
-
var
|
|
3431
|
-
function
|
|
3466
|
+
var Yo = Symbol("cloneElement");
|
|
3467
|
+
function Xo(...e) {
|
|
3432
3468
|
let t = re()?.proxy, n = null, r = e[0], [, i, a] = e;
|
|
3433
3469
|
Array.isArray(k(i)) || (a = i, i = null);
|
|
3434
|
-
let o = null, { immediate: s = !0, clone: l =
|
|
3470
|
+
let o = null, { immediate: s = !0, clone: l = Ho, forceFallback: u, fallbackOnBody: d, customUpdate: f } = k(a) ?? {};
|
|
3435
3471
|
function p(e) {
|
|
3436
3472
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3437
3473
|
n = u && !d ? o.slice(0, -1) : o;
|
|
3438
3474
|
let s = k(k(i)?.[r]), c = l(s);
|
|
3439
|
-
|
|
3475
|
+
qo(s, c), a[Yo] = c;
|
|
3440
3476
|
}
|
|
3441
3477
|
function m(e) {
|
|
3442
|
-
let t = e.item[
|
|
3443
|
-
if (!
|
|
3444
|
-
if (
|
|
3478
|
+
let t = e.item[Yo];
|
|
3479
|
+
if (!Oi(t)) {
|
|
3480
|
+
if (ji(e.item), g(i)) {
|
|
3445
3481
|
let n = [...k(i)];
|
|
3446
|
-
i.value =
|
|
3482
|
+
i.value = Di(n, e.newDraggableIndex, t);
|
|
3447
3483
|
return;
|
|
3448
3484
|
}
|
|
3449
|
-
|
|
3485
|
+
Di(k(i), e.newDraggableIndex, t);
|
|
3450
3486
|
}
|
|
3451
3487
|
}
|
|
3452
3488
|
function h(e) {
|
|
3453
3489
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3454
|
-
if (
|
|
3455
|
-
|
|
3490
|
+
if (Ai(t, n, r), o === "clone") {
|
|
3491
|
+
ji(s);
|
|
3456
3492
|
return;
|
|
3457
3493
|
}
|
|
3458
3494
|
if (g(i)) {
|
|
3459
3495
|
let e = [...k(i)];
|
|
3460
|
-
i.value =
|
|
3496
|
+
i.value = Ei(e, a);
|
|
3461
3497
|
return;
|
|
3462
3498
|
}
|
|
3463
|
-
|
|
3499
|
+
Ei(k(i), a);
|
|
3464
3500
|
}
|
|
3465
3501
|
function _(e) {
|
|
3466
3502
|
if (f) {
|
|
@@ -3468,12 +3504,12 @@ function qo(...e) {
|
|
|
3468
3504
|
return;
|
|
3469
3505
|
}
|
|
3470
3506
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3471
|
-
if (
|
|
3507
|
+
if (ji(n), Ai(t, n, r), g(i)) {
|
|
3472
3508
|
let e = [...k(i)];
|
|
3473
|
-
i.value =
|
|
3509
|
+
i.value = Ci(e, a, o);
|
|
3474
3510
|
return;
|
|
3475
3511
|
}
|
|
3476
|
-
|
|
3512
|
+
Ci(k(i), a, o);
|
|
3477
3513
|
}
|
|
3478
3514
|
function v(e) {
|
|
3479
3515
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -3492,7 +3528,7 @@ function qo(...e) {
|
|
|
3492
3528
|
n = null;
|
|
3493
3529
|
}
|
|
3494
3530
|
ie(() => {
|
|
3495
|
-
if (
|
|
3531
|
+
if (qo(), o) throw o;
|
|
3496
3532
|
});
|
|
3497
3533
|
}
|
|
3498
3534
|
let y = {
|
|
@@ -3504,19 +3540,19 @@ function qo(...e) {
|
|
|
3504
3540
|
};
|
|
3505
3541
|
function b(e) {
|
|
3506
3542
|
let n = k(r);
|
|
3507
|
-
return e ||=
|
|
3543
|
+
return e ||= ki(n) ? Mi(n, t?.$el) : n, e && !Fi(e) && (e = e.$el), e || Si("Root element not found"), e;
|
|
3508
3544
|
}
|
|
3509
3545
|
function x() {
|
|
3510
|
-
let e = k(a) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3511
|
-
return
|
|
3512
|
-
|
|
3513
|
-
}),
|
|
3546
|
+
let e = k(a) ?? {}, { immediate: t, clone: n } = e, r = yi(e, ["immediate", "clone"]);
|
|
3547
|
+
return Ii(r, (e, t) => {
|
|
3548
|
+
Li(e) && (r[e] = (e, ...n) => (Ri(e, Jo()), t(e, ...n)));
|
|
3549
|
+
}), Pi(i === null ? {} : y, r);
|
|
3514
3550
|
}
|
|
3515
3551
|
let S = (e) => {
|
|
3516
3552
|
e = b(e), o && C.destroy(), o = new Q(e, x());
|
|
3517
3553
|
};
|
|
3518
3554
|
c(() => a, () => {
|
|
3519
|
-
o &&
|
|
3555
|
+
o && Ii(x(), (e, t) => {
|
|
3520
3556
|
o?.option(e, t);
|
|
3521
3557
|
});
|
|
3522
3558
|
}, { deep: !0 });
|
|
@@ -3529,15 +3565,15 @@ function qo(...e) {
|
|
|
3529
3565
|
toArray: () => o?.toArray(),
|
|
3530
3566
|
closest: (...e) => o?.closest(...e)
|
|
3531
3567
|
};
|
|
3532
|
-
return
|
|
3568
|
+
return Wo(() => {
|
|
3533
3569
|
s && S();
|
|
3534
|
-
}),
|
|
3570
|
+
}), Uo(C.destroy), vi({
|
|
3535
3571
|
start: S,
|
|
3536
3572
|
pause: () => C?.option("disabled", !0),
|
|
3537
3573
|
resume: () => C?.option("disabled", !1)
|
|
3538
3574
|
}, C);
|
|
3539
3575
|
}
|
|
3540
|
-
var
|
|
3576
|
+
var Zo = [
|
|
3541
3577
|
"update",
|
|
3542
3578
|
"start",
|
|
3543
3579
|
"add",
|
|
@@ -3550,7 +3586,7 @@ var Jo = [
|
|
|
3550
3586
|
"clone",
|
|
3551
3587
|
"move",
|
|
3552
3588
|
"change"
|
|
3553
|
-
],
|
|
3589
|
+
], Qo = y({
|
|
3554
3590
|
name: "VueDraggable",
|
|
3555
3591
|
model: {
|
|
3556
3592
|
prop: "modelValue",
|
|
@@ -3600,37 +3636,37 @@ var Jo = [
|
|
|
3600
3636
|
"tag",
|
|
3601
3637
|
"target",
|
|
3602
3638
|
"customUpdate",
|
|
3603
|
-
...
|
|
3639
|
+
...Zo.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3604
3640
|
],
|
|
3605
|
-
emits: ["update:modelValue", ...
|
|
3641
|
+
emits: ["update:modelValue", ...Zo],
|
|
3606
3642
|
setup(t, { slots: n, emit: r, expose: i, attrs: a }) {
|
|
3607
|
-
let o =
|
|
3643
|
+
let o = Zo.reduce((e, t) => {
|
|
3608
3644
|
let n = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3609
3645
|
return e[n] = (...e) => r(t, ...e), e;
|
|
3610
3646
|
}, {}), s = j(() => {
|
|
3611
|
-
let n = e(t), { modelValue: r } = n, i =
|
|
3647
|
+
let n = e(t), { modelValue: r } = n, i = yi(n, ["modelValue"]), s = Object.entries(i).reduce((e, [t, n]) => {
|
|
3612
3648
|
let r = k(n);
|
|
3613
3649
|
return r !== void 0 && (e[t] = r), e;
|
|
3614
3650
|
}, {});
|
|
3615
|
-
return
|
|
3651
|
+
return vi(vi({}, o), Ti(vi(vi({}, a), s)));
|
|
3616
3652
|
}), c = j({
|
|
3617
3653
|
get: () => t.modelValue,
|
|
3618
3654
|
set: (e) => r("update:modelValue", e)
|
|
3619
|
-
}), l = _(), u = ee(
|
|
3655
|
+
}), l = _(), u = ee(Xo(t.target || l, c, s));
|
|
3620
3656
|
return i(u), () => ae(t.tag || "div", { ref: l }, (n?.default)?.call(n, u));
|
|
3621
3657
|
}
|
|
3622
|
-
}),
|
|
3658
|
+
}), $o = {
|
|
3623
3659
|
mounted: "mounted",
|
|
3624
3660
|
unmounted: "unmounted"
|
|
3625
3661
|
};
|
|
3626
|
-
|
|
3662
|
+
$o.mounted, $o.unmounted;
|
|
3627
3663
|
//#endregion
|
|
3628
3664
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3629
|
-
var
|
|
3665
|
+
var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
3630
3666
|
key: 0,
|
|
3631
3667
|
"data-testid": "section-drop-hint",
|
|
3632
3668
|
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)]"
|
|
3633
|
-
},
|
|
3669
|
+
}, rs = /* @__PURE__ */ y({
|
|
3634
3670
|
__name: "SectionBlock",
|
|
3635
3671
|
props: {
|
|
3636
3672
|
block: {},
|
|
@@ -3638,12 +3674,12 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3638
3674
|
},
|
|
3639
3675
|
setup(e) {
|
|
3640
3676
|
let n = {
|
|
3641
|
-
title:
|
|
3642
|
-
paragraph:
|
|
3643
|
-
image:
|
|
3677
|
+
title: di,
|
|
3678
|
+
paragraph: qr,
|
|
3679
|
+
image: Pr,
|
|
3644
3680
|
button: Sn,
|
|
3645
|
-
divider:
|
|
3646
|
-
custom:
|
|
3681
|
+
divider: hr,
|
|
3682
|
+
custom: pr
|
|
3647
3683
|
}, r = e, { t: a } = Tt(), s = et(ht, "SectionBlock"), c = N(bt, null), l = N(_t, null), u = j(() => {
|
|
3648
3684
|
switch (r.block.columns) {
|
|
3649
3685
|
case "2": return ["50%", "50%"];
|
|
@@ -3670,7 +3706,7 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3670
3706
|
i[e] = n, s.updateBlock(r.block.id, { children: i });
|
|
3671
3707
|
}
|
|
3672
3708
|
function v(e) {
|
|
3673
|
-
return
|
|
3709
|
+
return Jr(e, l, n);
|
|
3674
3710
|
}
|
|
3675
3711
|
function y(e, t) {
|
|
3676
3712
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
@@ -3678,16 +3714,16 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3678
3714
|
dataSourceFetched: t.dataSourceFetched
|
|
3679
3715
|
});
|
|
3680
3716
|
}
|
|
3681
|
-
return (n, r) => (f(), x("div",
|
|
3717
|
+
return (n, r) => (f(), x("div", es, [b("div", ts, [(f(!0), x(A, null, t(h.value, (n, r) => (f(), x("div", {
|
|
3682
3718
|
key: r,
|
|
3683
3719
|
class: o(["tpl:relative tpl:min-h-[60px] tpl:rounded", g(r).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3684
3720
|
style: i({ width: u.value[r] })
|
|
3685
|
-
}, [w(k(
|
|
3721
|
+
}, [w(k(Qo), {
|
|
3686
3722
|
"model-value": g(r),
|
|
3687
3723
|
group: {
|
|
3688
3724
|
name: "blocks",
|
|
3689
3725
|
pull: !0,
|
|
3690
|
-
put: (e, t, n) => k(
|
|
3726
|
+
put: (e, t, n) => k(fi)(n)
|
|
3691
3727
|
},
|
|
3692
3728
|
animation: 150,
|
|
3693
3729
|
"ghost-class": "tpl-ghost",
|
|
@@ -3700,7 +3736,7 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3700
3736
|
class: "tpl:min-h-[60px]",
|
|
3701
3737
|
"onUpdate:modelValue": (e) => _(r, e)
|
|
3702
3738
|
}, {
|
|
3703
|
-
default: m(() => [(f(!0), x(A, null, t(g(r), (t) => oe((f(), x("div", { key: t.id }, [w(
|
|
3739
|
+
default: m(() => [(f(!0), x(A, null, t(g(r), (t) => oe((f(), x("div", { key: t.id }, [w(li, {
|
|
3704
3740
|
block: t,
|
|
3705
3741
|
"is-selected": k(s).state.selectedBlockId === t.id,
|
|
3706
3742
|
viewport: e.viewport,
|
|
@@ -3731,13 +3767,13 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3731
3767
|
"model-value",
|
|
3732
3768
|
"group",
|
|
3733
3769
|
"onUpdate:modelValue"
|
|
3734
|
-
]), g(r).length === 0 ? (f(), x("div",
|
|
3770
|
+
]), g(r).length === 0 ? (f(), x("div", ns, [b("span", null, p(k(a).section.dropHere), 1)])) : M("", !0)], 6))), 128))])]));
|
|
3735
3771
|
}
|
|
3736
|
-
}),
|
|
3772
|
+
}), is = ke, as = {
|
|
3737
3773
|
small: 24,
|
|
3738
3774
|
medium: 32,
|
|
3739
3775
|
large: 48
|
|
3740
|
-
},
|
|
3776
|
+
}, os = [
|
|
3741
3777
|
"facebook",
|
|
3742
3778
|
"twitter",
|
|
3743
3779
|
"instagram",
|
|
@@ -3755,11 +3791,11 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3755
3791
|
"github",
|
|
3756
3792
|
"dribbble",
|
|
3757
3793
|
"behance"
|
|
3758
|
-
],
|
|
3794
|
+
], ss = [
|
|
3759
3795
|
"width",
|
|
3760
3796
|
"height",
|
|
3761
3797
|
"fill"
|
|
3762
|
-
],
|
|
3798
|
+
], cs = ["d"], ls = /* @__PURE__ */ y({
|
|
3763
3799
|
__name: "SocialIconSvg",
|
|
3764
3800
|
props: {
|
|
3765
3801
|
platform: {},
|
|
@@ -3767,7 +3803,7 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3767
3803
|
iconSize: {}
|
|
3768
3804
|
},
|
|
3769
3805
|
setup(e) {
|
|
3770
|
-
let t = e, n = j(() =>
|
|
3806
|
+
let t = e, n = j(() => is[t.platform]), r = j(() => as[t.iconSize]), a = j(() => {
|
|
3771
3807
|
let e = {
|
|
3772
3808
|
display: "inline-flex",
|
|
3773
3809
|
alignItems: "center",
|
|
@@ -3811,12 +3847,12 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3811
3847
|
viewBox: "0 0 24 24",
|
|
3812
3848
|
fill: s.value,
|
|
3813
3849
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3814
|
-
}, [b("path", { d: n.value.path }, null, 8,
|
|
3850
|
+
}, [b("path", { d: n.value.path }, null, 8, cs)], 8, ss))], 4));
|
|
3815
3851
|
}
|
|
3816
|
-
}),
|
|
3852
|
+
}), us = { class: "tpl:w-full" }, ds = ["href"], fs = {
|
|
3817
3853
|
key: 1,
|
|
3818
3854
|
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)]"
|
|
3819
|
-
},
|
|
3855
|
+
}, ps = /* @__PURE__ */ y({
|
|
3820
3856
|
__name: "SocialIconsBlock",
|
|
3821
3857
|
props: {
|
|
3822
3858
|
block: {},
|
|
@@ -3829,7 +3865,7 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3829
3865
|
gap: `${n.block.spacing}px`,
|
|
3830
3866
|
justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
|
|
3831
3867
|
})), o = j(() => n.block.icons.length > 0);
|
|
3832
|
-
return (n, s) => (f(), x("div",
|
|
3868
|
+
return (n, s) => (f(), x("div", us, [o.value ? (f(), x("div", {
|
|
3833
3869
|
key: 0,
|
|
3834
3870
|
style: i(a.value)
|
|
3835
3871
|
}, [(f(!0), x(A, null, t(e.block.icons, (t) => (f(), x("a", {
|
|
@@ -3837,7 +3873,7 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3837
3873
|
href: t.url || "#",
|
|
3838
3874
|
class: "tpl:cursor-default",
|
|
3839
3875
|
onClick: s[0] ||= P(() => {}, ["prevent"])
|
|
3840
|
-
}, [w(
|
|
3876
|
+
}, [w(ls, {
|
|
3841
3877
|
platform: t.platform,
|
|
3842
3878
|
"icon-style": e.block.iconStyle,
|
|
3843
3879
|
"icon-size": e.block.iconSize
|
|
@@ -3845,16 +3881,16 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3845
3881
|
"platform",
|
|
3846
3882
|
"icon-style",
|
|
3847
3883
|
"icon-size"
|
|
3848
|
-
])], 8,
|
|
3884
|
+
])], 8, ds))), 128))], 4)) : (f(), x("div", fs, [w(k(Nn), { size: 16 }), b("span", null, p(k(r).social.addIcons), 1)]))]));
|
|
3849
3885
|
}
|
|
3850
|
-
}),
|
|
3886
|
+
}), ms = { class: "tpl:w-full" }, hs = {
|
|
3851
3887
|
key: 0,
|
|
3852
3888
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3853
3889
|
style: {
|
|
3854
3890
|
"background-color": "var(--tpl-bg-hover)",
|
|
3855
3891
|
color: "var(--tpl-text-dim)"
|
|
3856
3892
|
}
|
|
3857
|
-
},
|
|
3893
|
+
}, gs = /* @__PURE__ */ y({
|
|
3858
3894
|
__name: "SpacerBlock",
|
|
3859
3895
|
props: {
|
|
3860
3896
|
block: {},
|
|
@@ -3866,23 +3902,23 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3866
3902
|
minHeight: `${t.block.height}px`,
|
|
3867
3903
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3868
3904
|
}));
|
|
3869
|
-
return (t, a) => (f(), x("div",
|
|
3905
|
+
return (t, a) => (f(), x("div", ms, [b("div", {
|
|
3870
3906
|
style: i(r.value),
|
|
3871
3907
|
class: o(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !k(n).state.previewMode }])
|
|
3872
|
-
}, [k(n).state.previewMode ? M("", !0) : (f(), x("span",
|
|
3908
|
+
}, [k(n).state.previewMode ? M("", !0) : (f(), x("span", hs, p(e.block.height) + "px ", 1))], 6)]));
|
|
3873
3909
|
}
|
|
3874
|
-
}),
|
|
3910
|
+
}), _s = { class: "tpl:w-full" }, vs = { key: 0 }, ys = [
|
|
3875
3911
|
"aria-label",
|
|
3876
3912
|
"data-placeholder",
|
|
3877
3913
|
"onBlur"
|
|
3878
|
-
],
|
|
3914
|
+
], bs = [
|
|
3879
3915
|
"aria-label",
|
|
3880
3916
|
"data-placeholder",
|
|
3881
3917
|
"onBlur"
|
|
3882
|
-
],
|
|
3918
|
+
], xs = {
|
|
3883
3919
|
key: 1,
|
|
3884
3920
|
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)]"
|
|
3885
|
-
},
|
|
3921
|
+
}, Ss = /*#__PURE__*/ Mt(/* @__PURE__ */ y({
|
|
3886
3922
|
__name: "TableBlock",
|
|
3887
3923
|
props: {
|
|
3888
3924
|
block: {},
|
|
@@ -3927,11 +3963,11 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3927
3963
|
} : n);
|
|
3928
3964
|
o.updateBlock(r.block.id, { rows: a });
|
|
3929
3965
|
}
|
|
3930
|
-
return (e, r) => (f(), x("div",
|
|
3966
|
+
return (e, r) => (f(), x("div", _s, [s.value ? (f(), x("table", {
|
|
3931
3967
|
key: 0,
|
|
3932
3968
|
style: i(c.value),
|
|
3933
3969
|
class: "tpl-table-editable"
|
|
3934
|
-
}, [d.value ? (f(), x("thead",
|
|
3970
|
+
}, [d.value ? (f(), x("thead", vs, [b("tr", null, [(f(!0), x(A, null, t(d.value.cells, (e) => oe((f(), x("th", {
|
|
3935
3971
|
key: e.id,
|
|
3936
3972
|
style: i(u.value),
|
|
3937
3973
|
"aria-label": k(a).table.cellPlaceholder,
|
|
@@ -3940,7 +3976,7 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3940
3976
|
onBlur: (t) => g(d.value.id, e.id, t),
|
|
3941
3977
|
onKeydown: r[0] ||= ce(P((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3942
3978
|
onClick: P(h, ["stop"])
|
|
3943
|
-
}, null, 44,
|
|
3979
|
+
}, null, 44, ys)), [[n, e.content]])), 128))])])) : M("", !0), b("tbody", null, [(f(!0), x(A, null, t(m.value, (e) => (f(), x("tr", { key: e.id }, [(f(!0), x(A, null, t(e.cells, (t) => oe((f(), x("td", {
|
|
3944
3980
|
key: t.id,
|
|
3945
3981
|
style: i(l.value),
|
|
3946
3982
|
"aria-label": k(a).table.cellPlaceholder,
|
|
@@ -3949,9 +3985,9 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3949
3985
|
onBlur: (n) => g(e.id, t.id, n),
|
|
3950
3986
|
onKeydown: r[1] ||= ce(P((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3951
3987
|
onClick: P(h, ["stop"])
|
|
3952
|
-
}, null, 44,
|
|
3988
|
+
}, null, 44, bs)), [[n, t.content]])), 128))]))), 128))])], 4)) : (f(), x("div", xs, [w(k(Pn), { size: 16 }), b("span", null, p(k(a).table.empty), 1)]))]));
|
|
3953
3989
|
}
|
|
3954
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
3990
|
+
}), [["__scopeId", "data-v-963ac422"]]), Cs = /* @__PURE__ */ y({
|
|
3955
3991
|
__name: "VideoPlayButton",
|
|
3956
3992
|
props: { hoverEffect: {
|
|
3957
3993
|
type: Boolean,
|
|
@@ -3969,7 +4005,7 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3969
4005
|
});
|
|
3970
4006
|
//#endregion
|
|
3971
4007
|
//#region src/utils/videoThumbnail.ts
|
|
3972
|
-
function
|
|
4008
|
+
function ws(e) {
|
|
3973
4009
|
if (!e) return {
|
|
3974
4010
|
platform: "unknown",
|
|
3975
4011
|
videoId: null,
|
|
@@ -4001,25 +4037,25 @@ function xs(e) {
|
|
|
4001
4037
|
thumbnailUrl: null
|
|
4002
4038
|
};
|
|
4003
4039
|
}
|
|
4004
|
-
function
|
|
4005
|
-
return t ||
|
|
4040
|
+
function Ts(e, t) {
|
|
4041
|
+
return t || ws(e).thumbnailUrl;
|
|
4006
4042
|
}
|
|
4007
4043
|
//#endregion
|
|
4008
4044
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4009
|
-
var
|
|
4045
|
+
var Es = ["src", "alt"], Ds = {
|
|
4010
4046
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4011
4047
|
style: { opacity: "0.7" }
|
|
4012
|
-
},
|
|
4048
|
+
}, Os = ["href"], ks = ["src", "alt"], As = ["src", "alt"], js = {
|
|
4013
4049
|
key: 3,
|
|
4014
4050
|
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)]"
|
|
4015
|
-
},
|
|
4051
|
+
}, Ms = /* @__PURE__ */ y({
|
|
4016
4052
|
__name: "VideoBlock",
|
|
4017
4053
|
props: {
|
|
4018
4054
|
block: {},
|
|
4019
4055
|
viewport: {}
|
|
4020
4056
|
},
|
|
4021
4057
|
setup(e) {
|
|
4022
|
-
let t = e, { t: n } = Tt(), { syntax: r } = Nt(), a = j(() => Ae(t.block.url, r) || Ae(t.block.thumbnailUrl, r)), o = j(() => a.value ? null :
|
|
4058
|
+
let t = e, { t: n } = Tt(), { syntax: r } = Nt(), a = j(() => Ae(t.block.url, r) || Ae(t.block.thumbnailUrl, r)), o = j(() => a.value ? null : Ts(t.block.url, t.block.thumbnailUrl)), s = j(() => ({ textAlign: t.block.align })), c = j(() => {
|
|
4023
4059
|
let e = t.block.align;
|
|
4024
4060
|
return {
|
|
4025
4061
|
maxWidth: "100%",
|
|
@@ -4040,7 +4076,7 @@ var Cs = ["src", "alt"], ws = {
|
|
|
4040
4076
|
class: "tpl:w-full tpl:border-0",
|
|
4041
4077
|
src: e.block.placeholderUrl,
|
|
4042
4078
|
alt: e.block.alt
|
|
4043
|
-
}, null, 8,
|
|
4079
|
+
}, null, 8, Es), w(Cs)], 4)) : a.value ? (f(), x("div", {
|
|
4044
4080
|
key: 1,
|
|
4045
4081
|
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)]",
|
|
4046
4082
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
|
|
@@ -4049,7 +4085,7 @@ var Cs = ["src", "alt"], ws = {
|
|
|
4049
4085
|
"stroke-width": 1.5,
|
|
4050
4086
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4051
4087
|
style: { opacity: "0.5" }
|
|
4052
|
-
}), b("span",
|
|
4088
|
+
}), b("span", Ds, [w(yn, { text: l.value }, null, 8, ["text"])])], 4)) : o.value ? (f(), x(A, { key: 2 }, [e.block.url ? (f(), x("a", {
|
|
4053
4089
|
key: 0,
|
|
4054
4090
|
href: e.block.url,
|
|
4055
4091
|
target: "_blank",
|
|
@@ -4061,7 +4097,7 @@ var Cs = ["src", "alt"], ws = {
|
|
|
4061
4097
|
class: "tpl:w-full tpl:border-0",
|
|
4062
4098
|
src: o.value,
|
|
4063
4099
|
alt: e.block.alt
|
|
4064
|
-
}, null, 8,
|
|
4100
|
+
}, null, 8, ks), w(Cs, { "hover-effect": "" })], 12, Os)) : (f(), x("div", {
|
|
4065
4101
|
key: 1,
|
|
4066
4102
|
class: "tpl:relative tpl:inline-block",
|
|
4067
4103
|
style: i(c.value)
|
|
@@ -4069,28 +4105,28 @@ var Cs = ["src", "alt"], ws = {
|
|
|
4069
4105
|
class: "tpl:w-full tpl:border-0",
|
|
4070
4106
|
src: o.value,
|
|
4071
4107
|
alt: e.block.alt
|
|
4072
|
-
}, null, 8,
|
|
4108
|
+
}, null, 8, As), w(Cs)], 4))], 64)) : (f(), x("div", js, [w(k(Fn), {
|
|
4073
4109
|
size: 40,
|
|
4074
4110
|
"stroke-width": 1.5,
|
|
4075
4111
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4076
4112
|
}), b("span", null, p(k(n).video.addVideo), 1)]))], 4));
|
|
4077
4113
|
}
|
|
4078
|
-
}),
|
|
4079
|
-
section:
|
|
4080
|
-
title:
|
|
4081
|
-
paragraph:
|
|
4082
|
-
image:
|
|
4114
|
+
}), Ns = {
|
|
4115
|
+
section: rs,
|
|
4116
|
+
title: di,
|
|
4117
|
+
paragraph: qr,
|
|
4118
|
+
image: Pr,
|
|
4083
4119
|
button: Sn,
|
|
4084
|
-
divider:
|
|
4085
|
-
video:
|
|
4086
|
-
social:
|
|
4087
|
-
menu:
|
|
4088
|
-
table:
|
|
4089
|
-
spacer:
|
|
4090
|
-
html:
|
|
4091
|
-
countdown: C(() => import("./CountdownBlock-
|
|
4120
|
+
divider: hr,
|
|
4121
|
+
video: Ms,
|
|
4122
|
+
social: ps,
|
|
4123
|
+
menu: Rr,
|
|
4124
|
+
table: Ss,
|
|
4125
|
+
spacer: gs,
|
|
4126
|
+
html: br,
|
|
4127
|
+
countdown: C(() => import("./CountdownBlock-173fiO5Z.js").then((e) => e.n))
|
|
4092
4128
|
};
|
|
4093
|
-
function
|
|
4129
|
+
function Ps(e) {
|
|
4094
4130
|
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Tt(r);
|
|
4095
4131
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
4096
4132
|
let { resolvedTheme: l } = rn(j(() => t.state.uiTheme)), d = _(n.theme ?? {}), { themeStyles: f } = on({
|
|
@@ -4122,9 +4158,9 @@ function js(e) {
|
|
|
4122
4158
|
t: a,
|
|
4123
4159
|
format: o
|
|
4124
4160
|
}), b = un();
|
|
4125
|
-
if (hn(b,
|
|
4161
|
+
if (hn(b, Ns), n.customBlocks?.length) for (let e of n.customBlocks) b.registerCustom(e, pr);
|
|
4126
4162
|
function x(e) {
|
|
4127
|
-
for (let t of e) b.registerCustom(t,
|
|
4163
|
+
for (let t of e) b.registerCustom(t, pr);
|
|
4128
4164
|
}
|
|
4129
4165
|
let S = Xt();
|
|
4130
4166
|
if (s() && u(S.dispose), e.containerEl) {
|
|
@@ -4179,4 +4215,4 @@ function js(e) {
|
|
|
4179
4215
|
};
|
|
4180
4216
|
}
|
|
4181
4217
|
//#endregion
|
|
4182
|
-
export {
|
|
4218
|
+
export { Nn as A, It as B, Jn as C, Vn as D, Hn as E, Tn as F, Sn as I, ln as L, An as M, Dn as N, Rn as O, En as P, tn as R, er as S, Un as T, br as _, ps as a, ir as b, Qo as c, Yr as d, Jr as f, Sr as g, Pr as h, gs as i, jn as j, Pn as k, di as l, Rr as m, Ms as n, os as o, qr as p, Ss as r, rs as s, Ps as t, li as u, hr as v, qn as w, nr as x, pr as y, Gt as z };
|