@templatical/editor 0.15.1 → 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/README.md +1 -1
- package/dist/{AiChatSidebar-BIKvYREk.js → AiChatSidebar-EaPCeDXr.js} +14 -14
- package/dist/{AiFeatureMenu-CU6kTMTf.js → AiFeatureMenu-Rb8G3EBo.js} +7 -7
- package/dist/{BlockIssueBadge-B3xVgMTh.js → BlockIssueBadge-CZYgn-qg.js} +5 -5
- package/dist/{CloudEditor-DRPxvUEj.js → CloudEditor-D88gLBXp.js} +25 -25
- package/dist/{CollaboratorBar-DMSjd3HZ.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-DWYK9nTk.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-CH2SUxBo.js → MergeTagSuggestion-DrT3LiZ4.js} +4 -4
- package/dist/{ModuleBrowserModal-BOzleijA.js → ModuleBrowserModal-l4_RCC8m.js} +11 -11
- package/dist/{ModulePreviewCanvas-Cg99Pbde.js → ModulePreviewCanvas-BqYAr4fz.js} +3 -3
- package/dist/NumberWithSuffix-Di-cDy_m.js +89 -0
- package/dist/{ParagraphEditor-8jnzoL0A.js → ParagraphEditor-DIQ1jmSP.js} +230 -195
- package/dist/{RichTextEditorContent-BqLHIZY7.js → RichTextEditorContent-DkTJ6KK8.js} +56 -45
- package/dist/{SaveModuleDialog-Cy2XyjYT.js → SaveModuleDialog-DPo3Raon.js} +8 -8
- package/dist/{SnapshotHistory-cfxmOsJu.js → SnapshotHistory-m7brKV7C.js} +10 -10
- package/dist/{TemplateScoringPanel-CZ62rGHz.js → TemplateScoringPanel-C8VOC6gn.js} +15 -15
- package/dist/{TestEmailModal-sr1MaMVX.js → TestEmailModal-BE9sFEIl.js} +6 -6
- package/dist/{TitleEditor-CvGTprIg.js → TitleEditor-BATN-k-Q.js} +38 -35
- package/dist/{TplModal-BtKB-0Bx.js → TplModal-DHBcZ1gq.js} +5 -5
- package/dist/{blockTypeIcons-BxEbbev5.js → blockTypeIcons-wRchKKx0.js} +7 -7
- package/dist/bundle-stats.json +7 -7
- package/dist/ca-B3eR47lE.js +559 -0
- package/dist/cdn/chunks/{AiFeatureMenu-fDUpv_-s.js → AiFeatureMenu-W7VQFAwq.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-fDUpv_-s.js.map → AiFeatureMenu-W7VQFAwq.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-Byce0j0W.js → BlockIssueBadge-ww2vNIfJ.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-Byce0j0W.js.map → BlockIssueBadge-ww2vNIfJ.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-B4m8ldiE.js → CloudEditor-BVSJ1kvB.js} +161 -161
- package/dist/cdn/chunks/{CloudEditor-B4m8ldiE.js.map → CloudEditor-BVSJ1kvB.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-LnLmjxw_.js → CollaboratorBar-BFrAua9a.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-LnLmjxw_.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-DxTuMRBM.js → CountdownBlock-MC-mhtQD.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-DxTuMRBM.js.map → CountdownBlock-MC-mhtQD.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DUrVfQZH.js → CountdownToolbar-dXyr7tz-.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-DUrVfQZH.js.map → CountdownToolbar-dXyr7tz-.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CHl90k4h.js → IssuesPanel-CTxSgViL.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-CHl90k4h.js.map → IssuesPanel-CTxSgViL.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-BsCAo4Co.js → MergeTagSuggestion-jesxS7An.js} +3 -3
- package/dist/cdn/chunks/{MergeTagSuggestion-BsCAo4Co.js.map → MergeTagSuggestion-jesxS7An.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DW0iQW0J.js → ModuleBrowserModal-B5sCsrud.js} +9 -9
- package/dist/cdn/chunks/{ModuleBrowserModal-DW0iQW0J.js.map → ModuleBrowserModal-B5sCsrud.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-Cxo8v8t1.js → ModulePreviewCanvas-DGTGo8kg.js} +11 -11
- package/dist/cdn/chunks/{ModulePreviewCanvas-Cxo8v8t1.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-iG5cDjH0.js → ParagraphEditor-CB5FGRs3.js} +213 -179
- package/dist/cdn/chunks/ParagraphEditor-CB5FGRs3.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DQpgeGMj.js → RichTextEditorContent-CPelbtck.js} +53 -42
- package/dist/cdn/chunks/RichTextEditorContent-CPelbtck.js.map +1 -0
- package/dist/cdn/chunks/{SaveModuleDialog-sJQXg2Mh.js → SaveModuleDialog-7f9uUUEC.js} +6 -6
- package/dist/cdn/chunks/{SaveModuleDialog-sJQXg2Mh.js.map → SaveModuleDialog-7f9uUUEC.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-C8qIn9Oi.js → TitleEditor-C0mYpgs4.js} +46 -43
- package/dist/cdn/chunks/TitleEditor-C0mYpgs4.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-DySnOpPo.js → blockTypeIcons-BtxaUtlx.js} +5 -5
- package/dist/cdn/chunks/{blockTypeIcons-DySnOpPo.js.map → blockTypeIcons-BtxaUtlx.js.map} +1 -1
- package/dist/cdn/chunks/ca-B3eR47lE.js +561 -0
- package/dist/cdn/chunks/ca-B3eR47lE.js.map +1 -0
- package/dist/cdn/chunks/ca-CNRWAMHI.js +89 -0
- package/dist/cdn/chunks/ca-CNRWAMHI.js.map +1 -0
- package/dist/{de-LsV0u1tP.js → cdn/chunks/de-Cy8FB-Ii.js} +7 -1
- 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/{en-Bb8X1bOs.js → cdn/chunks/en-Bu-zS_5o.js} +7 -1
- package/dist/cdn/chunks/en-Bu-zS_5o.js.map +1 -0
- package/dist/cdn/chunks/es-CD3ZD6hK.js +561 -0
- package/dist/cdn/chunks/es-CD3ZD6hK.js.map +1 -0
- package/dist/cdn/chunks/es-OgkdMZGX.js +89 -0
- package/dist/cdn/chunks/es-OgkdMZGX.js.map +1 -0
- package/dist/cdn/chunks/{extensions-C2pTX899.js → extensions-BJ7vaBol.js} +28 -28
- package/dist/cdn/chunks/{extensions-C2pTX899.js.map → extensions-BJ7vaBol.js.map} +1 -1
- package/dist/cdn/chunks/{features-CHE3YjQE.js → features-CgbSSCgv.js} +602 -566
- package/dist/cdn/chunks/features-CgbSSCgv.js.map +1 -0
- package/dist/cdn/chunks/{icons-M4uqBV-_.js → icons-Dlx5MT1V.js} +2 -2
- package/dist/cdn/chunks/{icons-M4uqBV-_.js.map → icons-Dlx5MT1V.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-Bqr15VN2.js → media-library-BMlykZGq.js} +104 -104
- package/dist/cdn/chunks/{media-library-Bqr15VN2.js.map → media-library-BMlykZGq.js.map} +1 -1
- package/dist/{pt-BR-BwJY_cvb.js → cdn/chunks/pt-BR-CgICL-CQ.js} +7 -1
- 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-DsVgXk_j.js.map +1 -0
- package/dist/cdn/chunks/{renderer-CyzTR1Vq.js → renderer-DPvEtVGO.js} +35 -38
- package/dist/cdn/chunks/renderer-DPvEtVGO.js.map +1 -0
- package/dist/cdn/chunks/{src-q-SBgWx7.js → src-CAdirukY.js} +109 -112
- package/dist/cdn/chunks/{src-q-SBgWx7.js.map → src-CAdirukY.js.map} +1 -1
- package/dist/cdn/chunks/{styles-PWISdaws.js → styles-D7u4vCpH.js} +877 -856
- package/dist/cdn/chunks/styles-D7u4vCpH.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-DF9PEiqH.js → tiptap-zpXk5mN4.js} +3278 -4992
- package/dist/cdn/chunks/tiptap-zpXk5mN4.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +75 -73
- 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-BQusL53H.js → cloud-BogxOeZu.js} +2 -2
- package/dist/{createLucideIcon-Dx-EjR9r.js → createLucideIcon-Bh9xOmlW.js} +3 -3
- package/dist/{cdn/chunks/de-LsV0u1tP.js → de-Cy8FB-Ii.js} +5 -3
- package/dist/dist-BE9m_i60.js +5 -0
- package/dist/{dist-BFmE-7hB.js → dist-BPPeDw62.js} +2 -2
- package/dist/{dist-BsCGIDSt.js → dist-BReUTadj.js} +4 -4
- package/dist/dist-BXR1aBJV.js +5 -0
- package/dist/{dist-CRsjOQM-.js → dist-Bm07Z3Es.js} +2 -2
- package/dist/{dist-BEWiuOMi.js → dist-CFOQvhSC.js} +3 -3
- package/dist/{dist-B5Sov3sS.js → dist-CHLoeloJ.js} +2 -2
- package/dist/{dist-COG3IdPK.js → dist-D1WmF8BF.js} +2 -2
- package/dist/{dist-itdjZraK.js → dist-D9g4CSnm.js} +1 -1
- package/dist/{dist-BMoa33wT.js → dist-DGEaAAIb.js} +2 -2
- package/dist/{dist-CTT6WYJ6.js → dist-DYv_Pttj.js} +2 -2
- package/dist/{dist-CQZxDvFw.js → dist-DcKlLQ8d.js} +2 -2
- package/dist/{dist-SXJJ2v41.js → dist-DhY2di4U.js} +2 -2
- package/dist/{dist-BibU4HNl.js → dist-DoRIUsfz.js} +2 -3
- package/dist/dist-i_Z7t67A.js +2594 -0
- package/dist/{cdn/chunks/en-Bb8X1bOs.js → en-Bu-zS_5o.js} +5 -3
- package/dist/es-CD3ZD6hK.js +559 -0
- package/dist/{extensions-DwaZAqm6.js → extensions-B2poxDIo.js} +8 -8
- 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/{cdn/chunks/pt-BR-BwJY_cvb.js → pt-BR-CgICL-CQ.js} +5 -3
- 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/style.css +1 -1
- package/dist/{styles-B2OrgEnn.js → styles-B-yhoJnH.js} +537 -516
- package/dist/templatical-editor.js +62 -60
- 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-DJeOXVxQ.js → useEditorCore-CV1ct_17.js} +628 -591
- package/dist/{useI18n-C-TDeJBt.js → useI18n-eR1yVW0v.js} +2 -2
- package/dist/{useMergeTag-DSrBY0-2.js → useMergeTag-C3GfSktg.js} +3 -3
- 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 +23 -23
- package/dist/NumberWithSuffix-CrA6quxx.js +0 -445
- package/dist/cdn/chunks/NumberWithSuffix-CnSRmUMK.js +0 -444
- package/dist/cdn/chunks/NumberWithSuffix-CnSRmUMK.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-iG5cDjH0.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-DQpgeGMj.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-C8qIn9Oi.js.map +0 -1
- package/dist/cdn/chunks/de-LsV0u1tP.js.map +0 -1
- package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +0 -1
- package/dist/cdn/chunks/en-Bb8X1bOs.js.map +0 -1
- package/dist/cdn/chunks/features-CHE3YjQE.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BwJY_cvb.js.map +0 -1
- package/dist/cdn/chunks/quality-DJZ_fqc2.js +0 -2176
- package/dist/cdn/chunks/quality-DJZ_fqc2.js.map +0 -1
- package/dist/cdn/chunks/renderer-CyzTR1Vq.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-lGobwiLH.js +0 -57
- package/dist/cdn/chunks/styleConstants-lGobwiLH.js.map +0 -1
- package/dist/cdn/chunks/styles-PWISdaws.js.map +0 -1
- package/dist/cdn/chunks/tiptap-DF9PEiqH.js.map +0 -1
- package/dist/dist-CNLKj9wa.js +0 -5
- package/dist/dist-CNXDNYQn.js +0 -4311
- package/dist/dist-Cqa6aeAJ.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-
|
|
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-
|
|
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-
|
|
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
|
+
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-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,32 +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
|
-
color: t.block.color,
|
|
2213
2248
|
textAlign: t.block.textAlign
|
|
2214
2249
|
};
|
|
2215
|
-
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2216
|
-
}), p = j(() => `h${t.block.level}`), m = j(() =>
|
|
2250
|
+
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2251
|
+
}), p = j(() => `h${t.block.level}`), m = j(() => ui(s.value));
|
|
2217
2252
|
return (t, s) => (f(), x("div", {
|
|
2218
2253
|
ref_key: "blockRef",
|
|
2219
2254
|
ref: a,
|
|
@@ -2239,88 +2274,88 @@ var ci = /* @__PURE__ */ y({
|
|
|
2239
2274
|
});
|
|
2240
2275
|
//#endregion
|
|
2241
2276
|
//#region src/utils/sectionColumnDrop.ts
|
|
2242
|
-
function
|
|
2277
|
+
function fi(e) {
|
|
2243
2278
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2244
2279
|
}
|
|
2245
2280
|
//#endregion
|
|
2246
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
|
|
2247
|
-
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, {
|
|
2248
2283
|
enumerable: !0,
|
|
2249
2284
|
configurable: !0,
|
|
2250
2285
|
writable: !0,
|
|
2251
2286
|
value: n
|
|
2252
|
-
}) : e[t] = n,
|
|
2253
|
-
for (var n in t ||= {})
|
|
2254
|
-
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]);
|
|
2255
2290
|
return e;
|
|
2256
|
-
},
|
|
2291
|
+
}, yi = (e, t) => {
|
|
2257
2292
|
var n = {};
|
|
2258
|
-
for (var r in e)
|
|
2259
|
-
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]);
|
|
2260
2295
|
return n;
|
|
2261
|
-
},
|
|
2262
|
-
function
|
|
2263
|
-
console.warn(
|
|
2296
|
+
}, bi = "[vue-draggable-plus]: ";
|
|
2297
|
+
function xi(e) {
|
|
2298
|
+
console.warn(bi + e);
|
|
2264
2299
|
}
|
|
2265
|
-
function
|
|
2266
|
-
console.error(
|
|
2300
|
+
function Si(e) {
|
|
2301
|
+
console.error(bi + e);
|
|
2267
2302
|
}
|
|
2268
|
-
function
|
|
2303
|
+
function Ci(e, t, n) {
|
|
2269
2304
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2270
2305
|
}
|
|
2271
|
-
function
|
|
2306
|
+
function wi(e) {
|
|
2272
2307
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2273
2308
|
}
|
|
2274
|
-
function
|
|
2275
|
-
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), {});
|
|
2276
2311
|
}
|
|
2277
|
-
function
|
|
2312
|
+
function Ei(e, t) {
|
|
2278
2313
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2279
2314
|
}
|
|
2280
|
-
function
|
|
2315
|
+
function Di(e, t, n) {
|
|
2281
2316
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2282
2317
|
}
|
|
2283
|
-
function
|
|
2318
|
+
function Oi(e) {
|
|
2284
2319
|
return e === void 0;
|
|
2285
2320
|
}
|
|
2286
|
-
function
|
|
2321
|
+
function ki(e) {
|
|
2287
2322
|
return typeof e == "string";
|
|
2288
2323
|
}
|
|
2289
|
-
function
|
|
2324
|
+
function Ai(e, t, n) {
|
|
2290
2325
|
let r = e.children[n];
|
|
2291
2326
|
e.insertBefore(t, r);
|
|
2292
2327
|
}
|
|
2293
|
-
function
|
|
2328
|
+
function ji(e) {
|
|
2294
2329
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2295
2330
|
}
|
|
2296
|
-
function
|
|
2331
|
+
function Mi(e, t = document) {
|
|
2297
2332
|
let n = null;
|
|
2298
|
-
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;
|
|
2299
2334
|
}
|
|
2300
|
-
function
|
|
2335
|
+
function Ni(e, t, n = null) {
|
|
2301
2336
|
return function(...r) {
|
|
2302
2337
|
return e.apply(n, r), t.apply(n, r);
|
|
2303
2338
|
};
|
|
2304
2339
|
}
|
|
2305
|
-
function
|
|
2306
|
-
let n =
|
|
2340
|
+
function Pi(e, t) {
|
|
2341
|
+
let n = vi({}, e);
|
|
2307
2342
|
return Object.keys(t).forEach((r) => {
|
|
2308
|
-
n[r] ? n[r] =
|
|
2343
|
+
n[r] ? n[r] = Ni(e[r], t[r]) : n[r] = t[r];
|
|
2309
2344
|
}), n;
|
|
2310
2345
|
}
|
|
2311
|
-
function
|
|
2346
|
+
function Fi(e) {
|
|
2312
2347
|
return e instanceof HTMLElement;
|
|
2313
2348
|
}
|
|
2314
|
-
function
|
|
2349
|
+
function Ii(e, t) {
|
|
2315
2350
|
Object.keys(e).forEach((n) => {
|
|
2316
2351
|
t(n, e[n]);
|
|
2317
2352
|
});
|
|
2318
2353
|
}
|
|
2319
|
-
function
|
|
2354
|
+
function Li(e) {
|
|
2320
2355
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2321
2356
|
}
|
|
2322
|
-
var
|
|
2323
|
-
function
|
|
2357
|
+
var Ri = Object.assign;
|
|
2358
|
+
function zi(e, t) {
|
|
2324
2359
|
var n = Object.keys(e);
|
|
2325
2360
|
if (Object.getOwnPropertySymbols) {
|
|
2326
2361
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2330,26 +2365,26 @@ function Ii(e, t) {
|
|
|
2330
2365
|
}
|
|
2331
2366
|
return n;
|
|
2332
2367
|
}
|
|
2333
|
-
function
|
|
2368
|
+
function Bi(e) {
|
|
2334
2369
|
for (var t = 1; t < arguments.length; t++) {
|
|
2335
2370
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2336
|
-
t % 2 ?
|
|
2337
|
-
|
|
2338
|
-
}) : 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) {
|
|
2339
2374
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2340
2375
|
});
|
|
2341
2376
|
}
|
|
2342
2377
|
return e;
|
|
2343
2378
|
}
|
|
2344
|
-
function
|
|
2379
|
+
function Vi(e) {
|
|
2345
2380
|
"@babel/helpers - typeof";
|
|
2346
|
-
return
|
|
2381
|
+
return Vi = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2347
2382
|
return typeof e;
|
|
2348
2383
|
} : function(e) {
|
|
2349
2384
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2350
|
-
},
|
|
2385
|
+
}, Vi(e);
|
|
2351
2386
|
}
|
|
2352
|
-
function
|
|
2387
|
+
function Hi(e, t, n) {
|
|
2353
2388
|
return t in e ? Object.defineProperty(e, t, {
|
|
2354
2389
|
value: n,
|
|
2355
2390
|
enumerable: !0,
|
|
@@ -2357,45 +2392,45 @@ function zi(e, t, n) {
|
|
|
2357
2392
|
writable: !0
|
|
2358
2393
|
}) : e[t] = n, e;
|
|
2359
2394
|
}
|
|
2360
|
-
function
|
|
2361
|
-
return
|
|
2395
|
+
function Ui() {
|
|
2396
|
+
return Ui = Object.assign || function(e) {
|
|
2362
2397
|
for (var t = 1; t < arguments.length; t++) {
|
|
2363
2398
|
var n = arguments[t];
|
|
2364
2399
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2365
2400
|
}
|
|
2366
2401
|
return e;
|
|
2367
|
-
},
|
|
2402
|
+
}, Ui.apply(this, arguments);
|
|
2368
2403
|
}
|
|
2369
|
-
function
|
|
2404
|
+
function Wi(e, t) {
|
|
2370
2405
|
if (e == null) return {};
|
|
2371
2406
|
var n = {}, r = Object.keys(e), i, a;
|
|
2372
2407
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2373
2408
|
return n;
|
|
2374
2409
|
}
|
|
2375
|
-
function
|
|
2410
|
+
function Gi(e, t) {
|
|
2376
2411
|
if (e == null) return {};
|
|
2377
|
-
var n =
|
|
2412
|
+
var n = Wi(e, t), r, i;
|
|
2378
2413
|
if (Object.getOwnPropertySymbols) {
|
|
2379
2414
|
var a = Object.getOwnPropertySymbols(e);
|
|
2380
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]);
|
|
2381
2416
|
}
|
|
2382
2417
|
return n;
|
|
2383
2418
|
}
|
|
2384
|
-
var
|
|
2385
|
-
function
|
|
2419
|
+
var Ki = "1.15.2";
|
|
2420
|
+
function qi(e) {
|
|
2386
2421
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2387
2422
|
}
|
|
2388
|
-
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 = {
|
|
2389
2424
|
capture: !1,
|
|
2390
2425
|
passive: !1
|
|
2391
2426
|
};
|
|
2392
2427
|
function I(e, t, n) {
|
|
2393
|
-
e.addEventListener(t, n, !
|
|
2428
|
+
e.addEventListener(t, n, !Ji && ea);
|
|
2394
2429
|
}
|
|
2395
2430
|
function L(e, t, n) {
|
|
2396
|
-
e.removeEventListener(t, n, !
|
|
2431
|
+
e.removeEventListener(t, n, !Ji && ea);
|
|
2397
2432
|
}
|
|
2398
|
-
function
|
|
2433
|
+
function ta(e, t) {
|
|
2399
2434
|
if (t) {
|
|
2400
2435
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2401
2436
|
if (e.matches) return e.matches(t);
|
|
@@ -2407,22 +2442,22 @@ function Qi(e, t) {
|
|
|
2407
2442
|
return !1;
|
|
2408
2443
|
}
|
|
2409
2444
|
}
|
|
2410
|
-
function
|
|
2445
|
+
function na(e) {
|
|
2411
2446
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2412
2447
|
}
|
|
2413
|
-
function
|
|
2448
|
+
function ra(e, t, n, r) {
|
|
2414
2449
|
if (e) {
|
|
2415
2450
|
n ||= document;
|
|
2416
2451
|
do {
|
|
2417
|
-
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;
|
|
2418
2453
|
if (e === n) break;
|
|
2419
|
-
} while (e =
|
|
2454
|
+
} while (e = na(e));
|
|
2420
2455
|
}
|
|
2421
2456
|
return null;
|
|
2422
2457
|
}
|
|
2423
|
-
var
|
|
2458
|
+
var ia = /\s+/g;
|
|
2424
2459
|
function R(e, t, n) {
|
|
2425
|
-
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, " "));
|
|
2426
2461
|
}
|
|
2427
2462
|
function z(e, t, n) {
|
|
2428
2463
|
var r = e && e.style;
|
|
@@ -2431,7 +2466,7 @@ function z(e, t, n) {
|
|
|
2431
2466
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2432
2467
|
}
|
|
2433
2468
|
}
|
|
2434
|
-
function
|
|
2469
|
+
function aa(e, t) {
|
|
2435
2470
|
var n = "";
|
|
2436
2471
|
if (typeof e == "string") n = e;
|
|
2437
2472
|
else do {
|
|
@@ -2441,7 +2476,7 @@ function na(e, t) {
|
|
|
2441
2476
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2442
2477
|
return i && new i(n);
|
|
2443
2478
|
}
|
|
2444
|
-
function
|
|
2479
|
+
function oa(e, t, n) {
|
|
2445
2480
|
if (e) {
|
|
2446
2481
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2447
2482
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2449,13 +2484,13 @@ function ra(e, t, n) {
|
|
|
2449
2484
|
}
|
|
2450
2485
|
return [];
|
|
2451
2486
|
}
|
|
2452
|
-
function
|
|
2487
|
+
function sa() {
|
|
2453
2488
|
return document.scrollingElement || document.documentElement;
|
|
2454
2489
|
}
|
|
2455
2490
|
function B(e, t, n, r, i) {
|
|
2456
2491
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2457
2492
|
var a, o, s, c, l, u, d;
|
|
2458
|
-
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
|
|
2459
2494
|
if (i && i.getBoundingClientRect && (z(i, "transform") !== "none" || n && z(i, "position") !== "static")) {
|
|
2460
2495
|
var f = i.getBoundingClientRect();
|
|
2461
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;
|
|
@@ -2463,7 +2498,7 @@ function B(e, t, n, r, i) {
|
|
|
2463
2498
|
}
|
|
2464
2499
|
while (i = i.parentNode);
|
|
2465
2500
|
if (r && e !== window) {
|
|
2466
|
-
var p =
|
|
2501
|
+
var p = aa(i || e), m = p && p.a, h = p && p.d;
|
|
2467
2502
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2468
2503
|
}
|
|
2469
2504
|
return {
|
|
@@ -2476,18 +2511,18 @@ function B(e, t, n, r, i) {
|
|
|
2476
2511
|
};
|
|
2477
2512
|
}
|
|
2478
2513
|
}
|
|
2479
|
-
function
|
|
2480
|
-
for (var r =
|
|
2514
|
+
function ca(e, t, n) {
|
|
2515
|
+
for (var r = ma(e, !0), i = B(e)[t]; r;) {
|
|
2481
2516
|
var a = B(r)[n], o = void 0;
|
|
2482
2517
|
if (o = i >= a, !o) return r;
|
|
2483
|
-
if (r ===
|
|
2484
|
-
r =
|
|
2518
|
+
if (r === sa()) break;
|
|
2519
|
+
r = ma(r, !1);
|
|
2485
2520
|
}
|
|
2486
2521
|
return !1;
|
|
2487
2522
|
}
|
|
2488
|
-
function
|
|
2523
|
+
function la(e, t, n, r) {
|
|
2489
2524
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2490
|
-
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)) {
|
|
2491
2526
|
if (i === t) return o[a];
|
|
2492
2527
|
i++;
|
|
2493
2528
|
}
|
|
@@ -2495,84 +2530,84 @@ function oa(e, t, n, r) {
|
|
|
2495
2530
|
}
|
|
2496
2531
|
return null;
|
|
2497
2532
|
}
|
|
2498
|
-
function
|
|
2499
|
-
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;
|
|
2500
2535
|
return n || null;
|
|
2501
2536
|
}
|
|
2502
|
-
function
|
|
2537
|
+
function da(e, t) {
|
|
2503
2538
|
var n = 0;
|
|
2504
2539
|
if (!e || !e.parentNode) return -1;
|
|
2505
|
-
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++;
|
|
2506
2541
|
return n;
|
|
2507
2542
|
}
|
|
2508
|
-
function
|
|
2509
|
-
var t = 0, n = 0, r =
|
|
2543
|
+
function fa(e) {
|
|
2544
|
+
var t = 0, n = 0, r = sa();
|
|
2510
2545
|
if (e) do {
|
|
2511
|
-
var i =
|
|
2546
|
+
var i = aa(e), a = i.a, o = i.d;
|
|
2512
2547
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2513
2548
|
} while (e !== r && (e = e.parentNode));
|
|
2514
2549
|
return [t, n];
|
|
2515
2550
|
}
|
|
2516
|
-
function
|
|
2551
|
+
function pa(e, t) {
|
|
2517
2552
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2518
2553
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2519
2554
|
}
|
|
2520
2555
|
return -1;
|
|
2521
2556
|
}
|
|
2522
|
-
function
|
|
2523
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2557
|
+
function ma(e, t) {
|
|
2558
|
+
if (!e || !e.getBoundingClientRect) return sa();
|
|
2524
2559
|
var n = e, r = !1;
|
|
2525
2560
|
do
|
|
2526
2561
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2527
2562
|
var i = z(n);
|
|
2528
2563
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2529
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2564
|
+
if (!n.getBoundingClientRect || n === document.body) return sa();
|
|
2530
2565
|
if (r || t) return n;
|
|
2531
2566
|
r = !0;
|
|
2532
2567
|
}
|
|
2533
2568
|
}
|
|
2534
2569
|
while (n = n.parentNode);
|
|
2535
|
-
return
|
|
2570
|
+
return sa();
|
|
2536
2571
|
}
|
|
2537
|
-
function
|
|
2572
|
+
function ha(e, t) {
|
|
2538
2573
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2539
2574
|
return e;
|
|
2540
2575
|
}
|
|
2541
|
-
function
|
|
2576
|
+
function ga(e, t) {
|
|
2542
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);
|
|
2543
2578
|
}
|
|
2544
|
-
var
|
|
2545
|
-
function
|
|
2579
|
+
var _a;
|
|
2580
|
+
function va(e, t) {
|
|
2546
2581
|
return function() {
|
|
2547
|
-
if (!
|
|
2582
|
+
if (!_a) {
|
|
2548
2583
|
var n = arguments, r = this;
|
|
2549
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2550
|
-
|
|
2584
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), _a = setTimeout(function() {
|
|
2585
|
+
_a = void 0;
|
|
2551
2586
|
}, t);
|
|
2552
2587
|
}
|
|
2553
2588
|
};
|
|
2554
2589
|
}
|
|
2555
|
-
function
|
|
2556
|
-
clearTimeout(
|
|
2590
|
+
function ya() {
|
|
2591
|
+
clearTimeout(_a), _a = void 0;
|
|
2557
2592
|
}
|
|
2558
|
-
function
|
|
2593
|
+
function ba(e, t, n) {
|
|
2559
2594
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2560
2595
|
}
|
|
2561
|
-
function
|
|
2596
|
+
function xa(e) {
|
|
2562
2597
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2563
2598
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2564
2599
|
}
|
|
2565
|
-
function
|
|
2600
|
+
function Sa(e, t, n) {
|
|
2566
2601
|
var r = {};
|
|
2567
2602
|
return Array.from(e.children).forEach(function(i) {
|
|
2568
|
-
if (!(!
|
|
2603
|
+
if (!(!ra(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
2569
2604
|
var a = B(i);
|
|
2570
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);
|
|
2571
2606
|
}
|
|
2572
2607
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2573
2608
|
}
|
|
2574
2609
|
var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2575
|
-
function
|
|
2610
|
+
function Ca() {
|
|
2576
2611
|
var e = [], t;
|
|
2577
2612
|
return {
|
|
2578
2613
|
captureAnimationState: function() {
|
|
@@ -2582,9 +2617,9 @@ function ba() {
|
|
|
2582
2617
|
target: t,
|
|
2583
2618
|
rect: B(t)
|
|
2584
2619
|
});
|
|
2585
|
-
var n =
|
|
2620
|
+
var n = Bi({}, e[e.length - 1].rect);
|
|
2586
2621
|
if (t.thisAnimationDuration) {
|
|
2587
|
-
var r =
|
|
2622
|
+
var r = aa(t, !0);
|
|
2588
2623
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2589
2624
|
}
|
|
2590
2625
|
t.fromRect = n;
|
|
@@ -2595,7 +2630,7 @@ function ba() {
|
|
|
2595
2630
|
e.push(t);
|
|
2596
2631
|
},
|
|
2597
2632
|
removeAnimationState: function(t) {
|
|
2598
|
-
e.splice(
|
|
2633
|
+
e.splice(pa(e, { target: t }), 1);
|
|
2599
2634
|
},
|
|
2600
2635
|
animateAll: function(n) {
|
|
2601
2636
|
var r = this;
|
|
@@ -2605,8 +2640,8 @@ function ba() {
|
|
|
2605
2640
|
}
|
|
2606
2641
|
var i = !1, a = 0;
|
|
2607
2642
|
e.forEach(function(e) {
|
|
2608
|
-
var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2609
|
-
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() {
|
|
2610
2645
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2611
2646
|
}, t), n.thisAnimationDuration = t);
|
|
2612
2647
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2616,26 +2651,26 @@ function ba() {
|
|
|
2616
2651
|
animate: function(e, t, n, r) {
|
|
2617
2652
|
if (r) {
|
|
2618
2653
|
z(e, "transition", ""), z(e, "transform", "");
|
|
2619
|
-
var i =
|
|
2620
|
-
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() {
|
|
2621
2656
|
z(e, "transition", ""), z(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2622
2657
|
}, r);
|
|
2623
2658
|
}
|
|
2624
2659
|
}
|
|
2625
2660
|
};
|
|
2626
2661
|
}
|
|
2627
|
-
function
|
|
2662
|
+
function wa(e) {
|
|
2628
2663
|
return e.offsetWidth;
|
|
2629
2664
|
}
|
|
2630
|
-
function
|
|
2665
|
+
function Ta(e, t, n, r) {
|
|
2631
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;
|
|
2632
2667
|
}
|
|
2633
|
-
var
|
|
2668
|
+
var Ea = [], Da = { initializeByDefault: !0 }, Oa = {
|
|
2634
2669
|
mount: function(e) {
|
|
2635
|
-
for (var t in
|
|
2636
|
-
|
|
2670
|
+
for (var t in Da) Da.hasOwnProperty(t) && !(t in e) && (e[t] = Da[t]);
|
|
2671
|
+
Ea.forEach(function(t) {
|
|
2637
2672
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2638
|
-
}),
|
|
2673
|
+
}), Ea.push(e);
|
|
2639
2674
|
},
|
|
2640
2675
|
pluginEvent: function(e, t, n) {
|
|
2641
2676
|
var r = this;
|
|
@@ -2643,16 +2678,16 @@ var Ca = [], wa = { initializeByDefault: !0 }, Ta = {
|
|
|
2643
2678
|
r.eventCanceled = !0;
|
|
2644
2679
|
};
|
|
2645
2680
|
var i = e + "Global";
|
|
2646
|
-
|
|
2647
|
-
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)));
|
|
2648
2683
|
});
|
|
2649
2684
|
},
|
|
2650
2685
|
initializePlugins: function(e, t, n, r) {
|
|
2651
|
-
for (var i in
|
|
2686
|
+
for (var i in Ea.forEach(function(r) {
|
|
2652
2687
|
var i = r.pluginName;
|
|
2653
2688
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2654
2689
|
var a = new r(e, t, e.options);
|
|
2655
|
-
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);
|
|
2656
2691
|
}
|
|
2657
2692
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2658
2693
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2661,56 +2696,56 @@ var Ca = [], wa = { initializeByDefault: !0 }, Ta = {
|
|
|
2661
2696
|
},
|
|
2662
2697
|
getEventProperties: function(e, t) {
|
|
2663
2698
|
var n = {};
|
|
2664
|
-
return
|
|
2665
|
-
typeof r.eventProperties == "function" &&
|
|
2699
|
+
return Ea.forEach(function(r) {
|
|
2700
|
+
typeof r.eventProperties == "function" && Ui(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2666
2701
|
}), n;
|
|
2667
2702
|
},
|
|
2668
2703
|
modifyOption: function(e, t, n) {
|
|
2669
2704
|
var r;
|
|
2670
|
-
return
|
|
2705
|
+
return Ea.forEach(function(i) {
|
|
2671
2706
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2672
2707
|
}), r;
|
|
2673
2708
|
}
|
|
2674
2709
|
};
|
|
2675
|
-
function
|
|
2710
|
+
function ka(e) {
|
|
2676
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;
|
|
2677
2712
|
if (t ||= n && n[V], t) {
|
|
2678
2713
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2679
|
-
window.CustomEvent && !
|
|
2714
|
+
window.CustomEvent && !Ji && !Yi ? h = new CustomEvent(r, {
|
|
2680
2715
|
bubbles: !0,
|
|
2681
2716
|
cancelable: !0
|
|
2682
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;
|
|
2683
|
-
var v =
|
|
2718
|
+
var v = Bi(Bi({}, m), Oa.getEventProperties(r, t));
|
|
2684
2719
|
for (var y in v) h[y] = v[y];
|
|
2685
2720
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2686
2721
|
}
|
|
2687
2722
|
}
|
|
2688
|
-
var
|
|
2689
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2690
|
-
|
|
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({
|
|
2691
2726
|
dragEl: W,
|
|
2692
2727
|
parentEl: G,
|
|
2693
2728
|
ghostEl: K,
|
|
2694
2729
|
rootEl: q,
|
|
2695
|
-
nextEl:
|
|
2696
|
-
lastDownEl:
|
|
2730
|
+
nextEl: ja,
|
|
2731
|
+
lastDownEl: Ma,
|
|
2697
2732
|
cloneEl: J,
|
|
2698
|
-
cloneHidden:
|
|
2699
|
-
dragStarted:
|
|
2733
|
+
cloneHidden: Na,
|
|
2734
|
+
dragStarted: qa,
|
|
2700
2735
|
putSortable: X,
|
|
2701
2736
|
activeSortable: Q.active,
|
|
2702
2737
|
originalEvent: r,
|
|
2703
|
-
oldIndex:
|
|
2704
|
-
oldDraggableIndex:
|
|
2738
|
+
oldIndex: Pa,
|
|
2739
|
+
oldDraggableIndex: Fa,
|
|
2705
2740
|
newIndex: Y,
|
|
2706
|
-
newDraggableIndex:
|
|
2707
|
-
hideGhostForTarget:
|
|
2708
|
-
unhideGhostForTarget:
|
|
2741
|
+
newDraggableIndex: Ia,
|
|
2742
|
+
hideGhostForTarget: fo,
|
|
2743
|
+
unhideGhostForTarget: po,
|
|
2709
2744
|
cloneNowHidden: function() {
|
|
2710
|
-
|
|
2745
|
+
Na = !0;
|
|
2711
2746
|
},
|
|
2712
2747
|
cloneNowShown: function() {
|
|
2713
|
-
|
|
2748
|
+
Na = !1;
|
|
2714
2749
|
},
|
|
2715
2750
|
dispatchSortableEvent: function(e) {
|
|
2716
2751
|
U({
|
|
@@ -2722,45 +2757,45 @@ var Da = ["evt"], H = function(e, t) {
|
|
|
2722
2757
|
}, i));
|
|
2723
2758
|
};
|
|
2724
2759
|
function U(e) {
|
|
2725
|
-
|
|
2760
|
+
ka(Bi({
|
|
2726
2761
|
putSortable: X,
|
|
2727
2762
|
cloneEl: J,
|
|
2728
2763
|
targetEl: W,
|
|
2729
2764
|
rootEl: q,
|
|
2730
|
-
oldIndex:
|
|
2731
|
-
oldDraggableIndex:
|
|
2765
|
+
oldIndex: Pa,
|
|
2766
|
+
oldDraggableIndex: Fa,
|
|
2732
2767
|
newIndex: Y,
|
|
2733
|
-
newDraggableIndex:
|
|
2768
|
+
newDraggableIndex: Ia
|
|
2734
2769
|
}, e));
|
|
2735
2770
|
}
|
|
2736
|
-
var W, G, K, q,
|
|
2737
|
-
if (
|
|
2738
|
-
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;
|
|
2739
2774
|
var e = document.createElement("x");
|
|
2740
2775
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2741
2776
|
}
|
|
2742
|
-
}(),
|
|
2743
|
-
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;
|
|
2744
2779
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2745
2780
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2746
2781
|
if (i && o.float && o.float !== "none") {
|
|
2747
2782
|
var u = o.float === "left" ? "left" : "right";
|
|
2748
2783
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2749
2784
|
}
|
|
2750
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2751
|
-
},
|
|
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) {
|
|
2752
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;
|
|
2753
2788
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2754
|
-
},
|
|
2789
|
+
}, lo = function(e, t) {
|
|
2755
2790
|
var n;
|
|
2756
|
-
return
|
|
2791
|
+
return Ba.some(function(r) {
|
|
2757
2792
|
var i = r[V].options.emptyInsertThreshold;
|
|
2758
|
-
if (!(!i ||
|
|
2793
|
+
if (!(!i || ua(r))) {
|
|
2759
2794
|
var a = B(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2760
2795
|
if (o && s) return n = r;
|
|
2761
2796
|
}
|
|
2762
2797
|
}), n;
|
|
2763
|
-
},
|
|
2798
|
+
}, uo = function(e) {
|
|
2764
2799
|
function t(e, n) {
|
|
2765
2800
|
return function(r, i, a, o) {
|
|
2766
2801
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2773,31 +2808,31 @@ var W, G, K, q, Oa, ka, J, Aa, ja, Y, Ma, Na, Pa, X, Fa = !1, Ia = !1, La = [],
|
|
|
2773
2808
|
};
|
|
2774
2809
|
}
|
|
2775
2810
|
var n = {}, r = e.group;
|
|
2776
|
-
(!r ||
|
|
2777
|
-
},
|
|
2778
|
-
!
|
|
2779
|
-
},
|
|
2780
|
-
!
|
|
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", "");
|
|
2781
2816
|
};
|
|
2782
|
-
|
|
2783
|
-
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;
|
|
2784
2819
|
}, !0);
|
|
2785
|
-
var
|
|
2820
|
+
var mo = function(e) {
|
|
2786
2821
|
if (W) {
|
|
2787
2822
|
e = e.touches ? e.touches[0] : e;
|
|
2788
|
-
var t =
|
|
2823
|
+
var t = lo(e.clientX, e.clientY);
|
|
2789
2824
|
if (t) {
|
|
2790
2825
|
var n = {};
|
|
2791
2826
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2792
2827
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
|
|
2793
2828
|
}
|
|
2794
2829
|
}
|
|
2795
|
-
},
|
|
2830
|
+
}, ho = function(e) {
|
|
2796
2831
|
W && W.parentNode[V]._isOutsideThisEl(e.target);
|
|
2797
2832
|
};
|
|
2798
2833
|
function Q(e, t) {
|
|
2799
2834
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2800
|
-
this.el = e, this.options = t =
|
|
2835
|
+
this.el = e, this.options = t = Ui({}, t), e[V] = this;
|
|
2801
2836
|
var n = {
|
|
2802
2837
|
group: null,
|
|
2803
2838
|
sort: !0,
|
|
@@ -2810,7 +2845,7 @@ function Q(e, t) {
|
|
|
2810
2845
|
invertedSwapThreshold: null,
|
|
2811
2846
|
removeCloneOnHide: !0,
|
|
2812
2847
|
direction: function() {
|
|
2813
|
-
return
|
|
2848
|
+
return so(e, this.options);
|
|
2814
2849
|
},
|
|
2815
2850
|
ghostClass: "sortable-ghost",
|
|
2816
2851
|
chosenClass: "sortable-chosen",
|
|
@@ -2837,17 +2872,17 @@ function Q(e, t) {
|
|
|
2837
2872
|
x: 0,
|
|
2838
2873
|
y: 0
|
|
2839
2874
|
},
|
|
2840
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2875
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Zi,
|
|
2841
2876
|
emptyInsertThreshold: 5
|
|
2842
2877
|
};
|
|
2843
|
-
for (var r in
|
|
2844
|
-
for (var i in
|
|
2845
|
-
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());
|
|
2846
2881
|
}
|
|
2847
2882
|
Q.prototype = {
|
|
2848
2883
|
constructor: Q,
|
|
2849
2884
|
_isOutsideThisEl: function(e) {
|
|
2850
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2885
|
+
!this.el.contains(e) && e !== this.el && (Ja = null);
|
|
2851
2886
|
},
|
|
2852
2887
|
_getDirection: function(e, t) {
|
|
2853
2888
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
|
|
@@ -2855,8 +2890,8 @@ Q.prototype = {
|
|
|
2855
2890
|
_onTapStart: function(e) {
|
|
2856
2891
|
if (e.cancelable) {
|
|
2857
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;
|
|
2858
|
-
if (
|
|
2859
|
-
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") {
|
|
2860
2895
|
if (l.call(this, e, s, this)) {
|
|
2861
2896
|
U({
|
|
2862
2897
|
sortable: t,
|
|
@@ -2869,7 +2904,7 @@ Q.prototype = {
|
|
|
2869
2904
|
return;
|
|
2870
2905
|
}
|
|
2871
2906
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2872
|
-
if (r =
|
|
2907
|
+
if (r = ra(c, r.trim(), n, !1), r) return U({
|
|
2873
2908
|
sortable: t,
|
|
2874
2909
|
rootEl: r,
|
|
2875
2910
|
name: "filter",
|
|
@@ -2881,7 +2916,7 @@ Q.prototype = {
|
|
|
2881
2916
|
i && e.cancelable && e.preventDefault();
|
|
2882
2917
|
return;
|
|
2883
2918
|
}
|
|
2884
|
-
r.handle && !
|
|
2919
|
+
r.handle && !ra(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2885
2920
|
}
|
|
2886
2921
|
}
|
|
2887
2922
|
},
|
|
@@ -2889,23 +2924,23 @@ Q.prototype = {
|
|
|
2889
2924
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2890
2925
|
if (n && !W && n.parentNode === i) {
|
|
2891
2926
|
var c = B(n);
|
|
2892
|
-
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 = {
|
|
2893
2928
|
target: W,
|
|
2894
2929
|
clientX: (t || e).clientX,
|
|
2895
2930
|
clientY: (t || e).clientY
|
|
2896
|
-
},
|
|
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() {
|
|
2897
2932
|
if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
2898
2933
|
r._onDrop();
|
|
2899
2934
|
return;
|
|
2900
2935
|
}
|
|
2901
|
-
r._disableDelayedDragEvents(), !
|
|
2936
|
+
r._disableDelayedDragEvents(), !Xi && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
2902
2937
|
sortable: r,
|
|
2903
2938
|
name: "choose",
|
|
2904
2939
|
originalEvent: e
|
|
2905
2940
|
}), R(W, a.chosenClass, !0);
|
|
2906
2941
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2907
|
-
|
|
2908
|
-
}), 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))) {
|
|
2909
2944
|
if (Q.eventCanceled) {
|
|
2910
2945
|
this._onDrop();
|
|
2911
2946
|
return;
|
|
@@ -2919,7 +2954,7 @@ Q.prototype = {
|
|
|
2919
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();
|
|
2920
2955
|
},
|
|
2921
2956
|
_disableDelayedDrag: function() {
|
|
2922
|
-
W &&
|
|
2957
|
+
W && vo(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2923
2958
|
},
|
|
2924
2959
|
_disableDelayedDragEvents: function() {
|
|
2925
2960
|
var e = this.el.ownerDocument;
|
|
@@ -2928,14 +2963,14 @@ Q.prototype = {
|
|
|
2928
2963
|
_triggerDragStart: function(e, t) {
|
|
2929
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));
|
|
2930
2965
|
try {
|
|
2931
|
-
document.selection ?
|
|
2966
|
+
document.selection ? Eo(function() {
|
|
2932
2967
|
document.selection.empty();
|
|
2933
2968
|
}) : window.getSelection().removeAllRanges();
|
|
2934
2969
|
} catch {}
|
|
2935
2970
|
},
|
|
2936
2971
|
_dragStarted: function(e, t) {
|
|
2937
|
-
if (
|
|
2938
|
-
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);
|
|
2939
2974
|
var n = this.options;
|
|
2940
2975
|
!e && R(W, n.dragClass, !1), R(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
2941
2976
|
sortable: this,
|
|
@@ -2945,33 +2980,33 @@ Q.prototype = {
|
|
|
2945
2980
|
} else this._nulling();
|
|
2946
2981
|
},
|
|
2947
2982
|
_emulateDragOver: function() {
|
|
2948
|
-
if (
|
|
2949
|
-
this._lastX =
|
|
2950
|
-
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;
|
|
2951
2986
|
if (W.parentNode[V]._isOutsideThisEl(e), t) do {
|
|
2952
2987
|
if (t[V]) {
|
|
2953
2988
|
var n = void 0;
|
|
2954
2989
|
if (n = t[V]._onDragOver({
|
|
2955
|
-
clientX:
|
|
2956
|
-
clientY:
|
|
2990
|
+
clientX: Ha.clientX,
|
|
2991
|
+
clientY: Ha.clientY,
|
|
2957
2992
|
target: e,
|
|
2958
2993
|
rootEl: t
|
|
2959
2994
|
}), n && !this.options.dragoverBubble) break;
|
|
2960
2995
|
}
|
|
2961
2996
|
e = t;
|
|
2962
2997
|
} while (t = t.parentNode);
|
|
2963
|
-
|
|
2998
|
+
po();
|
|
2964
2999
|
}
|
|
2965
3000
|
},
|
|
2966
3001
|
_onTouchMove: function(e) {
|
|
2967
|
-
if (
|
|
2968
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K &&
|
|
2969
|
-
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) {
|
|
2970
3005
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2971
3006
|
this._onDragStart(e, !0);
|
|
2972
3007
|
}
|
|
2973
3008
|
if (K) {
|
|
2974
|
-
a ? (a.e += l - (
|
|
3009
|
+
a ? (a.e += l - (Ua || 0), a.f += u - (Wa || 0)) : a = {
|
|
2975
3010
|
a: 1,
|
|
2976
3011
|
b: 0,
|
|
2977
3012
|
c: 0,
|
|
@@ -2980,19 +3015,19 @@ Q.prototype = {
|
|
|
2980
3015
|
f: u
|
|
2981
3016
|
};
|
|
2982
3017
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2983
|
-
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;
|
|
2984
3019
|
}
|
|
2985
3020
|
e.cancelable && e.preventDefault();
|
|
2986
3021
|
}
|
|
2987
3022
|
},
|
|
2988
3023
|
_appendGhost: function() {
|
|
2989
3024
|
if (!K) {
|
|
2990
|
-
var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0,
|
|
2991
|
-
if (
|
|
3025
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0, ro, !0, e), n = this.options;
|
|
3026
|
+
if (ro) {
|
|
2992
3027
|
for (Z = e; z(Z, "position") === "static" && z(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
2993
|
-
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);
|
|
2994
3029
|
}
|
|
2995
|
-
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 + "%");
|
|
2996
3031
|
}
|
|
2997
3032
|
},
|
|
2998
3033
|
_onDragStart: function(e, t) {
|
|
@@ -3001,18 +3036,18 @@ Q.prototype = {
|
|
|
3001
3036
|
this._onDrop();
|
|
3002
3037
|
return;
|
|
3003
3038
|
}
|
|
3004
|
-
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() {
|
|
3005
3040
|
H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
3006
3041
|
sortable: n,
|
|
3007
3042
|
name: "clone"
|
|
3008
3043
|
}));
|
|
3009
|
-
}), !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");
|
|
3010
3045
|
},
|
|
3011
3046
|
_onDragOver: function(e) {
|
|
3012
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3013
|
-
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;
|
|
3014
3049
|
function h(o, s) {
|
|
3015
|
-
H(o, p,
|
|
3050
|
+
H(o, p, Bi({
|
|
3016
3051
|
evt: e,
|
|
3017
3052
|
isOwner: l,
|
|
3018
3053
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3024,7 +3059,7 @@ Q.prototype = {
|
|
|
3024
3059
|
target: n,
|
|
3025
3060
|
completed: _,
|
|
3026
3061
|
onMove: function(n, i) {
|
|
3027
|
-
return
|
|
3062
|
+
return _o(q, t, W, r, n, B(n), e, i);
|
|
3028
3063
|
},
|
|
3029
3064
|
changed: v
|
|
3030
3065
|
}, s));
|
|
@@ -3035,48 +3070,48 @@ Q.prototype = {
|
|
|
3035
3070
|
function _(r) {
|
|
3036
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() {
|
|
3037
3072
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3038
|
-
}), 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;
|
|
3039
3074
|
}
|
|
3040
3075
|
function v() {
|
|
3041
|
-
Y =
|
|
3076
|
+
Y = da(W), Ia = da(W, o.draggable), U({
|
|
3042
3077
|
sortable: p,
|
|
3043
3078
|
name: "change",
|
|
3044
3079
|
toEl: t,
|
|
3045
3080
|
newIndex: Y,
|
|
3046
|
-
newDraggableIndex:
|
|
3081
|
+
newDraggableIndex: Ia,
|
|
3047
3082
|
originalEvent: e
|
|
3048
3083
|
});
|
|
3049
3084
|
}
|
|
3050
|
-
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;
|
|
3051
3086
|
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3052
|
-
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))) {
|
|
3053
3088
|
if (f = this._getDirection(e, n) === "vertical", r = B(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3054
|
-
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
3055
|
-
var y =
|
|
3056
|
-
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) {
|
|
3057
3092
|
if (y === W) return _(!1);
|
|
3058
|
-
if (y && t === e.target && (n = y), n && (i = B(n)),
|
|
3059
|
-
} else if (y &&
|
|
3060
|
-
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);
|
|
3061
3096
|
if (b === W) return _(!1);
|
|
3062
|
-
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);
|
|
3063
3098
|
} else if (n.parentNode === t) {
|
|
3064
3099
|
i = B(n);
|
|
3065
|
-
var x = 0, S, C = W.parentNode !== t, w = !
|
|
3066
|
-
|
|
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);
|
|
3067
3102
|
var O;
|
|
3068
3103
|
if (x !== 0) {
|
|
3069
|
-
var k =
|
|
3104
|
+
var k = da(W);
|
|
3070
3105
|
do
|
|
3071
3106
|
k -= x, O = G.children[k];
|
|
3072
3107
|
while (O && (z(O, "display") === "none" || O === K));
|
|
3073
3108
|
}
|
|
3074
3109
|
if (x === 0 || O === n) return _(!1);
|
|
3075
|
-
|
|
3110
|
+
Ja = n, Ya = x;
|
|
3076
3111
|
var ee = n.nextElementSibling, A = !1;
|
|
3077
3112
|
A = x === 1;
|
|
3078
|
-
var te =
|
|
3079
|
-
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);
|
|
3080
3115
|
}
|
|
3081
3116
|
if (t.contains(W)) return _(!1);
|
|
3082
3117
|
}
|
|
@@ -3084,7 +3119,7 @@ Q.prototype = {
|
|
|
3084
3119
|
},
|
|
3085
3120
|
_ignoreWhileAnimating: null,
|
|
3086
3121
|
_offMoveEvents: function() {
|
|
3087
|
-
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);
|
|
3088
3123
|
},
|
|
3089
3124
|
_offUpEvents: function() {
|
|
3090
3125
|
var e = this.el.ownerDocument;
|
|
@@ -3092,18 +3127,18 @@ Q.prototype = {
|
|
|
3092
3127
|
},
|
|
3093
3128
|
_onDrop: function(e) {
|
|
3094
3129
|
var t = this.el, n = this.options;
|
|
3095
|
-
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) {
|
|
3096
3131
|
this._nulling();
|
|
3097
3132
|
return;
|
|
3098
3133
|
}
|
|
3099
|
-
|
|
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({
|
|
3100
3135
|
sortable: this,
|
|
3101
3136
|
name: "unchoose",
|
|
3102
3137
|
toEl: G,
|
|
3103
3138
|
newIndex: null,
|
|
3104
3139
|
newDraggableIndex: null,
|
|
3105
3140
|
originalEvent: e
|
|
3106
|
-
}), q === G ? Y !==
|
|
3141
|
+
}), q === G ? Y !== Pa && Y >= 0 && (U({
|
|
3107
3142
|
sortable: this,
|
|
3108
3143
|
name: "update",
|
|
3109
3144
|
toEl: G,
|
|
@@ -3135,7 +3170,7 @@ Q.prototype = {
|
|
|
3135
3170
|
name: "sort",
|
|
3136
3171
|
toEl: G,
|
|
3137
3172
|
originalEvent: e
|
|
3138
|
-
})), 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({
|
|
3139
3174
|
sortable: this,
|
|
3140
3175
|
name: "end",
|
|
3141
3176
|
toEl: G,
|
|
@@ -3143,9 +3178,9 @@ Q.prototype = {
|
|
|
3143
3178
|
}), this.save()))), this._nulling();
|
|
3144
3179
|
},
|
|
3145
3180
|
_nulling: function() {
|
|
3146
|
-
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) {
|
|
3147
3182
|
e.checked = !0;
|
|
3148
|
-
}),
|
|
3183
|
+
}), to.length = Ua = Wa = 0;
|
|
3149
3184
|
},
|
|
3150
3185
|
handleEvent: function(e) {
|
|
3151
3186
|
switch (e.type) {
|
|
@@ -3155,7 +3190,7 @@ Q.prototype = {
|
|
|
3155
3190
|
break;
|
|
3156
3191
|
case "dragenter":
|
|
3157
3192
|
case "dragover":
|
|
3158
|
-
W && (this._onDragOver(e),
|
|
3193
|
+
W && (this._onDragOver(e), go(e));
|
|
3159
3194
|
break;
|
|
3160
3195
|
case "selectstart":
|
|
3161
3196
|
e.preventDefault();
|
|
@@ -3163,14 +3198,14 @@ Q.prototype = {
|
|
|
3163
3198
|
}
|
|
3164
3199
|
},
|
|
3165
3200
|
toArray: function() {
|
|
3166
|
-
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));
|
|
3167
3202
|
return e;
|
|
3168
3203
|
},
|
|
3169
3204
|
sort: function(e, t) {
|
|
3170
3205
|
var n = {}, r = this.el;
|
|
3171
3206
|
this.toArray().forEach(function(e, t) {
|
|
3172
3207
|
var i = r.children[t];
|
|
3173
|
-
|
|
3208
|
+
ra(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3174
3209
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3175
3210
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3176
3211
|
}), t && this.animateAll();
|
|
@@ -3180,25 +3215,25 @@ Q.prototype = {
|
|
|
3180
3215
|
e && e.set && e.set(this);
|
|
3181
3216
|
},
|
|
3182
3217
|
closest: function(e, t) {
|
|
3183
|
-
return
|
|
3218
|
+
return ra(e, t || this.options.draggable, this.el, !1);
|
|
3184
3219
|
},
|
|
3185
3220
|
option: function(e, t) {
|
|
3186
3221
|
var n = this.options;
|
|
3187
3222
|
if (t === void 0) return n[e];
|
|
3188
|
-
var r =
|
|
3189
|
-
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);
|
|
3190
3225
|
},
|
|
3191
3226
|
destroy: function() {
|
|
3192
3227
|
H("destroy", this);
|
|
3193
3228
|
var e = this.el;
|
|
3194
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) {
|
|
3195
3230
|
e.removeAttribute("draggable");
|
|
3196
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3231
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Ba.splice(Ba.indexOf(this.el), 1), this.el = e = null;
|
|
3197
3232
|
},
|
|
3198
3233
|
_hideClone: function() {
|
|
3199
|
-
if (!
|
|
3234
|
+
if (!Na) {
|
|
3200
3235
|
if (H("hideClone", this), Q.eventCanceled) return;
|
|
3201
|
-
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;
|
|
3202
3237
|
}
|
|
3203
3238
|
},
|
|
3204
3239
|
_showClone: function(e) {
|
|
@@ -3206,99 +3241,99 @@ Q.prototype = {
|
|
|
3206
3241
|
this._hideClone();
|
|
3207
3242
|
return;
|
|
3208
3243
|
}
|
|
3209
|
-
if (
|
|
3244
|
+
if (Na) {
|
|
3210
3245
|
if (H("showClone", this), Q.eventCanceled) return;
|
|
3211
|
-
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;
|
|
3212
3247
|
}
|
|
3213
3248
|
}
|
|
3214
3249
|
};
|
|
3215
|
-
function
|
|
3250
|
+
function go(e) {
|
|
3216
3251
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3217
3252
|
}
|
|
3218
|
-
function
|
|
3253
|
+
function _o(e, t, n, r, i, a, o, s) {
|
|
3219
3254
|
var c, l = e[V], u = l.options.onMove, d;
|
|
3220
|
-
return window.CustomEvent && !
|
|
3255
|
+
return window.CustomEvent && !Ji && !Yi ? c = new CustomEvent("move", {
|
|
3221
3256
|
bubbles: !0,
|
|
3222
3257
|
cancelable: !0
|
|
3223
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;
|
|
3224
3259
|
}
|
|
3225
|
-
function
|
|
3260
|
+
function vo(e) {
|
|
3226
3261
|
e.draggable = !1;
|
|
3227
3262
|
}
|
|
3228
|
-
function
|
|
3229
|
-
|
|
3263
|
+
function yo() {
|
|
3264
|
+
eo = !1;
|
|
3230
3265
|
}
|
|
3231
|
-
function
|
|
3232
|
-
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;
|
|
3233
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;
|
|
3234
3269
|
}
|
|
3235
|
-
function
|
|
3236
|
-
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;
|
|
3237
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;
|
|
3238
3273
|
}
|
|
3239
|
-
function
|
|
3274
|
+
function So(e, t, n, r, i, a, o, s) {
|
|
3240
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;
|
|
3241
3276
|
if (!o) {
|
|
3242
|
-
if (s &&
|
|
3243
|
-
if (!
|
|
3244
|
-
else if (
|
|
3245
|
-
} 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);
|
|
3246
3281
|
}
|
|
3247
3282
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3248
3283
|
}
|
|
3249
|
-
function
|
|
3250
|
-
return
|
|
3284
|
+
function Co(e) {
|
|
3285
|
+
return da(W) < da(e) ? 1 : -1;
|
|
3251
3286
|
}
|
|
3252
|
-
function
|
|
3287
|
+
function wo(e) {
|
|
3253
3288
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3254
3289
|
return r.toString(36);
|
|
3255
3290
|
}
|
|
3256
|
-
function
|
|
3257
|
-
|
|
3291
|
+
function To(e) {
|
|
3292
|
+
to.length = 0;
|
|
3258
3293
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3259
3294
|
var r = t[n];
|
|
3260
|
-
r.checked &&
|
|
3295
|
+
r.checked && to.push(r);
|
|
3261
3296
|
}
|
|
3262
3297
|
}
|
|
3263
|
-
function
|
|
3298
|
+
function Eo(e) {
|
|
3264
3299
|
return setTimeout(e, 0);
|
|
3265
3300
|
}
|
|
3266
|
-
function
|
|
3301
|
+
function Do(e) {
|
|
3267
3302
|
return clearTimeout(e);
|
|
3268
3303
|
}
|
|
3269
|
-
|
|
3270
|
-
(Q.active ||
|
|
3304
|
+
no && I(document, "touchmove", function(e) {
|
|
3305
|
+
(Q.active || Ra) && e.cancelable && e.preventDefault();
|
|
3271
3306
|
}), Q.utils = {
|
|
3272
3307
|
on: I,
|
|
3273
3308
|
off: L,
|
|
3274
3309
|
css: z,
|
|
3275
|
-
find:
|
|
3310
|
+
find: oa,
|
|
3276
3311
|
is: function(e, t) {
|
|
3277
|
-
return !!
|
|
3312
|
+
return !!ra(e, t, e, !1);
|
|
3278
3313
|
},
|
|
3279
|
-
extend:
|
|
3280
|
-
throttle:
|
|
3281
|
-
closest:
|
|
3314
|
+
extend: ha,
|
|
3315
|
+
throttle: va,
|
|
3316
|
+
closest: ra,
|
|
3282
3317
|
toggleClass: R,
|
|
3283
|
-
clone:
|
|
3284
|
-
index:
|
|
3285
|
-
nextTick:
|
|
3286
|
-
cancelNextTick:
|
|
3287
|
-
detectDirection:
|
|
3288
|
-
getChild:
|
|
3318
|
+
clone: xa,
|
|
3319
|
+
index: da,
|
|
3320
|
+
nextTick: Eo,
|
|
3321
|
+
cancelNextTick: Do,
|
|
3322
|
+
detectDirection: so,
|
|
3323
|
+
getChild: la
|
|
3289
3324
|
}, Q.get = function(e) {
|
|
3290
3325
|
return e[V];
|
|
3291
3326
|
}, Q.mount = function() {
|
|
3292
3327
|
var e = [...arguments];
|
|
3293
3328
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3294
3329
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3295
|
-
e.utils && (Q.utils =
|
|
3330
|
+
e.utils && (Q.utils = Bi(Bi({}, Q.utils), e.utils)), Oa.mount(e);
|
|
3296
3331
|
});
|
|
3297
3332
|
}, Q.create = function(e, t) {
|
|
3298
3333
|
return new Q(e, t);
|
|
3299
|
-
}, Q.version =
|
|
3300
|
-
var $ = [],
|
|
3301
|
-
function
|
|
3334
|
+
}, Q.version = Ki;
|
|
3335
|
+
var $ = [], Oo, ko, Ao = !1, jo, Mo, No, Po;
|
|
3336
|
+
function Fo() {
|
|
3302
3337
|
function e() {
|
|
3303
3338
|
for (var e in this.defaults = {
|
|
3304
3339
|
scroll: !0,
|
|
@@ -3318,63 +3353,63 @@ function Mo() {
|
|
|
3318
3353
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3319
3354
|
},
|
|
3320
3355
|
drop: function() {
|
|
3321
|
-
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();
|
|
3322
3357
|
},
|
|
3323
3358
|
nulling: function() {
|
|
3324
|
-
|
|
3359
|
+
No = ko = Oo = Ao = Po = jo = Mo = null, $.length = 0;
|
|
3325
3360
|
},
|
|
3326
3361
|
_handleFallbackAutoScroll: function(e) {
|
|
3327
3362
|
this._handleAutoScroll(e, !0);
|
|
3328
3363
|
},
|
|
3329
3364
|
_handleAutoScroll: function(e, t) {
|
|
3330
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);
|
|
3331
|
-
if (
|
|
3332
|
-
|
|
3333
|
-
var o =
|
|
3334
|
-
|
|
3335
|
-
var a =
|
|
3336
|
-
a !== o && (o = a,
|
|
3337
|
-
}, 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);
|
|
3338
3373
|
} else {
|
|
3339
|
-
if (!this.options.bubbleScroll ||
|
|
3340
|
-
|
|
3374
|
+
if (!this.options.bubbleScroll || ma(a, !0) === sa()) {
|
|
3375
|
+
Io();
|
|
3341
3376
|
return;
|
|
3342
3377
|
}
|
|
3343
|
-
|
|
3378
|
+
Ro(e, this.options, ma(a, !1), !1);
|
|
3344
3379
|
}
|
|
3345
3380
|
}
|
|
3346
|
-
},
|
|
3381
|
+
}, Ui(e, {
|
|
3347
3382
|
pluginName: "scroll",
|
|
3348
3383
|
initializeByDefault: !0
|
|
3349
3384
|
});
|
|
3350
3385
|
}
|
|
3351
|
-
function
|
|
3386
|
+
function Io() {
|
|
3352
3387
|
$.forEach(function(e) {
|
|
3353
3388
|
clearInterval(e.pid);
|
|
3354
3389
|
}), $ = [];
|
|
3355
3390
|
}
|
|
3356
|
-
function
|
|
3357
|
-
clearInterval(
|
|
3391
|
+
function Lo() {
|
|
3392
|
+
clearInterval(Po);
|
|
3358
3393
|
}
|
|
3359
|
-
var
|
|
3394
|
+
var Ro = va(function(e, t, n, r) {
|
|
3360
3395
|
if (t.scroll) {
|
|
3361
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3362
|
-
|
|
3363
|
-
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;
|
|
3364
3399
|
do {
|
|
3365
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;
|
|
3366
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"));
|
|
3367
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);
|
|
3368
3403
|
if (!$[d]) for (var ee = 0; ee <= d; ee++) $[ee] || ($[ee] = {});
|
|
3369
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() {
|
|
3370
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3405
|
+
r && this.layer === 0 && Q.active._onTouchMove(No);
|
|
3371
3406
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3372
|
-
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);
|
|
3373
3408
|
}.bind({ layer: d }), 24))), d++;
|
|
3374
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3375
|
-
|
|
3409
|
+
} while (t.bubbleScroll && f !== c && (f = ma(f, !1)));
|
|
3410
|
+
Ao = l;
|
|
3376
3411
|
}
|
|
3377
|
-
}, 30),
|
|
3412
|
+
}, 30), zo = function(e) {
|
|
3378
3413
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3379
3414
|
if (t) {
|
|
3380
3415
|
var c = n || i;
|
|
@@ -3386,8 +3421,8 @@ var Fo = ha(function(e, t, n, r) {
|
|
|
3386
3421
|
}));
|
|
3387
3422
|
}
|
|
3388
3423
|
};
|
|
3389
|
-
function
|
|
3390
|
-
|
|
3424
|
+
function Bo() {}
|
|
3425
|
+
Bo.prototype = {
|
|
3391
3426
|
startIndex: null,
|
|
3392
3427
|
dragStart: function(e) {
|
|
3393
3428
|
var t = e.oldDraggableIndex;
|
|
@@ -3396,72 +3431,72 @@ Lo.prototype = {
|
|
|
3396
3431
|
onSpill: function(e) {
|
|
3397
3432
|
var t = e.dragEl, n = e.putSortable;
|
|
3398
3433
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3399
|
-
var r =
|
|
3434
|
+
var r = la(this.sortable.el, this.startIndex, this.options);
|
|
3400
3435
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3401
3436
|
},
|
|
3402
|
-
drop:
|
|
3403
|
-
},
|
|
3404
|
-
function
|
|
3405
|
-
|
|
3437
|
+
drop: zo
|
|
3438
|
+
}, Ui(Bo, { pluginName: "revertOnSpill" });
|
|
3439
|
+
function Vo() {}
|
|
3440
|
+
Vo.prototype = {
|
|
3406
3441
|
onSpill: function(e) {
|
|
3407
3442
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3408
3443
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3409
3444
|
},
|
|
3410
|
-
drop:
|
|
3411
|
-
},
|
|
3412
|
-
function
|
|
3445
|
+
drop: zo
|
|
3446
|
+
}, Ui(Vo, { pluginName: "removeOnSpill" }), Q.mount(new Fo()), Q.mount(Vo, Bo);
|
|
3447
|
+
function Ho(e) {
|
|
3413
3448
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3414
3449
|
}
|
|
3415
|
-
function
|
|
3450
|
+
function Uo(e) {
|
|
3416
3451
|
re() && r(e);
|
|
3417
3452
|
}
|
|
3418
|
-
function
|
|
3453
|
+
function Wo(e) {
|
|
3419
3454
|
re() ? a(e) : ie(e);
|
|
3420
3455
|
}
|
|
3421
|
-
var
|
|
3422
|
-
function
|
|
3423
|
-
|
|
3456
|
+
var Go = null, Ko = null;
|
|
3457
|
+
function qo(e = null, t = null) {
|
|
3458
|
+
Go = e, Ko = t;
|
|
3424
3459
|
}
|
|
3425
|
-
function
|
|
3460
|
+
function Jo() {
|
|
3426
3461
|
return {
|
|
3427
|
-
data:
|
|
3428
|
-
clonedData:
|
|
3462
|
+
data: Go,
|
|
3463
|
+
clonedData: Ko
|
|
3429
3464
|
};
|
|
3430
3465
|
}
|
|
3431
|
-
var
|
|
3432
|
-
function
|
|
3466
|
+
var Yo = Symbol("cloneElement");
|
|
3467
|
+
function Xo(...e) {
|
|
3433
3468
|
let t = re()?.proxy, n = null, r = e[0], [, i, a] = e;
|
|
3434
3469
|
Array.isArray(k(i)) || (a = i, i = null);
|
|
3435
|
-
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) ?? {};
|
|
3436
3471
|
function p(e) {
|
|
3437
3472
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3438
3473
|
n = u && !d ? o.slice(0, -1) : o;
|
|
3439
3474
|
let s = k(k(i)?.[r]), c = l(s);
|
|
3440
|
-
|
|
3475
|
+
qo(s, c), a[Yo] = c;
|
|
3441
3476
|
}
|
|
3442
3477
|
function m(e) {
|
|
3443
|
-
let t = e.item[
|
|
3444
|
-
if (!
|
|
3445
|
-
if (
|
|
3478
|
+
let t = e.item[Yo];
|
|
3479
|
+
if (!Oi(t)) {
|
|
3480
|
+
if (ji(e.item), g(i)) {
|
|
3446
3481
|
let n = [...k(i)];
|
|
3447
|
-
i.value =
|
|
3482
|
+
i.value = Di(n, e.newDraggableIndex, t);
|
|
3448
3483
|
return;
|
|
3449
3484
|
}
|
|
3450
|
-
|
|
3485
|
+
Di(k(i), e.newDraggableIndex, t);
|
|
3451
3486
|
}
|
|
3452
3487
|
}
|
|
3453
3488
|
function h(e) {
|
|
3454
3489
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3455
|
-
if (
|
|
3456
|
-
|
|
3490
|
+
if (Ai(t, n, r), o === "clone") {
|
|
3491
|
+
ji(s);
|
|
3457
3492
|
return;
|
|
3458
3493
|
}
|
|
3459
3494
|
if (g(i)) {
|
|
3460
3495
|
let e = [...k(i)];
|
|
3461
|
-
i.value =
|
|
3496
|
+
i.value = Ei(e, a);
|
|
3462
3497
|
return;
|
|
3463
3498
|
}
|
|
3464
|
-
|
|
3499
|
+
Ei(k(i), a);
|
|
3465
3500
|
}
|
|
3466
3501
|
function _(e) {
|
|
3467
3502
|
if (f) {
|
|
@@ -3469,12 +3504,12 @@ function qo(...e) {
|
|
|
3469
3504
|
return;
|
|
3470
3505
|
}
|
|
3471
3506
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3472
|
-
if (
|
|
3507
|
+
if (ji(n), Ai(t, n, r), g(i)) {
|
|
3473
3508
|
let e = [...k(i)];
|
|
3474
|
-
i.value =
|
|
3509
|
+
i.value = Ci(e, a, o);
|
|
3475
3510
|
return;
|
|
3476
3511
|
}
|
|
3477
|
-
|
|
3512
|
+
Ci(k(i), a, o);
|
|
3478
3513
|
}
|
|
3479
3514
|
function v(e) {
|
|
3480
3515
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -3493,7 +3528,7 @@ function qo(...e) {
|
|
|
3493
3528
|
n = null;
|
|
3494
3529
|
}
|
|
3495
3530
|
ie(() => {
|
|
3496
|
-
if (
|
|
3531
|
+
if (qo(), o) throw o;
|
|
3497
3532
|
});
|
|
3498
3533
|
}
|
|
3499
3534
|
let y = {
|
|
@@ -3505,19 +3540,19 @@ function qo(...e) {
|
|
|
3505
3540
|
};
|
|
3506
3541
|
function b(e) {
|
|
3507
3542
|
let n = k(r);
|
|
3508
|
-
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;
|
|
3509
3544
|
}
|
|
3510
3545
|
function x() {
|
|
3511
|
-
let e = k(a) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3512
|
-
return
|
|
3513
|
-
|
|
3514
|
-
}),
|
|
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);
|
|
3515
3550
|
}
|
|
3516
3551
|
let S = (e) => {
|
|
3517
3552
|
e = b(e), o && C.destroy(), o = new Q(e, x());
|
|
3518
3553
|
};
|
|
3519
3554
|
c(() => a, () => {
|
|
3520
|
-
o &&
|
|
3555
|
+
o && Ii(x(), (e, t) => {
|
|
3521
3556
|
o?.option(e, t);
|
|
3522
3557
|
});
|
|
3523
3558
|
}, { deep: !0 });
|
|
@@ -3530,15 +3565,15 @@ function qo(...e) {
|
|
|
3530
3565
|
toArray: () => o?.toArray(),
|
|
3531
3566
|
closest: (...e) => o?.closest(...e)
|
|
3532
3567
|
};
|
|
3533
|
-
return
|
|
3568
|
+
return Wo(() => {
|
|
3534
3569
|
s && S();
|
|
3535
|
-
}),
|
|
3570
|
+
}), Uo(C.destroy), vi({
|
|
3536
3571
|
start: S,
|
|
3537
3572
|
pause: () => C?.option("disabled", !0),
|
|
3538
3573
|
resume: () => C?.option("disabled", !1)
|
|
3539
3574
|
}, C);
|
|
3540
3575
|
}
|
|
3541
|
-
var
|
|
3576
|
+
var Zo = [
|
|
3542
3577
|
"update",
|
|
3543
3578
|
"start",
|
|
3544
3579
|
"add",
|
|
@@ -3551,7 +3586,7 @@ var Jo = [
|
|
|
3551
3586
|
"clone",
|
|
3552
3587
|
"move",
|
|
3553
3588
|
"change"
|
|
3554
|
-
],
|
|
3589
|
+
], Qo = y({
|
|
3555
3590
|
name: "VueDraggable",
|
|
3556
3591
|
model: {
|
|
3557
3592
|
prop: "modelValue",
|
|
@@ -3601,37 +3636,37 @@ var Jo = [
|
|
|
3601
3636
|
"tag",
|
|
3602
3637
|
"target",
|
|
3603
3638
|
"customUpdate",
|
|
3604
|
-
...
|
|
3639
|
+
...Zo.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3605
3640
|
],
|
|
3606
|
-
emits: ["update:modelValue", ...
|
|
3641
|
+
emits: ["update:modelValue", ...Zo],
|
|
3607
3642
|
setup(t, { slots: n, emit: r, expose: i, attrs: a }) {
|
|
3608
|
-
let o =
|
|
3643
|
+
let o = Zo.reduce((e, t) => {
|
|
3609
3644
|
let n = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3610
3645
|
return e[n] = (...e) => r(t, ...e), e;
|
|
3611
3646
|
}, {}), s = j(() => {
|
|
3612
|
-
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]) => {
|
|
3613
3648
|
let r = k(n);
|
|
3614
3649
|
return r !== void 0 && (e[t] = r), e;
|
|
3615
3650
|
}, {});
|
|
3616
|
-
return
|
|
3651
|
+
return vi(vi({}, o), Ti(vi(vi({}, a), s)));
|
|
3617
3652
|
}), c = j({
|
|
3618
3653
|
get: () => t.modelValue,
|
|
3619
3654
|
set: (e) => r("update:modelValue", e)
|
|
3620
|
-
}), l = _(), u = ee(
|
|
3655
|
+
}), l = _(), u = ee(Xo(t.target || l, c, s));
|
|
3621
3656
|
return i(u), () => ae(t.tag || "div", { ref: l }, (n?.default)?.call(n, u));
|
|
3622
3657
|
}
|
|
3623
|
-
}),
|
|
3658
|
+
}), $o = {
|
|
3624
3659
|
mounted: "mounted",
|
|
3625
3660
|
unmounted: "unmounted"
|
|
3626
3661
|
};
|
|
3627
|
-
|
|
3662
|
+
$o.mounted, $o.unmounted;
|
|
3628
3663
|
//#endregion
|
|
3629
3664
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3630
|
-
var
|
|
3665
|
+
var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
3631
3666
|
key: 0,
|
|
3632
3667
|
"data-testid": "section-drop-hint",
|
|
3633
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)]"
|
|
3634
|
-
},
|
|
3669
|
+
}, rs = /* @__PURE__ */ y({
|
|
3635
3670
|
__name: "SectionBlock",
|
|
3636
3671
|
props: {
|
|
3637
3672
|
block: {},
|
|
@@ -3639,12 +3674,12 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3639
3674
|
},
|
|
3640
3675
|
setup(e) {
|
|
3641
3676
|
let n = {
|
|
3642
|
-
title:
|
|
3643
|
-
paragraph:
|
|
3644
|
-
image:
|
|
3677
|
+
title: di,
|
|
3678
|
+
paragraph: qr,
|
|
3679
|
+
image: Pr,
|
|
3645
3680
|
button: Sn,
|
|
3646
|
-
divider:
|
|
3647
|
-
custom:
|
|
3681
|
+
divider: hr,
|
|
3682
|
+
custom: pr
|
|
3648
3683
|
}, r = e, { t: a } = Tt(), s = et(ht, "SectionBlock"), c = N(bt, null), l = N(_t, null), u = j(() => {
|
|
3649
3684
|
switch (r.block.columns) {
|
|
3650
3685
|
case "2": return ["50%", "50%"];
|
|
@@ -3671,7 +3706,7 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3671
3706
|
i[e] = n, s.updateBlock(r.block.id, { children: i });
|
|
3672
3707
|
}
|
|
3673
3708
|
function v(e) {
|
|
3674
|
-
return
|
|
3709
|
+
return Jr(e, l, n);
|
|
3675
3710
|
}
|
|
3676
3711
|
function y(e, t) {
|
|
3677
3712
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
@@ -3679,16 +3714,16 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3679
3714
|
dataSourceFetched: t.dataSourceFetched
|
|
3680
3715
|
});
|
|
3681
3716
|
}
|
|
3682
|
-
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", {
|
|
3683
3718
|
key: r,
|
|
3684
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)]" : ""]),
|
|
3685
3720
|
style: i({ width: u.value[r] })
|
|
3686
|
-
}, [w(k(
|
|
3721
|
+
}, [w(k(Qo), {
|
|
3687
3722
|
"model-value": g(r),
|
|
3688
3723
|
group: {
|
|
3689
3724
|
name: "blocks",
|
|
3690
3725
|
pull: !0,
|
|
3691
|
-
put: (e, t, n) => k(
|
|
3726
|
+
put: (e, t, n) => k(fi)(n)
|
|
3692
3727
|
},
|
|
3693
3728
|
animation: 150,
|
|
3694
3729
|
"ghost-class": "tpl-ghost",
|
|
@@ -3701,7 +3736,7 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3701
3736
|
class: "tpl:min-h-[60px]",
|
|
3702
3737
|
"onUpdate:modelValue": (e) => _(r, e)
|
|
3703
3738
|
}, {
|
|
3704
|
-
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, {
|
|
3705
3740
|
block: t,
|
|
3706
3741
|
"is-selected": k(s).state.selectedBlockId === t.id,
|
|
3707
3742
|
viewport: e.viewport,
|
|
@@ -3732,13 +3767,13 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3732
3767
|
"model-value",
|
|
3733
3768
|
"group",
|
|
3734
3769
|
"onUpdate:modelValue"
|
|
3735
|
-
]), 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))])]));
|
|
3736
3771
|
}
|
|
3737
|
-
}),
|
|
3772
|
+
}), is = ke, as = {
|
|
3738
3773
|
small: 24,
|
|
3739
3774
|
medium: 32,
|
|
3740
3775
|
large: 48
|
|
3741
|
-
},
|
|
3776
|
+
}, os = [
|
|
3742
3777
|
"facebook",
|
|
3743
3778
|
"twitter",
|
|
3744
3779
|
"instagram",
|
|
@@ -3756,11 +3791,11 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3756
3791
|
"github",
|
|
3757
3792
|
"dribbble",
|
|
3758
3793
|
"behance"
|
|
3759
|
-
],
|
|
3794
|
+
], ss = [
|
|
3760
3795
|
"width",
|
|
3761
3796
|
"height",
|
|
3762
3797
|
"fill"
|
|
3763
|
-
],
|
|
3798
|
+
], cs = ["d"], ls = /* @__PURE__ */ y({
|
|
3764
3799
|
__name: "SocialIconSvg",
|
|
3765
3800
|
props: {
|
|
3766
3801
|
platform: {},
|
|
@@ -3768,7 +3803,7 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3768
3803
|
iconSize: {}
|
|
3769
3804
|
},
|
|
3770
3805
|
setup(e) {
|
|
3771
|
-
let t = e, n = j(() =>
|
|
3806
|
+
let t = e, n = j(() => is[t.platform]), r = j(() => as[t.iconSize]), a = j(() => {
|
|
3772
3807
|
let e = {
|
|
3773
3808
|
display: "inline-flex",
|
|
3774
3809
|
alignItems: "center",
|
|
@@ -3812,12 +3847,12 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3812
3847
|
viewBox: "0 0 24 24",
|
|
3813
3848
|
fill: s.value,
|
|
3814
3849
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3815
|
-
}, [b("path", { d: n.value.path }, null, 8,
|
|
3850
|
+
}, [b("path", { d: n.value.path }, null, 8, cs)], 8, ss))], 4));
|
|
3816
3851
|
}
|
|
3817
|
-
}),
|
|
3852
|
+
}), us = { class: "tpl:w-full" }, ds = ["href"], fs = {
|
|
3818
3853
|
key: 1,
|
|
3819
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)]"
|
|
3820
|
-
},
|
|
3855
|
+
}, ps = /* @__PURE__ */ y({
|
|
3821
3856
|
__name: "SocialIconsBlock",
|
|
3822
3857
|
props: {
|
|
3823
3858
|
block: {},
|
|
@@ -3830,7 +3865,7 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3830
3865
|
gap: `${n.block.spacing}px`,
|
|
3831
3866
|
justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
|
|
3832
3867
|
})), o = j(() => n.block.icons.length > 0);
|
|
3833
|
-
return (n, s) => (f(), x("div",
|
|
3868
|
+
return (n, s) => (f(), x("div", us, [o.value ? (f(), x("div", {
|
|
3834
3869
|
key: 0,
|
|
3835
3870
|
style: i(a.value)
|
|
3836
3871
|
}, [(f(!0), x(A, null, t(e.block.icons, (t) => (f(), x("a", {
|
|
@@ -3838,7 +3873,7 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3838
3873
|
href: t.url || "#",
|
|
3839
3874
|
class: "tpl:cursor-default",
|
|
3840
3875
|
onClick: s[0] ||= P(() => {}, ["prevent"])
|
|
3841
|
-
}, [w(
|
|
3876
|
+
}, [w(ls, {
|
|
3842
3877
|
platform: t.platform,
|
|
3843
3878
|
"icon-style": e.block.iconStyle,
|
|
3844
3879
|
"icon-size": e.block.iconSize
|
|
@@ -3846,16 +3881,16 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3846
3881
|
"platform",
|
|
3847
3882
|
"icon-style",
|
|
3848
3883
|
"icon-size"
|
|
3849
|
-
])], 8,
|
|
3884
|
+
])], 8, ds))), 128))], 4)) : (f(), x("div", fs, [w(k(Nn), { size: 16 }), b("span", null, p(k(r).social.addIcons), 1)]))]));
|
|
3850
3885
|
}
|
|
3851
|
-
}),
|
|
3886
|
+
}), ms = { class: "tpl:w-full" }, hs = {
|
|
3852
3887
|
key: 0,
|
|
3853
3888
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3854
3889
|
style: {
|
|
3855
3890
|
"background-color": "var(--tpl-bg-hover)",
|
|
3856
3891
|
color: "var(--tpl-text-dim)"
|
|
3857
3892
|
}
|
|
3858
|
-
},
|
|
3893
|
+
}, gs = /* @__PURE__ */ y({
|
|
3859
3894
|
__name: "SpacerBlock",
|
|
3860
3895
|
props: {
|
|
3861
3896
|
block: {},
|
|
@@ -3867,23 +3902,23 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3867
3902
|
minHeight: `${t.block.height}px`,
|
|
3868
3903
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3869
3904
|
}));
|
|
3870
|
-
return (t, a) => (f(), x("div",
|
|
3905
|
+
return (t, a) => (f(), x("div", ms, [b("div", {
|
|
3871
3906
|
style: i(r.value),
|
|
3872
3907
|
class: o(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !k(n).state.previewMode }])
|
|
3873
|
-
}, [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)]));
|
|
3874
3909
|
}
|
|
3875
|
-
}),
|
|
3910
|
+
}), _s = { class: "tpl:w-full" }, vs = { key: 0 }, ys = [
|
|
3876
3911
|
"aria-label",
|
|
3877
3912
|
"data-placeholder",
|
|
3878
3913
|
"onBlur"
|
|
3879
|
-
],
|
|
3914
|
+
], bs = [
|
|
3880
3915
|
"aria-label",
|
|
3881
3916
|
"data-placeholder",
|
|
3882
3917
|
"onBlur"
|
|
3883
|
-
],
|
|
3918
|
+
], xs = {
|
|
3884
3919
|
key: 1,
|
|
3885
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)]"
|
|
3886
|
-
},
|
|
3921
|
+
}, Ss = /*#__PURE__*/ Mt(/* @__PURE__ */ y({
|
|
3887
3922
|
__name: "TableBlock",
|
|
3888
3923
|
props: {
|
|
3889
3924
|
block: {},
|
|
@@ -3897,14 +3932,16 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3897
3932
|
updated(e, t) {
|
|
3898
3933
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
3899
3934
|
}
|
|
3900
|
-
}, r = e, { t: a } = Tt(), o = et(ht, "TableBlock"), s = j(() => r.block.rows.length > 0), c = j(() =>
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3935
|
+
}, r = e, { t: a } = Tt(), o = et(ht, "TableBlock"), s = j(() => r.block.rows.length > 0), c = j(() => {
|
|
3936
|
+
let e = {
|
|
3937
|
+
width: "100%",
|
|
3938
|
+
borderCollapse: "collapse",
|
|
3939
|
+
fontSize: `${r.block.fontSize}px`,
|
|
3940
|
+
textAlign: r.block.textAlign,
|
|
3941
|
+
fontFamily: r.block.fontFamily || "inherit"
|
|
3942
|
+
};
|
|
3943
|
+
return r.block.color && (e.color = r.block.color), e;
|
|
3944
|
+
}), l = j(() => ({
|
|
3908
3945
|
border: `${r.block.borderWidth}px solid ${r.block.borderColor}`,
|
|
3909
3946
|
padding: `${r.block.cellPadding}px`,
|
|
3910
3947
|
textAlign: r.block.textAlign
|
|
@@ -3926,11 +3963,11 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3926
3963
|
} : n);
|
|
3927
3964
|
o.updateBlock(r.block.id, { rows: a });
|
|
3928
3965
|
}
|
|
3929
|
-
return (e, r) => (f(), x("div",
|
|
3966
|
+
return (e, r) => (f(), x("div", _s, [s.value ? (f(), x("table", {
|
|
3930
3967
|
key: 0,
|
|
3931
3968
|
style: i(c.value),
|
|
3932
3969
|
class: "tpl-table-editable"
|
|
3933
|
-
}, [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", {
|
|
3934
3971
|
key: e.id,
|
|
3935
3972
|
style: i(u.value),
|
|
3936
3973
|
"aria-label": k(a).table.cellPlaceholder,
|
|
@@ -3939,7 +3976,7 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3939
3976
|
onBlur: (t) => g(d.value.id, e.id, t),
|
|
3940
3977
|
onKeydown: r[0] ||= ce(P((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3941
3978
|
onClick: P(h, ["stop"])
|
|
3942
|
-
}, 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", {
|
|
3943
3980
|
key: t.id,
|
|
3944
3981
|
style: i(l.value),
|
|
3945
3982
|
"aria-label": k(a).table.cellPlaceholder,
|
|
@@ -3948,9 +3985,9 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3948
3985
|
onBlur: (n) => g(e.id, t.id, n),
|
|
3949
3986
|
onKeydown: r[1] ||= ce(P((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3950
3987
|
onClick: P(h, ["stop"])
|
|
3951
|
-
}, 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)]))]));
|
|
3952
3989
|
}
|
|
3953
|
-
}), [["__scopeId", "data-v-
|
|
3990
|
+
}), [["__scopeId", "data-v-963ac422"]]), Cs = /* @__PURE__ */ y({
|
|
3954
3991
|
__name: "VideoPlayButton",
|
|
3955
3992
|
props: { hoverEffect: {
|
|
3956
3993
|
type: Boolean,
|
|
@@ -3968,7 +4005,7 @@ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
|
|
|
3968
4005
|
});
|
|
3969
4006
|
//#endregion
|
|
3970
4007
|
//#region src/utils/videoThumbnail.ts
|
|
3971
|
-
function
|
|
4008
|
+
function ws(e) {
|
|
3972
4009
|
if (!e) return {
|
|
3973
4010
|
platform: "unknown",
|
|
3974
4011
|
videoId: null,
|
|
@@ -4000,25 +4037,25 @@ function xs(e) {
|
|
|
4000
4037
|
thumbnailUrl: null
|
|
4001
4038
|
};
|
|
4002
4039
|
}
|
|
4003
|
-
function
|
|
4004
|
-
return t ||
|
|
4040
|
+
function Ts(e, t) {
|
|
4041
|
+
return t || ws(e).thumbnailUrl;
|
|
4005
4042
|
}
|
|
4006
4043
|
//#endregion
|
|
4007
4044
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4008
|
-
var
|
|
4045
|
+
var Es = ["src", "alt"], Ds = {
|
|
4009
4046
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4010
4047
|
style: { opacity: "0.7" }
|
|
4011
|
-
},
|
|
4048
|
+
}, Os = ["href"], ks = ["src", "alt"], As = ["src", "alt"], js = {
|
|
4012
4049
|
key: 3,
|
|
4013
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)]"
|
|
4014
|
-
},
|
|
4051
|
+
}, Ms = /* @__PURE__ */ y({
|
|
4015
4052
|
__name: "VideoBlock",
|
|
4016
4053
|
props: {
|
|
4017
4054
|
block: {},
|
|
4018
4055
|
viewport: {}
|
|
4019
4056
|
},
|
|
4020
4057
|
setup(e) {
|
|
4021
|
-
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(() => {
|
|
4022
4059
|
let e = t.block.align;
|
|
4023
4060
|
return {
|
|
4024
4061
|
maxWidth: "100%",
|
|
@@ -4039,7 +4076,7 @@ var Cs = ["src", "alt"], ws = {
|
|
|
4039
4076
|
class: "tpl:w-full tpl:border-0",
|
|
4040
4077
|
src: e.block.placeholderUrl,
|
|
4041
4078
|
alt: e.block.alt
|
|
4042
|
-
}, null, 8,
|
|
4079
|
+
}, null, 8, Es), w(Cs)], 4)) : a.value ? (f(), x("div", {
|
|
4043
4080
|
key: 1,
|
|
4044
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)]",
|
|
4045
4082
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
|
|
@@ -4048,7 +4085,7 @@ var Cs = ["src", "alt"], ws = {
|
|
|
4048
4085
|
"stroke-width": 1.5,
|
|
4049
4086
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4050
4087
|
style: { opacity: "0.5" }
|
|
4051
|
-
}), 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", {
|
|
4052
4089
|
key: 0,
|
|
4053
4090
|
href: e.block.url,
|
|
4054
4091
|
target: "_blank",
|
|
@@ -4060,7 +4097,7 @@ var Cs = ["src", "alt"], ws = {
|
|
|
4060
4097
|
class: "tpl:w-full tpl:border-0",
|
|
4061
4098
|
src: o.value,
|
|
4062
4099
|
alt: e.block.alt
|
|
4063
|
-
}, null, 8,
|
|
4100
|
+
}, null, 8, ks), w(Cs, { "hover-effect": "" })], 12, Os)) : (f(), x("div", {
|
|
4064
4101
|
key: 1,
|
|
4065
4102
|
class: "tpl:relative tpl:inline-block",
|
|
4066
4103
|
style: i(c.value)
|
|
@@ -4068,28 +4105,28 @@ var Cs = ["src", "alt"], ws = {
|
|
|
4068
4105
|
class: "tpl:w-full tpl:border-0",
|
|
4069
4106
|
src: o.value,
|
|
4070
4107
|
alt: e.block.alt
|
|
4071
|
-
}, null, 8,
|
|
4108
|
+
}, null, 8, As), w(Cs)], 4))], 64)) : (f(), x("div", js, [w(k(Fn), {
|
|
4072
4109
|
size: 40,
|
|
4073
4110
|
"stroke-width": 1.5,
|
|
4074
4111
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4075
4112
|
}), b("span", null, p(k(n).video.addVideo), 1)]))], 4));
|
|
4076
4113
|
}
|
|
4077
|
-
}),
|
|
4078
|
-
section:
|
|
4079
|
-
title:
|
|
4080
|
-
paragraph:
|
|
4081
|
-
image:
|
|
4114
|
+
}), Ns = {
|
|
4115
|
+
section: rs,
|
|
4116
|
+
title: di,
|
|
4117
|
+
paragraph: qr,
|
|
4118
|
+
image: Pr,
|
|
4082
4119
|
button: Sn,
|
|
4083
|
-
divider:
|
|
4084
|
-
video:
|
|
4085
|
-
social:
|
|
4086
|
-
menu:
|
|
4087
|
-
table:
|
|
4088
|
-
spacer:
|
|
4089
|
-
html:
|
|
4090
|
-
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))
|
|
4091
4128
|
};
|
|
4092
|
-
function
|
|
4129
|
+
function Ps(e) {
|
|
4093
4130
|
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Tt(r);
|
|
4094
4131
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
4095
4132
|
let { resolvedTheme: l } = rn(j(() => t.state.uiTheme)), d = _(n.theme ?? {}), { themeStyles: f } = on({
|
|
@@ -4121,9 +4158,9 @@ function js(e) {
|
|
|
4121
4158
|
t: a,
|
|
4122
4159
|
format: o
|
|
4123
4160
|
}), b = un();
|
|
4124
|
-
if (hn(b,
|
|
4161
|
+
if (hn(b, Ns), n.customBlocks?.length) for (let e of n.customBlocks) b.registerCustom(e, pr);
|
|
4125
4162
|
function x(e) {
|
|
4126
|
-
for (let t of e) b.registerCustom(t,
|
|
4163
|
+
for (let t of e) b.registerCustom(t, pr);
|
|
4127
4164
|
}
|
|
4128
4165
|
let S = Xt();
|
|
4129
4166
|
if (s() && u(S.dispose), e.containerEl) {
|
|
@@ -4178,4 +4215,4 @@ function js(e) {
|
|
|
4178
4215
|
};
|
|
4179
4216
|
}
|
|
4180
4217
|
//#endregion
|
|
4181
|
-
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 };
|