@templatical/editor 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-Bru6-ziQ.js → AiChatSidebar-Nq-jrGaf.js} +2 -2
- package/dist/{AiFeatureMenu-CcqjRMFW.js → AiFeatureMenu-tg_zMKMK.js} +3 -3
- package/dist/{BlockIssueBadge-Dmj9rVra.js → BlockIssueBadge-Bd94kIiw.js} +2 -2
- package/dist/BlockPreviewCanvas-B34aMhHe.js +117 -0
- package/dist/{CloudEditor-iK4vkpNm.js → CloudEditor-DjN_9Yso.js} +124 -119
- package/dist/{CollaboratorBar-C_1SF7Xf.js → CollaboratorBar-Bhazzcg-.js} +2 -2
- package/dist/{ColorPicker-s9GHXjZs.js → ColorPicker-DXGrcJxJ.js} +5 -5
- package/dist/{CommentsSidebar-DvNEdugN.js → CommentsSidebar-ku1kt10u.js} +3 -3
- package/dist/{CountdownBlock-J_Q9JRQM.js → CountdownBlock-CN9Lc23W.js} +1 -1
- package/dist/{CountdownToolbar-DPRcv3Fu.js → CountdownToolbar-VEsIyKV6.js} +3 -3
- package/dist/{DesignReferenceSidebar-BxPo0zyx.js → DesignReferenceSidebar-C4pTMzQE.js} +3 -3
- package/dist/{IssuesPanel-CEnEGFtd.js → IssuesPanel-CEfzOpS_.js} +2 -2
- package/dist/MergeTagModeToggle-C3V2xGAg.js +180 -0
- package/dist/{MergeTagSuggestion-D9eCryMC.js → MergeTagSuggestion-Dn8ww9nV.js} +2 -2
- package/dist/{NumberWithSuffix-CCPN_oCh.js → NumberWithSuffix-BGocZkj9.js} +1 -1
- package/dist/{ParagraphEditor-MKJYyWN9.js → ParagraphEditor-D-fz0kUb.js} +19 -19
- package/dist/{RichTextEditorContent-FbnWsh46.js → RichTextEditorContent-DydrqFts.js} +5 -5
- package/dist/{SaveBlockDialog-CFAJHP3v.js → SaveBlockDialog-BDDFbAWF.js} +6 -6
- package/dist/{SavedBlocksBrowserModal-C_-Xcm0Q.js → SavedBlocksBrowserModal-Djik_fJh.js} +6 -6
- package/dist/{SavedBlocksPanels-CRf7zzFn.js → SavedBlocksPanels-CxemyPxL.js} +1 -1
- package/dist/{SavedBlocksPickBar-C1FTJP-I.js → SavedBlocksPickBar-Dlhipmob.js} +2 -2
- package/dist/{SnapshotHistory-DWlQ3Eh0.js → SnapshotHistory-DPbM4ons.js} +4 -4
- package/dist/{TemplateScoringPanel-ifGGGWs5.js → TemplateScoringPanel-BFYgweDX.js} +2 -2
- package/dist/{TestEmailModal-D90-3Yex.js → TestEmailModal-IZfwgya-.js} +71 -59
- package/dist/{TestEmailPanel-B0u_Yd3X.js → TestEmailPanel-QEEx_PkN.js} +1 -1
- package/dist/{TitleEditor-DzsPxKv4.js → TitleEditor-BB4YlIBF.js} +10 -10
- package/dist/{TplModal-CykwWFhF.js → TplModal-DPH4vV8M.js} +3 -3
- package/dist/{blockTypeIcons-CpKkI47V.js → blockTypeIcons-Wzd7W_2x.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-D47BxSGu.js → ca-CO4nq6TX.js} +8 -1
- package/dist/cdn/chunks/{AiChatSidebar-BMnsF8G6.js → AiChatSidebar-CN-0DIuA.js} +11 -11
- package/dist/cdn/chunks/{AiChatSidebar-BMnsF8G6.js.map → AiChatSidebar-CN-0DIuA.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-hWgWQg11.js → AiFeatureMenu-B5pV6Iux.js} +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-hWgWQg11.js.map → AiFeatureMenu-B5pV6Iux.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-Da4yR-mh.js → BlockIssueBadge-aanOjeyi.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-Da4yR-mh.js.map → BlockIssueBadge-aanOjeyi.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-Dc4F4HzY.js +119 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-Dc4F4HzY.js.map +1 -0
- package/dist/cdn/chunks/{CloudEditor-S8zLHtKb.js → CloudEditor-CeKaWWO5.js} +129 -124
- package/dist/cdn/chunks/CloudEditor-CeKaWWO5.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-mkJVAkSh.js → CollaboratorBar-CEdKr0A2.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-mkJVAkSh.js.map → CollaboratorBar-CEdKr0A2.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-DZSzZ5ZP.js → ColorPicker-BckwEfcN.js} +7 -7
- package/dist/cdn/chunks/{ColorPicker-DZSzZ5ZP.js.map → ColorPicker-BckwEfcN.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-DHdRiGPX.js → CommentsSidebar-6PfpJKh-.js} +18 -18
- package/dist/cdn/chunks/{CommentsSidebar-DHdRiGPX.js.map → CommentsSidebar-6PfpJKh-.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-Bffpoppw.js → CountdownBlock-CoBmvQKv.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-Bffpoppw.js.map → CountdownBlock-CoBmvQKv.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DAnmIZjq.js → CountdownToolbar-CdV8RTQu.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-DAnmIZjq.js.map → CountdownToolbar-CdV8RTQu.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-CM-k15pd.js → DesignReferenceSidebar-BjlaP69l.js} +90 -90
- package/dist/cdn/chunks/{DesignReferenceSidebar-CM-k15pd.js.map → DesignReferenceSidebar-BjlaP69l.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-D80JedOj.js → IssuesPanel-CkkEnhxZ.js} +9 -9
- package/dist/cdn/chunks/{IssuesPanel-D80JedOj.js.map → IssuesPanel-CkkEnhxZ.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagModeToggle-DmtR300G.js +127 -0
- package/dist/cdn/chunks/MergeTagModeToggle-DmtR300G.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagSuggestion-BM349_QH.js → MergeTagSuggestion-Cvlkw_PM.js} +2 -2
- package/dist/cdn/chunks/{MergeTagSuggestion-BM349_QH.js.map → MergeTagSuggestion-Cvlkw_PM.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-CjlVNIEe.js → NumberWithSuffix-BOcMN26z.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-CjlVNIEe.js.map → NumberWithSuffix-BOcMN26z.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-J-1RLyi7.js → ParagraphEditor-CX1yks4N.js} +35 -35
- package/dist/cdn/chunks/{ParagraphEditor-J-1RLyi7.js.map → ParagraphEditor-CX1yks4N.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BbdgJqWM.js → RichTextEditorContent-z9s7qxs3.js} +7 -7
- package/dist/cdn/chunks/{RichTextEditorContent-BbdgJqWM.js.map → RichTextEditorContent-z9s7qxs3.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-Bi_Z3kuA.js → SaveBlockDialog-D2CtW4lC.js} +8 -8
- package/dist/cdn/chunks/{SaveBlockDialog-Bi_Z3kuA.js.map → SaveBlockDialog-D2CtW4lC.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CesYxFsH.js → SavedBlocksBrowserModal-DdUKJzzF.js} +8 -8
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CesYxFsH.js.map → SavedBlocksBrowserModal-DdUKJzzF.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-BsSpJwrW.js → SavedBlocksPanels-1kVbqdpc.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-BsSpJwrW.js.map → SavedBlocksPanels-1kVbqdpc.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-CduR1Cpb.js → SavedBlocksPickBar--noDJIyN.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksPickBar-CduR1Cpb.js.map → SavedBlocksPickBar--noDJIyN.js.map} +1 -1
- package/dist/cdn/chunks/{SnapshotHistory-DO-gzr3i.js → SnapshotHistory-DFuNJRc9.js} +8 -8
- package/dist/cdn/chunks/{SnapshotHistory-DO-gzr3i.js.map → SnapshotHistory-DFuNJRc9.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-CTk8WwxU.js → TemplateScoringPanel-DG1dAjQk.js} +52 -52
- package/dist/cdn/chunks/{TemplateScoringPanel-CTk8WwxU.js.map → TemplateScoringPanel-DG1dAjQk.js.map} +1 -1
- package/dist/cdn/chunks/TestEmailModal-CiPfOn2v.js +174 -0
- package/dist/cdn/chunks/TestEmailModal-CiPfOn2v.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-048m0kxX.js → TestEmailPanel-saOfnpjz.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-048m0kxX.js.map → TestEmailPanel-saOfnpjz.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-J1vgU_J6.js → TitleEditor-08KM_VzZ.js} +18 -18
- package/dist/cdn/chunks/{TitleEditor-J1vgU_J6.js.map → TitleEditor-08KM_VzZ.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-BN53d9Se.js → TplModal-Cu4tBBnF.js} +4 -4
- package/dist/cdn/chunks/{TplModal-BN53d9Se.js.map → TplModal-Cu4tBBnF.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-DvohkXqi.js +21 -0
- package/dist/cdn/chunks/{blockTypeIcons-etMMQoVv.js.map → blockTypeIcons-DvohkXqi.js.map} +1 -1
- package/dist/cdn/chunks/{ca-D47BxSGu.js → ca-CO4nq6TX.js} +9 -2
- package/dist/cdn/chunks/{ca-D47BxSGu.js.map → ca-CO4nq6TX.js.map} +1 -1
- package/dist/cdn/chunks/{cloud-F-aVi9hj.js → cloud-C2I0P9qj.js} +2 -2
- package/dist/cdn/chunks/{cloud-F-aVi9hj.js.map → cloud-C2I0P9qj.js.map} +1 -1
- package/dist/{de-CnnxBwh7.js → cdn/chunks/de-CUeaFJph.js} +10 -1
- package/dist/cdn/chunks/{de-CnnxBwh7.js.map → de-CUeaFJph.js.map} +1 -1
- package/dist/{en-5gW-bYy2.js → cdn/chunks/en-zCYIPAL5.js} +10 -1
- package/dist/cdn/chunks/{en-5gW-bYy2.js.map → en-zCYIPAL5.js.map} +1 -1
- package/dist/cdn/chunks/{es-sQ9SdI0l.js → es-BSiH7YkP.js} +9 -2
- package/dist/cdn/chunks/{es-sQ9SdI0l.js.map → es-BSiH7YkP.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-C49c51P1.js → extensions-DBWF_lxx.js} +16 -16
- package/dist/cdn/chunks/{extensions-C49c51P1.js.map → extensions-DBWF_lxx.js.map} +1 -1
- package/dist/{fr-DBZ5w21C.js → cdn/chunks/fr-DTVJ3det.js} +10 -1
- package/dist/cdn/chunks/fr-DTVJ3det.js.map +1 -0
- package/dist/cdn/chunks/{icons-CYWw8Xfp.js → icons-Cqxvwgz7.js} +35 -14
- package/dist/cdn/chunks/icons-Cqxvwgz7.js.map +1 -0
- package/dist/cdn/chunks/keys-B5uoP9P7.js +12 -0
- package/dist/cdn/chunks/keys-B5uoP9P7.js.map +1 -0
- package/dist/cdn/chunks/{nl-DOL7Fnfo.js → nl-BqSquFS3.js} +9 -2
- package/dist/cdn/chunks/nl-BqSquFS3.js.map +1 -0
- package/dist/{pt-BR-DRCdHX1d.js → cdn/chunks/pt-BR-CMljK37h.js} +10 -1
- package/dist/cdn/chunks/{pt-BR-DRCdHX1d.js.map → pt-BR-CMljK37h.js.map} +1 -1
- package/dist/cdn/chunks/{src-BKI1x1k7.js → src-BCJna-6p.js} +183 -165
- package/dist/cdn/chunks/{src-BKI1x1k7.js.map → src-BCJna-6p.js.map} +1 -1
- package/dist/cdn/chunks/{src-SluTVSz_.js → src-C45kfA2t.js} +17 -17
- package/dist/cdn/chunks/{src-SluTVSz_.js.map → src-C45kfA2t.js.map} +1 -1
- package/dist/cdn/chunks/{src-CzoMNRq4.js → src-XQmI_Xs1.js} +33 -33
- package/dist/cdn/chunks/{src-CzoMNRq4.js.map → src-XQmI_Xs1.js.map} +1 -1
- package/dist/cdn/chunks/{src-CM0gCvAS.js → src-YVsPFLNJ.js} +251 -251
- package/dist/cdn/chunks/{src-CM0gCvAS.js.map → src-YVsPFLNJ.js.map} +1 -1
- package/dist/cdn/chunks/{styles-BbfU2w9R.js → styles-BohMfIBd.js} +700 -693
- package/dist/cdn/chunks/styles-BohMfIBd.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-DUTbZTeR.js → tiptap-DRKu__AX.js} +5 -5
- package/dist/cdn/chunks/{tiptap-DUTbZTeR.js.map → tiptap-DRKu__AX.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-BjNENqkM.js → useCloudI18n-Bem8DUjH.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-BjNENqkM.js.map → useCloudI18n-Bem8DUjH.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CzMhD6Gd.js → useEditorCore-B_vwuKdI.js} +434 -414
- package/dist/cdn/chunks/useEditorCore-B_vwuKdI.js.map +1 -0
- package/dist/cdn/chunks/{useI18n-8Wd7G-cq.js → useI18n-graz19nI.js} +2 -2
- package/dist/cdn/chunks/{useI18n-8Wd7G-cq.js.map → useI18n-graz19nI.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-C7G31KV-.js → useMergeTag-rTzAFMlr.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-C7G31KV-.js.map → useMergeTag-rTzAFMlr.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-Bx0QewTv.js → usePopoverPosition-BaFxLP3w.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-Bx0QewTv.js.map → usePopoverPosition-BaFxLP3w.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +144 -139
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-CeZPgo1V.js → cloud-DsUct4Zq.js} +1 -1
- package/dist/{cdn/chunks/de-CnnxBwh7.js → de-CUeaFJph.js} +8 -3
- package/dist/{dist-CL_CfQ3Q.js → dist-9uhI32Q4.js} +2 -2
- package/dist/{dist-3DHaYEiT.js → dist-BAkGuPYm.js} +2 -2
- package/dist/dist-BIYm-U9x.js +5 -0
- package/dist/{dist-3HenmYIg.js → dist-ByJVlKWy.js} +1 -1
- package/dist/{dist-DKWoZJAV.js → dist-C5tigvDF.js} +2 -2
- package/dist/{dist-bivrM-nS.js → dist-CQiAZlTt.js} +2 -2
- package/dist/{dist-Ih7ejWzn.js → dist-C_kAE1sC.js} +2 -2
- package/dist/{dist-CclnU_v0.js → dist-CkCVlKj_.js} +2 -2
- package/dist/{dist-B_etKYyh.js → dist-DFO896yT.js} +5 -5
- package/dist/{dist-BJbqgyPn.js → dist-DPHqs0Yh.js} +105 -87
- package/dist/{dist-DOtLGnLr.js → dist-DWu9QWFl.js} +2 -2
- package/dist/{dist-BCnJcAQc.js → dist-IGetXrbO.js} +2 -2
- package/dist/dist-JXOq1hib.js +5 -0
- package/dist/{cdn/chunks/en-5gW-bYy2.js → en-zCYIPAL5.js} +8 -3
- package/dist/{es-sQ9SdI0l.js → es-BSiH7YkP.js} +8 -1
- package/dist/{extensions-3870a_3R.js → extensions-C0DXnYdA.js} +13 -13
- package/dist/{cdn/chunks/fr-DBZ5w21C.js → fr-DTVJ3det.js} +8 -3
- package/dist/keys-BVlG5Ozc.js +10 -0
- package/dist/{nl-DOL7Fnfo.js → nl-BqSquFS3.js} +8 -1
- package/dist/{cdn/chunks/pt-BR-DRCdHX1d.js → pt-BR-CMljK37h.js} +8 -3
- package/dist/style.css +1 -1
- package/dist/{styles-BWTIgN5L.js → styles-BTTD0Je4.js} +856 -849
- package/dist/templatical-editor.js +92 -87
- package/dist/{useCloudI18n-BmiygEM4.js → useCloudI18n-DGr3b2SX.js} +1 -1
- package/dist/{useEditorCore-CuMMIfiS.js → useEditorCore-DOrGex_t.js} +917 -897
- package/dist/{useI18n-D2L9Mkik.js → useI18n-BhAejA-x.js} +1 -1
- package/dist/{useMergeTag-BTdDq5DC.js → useMergeTag-Ce95YIOO.js} +3 -3
- package/dist/{usePopoverPosition-BO2LNy5n.js → usePopoverPosition-vjKJaqJf.js} +1 -1
- package/package.json +20 -20
- package/dist/BlockPreviewCanvas-MD9BGuXV.js +0 -115
- package/dist/ViewportToggle-BjmbNoao.js +0 -97
- package/dist/cdn/chunks/BlockPreviewCanvas-eASrdFSN.js +0 -117
- package/dist/cdn/chunks/BlockPreviewCanvas-eASrdFSN.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-S8zLHtKb.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-CCWEVrE2.js +0 -162
- package/dist/cdn/chunks/TestEmailModal-CCWEVrE2.js.map +0 -1
- package/dist/cdn/chunks/ViewportToggle-CFmF-N4i.js +0 -66
- package/dist/cdn/chunks/ViewportToggle-CFmF-N4i.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-etMMQoVv.js +0 -21
- package/dist/cdn/chunks/fr-DBZ5w21C.js.map +0 -1
- package/dist/cdn/chunks/icons-CYWw8Xfp.js.map +0 -1
- package/dist/cdn/chunks/keys-D7kUmfpE.js +0 -12
- package/dist/cdn/chunks/keys-D7kUmfpE.js.map +0 -1
- package/dist/cdn/chunks/nl-DOL7Fnfo.js.map +0 -1
- package/dist/cdn/chunks/styles-BbfU2w9R.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CzMhD6Gd.js.map +0 -1
- package/dist/dist-CcQLJeWV.js +0 -5
- package/dist/dist-DerdmERj.js +0 -5
- package/dist/keys-CHPcp-Nz.js +0 -10
|
@@ -1,28 +1,28 @@
|
|
|
1
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 A, r as j, rt as ee, s as M, tt as te, u as N, v as ne, w as re, x as P, y as ie, z as ae } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
2
|
import { c as F, o as oe, s as se } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
3
|
import { t as ce } from "./upload-BwwE0U6G.js";
|
|
4
|
-
import { A as le,
|
|
5
|
-
import { f as
|
|
6
|
-
import { a as
|
|
7
|
-
import { A as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import "./useCloudI18n-
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
4
|
+
import { A as le, B as ue, C as de, D as fe, E as pe, F as me, I as he, L as ge, M as _e, N as ve, O as ye, P as be, R as xe, S as Se, T as Ce, _ as we, a as Te, b as Ee, c as De, d as Oe, f as ke, g as Ae, h as je, i as Me, j as Ne, l as Pe, m as Fe, n as Ie, o as Le, p as Re, r as ze, t as Be, u as Ve, v as He, w as Ue, x as We, y as Ge, z as Ke } from "./dist-DPHqs0Yh.js";
|
|
5
|
+
import { f as qe, g as Je, h as Ye, m as Xe } from "./dist-DYv_Pttj.js";
|
|
6
|
+
import { a as Ze, c as Qe, d as $e, i as et, l as tt, o as nt, r as rt, t as it, u as at } from "./usePopoverPosition-vjKJaqJf.js";
|
|
7
|
+
import { A as ot, B as st, C as ct, D as lt, E as ut, H as dt, L as ft, M as pt, N as mt, O as ht, P as gt, R as _t, S as vt, T as yt, V as bt, _ as xt, a as St, b as Ct, d as wt, f as Tt, g as Et, h as Dt, i as Ot, j as kt, k as At, l as jt, m as Mt, n as Nt, o as Pt, p as Ft, s as It, v as Lt, w as Rt, x as zt, y as Bt, z as Vt } from "./keys-BVlG5Ozc.js";
|
|
8
|
+
import { t as Ht } from "./useI18n-BhAejA-x.js";
|
|
9
|
+
import { t as Ut } from "./createLucideIcon-JWHwTI6N.js";
|
|
10
|
+
import { t as Wt } from "./loader-circle-C-Z6kgI6.js";
|
|
11
|
+
import { t as Gt } from "./message-circle-CEm5qckV.js";
|
|
12
|
+
import { t as Kt } from "./trash-2-DE8CmxAG.js";
|
|
13
|
+
import { t as qt } from "./triangle-alert-Djg6IG8N.js";
|
|
14
|
+
import { t as Jt } from "./LoadingTrack-KIcREPlS.js";
|
|
15
|
+
import { t as Yt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
16
|
+
import "./useCloudI18n-DGr3b2SX.js";
|
|
17
|
+
import { t as Xt } from "./useMergeTag-Ce95YIOO.js";
|
|
18
|
+
import { t as Zt } from "./useAliveFlag-C43EhZFY.js";
|
|
19
19
|
//#region ../core/dist/index.js
|
|
20
|
-
function
|
|
20
|
+
function Qt(e) {
|
|
21
21
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function $t(e) {
|
|
24
24
|
let t = A({
|
|
25
|
-
content: e.content ??
|
|
25
|
+
content: e.content ?? Re(e.defaultFontFamily, e.templateDefaults),
|
|
26
26
|
selectedBlockId: null,
|
|
27
27
|
viewport: "desktop",
|
|
28
28
|
darkMode: !1,
|
|
@@ -111,7 +111,7 @@ function Kt(e) {
|
|
|
111
111
|
if (c(n)) return;
|
|
112
112
|
let o = a(t.content.blocks, n);
|
|
113
113
|
if (o && o.type === "section") {
|
|
114
|
-
if (r < 0 || r >=
|
|
114
|
+
if (r < 0 || r >= Qt(o.columns)) return;
|
|
115
115
|
o.children[r] = o.children[r] || [];
|
|
116
116
|
let t = o.children[r];
|
|
117
117
|
i !== void 0 && i < t.length ? t.splice(i, 0, e) : t.push(e);
|
|
@@ -144,7 +144,7 @@ function Kt(e) {
|
|
|
144
144
|
let u;
|
|
145
145
|
if (r) {
|
|
146
146
|
let e = a(t.content.blocks, r);
|
|
147
|
-
if (!e || e.type !== "section" || i < 0 || i >=
|
|
147
|
+
if (!e || e.type !== "section" || i < 0 || i >= Qt(e.columns)) return;
|
|
148
148
|
e.children[i] = e.children[i] || [], u = e.children[i];
|
|
149
149
|
} else u = t.content.blocks;
|
|
150
150
|
let [d] = o.blocks.splice(l, 1);
|
|
@@ -173,11 +173,11 @@ function Kt(e) {
|
|
|
173
173
|
findBlockLocation: u
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
var
|
|
177
|
-
function
|
|
178
|
-
let { content: t, setContent: r, isRemoteOperation: i, maxSize: a =
|
|
176
|
+
var en = 50, tn = 300, nn = 1500;
|
|
177
|
+
function rn(e) {
|
|
178
|
+
let { content: t, setContent: r, isRemoteOperation: i, maxSize: a = en } = e, o = _([]), s = _([]), c = _(!1), l = null, u = null, d = n(() => o.value.length > 0), f = n(() => s.value.length > 0);
|
|
179
179
|
function p() {
|
|
180
|
-
return
|
|
180
|
+
return xe(t.value);
|
|
181
181
|
}
|
|
182
182
|
function m(e) {
|
|
183
183
|
o.value.push(e), o.value.length > a && o.value.splice(0, o.value.length - a);
|
|
@@ -193,21 +193,21 @@ function Xt(e) {
|
|
|
193
193
|
if (u && u.blockId === e) {
|
|
194
194
|
clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
|
|
195
195
|
u = null;
|
|
196
|
-
},
|
|
196
|
+
}, tn);
|
|
197
197
|
return;
|
|
198
198
|
}
|
|
199
199
|
h(), m(p()), s.value = [], u = {
|
|
200
200
|
blockId: e,
|
|
201
201
|
timeoutId: setTimeout(() => {
|
|
202
202
|
u = null;
|
|
203
|
-
},
|
|
203
|
+
}, tn)
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
function y() {
|
|
208
208
|
c.value = !0, l && clearTimeout(l), l = setTimeout(() => {
|
|
209
209
|
c.value = !1, l = null;
|
|
210
|
-
},
|
|
210
|
+
}, nn);
|
|
211
211
|
}
|
|
212
212
|
function b() {
|
|
213
213
|
if (o.value.length === 0) return;
|
|
@@ -239,33 +239,33 @@ function Xt(e) {
|
|
|
239
239
|
destroy: C
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function an(e) {
|
|
243
243
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
244
244
|
...e,
|
|
245
|
-
id:
|
|
245
|
+
id: Ce(),
|
|
246
246
|
cells: e.cells.map((e) => ({
|
|
247
247
|
...e,
|
|
248
|
-
id:
|
|
248
|
+
id: Ce()
|
|
249
249
|
}))
|
|
250
250
|
})) : e.type === "social" ? e.icons = e.icons.map((e) => ({
|
|
251
251
|
...e,
|
|
252
|
-
id:
|
|
252
|
+
id: Ce()
|
|
253
253
|
})) : e.type === "menu" && (e.items = e.items.map((e) => ({
|
|
254
254
|
...e,
|
|
255
|
-
id:
|
|
255
|
+
id: Ce()
|
|
256
256
|
})));
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function on(e) {
|
|
259
259
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
260
260
|
function o(n, r, a) {
|
|
261
|
-
let o =
|
|
261
|
+
let o = Pe(n, e.blockDefaults);
|
|
262
262
|
return t(o, r, a), i(o.id), o;
|
|
263
263
|
}
|
|
264
264
|
function s(e, n, r) {
|
|
265
265
|
let o = JSON.parse(JSON.stringify(e));
|
|
266
|
-
if (o.id =
|
|
266
|
+
if (o.id = Ce(), an(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
267
267
|
let t = JSON.parse(JSON.stringify(e));
|
|
268
|
-
return t.id =
|
|
268
|
+
return t.id = Ce(), an(t), t;
|
|
269
269
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
270
270
|
else {
|
|
271
271
|
let i = a?.(e.id) ?? null;
|
|
@@ -286,7 +286,7 @@ function Qt(e) {
|
|
|
286
286
|
updateBlockProperty: l
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function sn(e) {
|
|
290
290
|
let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
|
|
291
291
|
function c() {
|
|
292
292
|
return typeof a == "function" ? a() : a;
|
|
@@ -322,7 +322,7 @@ function $t(e) {
|
|
|
322
322
|
destroy: h
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function cn(e) {
|
|
326
326
|
let t = A(/* @__PURE__ */ new Set()), r = n(() => t.size > 0);
|
|
327
327
|
function i(e) {
|
|
328
328
|
return t.has(e);
|
|
@@ -340,7 +340,7 @@ function en(e) {
|
|
|
340
340
|
hasHiddenBlocks: r
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function ln(e) {
|
|
344
344
|
let t = _(!1), r = _(!1), i = n(() => !!e.definition.value?.dataSource), a = n(() => i.value && !e.block.value.dataSourceFetched);
|
|
345
345
|
async function o() {
|
|
346
346
|
let n = e.definition.value;
|
|
@@ -370,7 +370,7 @@ function tn(e) {
|
|
|
370
370
|
needsFetch: a
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function un(e, t) {
|
|
374
374
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
375
375
|
e.addBlock = (r, i, a, o) => {
|
|
376
376
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -384,7 +384,7 @@ function nn(e, t) {
|
|
|
384
384
|
t.record(), o(e);
|
|
385
385
|
};
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function dn(e) {
|
|
388
388
|
let { provider: t } = e, n = _([]), r = _(!1), i = M(() => {
|
|
389
389
|
let e = /* @__PURE__ */ new Set();
|
|
390
390
|
for (let t of n.value) {
|
|
@@ -400,7 +400,7 @@ function rn(e) {
|
|
|
400
400
|
return s.value && e.canDelete !== !1;
|
|
401
401
|
}
|
|
402
402
|
function u(e, t) {
|
|
403
|
-
throw new
|
|
403
|
+
throw new Le(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
|
|
404
404
|
}
|
|
405
405
|
async function d(i) {
|
|
406
406
|
r.value = !0;
|
|
@@ -467,9 +467,9 @@ function rn(e) {
|
|
|
467
467
|
remove: m
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
|
-
var
|
|
471
|
-
function
|
|
472
|
-
let t = e.key ??
|
|
470
|
+
var fn = "templatical:saved-blocks";
|
|
471
|
+
function pn(e = {}) {
|
|
472
|
+
let t = e.key ?? fn;
|
|
473
473
|
function n() {
|
|
474
474
|
if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
|
|
475
475
|
return localStorage;
|
|
@@ -494,7 +494,7 @@ function on(e = {}) {
|
|
|
494
494
|
},
|
|
495
495
|
async create(e) {
|
|
496
496
|
let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
|
|
497
|
-
id:
|
|
497
|
+
id: Ce(),
|
|
498
498
|
name: e.name,
|
|
499
499
|
content: e.content,
|
|
500
500
|
...e.category ? { category: e.category } : {},
|
|
@@ -522,26 +522,26 @@ function on(e = {}) {
|
|
|
522
522
|
}
|
|
523
523
|
//#endregion
|
|
524
524
|
//#region src/utils/activeEditorTracker.ts
|
|
525
|
-
var
|
|
526
|
-
function
|
|
527
|
-
let e = ++
|
|
528
|
-
return
|
|
525
|
+
var mn = /* @__PURE__ */ new Set(), hn = 0, gn = 0;
|
|
526
|
+
function _n() {
|
|
527
|
+
let e = ++gn;
|
|
528
|
+
return mn.add(e), hn === 0 && (hn = e), {
|
|
529
529
|
id: e,
|
|
530
|
-
isActive: () =>
|
|
530
|
+
isActive: () => mn.size <= 1 || hn === e,
|
|
531
531
|
claim: () => {
|
|
532
|
-
|
|
532
|
+
hn = e;
|
|
533
533
|
},
|
|
534
534
|
dispose: () => {
|
|
535
|
-
if (
|
|
536
|
-
let e = Array.from(
|
|
537
|
-
|
|
535
|
+
if (mn.delete(e), hn === e) {
|
|
536
|
+
let e = Array.from(mn);
|
|
537
|
+
hn = e[e.length - 1] ?? 0;
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
542
|
//#endregion
|
|
543
543
|
//#region src/composables/useImageUrlResolver.ts
|
|
544
|
-
function
|
|
544
|
+
function vn(e) {
|
|
545
545
|
let t = A(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
546
546
|
function r(e) {
|
|
547
547
|
return t.get(e);
|
|
@@ -574,8 +574,8 @@ function dn(e) {
|
|
|
574
574
|
lookup: a
|
|
575
575
|
};
|
|
576
576
|
}
|
|
577
|
-
function
|
|
578
|
-
let t = P(
|
|
577
|
+
function yn(e) {
|
|
578
|
+
let t = P(Ct, null), n = M(e);
|
|
579
579
|
if (!t) return n;
|
|
580
580
|
let r;
|
|
581
581
|
function i() {
|
|
@@ -604,7 +604,7 @@ function fn(e) {
|
|
|
604
604
|
}
|
|
605
605
|
//#endregion
|
|
606
606
|
//#region src/composables/useMergeTagPicker.ts
|
|
607
|
-
function
|
|
607
|
+
function bn() {
|
|
608
608
|
let e = _(!1), t = _([]), n = null;
|
|
609
609
|
function r(r) {
|
|
610
610
|
if (n) {
|
|
@@ -634,7 +634,7 @@ function pn() {
|
|
|
634
634
|
}
|
|
635
635
|
//#endregion
|
|
636
636
|
//#region src/composables/useLogicTagPicker.ts
|
|
637
|
-
function
|
|
637
|
+
function xn() {
|
|
638
638
|
let e = _(!1), t = _([]), n = _([]), r = null;
|
|
639
639
|
function i(i, a) {
|
|
640
640
|
if (r) {
|
|
@@ -665,17 +665,17 @@ function mn() {
|
|
|
665
665
|
}
|
|
666
666
|
//#endregion
|
|
667
667
|
//#region src/composables/useTemplateLint.ts
|
|
668
|
-
function
|
|
668
|
+
function Sn(e) {
|
|
669
669
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
672
|
-
let t = _([]), n = _(!1), r = _(!1), i = v(null), a =
|
|
671
|
+
function Cn(e) {
|
|
672
|
+
let t = _([]), n = _(!1), r = _(!1), i = v(null), a = Sn(e.options), o = null, s = !1;
|
|
673
673
|
a || l();
|
|
674
674
|
async function l() {
|
|
675
675
|
try {
|
|
676
676
|
let t = await import("@templatical/quality");
|
|
677
677
|
if (s) return;
|
|
678
|
-
i.value = { lintTemplate: t.lintTemplate }, n.value = !0, u(), o =
|
|
678
|
+
i.value = { lintTemplate: t.lintTemplate }, n.value = !0, u(), o = Je(e.content, u, {
|
|
679
679
|
debounce: e.debounce ?? 500,
|
|
680
680
|
deep: !0
|
|
681
681
|
});
|
|
@@ -710,17 +710,17 @@ function gn(e) {
|
|
|
710
710
|
}
|
|
711
711
|
//#endregion
|
|
712
712
|
//#region src/utils/blockTypeLabels.ts
|
|
713
|
-
function
|
|
713
|
+
function wn(e, t) {
|
|
714
714
|
return t.blocks[e] ?? e;
|
|
715
715
|
}
|
|
716
|
-
function
|
|
717
|
-
if (e.type !== "custom") return
|
|
716
|
+
function Tn(e, t, n = []) {
|
|
717
|
+
if (e.type !== "custom") return wn(e.type, t);
|
|
718
718
|
let { customType: r } = e;
|
|
719
719
|
return n.find((e) => e.type === r)?.name ?? r;
|
|
720
720
|
}
|
|
721
721
|
//#endregion
|
|
722
722
|
//#region src/composables/useKeyboardReorder.ts
|
|
723
|
-
function
|
|
723
|
+
function En(e, t, n = []) {
|
|
724
724
|
let r = _(null), i = _(""), a = null;
|
|
725
725
|
function o(t) {
|
|
726
726
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -747,7 +747,7 @@ function yn(e, t, n = []) {
|
|
|
747
747
|
let i = o(r);
|
|
748
748
|
if (!i) return "";
|
|
749
749
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
750
|
-
return a ?
|
|
750
|
+
return a ? Tn(a, t.t, n) : "";
|
|
751
751
|
}
|
|
752
752
|
function c(t, n) {
|
|
753
753
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -816,13 +816,13 @@ function yn(e, t, n = []) {
|
|
|
816
816
|
}
|
|
817
817
|
//#endregion
|
|
818
818
|
//#region src/composables/useUiTheme.ts
|
|
819
|
-
function
|
|
820
|
-
let t =
|
|
819
|
+
function Dn(e) {
|
|
820
|
+
let t = $e("(prefers-color-scheme: dark)");
|
|
821
821
|
return { resolvedTheme: M(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
822
822
|
}
|
|
823
823
|
//#endregion
|
|
824
824
|
//#region src/composables/useThemeStyles.ts
|
|
825
|
-
var
|
|
825
|
+
var On = {
|
|
826
826
|
bg: "--tpl-bg",
|
|
827
827
|
bgElevated: "--tpl-bg-elevated",
|
|
828
828
|
bgHover: "--tpl-bg-hover",
|
|
@@ -846,10 +846,10 @@ var xn = {
|
|
|
846
846
|
dangerLight: "--tpl-danger-light",
|
|
847
847
|
canvasBg: "--tpl-canvas-bg"
|
|
848
848
|
};
|
|
849
|
-
function
|
|
849
|
+
function kn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
850
850
|
return { themeStyles: M(() => {
|
|
851
851
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
852
|
-
if (a) for (let [e, t] of Object.entries(
|
|
852
|
+
if (a) for (let [e, t] of Object.entries(On)) {
|
|
853
853
|
let n = a[e];
|
|
854
854
|
n && (r[t] = n);
|
|
855
855
|
}
|
|
@@ -858,27 +858,27 @@ function Sn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
858
858
|
}
|
|
859
859
|
//#endregion
|
|
860
860
|
//#region src/utils/logger.ts
|
|
861
|
-
var
|
|
862
|
-
function
|
|
861
|
+
var An = "[Templatical]";
|
|
862
|
+
function jn() {
|
|
863
863
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
864
864
|
}
|
|
865
|
-
var
|
|
865
|
+
var Mn = {
|
|
866
866
|
warn(...e) {
|
|
867
|
-
console.warn(
|
|
867
|
+
console.warn(An, ...e);
|
|
868
868
|
},
|
|
869
869
|
error(...e) {
|
|
870
|
-
console.error(
|
|
870
|
+
console.error(An, ...e);
|
|
871
871
|
},
|
|
872
872
|
debug(...e) {
|
|
873
|
-
|
|
873
|
+
jn() || console.debug(An, ...e);
|
|
874
874
|
},
|
|
875
875
|
info(...e) {
|
|
876
|
-
|
|
876
|
+
jn() || console.info(An, ...e);
|
|
877
877
|
}
|
|
878
878
|
};
|
|
879
879
|
//#endregion
|
|
880
880
|
//#region src/composables/useBlockRegistry.ts
|
|
881
|
-
function
|
|
881
|
+
function Nn() {
|
|
882
882
|
let e = v(/* @__PURE__ */ new Map());
|
|
883
883
|
function t(t, n) {
|
|
884
884
|
e.value.set(t, n), te(e);
|
|
@@ -886,7 +886,7 @@ function En() {
|
|
|
886
886
|
function n(t, n) {
|
|
887
887
|
let r = `custom:${t.type}`, i = {
|
|
888
888
|
component: n,
|
|
889
|
-
createBlock: () =>
|
|
889
|
+
createBlock: () => ke(t),
|
|
890
890
|
definition: t
|
|
891
891
|
};
|
|
892
892
|
e.value.set(r, i), te(e);
|
|
@@ -918,7 +918,7 @@ function En() {
|
|
|
918
918
|
strictFilters: !1
|
|
919
919
|
}).parseAndRender(t.template, e.fieldValues);
|
|
920
920
|
} catch (t) {
|
|
921
|
-
return
|
|
921
|
+
return Mn.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
922
922
|
}
|
|
923
923
|
}
|
|
924
924
|
function c(t) {
|
|
@@ -936,9 +936,9 @@ function En() {
|
|
|
936
936
|
}
|
|
937
937
|
//#endregion
|
|
938
938
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
939
|
-
function
|
|
939
|
+
function Pn(e, t) {
|
|
940
940
|
return M(() => {
|
|
941
|
-
let n =
|
|
941
|
+
let n = Fn(e.value.blocks);
|
|
942
942
|
if (n.size === 0) return [];
|
|
943
943
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
944
944
|
for (let e of n) {
|
|
@@ -950,81 +950,81 @@ function Dn(e, t) {
|
|
|
950
950
|
return i;
|
|
951
951
|
});
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function Fn(e) {
|
|
954
954
|
let t = /* @__PURE__ */ new Set();
|
|
955
|
-
return
|
|
955
|
+
return In(e, t), t;
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function In(e, t) {
|
|
958
958
|
for (let n of e) {
|
|
959
|
-
if (
|
|
959
|
+
if (_e(n)) {
|
|
960
960
|
t.add(n.customType);
|
|
961
961
|
continue;
|
|
962
962
|
}
|
|
963
963
|
if (n.type === "section") {
|
|
964
964
|
let e = n.children;
|
|
965
965
|
if (!e) continue;
|
|
966
|
-
for (let n of e)
|
|
966
|
+
for (let n of e) In(n, t);
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
970
|
//#endregion
|
|
971
971
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
972
|
-
var
|
|
972
|
+
var Ln = [
|
|
973
973
|
{
|
|
974
974
|
type: "section",
|
|
975
|
-
createBlock:
|
|
975
|
+
createBlock: Ge
|
|
976
976
|
},
|
|
977
977
|
{
|
|
978
978
|
type: "title",
|
|
979
|
-
createBlock:
|
|
979
|
+
createBlock: de
|
|
980
980
|
},
|
|
981
981
|
{
|
|
982
982
|
type: "paragraph",
|
|
983
|
-
createBlock:
|
|
983
|
+
createBlock: He
|
|
984
984
|
},
|
|
985
985
|
{
|
|
986
986
|
type: "image",
|
|
987
|
-
createBlock:
|
|
987
|
+
createBlock: Ae
|
|
988
988
|
},
|
|
989
989
|
{
|
|
990
990
|
type: "button",
|
|
991
|
-
createBlock:
|
|
991
|
+
createBlock: Ve
|
|
992
992
|
},
|
|
993
993
|
{
|
|
994
994
|
type: "divider",
|
|
995
|
-
createBlock:
|
|
995
|
+
createBlock: Fe
|
|
996
996
|
},
|
|
997
997
|
{
|
|
998
998
|
type: "video",
|
|
999
|
-
createBlock:
|
|
999
|
+
createBlock: Ue
|
|
1000
1000
|
},
|
|
1001
1001
|
{
|
|
1002
1002
|
type: "social",
|
|
1003
|
-
createBlock:
|
|
1003
|
+
createBlock: Ee
|
|
1004
1004
|
},
|
|
1005
1005
|
{
|
|
1006
1006
|
type: "menu",
|
|
1007
|
-
createBlock:
|
|
1007
|
+
createBlock: we
|
|
1008
1008
|
},
|
|
1009
1009
|
{
|
|
1010
1010
|
type: "table",
|
|
1011
|
-
createBlock:
|
|
1011
|
+
createBlock: Se
|
|
1012
1012
|
},
|
|
1013
1013
|
{
|
|
1014
1014
|
type: "spacer",
|
|
1015
|
-
createBlock:
|
|
1015
|
+
createBlock: We
|
|
1016
1016
|
},
|
|
1017
1017
|
{
|
|
1018
1018
|
type: "html",
|
|
1019
|
-
createBlock:
|
|
1019
|
+
createBlock: je
|
|
1020
1020
|
},
|
|
1021
1021
|
{
|
|
1022
1022
|
type: "countdown",
|
|
1023
|
-
createBlock:
|
|
1023
|
+
createBlock: Oe
|
|
1024
1024
|
}
|
|
1025
1025
|
];
|
|
1026
|
-
function
|
|
1027
|
-
for (let n of
|
|
1026
|
+
function Rn(e, t) {
|
|
1027
|
+
for (let n of Ln) {
|
|
1028
1028
|
let r = t[n.type];
|
|
1029
1029
|
r && e.registerBuiltIn(n.type, {
|
|
1030
1030
|
component: r,
|
|
@@ -1034,34 +1034,34 @@ function jn(e, t) {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
//#endregion
|
|
1036
1036
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
1037
|
-
function
|
|
1037
|
+
function zn(e) {
|
|
1038
1038
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
1039
1039
|
}
|
|
1040
1040
|
//#endregion
|
|
1041
1041
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
1042
|
-
function
|
|
1042
|
+
function Bn(e) {
|
|
1043
1043
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1046
|
-
let r = new Set(e.map((e) =>
|
|
1047
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1045
|
+
function Vn(e, t, n) {
|
|
1046
|
+
let r = new Set(e.map((e) => rt(e))), i = [], a = (e, t) => {
|
|
1047
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(rt(o)) && i.push(`${t}.${n}: ${o}`) : Bn(o) && a(o, `${t}.${n}`);
|
|
1048
1048
|
}, o = t;
|
|
1049
|
-
for (let [e, t] of Object.entries(
|
|
1049
|
+
for (let [e, t] of Object.entries(Be)) {
|
|
1050
1050
|
let n = o?.[e];
|
|
1051
1051
|
a({
|
|
1052
1052
|
...t,
|
|
1053
|
-
...
|
|
1053
|
+
...Bn(n) ? n : {}
|
|
1054
1054
|
}, e);
|
|
1055
1055
|
}
|
|
1056
1056
|
return a({
|
|
1057
|
-
...
|
|
1057
|
+
...Ie,
|
|
1058
1058
|
...n ?? {}
|
|
1059
1059
|
}, "template"), i;
|
|
1060
1060
|
}
|
|
1061
1061
|
//#endregion
|
|
1062
1062
|
//#region src/utils/resolveFieldColors.ts
|
|
1063
|
-
function
|
|
1064
|
-
let n =
|
|
1063
|
+
function Hn(e, t) {
|
|
1064
|
+
let n = nt({ presets: e.presets }, Ze), r = n.presets.length === 0, i = e.allowCustom ?? t.allowCustom;
|
|
1065
1065
|
return {
|
|
1066
1066
|
presets: r ? t.presets : n.presets,
|
|
1067
1067
|
allowCustom: t.allowCustom !== !1 && i,
|
|
@@ -1073,9 +1073,9 @@ function Fn(e, t) {
|
|
|
1073
1073
|
}
|
|
1074
1074
|
//#endregion
|
|
1075
1075
|
//#region src/utils/collectColorFieldIssues.ts
|
|
1076
|
-
function
|
|
1076
|
+
function Un(e, t) {
|
|
1077
1077
|
let n = [], r = (r, i) => {
|
|
1078
|
-
let a =
|
|
1078
|
+
let a = Hn(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1079
1079
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1080
1080
|
id: s("invalid-presets"),
|
|
1081
1081
|
message: `${o}: presets skipped invalid entries: ${a.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).` + (a.presetsInherited ? " No valid entries are left, so the field inherits colors.presets." : "")
|
|
@@ -1086,8 +1086,8 @@ function In(e, t) {
|
|
|
1086
1086
|
id: s("allow-custom-ignored"),
|
|
1087
1087
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1088
1088
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1089
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1090
|
-
e !== "" && !t.has(
|
|
1089
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => rt(e)));
|
|
1090
|
+
e !== "" && !t.has(rt(e)) && n.push({
|
|
1091
1091
|
id: s("off-palette-default"),
|
|
1092
1092
|
message: `${o} locks custom colours, but its default ${e} falls outside the field's presets: ${a.presets.join(", ")}. New blocks start on a colour the picker can't reselect — set the default from the same palette.`
|
|
1093
1093
|
});
|
|
@@ -1099,7 +1099,7 @@ function In(e, t) {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
//#endregion
|
|
1101
1101
|
//#region src/utils/keyboardShortcuts.ts
|
|
1102
|
-
function
|
|
1102
|
+
function Wn(e) {
|
|
1103
1103
|
for (let t of e.composedPath()) {
|
|
1104
1104
|
if (!(t instanceof HTMLElement)) continue;
|
|
1105
1105
|
if (t.isContentEditable) return !0;
|
|
@@ -1108,18 +1108,18 @@ function Ln(e) {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
return !1;
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1111
|
+
function Gn(e, t) {
|
|
1112
1112
|
let n = e.metaKey || e.ctrlKey;
|
|
1113
1113
|
if (n && e.key.toLowerCase() === "s") {
|
|
1114
1114
|
e.preventDefault(), t.onSave?.();
|
|
1115
1115
|
return;
|
|
1116
1116
|
}
|
|
1117
1117
|
if (n && e.key.toLowerCase() === "z") {
|
|
1118
|
-
if (
|
|
1118
|
+
if (Wn(e)) return;
|
|
1119
1119
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1120
1120
|
return;
|
|
1121
1121
|
}
|
|
1122
|
-
if (t.isPicking?.() && !
|
|
1122
|
+
if (t.isPicking?.() && !Wn(e)) {
|
|
1123
1123
|
if (e.key === "Escape") {
|
|
1124
1124
|
e.preventDefault(), t.onCancelPick?.();
|
|
1125
1125
|
return;
|
|
@@ -1137,51 +1137,58 @@ function Rn(e, t) {
|
|
|
1137
1137
|
t.selectBlock(null);
|
|
1138
1138
|
return;
|
|
1139
1139
|
}
|
|
1140
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1140
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Wn(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1141
1141
|
}
|
|
1142
1142
|
//#endregion
|
|
1143
1143
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
1144
|
-
function
|
|
1144
|
+
function Kn(e, t, n, r = !1) {
|
|
1145
1145
|
if (!e) return [];
|
|
1146
|
-
let
|
|
1147
|
-
for (; (
|
|
1148
|
-
|
|
1146
|
+
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
1147
|
+
for (; (s = i.exec(e)) !== null;) {
|
|
1148
|
+
s.index > o && a.push({
|
|
1149
1149
|
type: "text",
|
|
1150
|
-
value: e.slice(
|
|
1150
|
+
value: e.slice(o, s.index)
|
|
1151
1151
|
});
|
|
1152
|
-
let
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1152
|
+
let i = s[0];
|
|
1153
|
+
if (be(i, n)) {
|
|
1154
|
+
let e = r ? ye(i, t) : void 0;
|
|
1155
|
+
a.push(e === void 0 ? {
|
|
1156
|
+
type: "tag",
|
|
1157
|
+
value: fe(i, t)
|
|
1158
|
+
} : {
|
|
1159
|
+
type: "text",
|
|
1160
|
+
value: e
|
|
1161
|
+
});
|
|
1162
|
+
} else ve(i, n) ? a.push({
|
|
1157
1163
|
type: "tag",
|
|
1158
|
-
value:
|
|
1159
|
-
}) :
|
|
1164
|
+
value: pe(i, n)
|
|
1165
|
+
}) : a.push({
|
|
1160
1166
|
type: "text",
|
|
1161
|
-
value:
|
|
1162
|
-
})
|
|
1167
|
+
value: i
|
|
1168
|
+
});
|
|
1169
|
+
o = s.index + i.length;
|
|
1163
1170
|
}
|
|
1164
|
-
return
|
|
1171
|
+
return o < e.length && a.push({
|
|
1165
1172
|
type: "text",
|
|
1166
|
-
value: e.slice(
|
|
1167
|
-
}),
|
|
1173
|
+
value: e.slice(o)
|
|
1174
|
+
}), a;
|
|
1168
1175
|
}
|
|
1169
1176
|
//#endregion
|
|
1170
1177
|
//#region src/components/MergeTagPreviewText.vue
|
|
1171
|
-
var
|
|
1178
|
+
var qn = y({
|
|
1172
1179
|
name: "MergeTagPreviewText",
|
|
1173
1180
|
props: { text: {
|
|
1174
1181
|
type: String,
|
|
1175
1182
|
required: !0
|
|
1176
1183
|
} },
|
|
1177
1184
|
setup(e) {
|
|
1178
|
-
let t = P(
|
|
1179
|
-
return () =>
|
|
1185
|
+
let t = P(yt, []), n = P(At, Te.liquid), r = P(bt, null), i = M(() => Kn(e.text, t, n, r?.value ?? !1));
|
|
1186
|
+
return () => i.value.map((e, t) => e.type === "tag" ? ie("span", {
|
|
1180
1187
|
key: t,
|
|
1181
1188
|
class: "tpl-merge-tag-label"
|
|
1182
1189
|
}, e.value) : e.value);
|
|
1183
1190
|
}
|
|
1184
|
-
}),
|
|
1191
|
+
}), Jn = { class: "tpl:text-center" }, Yn = ["href"], Xn = /* @__PURE__ */ y({
|
|
1185
1192
|
__name: "ButtonBlock",
|
|
1186
1193
|
props: {
|
|
1187
1194
|
block: {},
|
|
@@ -1202,17 +1209,17 @@ var Bn = y({
|
|
|
1202
1209
|
};
|
|
1203
1210
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
1204
1211
|
});
|
|
1205
|
-
return (t, r) => (f(), x("div",
|
|
1212
|
+
return (t, r) => (f(), x("div", Jn, [b("a", {
|
|
1206
1213
|
href: e.block.url || "#",
|
|
1207
1214
|
style: i(n.value),
|
|
1208
1215
|
class: "tpl:cursor-default",
|
|
1209
1216
|
onClick: r[0] ||= F(() => {}, ["prevent"])
|
|
1210
|
-
}, [w(
|
|
1217
|
+
}, [w(qn, { text: e.block.text }, null, 8, ["text"])], 12, Yn)]));
|
|
1211
1218
|
}
|
|
1212
|
-
}),
|
|
1219
|
+
}), Zn = Ut("bookmark", [["path", {
|
|
1213
1220
|
d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
|
|
1214
1221
|
key: "oz39mx"
|
|
1215
|
-
}]]),
|
|
1222
|
+
}]]), Qn = Ut("box", [
|
|
1216
1223
|
["path", {
|
|
1217
1224
|
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
|
|
1218
1225
|
key: "hh9hay"
|
|
@@ -1225,13 +1232,13 @@ var Bn = y({
|
|
|
1225
1232
|
d: "M12 22V12",
|
|
1226
1233
|
key: "d0xqtd"
|
|
1227
1234
|
}]
|
|
1228
|
-
]),
|
|
1235
|
+
]), $n = Ut("code", [["path", {
|
|
1229
1236
|
d: "m16 18 6-6-6-6",
|
|
1230
1237
|
key: "eg8j8"
|
|
1231
1238
|
}], ["path", {
|
|
1232
1239
|
d: "m8 6-6 6 6 6",
|
|
1233
1240
|
key: "ppft3o"
|
|
1234
|
-
}]]),
|
|
1241
|
+
}]]), er = Ut("copy", [["rect", {
|
|
1235
1242
|
width: "14",
|
|
1236
1243
|
height: "14",
|
|
1237
1244
|
x: "8",
|
|
@@ -1242,7 +1249,7 @@ var Bn = y({
|
|
|
1242
1249
|
}], ["path", {
|
|
1243
1250
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
1244
1251
|
key: "zix9uf"
|
|
1245
|
-
}]]),
|
|
1252
|
+
}]]), tr = Ut("eye-off", [
|
|
1246
1253
|
["path", {
|
|
1247
1254
|
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
1248
1255
|
key: "ct8e1f"
|
|
@@ -1259,10 +1266,10 @@ var Bn = y({
|
|
|
1259
1266
|
d: "m2 2 20 20",
|
|
1260
1267
|
key: "1ooewy"
|
|
1261
1268
|
}]
|
|
1262
|
-
]),
|
|
1269
|
+
]), nr = Ut("funnel", [["path", {
|
|
1263
1270
|
d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
|
|
1264
1271
|
key: "sc7q7i"
|
|
1265
|
-
}]]),
|
|
1272
|
+
}]]), rr = Ut("grip-vertical", [
|
|
1266
1273
|
["circle", {
|
|
1267
1274
|
cx: "9",
|
|
1268
1275
|
cy: "12",
|
|
@@ -1299,7 +1306,7 @@ var Bn = y({
|
|
|
1299
1306
|
r: "1",
|
|
1300
1307
|
key: "f4zoj3"
|
|
1301
1308
|
}]
|
|
1302
|
-
]),
|
|
1309
|
+
]), ir = Ut("image", [
|
|
1303
1310
|
["rect", {
|
|
1304
1311
|
width: "18",
|
|
1305
1312
|
height: "18",
|
|
@@ -1319,13 +1326,13 @@ var Bn = y({
|
|
|
1319
1326
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
1320
1327
|
key: "1xmnt7"
|
|
1321
1328
|
}]
|
|
1322
|
-
]),
|
|
1329
|
+
]), ar = Ut("navigation", [["polygon", {
|
|
1323
1330
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
1324
1331
|
key: "1ltx0t"
|
|
1325
|
-
}]]),
|
|
1332
|
+
}]]), or = Ut("puzzle", [["path", {
|
|
1326
1333
|
d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
|
|
1327
1334
|
key: "w46dr5"
|
|
1328
|
-
}]]),
|
|
1335
|
+
}]]), sr = Ut("share-2", [
|
|
1329
1336
|
["circle", {
|
|
1330
1337
|
cx: "18",
|
|
1331
1338
|
cy: "5",
|
|
@@ -1358,7 +1365,7 @@ var Bn = y({
|
|
|
1358
1365
|
y2: "10.49",
|
|
1359
1366
|
key: "1n3mei"
|
|
1360
1367
|
}]
|
|
1361
|
-
]),
|
|
1368
|
+
]), cr = Ut("table", [
|
|
1362
1369
|
["path", {
|
|
1363
1370
|
d: "M12 3v18",
|
|
1364
1371
|
key: "108xh3"
|
|
@@ -1379,7 +1386,7 @@ var Bn = y({
|
|
|
1379
1386
|
d: "M3 15h18",
|
|
1380
1387
|
key: "5xshup"
|
|
1381
1388
|
}]
|
|
1382
|
-
]),
|
|
1389
|
+
]), lr = Ut("video", [["path", {
|
|
1383
1390
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1384
1391
|
key: "ftymec"
|
|
1385
1392
|
}], ["rect", {
|
|
@@ -1389,11 +1396,11 @@ var Bn = y({
|
|
|
1389
1396
|
height: "12",
|
|
1390
1397
|
rx: "2",
|
|
1391
1398
|
key: "158x01"
|
|
1392
|
-
}]]),
|
|
1399
|
+
}]]), ur = ["innerHTML"], dr = [
|
|
1393
1400
|
"src",
|
|
1394
1401
|
"width",
|
|
1395
1402
|
"height"
|
|
1396
|
-
],
|
|
1403
|
+
], fr = /* @__PURE__ */ y({
|
|
1397
1404
|
__name: "CustomBlockIcon",
|
|
1398
1405
|
props: {
|
|
1399
1406
|
icon: {},
|
|
@@ -1409,14 +1416,14 @@ var Bn = y({
|
|
|
1409
1416
|
height: `${n.value}px`
|
|
1410
1417
|
}),
|
|
1411
1418
|
innerHTML: e.icon
|
|
1412
|
-
}, null, 12,
|
|
1419
|
+
}, null, 12, ur)) : a.value ? (f(), x("img", {
|
|
1413
1420
|
key: 1,
|
|
1414
1421
|
src: e.icon,
|
|
1415
1422
|
width: n.value,
|
|
1416
1423
|
height: n.value,
|
|
1417
1424
|
class: "tpl:inline-block",
|
|
1418
1425
|
alt: ""
|
|
1419
|
-
}, null, 8,
|
|
1426
|
+
}, null, 8, dr)) : (f(), D(k(Qn), {
|
|
1420
1427
|
key: 2,
|
|
1421
1428
|
size: n.value,
|
|
1422
1429
|
"stroke-width": 1.5
|
|
@@ -1425,16 +1432,16 @@ var Bn = y({
|
|
|
1425
1432
|
});
|
|
1426
1433
|
//#endregion
|
|
1427
1434
|
//#region src/composables/useEditorRoot.ts
|
|
1428
|
-
function
|
|
1429
|
-
return P(
|
|
1435
|
+
function pr() {
|
|
1436
|
+
return P(Et, document) ?? document;
|
|
1430
1437
|
}
|
|
1431
1438
|
//#endregion
|
|
1432
1439
|
//#region src/composables/useFocusTrap.ts
|
|
1433
|
-
var
|
|
1434
|
-
function
|
|
1435
|
-
let n =
|
|
1440
|
+
var mr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1441
|
+
function hr(e, t) {
|
|
1442
|
+
let n = pr(), r = null, i = null, a = null;
|
|
1436
1443
|
function o() {
|
|
1437
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1444
|
+
return e.value ? Array.from(e.value.querySelectorAll(mr)).filter((e) => e.offsetParent !== null) : [];
|
|
1438
1445
|
}
|
|
1439
1446
|
function s(e) {
|
|
1440
1447
|
if (e.key !== "Tab") return;
|
|
@@ -1449,7 +1456,7 @@ function cr(e, t) {
|
|
|
1449
1456
|
a = null;
|
|
1450
1457
|
let t = o();
|
|
1451
1458
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1452
|
-
}), i =
|
|
1459
|
+
}), i = at(e, "keydown", s);
|
|
1453
1460
|
}
|
|
1454
1461
|
function d(e = {}) {
|
|
1455
1462
|
let t = e.restoreFocus !== !1;
|
|
@@ -1464,8 +1471,8 @@ function cr(e, t) {
|
|
|
1464
1471
|
}
|
|
1465
1472
|
//#endregion
|
|
1466
1473
|
//#region src/composables/useEmoji.ts
|
|
1467
|
-
function
|
|
1468
|
-
let [e, t] =
|
|
1474
|
+
function gr() {
|
|
1475
|
+
let [e, t] = Ye(!1), n = v([]), r = !1;
|
|
1469
1476
|
u(() => {
|
|
1470
1477
|
r = !0;
|
|
1471
1478
|
}), c(e, async (e) => {
|
|
@@ -1490,7 +1497,7 @@ function lr() {
|
|
|
1490
1497
|
}
|
|
1491
1498
|
//#endregion
|
|
1492
1499
|
//#region src/composables/useDragDrop.ts
|
|
1493
|
-
function
|
|
1500
|
+
function _r(e) {
|
|
1494
1501
|
let { onBlockMove: t, onBlockAdd: n } = e, r = _(!1), i = _(null), a = _(null);
|
|
1495
1502
|
function o(e) {
|
|
1496
1503
|
r.value = !0, i.value = e;
|
|
@@ -1540,7 +1547,7 @@ function ur(e) {
|
|
|
1540
1547
|
}
|
|
1541
1548
|
//#endregion
|
|
1542
1549
|
//#region src/composables/useFonts.ts
|
|
1543
|
-
var
|
|
1550
|
+
var vr = [
|
|
1544
1551
|
{
|
|
1545
1552
|
value: "Arial",
|
|
1546
1553
|
label: "Arial"
|
|
@@ -1569,7 +1576,7 @@ var dr = [
|
|
|
1569
1576
|
value: "Courier New",
|
|
1570
1577
|
label: "Courier New"
|
|
1571
1578
|
}
|
|
1572
|
-
],
|
|
1579
|
+
], yr = {
|
|
1573
1580
|
arial: "Arial, sans-serif",
|
|
1574
1581
|
helvetica: "Helvetica, sans-serif",
|
|
1575
1582
|
georgia: "Georgia, serif",
|
|
@@ -1577,23 +1584,23 @@ var dr = [
|
|
|
1577
1584
|
verdana: "Verdana, sans-serif",
|
|
1578
1585
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1579
1586
|
"courier new": "'Courier New', monospace"
|
|
1580
|
-
},
|
|
1581
|
-
function
|
|
1582
|
-
if (e === void 0 || e === !0) return [...
|
|
1587
|
+
}, br = "Arial, sans-serif";
|
|
1588
|
+
function xr(e) {
|
|
1589
|
+
if (e === void 0 || e === !0) return [...vr];
|
|
1583
1590
|
if (e === !1) return [];
|
|
1584
1591
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1585
1592
|
for (let i of e) {
|
|
1586
|
-
let e = i.toLowerCase(), a =
|
|
1593
|
+
let e = i.toLowerCase(), a = vr.find((t) => t.value.toLowerCase() === e);
|
|
1587
1594
|
if (!a) {
|
|
1588
|
-
r.has(e) || (r.add(e),
|
|
1595
|
+
r.has(e) || (r.add(e), Mn.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${vr.map((e) => e.value).join(", ")}.`));
|
|
1589
1596
|
continue;
|
|
1590
1597
|
}
|
|
1591
1598
|
n.has(a.value) || (n.add(a.value), t.push(a));
|
|
1592
1599
|
}
|
|
1593
1600
|
return t;
|
|
1594
1601
|
}
|
|
1595
|
-
function
|
|
1596
|
-
let t = _(e?.customFonts ?? []), n = _(!0), r = _(!1), i =
|
|
1602
|
+
function Sr(e) {
|
|
1603
|
+
let t = _(e?.customFonts ?? []), n = _(!0), r = _(!1), i = xr(e?.builtIns), a = M(() => e?.defaultFallback ?? br);
|
|
1597
1604
|
function o(e) {
|
|
1598
1605
|
n.value = e;
|
|
1599
1606
|
}
|
|
@@ -1610,20 +1617,20 @@ function hr(e) {
|
|
|
1610
1617
|
function l(e) {
|
|
1611
1618
|
return c.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1612
1619
|
}
|
|
1613
|
-
let d = e?.defaultFont ??
|
|
1614
|
-
l(d) ||
|
|
1620
|
+
let d = e?.defaultFont ?? br.split(",")[0].trim();
|
|
1621
|
+
l(d) || Mn.warn(`config.fonts: new templates seed "${d}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
1615
1622
|
function f(e) {
|
|
1616
|
-
return
|
|
1623
|
+
return vr.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1617
1624
|
}
|
|
1618
1625
|
function p() {
|
|
1619
1626
|
if (e?.defaultFont) {
|
|
1620
|
-
if (!n.value && !f(e.defaultFont)) return
|
|
1627
|
+
if (!n.value && !f(e.defaultFont)) return br;
|
|
1621
1628
|
if (l(e.defaultFont)) {
|
|
1622
1629
|
let t = c.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1623
1630
|
if (t) return t.value;
|
|
1624
1631
|
}
|
|
1625
1632
|
}
|
|
1626
|
-
return
|
|
1633
|
+
return br;
|
|
1627
1634
|
}
|
|
1628
1635
|
let m = M(() => p());
|
|
1629
1636
|
function h(e) {
|
|
@@ -1633,7 +1640,7 @@ function hr(e) {
|
|
|
1633
1640
|
let e = n.fallback ?? a.value;
|
|
1634
1641
|
return `'${n.name}', ${e}`;
|
|
1635
1642
|
}
|
|
1636
|
-
return
|
|
1643
|
+
return yr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${a.value}`);
|
|
1637
1644
|
}
|
|
1638
1645
|
let g = [], v = !1;
|
|
1639
1646
|
async function y() {
|
|
@@ -1649,7 +1656,7 @@ function hr(e) {
|
|
|
1649
1656
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1650
1657
|
});
|
|
1651
1658
|
} catch (t) {
|
|
1652
|
-
|
|
1659
|
+
Mn.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1653
1660
|
}
|
|
1654
1661
|
});
|
|
1655
1662
|
await Promise.allSettled(e), !v && (r.value = !0);
|
|
@@ -1676,8 +1683,8 @@ function hr(e) {
|
|
|
1676
1683
|
}
|
|
1677
1684
|
//#endregion
|
|
1678
1685
|
//#region src/composables/useLogicTag.ts
|
|
1679
|
-
function
|
|
1680
|
-
let e = P(
|
|
1686
|
+
function Cr() {
|
|
1687
|
+
let e = P(ct, []), t = P(vt, []), n = P(At, Te.liquid), r = P(ot, null), i = P(Rt, null), a = _(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
|
|
1681
1688
|
async function c() {
|
|
1682
1689
|
if (r) {
|
|
1683
1690
|
a.value = !0;
|
|
@@ -1708,12 +1715,12 @@ function gr() {
|
|
|
1708
1715
|
}
|
|
1709
1716
|
//#endregion
|
|
1710
1717
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1711
|
-
function
|
|
1712
|
-
return
|
|
1718
|
+
function wr(e, t, n) {
|
|
1719
|
+
return ve(e, n) ? {
|
|
1713
1720
|
type: "logicMergeTagNode",
|
|
1714
1721
|
attrs: {
|
|
1715
1722
|
value: e,
|
|
1716
|
-
keyword:
|
|
1723
|
+
keyword: pe(e, n)
|
|
1717
1724
|
}
|
|
1718
1725
|
} : {
|
|
1719
1726
|
type: "mergeTagNode",
|
|
@@ -1725,15 +1732,15 @@ function _r(e, t, n) {
|
|
|
1725
1732
|
}
|
|
1726
1733
|
//#endregion
|
|
1727
1734
|
//#region src/utils/insertLogicTag.ts
|
|
1728
|
-
function
|
|
1735
|
+
function Tr(e) {
|
|
1729
1736
|
return "before" in e && "after" in e;
|
|
1730
1737
|
}
|
|
1731
|
-
function
|
|
1732
|
-
if (!
|
|
1733
|
-
e.chain().focus().insertContent(
|
|
1738
|
+
function Er(e, t, n) {
|
|
1739
|
+
if (!Tr(t)) {
|
|
1740
|
+
e.chain().focus().insertContent(wr(t.value, t.label, n)).run();
|
|
1734
1741
|
return;
|
|
1735
1742
|
}
|
|
1736
|
-
let r =
|
|
1743
|
+
let r = wr(t.before, t.label, n), i = wr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1737
1744
|
if (a !== o) {
|
|
1738
1745
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1739
1746
|
return;
|
|
@@ -1742,20 +1749,20 @@ function yr(e, t, n) {
|
|
|
1742
1749
|
}
|
|
1743
1750
|
//#endregion
|
|
1744
1751
|
//#region src/utils/linkColorExtension.ts
|
|
1745
|
-
function
|
|
1752
|
+
function Dr(e) {
|
|
1746
1753
|
if (!e) return null;
|
|
1747
1754
|
let t = e.trim();
|
|
1748
1755
|
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;
|
|
1749
1756
|
}
|
|
1750
|
-
function
|
|
1757
|
+
function Or(e) {
|
|
1751
1758
|
return e.extend({ addAttributes() {
|
|
1752
1759
|
return {
|
|
1753
1760
|
...this.parent?.(),
|
|
1754
1761
|
color: {
|
|
1755
1762
|
default: null,
|
|
1756
|
-
parseHTML: (e) =>
|
|
1763
|
+
parseHTML: (e) => Dr(et(e.style.color)),
|
|
1757
1764
|
renderHTML: (e) => {
|
|
1758
|
-
let t =
|
|
1765
|
+
let t = Dr(e.color);
|
|
1759
1766
|
return t ? { style: `color: ${t}` } : {};
|
|
1760
1767
|
}
|
|
1761
1768
|
}
|
|
@@ -1764,9 +1771,9 @@ function xr(e) {
|
|
|
1764
1771
|
}
|
|
1765
1772
|
//#endregion
|
|
1766
1773
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1767
|
-
function
|
|
1774
|
+
function kr(e) {
|
|
1768
1775
|
let t = _(!1), n = _(""), r = _(""), i = _(null);
|
|
1769
|
-
|
|
1776
|
+
hr(i, t);
|
|
1770
1777
|
function a() {
|
|
1771
1778
|
let i = e.value?.getAttributes("link") ?? {};
|
|
1772
1779
|
n.value = i.href || "", r.value = i.color || "", t.value = !0;
|
|
@@ -1775,7 +1782,7 @@ function Sr(e) {
|
|
|
1775
1782
|
if (n.value) {
|
|
1776
1783
|
let t = c(n.value);
|
|
1777
1784
|
if (t !== null) {
|
|
1778
|
-
let n =
|
|
1785
|
+
let n = Dr(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1779
1786
|
n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
|
|
1780
1787
|
}
|
|
1781
1788
|
}
|
|
@@ -1822,8 +1829,8 @@ function Sr(e) {
|
|
|
1822
1829
|
}
|
|
1823
1830
|
//#endregion
|
|
1824
1831
|
//#region src/composables/useRichTextEditor.ts
|
|
1825
|
-
function
|
|
1826
|
-
let t = P(
|
|
1832
|
+
function Ar(e) {
|
|
1833
|
+
let t = P(Dt, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: i, requestMergeTag: a, syntax: o, autocomplete: s } = Xt(), { canInsertLogicTag: l, isRequesting: u, requestLogicTag: d } = Cr(), f = P(Vt, null), p = (g(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = le(o), y = v(null), { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: E, closeLinkDialog: D, handleLinkKeydown: O } = kr(y), { start: k, stop: A } = Xe(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), j = v(null), ee = _(!0), M = _(null), te = !1;
|
|
1827
1834
|
async function N() {
|
|
1828
1835
|
M.value = null, ee.value = !0;
|
|
1829
1836
|
try {
|
|
@@ -1853,7 +1860,7 @@ function Cr(e) {
|
|
|
1853
1860
|
y.value = l, ee.value = !1, k();
|
|
1854
1861
|
} catch (t) {
|
|
1855
1862
|
if (te) return;
|
|
1856
|
-
|
|
1863
|
+
Mn.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), M.value = t instanceof Error ? t.message : "Failed to load editor", ee.value = !1;
|
|
1857
1864
|
}
|
|
1858
1865
|
}
|
|
1859
1866
|
function ne() {
|
|
@@ -1871,7 +1878,7 @@ function Cr(e) {
|
|
|
1871
1878
|
let a = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1872
1879
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || a || e.onDone();
|
|
1873
1880
|
}
|
|
1874
|
-
|
|
1881
|
+
at(document, "mousedown", ie), h(() => {
|
|
1875
1882
|
te = !0, re(), A(), y.value?.destroy();
|
|
1876
1883
|
});
|
|
1877
1884
|
async function ae() {
|
|
@@ -1883,7 +1890,7 @@ function Cr(e) {
|
|
|
1883
1890
|
}
|
|
1884
1891
|
async function F() {
|
|
1885
1892
|
let e = await d();
|
|
1886
|
-
te || (e && y.value ?
|
|
1893
|
+
te || (e && y.value ? Er(y.value, e, o) : y.value?.commands.focus());
|
|
1887
1894
|
}
|
|
1888
1895
|
return {
|
|
1889
1896
|
editor: y,
|
|
@@ -1912,9 +1919,9 @@ function Cr(e) {
|
|
|
1912
1919
|
}
|
|
1913
1920
|
//#endregion
|
|
1914
1921
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1915
|
-
var
|
|
1916
|
-
function
|
|
1917
|
-
let t =
|
|
1922
|
+
var jr = "(max-width: 767px)";
|
|
1923
|
+
function Mr(e) {
|
|
1924
|
+
let t = $e(jr);
|
|
1918
1925
|
return {
|
|
1919
1926
|
isSmallScreen: t,
|
|
1920
1927
|
showNotice: M(() => (S(e) ?? !0) && t.value)
|
|
@@ -1922,20 +1929,20 @@ function Tr(e) {
|
|
|
1922
1929
|
}
|
|
1923
1930
|
//#endregion
|
|
1924
1931
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1925
|
-
var
|
|
1932
|
+
var Nr = { class: "tpl:w-full" }, Pr = {
|
|
1926
1933
|
key: 0,
|
|
1927
1934
|
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)]"
|
|
1928
|
-
},
|
|
1935
|
+
}, Fr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ir = {
|
|
1929
1936
|
key: 1,
|
|
1930
1937
|
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)]"
|
|
1931
|
-
},
|
|
1938
|
+
}, Lr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Rr = {
|
|
1932
1939
|
key: 2,
|
|
1933
1940
|
class: "tpl:relative"
|
|
1934
|
-
},
|
|
1941
|
+
}, zr = ["innerHTML"], Br = {
|
|
1935
1942
|
key: 0,
|
|
1936
1943
|
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]",
|
|
1937
1944
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1938
|
-
},
|
|
1945
|
+
}, Vr = /* @__PURE__ */ y({
|
|
1939
1946
|
__name: "CustomBlock",
|
|
1940
1947
|
props: {
|
|
1941
1948
|
block: {},
|
|
@@ -1943,7 +1950,7 @@ var Er = { class: "tpl:w-full" }, Dr = {
|
|
|
1943
1950
|
},
|
|
1944
1951
|
emits: ["fetchData"],
|
|
1945
1952
|
setup(e, { emit: t }) {
|
|
1946
|
-
let n = e, r = t, { t: i } =
|
|
1953
|
+
let n = e, r = t, { t: i } = Ht(), o = P(Pt, null), s = _(""), l = _(!1), u = M(() => o?.getDefinition(n.block.customType)), d = M(() => !!u.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: v } = ln({
|
|
1947
1954
|
definition: u,
|
|
1948
1955
|
block: M(() => n.block),
|
|
1949
1956
|
onUpdate: (e, t) => {
|
|
@@ -1952,27 +1959,37 @@ var Er = { class: "tpl:w-full" }, Dr = {
|
|
|
1952
1959
|
dataSourceFetched: t
|
|
1953
1960
|
});
|
|
1954
1961
|
}
|
|
1962
|
+
}), y = P(yt, []), S = P(bt, null), C = M(() => {
|
|
1963
|
+
if (!S?.value) return n.block;
|
|
1964
|
+
let e = {};
|
|
1965
|
+
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ? ue(r, y) : r;
|
|
1966
|
+
return {
|
|
1967
|
+
...n.block,
|
|
1968
|
+
fieldValues: e
|
|
1969
|
+
};
|
|
1955
1970
|
});
|
|
1956
|
-
async function
|
|
1971
|
+
async function T() {
|
|
1957
1972
|
if (o) {
|
|
1958
1973
|
l.value = !1;
|
|
1959
1974
|
try {
|
|
1960
|
-
let e = await o.renderCustomBlock(
|
|
1975
|
+
let e = await o.renderCustomBlock(C.value);
|
|
1961
1976
|
e.includes("Template render error:") && (l.value = !0), s.value = e;
|
|
1962
1977
|
} catch {
|
|
1963
1978
|
l.value = !0, s.value = "";
|
|
1964
1979
|
}
|
|
1965
1980
|
}
|
|
1966
1981
|
}
|
|
1967
|
-
let
|
|
1982
|
+
let E = qe(T, 150);
|
|
1968
1983
|
return a(() => {
|
|
1969
|
-
|
|
1984
|
+
T();
|
|
1970
1985
|
}), c(() => n.block.fieldValues, () => {
|
|
1971
|
-
|
|
1972
|
-
}, { deep: !0 }), (
|
|
1986
|
+
E();
|
|
1987
|
+
}, { deep: !0 }), c(() => S?.value, () => {
|
|
1988
|
+
E();
|
|
1989
|
+
}), (e, t) => (f(), x("div", Nr, [d.value ? l.value ? (f(), x("div", Ir, [w(k(qt), {
|
|
1973
1990
|
size: 24,
|
|
1974
1991
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1975
|
-
}), b("span",
|
|
1992
|
+
}), b("span", Lr, p(k(i).customBlocks.renderError), 1)])) : (f(), x("div", Rr, [b("div", { innerHTML: s.value }, null, 8, zr), k(v) && k(g) ? (f(), x("div", Br, [k(m) ? (f(), D(Jt, {
|
|
1976
1993
|
key: 1,
|
|
1977
1994
|
class: "tpl:w-48"
|
|
1978
1995
|
})) : (f(), x("button", {
|
|
@@ -1980,16 +1997,16 @@ var Er = { class: "tpl:w-full" }, Dr = {
|
|
|
1980
1997
|
type: "button",
|
|
1981
1998
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1982
1999
|
onClick: t[0] ||= F((...e) => k(h) && k(h)(...e), ["stop"])
|
|
1983
|
-
}, [u.value?.icon ? (f(), D(
|
|
2000
|
+
}, [u.value?.icon ? (f(), D(fr, {
|
|
1984
2001
|
key: 0,
|
|
1985
2002
|
icon: u.value.icon,
|
|
1986
2003
|
size: 16
|
|
1987
|
-
}, null, 8, ["icon"])) : N("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : N("", !0)])) : (f(), x("div",
|
|
2004
|
+
}, null, 8, ["icon"])) : N("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : N("", !0)])) : (f(), x("div", Pr, [w(k(or), {
|
|
1988
2005
|
size: 24,
|
|
1989
2006
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1990
|
-
}), b("span",
|
|
2007
|
+
}), b("span", Fr, p(k(i).customBlocks.definitionNotFound), 1)]))]));
|
|
1991
2008
|
}
|
|
1992
|
-
}),
|
|
2009
|
+
}), Hr = { class: "tpl:w-full" }, Ur = /* @__PURE__ */ y({
|
|
1993
2010
|
__name: "DividerBlock",
|
|
1994
2011
|
props: {
|
|
1995
2012
|
block: {},
|
|
@@ -2001,63 +2018,63 @@ var Er = { class: "tpl:w-full" }, Dr = {
|
|
|
2001
2018
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2002
2019
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2003
2020
|
}));
|
|
2004
|
-
return (e, t) => (f(), x("div",
|
|
2021
|
+
return (e, t) => (f(), x("div", Hr, [b("hr", {
|
|
2005
2022
|
class: "tpl:m-0 tpl:border-none",
|
|
2006
2023
|
style: i(n.value)
|
|
2007
2024
|
}, null, 4)]));
|
|
2008
2025
|
}
|
|
2009
|
-
}),
|
|
2026
|
+
}), Wr = { class: "tpl:w-full" }, Gr = ["srcdoc", "title"], Kr = {
|
|
2010
2027
|
key: 1,
|
|
2011
2028
|
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)]"
|
|
2012
|
-
},
|
|
2029
|
+
}, qr = {
|
|
2013
2030
|
key: 0,
|
|
2014
2031
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2015
|
-
},
|
|
2032
|
+
}, Jr = {
|
|
2016
2033
|
key: 1,
|
|
2017
2034
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2018
|
-
},
|
|
2035
|
+
}, Yr = /* @__PURE__ */ y({
|
|
2019
2036
|
__name: "HtmlBlock",
|
|
2020
2037
|
props: {
|
|
2021
2038
|
block: {},
|
|
2022
2039
|
viewport: {}
|
|
2023
2040
|
},
|
|
2024
2041
|
setup(e) {
|
|
2025
|
-
let t = e, { t: n } =
|
|
2026
|
-
function
|
|
2027
|
-
let e =
|
|
2028
|
-
e && (
|
|
2042
|
+
let t = e, { t: n } = Ht(), r = P(Bt, !1), a = M(() => t.block.content.trim().length > 0), o = M(() => r && a.value), s = P(yt, []), l = P(bt, null), u = M(() => l?.value ? ue(t.block.content, s) : t.block.content), d = _(null), m = _(60), g = null;
|
|
2043
|
+
function v() {
|
|
2044
|
+
let e = d.value?.contentDocument;
|
|
2045
|
+
e && (m.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
2029
2046
|
}
|
|
2030
|
-
function
|
|
2031
|
-
|
|
2032
|
-
let e =
|
|
2033
|
-
e && typeof ResizeObserver < "u" && (
|
|
2047
|
+
function y() {
|
|
2048
|
+
g?.disconnect(), g = null, v();
|
|
2049
|
+
let e = d.value?.contentDocument?.documentElement;
|
|
2050
|
+
e && typeof ResizeObserver < "u" && (g = new ResizeObserver(() => v()), g.observe(e));
|
|
2034
2051
|
}
|
|
2035
2052
|
return c(o, (e) => {
|
|
2036
|
-
e || (
|
|
2053
|
+
e || (g?.disconnect(), g = null);
|
|
2037
2054
|
}), h(() => {
|
|
2038
|
-
|
|
2039
|
-
}), (
|
|
2055
|
+
g?.disconnect(), g = null;
|
|
2056
|
+
}), (e, t) => (f(), x("div", Wr, [o.value ? (f(), x("iframe", {
|
|
2040
2057
|
key: 0,
|
|
2041
2058
|
ref_key: "iframeRef",
|
|
2042
|
-
ref:
|
|
2043
|
-
srcdoc:
|
|
2059
|
+
ref: d,
|
|
2060
|
+
srcdoc: u.value,
|
|
2044
2061
|
sandbox: "allow-same-origin",
|
|
2045
2062
|
title: k(n).html.preview,
|
|
2046
2063
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2047
|
-
style: i({ height: `${
|
|
2048
|
-
onLoad:
|
|
2049
|
-
}, null, 44,
|
|
2064
|
+
style: i({ height: `${m.value}px` }),
|
|
2065
|
+
onLoad: y
|
|
2066
|
+
}, null, 44, Gr)) : (f(), x("div", Kr, [w(k($n), {
|
|
2050
2067
|
size: 24,
|
|
2051
2068
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2052
|
-
}), a.value ? (f(), x("span",
|
|
2069
|
+
}), a.value ? (f(), x("span", qr, p(k(n).html.preview), 1)) : (f(), x("span", Jr, p(k(n).html.empty), 1))]))]));
|
|
2053
2070
|
}
|
|
2054
|
-
}),
|
|
2055
|
-
function
|
|
2056
|
-
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || S(r), { isOverDropZone: a } =
|
|
2071
|
+
}), Xr = "image/";
|
|
2072
|
+
function Zr(e) {
|
|
2073
|
+
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || S(r), { isOverDropZone: a } = Qe(t, {
|
|
2057
2074
|
preventDefaultForUnhandled: !0,
|
|
2058
2075
|
onDrop: (e) => {
|
|
2059
2076
|
if (!i()) return;
|
|
2060
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
2077
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(Xr));
|
|
2061
2078
|
t.length > 0 && n([t[0]]);
|
|
2062
2079
|
}
|
|
2063
2080
|
});
|
|
@@ -2065,17 +2082,17 @@ function Wr(e) {
|
|
|
2065
2082
|
}
|
|
2066
2083
|
//#endregion
|
|
2067
2084
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2068
|
-
var
|
|
2085
|
+
var Qr = {
|
|
2069
2086
|
key: 0,
|
|
2070
2087
|
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)]",
|
|
2071
2088
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
2072
|
-
},
|
|
2089
|
+
}, $r = ["href"], ei = ["src", "alt"], ti = ["src", "alt"], ni = {
|
|
2073
2090
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2074
2091
|
style: { opacity: "0.7" }
|
|
2075
|
-
},
|
|
2092
|
+
}, ri = ["href"], ii = ["src", "alt"], ai = ["src", "alt"], oi = {
|
|
2076
2093
|
key: 4,
|
|
2077
2094
|
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)]"
|
|
2078
|
-
},
|
|
2095
|
+
}, si = ["aria-label"], ci = { key: 1 }, li = /* @__PURE__ */ y({
|
|
2079
2096
|
__name: "ImageBlock",
|
|
2080
2097
|
props: {
|
|
2081
2098
|
block: {},
|
|
@@ -2083,7 +2100,7 @@ var Gr = {
|
|
|
2083
2100
|
},
|
|
2084
2101
|
emits: ["update"],
|
|
2085
2102
|
setup(e, { emit: t }) {
|
|
2086
|
-
let n = e, r = t, { t: a } =
|
|
2103
|
+
let n = e, r = t, { t: a } = Ht(), { syntax: o } = Xt(), s = P(kt, null), c = M(() => !!s), l = Zt();
|
|
2087
2104
|
async function u() {
|
|
2088
2105
|
let e = await s?.({ accept: ["images"] });
|
|
2089
2106
|
if (l.alive && e) {
|
|
@@ -2110,7 +2127,7 @@ var Gr = {
|
|
|
2110
2127
|
}
|
|
2111
2128
|
}
|
|
2112
2129
|
}
|
|
2113
|
-
let { isOver: v } =
|
|
2130
|
+
let { isOver: v } = Zr({
|
|
2114
2131
|
target: d,
|
|
2115
2132
|
enabled: h,
|
|
2116
2133
|
onFiles: g
|
|
@@ -2123,14 +2140,14 @@ var Gr = {
|
|
|
2123
2140
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2124
2141
|
marginRight: e === "center" ? "auto" : void 0
|
|
2125
2142
|
};
|
|
2126
|
-
}), C = M(() =>
|
|
2143
|
+
}), C = M(() => De(n.block.src, o)), T = yn(() => C.value ? void 0 : n.block.src), E = yn(() => C.value ? n.block.placeholderUrl : void 0);
|
|
2127
2144
|
return (t, n) => (f(), x("div", {
|
|
2128
2145
|
ref_key: "dropZoneRef",
|
|
2129
2146
|
ref: d,
|
|
2130
2147
|
"data-testid": "image-drop-zone",
|
|
2131
2148
|
class: "tpl:relative tpl:w-full",
|
|
2132
2149
|
style: i(y.value)
|
|
2133
|
-
}, [h.value && (k(v) || m.value) ? (f(), x("div",
|
|
2150
|
+
}, [h.value && (k(v) || m.value) ? (f(), x("div", Qr, [m.value ? (f(), x(j, { key: 0 }, [w(k(Wt), {
|
|
2134
2151
|
class: "tpl-spinner",
|
|
2135
2152
|
size: 20,
|
|
2136
2153
|
"stroke-width": 2
|
|
@@ -2149,22 +2166,22 @@ var Gr = {
|
|
|
2149
2166
|
src: k(E),
|
|
2150
2167
|
alt: e.block.alt || k(a).image.altTextPlaceholder,
|
|
2151
2168
|
style: i(S.value)
|
|
2152
|
-
}, null, 12,
|
|
2169
|
+
}, null, 12, ei)], 8, $r)) : (f(), x("img", {
|
|
2153
2170
|
key: 1,
|
|
2154
2171
|
class: "tpl:border-0",
|
|
2155
2172
|
src: k(E),
|
|
2156
2173
|
alt: e.block.alt,
|
|
2157
2174
|
style: i(S.value)
|
|
2158
|
-
}, null, 12,
|
|
2175
|
+
}, null, 12, ti))], 64)) : e.block.src && C.value ? (f(), x("div", {
|
|
2159
2176
|
key: 2,
|
|
2160
2177
|
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)]",
|
|
2161
2178
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, S.value])
|
|
2162
|
-
}, [w(k(
|
|
2179
|
+
}, [w(k(ir), {
|
|
2163
2180
|
size: 32,
|
|
2164
2181
|
"stroke-width": 1.5,
|
|
2165
2182
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2166
2183
|
style: { opacity: "0.5" }
|
|
2167
|
-
}), b("span",
|
|
2184
|
+
}), b("span", ni, [w(qn, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (f(), x(j, { key: 3 }, [e.block.linkUrl ? (f(), x("a", {
|
|
2168
2185
|
key: 0,
|
|
2169
2186
|
href: e.block.linkUrl,
|
|
2170
2187
|
target: "_blank",
|
|
@@ -2176,33 +2193,33 @@ var Gr = {
|
|
|
2176
2193
|
src: k(T),
|
|
2177
2194
|
alt: e.block.alt || k(a).image.altTextPlaceholder,
|
|
2178
2195
|
style: i(S.value)
|
|
2179
|
-
}, null, 12,
|
|
2196
|
+
}, null, 12, ii)], 8, ri)) : (f(), x("img", {
|
|
2180
2197
|
key: 1,
|
|
2181
2198
|
class: "tpl:border-0",
|
|
2182
2199
|
src: k(T),
|
|
2183
2200
|
alt: e.block.alt,
|
|
2184
2201
|
style: i(S.value)
|
|
2185
|
-
}, null, 12,
|
|
2202
|
+
}, null, 12, ai))], 64)) : (f(), x("div", oi, [c.value ? (f(), x("button", {
|
|
2186
2203
|
key: 0,
|
|
2187
2204
|
"aria-label": k(a).image.browseMedia,
|
|
2188
2205
|
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)]",
|
|
2189
2206
|
onClick: F(u, ["stop"])
|
|
2190
|
-
}, [w(k(
|
|
2207
|
+
}, [w(k(ir), {
|
|
2191
2208
|
size: 14,
|
|
2192
2209
|
"stroke-width": 1.5
|
|
2193
|
-
}), O(" " + p(k(a).image.browseMedia), 1)], 8,
|
|
2210
|
+
}), O(" " + p(k(a).image.browseMedia), 1)], 8, si)) : (f(), x("span", ci, p(k(a).image.clickToAdd), 1))]))], 4));
|
|
2194
2211
|
}
|
|
2195
|
-
}),
|
|
2212
|
+
}), ui = { class: "tpl:w-full" }, di = ["href"], fi = {
|
|
2196
2213
|
key: 1,
|
|
2197
2214
|
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)]"
|
|
2198
|
-
},
|
|
2215
|
+
}, pi = /* @__PURE__ */ y({
|
|
2199
2216
|
__name: "MenuBlock",
|
|
2200
2217
|
props: {
|
|
2201
2218
|
block: {},
|
|
2202
2219
|
viewport: {}
|
|
2203
2220
|
},
|
|
2204
2221
|
setup(e) {
|
|
2205
|
-
let n = e, { t: r } =
|
|
2222
|
+
let n = e, { t: r } = Ht(), a = M(() => ({
|
|
2206
2223
|
display: "flex",
|
|
2207
2224
|
flexWrap: "wrap",
|
|
2208
2225
|
gap: `0 ${n.block.spacing}px`,
|
|
@@ -2214,7 +2231,7 @@ var Gr = {
|
|
|
2214
2231
|
function s(e) {
|
|
2215
2232
|
return e || n.block.linkColor || n.block.color;
|
|
2216
2233
|
}
|
|
2217
|
-
return (n, c) => (f(), x("div",
|
|
2234
|
+
return (n, c) => (f(), x("div", ui, [o.value ? (f(), x("div", {
|
|
2218
2235
|
key: 0,
|
|
2219
2236
|
style: i(a.value)
|
|
2220
2237
|
}, [(f(!0), x(j, null, t(e.block.items, (t, n) => (f(), x(j, { key: t.id }, [b("a", {
|
|
@@ -2226,15 +2243,15 @@ var Gr = {
|
|
|
2226
2243
|
textDecoration: t.underline ? "underline" : "none"
|
|
2227
2244
|
}),
|
|
2228
2245
|
onClick: c[0] ||= F(() => {}, ["prevent"])
|
|
2229
|
-
}, [w(
|
|
2246
|
+
}, [w(qn, { text: t.text || "..." }, null, 8, ["text"])], 12, di), n < e.block.items.length - 1 ? (f(), x("span", {
|
|
2230
2247
|
key: 0,
|
|
2231
2248
|
style: i({
|
|
2232
2249
|
color: e.block.separatorColor,
|
|
2233
2250
|
padding: `0 ${e.block.spacing}px`
|
|
2234
2251
|
})
|
|
2235
|
-
}, p(e.block.separator), 5)) : N("", !0)], 64))), 128))], 4)) : (f(), x("div",
|
|
2252
|
+
}, p(e.block.separator), 5)) : N("", !0)], 64))), 128))], 4)) : (f(), x("div", fi, [w(k(ar), { size: 16 }), b("span", null, p(k(r).menu.addLinks), 1)]))]));
|
|
2236
2253
|
}
|
|
2237
|
-
}),
|
|
2254
|
+
}), mi = /* @__PURE__ */ new Set([
|
|
2238
2255
|
"http",
|
|
2239
2256
|
"https",
|
|
2240
2257
|
"mailto",
|
|
@@ -2244,7 +2261,7 @@ var Gr = {
|
|
|
2244
2261
|
"sms",
|
|
2245
2262
|
"xmpp",
|
|
2246
2263
|
"cid"
|
|
2247
|
-
]),
|
|
2264
|
+
]), hi = /* @__PURE__ */ new Set([
|
|
2248
2265
|
"SCRIPT",
|
|
2249
2266
|
"STYLE",
|
|
2250
2267
|
"IFRAME",
|
|
@@ -2254,7 +2271,7 @@ var Gr = {
|
|
|
2254
2271
|
"META",
|
|
2255
2272
|
"BASE",
|
|
2256
2273
|
"FORM"
|
|
2257
|
-
]),
|
|
2274
|
+
]), gi = /* @__PURE__ */ new Set([
|
|
2258
2275
|
"href",
|
|
2259
2276
|
"xlink:href",
|
|
2260
2277
|
"formaction",
|
|
@@ -2263,16 +2280,16 @@ var Gr = {
|
|
|
2263
2280
|
"background",
|
|
2264
2281
|
"poster"
|
|
2265
2282
|
]);
|
|
2266
|
-
function
|
|
2283
|
+
function _i(e, t) {
|
|
2267
2284
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2268
2285
|
if (!n || n.startsWith("#")) return !0;
|
|
2269
2286
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
2270
2287
|
if (!r) return !0;
|
|
2271
2288
|
let i = r[1].toLowerCase();
|
|
2272
|
-
return
|
|
2289
|
+
return mi.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
2273
2290
|
}
|
|
2274
|
-
function
|
|
2275
|
-
if (
|
|
2291
|
+
function vi(e) {
|
|
2292
|
+
if (hi.has(e.tagName)) {
|
|
2276
2293
|
e.remove();
|
|
2277
2294
|
return;
|
|
2278
2295
|
}
|
|
@@ -2284,57 +2301,57 @@ function di(e) {
|
|
|
2284
2301
|
e.removeAttribute(n);
|
|
2285
2302
|
continue;
|
|
2286
2303
|
}
|
|
2287
|
-
if (
|
|
2288
|
-
|
|
2304
|
+
if (gi.has(t)) {
|
|
2305
|
+
_i(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
2289
2306
|
continue;
|
|
2290
2307
|
}
|
|
2291
2308
|
if (t === "src") {
|
|
2292
|
-
|
|
2309
|
+
_i(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
2293
2310
|
continue;
|
|
2294
2311
|
}
|
|
2295
2312
|
t === "srcdoc" && e.removeAttribute(n);
|
|
2296
2313
|
}
|
|
2297
2314
|
let n = Array.from(e.children);
|
|
2298
|
-
for (let e of n)
|
|
2315
|
+
for (let e of n) vi(e);
|
|
2299
2316
|
}
|
|
2300
|
-
function
|
|
2317
|
+
function yi(e) {
|
|
2301
2318
|
if (typeof DOMParser > "u") return e;
|
|
2302
2319
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
2303
|
-
for (let e of n)
|
|
2320
|
+
for (let e of n) vi(e);
|
|
2304
2321
|
return t.innerHTML;
|
|
2305
2322
|
}
|
|
2306
2323
|
//#endregion
|
|
2307
2324
|
//#region src/composables/useEditableTextBlock.ts
|
|
2308
|
-
function
|
|
2309
|
-
let t = P(
|
|
2310
|
-
top:
|
|
2311
|
-
left:
|
|
2325
|
+
function bi(e) {
|
|
2326
|
+
let t = P(yt, []), n = P(bt, null), { syntax: r } = Xt(), i = M(() => n?.value ? Ke(e(), t) : he(e(), t)), a = M(() => yi(me(i.value, r))), o = _(!1), s = _(null), { top: c, left: l } = tt(s), { toLocal: u } = it(), d = M(() => u({
|
|
2327
|
+
top: c.value - 8,
|
|
2328
|
+
left: l.value
|
|
2312
2329
|
}));
|
|
2313
|
-
function
|
|
2314
|
-
|
|
2330
|
+
function f() {
|
|
2331
|
+
o.value = !0;
|
|
2315
2332
|
}
|
|
2316
|
-
function
|
|
2317
|
-
|
|
2333
|
+
function p() {
|
|
2334
|
+
o.value = !1;
|
|
2318
2335
|
}
|
|
2319
2336
|
return {
|
|
2320
|
-
isEditing:
|
|
2321
|
-
blockRef:
|
|
2322
|
-
toolbarPosition:
|
|
2323
|
-
resolvedContent:
|
|
2324
|
-
handleDoubleClick:
|
|
2325
|
-
handleEditorDone:
|
|
2337
|
+
isEditing: o,
|
|
2338
|
+
blockRef: s,
|
|
2339
|
+
toolbarPosition: d,
|
|
2340
|
+
resolvedContent: a,
|
|
2341
|
+
handleDoubleClick: f,
|
|
2342
|
+
handleEditorDone: p
|
|
2326
2343
|
};
|
|
2327
2344
|
}
|
|
2328
2345
|
//#endregion
|
|
2329
2346
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2330
|
-
var
|
|
2347
|
+
var xi = ["innerHTML"], Si = /* @__PURE__ */ y({
|
|
2331
2348
|
__name: "ParagraphBlock",
|
|
2332
2349
|
props: {
|
|
2333
2350
|
block: {},
|
|
2334
2351
|
viewport: {}
|
|
2335
2352
|
},
|
|
2336
2353
|
setup(e) {
|
|
2337
|
-
let t = e, n = C(() => import("./ParagraphEditor-
|
|
2354
|
+
let t = e, n = C(() => import("./ParagraphEditor-D-fz0kUb.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = bi(() => t.block.content);
|
|
2338
2355
|
return (t, l) => (f(), x("div", {
|
|
2339
2356
|
ref_key: "blockRef",
|
|
2340
2357
|
ref: i,
|
|
@@ -2353,54 +2370,54 @@ var mi = ["innerHTML"], hi = /* @__PURE__ */ y({
|
|
|
2353
2370
|
key: 1,
|
|
2354
2371
|
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",
|
|
2355
2372
|
innerHTML: k(o)
|
|
2356
|
-
}, null, 8,
|
|
2373
|
+
}, null, 8, xi))], 544));
|
|
2357
2374
|
}
|
|
2358
2375
|
});
|
|
2359
2376
|
//#endregion
|
|
2360
2377
|
//#region src/utils/blockComponentResolver.ts
|
|
2361
|
-
function
|
|
2378
|
+
function Ci(e) {
|
|
2362
2379
|
let t = { fontFamily: e.fontFamily };
|
|
2363
2380
|
return e.textColor && (t.color = e.textColor), e.linkColor && (t["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (t["--tpl-doc-link-underline"] = "underline"), t;
|
|
2364
2381
|
}
|
|
2365
|
-
function
|
|
2382
|
+
function wi(e, t, n) {
|
|
2366
2383
|
if (t) {
|
|
2367
2384
|
let n = t.getComponent(e);
|
|
2368
2385
|
if (n) return n;
|
|
2369
2386
|
}
|
|
2370
2387
|
return n[e.type] ?? null;
|
|
2371
2388
|
}
|
|
2372
|
-
function
|
|
2389
|
+
function Ti(e) {
|
|
2373
2390
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
2374
2391
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
2375
2392
|
backgroundColor: n || "transparent"
|
|
2376
2393
|
};
|
|
2377
2394
|
return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
2378
2395
|
}
|
|
2379
|
-
function
|
|
2396
|
+
function Ei(e) {
|
|
2380
2397
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
2381
2398
|
let t = e.wrapper, n = {};
|
|
2382
2399
|
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;
|
|
2383
2400
|
}
|
|
2384
2401
|
//#endregion
|
|
2385
2402
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2386
|
-
var
|
|
2403
|
+
var Di = [
|
|
2387
2404
|
"data-block-id",
|
|
2388
2405
|
"data-block-type",
|
|
2389
2406
|
"data-tpl-picked"
|
|
2390
|
-
],
|
|
2407
|
+
], Oi = ["aria-label"], ki = [
|
|
2391
2408
|
"aria-label",
|
|
2392
2409
|
"aria-pressed",
|
|
2393
2410
|
"title"
|
|
2394
|
-
],
|
|
2411
|
+
], Ai = ["aria-label", "title"], ji = ["aria-label", "title"], Mi = ["aria-label", "title"], Ni = {
|
|
2395
2412
|
key: 1,
|
|
2396
2413
|
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"
|
|
2397
|
-
},
|
|
2414
|
+
}, Pi = { 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-chrome-bg-elevated)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, Fi = {
|
|
2398
2415
|
key: 2,
|
|
2399
2416
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2400
|
-
},
|
|
2417
|
+
}, Ii = ["aria-label", "title"], Li = {
|
|
2401
2418
|
key: 3,
|
|
2402
2419
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2403
|
-
},
|
|
2420
|
+
}, Ri = ["aria-label"], zi = /*#__PURE__*/ Yt(/* @__PURE__ */ y({
|
|
2404
2421
|
__name: "BlockWrapper",
|
|
2405
2422
|
props: {
|
|
2406
2423
|
block: {},
|
|
@@ -2412,7 +2429,7 @@ var bi = [
|
|
|
2412
2429
|
},
|
|
2413
2430
|
emits: ["select"],
|
|
2414
2431
|
setup(e, { emit: t }) {
|
|
2415
|
-
let n = C(() => import("./BlockIssueBadge-
|
|
2432
|
+
let n = C(() => import("./BlockIssueBadge-Bd94kIiw.js")), r = e, a = t, { t: s, format: c } = Ht(), l = P(zt, null), u = _(null), d = M(() => l?.liftedBlockId.value === r.block.id), m = M(() => d.value ? c(s.blockActions.dragLifted, { block: r.block.type }) : s.blockActions.drag);
|
|
2416
2433
|
async function h() {
|
|
2417
2434
|
await re(), u.value?.focus();
|
|
2418
2435
|
}
|
|
@@ -2438,13 +2455,13 @@ var bi = [
|
|
|
2438
2455
|
let v = M(() => !r.viewport || !r.block.visibility ? !1 : r.block.visibility[r.viewport] === !1), y = M(() => r.previewMode === !0 && v.value), S = M(() => r.viewport ? {
|
|
2439
2456
|
desktop: s.viewport.desktop,
|
|
2440
2457
|
mobile: s.viewport.mobile
|
|
2441
|
-
}[r.viewport] ?? r.viewport : ""), E = M(() => !!r.block.displayCondition), D = P(
|
|
2442
|
-
let e =
|
|
2458
|
+
}[r.viewport] ?? r.viewport : ""), E = M(() => !!r.block.displayCondition), D = P(Ot, null), A = P(wt, null), j = P(It, {}), ee = M(() => j.savedBlocks?.isPicking.value === !0), te = M(() => !r.nested && j.savedBlocks?.isAvailable.value === !0 && j.savedBlocks?.canCreate.value === !0), ne = M(() => r.isSelected && !ee.value), ie = M(() => j.comments?.getBlockCount(r.block.id) ?? 0), ae = M(() => {
|
|
2459
|
+
let e = Ti(r.block), t = {
|
|
2443
2460
|
padding: e.padding,
|
|
2444
2461
|
backgroundColor: e.backgroundColor
|
|
2445
2462
|
};
|
|
2446
2463
|
return e.borderRadius && (t.borderRadius = e.borderRadius), t;
|
|
2447
|
-
}), oe = M(() =>
|
|
2464
|
+
}), oe = M(() => Ei(r.block));
|
|
2448
2465
|
function se(e) {
|
|
2449
2466
|
r.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), a("select"));
|
|
2450
2467
|
}
|
|
@@ -2489,60 +2506,60 @@ var bi = [
|
|
|
2489
2506
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2490
2507
|
title: k(s).blockActions.drag,
|
|
2491
2508
|
onKeydown: g
|
|
2492
|
-
}, [w(k(
|
|
2509
|
+
}, [w(k(rr), {
|
|
2493
2510
|
size: 14,
|
|
2494
2511
|
"stroke-width": 1.5
|
|
2495
|
-
})], 40,
|
|
2512
|
+
})], 40, ki),
|
|
2496
2513
|
b("button", {
|
|
2497
2514
|
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",
|
|
2498
2515
|
"aria-label": k(s).blockActions.duplicate,
|
|
2499
2516
|
title: k(s).blockActions.duplicate,
|
|
2500
2517
|
onClick: F(le, ["stop"])
|
|
2501
|
-
}, [w(k(
|
|
2518
|
+
}, [w(k(er), {
|
|
2502
2519
|
size: 14,
|
|
2503
2520
|
"stroke-width": 1.5
|
|
2504
|
-
})], 8,
|
|
2521
|
+
})], 8, Ai),
|
|
2505
2522
|
te.value ? (f(), x("button", {
|
|
2506
2523
|
key: 0,
|
|
2507
2524
|
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",
|
|
2508
2525
|
"aria-label": k(s).blockActions.saveAsBlock,
|
|
2509
2526
|
title: k(s).blockActions.saveAsBlock,
|
|
2510
2527
|
onClick: F(ue, ["stop"])
|
|
2511
|
-
}, [w(k(
|
|
2528
|
+
}, [w(k(Zn), {
|
|
2512
2529
|
size: 14,
|
|
2513
2530
|
"stroke-width": 1.5
|
|
2514
|
-
})], 8,
|
|
2531
|
+
})], 8, ji)) : N("", !0),
|
|
2515
2532
|
b("button", {
|
|
2516
2533
|
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",
|
|
2517
2534
|
"aria-label": k(s).blockActions.delete,
|
|
2518
2535
|
title: k(s).blockActions.delete,
|
|
2519
2536
|
onClick: F(ce, ["stop"])
|
|
2520
|
-
}, [w(k(
|
|
2537
|
+
}, [w(k(Kt), {
|
|
2521
2538
|
size: 14,
|
|
2522
2539
|
"stroke-width": 1.5
|
|
2523
|
-
})], 8,
|
|
2524
|
-
], 8,
|
|
2525
|
-
v.value ? (f(), x("div",
|
|
2540
|
+
})], 8, Mi)
|
|
2541
|
+
], 8, Oi)) : N("", !0),
|
|
2542
|
+
v.value ? (f(), x("div", Ni, [b("span", Pi, [w(k(tr), {
|
|
2526
2543
|
size: 12,
|
|
2527
2544
|
"stroke-width": 1.5
|
|
2528
2545
|
}), O(" " + p(k(c)(k(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : N("", !0),
|
|
2529
|
-
E.value && !v.value ? (f(), x("div",
|
|
2546
|
+
E.value && !v.value ? (f(), x("div", Fi, [b("button", {
|
|
2530
2547
|
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-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2531
2548
|
"aria-label": k(s).blockActions.conditionToggle,
|
|
2532
2549
|
title: e.block.displayCondition?.label,
|
|
2533
2550
|
onClick: F(de, ["stop"])
|
|
2534
|
-
}, [w(k(
|
|
2551
|
+
}, [w(k(nr), {
|
|
2535
2552
|
size: 12,
|
|
2536
2553
|
"stroke-width": 2
|
|
2537
|
-
})], 8,
|
|
2538
|
-
ie.value > 0 && !v.value ? (f(), x("div",
|
|
2554
|
+
})], 8, Ii)])) : N("", !0),
|
|
2555
|
+
ie.value > 0 && !v.value ? (f(), x("div", Li, [b("button", {
|
|
2539
2556
|
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-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
2540
2557
|
"aria-label": k(c)(k(s).blockActions.comments, { count: String(ie.value) }),
|
|
2541
2558
|
onClick: r[0] ||= F((t) => k(j).comments?.openForBlock(e.block.id), ["stop"])
|
|
2542
|
-
}, [w(k(
|
|
2559
|
+
}, [w(k(Gt), {
|
|
2543
2560
|
size: 12,
|
|
2544
2561
|
"stroke-width": 2.5
|
|
2545
|
-
}), O(" " + p(ie.value), 1)], 8,
|
|
2562
|
+
}), O(" " + p(ie.value), 1)], 8, Ri)])) : N("", !0),
|
|
2546
2563
|
oe.value ? (f(), x("div", {
|
|
2547
2564
|
key: 4,
|
|
2548
2565
|
class: "tpl-section-wrapper",
|
|
@@ -2555,31 +2572,31 @@ var bi = [
|
|
|
2555
2572
|
class: "tpl-block-content",
|
|
2556
2573
|
style: i(ae.value)
|
|
2557
2574
|
}, [T(t.$slots, "default", {}, void 0, !0)], 4))
|
|
2558
|
-
], 10,
|
|
2575
|
+
], 10, Di));
|
|
2559
2576
|
}
|
|
2560
2577
|
}), [["__scopeId", "data-v-43c10a08"]]);
|
|
2561
2578
|
//#endregion
|
|
2562
2579
|
//#region src/utils/unwrapParagraph.ts
|
|
2563
|
-
function
|
|
2580
|
+
function Bi(e) {
|
|
2564
2581
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2565
2582
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2566
2583
|
}
|
|
2567
2584
|
//#endregion
|
|
2568
2585
|
//#region src/components/blocks/TitleBlock.vue
|
|
2569
|
-
var
|
|
2586
|
+
var Vi = /* @__PURE__ */ y({
|
|
2570
2587
|
__name: "TitleBlock",
|
|
2571
2588
|
props: {
|
|
2572
2589
|
block: {},
|
|
2573
2590
|
viewport: {}
|
|
2574
2591
|
},
|
|
2575
2592
|
setup(e) {
|
|
2576
|
-
let t = e, n = C(() => import("./TitleEditor-
|
|
2593
|
+
let t = e, n = C(() => import("./TitleEditor-BB4YlIBF.js")), { isEditing: r, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = bi(() => t.block.content), u = M(() => {
|
|
2577
2594
|
let e = {
|
|
2578
|
-
fontSize: `${
|
|
2595
|
+
fontSize: `${ze[t.block.level]}px`,
|
|
2579
2596
|
textAlign: t.block.textAlign
|
|
2580
2597
|
};
|
|
2581
2598
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2582
|
-
}), p = M(() => `h${t.block.level}`), m = M(() =>
|
|
2599
|
+
}), p = M(() => `h${t.block.level}`), m = M(() => Bi(s.value));
|
|
2583
2600
|
return (t, s) => (f(), x("div", {
|
|
2584
2601
|
ref_key: "blockRef",
|
|
2585
2602
|
ref: a,
|
|
@@ -2605,88 +2622,88 @@ var Pi = /* @__PURE__ */ y({
|
|
|
2605
2622
|
});
|
|
2606
2623
|
//#endregion
|
|
2607
2624
|
//#region src/utils/sectionColumnDrop.ts
|
|
2608
|
-
function
|
|
2625
|
+
function Hi(e) {
|
|
2609
2626
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2610
2627
|
}
|
|
2611
2628
|
//#endregion
|
|
2612
2629
|
//#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
|
|
2613
|
-
var
|
|
2630
|
+
var Ui = Object.defineProperty, Wi = Object.getOwnPropertySymbols, Gi = Object.prototype.hasOwnProperty, Ki = Object.prototype.propertyIsEnumerable, qi = (e, t, n) => t in e ? Ui(e, t, {
|
|
2614
2631
|
enumerable: !0,
|
|
2615
2632
|
configurable: !0,
|
|
2616
2633
|
writable: !0,
|
|
2617
2634
|
value: n
|
|
2618
|
-
}) : e[t] = n,
|
|
2619
|
-
for (var n in t ||= {})
|
|
2620
|
-
if (
|
|
2635
|
+
}) : e[t] = n, Ji = (e, t) => {
|
|
2636
|
+
for (var n in t ||= {}) Gi.call(t, n) && qi(e, n, t[n]);
|
|
2637
|
+
if (Wi) for (var n of Wi(t)) Ki.call(t, n) && qi(e, n, t[n]);
|
|
2621
2638
|
return e;
|
|
2622
|
-
},
|
|
2639
|
+
}, Yi = (e, t) => {
|
|
2623
2640
|
var n = {};
|
|
2624
|
-
for (var r in e)
|
|
2625
|
-
if (e != null &&
|
|
2641
|
+
for (var r in e) Gi.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2642
|
+
if (e != null && Wi) for (var r of Wi(e)) t.indexOf(r) < 0 && Ki.call(e, r) && (n[r] = e[r]);
|
|
2626
2643
|
return n;
|
|
2627
|
-
},
|
|
2628
|
-
function
|
|
2629
|
-
console.warn(
|
|
2644
|
+
}, Xi = "[vue-draggable-plus]: ";
|
|
2645
|
+
function Zi(e) {
|
|
2646
|
+
console.warn(Xi + e);
|
|
2630
2647
|
}
|
|
2631
|
-
function
|
|
2632
|
-
console.error(
|
|
2648
|
+
function Qi(e) {
|
|
2649
|
+
console.error(Xi + e);
|
|
2633
2650
|
}
|
|
2634
|
-
function
|
|
2651
|
+
function $i(e, t, n) {
|
|
2635
2652
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2636
2653
|
}
|
|
2637
|
-
function
|
|
2654
|
+
function ea(e) {
|
|
2638
2655
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2639
2656
|
}
|
|
2640
|
-
function
|
|
2641
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2657
|
+
function ta(e) {
|
|
2658
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[ea(n)] = e[n]), t), {});
|
|
2642
2659
|
}
|
|
2643
|
-
function
|
|
2660
|
+
function na(e, t) {
|
|
2644
2661
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2645
2662
|
}
|
|
2646
|
-
function
|
|
2663
|
+
function ra(e, t, n) {
|
|
2647
2664
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2648
2665
|
}
|
|
2649
|
-
function
|
|
2666
|
+
function ia(e) {
|
|
2650
2667
|
return e === void 0;
|
|
2651
2668
|
}
|
|
2652
|
-
function
|
|
2669
|
+
function aa(e) {
|
|
2653
2670
|
return typeof e == "string";
|
|
2654
2671
|
}
|
|
2655
|
-
function
|
|
2672
|
+
function oa(e, t, n) {
|
|
2656
2673
|
let r = e.children[n];
|
|
2657
2674
|
e.insertBefore(t, r);
|
|
2658
2675
|
}
|
|
2659
|
-
function
|
|
2676
|
+
function sa(e) {
|
|
2660
2677
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2661
2678
|
}
|
|
2662
|
-
function
|
|
2679
|
+
function ca(e, t = document) {
|
|
2663
2680
|
let n = null;
|
|
2664
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2681
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Zi(`Element not found: ${e}`), n;
|
|
2665
2682
|
}
|
|
2666
|
-
function
|
|
2683
|
+
function la(e, t, n = null) {
|
|
2667
2684
|
return function(...r) {
|
|
2668
2685
|
return e.apply(n, r), t.apply(n, r);
|
|
2669
2686
|
};
|
|
2670
2687
|
}
|
|
2671
|
-
function
|
|
2672
|
-
let n =
|
|
2688
|
+
function ua(e, t) {
|
|
2689
|
+
let n = Ji({}, e);
|
|
2673
2690
|
return Object.keys(t).forEach((r) => {
|
|
2674
|
-
n[r] ? n[r] =
|
|
2691
|
+
n[r] ? n[r] = la(e[r], t[r]) : n[r] = t[r];
|
|
2675
2692
|
}), n;
|
|
2676
2693
|
}
|
|
2677
|
-
function
|
|
2694
|
+
function da(e) {
|
|
2678
2695
|
return e instanceof HTMLElement;
|
|
2679
2696
|
}
|
|
2680
|
-
function
|
|
2697
|
+
function fa(e, t) {
|
|
2681
2698
|
Object.keys(e).forEach((n) => {
|
|
2682
2699
|
t(n, e[n]);
|
|
2683
2700
|
});
|
|
2684
2701
|
}
|
|
2685
|
-
function
|
|
2702
|
+
function pa(e) {
|
|
2686
2703
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2687
2704
|
}
|
|
2688
|
-
var
|
|
2689
|
-
function
|
|
2705
|
+
var ma = Object.assign;
|
|
2706
|
+
function ha(e, t) {
|
|
2690
2707
|
var n = Object.keys(e);
|
|
2691
2708
|
if (Object.getOwnPropertySymbols) {
|
|
2692
2709
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2696,26 +2713,26 @@ function ca(e, t) {
|
|
|
2696
2713
|
}
|
|
2697
2714
|
return n;
|
|
2698
2715
|
}
|
|
2699
|
-
function
|
|
2716
|
+
function ga(e) {
|
|
2700
2717
|
for (var t = 1; t < arguments.length; t++) {
|
|
2701
2718
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2702
|
-
t % 2 ?
|
|
2703
|
-
|
|
2704
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2719
|
+
t % 2 ? ha(Object(n), !0).forEach(function(t) {
|
|
2720
|
+
va(e, t, n[t]);
|
|
2721
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ha(Object(n)).forEach(function(t) {
|
|
2705
2722
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2706
2723
|
});
|
|
2707
2724
|
}
|
|
2708
2725
|
return e;
|
|
2709
2726
|
}
|
|
2710
|
-
function
|
|
2727
|
+
function _a(e) {
|
|
2711
2728
|
"@babel/helpers - typeof";
|
|
2712
|
-
return
|
|
2729
|
+
return _a = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2713
2730
|
return typeof e;
|
|
2714
2731
|
} : function(e) {
|
|
2715
2732
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2716
|
-
},
|
|
2733
|
+
}, _a(e);
|
|
2717
2734
|
}
|
|
2718
|
-
function
|
|
2735
|
+
function va(e, t, n) {
|
|
2719
2736
|
return t in e ? Object.defineProperty(e, t, {
|
|
2720
2737
|
value: n,
|
|
2721
2738
|
enumerable: !0,
|
|
@@ -2723,45 +2740,45 @@ function da(e, t, n) {
|
|
|
2723
2740
|
writable: !0
|
|
2724
2741
|
}) : e[t] = n, e;
|
|
2725
2742
|
}
|
|
2726
|
-
function
|
|
2727
|
-
return
|
|
2743
|
+
function ya() {
|
|
2744
|
+
return ya = Object.assign || function(e) {
|
|
2728
2745
|
for (var t = 1; t < arguments.length; t++) {
|
|
2729
2746
|
var n = arguments[t];
|
|
2730
2747
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2731
2748
|
}
|
|
2732
2749
|
return e;
|
|
2733
|
-
},
|
|
2750
|
+
}, ya.apply(this, arguments);
|
|
2734
2751
|
}
|
|
2735
|
-
function
|
|
2752
|
+
function ba(e, t) {
|
|
2736
2753
|
if (e == null) return {};
|
|
2737
2754
|
var n = {}, r = Object.keys(e), i, a;
|
|
2738
2755
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2739
2756
|
return n;
|
|
2740
2757
|
}
|
|
2741
|
-
function
|
|
2758
|
+
function xa(e, t) {
|
|
2742
2759
|
if (e == null) return {};
|
|
2743
|
-
var n =
|
|
2760
|
+
var n = ba(e, t), r, i;
|
|
2744
2761
|
if (Object.getOwnPropertySymbols) {
|
|
2745
2762
|
var a = Object.getOwnPropertySymbols(e);
|
|
2746
2763
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2747
2764
|
}
|
|
2748
2765
|
return n;
|
|
2749
2766
|
}
|
|
2750
|
-
var
|
|
2751
|
-
function
|
|
2767
|
+
var Sa = "1.15.2";
|
|
2768
|
+
function Ca(e) {
|
|
2752
2769
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2753
2770
|
}
|
|
2754
|
-
var
|
|
2771
|
+
var wa = Ca(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Ta = Ca(/Edge/i), Ea = Ca(/firefox/i), Da = Ca(/safari/i) && !Ca(/chrome/i) && !Ca(/android/i), Oa = Ca(/iP(ad|od|hone)/i), ka = Ca(/chrome/i) && Ca(/android/i), Aa = {
|
|
2755
2772
|
capture: !1,
|
|
2756
2773
|
passive: !1
|
|
2757
2774
|
};
|
|
2758
|
-
function
|
|
2759
|
-
e.addEventListener(t, n, !
|
|
2775
|
+
function I(e, t, n) {
|
|
2776
|
+
e.addEventListener(t, n, !wa && Aa);
|
|
2760
2777
|
}
|
|
2761
|
-
function
|
|
2762
|
-
e.removeEventListener(t, n, !
|
|
2778
|
+
function L(e, t, n) {
|
|
2779
|
+
e.removeEventListener(t, n, !wa && Aa);
|
|
2763
2780
|
}
|
|
2764
|
-
function
|
|
2781
|
+
function ja(e, t) {
|
|
2765
2782
|
if (t) {
|
|
2766
2783
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2767
2784
|
if (e.matches) return e.matches(t);
|
|
@@ -2773,41 +2790,41 @@ function wa(e, t) {
|
|
|
2773
2790
|
return !1;
|
|
2774
2791
|
}
|
|
2775
2792
|
}
|
|
2776
|
-
function
|
|
2793
|
+
function Ma(e) {
|
|
2777
2794
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2778
2795
|
}
|
|
2779
|
-
function
|
|
2796
|
+
function Na(e, t, n, r) {
|
|
2780
2797
|
if (e) {
|
|
2781
2798
|
n ||= document;
|
|
2782
2799
|
do {
|
|
2783
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2800
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && ja(e, t) : ja(e, t)) || r && e === n) return e;
|
|
2784
2801
|
if (e === n) break;
|
|
2785
|
-
} while (e =
|
|
2802
|
+
} while (e = Ma(e));
|
|
2786
2803
|
}
|
|
2787
2804
|
return null;
|
|
2788
2805
|
}
|
|
2789
|
-
var
|
|
2790
|
-
function
|
|
2791
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2806
|
+
var Pa = /\s+/g;
|
|
2807
|
+
function R(e, t, n) {
|
|
2808
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Pa, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Pa, " "));
|
|
2792
2809
|
}
|
|
2793
|
-
function
|
|
2810
|
+
function z(e, t, n) {
|
|
2794
2811
|
var r = e && e.style;
|
|
2795
2812
|
if (r) {
|
|
2796
2813
|
if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
|
|
2797
2814
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2798
2815
|
}
|
|
2799
2816
|
}
|
|
2800
|
-
function
|
|
2817
|
+
function Fa(e, t) {
|
|
2801
2818
|
var n = "";
|
|
2802
2819
|
if (typeof e == "string") n = e;
|
|
2803
2820
|
else do {
|
|
2804
|
-
var r =
|
|
2821
|
+
var r = z(e, "transform");
|
|
2805
2822
|
r && r !== "none" && (n = r + " " + n);
|
|
2806
2823
|
} while (!t && (e = e.parentNode));
|
|
2807
2824
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2808
2825
|
return i && new i(n);
|
|
2809
2826
|
}
|
|
2810
|
-
function
|
|
2827
|
+
function Ia(e, t, n) {
|
|
2811
2828
|
if (e) {
|
|
2812
2829
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2813
2830
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2815,21 +2832,21 @@ function ka(e, t, n) {
|
|
|
2815
2832
|
}
|
|
2816
2833
|
return [];
|
|
2817
2834
|
}
|
|
2818
|
-
function
|
|
2835
|
+
function La() {
|
|
2819
2836
|
return document.scrollingElement || document.documentElement;
|
|
2820
2837
|
}
|
|
2821
|
-
function
|
|
2838
|
+
function B(e, t, n, r, i) {
|
|
2822
2839
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2823
2840
|
var a, o, s, c, l, u, d;
|
|
2824
|
-
if (e !== window && e.parentNode && e !==
|
|
2825
|
-
if (i && i.getBoundingClientRect && (
|
|
2841
|
+
if (e !== window && e.parentNode && e !== La() ? (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, !wa)) do
|
|
2842
|
+
if (i && i.getBoundingClientRect && (z(i, "transform") !== "none" || n && z(i, "position") !== "static")) {
|
|
2826
2843
|
var f = i.getBoundingClientRect();
|
|
2827
|
-
o -= f.top + parseInt(
|
|
2844
|
+
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;
|
|
2828
2845
|
break;
|
|
2829
2846
|
}
|
|
2830
2847
|
while (i = i.parentNode);
|
|
2831
2848
|
if (r && e !== window) {
|
|
2832
|
-
var p =
|
|
2849
|
+
var p = Fa(i || e), m = p && p.a, h = p && p.d;
|
|
2833
2850
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2834
2851
|
}
|
|
2835
2852
|
return {
|
|
@@ -2842,18 +2859,18 @@ function V(e, t, n, r, i) {
|
|
|
2842
2859
|
};
|
|
2843
2860
|
}
|
|
2844
2861
|
}
|
|
2845
|
-
function
|
|
2846
|
-
for (var r =
|
|
2847
|
-
var a =
|
|
2862
|
+
function Ra(e, t, n) {
|
|
2863
|
+
for (var r = Wa(e, !0), i = B(e)[t]; r;) {
|
|
2864
|
+
var a = B(r)[n], o = void 0;
|
|
2848
2865
|
if (o = i >= a, !o) return r;
|
|
2849
|
-
if (r ===
|
|
2850
|
-
r =
|
|
2866
|
+
if (r === La()) break;
|
|
2867
|
+
r = Wa(r, !1);
|
|
2851
2868
|
}
|
|
2852
2869
|
return !1;
|
|
2853
2870
|
}
|
|
2854
|
-
function
|
|
2871
|
+
function za(e, t, n, r) {
|
|
2855
2872
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2856
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2873
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Na(o[a], n.draggable, e, !1)) {
|
|
2857
2874
|
if (i === t) return o[a];
|
|
2858
2875
|
i++;
|
|
2859
2876
|
}
|
|
@@ -2861,96 +2878,96 @@ function Ma(e, t, n, r) {
|
|
|
2861
2878
|
}
|
|
2862
2879
|
return null;
|
|
2863
2880
|
}
|
|
2864
|
-
function
|
|
2865
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost ||
|
|
2881
|
+
function Ba(e, t) {
|
|
2882
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || z(n, "display") === "none" || t && !ja(n, t));) n = n.previousElementSibling;
|
|
2866
2883
|
return n || null;
|
|
2867
2884
|
}
|
|
2868
|
-
function
|
|
2885
|
+
function Va(e, t) {
|
|
2869
2886
|
var n = 0;
|
|
2870
2887
|
if (!e || !e.parentNode) return -1;
|
|
2871
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2888
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || ja(e, t)) && n++;
|
|
2872
2889
|
return n;
|
|
2873
2890
|
}
|
|
2874
|
-
function
|
|
2875
|
-
var t = 0, n = 0, r =
|
|
2891
|
+
function Ha(e) {
|
|
2892
|
+
var t = 0, n = 0, r = La();
|
|
2876
2893
|
if (e) do {
|
|
2877
|
-
var i =
|
|
2894
|
+
var i = Fa(e), a = i.a, o = i.d;
|
|
2878
2895
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2879
2896
|
} while (e !== r && (e = e.parentNode));
|
|
2880
2897
|
return [t, n];
|
|
2881
2898
|
}
|
|
2882
|
-
function
|
|
2899
|
+
function Ua(e, t) {
|
|
2883
2900
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2884
2901
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2885
2902
|
}
|
|
2886
2903
|
return -1;
|
|
2887
2904
|
}
|
|
2888
|
-
function
|
|
2889
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2905
|
+
function Wa(e, t) {
|
|
2906
|
+
if (!e || !e.getBoundingClientRect) return La();
|
|
2890
2907
|
var n = e, r = !1;
|
|
2891
2908
|
do
|
|
2892
2909
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2893
|
-
var i =
|
|
2910
|
+
var i = z(n);
|
|
2894
2911
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2895
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2912
|
+
if (!n.getBoundingClientRect || n === document.body) return La();
|
|
2896
2913
|
if (r || t) return n;
|
|
2897
2914
|
r = !0;
|
|
2898
2915
|
}
|
|
2899
2916
|
}
|
|
2900
2917
|
while (n = n.parentNode);
|
|
2901
|
-
return
|
|
2918
|
+
return La();
|
|
2902
2919
|
}
|
|
2903
|
-
function
|
|
2920
|
+
function Ga(e, t) {
|
|
2904
2921
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2905
2922
|
return e;
|
|
2906
2923
|
}
|
|
2907
|
-
function
|
|
2924
|
+
function Ka(e, t) {
|
|
2908
2925
|
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);
|
|
2909
2926
|
}
|
|
2910
|
-
var
|
|
2911
|
-
function
|
|
2927
|
+
var qa;
|
|
2928
|
+
function Ja(e, t) {
|
|
2912
2929
|
return function() {
|
|
2913
|
-
if (!
|
|
2930
|
+
if (!qa) {
|
|
2914
2931
|
var n = arguments, r = this;
|
|
2915
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2916
|
-
|
|
2932
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), qa = setTimeout(function() {
|
|
2933
|
+
qa = void 0;
|
|
2917
2934
|
}, t);
|
|
2918
2935
|
}
|
|
2919
2936
|
};
|
|
2920
2937
|
}
|
|
2921
|
-
function
|
|
2922
|
-
clearTimeout(
|
|
2938
|
+
function Ya() {
|
|
2939
|
+
clearTimeout(qa), qa = void 0;
|
|
2923
2940
|
}
|
|
2924
|
-
function
|
|
2941
|
+
function Xa(e, t, n) {
|
|
2925
2942
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2926
2943
|
}
|
|
2927
|
-
function
|
|
2944
|
+
function Za(e) {
|
|
2928
2945
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2929
2946
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2930
2947
|
}
|
|
2931
|
-
function
|
|
2948
|
+
function Qa(e, t, n) {
|
|
2932
2949
|
var r = {};
|
|
2933
2950
|
return Array.from(e.children).forEach(function(i) {
|
|
2934
|
-
if (!(!
|
|
2935
|
-
var a =
|
|
2951
|
+
if (!(!Na(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
2952
|
+
var a = B(i);
|
|
2936
2953
|
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);
|
|
2937
2954
|
}
|
|
2938
2955
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2939
2956
|
}
|
|
2940
|
-
var
|
|
2941
|
-
function
|
|
2957
|
+
var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2958
|
+
function $a() {
|
|
2942
2959
|
var e = [], t;
|
|
2943
2960
|
return {
|
|
2944
2961
|
captureAnimationState: function() {
|
|
2945
2962
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
2946
|
-
if (!(
|
|
2963
|
+
if (!(z(t, "display") === "none" || t === Q.ghost)) {
|
|
2947
2964
|
e.push({
|
|
2948
2965
|
target: t,
|
|
2949
|
-
rect:
|
|
2966
|
+
rect: B(t)
|
|
2950
2967
|
});
|
|
2951
|
-
var n =
|
|
2968
|
+
var n = ga({}, e[e.length - 1].rect);
|
|
2952
2969
|
if (t.thisAnimationDuration) {
|
|
2953
|
-
var r =
|
|
2970
|
+
var r = Fa(t, !0);
|
|
2954
2971
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2955
2972
|
}
|
|
2956
2973
|
t.fromRect = n;
|
|
@@ -2961,7 +2978,7 @@ function Ka() {
|
|
|
2961
2978
|
e.push(t);
|
|
2962
2979
|
},
|
|
2963
2980
|
removeAnimationState: function(t) {
|
|
2964
|
-
e.splice(
|
|
2981
|
+
e.splice(Ua(e, { target: t }), 1);
|
|
2965
2982
|
},
|
|
2966
2983
|
animateAll: function(n) {
|
|
2967
2984
|
var r = this;
|
|
@@ -2971,8 +2988,8 @@ function Ka() {
|
|
|
2971
2988
|
}
|
|
2972
2989
|
var i = !1, a = 0;
|
|
2973
2990
|
e.forEach(function(e) {
|
|
2974
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
2975
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2991
|
+
var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Fa(n, !0);
|
|
2992
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Ka(c, s) && !Ka(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = to(u, c, l, r.options)), Ka(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() {
|
|
2976
2993
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2977
2994
|
}, t), n.thisAnimationDuration = t);
|
|
2978
2995
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2981,27 +2998,27 @@ function Ka() {
|
|
|
2981
2998
|
},
|
|
2982
2999
|
animate: function(e, t, n, r) {
|
|
2983
3000
|
if (r) {
|
|
2984
|
-
|
|
2985
|
-
var i =
|
|
2986
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
2987
|
-
|
|
3001
|
+
z(e, "transition", ""), z(e, "transform", "");
|
|
3002
|
+
var i = Fa(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
3003
|
+
e.animatingX = !!s, e.animatingY = !!c, z(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = eo(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() {
|
|
3004
|
+
z(e, "transition", ""), z(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2988
3005
|
}, r);
|
|
2989
3006
|
}
|
|
2990
3007
|
}
|
|
2991
3008
|
};
|
|
2992
3009
|
}
|
|
2993
|
-
function
|
|
3010
|
+
function eo(e) {
|
|
2994
3011
|
return e.offsetWidth;
|
|
2995
3012
|
}
|
|
2996
|
-
function
|
|
3013
|
+
function to(e, t, n, r) {
|
|
2997
3014
|
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;
|
|
2998
3015
|
}
|
|
2999
|
-
var
|
|
3016
|
+
var no = [], ro = { initializeByDefault: !0 }, io = {
|
|
3000
3017
|
mount: function(e) {
|
|
3001
|
-
for (var t in
|
|
3002
|
-
|
|
3018
|
+
for (var t in ro) ro.hasOwnProperty(t) && !(t in e) && (e[t] = ro[t]);
|
|
3019
|
+
no.forEach(function(t) {
|
|
3003
3020
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
3004
|
-
}),
|
|
3021
|
+
}), no.push(e);
|
|
3005
3022
|
},
|
|
3006
3023
|
pluginEvent: function(e, t, n) {
|
|
3007
3024
|
var r = this;
|
|
@@ -3009,16 +3026,16 @@ var Ya = [], Xa = { initializeByDefault: !0 }, Za = {
|
|
|
3009
3026
|
r.eventCanceled = !0;
|
|
3010
3027
|
};
|
|
3011
3028
|
var i = e + "Global";
|
|
3012
|
-
|
|
3013
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
3029
|
+
no.forEach(function(r) {
|
|
3030
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](ga({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](ga({ sortable: t }, n)));
|
|
3014
3031
|
});
|
|
3015
3032
|
},
|
|
3016
3033
|
initializePlugins: function(e, t, n, r) {
|
|
3017
|
-
for (var i in
|
|
3034
|
+
for (var i in no.forEach(function(r) {
|
|
3018
3035
|
var i = r.pluginName;
|
|
3019
3036
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
3020
3037
|
var a = new r(e, t, e.options);
|
|
3021
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
3038
|
+
a.sortable = e, a.options = e.options, e[i] = a, ya(n, a.defaults);
|
|
3022
3039
|
}
|
|
3023
3040
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
3024
3041
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -3027,59 +3044,59 @@ var Ya = [], Xa = { initializeByDefault: !0 }, Za = {
|
|
|
3027
3044
|
},
|
|
3028
3045
|
getEventProperties: function(e, t) {
|
|
3029
3046
|
var n = {};
|
|
3030
|
-
return
|
|
3031
|
-
typeof r.eventProperties == "function" &&
|
|
3047
|
+
return no.forEach(function(r) {
|
|
3048
|
+
typeof r.eventProperties == "function" && ya(n, r.eventProperties.call(t[r.pluginName], e));
|
|
3032
3049
|
}), n;
|
|
3033
3050
|
},
|
|
3034
3051
|
modifyOption: function(e, t, n) {
|
|
3035
3052
|
var r;
|
|
3036
|
-
return
|
|
3053
|
+
return no.forEach(function(i) {
|
|
3037
3054
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
3038
3055
|
}), r;
|
|
3039
3056
|
}
|
|
3040
3057
|
};
|
|
3041
|
-
function
|
|
3058
|
+
function ao(e) {
|
|
3042
3059
|
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;
|
|
3043
|
-
if (t ||= n && n[
|
|
3060
|
+
if (t ||= n && n[V], t) {
|
|
3044
3061
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
3045
|
-
window.CustomEvent && !
|
|
3062
|
+
window.CustomEvent && !wa && !Ta ? h = new CustomEvent(r, {
|
|
3046
3063
|
bubbles: !0,
|
|
3047
3064
|
cancelable: !0
|
|
3048
3065
|
}) : (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;
|
|
3049
|
-
var v =
|
|
3066
|
+
var v = ga(ga({}, m), io.getEventProperties(r, t));
|
|
3050
3067
|
for (var y in v) h[y] = v[y];
|
|
3051
3068
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
3052
3069
|
}
|
|
3053
3070
|
}
|
|
3054
|
-
var
|
|
3055
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
3056
|
-
|
|
3057
|
-
dragEl:
|
|
3058
|
-
parentEl:
|
|
3059
|
-
ghostEl:
|
|
3060
|
-
rootEl:
|
|
3061
|
-
nextEl:
|
|
3062
|
-
lastDownEl:
|
|
3063
|
-
cloneEl:
|
|
3064
|
-
cloneHidden:
|
|
3065
|
-
dragStarted:
|
|
3071
|
+
var oo = ["evt"], H = function(e, t) {
|
|
3072
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = xa(n, oo);
|
|
3073
|
+
io.pluginEvent.bind(Q)(e, t, ga({
|
|
3074
|
+
dragEl: W,
|
|
3075
|
+
parentEl: G,
|
|
3076
|
+
ghostEl: K,
|
|
3077
|
+
rootEl: q,
|
|
3078
|
+
nextEl: so,
|
|
3079
|
+
lastDownEl: co,
|
|
3080
|
+
cloneEl: J,
|
|
3081
|
+
cloneHidden: lo,
|
|
3082
|
+
dragStarted: wo,
|
|
3066
3083
|
putSortable: X,
|
|
3067
3084
|
activeSortable: Q.active,
|
|
3068
3085
|
originalEvent: r,
|
|
3069
|
-
oldIndex:
|
|
3070
|
-
oldDraggableIndex:
|
|
3071
|
-
newIndex:
|
|
3072
|
-
newDraggableIndex:
|
|
3073
|
-
hideGhostForTarget:
|
|
3074
|
-
unhideGhostForTarget:
|
|
3086
|
+
oldIndex: uo,
|
|
3087
|
+
oldDraggableIndex: fo,
|
|
3088
|
+
newIndex: Y,
|
|
3089
|
+
newDraggableIndex: po,
|
|
3090
|
+
hideGhostForTarget: Ho,
|
|
3091
|
+
unhideGhostForTarget: Uo,
|
|
3075
3092
|
cloneNowHidden: function() {
|
|
3076
|
-
|
|
3093
|
+
lo = !0;
|
|
3077
3094
|
},
|
|
3078
3095
|
cloneNowShown: function() {
|
|
3079
|
-
|
|
3096
|
+
lo = !1;
|
|
3080
3097
|
},
|
|
3081
3098
|
dispatchSortableEvent: function(e) {
|
|
3082
|
-
|
|
3099
|
+
U({
|
|
3083
3100
|
sortable: t,
|
|
3084
3101
|
name: e,
|
|
3085
3102
|
originalEvent: r
|
|
@@ -3087,46 +3104,46 @@ var $a = ["evt"], U = function(e, t) {
|
|
|
3087
3104
|
}
|
|
3088
3105
|
}, i));
|
|
3089
3106
|
};
|
|
3090
|
-
function
|
|
3091
|
-
|
|
3107
|
+
function U(e) {
|
|
3108
|
+
ao(ga({
|
|
3092
3109
|
putSortable: X,
|
|
3093
|
-
cloneEl:
|
|
3094
|
-
targetEl:
|
|
3095
|
-
rootEl:
|
|
3096
|
-
oldIndex:
|
|
3097
|
-
oldDraggableIndex:
|
|
3098
|
-
newIndex:
|
|
3099
|
-
newDraggableIndex:
|
|
3110
|
+
cloneEl: J,
|
|
3111
|
+
targetEl: W,
|
|
3112
|
+
rootEl: q,
|
|
3113
|
+
oldIndex: uo,
|
|
3114
|
+
oldDraggableIndex: fo,
|
|
3115
|
+
newIndex: Y,
|
|
3116
|
+
newDraggableIndex: po
|
|
3100
3117
|
}, e));
|
|
3101
3118
|
}
|
|
3102
|
-
var G, K, q,
|
|
3103
|
-
if (
|
|
3104
|
-
if (
|
|
3119
|
+
var W, G, K, q, so, co, J, lo, uo, Y, fo, po, mo, X, ho = !1, go = !1, _o = [], vo, yo, bo, xo, So, Co, wo, To, Eo, Do = !1, Oo = !1, ko, Z, Ao = [], jo = !1, Mo = [], No = typeof document < "u", Po = Oa, Fo = Ta || wa ? "cssFloat" : "float", Io = No && !ka && !Oa && "draggable" in document.createElement("div"), Lo = function() {
|
|
3120
|
+
if (No) {
|
|
3121
|
+
if (wa) return !1;
|
|
3105
3122
|
var e = document.createElement("x");
|
|
3106
3123
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
3107
3124
|
}
|
|
3108
|
-
}(),
|
|
3109
|
-
var n =
|
|
3125
|
+
}(), Ro = function(e, t) {
|
|
3126
|
+
var n = z(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = za(e, 0, t), a = za(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;
|
|
3110
3127
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
3111
3128
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
3112
3129
|
if (i && o.float && o.float !== "none") {
|
|
3113
3130
|
var u = o.float === "left" ? "left" : "right";
|
|
3114
3131
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
3115
3132
|
}
|
|
3116
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
3117
|
-
},
|
|
3133
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Fo] === "none" || a && n[Fo] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
3134
|
+
}, zo = function(e, t, n) {
|
|
3118
3135
|
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;
|
|
3119
3136
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
3120
|
-
},
|
|
3137
|
+
}, Bo = function(e, t) {
|
|
3121
3138
|
var n;
|
|
3122
|
-
return
|
|
3123
|
-
var i = r[
|
|
3124
|
-
if (!(!i ||
|
|
3125
|
-
var a =
|
|
3139
|
+
return _o.some(function(r) {
|
|
3140
|
+
var i = r[V].options.emptyInsertThreshold;
|
|
3141
|
+
if (!(!i || Ba(r))) {
|
|
3142
|
+
var a = B(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
3126
3143
|
if (o && s) return n = r;
|
|
3127
3144
|
}
|
|
3128
3145
|
}), n;
|
|
3129
|
-
},
|
|
3146
|
+
}, Vo = function(e) {
|
|
3130
3147
|
function t(e, n) {
|
|
3131
3148
|
return function(r, i, a, o) {
|
|
3132
3149
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -3139,31 +3156,31 @@ var G, K, q, J, eo, to, Y, no, ro, io, ao, oo, so, X, co = !1, lo = !1, uo = [],
|
|
|
3139
3156
|
};
|
|
3140
3157
|
}
|
|
3141
3158
|
var n = {}, r = e.group;
|
|
3142
|
-
(!r ||
|
|
3143
|
-
},
|
|
3144
|
-
!
|
|
3145
|
-
},
|
|
3146
|
-
!
|
|
3159
|
+
(!r || _a(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;
|
|
3160
|
+
}, Ho = function() {
|
|
3161
|
+
!Lo && K && z(K, "display", "none");
|
|
3162
|
+
}, Uo = function() {
|
|
3163
|
+
!Lo && K && z(K, "display", "");
|
|
3147
3164
|
};
|
|
3148
|
-
|
|
3149
|
-
if (
|
|
3165
|
+
No && !ka && document.addEventListener("click", function(e) {
|
|
3166
|
+
if (go) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), go = !1, !1;
|
|
3150
3167
|
}, !0);
|
|
3151
|
-
var
|
|
3152
|
-
if (
|
|
3168
|
+
var Wo = function(e) {
|
|
3169
|
+
if (W) {
|
|
3153
3170
|
e = e.touches ? e.touches[0] : e;
|
|
3154
|
-
var t =
|
|
3171
|
+
var t = Bo(e.clientX, e.clientY);
|
|
3155
3172
|
if (t) {
|
|
3156
3173
|
var n = {};
|
|
3157
3174
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
3158
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
3175
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
|
|
3159
3176
|
}
|
|
3160
3177
|
}
|
|
3161
|
-
},
|
|
3162
|
-
|
|
3178
|
+
}, Go = function(e) {
|
|
3179
|
+
W && W.parentNode[V]._isOutsideThisEl(e.target);
|
|
3163
3180
|
};
|
|
3164
3181
|
function Q(e, t) {
|
|
3165
3182
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
3166
|
-
this.el = e, this.options = t =
|
|
3183
|
+
this.el = e, this.options = t = ya({}, t), e[V] = this;
|
|
3167
3184
|
var n = {
|
|
3168
3185
|
group: null,
|
|
3169
3186
|
sort: !0,
|
|
@@ -3176,7 +3193,7 @@ function Q(e, t) {
|
|
|
3176
3193
|
invertedSwapThreshold: null,
|
|
3177
3194
|
removeCloneOnHide: !0,
|
|
3178
3195
|
direction: function() {
|
|
3179
|
-
return
|
|
3196
|
+
return Ro(e, this.options);
|
|
3180
3197
|
},
|
|
3181
3198
|
ghostClass: "sortable-ghost",
|
|
3182
3199
|
chosenClass: "sortable-chosen",
|
|
@@ -3203,80 +3220,80 @@ function Q(e, t) {
|
|
|
3203
3220
|
x: 0,
|
|
3204
3221
|
y: 0
|
|
3205
3222
|
},
|
|
3206
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
3223
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Da,
|
|
3207
3224
|
emptyInsertThreshold: 5
|
|
3208
3225
|
};
|
|
3209
|
-
for (var r in
|
|
3210
|
-
for (var i in
|
|
3211
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
3226
|
+
for (var r in io.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
3227
|
+
for (var i in Vo(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
3228
|
+
this.nativeDraggable = !t.forceFallback && Io, 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)), _o.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), ya(this, $a());
|
|
3212
3229
|
}
|
|
3213
3230
|
Q.prototype = {
|
|
3214
3231
|
constructor: Q,
|
|
3215
3232
|
_isOutsideThisEl: function(e) {
|
|
3216
|
-
!this.el.contains(e) && e !== this.el && (
|
|
3233
|
+
!this.el.contains(e) && e !== this.el && (To = null);
|
|
3217
3234
|
},
|
|
3218
3235
|
_getDirection: function(e, t) {
|
|
3219
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t,
|
|
3236
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
|
|
3220
3237
|
},
|
|
3221
3238
|
_onTapStart: function(e) {
|
|
3222
3239
|
if (e.cancelable) {
|
|
3223
3240
|
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;
|
|
3224
|
-
if (
|
|
3225
|
-
if (
|
|
3241
|
+
if (ts(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Da && s && s.tagName.toUpperCase() === "SELECT") && (s = Na(s, r.draggable, n, !1), !(s && s.animated) && co !== s)) {
|
|
3242
|
+
if (uo = Va(s), fo = Va(s, r.draggable), typeof l == "function") {
|
|
3226
3243
|
if (l.call(this, e, s, this)) {
|
|
3227
|
-
|
|
3244
|
+
U({
|
|
3228
3245
|
sortable: t,
|
|
3229
3246
|
rootEl: c,
|
|
3230
3247
|
name: "filter",
|
|
3231
3248
|
targetEl: s,
|
|
3232
3249
|
toEl: n,
|
|
3233
3250
|
fromEl: n
|
|
3234
|
-
}),
|
|
3251
|
+
}), H("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
3235
3252
|
return;
|
|
3236
3253
|
}
|
|
3237
3254
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
3238
|
-
if (r =
|
|
3255
|
+
if (r = Na(c, r.trim(), n, !1), r) return U({
|
|
3239
3256
|
sortable: t,
|
|
3240
3257
|
rootEl: r,
|
|
3241
3258
|
name: "filter",
|
|
3242
3259
|
targetEl: s,
|
|
3243
3260
|
fromEl: n,
|
|
3244
3261
|
toEl: n
|
|
3245
|
-
}),
|
|
3262
|
+
}), H("filter", t, { evt: e }), !0;
|
|
3246
3263
|
}), l)) {
|
|
3247
3264
|
i && e.cancelable && e.preventDefault();
|
|
3248
3265
|
return;
|
|
3249
3266
|
}
|
|
3250
|
-
r.handle && !
|
|
3267
|
+
r.handle && !Na(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
3251
3268
|
}
|
|
3252
3269
|
}
|
|
3253
3270
|
},
|
|
3254
3271
|
_prepareDragStart: function(e, t, n) {
|
|
3255
3272
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
3256
|
-
if (n && !
|
|
3257
|
-
var c =
|
|
3258
|
-
if (
|
|
3259
|
-
target:
|
|
3273
|
+
if (n && !W && n.parentNode === i) {
|
|
3274
|
+
var c = B(n);
|
|
3275
|
+
if (q = i, W = n, G = W.parentNode, so = W.nextSibling, co = n, mo = a.group, Q.dragged = W, vo = {
|
|
3276
|
+
target: W,
|
|
3260
3277
|
clientX: (t || e).clientX,
|
|
3261
3278
|
clientY: (t || e).clientY
|
|
3262
|
-
},
|
|
3263
|
-
if (
|
|
3279
|
+
}, So = vo.clientX - c.left, Co = vo.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
|
|
3280
|
+
if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
3264
3281
|
r._onDrop();
|
|
3265
3282
|
return;
|
|
3266
3283
|
}
|
|
3267
|
-
r._disableDelayedDragEvents(), !
|
|
3284
|
+
r._disableDelayedDragEvents(), !Ea && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
3268
3285
|
sortable: r,
|
|
3269
3286
|
name: "choose",
|
|
3270
3287
|
originalEvent: e
|
|
3271
|
-
}),
|
|
3288
|
+
}), R(W, a.chosenClass, !0);
|
|
3272
3289
|
}, a.ignore.split(",").forEach(function(e) {
|
|
3273
|
-
|
|
3274
|
-
}),
|
|
3290
|
+
Ia(W, e.trim(), Jo);
|
|
3291
|
+
}), I(o, "dragover", Wo), I(o, "mousemove", Wo), I(o, "touchmove", Wo), I(o, "mouseup", r._onDrop), I(o, "touchend", r._onDrop), I(o, "touchcancel", r._onDrop), Ea && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Ta || wa))) {
|
|
3275
3292
|
if (Q.eventCanceled) {
|
|
3276
3293
|
this._onDrop();
|
|
3277
3294
|
return;
|
|
3278
3295
|
}
|
|
3279
|
-
|
|
3296
|
+
I(o, "mouseup", r._disableDelayedDrag), I(o, "touchend", r._disableDelayedDrag), I(o, "touchcancel", r._disableDelayedDrag), I(o, "mousemove", r._delayedDragTouchMoveHandler), I(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && I(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
3280
3297
|
} else s();
|
|
3281
3298
|
}
|
|
3282
3299
|
},
|
|
@@ -3285,25 +3302,25 @@ Q.prototype = {
|
|
|
3285
3302
|
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();
|
|
3286
3303
|
},
|
|
3287
3304
|
_disableDelayedDrag: function() {
|
|
3288
|
-
|
|
3305
|
+
W && Jo(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3289
3306
|
},
|
|
3290
3307
|
_disableDelayedDragEvents: function() {
|
|
3291
3308
|
var e = this.el.ownerDocument;
|
|
3292
|
-
|
|
3309
|
+
L(e, "mouseup", this._disableDelayedDrag), L(e, "touchend", this._disableDelayedDrag), L(e, "touchcancel", this._disableDelayedDrag), L(e, "mousemove", this._delayedDragTouchMoveHandler), L(e, "touchmove", this._delayedDragTouchMoveHandler), L(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
3293
3310
|
},
|
|
3294
3311
|
_triggerDragStart: function(e, t) {
|
|
3295
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
3312
|
+
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));
|
|
3296
3313
|
try {
|
|
3297
|
-
document.selection ?
|
|
3314
|
+
document.selection ? ns(function() {
|
|
3298
3315
|
document.selection.empty();
|
|
3299
3316
|
}) : window.getSelection().removeAllRanges();
|
|
3300
3317
|
} catch {}
|
|
3301
3318
|
},
|
|
3302
3319
|
_dragStarted: function(e, t) {
|
|
3303
|
-
if (
|
|
3304
|
-
|
|
3320
|
+
if (ho = !1, q && W) {
|
|
3321
|
+
H("dragStarted", this, { evt: t }), this.nativeDraggable && I(document, "dragover", Go);
|
|
3305
3322
|
var n = this.options;
|
|
3306
|
-
!e &&
|
|
3323
|
+
!e && R(W, n.dragClass, !1), R(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
3307
3324
|
sortable: this,
|
|
3308
3325
|
name: "start",
|
|
3309
3326
|
originalEvent: t
|
|
@@ -3311,33 +3328,33 @@ Q.prototype = {
|
|
|
3311
3328
|
} else this._nulling();
|
|
3312
3329
|
},
|
|
3313
3330
|
_emulateDragOver: function() {
|
|
3314
|
-
if (
|
|
3315
|
-
this._lastX =
|
|
3316
|
-
for (var e = document.elementFromPoint(
|
|
3317
|
-
if (
|
|
3318
|
-
if (t[
|
|
3331
|
+
if (yo) {
|
|
3332
|
+
this._lastX = yo.clientX, this._lastY = yo.clientY, Ho();
|
|
3333
|
+
for (var e = document.elementFromPoint(yo.clientX, yo.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(yo.clientX, yo.clientY), e !== t);) t = e;
|
|
3334
|
+
if (W.parentNode[V]._isOutsideThisEl(e), t) do {
|
|
3335
|
+
if (t[V]) {
|
|
3319
3336
|
var n = void 0;
|
|
3320
|
-
if (n = t[
|
|
3321
|
-
clientX:
|
|
3322
|
-
clientY:
|
|
3337
|
+
if (n = t[V]._onDragOver({
|
|
3338
|
+
clientX: yo.clientX,
|
|
3339
|
+
clientY: yo.clientY,
|
|
3323
3340
|
target: e,
|
|
3324
3341
|
rootEl: t
|
|
3325
3342
|
}), n && !this.options.dragoverBubble) break;
|
|
3326
3343
|
}
|
|
3327
3344
|
e = t;
|
|
3328
3345
|
} while (t = t.parentNode);
|
|
3329
|
-
|
|
3346
|
+
Uo();
|
|
3330
3347
|
}
|
|
3331
3348
|
},
|
|
3332
3349
|
_onTouchMove: function(e) {
|
|
3333
|
-
if (
|
|
3334
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a =
|
|
3335
|
-
if (!Q.active && !
|
|
3350
|
+
if (vo) {
|
|
3351
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && Fa(K, !0), o = K && a && a.a, s = K && a && a.d, c = Po && Z && Ha(Z), l = (i.clientX - vo.clientX + r.x) / (o || 1) + (c ? c[0] - Ao[0] : 0) / (o || 1), u = (i.clientY - vo.clientY + r.y) / (s || 1) + (c ? c[1] - Ao[1] : 0) / (s || 1);
|
|
3352
|
+
if (!Q.active && !ho) {
|
|
3336
3353
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3337
3354
|
this._onDragStart(e, !0);
|
|
3338
3355
|
}
|
|
3339
|
-
if (
|
|
3340
|
-
a ? (a.e += l - (
|
|
3356
|
+
if (K) {
|
|
3357
|
+
a ? (a.e += l - (bo || 0), a.f += u - (xo || 0)) : a = {
|
|
3341
3358
|
a: 1,
|
|
3342
3359
|
b: 0,
|
|
3343
3360
|
c: 0,
|
|
@@ -3346,39 +3363,39 @@ Q.prototype = {
|
|
|
3346
3363
|
f: u
|
|
3347
3364
|
};
|
|
3348
3365
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3349
|
-
|
|
3366
|
+
z(K, "webkitTransform", d), z(K, "mozTransform", d), z(K, "msTransform", d), z(K, "transform", d), bo = l, xo = u, yo = i;
|
|
3350
3367
|
}
|
|
3351
3368
|
e.cancelable && e.preventDefault();
|
|
3352
3369
|
}
|
|
3353
3370
|
},
|
|
3354
3371
|
_appendGhost: function() {
|
|
3355
|
-
if (!
|
|
3356
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
3357
|
-
if (
|
|
3358
|
-
for (Z = e;
|
|
3359
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
3372
|
+
if (!K) {
|
|
3373
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0, Po, !0, e), n = this.options;
|
|
3374
|
+
if (Po) {
|
|
3375
|
+
for (Z = e; z(Z, "position") === "static" && z(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
3376
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = La()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = La(), Ao = Ha(Z);
|
|
3360
3377
|
}
|
|
3361
|
-
|
|
3378
|
+
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", Po ? "absolute" : "fixed"), z(K, "zIndex", "100000"), z(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), z(K, "transform-origin", So / parseInt(K.style.width) * 100 + "% " + Co / parseInt(K.style.height) * 100 + "%");
|
|
3362
3379
|
}
|
|
3363
3380
|
},
|
|
3364
3381
|
_onDragStart: function(e, t) {
|
|
3365
3382
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
3366
|
-
if (
|
|
3383
|
+
if (H("dragStart", this, { evt: e }), Q.eventCanceled) {
|
|
3367
3384
|
this._onDrop();
|
|
3368
3385
|
return;
|
|
3369
3386
|
}
|
|
3370
|
-
|
|
3371
|
-
|
|
3387
|
+
H("setupClone", this), Q.eventCanceled || (J = Za(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), R(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = ns(function() {
|
|
3388
|
+
H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
3372
3389
|
sortable: n,
|
|
3373
3390
|
name: "clone"
|
|
3374
3391
|
}));
|
|
3375
|
-
}), !t &&
|
|
3392
|
+
}), !t && R(W, i.dragClass, !0), t ? (go = !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)")), ho = !0, n._dragStartId = ns(n._dragStarted.bind(n, t, e)), I(document, "selectstart", n), wo = !0, Da && z(document.body, "user-select", "none");
|
|
3376
3393
|
},
|
|
3377
3394
|
_onDragOver: function(e) {
|
|
3378
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3379
|
-
if (
|
|
3395
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = mo === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
3396
|
+
if (jo) return;
|
|
3380
3397
|
function h(o, s) {
|
|
3381
|
-
|
|
3398
|
+
H(o, p, ga({
|
|
3382
3399
|
evt: e,
|
|
3383
3400
|
isOwner: l,
|
|
3384
3401
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3390,7 +3407,7 @@ Q.prototype = {
|
|
|
3390
3407
|
target: n,
|
|
3391
3408
|
completed: _,
|
|
3392
3409
|
onMove: function(n, i) {
|
|
3393
|
-
return
|
|
3410
|
+
return qo(q, t, W, r, n, B(n), e, i);
|
|
3394
3411
|
},
|
|
3395
3412
|
changed: v
|
|
3396
3413
|
}, s));
|
|
@@ -3399,119 +3416,119 @@ Q.prototype = {
|
|
|
3399
3416
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
3400
3417
|
}
|
|
3401
3418
|
function _(r) {
|
|
3402
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
3419
|
+
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() {
|
|
3403
3420
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3404
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n ===
|
|
3421
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (To = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && Wo(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3405
3422
|
}
|
|
3406
3423
|
function v() {
|
|
3407
|
-
|
|
3424
|
+
Y = Va(W), po = Va(W, o.draggable), U({
|
|
3408
3425
|
sortable: p,
|
|
3409
3426
|
name: "change",
|
|
3410
3427
|
toEl: t,
|
|
3411
|
-
newIndex:
|
|
3412
|
-
newDraggableIndex:
|
|
3428
|
+
newIndex: Y,
|
|
3429
|
+
newDraggableIndex: po,
|
|
3413
3430
|
originalEvent: e
|
|
3414
3431
|
});
|
|
3415
3432
|
}
|
|
3416
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3417
|
-
if (
|
|
3418
|
-
if (
|
|
3419
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
3420
|
-
if (a) return
|
|
3421
|
-
var y =
|
|
3422
|
-
if (!y ||
|
|
3423
|
-
if (y ===
|
|
3424
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
3425
|
-
} else if (y &&
|
|
3426
|
-
var b =
|
|
3427
|
-
if (b ===
|
|
3428
|
-
if (n = b, i =
|
|
3433
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Na(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3434
|
+
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3435
|
+
if (go = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = mo.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
|
|
3436
|
+
if (f = this._getDirection(e, n) === "vertical", r = B(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3437
|
+
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (so ? q.insertBefore(W, so) : q.appendChild(W)), _(!0);
|
|
3438
|
+
var y = Ba(t, o.draggable);
|
|
3439
|
+
if (!y || Zo(e, f, this) && !y.animated) {
|
|
3440
|
+
if (y === W) return _(!1);
|
|
3441
|
+
if (y && t === e.target && (n = y), n && (i = B(n)), qo(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);
|
|
3442
|
+
} else if (y && Xo(e, f, this)) {
|
|
3443
|
+
var b = za(t, 0, o, !0);
|
|
3444
|
+
if (b === W) return _(!1);
|
|
3445
|
+
if (n = b, i = B(n), qo(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
|
|
3429
3446
|
} else if (n.parentNode === t) {
|
|
3430
|
-
i =
|
|
3431
|
-
var x = 0, S, C =
|
|
3432
|
-
|
|
3447
|
+
i = B(n);
|
|
3448
|
+
var x = 0, S, C = W.parentNode !== t, w = !zo(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Ra(n, "top", "top") || Ra(W, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
3449
|
+
To !== n && (S = i[T], Do = !1, Oo = !w && o.invertSwap || C), x = Qo(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Oo, To === n);
|
|
3433
3450
|
var O;
|
|
3434
3451
|
if (x !== 0) {
|
|
3435
|
-
var k =
|
|
3452
|
+
var k = Va(W);
|
|
3436
3453
|
do
|
|
3437
|
-
k -= x, O =
|
|
3438
|
-
while (O && (
|
|
3454
|
+
k -= x, O = G.children[k];
|
|
3455
|
+
while (O && (z(O, "display") === "none" || O === K));
|
|
3439
3456
|
}
|
|
3440
3457
|
if (x === 0 || O === n) return _(!1);
|
|
3441
|
-
|
|
3458
|
+
To = n, Eo = x;
|
|
3442
3459
|
var A = n.nextElementSibling, j = !1;
|
|
3443
3460
|
j = x === 1;
|
|
3444
|
-
var ee =
|
|
3445
|
-
if (ee !== !1) return (ee === 1 || ee === -1) && (j = ee === 1),
|
|
3461
|
+
var ee = qo(q, t, W, r, n, i, e, j);
|
|
3462
|
+
if (ee !== !1) return (ee === 1 || ee === -1) && (j = ee === 1), jo = !0, setTimeout(Yo, 30), g(), j && !A ? t.appendChild(W) : n.parentNode.insertBefore(W, j ? A : n), E && Xa(E, 0, D - E.scrollTop), G = W.parentNode, S !== void 0 && !Oo && (ko = Math.abs(S - B(n)[T])), v(), _(!0);
|
|
3446
3463
|
}
|
|
3447
|
-
if (t.contains(
|
|
3464
|
+
if (t.contains(W)) return _(!1);
|
|
3448
3465
|
}
|
|
3449
3466
|
return !1;
|
|
3450
3467
|
},
|
|
3451
3468
|
_ignoreWhileAnimating: null,
|
|
3452
3469
|
_offMoveEvents: function() {
|
|
3453
|
-
|
|
3470
|
+
L(document, "mousemove", this._onTouchMove), L(document, "touchmove", this._onTouchMove), L(document, "pointermove", this._onTouchMove), L(document, "dragover", Wo), L(document, "mousemove", Wo), L(document, "touchmove", Wo);
|
|
3454
3471
|
},
|
|
3455
3472
|
_offUpEvents: function() {
|
|
3456
3473
|
var e = this.el.ownerDocument;
|
|
3457
|
-
|
|
3474
|
+
L(e, "mouseup", this._onDrop), L(e, "touchend", this._onDrop), L(e, "pointerup", this._onDrop), L(e, "touchcancel", this._onDrop), L(document, "selectstart", this);
|
|
3458
3475
|
},
|
|
3459
3476
|
_onDrop: function(e) {
|
|
3460
3477
|
var t = this.el, n = this.options;
|
|
3461
|
-
if (
|
|
3478
|
+
if (Y = Va(W), po = Va(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = Va(W), po = Va(W, n.draggable), Q.eventCanceled) {
|
|
3462
3479
|
this._nulling();
|
|
3463
3480
|
return;
|
|
3464
3481
|
}
|
|
3465
|
-
|
|
3482
|
+
ho = !1, Oo = !1, Do = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), rs(this.cloneId), rs(this._dragStartId), this.nativeDraggable && (L(document, "drop", this), L(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Da && z(document.body, "user-select", ""), z(W, "transform", ""), e && (wo && (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), Jo(W), W.style["will-change"] = "", wo && !ho && R(W, X ? X.options.ghostClass : this.options.ghostClass, !1), R(W, this.options.chosenClass, !1), U({
|
|
3466
3483
|
sortable: this,
|
|
3467
3484
|
name: "unchoose",
|
|
3468
|
-
toEl:
|
|
3485
|
+
toEl: G,
|
|
3469
3486
|
newIndex: null,
|
|
3470
3487
|
newDraggableIndex: null,
|
|
3471
3488
|
originalEvent: e
|
|
3472
|
-
}),
|
|
3489
|
+
}), q === G ? Y !== uo && Y >= 0 && (U({
|
|
3473
3490
|
sortable: this,
|
|
3474
3491
|
name: "update",
|
|
3475
|
-
toEl:
|
|
3492
|
+
toEl: G,
|
|
3476
3493
|
originalEvent: e
|
|
3477
|
-
}),
|
|
3494
|
+
}), U({
|
|
3478
3495
|
sortable: this,
|
|
3479
3496
|
name: "sort",
|
|
3480
|
-
toEl:
|
|
3497
|
+
toEl: G,
|
|
3481
3498
|
originalEvent: e
|
|
3482
|
-
})) : (
|
|
3483
|
-
rootEl:
|
|
3499
|
+
})) : (Y >= 0 && (U({
|
|
3500
|
+
rootEl: G,
|
|
3484
3501
|
name: "add",
|
|
3485
|
-
toEl:
|
|
3486
|
-
fromEl:
|
|
3502
|
+
toEl: G,
|
|
3503
|
+
fromEl: q,
|
|
3487
3504
|
originalEvent: e
|
|
3488
|
-
}),
|
|
3505
|
+
}), U({
|
|
3489
3506
|
sortable: this,
|
|
3490
3507
|
name: "remove",
|
|
3491
|
-
toEl:
|
|
3508
|
+
toEl: G,
|
|
3492
3509
|
originalEvent: e
|
|
3493
|
-
}),
|
|
3494
|
-
rootEl:
|
|
3510
|
+
}), U({
|
|
3511
|
+
rootEl: G,
|
|
3495
3512
|
name: "sort",
|
|
3496
|
-
toEl:
|
|
3497
|
-
fromEl:
|
|
3513
|
+
toEl: G,
|
|
3514
|
+
fromEl: q,
|
|
3498
3515
|
originalEvent: e
|
|
3499
|
-
}),
|
|
3516
|
+
}), U({
|
|
3500
3517
|
sortable: this,
|
|
3501
3518
|
name: "sort",
|
|
3502
|
-
toEl:
|
|
3519
|
+
toEl: G,
|
|
3503
3520
|
originalEvent: e
|
|
3504
|
-
})), X && X.save()), Q.active && ((
|
|
3521
|
+
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = uo, po = fo), U({
|
|
3505
3522
|
sortable: this,
|
|
3506
3523
|
name: "end",
|
|
3507
|
-
toEl:
|
|
3524
|
+
toEl: G,
|
|
3508
3525
|
originalEvent: e
|
|
3509
3526
|
}), this.save()))), this._nulling();
|
|
3510
3527
|
},
|
|
3511
3528
|
_nulling: function() {
|
|
3512
|
-
|
|
3529
|
+
H("nulling", this), q = W = G = K = so = J = co = lo = vo = yo = wo = Y = po = uo = fo = To = Eo = X = mo = Q.dragged = Q.ghost = Q.clone = Q.active = null, Mo.forEach(function(e) {
|
|
3513
3530
|
e.checked = !0;
|
|
3514
|
-
}),
|
|
3531
|
+
}), Mo.length = bo = xo = 0;
|
|
3515
3532
|
},
|
|
3516
3533
|
handleEvent: function(e) {
|
|
3517
3534
|
switch (e.type) {
|
|
@@ -3521,7 +3538,7 @@ Q.prototype = {
|
|
|
3521
3538
|
break;
|
|
3522
3539
|
case "dragenter":
|
|
3523
3540
|
case "dragover":
|
|
3524
|
-
|
|
3541
|
+
W && (this._onDragOver(e), Ko(e));
|
|
3525
3542
|
break;
|
|
3526
3543
|
case "selectstart":
|
|
3527
3544
|
e.preventDefault();
|
|
@@ -3529,14 +3546,14 @@ Q.prototype = {
|
|
|
3529
3546
|
}
|
|
3530
3547
|
},
|
|
3531
3548
|
toArray: function() {
|
|
3532
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3549
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Na(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || es(t));
|
|
3533
3550
|
return e;
|
|
3534
3551
|
},
|
|
3535
3552
|
sort: function(e, t) {
|
|
3536
3553
|
var n = {}, r = this.el;
|
|
3537
3554
|
this.toArray().forEach(function(e, t) {
|
|
3538
3555
|
var i = r.children[t];
|
|
3539
|
-
|
|
3556
|
+
Na(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3540
3557
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3541
3558
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3542
3559
|
}), t && this.animateAll();
|
|
@@ -3546,25 +3563,25 @@ Q.prototype = {
|
|
|
3546
3563
|
e && e.set && e.set(this);
|
|
3547
3564
|
},
|
|
3548
3565
|
closest: function(e, t) {
|
|
3549
|
-
return
|
|
3566
|
+
return Na(e, t || this.options.draggable, this.el, !1);
|
|
3550
3567
|
},
|
|
3551
3568
|
option: function(e, t) {
|
|
3552
3569
|
var n = this.options;
|
|
3553
3570
|
if (t === void 0) return n[e];
|
|
3554
|
-
var r =
|
|
3555
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
3571
|
+
var r = io.modifyOption(this, e, t);
|
|
3572
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && Vo(n);
|
|
3556
3573
|
},
|
|
3557
3574
|
destroy: function() {
|
|
3558
|
-
|
|
3575
|
+
H("destroy", this);
|
|
3559
3576
|
var e = this.el;
|
|
3560
|
-
e[
|
|
3577
|
+
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) {
|
|
3561
3578
|
e.removeAttribute("draggable");
|
|
3562
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3579
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), _o.splice(_o.indexOf(this.el), 1), this.el = e = null;
|
|
3563
3580
|
},
|
|
3564
3581
|
_hideClone: function() {
|
|
3565
|
-
if (!
|
|
3566
|
-
if (
|
|
3567
|
-
|
|
3582
|
+
if (!lo) {
|
|
3583
|
+
if (H("hideClone", this), Q.eventCanceled) return;
|
|
3584
|
+
z(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), lo = !0;
|
|
3568
3585
|
}
|
|
3569
3586
|
},
|
|
3570
3587
|
_showClone: function(e) {
|
|
@@ -3572,99 +3589,99 @@ Q.prototype = {
|
|
|
3572
3589
|
this._hideClone();
|
|
3573
3590
|
return;
|
|
3574
3591
|
}
|
|
3575
|
-
if (
|
|
3576
|
-
if (
|
|
3577
|
-
|
|
3592
|
+
if (lo) {
|
|
3593
|
+
if (H("showClone", this), Q.eventCanceled) return;
|
|
3594
|
+
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : so ? q.insertBefore(J, so) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), z(J, "display", ""), lo = !1;
|
|
3578
3595
|
}
|
|
3579
3596
|
}
|
|
3580
3597
|
};
|
|
3581
|
-
function
|
|
3598
|
+
function Ko(e) {
|
|
3582
3599
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3583
3600
|
}
|
|
3584
|
-
function
|
|
3585
|
-
var c, l = e[
|
|
3586
|
-
return window.CustomEvent && !
|
|
3601
|
+
function qo(e, t, n, r, i, a, o, s) {
|
|
3602
|
+
var c, l = e[V], u = l.options.onMove, d;
|
|
3603
|
+
return window.CustomEvent && !wa && !Ta ? c = new CustomEvent("move", {
|
|
3587
3604
|
bubbles: !0,
|
|
3588
3605
|
cancelable: !0
|
|
3589
|
-
}) : (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 ||
|
|
3606
|
+
}) : (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;
|
|
3590
3607
|
}
|
|
3591
|
-
function
|
|
3608
|
+
function Jo(e) {
|
|
3592
3609
|
e.draggable = !1;
|
|
3593
3610
|
}
|
|
3594
|
-
function
|
|
3595
|
-
|
|
3611
|
+
function Yo() {
|
|
3612
|
+
jo = !1;
|
|
3596
3613
|
}
|
|
3597
|
-
function
|
|
3598
|
-
var r =
|
|
3614
|
+
function Xo(e, t, n) {
|
|
3615
|
+
var r = B(za(n.el, 0, n.options, !0)), i = Qa(n.el, n.options, K), a = 10;
|
|
3599
3616
|
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;
|
|
3600
3617
|
}
|
|
3601
|
-
function
|
|
3602
|
-
var r =
|
|
3618
|
+
function Zo(e, t, n) {
|
|
3619
|
+
var r = B(Ba(n.el, n.options.draggable)), i = Qa(n.el, n.options, K), a = 10;
|
|
3603
3620
|
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;
|
|
3604
3621
|
}
|
|
3605
|
-
function
|
|
3622
|
+
function Qo(e, t, n, r, i, a, o, s) {
|
|
3606
3623
|
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;
|
|
3607
3624
|
if (!o) {
|
|
3608
|
-
if (s &&
|
|
3609
|
-
if (!
|
|
3610
|
-
else if (
|
|
3611
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3625
|
+
if (s && ko < l * i) {
|
|
3626
|
+
if (!Do && (Eo === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Do = !0), Do) f = !0;
|
|
3627
|
+
else if (Eo === 1 ? c < u + ko : c > d - ko) return -Eo;
|
|
3628
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return $o(t);
|
|
3612
3629
|
}
|
|
3613
3630
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3614
3631
|
}
|
|
3615
|
-
function
|
|
3616
|
-
return
|
|
3632
|
+
function $o(e) {
|
|
3633
|
+
return Va(W) < Va(e) ? 1 : -1;
|
|
3617
3634
|
}
|
|
3618
|
-
function
|
|
3635
|
+
function es(e) {
|
|
3619
3636
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3620
3637
|
return r.toString(36);
|
|
3621
3638
|
}
|
|
3622
|
-
function
|
|
3623
|
-
|
|
3639
|
+
function ts(e) {
|
|
3640
|
+
Mo.length = 0;
|
|
3624
3641
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3625
3642
|
var r = t[n];
|
|
3626
|
-
r.checked &&
|
|
3643
|
+
r.checked && Mo.push(r);
|
|
3627
3644
|
}
|
|
3628
3645
|
}
|
|
3629
|
-
function
|
|
3646
|
+
function ns(e) {
|
|
3630
3647
|
return setTimeout(e, 0);
|
|
3631
3648
|
}
|
|
3632
|
-
function
|
|
3649
|
+
function rs(e) {
|
|
3633
3650
|
return clearTimeout(e);
|
|
3634
3651
|
}
|
|
3635
|
-
|
|
3636
|
-
(Q.active ||
|
|
3652
|
+
No && I(document, "touchmove", function(e) {
|
|
3653
|
+
(Q.active || ho) && e.cancelable && e.preventDefault();
|
|
3637
3654
|
}), Q.utils = {
|
|
3638
|
-
on:
|
|
3639
|
-
off:
|
|
3640
|
-
css:
|
|
3641
|
-
find:
|
|
3655
|
+
on: I,
|
|
3656
|
+
off: L,
|
|
3657
|
+
css: z,
|
|
3658
|
+
find: Ia,
|
|
3642
3659
|
is: function(e, t) {
|
|
3643
|
-
return !!
|
|
3660
|
+
return !!Na(e, t, e, !1);
|
|
3644
3661
|
},
|
|
3645
|
-
extend:
|
|
3646
|
-
throttle:
|
|
3647
|
-
closest:
|
|
3648
|
-
toggleClass:
|
|
3649
|
-
clone:
|
|
3650
|
-
index:
|
|
3651
|
-
nextTick:
|
|
3652
|
-
cancelNextTick:
|
|
3653
|
-
detectDirection:
|
|
3654
|
-
getChild:
|
|
3662
|
+
extend: Ga,
|
|
3663
|
+
throttle: Ja,
|
|
3664
|
+
closest: Na,
|
|
3665
|
+
toggleClass: R,
|
|
3666
|
+
clone: Za,
|
|
3667
|
+
index: Va,
|
|
3668
|
+
nextTick: ns,
|
|
3669
|
+
cancelNextTick: rs,
|
|
3670
|
+
detectDirection: Ro,
|
|
3671
|
+
getChild: za
|
|
3655
3672
|
}, Q.get = function(e) {
|
|
3656
|
-
return e[
|
|
3673
|
+
return e[V];
|
|
3657
3674
|
}, Q.mount = function() {
|
|
3658
3675
|
var e = [...arguments];
|
|
3659
3676
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3660
3677
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3661
|
-
e.utils && (Q.utils =
|
|
3678
|
+
e.utils && (Q.utils = ga(ga({}, Q.utils), e.utils)), io.mount(e);
|
|
3662
3679
|
});
|
|
3663
3680
|
}, Q.create = function(e, t) {
|
|
3664
3681
|
return new Q(e, t);
|
|
3665
|
-
}, Q.version =
|
|
3666
|
-
var $ = [],
|
|
3667
|
-
function
|
|
3682
|
+
}, Q.version = Sa;
|
|
3683
|
+
var $ = [], is, as, os = !1, ss, cs, ls, us;
|
|
3684
|
+
function ds() {
|
|
3668
3685
|
function e() {
|
|
3669
3686
|
for (var e in this.defaults = {
|
|
3670
3687
|
scroll: !0,
|
|
@@ -3677,70 +3694,70 @@ function as() {
|
|
|
3677
3694
|
return e.prototype = {
|
|
3678
3695
|
dragStarted: function(e) {
|
|
3679
3696
|
var t = e.originalEvent;
|
|
3680
|
-
this.sortable.nativeDraggable ?
|
|
3697
|
+
this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? I(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? I(document, "touchmove", this._handleFallbackAutoScroll) : I(document, "mousemove", this._handleFallbackAutoScroll);
|
|
3681
3698
|
},
|
|
3682
3699
|
dragOverCompleted: function(e) {
|
|
3683
3700
|
var t = e.originalEvent;
|
|
3684
3701
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3685
3702
|
},
|
|
3686
3703
|
drop: function() {
|
|
3687
|
-
this.sortable.nativeDraggable ?
|
|
3704
|
+
this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)), ps(), fs(), Ya();
|
|
3688
3705
|
},
|
|
3689
3706
|
nulling: function() {
|
|
3690
|
-
|
|
3707
|
+
ls = as = is = os = us = ss = cs = null, $.length = 0;
|
|
3691
3708
|
},
|
|
3692
3709
|
_handleFallbackAutoScroll: function(e) {
|
|
3693
3710
|
this._handleAutoScroll(e, !0);
|
|
3694
3711
|
},
|
|
3695
3712
|
_handleAutoScroll: function(e, t) {
|
|
3696
3713
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3697
|
-
if (
|
|
3698
|
-
|
|
3699
|
-
var o =
|
|
3700
|
-
|
|
3701
|
-
var a =
|
|
3702
|
-
a !== o && (o = a,
|
|
3703
|
-
}, 10),
|
|
3714
|
+
if (ls = e, t || this.options.forceAutoScrollFallback || Ta || wa || Da) {
|
|
3715
|
+
ms(e, this.options, a, t);
|
|
3716
|
+
var o = Wa(a, !0);
|
|
3717
|
+
os && (!us || r !== ss || i !== cs) && (us && ps(), us = setInterval(function() {
|
|
3718
|
+
var a = Wa(document.elementFromPoint(r, i), !0);
|
|
3719
|
+
a !== o && (o = a, fs()), ms(e, n.options, a, t);
|
|
3720
|
+
}, 10), ss = r, cs = i);
|
|
3704
3721
|
} else {
|
|
3705
|
-
if (!this.options.bubbleScroll ||
|
|
3706
|
-
|
|
3722
|
+
if (!this.options.bubbleScroll || Wa(a, !0) === La()) {
|
|
3723
|
+
fs();
|
|
3707
3724
|
return;
|
|
3708
3725
|
}
|
|
3709
|
-
|
|
3726
|
+
ms(e, this.options, Wa(a, !1), !1);
|
|
3710
3727
|
}
|
|
3711
3728
|
}
|
|
3712
|
-
},
|
|
3729
|
+
}, ya(e, {
|
|
3713
3730
|
pluginName: "scroll",
|
|
3714
3731
|
initializeByDefault: !0
|
|
3715
3732
|
});
|
|
3716
3733
|
}
|
|
3717
|
-
function
|
|
3734
|
+
function fs() {
|
|
3718
3735
|
$.forEach(function(e) {
|
|
3719
3736
|
clearInterval(e.pid);
|
|
3720
3737
|
}), $ = [];
|
|
3721
3738
|
}
|
|
3722
|
-
function
|
|
3723
|
-
clearInterval(
|
|
3739
|
+
function ps() {
|
|
3740
|
+
clearInterval(us);
|
|
3724
3741
|
}
|
|
3725
|
-
var
|
|
3742
|
+
var ms = Ja(function(e, t, n, r) {
|
|
3726
3743
|
if (t.scroll) {
|
|
3727
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3728
|
-
|
|
3729
|
-
var d = 0, f =
|
|
3744
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = La(), l = !1, u;
|
|
3745
|
+
as !== n && (as = n, fs(), is = t.scroll, u = t.scrollFn, is === !0 && (is = Wa(n, !0)));
|
|
3746
|
+
var d = 0, f = is;
|
|
3730
3747
|
do {
|
|
3731
|
-
var p = f, m =
|
|
3748
|
+
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;
|
|
3732
3749
|
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"));
|
|
3733
3750
|
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);
|
|
3734
3751
|
if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
|
|
3735
3752
|
($[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() {
|
|
3736
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3753
|
+
r && this.layer === 0 && Q.active._onTouchMove(ls);
|
|
3737
3754
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3738
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
3755
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, ls, $[this.layer].el) !== "continue" || Xa($[this.layer].el, n, t);
|
|
3739
3756
|
}.bind({ layer: d }), 24))), d++;
|
|
3740
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3741
|
-
|
|
3757
|
+
} while (t.bubbleScroll && f !== c && (f = Wa(f, !1)));
|
|
3758
|
+
os = l;
|
|
3742
3759
|
}
|
|
3743
|
-
}, 30),
|
|
3760
|
+
}, 30), hs = function(e) {
|
|
3744
3761
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3745
3762
|
if (t) {
|
|
3746
3763
|
var c = n || i;
|
|
@@ -3752,8 +3769,8 @@ var cs = Va(function(e, t, n, r) {
|
|
|
3752
3769
|
}));
|
|
3753
3770
|
}
|
|
3754
3771
|
};
|
|
3755
|
-
function
|
|
3756
|
-
|
|
3772
|
+
function gs() {}
|
|
3773
|
+
gs.prototype = {
|
|
3757
3774
|
startIndex: null,
|
|
3758
3775
|
dragStart: function(e) {
|
|
3759
3776
|
var t = e.oldDraggableIndex;
|
|
@@ -3762,72 +3779,72 @@ us.prototype = {
|
|
|
3762
3779
|
onSpill: function(e) {
|
|
3763
3780
|
var t = e.dragEl, n = e.putSortable;
|
|
3764
3781
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3765
|
-
var r =
|
|
3782
|
+
var r = za(this.sortable.el, this.startIndex, this.options);
|
|
3766
3783
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3767
3784
|
},
|
|
3768
|
-
drop:
|
|
3769
|
-
},
|
|
3770
|
-
function
|
|
3771
|
-
|
|
3785
|
+
drop: hs
|
|
3786
|
+
}, ya(gs, { pluginName: "revertOnSpill" });
|
|
3787
|
+
function _s() {}
|
|
3788
|
+
_s.prototype = {
|
|
3772
3789
|
onSpill: function(e) {
|
|
3773
3790
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3774
3791
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3775
3792
|
},
|
|
3776
|
-
drop:
|
|
3777
|
-
},
|
|
3778
|
-
function
|
|
3793
|
+
drop: hs
|
|
3794
|
+
}, ya(_s, { pluginName: "removeOnSpill" }), Q.mount(new ds()), Q.mount(_s, gs);
|
|
3795
|
+
function vs(e) {
|
|
3779
3796
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3780
3797
|
}
|
|
3781
|
-
function
|
|
3798
|
+
function ys(e) {
|
|
3782
3799
|
ne() && r(e);
|
|
3783
3800
|
}
|
|
3784
|
-
function
|
|
3801
|
+
function bs(e) {
|
|
3785
3802
|
ne() ? a(e) : re(e);
|
|
3786
3803
|
}
|
|
3787
|
-
var
|
|
3788
|
-
function
|
|
3789
|
-
|
|
3804
|
+
var xs = null, Ss = null;
|
|
3805
|
+
function Cs(e = null, t = null) {
|
|
3806
|
+
xs = e, Ss = t;
|
|
3790
3807
|
}
|
|
3791
|
-
function
|
|
3808
|
+
function ws() {
|
|
3792
3809
|
return {
|
|
3793
|
-
data:
|
|
3794
|
-
clonedData:
|
|
3810
|
+
data: xs,
|
|
3811
|
+
clonedData: Ss
|
|
3795
3812
|
};
|
|
3796
3813
|
}
|
|
3797
|
-
var
|
|
3798
|
-
function
|
|
3814
|
+
var Ts = Symbol("cloneElement");
|
|
3815
|
+
function Es(...e) {
|
|
3799
3816
|
let t = ne()?.proxy, n = null, r = e[0], [, i, a] = e;
|
|
3800
3817
|
Array.isArray(k(i)) || (a = i, i = null);
|
|
3801
|
-
let o = null, { immediate: s = !0, clone: l =
|
|
3818
|
+
let o = null, { immediate: s = !0, clone: l = vs, forceFallback: u, fallbackOnBody: d, customUpdate: f } = k(a) ?? {};
|
|
3802
3819
|
function p(e) {
|
|
3803
3820
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3804
3821
|
n = u && !d ? o.slice(0, -1) : o;
|
|
3805
3822
|
let s = k(k(i)?.[r]), c = l(s);
|
|
3806
|
-
|
|
3823
|
+
Cs(s, c), a[Ts] = c;
|
|
3807
3824
|
}
|
|
3808
3825
|
function m(e) {
|
|
3809
|
-
let t = e.item[
|
|
3810
|
-
if (!
|
|
3811
|
-
if (
|
|
3826
|
+
let t = e.item[Ts];
|
|
3827
|
+
if (!ia(t)) {
|
|
3828
|
+
if (sa(e.item), g(i)) {
|
|
3812
3829
|
let n = [...k(i)];
|
|
3813
|
-
i.value =
|
|
3830
|
+
i.value = ra(n, e.newDraggableIndex, t);
|
|
3814
3831
|
return;
|
|
3815
3832
|
}
|
|
3816
|
-
|
|
3833
|
+
ra(k(i), e.newDraggableIndex, t);
|
|
3817
3834
|
}
|
|
3818
3835
|
}
|
|
3819
3836
|
function h(e) {
|
|
3820
3837
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3821
|
-
if (
|
|
3822
|
-
|
|
3838
|
+
if (oa(t, n, r), o === "clone") {
|
|
3839
|
+
sa(s);
|
|
3823
3840
|
return;
|
|
3824
3841
|
}
|
|
3825
3842
|
if (g(i)) {
|
|
3826
3843
|
let e = [...k(i)];
|
|
3827
|
-
i.value =
|
|
3844
|
+
i.value = na(e, a);
|
|
3828
3845
|
return;
|
|
3829
3846
|
}
|
|
3830
|
-
|
|
3847
|
+
na(k(i), a);
|
|
3831
3848
|
}
|
|
3832
3849
|
function _(e) {
|
|
3833
3850
|
if (f) {
|
|
@@ -3835,12 +3852,12 @@ function bs(...e) {
|
|
|
3835
3852
|
return;
|
|
3836
3853
|
}
|
|
3837
3854
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3838
|
-
if (
|
|
3855
|
+
if (sa(n), oa(t, n, r), g(i)) {
|
|
3839
3856
|
let e = [...k(i)];
|
|
3840
|
-
i.value =
|
|
3857
|
+
i.value = $i(e, a, o);
|
|
3841
3858
|
return;
|
|
3842
3859
|
}
|
|
3843
|
-
|
|
3860
|
+
$i(k(i), a, o);
|
|
3844
3861
|
}
|
|
3845
3862
|
function v(e) {
|
|
3846
3863
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -3859,7 +3876,7 @@ function bs(...e) {
|
|
|
3859
3876
|
n = null;
|
|
3860
3877
|
}
|
|
3861
3878
|
re(() => {
|
|
3862
|
-
if (
|
|
3879
|
+
if (Cs(), o) throw o;
|
|
3863
3880
|
});
|
|
3864
3881
|
}
|
|
3865
3882
|
let y = {
|
|
@@ -3871,19 +3888,19 @@ function bs(...e) {
|
|
|
3871
3888
|
};
|
|
3872
3889
|
function b(e) {
|
|
3873
3890
|
let n = k(r);
|
|
3874
|
-
return e ||=
|
|
3891
|
+
return e ||= aa(n) ? ca(n, t?.$el) : n, e && !da(e) && (e = e.$el), e || Qi("Root element not found"), e;
|
|
3875
3892
|
}
|
|
3876
3893
|
function x() {
|
|
3877
|
-
let e = k(a) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3878
|
-
return
|
|
3879
|
-
|
|
3880
|
-
}),
|
|
3894
|
+
let e = k(a) ?? {}, { immediate: t, clone: n } = e, r = Yi(e, ["immediate", "clone"]);
|
|
3895
|
+
return fa(r, (e, t) => {
|
|
3896
|
+
pa(e) && (r[e] = (e, ...n) => (ma(e, ws()), t(e, ...n)));
|
|
3897
|
+
}), ua(i === null ? {} : y, r);
|
|
3881
3898
|
}
|
|
3882
3899
|
let S = (e) => {
|
|
3883
3900
|
e = b(e), o && C.destroy(), o = new Q(e, x());
|
|
3884
3901
|
};
|
|
3885
3902
|
c(() => a, () => {
|
|
3886
|
-
o &&
|
|
3903
|
+
o && fa(x(), (e, t) => {
|
|
3887
3904
|
o?.option(e, t);
|
|
3888
3905
|
});
|
|
3889
3906
|
}, { deep: !0 });
|
|
@@ -3896,15 +3913,15 @@ function bs(...e) {
|
|
|
3896
3913
|
toArray: () => o?.toArray(),
|
|
3897
3914
|
closest: (...e) => o?.closest(...e)
|
|
3898
3915
|
};
|
|
3899
|
-
return
|
|
3916
|
+
return bs(() => {
|
|
3900
3917
|
s && S();
|
|
3901
|
-
}),
|
|
3918
|
+
}), ys(C.destroy), Ji({
|
|
3902
3919
|
start: S,
|
|
3903
3920
|
pause: () => C?.option("disabled", !0),
|
|
3904
3921
|
resume: () => C?.option("disabled", !1)
|
|
3905
3922
|
}, C);
|
|
3906
3923
|
}
|
|
3907
|
-
var
|
|
3924
|
+
var Ds = [
|
|
3908
3925
|
"update",
|
|
3909
3926
|
"start",
|
|
3910
3927
|
"add",
|
|
@@ -3917,7 +3934,7 @@ var xs = [
|
|
|
3917
3934
|
"clone",
|
|
3918
3935
|
"move",
|
|
3919
3936
|
"change"
|
|
3920
|
-
],
|
|
3937
|
+
], Os = y({
|
|
3921
3938
|
name: "VueDraggable",
|
|
3922
3939
|
model: {
|
|
3923
3940
|
prop: "modelValue",
|
|
@@ -3967,37 +3984,37 @@ var xs = [
|
|
|
3967
3984
|
"tag",
|
|
3968
3985
|
"target",
|
|
3969
3986
|
"customUpdate",
|
|
3970
|
-
...
|
|
3987
|
+
...Ds.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3971
3988
|
],
|
|
3972
|
-
emits: ["update:modelValue", ...
|
|
3989
|
+
emits: ["update:modelValue", ...Ds],
|
|
3973
3990
|
setup(t, { slots: n, emit: r, expose: i, attrs: a }) {
|
|
3974
|
-
let o =
|
|
3991
|
+
let o = Ds.reduce((e, t) => {
|
|
3975
3992
|
let n = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3976
3993
|
return e[n] = (...e) => r(t, ...e), e;
|
|
3977
3994
|
}, {}), s = M(() => {
|
|
3978
|
-
let n = e(t), { modelValue: r } = n, i =
|
|
3995
|
+
let n = e(t), { modelValue: r } = n, i = Yi(n, ["modelValue"]), s = Object.entries(i).reduce((e, [t, n]) => {
|
|
3979
3996
|
let r = k(n);
|
|
3980
3997
|
return r !== void 0 && (e[t] = r), e;
|
|
3981
3998
|
}, {});
|
|
3982
|
-
return
|
|
3999
|
+
return Ji(Ji({}, o), ta(Ji(Ji({}, a), s)));
|
|
3983
4000
|
}), c = M({
|
|
3984
4001
|
get: () => t.modelValue,
|
|
3985
4002
|
set: (e) => r("update:modelValue", e)
|
|
3986
|
-
}), l = _(), u = A(
|
|
4003
|
+
}), l = _(), u = A(Es(t.target || l, c, s));
|
|
3987
4004
|
return i(u), () => ie(t.tag || "div", { ref: l }, (n?.default)?.call(n, u));
|
|
3988
4005
|
}
|
|
3989
|
-
}),
|
|
4006
|
+
}), ks = {
|
|
3990
4007
|
mounted: "mounted",
|
|
3991
4008
|
unmounted: "unmounted"
|
|
3992
4009
|
};
|
|
3993
|
-
|
|
4010
|
+
ks.mounted, ks.unmounted;
|
|
3994
4011
|
//#endregion
|
|
3995
4012
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3996
|
-
var
|
|
4013
|
+
var As = { class: "tpl:w-full" }, js = {
|
|
3997
4014
|
key: 0,
|
|
3998
4015
|
"data-testid": "section-drop-hint",
|
|
3999
4016
|
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-chrome-text-dim)]"
|
|
4000
|
-
},
|
|
4017
|
+
}, Ms = /* @__PURE__ */ y({
|
|
4001
4018
|
__name: "SectionBlock",
|
|
4002
4019
|
props: {
|
|
4003
4020
|
block: {},
|
|
@@ -4005,13 +4022,13 @@ var ws = { class: "tpl:w-full" }, Ts = {
|
|
|
4005
4022
|
},
|
|
4006
4023
|
setup(e) {
|
|
4007
4024
|
let n = {
|
|
4008
|
-
title:
|
|
4009
|
-
paragraph:
|
|
4010
|
-
image:
|
|
4011
|
-
button:
|
|
4012
|
-
divider:
|
|
4013
|
-
custom:
|
|
4014
|
-
}, r = e, { t: a } =
|
|
4025
|
+
title: Vi,
|
|
4026
|
+
paragraph: Si,
|
|
4027
|
+
image: li,
|
|
4028
|
+
button: Xn,
|
|
4029
|
+
divider: Ur,
|
|
4030
|
+
custom: Vr
|
|
4031
|
+
}, r = e, { t: a } = Ht(), s = dt(Dt, "SectionBlock"), c = P(wt, null), l = P(Pt, null), u = P(It, {});
|
|
4015
4032
|
function h(e) {
|
|
4016
4033
|
let t = u.savedBlocks;
|
|
4017
4034
|
if (t?.isPicking.value) {
|
|
@@ -4046,7 +4063,7 @@ var ws = { class: "tpl:w-full" }, Ts = {
|
|
|
4046
4063
|
i[e] = n, s.updateBlock(r.block.id, { children: i });
|
|
4047
4064
|
}
|
|
4048
4065
|
function C(e) {
|
|
4049
|
-
return
|
|
4066
|
+
return wi(e, l, n);
|
|
4050
4067
|
}
|
|
4051
4068
|
function T(e, t) {
|
|
4052
4069
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
@@ -4054,16 +4071,16 @@ var ws = { class: "tpl:w-full" }, Ts = {
|
|
|
4054
4071
|
dataSourceFetched: t.dataSourceFetched
|
|
4055
4072
|
});
|
|
4056
4073
|
}
|
|
4057
|
-
return (n, r) => (f(), x("div",
|
|
4074
|
+
return (n, r) => (f(), x("div", As, [b("div", { class: o(["tpl:flex tpl:gap-0", { "tpl:flex-col": v.value }]) }, [(f(!0), x(j, null, t(_.value, (n, r) => (f(), x("div", {
|
|
4058
4075
|
key: r,
|
|
4059
4076
|
class: o(["tpl:relative tpl:min-h-[60px] tpl:rounded", y(r).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
4060
4077
|
style: i({ width: v.value ? "100%" : g.value[r] })
|
|
4061
|
-
}, [w(k(
|
|
4078
|
+
}, [w(k(Os), {
|
|
4062
4079
|
"model-value": y(r),
|
|
4063
4080
|
group: {
|
|
4064
4081
|
name: "blocks",
|
|
4065
4082
|
pull: !0,
|
|
4066
|
-
put: (e, t, n) => k(
|
|
4083
|
+
put: (e, t, n) => k(Hi)(n)
|
|
4067
4084
|
},
|
|
4068
4085
|
animation: 150,
|
|
4069
4086
|
"ghost-class": "tpl-ghost",
|
|
@@ -4076,7 +4093,7 @@ var ws = { class: "tpl:w-full" }, Ts = {
|
|
|
4076
4093
|
class: "tpl:min-h-[60px]",
|
|
4077
4094
|
"onUpdate:modelValue": (e) => S(r, e)
|
|
4078
4095
|
}, {
|
|
4079
|
-
default: m(() => [(f(!0), x(j, null, t(y(r), (t) => ae((f(), x("div", { key: t.id }, [w(
|
|
4096
|
+
default: m(() => [(f(!0), x(j, null, t(y(r), (t) => ae((f(), x("div", { key: t.id }, [w(zi, {
|
|
4080
4097
|
block: t,
|
|
4081
4098
|
"is-selected": k(s).state.selectedBlockId === t.id,
|
|
4082
4099
|
viewport: e.viewport,
|
|
@@ -4108,13 +4125,13 @@ var ws = { class: "tpl:w-full" }, Ts = {
|
|
|
4108
4125
|
"model-value",
|
|
4109
4126
|
"group",
|
|
4110
4127
|
"onUpdate:modelValue"
|
|
4111
|
-
]), y(r).length === 0 ? (f(), x("div",
|
|
4128
|
+
]), y(r).length === 0 ? (f(), x("div", js, [b("span", null, p(k(a).section.dropHere), 1)])) : N("", !0)], 6))), 128))], 2)]));
|
|
4112
4129
|
}
|
|
4113
|
-
}),
|
|
4130
|
+
}), Ns = Me, Ps = {
|
|
4114
4131
|
small: 24,
|
|
4115
4132
|
medium: 32,
|
|
4116
4133
|
large: 48
|
|
4117
|
-
},
|
|
4134
|
+
}, Fs = [
|
|
4118
4135
|
"facebook",
|
|
4119
4136
|
"twitter",
|
|
4120
4137
|
"instagram",
|
|
@@ -4132,11 +4149,11 @@ var ws = { class: "tpl:w-full" }, Ts = {
|
|
|
4132
4149
|
"github",
|
|
4133
4150
|
"dribbble",
|
|
4134
4151
|
"behance"
|
|
4135
|
-
],
|
|
4152
|
+
], Is = [
|
|
4136
4153
|
"width",
|
|
4137
4154
|
"height",
|
|
4138
4155
|
"fill"
|
|
4139
|
-
],
|
|
4156
|
+
], Ls = ["d"], Rs = /* @__PURE__ */ y({
|
|
4140
4157
|
__name: "SocialIconSvg",
|
|
4141
4158
|
props: {
|
|
4142
4159
|
platform: {},
|
|
@@ -4144,7 +4161,7 @@ var ws = { class: "tpl:w-full" }, Ts = {
|
|
|
4144
4161
|
iconSize: {}
|
|
4145
4162
|
},
|
|
4146
4163
|
setup(e) {
|
|
4147
|
-
let t = e, n = M(() =>
|
|
4164
|
+
let t = e, n = M(() => Ns[t.platform]), r = M(() => Ps[t.iconSize]), a = M(() => {
|
|
4148
4165
|
let e = {
|
|
4149
4166
|
display: "inline-flex",
|
|
4150
4167
|
alignItems: "center",
|
|
@@ -4188,25 +4205,25 @@ var ws = { class: "tpl:w-full" }, Ts = {
|
|
|
4188
4205
|
viewBox: "0 0 24 24",
|
|
4189
4206
|
fill: s.value,
|
|
4190
4207
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4191
|
-
}, [b("path", { d: n.value.path }, null, 8,
|
|
4208
|
+
}, [b("path", { d: n.value.path }, null, 8, Ls)], 8, Is))], 4));
|
|
4192
4209
|
}
|
|
4193
|
-
}),
|
|
4210
|
+
}), zs = { class: "tpl:w-full" }, Bs = ["href"], Vs = {
|
|
4194
4211
|
key: 1,
|
|
4195
4212
|
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)]"
|
|
4196
|
-
},
|
|
4213
|
+
}, Hs = /* @__PURE__ */ y({
|
|
4197
4214
|
__name: "SocialIconsBlock",
|
|
4198
4215
|
props: {
|
|
4199
4216
|
block: {},
|
|
4200
4217
|
viewport: {}
|
|
4201
4218
|
},
|
|
4202
4219
|
setup(e) {
|
|
4203
|
-
let n = e, { t: r } =
|
|
4220
|
+
let n = e, { t: r } = Ht(), a = M(() => ({
|
|
4204
4221
|
display: "flex",
|
|
4205
4222
|
flexWrap: "wrap",
|
|
4206
4223
|
gap: `${n.block.spacing}px`,
|
|
4207
4224
|
justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
|
|
4208
4225
|
})), o = M(() => n.block.icons.length > 0);
|
|
4209
|
-
return (n, s) => (f(), x("div",
|
|
4226
|
+
return (n, s) => (f(), x("div", zs, [o.value ? (f(), x("div", {
|
|
4210
4227
|
key: 0,
|
|
4211
4228
|
style: i(a.value)
|
|
4212
4229
|
}, [(f(!0), x(j, null, t(e.block.icons, (t) => (f(), x("a", {
|
|
@@ -4214,7 +4231,7 @@ var ws = { class: "tpl:w-full" }, Ts = {
|
|
|
4214
4231
|
href: t.url || "#",
|
|
4215
4232
|
class: "tpl:cursor-default",
|
|
4216
4233
|
onClick: s[0] ||= F(() => {}, ["prevent"])
|
|
4217
|
-
}, [w(
|
|
4234
|
+
}, [w(Rs, {
|
|
4218
4235
|
platform: t.platform,
|
|
4219
4236
|
"icon-style": e.block.iconStyle,
|
|
4220
4237
|
"icon-size": e.block.iconSize
|
|
@@ -4222,44 +4239,44 @@ var ws = { class: "tpl:w-full" }, Ts = {
|
|
|
4222
4239
|
"platform",
|
|
4223
4240
|
"icon-style",
|
|
4224
4241
|
"icon-size"
|
|
4225
|
-
])], 8,
|
|
4242
|
+
])], 8, Bs))), 128))], 4)) : (f(), x("div", Vs, [w(k(sr), { size: 16 }), b("span", null, p(k(r).social.addIcons), 1)]))]));
|
|
4226
4243
|
}
|
|
4227
|
-
}),
|
|
4244
|
+
}), Us = { class: "tpl:w-full" }, Ws = {
|
|
4228
4245
|
key: 0,
|
|
4229
4246
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4230
4247
|
style: {
|
|
4231
4248
|
"background-color": "var(--tpl-bg-hover)",
|
|
4232
4249
|
color: "var(--tpl-text-dim)"
|
|
4233
4250
|
}
|
|
4234
|
-
},
|
|
4251
|
+
}, Gs = /* @__PURE__ */ y({
|
|
4235
4252
|
__name: "SpacerBlock",
|
|
4236
4253
|
props: {
|
|
4237
4254
|
block: {},
|
|
4238
4255
|
viewport: {}
|
|
4239
4256
|
},
|
|
4240
4257
|
setup(e) {
|
|
4241
|
-
let t = e, n =
|
|
4258
|
+
let t = e, n = dt(Dt, "SpacerBlock"), r = M(() => ({
|
|
4242
4259
|
height: `${t.block.height}px`,
|
|
4243
4260
|
minHeight: `${t.block.height}px`,
|
|
4244
4261
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4245
4262
|
}));
|
|
4246
|
-
return (t, a) => (f(), x("div",
|
|
4263
|
+
return (t, a) => (f(), x("div", Us, [b("div", {
|
|
4247
4264
|
style: i(r.value),
|
|
4248
4265
|
class: o(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !k(n).state.previewMode }])
|
|
4249
|
-
}, [k(n).state.previewMode ? N("", !0) : (f(), x("span",
|
|
4266
|
+
}, [k(n).state.previewMode ? N("", !0) : (f(), x("span", Ws, p(e.block.height) + "px ", 1))], 6)]));
|
|
4250
4267
|
}
|
|
4251
|
-
}),
|
|
4268
|
+
}), Ks = { class: "tpl:w-full" }, qs = { key: 0 }, Js = [
|
|
4252
4269
|
"aria-label",
|
|
4253
4270
|
"data-placeholder",
|
|
4254
4271
|
"onBlur"
|
|
4255
|
-
],
|
|
4272
|
+
], Ys = [
|
|
4256
4273
|
"aria-label",
|
|
4257
4274
|
"data-placeholder",
|
|
4258
4275
|
"onBlur"
|
|
4259
|
-
],
|
|
4276
|
+
], Xs = {
|
|
4260
4277
|
key: 1,
|
|
4261
4278
|
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)]"
|
|
4262
|
-
},
|
|
4279
|
+
}, Zs = /*#__PURE__*/ Yt(/* @__PURE__ */ y({
|
|
4263
4280
|
__name: "TableBlock",
|
|
4264
4281
|
props: {
|
|
4265
4282
|
block: {},
|
|
@@ -4273,7 +4290,7 @@ var ws = { class: "tpl:w-full" }, Ts = {
|
|
|
4273
4290
|
updated(e, t) {
|
|
4274
4291
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
4275
4292
|
}
|
|
4276
|
-
}, r = e, { t: a } =
|
|
4293
|
+
}, r = e, { t: a } = Ht(), o = dt(Dt, "TableBlock"), s = M(() => r.block.rows.length > 0), c = M(() => {
|
|
4277
4294
|
let e = {
|
|
4278
4295
|
width: "100%",
|
|
4279
4296
|
borderCollapse: "collapse",
|
|
@@ -4304,11 +4321,11 @@ var ws = { class: "tpl:w-full" }, Ts = {
|
|
|
4304
4321
|
} : n);
|
|
4305
4322
|
o.updateBlock(r.block.id, { rows: a });
|
|
4306
4323
|
}
|
|
4307
|
-
return (e, r) => (f(), x("div",
|
|
4324
|
+
return (e, r) => (f(), x("div", Ks, [s.value ? (f(), x("table", {
|
|
4308
4325
|
key: 0,
|
|
4309
4326
|
style: i(c.value),
|
|
4310
4327
|
class: "tpl-table-editable"
|
|
4311
|
-
}, [d.value ? (f(), x("thead",
|
|
4328
|
+
}, [d.value ? (f(), x("thead", qs, [b("tr", null, [(f(!0), x(j, null, t(d.value.cells, (e) => ae((f(), x("th", {
|
|
4312
4329
|
key: e.id,
|
|
4313
4330
|
style: i(u.value),
|
|
4314
4331
|
"aria-label": k(a).table.cellPlaceholder,
|
|
@@ -4317,7 +4334,7 @@ var ws = { class: "tpl:w-full" }, Ts = {
|
|
|
4317
4334
|
onBlur: (t) => g(d.value.id, e.id, t),
|
|
4318
4335
|
onKeydown: r[0] ||= se(F((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4319
4336
|
onClick: F(h, ["stop"])
|
|
4320
|
-
}, null, 44,
|
|
4337
|
+
}, null, 44, Js)), [[n, e.content]])), 128))])])) : N("", !0), b("tbody", null, [(f(!0), x(j, null, t(m.value, (e) => (f(), x("tr", { key: e.id }, [(f(!0), x(j, null, t(e.cells, (t) => ae((f(), x("td", {
|
|
4321
4338
|
key: t.id,
|
|
4322
4339
|
style: i(l.value),
|
|
4323
4340
|
"aria-label": k(a).table.cellPlaceholder,
|
|
@@ -4326,9 +4343,9 @@ var ws = { class: "tpl:w-full" }, Ts = {
|
|
|
4326
4343
|
onBlur: (n) => g(e.id, t.id, n),
|
|
4327
4344
|
onKeydown: r[1] ||= se(F((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4328
4345
|
onClick: F(h, ["stop"])
|
|
4329
|
-
}, null, 44,
|
|
4346
|
+
}, null, 44, Ys)), [[n, t.content]])), 128))]))), 128))])], 4)) : (f(), x("div", Xs, [w(k(cr), { size: 16 }), b("span", null, p(k(a).table.empty), 1)]))]));
|
|
4330
4347
|
}
|
|
4331
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
4348
|
+
}), [["__scopeId", "data-v-963ac422"]]), Qs = /* @__PURE__ */ y({
|
|
4332
4349
|
__name: "VideoPlayButton",
|
|
4333
4350
|
props: { hoverEffect: {
|
|
4334
4351
|
type: Boolean,
|
|
@@ -4346,7 +4363,7 @@ var ws = { class: "tpl:w-full" }, Ts = {
|
|
|
4346
4363
|
});
|
|
4347
4364
|
//#endregion
|
|
4348
4365
|
//#region src/utils/videoThumbnail.ts
|
|
4349
|
-
function
|
|
4366
|
+
function $s(e) {
|
|
4350
4367
|
if (!e) return {
|
|
4351
4368
|
platform: "unknown",
|
|
4352
4369
|
videoId: null,
|
|
@@ -4378,25 +4395,25 @@ function qs(e) {
|
|
|
4378
4395
|
thumbnailUrl: null
|
|
4379
4396
|
};
|
|
4380
4397
|
}
|
|
4381
|
-
function
|
|
4382
|
-
return t ||
|
|
4398
|
+
function ec(e, t) {
|
|
4399
|
+
return t || $s(e).thumbnailUrl;
|
|
4383
4400
|
}
|
|
4384
4401
|
//#endregion
|
|
4385
4402
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4386
|
-
var
|
|
4403
|
+
var tc = ["src", "alt"], nc = {
|
|
4387
4404
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4388
4405
|
style: { opacity: "0.7" }
|
|
4389
|
-
},
|
|
4406
|
+
}, rc = ["href"], ic = ["src", "alt"], ac = ["src", "alt"], oc = {
|
|
4390
4407
|
key: 3,
|
|
4391
4408
|
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)]"
|
|
4392
|
-
},
|
|
4409
|
+
}, sc = /* @__PURE__ */ y({
|
|
4393
4410
|
__name: "VideoBlock",
|
|
4394
4411
|
props: {
|
|
4395
4412
|
block: {},
|
|
4396
4413
|
viewport: {}
|
|
4397
4414
|
},
|
|
4398
4415
|
setup(e) {
|
|
4399
|
-
let t = e, { t: n } =
|
|
4416
|
+
let t = e, { t: n } = Ht(), { syntax: r } = Xt(), a = M(() => De(t.block.url, r) || De(t.block.thumbnailUrl, r)), o = yn(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), s = yn(() => a.value ? t.block.placeholderUrl : void 0), c = M(() => a.value ? null : t.block.thumbnailUrl ? o.value ?? null : ec(t.block.url)), l = M(() => ({ textAlign: t.block.align })), u = M(() => {
|
|
4400
4417
|
let e = t.block.align;
|
|
4401
4418
|
return {
|
|
4402
4419
|
maxWidth: "100%",
|
|
@@ -4405,7 +4422,7 @@ var Ys = ["src", "alt"], Xs = {
|
|
|
4405
4422
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
4406
4423
|
marginRight: e === "center" ? "auto" : void 0
|
|
4407
4424
|
};
|
|
4408
|
-
}), d = M(() =>
|
|
4425
|
+
}), d = M(() => De(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
4409
4426
|
return (t, r) => (f(), x("div", {
|
|
4410
4427
|
class: "tpl:w-full",
|
|
4411
4428
|
style: i(l.value)
|
|
@@ -4417,16 +4434,16 @@ var Ys = ["src", "alt"], Xs = {
|
|
|
4417
4434
|
class: "tpl:w-full tpl:border-0",
|
|
4418
4435
|
src: k(s),
|
|
4419
4436
|
alt: e.block.alt
|
|
4420
|
-
}, null, 8,
|
|
4437
|
+
}, null, 8, tc), w(Qs)], 4)) : a.value ? (f(), x("div", {
|
|
4421
4438
|
key: 1,
|
|
4422
4439
|
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)]",
|
|
4423
4440
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
4424
|
-
}, [w(k(
|
|
4441
|
+
}, [w(k(lr), {
|
|
4425
4442
|
size: 36,
|
|
4426
4443
|
"stroke-width": 1.5,
|
|
4427
4444
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4428
4445
|
style: { opacity: "0.5" }
|
|
4429
|
-
}), b("span",
|
|
4446
|
+
}), b("span", nc, [w(qn, { text: d.value }, null, 8, ["text"])])], 4)) : c.value ? (f(), x(j, { key: 2 }, [e.block.url ? (f(), x("a", {
|
|
4430
4447
|
key: 0,
|
|
4431
4448
|
href: e.block.url,
|
|
4432
4449
|
target: "_blank",
|
|
@@ -4438,7 +4455,7 @@ var Ys = ["src", "alt"], Xs = {
|
|
|
4438
4455
|
class: "tpl:w-full tpl:border-0",
|
|
4439
4456
|
src: c.value,
|
|
4440
4457
|
alt: e.block.alt
|
|
4441
|
-
}, null, 8,
|
|
4458
|
+
}, null, 8, ic), w(Qs, { "hover-effect": "" })], 12, rc)) : (f(), x("div", {
|
|
4442
4459
|
key: 1,
|
|
4443
4460
|
class: "tpl:relative tpl:inline-block",
|
|
4444
4461
|
style: i(u.value)
|
|
@@ -4446,48 +4463,48 @@ var Ys = ["src", "alt"], Xs = {
|
|
|
4446
4463
|
class: "tpl:w-full tpl:border-0",
|
|
4447
4464
|
src: c.value,
|
|
4448
4465
|
alt: e.block.alt
|
|
4449
|
-
}, null, 8,
|
|
4466
|
+
}, null, 8, ac), w(Qs)], 4))], 64)) : (f(), x("div", oc, [w(k(lr), {
|
|
4450
4467
|
size: 40,
|
|
4451
4468
|
"stroke-width": 1.5,
|
|
4452
4469
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4453
4470
|
}), b("span", null, p(k(n).video.addVideo), 1)]))], 4));
|
|
4454
4471
|
}
|
|
4455
|
-
}),
|
|
4456
|
-
section:
|
|
4457
|
-
title:
|
|
4458
|
-
paragraph:
|
|
4459
|
-
image:
|
|
4460
|
-
button:
|
|
4461
|
-
divider:
|
|
4462
|
-
video:
|
|
4463
|
-
social:
|
|
4464
|
-
menu:
|
|
4465
|
-
table:
|
|
4466
|
-
spacer:
|
|
4467
|
-
html:
|
|
4468
|
-
countdown: C(() => import("./CountdownBlock-
|
|
4472
|
+
}), cc = {
|
|
4473
|
+
section: Ms,
|
|
4474
|
+
title: Vi,
|
|
4475
|
+
paragraph: Si,
|
|
4476
|
+
image: li,
|
|
4477
|
+
button: Xn,
|
|
4478
|
+
divider: Ur,
|
|
4479
|
+
video: sc,
|
|
4480
|
+
social: Hs,
|
|
4481
|
+
menu: pi,
|
|
4482
|
+
table: Zs,
|
|
4483
|
+
spacer: Gs,
|
|
4484
|
+
html: Yr,
|
|
4485
|
+
countdown: C(() => import("./CountdownBlock-CN9Lc23W.js"))
|
|
4469
4486
|
};
|
|
4470
|
-
function
|
|
4471
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } =
|
|
4487
|
+
function lc(e) {
|
|
4488
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Ht(r);
|
|
4472
4489
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
4473
|
-
let { resolvedTheme: l } =
|
|
4490
|
+
let { resolvedTheme: l } = Dn(M(() => t.state.uiTheme)), d = _(n.theme ?? {}), { themeStyles: f } = kn({
|
|
4474
4491
|
themeOverrides: d,
|
|
4475
4492
|
resolvedTheme: l,
|
|
4476
4493
|
extraStyles: e.themeExtraStyles
|
|
4477
|
-
}), p =
|
|
4494
|
+
}), p = rn({
|
|
4478
4495
|
content: t.content,
|
|
4479
4496
|
setContent: (e, n) => t.setContent(e, n),
|
|
4480
4497
|
...e.historyOptions
|
|
4481
4498
|
});
|
|
4482
|
-
|
|
4483
|
-
let m =
|
|
4499
|
+
un(t, p);
|
|
4500
|
+
let m = on({
|
|
4484
4501
|
addBlock: t.addBlock,
|
|
4485
4502
|
removeBlock: t.removeBlock,
|
|
4486
4503
|
updateBlock: t.updateBlock,
|
|
4487
4504
|
selectBlock: t.selectBlock,
|
|
4488
4505
|
findBlockLocation: t.findBlockLocation,
|
|
4489
4506
|
blockDefaults: n.blockDefaults
|
|
4490
|
-
}), h =
|
|
4507
|
+
}), h = cn(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? sn({
|
|
4491
4508
|
content: t.content,
|
|
4492
4509
|
isDirty: () => t.state.isDirty,
|
|
4493
4510
|
...e.autoSaveOptions
|
|
@@ -4495,34 +4512,34 @@ function rc(e) {
|
|
|
4495
4512
|
g && (v = c(p.isNavigating, (e) => {
|
|
4496
4513
|
e ? g.pause() : g.resume();
|
|
4497
4514
|
}));
|
|
4498
|
-
let y =
|
|
4515
|
+
let y = En(t, {
|
|
4499
4516
|
t: a,
|
|
4500
4517
|
format: o
|
|
4501
|
-
}, n.customBlocks ?? []), b =
|
|
4502
|
-
if (b.allowCustomIgnored &&
|
|
4503
|
-
let e =
|
|
4504
|
-
e.length > 0 &&
|
|
4518
|
+
}, n.customBlocks ?? []), b = nt(n.colors);
|
|
4519
|
+
if (b.allowCustomIgnored && Mn.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), b.invalidPresets.length > 0 && Mn.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
|
|
4520
|
+
let e = Vn(b.presets, n.blockDefaults, n.templateDefaults);
|
|
4521
|
+
e.length > 0 && Mn.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
|
|
4505
4522
|
}
|
|
4506
|
-
let x =
|
|
4507
|
-
|
|
4523
|
+
let x = Nn();
|
|
4524
|
+
Rn(x, cc);
|
|
4508
4525
|
let S = /* @__PURE__ */ new Set();
|
|
4509
4526
|
function C(e) {
|
|
4510
4527
|
for (let t of e) {
|
|
4511
|
-
x.registerCustom(t,
|
|
4512
|
-
for (let e of
|
|
4528
|
+
x.registerCustom(t, Vr);
|
|
4529
|
+
for (let e of Un(t, b)) S.has(e.id) || (S.add(e.id), Mn.warn(e.message));
|
|
4513
4530
|
}
|
|
4514
4531
|
}
|
|
4515
4532
|
n.customBlocks?.length && C(n.customBlocks);
|
|
4516
|
-
let w =
|
|
4533
|
+
let w = _n();
|
|
4517
4534
|
if (s() && u(w.dispose), e.containerEl) {
|
|
4518
4535
|
let t = e.containerEl;
|
|
4519
|
-
|
|
4536
|
+
at(document, "pointerdown", (e) => {
|
|
4520
4537
|
let n = t.value;
|
|
4521
4538
|
n && (e.composedPath?.() ?? []).includes(n) && w.claim();
|
|
4522
4539
|
}, { capture: !0 });
|
|
4523
4540
|
}
|
|
4524
4541
|
function T(r) {
|
|
4525
|
-
w.isActive() &&
|
|
4542
|
+
w.isActive() && Gn(r, {
|
|
4526
4543
|
history: p,
|
|
4527
4544
|
selectBlock: (e) => t.selectBlock(e),
|
|
4528
4545
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -4534,21 +4551,23 @@ function rc(e) {
|
|
|
4534
4551
|
onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
|
|
4535
4552
|
});
|
|
4536
4553
|
}
|
|
4537
|
-
|
|
4554
|
+
at(document, "keydown", T);
|
|
4538
4555
|
let D = _(null);
|
|
4539
|
-
E(
|
|
4540
|
-
let O =
|
|
4541
|
-
E(
|
|
4542
|
-
let k =
|
|
4556
|
+
E(Et, e.editorRoot ?? document), E(gt, D), E(Vt, r), E(Dt, t), E(Lt, p), E(Ot, m), E(wt, h), E(xt, i), E(_t, f), E(st, l), E(St, n.blockDefaults), E(Pt, x), E(Tt, n.customBlocks ?? []), E(mt, n.paletteBlocks), E(Bt, zn(n.htmlBlockPreview)), E(jt, b), E(Ft, Pn(t.content, x));
|
|
4557
|
+
let O = ge(n.mergeTags?.syntax);
|
|
4558
|
+
E(yt, n.mergeTags?.tags ?? []), E(At, O), E(pt, n.mergeTags?.onRequest ?? null), E(ut, n.mergeTags?.autocomplete !== !1);
|
|
4559
|
+
let k = _(Ne(n.mergeTags?.tags ?? []));
|
|
4560
|
+
E(ht, k), E(lt, bn()), E(ct, n.logicTags?.tags ?? []), E(vt, n.logicTags?.pairs ?? []), E(ot, n.logicTags?.onRequest ?? null), E(Rt, xn()), E(kt, n.onRequestMedia ?? null), E(Ct, n.resolveImageUrl ? vn(n.resolveImageUrl) : null), E(Mt, n.displayConditions?.conditions ?? []), E(Nt, n.displayConditions?.allowCustom ?? !1), E(It, e.capabilities ?? {}), E(zt, y);
|
|
4561
|
+
let A = Sn(n.lint) ? null : Cn({
|
|
4543
4562
|
content: t.content,
|
|
4544
4563
|
options: n.lint ?? {},
|
|
4545
4564
|
updateBlock: t.updateBlock,
|
|
4546
4565
|
updateSettings: t.updateSettings,
|
|
4547
4566
|
removeBlock: t.removeBlock
|
|
4548
4567
|
});
|
|
4549
|
-
E(
|
|
4550
|
-
function
|
|
4551
|
-
v?.(),
|
|
4568
|
+
E(ft, A);
|
|
4569
|
+
function j() {
|
|
4570
|
+
v?.(), A?.destroy(), g?.destroy(), p.destroy();
|
|
4552
4571
|
}
|
|
4553
4572
|
return {
|
|
4554
4573
|
t: a,
|
|
@@ -4562,11 +4581,12 @@ function rc(e) {
|
|
|
4562
4581
|
themeOverrides: d,
|
|
4563
4582
|
registry: x,
|
|
4564
4583
|
keyboardReorder: y,
|
|
4565
|
-
templateLint:
|
|
4584
|
+
templateLint: A,
|
|
4566
4585
|
popoverRoot: D,
|
|
4586
|
+
mergeTagSampleMode: k,
|
|
4567
4587
|
registerCustomBlocks: C,
|
|
4568
|
-
destroy:
|
|
4588
|
+
destroy: j
|
|
4569
4589
|
};
|
|
4570
4590
|
}
|
|
4571
4591
|
//#endregion
|
|
4572
|
-
export {
|
|
4592
|
+
export { cr as A, Hn as B, Or as C, gr as D, _r as E, tr as F, ln as G, Tn as H, er as I, $t as K, $n as L, ar as M, ir as N, hr as O, rr as P, Zn as R, Ar as S, Sr as T, wn as U, Mn as V, pn as W, Zr as _, Hs as a, Vr as b, Os as c, Ti as d, Ci as f, li as g, pi as h, Gs as i, sr as j, fr as k, Vi as l, Si as m, sc as n, Fs as o, wi as p, dn as q, Zs as r, Ms as s, lc as t, zi as u, Yr as v, Cr as w, Mr as x, Ur as y, Xn as z };
|