@templatical/editor 0.19.0 → 0.21.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/README.md +1 -0
- package/dist/{AiChatSidebar-DAQTFuvi.js → AiChatSidebar-K_AehWc-.js} +9 -9
- package/dist/{AiFeatureMenu-aFSO20PR.js → AiFeatureMenu-CPdNpHpZ.js} +6 -6
- package/dist/{BlockIssueBadge-BQmq1bxn.js → BlockIssueBadge-Dmj9rVra.js} +4 -4
- package/dist/{CloudEditor-D0K-m1GA.js → CloudEditor-3a7mqMhe.js} +263 -315
- package/dist/{CollaboratorBar-CJO3l6Dt.js → CollaboratorBar-Ds0YZWzV.js} +3 -3
- package/dist/{ColorPicker-BsgpTJqK.js → ColorPicker-s9GHXjZs.js} +4 -4
- package/dist/CommentsSidebar-DvNEdugN.js +435 -0
- package/dist/{CountdownBlock-Bn5w7C-p.js → CountdownBlock-BUHYIAe9.js} +1 -1
- package/dist/{CountdownToolbar-PJI3ffi1.js → CountdownToolbar-DPRcv3Fu.js} +3 -4
- package/dist/{DesignReferenceSidebar-QfAV8XT9.js → DesignReferenceSidebar-DNmK3dxp.js} +8 -8
- package/dist/{IssuesPanel-CTjRgz8w.js → IssuesPanel-CEnEGFtd.js} +7 -7
- package/dist/{MergeTagSuggestion-DCuaSOPQ.js → MergeTagSuggestion-DMe4rqn0.js} +2 -2
- package/dist/NumberWithSuffix-CCPN_oCh.js +121 -0
- package/dist/{ParagraphEditor-Cf75UfSo.js → ParagraphEditor-CkwBirNl.js} +47 -47
- package/dist/{RichTextEditorContent-MdaLz6Q3.js → RichTextEditorContent-FbnWsh46.js} +6 -6
- package/dist/SaveBlockDialog-Cc5BSUBx.js +264 -0
- package/dist/SavedBlockPreviewCanvas-ubttfmKr.js +109 -0
- package/dist/SavedBlocksBrowserModal-LkY_U3lY.js +323 -0
- package/dist/SavedBlocksPanels-CET0zvH6.js +36 -0
- package/dist/SavedBlocksPickBar-poGS4PoI.js +52 -0
- package/dist/{SnapshotHistory-C_Y1LzAY.js → SnapshotHistory-BvF5IXn1.js} +8 -8
- package/dist/{TemplateScoringPanel-DikuKc6i.js → TemplateScoringPanel-ifGGGWs5.js} +14 -14
- package/dist/{TestEmailModal-BW8aTtzf.js → TestEmailModal-BRaM_eko.js} +4 -4
- package/dist/{TitleEditor-CCUkbRN0.js → TitleEditor-Bhgzh-iQ.js} +11 -11
- package/dist/{TplModal-DoOwUKlT.js → TplModal-BA-Zsg0O.js} +3 -3
- package/dist/{blockTypeIcons-BlPKjD7M.js → blockTypeIcons-B1-Yzp-a.js} +6 -6
- package/dist/bundle-stats.json +8 -8
- package/dist/{ca-DbWoy4rG.js → ca-BBgad6y5.js} +50 -3
- package/dist/cdn/chunks/{AiFeatureMenu-RwJiaPXZ.js → AiFeatureMenu--PdArSnv.js} +7 -7
- package/dist/cdn/chunks/{AiFeatureMenu-RwJiaPXZ.js.map → AiFeatureMenu--PdArSnv.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DM-TDKbr.js → BlockIssueBadge-DMSd0SIl.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-DM-TDKbr.js.map → BlockIssueBadge-DMSd0SIl.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-Dufl354p.js → CloudEditor-DnTfI5GU.js} +273 -325
- package/dist/cdn/chunks/CloudEditor-DnTfI5GU.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-xsU20iPl.js → CollaboratorBar-CBqd7ldq.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-xsU20iPl.js.map → CollaboratorBar-CBqd7ldq.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-y_obnw4o.js → ColorPicker-DCdWP8YB.js} +99 -99
- package/dist/cdn/chunks/ColorPicker-DCdWP8YB.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-sHsRMe1q.js → CountdownBlock-BDnWMAME.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-sHsRMe1q.js.map → CountdownBlock-BDnWMAME.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Ckc_jEi-.js → CountdownToolbar-BbLoo22S.js} +4 -5
- package/dist/cdn/chunks/{CountdownToolbar-Ckc_jEi-.js.map → CountdownToolbar-BbLoo22S.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DF5Ajuna.js → IssuesPanel-CfudrI3T.js} +7 -7
- package/dist/cdn/chunks/{IssuesPanel-DF5Ajuna.js.map → IssuesPanel-CfudrI3T.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js → MergeTagSuggestion-D7TsECll.js} +2 -2
- package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js.map → MergeTagSuggestion-D7TsECll.js.map} +1 -1
- package/dist/cdn/chunks/NumberWithSuffix-BmMx9_n_.js +123 -0
- package/dist/cdn/chunks/NumberWithSuffix-BmMx9_n_.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-BkafKSju.js → ParagraphEditor-DPCUSXpx.js} +82 -82
- package/dist/cdn/chunks/{ParagraphEditor-BkafKSju.js.map → ParagraphEditor-DPCUSXpx.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BthhzOZS.js → RichTextEditorContent-B8dOiv_D.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-BthhzOZS.js.map → RichTextEditorContent-B8dOiv_D.js.map} +1 -1
- package/dist/cdn/chunks/SaveBlockDialog-BY3SMnNV.js +259 -0
- package/dist/cdn/chunks/SaveBlockDialog-BY3SMnNV.js.map +1 -0
- package/dist/cdn/chunks/SavedBlockPreviewCanvas-LpaOcusq.js +110 -0
- package/dist/cdn/chunks/SavedBlockPreviewCanvas-LpaOcusq.js.map +1 -0
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CfIcmyzF.js +318 -0
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CfIcmyzF.js.map +1 -0
- package/dist/cdn/chunks/SavedBlocksPanels-kIowCfh_.js +38 -0
- package/dist/cdn/chunks/SavedBlocksPanels-kIowCfh_.js.map +1 -0
- package/dist/cdn/chunks/SavedBlocksPickBar-WSGe1GiZ.js +52 -0
- package/dist/cdn/chunks/SavedBlocksPickBar-WSGe1GiZ.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-DLv9cXba.js → TitleEditor-iwd-O9sO.js} +11 -11
- package/dist/cdn/chunks/{TitleEditor-DLv9cXba.js.map → TitleEditor-iwd-O9sO.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-B0uibGX7.js → blockTypeIcons-BYz0fgLz.js} +7 -7
- package/dist/cdn/chunks/{blockTypeIcons-B0uibGX7.js.map → blockTypeIcons-BYz0fgLz.js.map} +1 -1
- package/dist/cdn/chunks/{ca-DbWoy4rG.js → ca-BBgad6y5.js} +51 -4
- package/dist/cdn/chunks/ca-BBgad6y5.js.map +1 -0
- package/dist/{de-CTYXVU9v.js → cdn/chunks/de-Bw6fB5JU.js} +2 -24
- package/dist/cdn/chunks/{de-CTYXVU9v.js.map → de-Bw6fB5JU.js.map} +1 -1
- package/dist/cdn/chunks/{de-CgGOnerg.js → de-D7WbpFBR.js} +50 -3
- package/dist/cdn/chunks/de-D7WbpFBR.js.map +1 -0
- package/dist/{en-DrUV9xth.js → cdn/chunks/en-BrZ0uGK2.js} +51 -2
- package/dist/cdn/chunks/en-BrZ0uGK2.js.map +1 -0
- package/dist/{en-BtmIaJeb.js → cdn/chunks/en-DAdHJz7h.js} +2 -24
- package/dist/cdn/chunks/{en-BtmIaJeb.js.map → en-DAdHJz7h.js.map} +1 -1
- package/dist/{es-DwbKjU7q.js → cdn/chunks/es-tLSLysPs.js} +51 -2
- package/dist/cdn/chunks/es-tLSLysPs.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DLHvZ0UH.js → extensions-DeJh3E9b.js} +29 -29
- package/dist/cdn/chunks/{extensions-DLHvZ0UH.js.map → extensions-DeJh3E9b.js.map} +1 -1
- package/dist/cdn/chunks/{features-Cnfv4QAY.js → features-pLfGJWIB.js} +1802 -1603
- package/dist/cdn/chunks/features-pLfGJWIB.js.map +1 -0
- package/dist/cdn/chunks/{icons-DbcM69bb.js → icons-FLemooQz.js} +16 -16
- package/dist/cdn/chunks/{icons-DbcM69bb.js.map → icons-FLemooQz.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-DpSMwHd4.js → media-library-mCCZieYO.js} +163 -163
- package/dist/cdn/chunks/{media-library-DpSMwHd4.js.map → media-library-mCCZieYO.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +50 -3
- package/dist/cdn/chunks/pt-BR-BWFokdTU.js.map +1 -0
- package/dist/{pt-BR-B2ZvFlRL.js → cdn/chunks/pt-BR-w2sGzHNX.js} +2 -24
- package/dist/cdn/chunks/{pt-BR-B2ZvFlRL.js.map → pt-BR-w2sGzHNX.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-CIwiKF8H.js → pusher-R0v5p99W.js} +27 -22
- package/dist/cdn/chunks/pusher-R0v5p99W.js.map +1 -0
- package/dist/cdn/chunks/{quality-D9QqkRcU.js → quality-BRbHtAk1.js} +460 -460
- package/dist/cdn/chunks/{quality-D9QqkRcU.js.map → quality-BRbHtAk1.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-BsLQZNXU.js → renderer-Yg1XhsBN.js} +18 -18
- package/dist/cdn/chunks/{renderer-BsLQZNXU.js.map → renderer-Yg1XhsBN.js.map} +1 -1
- package/dist/cdn/chunks/{src-zu1ehVNN.js → src-BDJeYiVE.js} +33 -33
- package/dist/cdn/chunks/{src-zu1ehVNN.js.map → src-BDJeYiVE.js.map} +1 -1
- package/dist/cdn/chunks/{styles-Dx-jXeCd.js → styles-Bp5Jsu9J.js} +1422 -1332
- package/dist/cdn/chunks/styles-Bp5Jsu9J.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-C2indasq.js → tiptap-BMZ-OENR.js} +2012 -1863
- package/dist/cdn/chunks/tiptap-BMZ-OENR.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +123 -114
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Cg6Mc2pP.js → check-BpQDKiPz.js} +1 -1
- package/dist/{chevron-down-dClfxKrJ.js → chevron-down-j8GrdTyz.js} +1 -1
- package/dist/chevron-up-BACyVhyC.js +7 -0
- package/dist/{circle-alert-Bhzm-fNA.js → circle-alert-CgtE46ND.js} +1 -1
- package/dist/{clock-m7TwQw4b.js → clock-BzKLLW5L.js} +1 -1
- package/dist/{cloud-B-RebwxI.js → cloud-Du7mnkz2.js} +19 -47
- package/dist/{createLucideIcon-FSF4peHQ.js → createLucideIcon-JWHwTI6N.js} +2 -2
- package/dist/{cdn/chunks/de-CTYXVU9v.js → de-Bw6fB5JU.js} +0 -26
- package/dist/{de-CgGOnerg.js → de-D7WbpFBR.js} +49 -2
- package/dist/{dist-CgTKuIUN.js → dist-BEpCh2mG.js} +1158 -1125
- package/dist/{dist-Cx7IUM7J.js → dist-BgPYC_8-.js} +14 -6
- package/dist/{dist-BKKo5wPC.js → dist-BkM8A17N.js} +2 -2
- package/dist/{dist-CcX5sLpz.js → dist-BuNDAAVp.js} +361 -256
- package/dist/{dist-COSN3oDJ.js → dist-CBzCU-a-.js} +2 -2
- package/dist/{dist-YSCPD13F.js → dist-CDO52Rxy.js} +2 -2
- package/dist/{dist-Dk5AdwoQ.js → dist-CrjzhIxB.js} +2 -2
- package/dist/{dist-DXAZUjj3.js → dist-CtcgoC_R.js} +2 -2
- package/dist/{dist-D6M5FAY7.js → dist-CuXha2_7.js} +2 -2
- package/dist/dist-CweLDZrs.js +5 -0
- package/dist/dist-DOsdqAEZ.js +5 -0
- package/dist/{dist-8TKf-Jpg.js → dist-DYClLqy8.js} +6 -3
- package/dist/{cdn/chunks/en-DrUV9xth.js → en-BrZ0uGK2.js} +49 -4
- package/dist/{cdn/chunks/en-BtmIaJeb.js → en-DAdHJz7h.js} +0 -26
- package/dist/{cdn/chunks/es-DwbKjU7q.js → es-tLSLysPs.js} +49 -4
- package/dist/{extensions-BCA9pyer.js → extensions-ClY5Sh7S.js} +5 -5
- package/dist/{image-up-CDEgJqwA.js → image-up-CQdtq8ge.js} +1 -1
- package/dist/index.d.ts +81 -4
- package/dist/{info-BNP8yGsK.js → info-BUJBXoE6.js} +1 -1
- package/dist/{keys-DFaIbGR8.js → keys-CHPcp-Nz.js} +2 -2
- package/dist/{list-checks-jepi4iYr.js → list-checks-BGHaCSD5.js} +1 -1
- package/dist/{loader-circle-BT38qSm3.js → loader-circle-C-Z6kgI6.js} +1 -1
- package/dist/{message-circle-BAHcL9S-.js → message-circle-CEm5qckV.js} +1 -1
- package/dist/pencil-DdwmkKLb.js +10 -0
- package/dist/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +49 -2
- package/dist/{cdn/chunks/pt-BR-B2ZvFlRL.js → pt-BR-w2sGzHNX.js} +0 -26
- package/dist/{refresh-cw-as5Bmg4X.js → refresh-cw-maKlg0dl.js} +1 -1
- package/dist/{scan-line-IAMjPtRw.js → scan-line-BFgesTOY.js} +1 -1
- package/dist/{send-DvMay6bt.js → send-B70aQDrA.js} +1 -1
- package/dist/{shield-check-YYDhGroE.js → shield-check-B7x5OKt5.js} +1 -1
- package/dist/{sparkles-CCwQMMMZ.js → sparkles-DVlm1Ipp.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-64uLkPJV.js → styles-DIDAJdkj.js} +1241 -1151
- package/dist/templatical-editor.js +134 -125
- package/dist/{text-align-start-BwsA6QzC.js → text-align-start-Vay3Kvo2.js} +1 -1
- package/dist/{trash-2-CRBDolnR.js → trash-2-DE8CmxAG.js} +1 -1
- package/dist/{triangle-alert-B2g0ALvq.js → triangle-alert-Djg6IG8N.js} +1 -1
- package/dist/{upload-y4gxiFp5.js → upload-BwwE0U6G.js} +1 -1
- package/dist/{useCloudI18n-PCDOC2kz.js → useCloudI18n-BmiygEM4.js} +1 -1
- package/dist/{useEditorCore-ea9OrrH3.js → useEditorCore-Bd9CA4L_.js} +1236 -1013
- package/dist/{useI18n-BNMzZTM5.js → useI18n-D2L9Mkik.js} +1 -1
- package/dist/{useMergeTag-DfEY0eK5.js → useMergeTag-BTdDq5DC.js} +1 -1
- package/dist/{usePopoverPosition-F9STHRIr.js → usePopoverPosition-BO2LNy5n.js} +1 -1
- package/dist/{x-Ctg_250T.js → x-CkD6A1iB.js} +1 -1
- package/package.json +23 -23
- package/dist/CommentsSidebar-BYMVucZh.js +0 -442
- package/dist/ModuleBrowserModal-BNalLx0k.js +0 -202
- package/dist/ModulePreviewCanvas-BwObwisa.js +0 -106
- package/dist/NumberWithSuffix-D3BKz66W.js +0 -89
- package/dist/SaveModuleDialog-MTjwiF9D.js +0 -125
- package/dist/ToggleSwitch-DUNuUPsZ.js +0 -37
- package/dist/cdn/chunks/CloudEditor-Dufl354p.js.map +0 -1
- package/dist/cdn/chunks/ColorPicker-y_obnw4o.js.map +0 -1
- package/dist/cdn/chunks/ModuleBrowserModal-DG4AVFjH.js +0 -198
- package/dist/cdn/chunks/ModuleBrowserModal-DG4AVFjH.js.map +0 -1
- package/dist/cdn/chunks/ModulePreviewCanvas-Bc_PcJuc.js +0 -107
- package/dist/cdn/chunks/ModulePreviewCanvas-Bc_PcJuc.js.map +0 -1
- package/dist/cdn/chunks/NumberWithSuffix-8fOO-LC_.js +0 -91
- package/dist/cdn/chunks/NumberWithSuffix-8fOO-LC_.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-DhsfYf2n.js +0 -120
- package/dist/cdn/chunks/SaveModuleDialog-DhsfYf2n.js.map +0 -1
- package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js +0 -39
- package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js.map +0 -1
- package/dist/cdn/chunks/ca-DbWoy4rG.js.map +0 -1
- package/dist/cdn/chunks/de-CgGOnerg.js.map +0 -1
- package/dist/cdn/chunks/en-DrUV9xth.js.map +0 -1
- package/dist/cdn/chunks/es-DwbKjU7q.js.map +0 -1
- package/dist/cdn/chunks/features-Cnfv4QAY.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-Bcc5Tjed.js.map +0 -1
- package/dist/cdn/chunks/pusher-CIwiKF8H.js.map +0 -1
- package/dist/cdn/chunks/styles-Dx-jXeCd.js.map +0 -1
- package/dist/cdn/chunks/tiptap-C2indasq.js.map +0 -1
- package/dist/dist-BDVm2MrW.js +0 -5
- package/dist/dist-DbekZDmJ.js +0 -5
|
@@ -1,27 +1,27 @@
|
|
|
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
|
|
2
|
-
import { c as
|
|
3
|
-
import { t as
|
|
4
|
-
import { A as
|
|
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
|
+
import { c as F, o as oe, s as se } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
|
+
import { t as ce } from "./upload-BwwE0U6G.js";
|
|
4
|
+
import { A as le, C as ue, D as de, E as fe, F as pe, I as me, M as he, N as ge, P as _e, S as ve, T as ye, _ as be, a as xe, b as Se, c as Ce, d as we, f as Te, g as Ee, h as De, i as Oe, j as ke, k as Ae, l as je, m as Me, n as Ne, o as Pe, p as Fe, r as Ie, t as Le, u as Re, v as ze, w as Be, x as Ve, y as He } from "./dist-BJbqgyPn.js";
|
|
5
5
|
import { f as Ue, g as We, h as Ge, m as Ke } from "./dist-DYv_Pttj.js";
|
|
6
|
-
import {
|
|
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
|
|
6
|
+
import { a as qe, c as Je, d as Ye, i as Xe, l as Ze, o as Qe, r as $e, t as et, u as tt } from "./usePopoverPosition-BO2LNy5n.js";
|
|
7
|
+
import { A as nt, B as rt, C as it, D as at, E as ot, I as st, L as ct, M as lt, N as ut, O as dt, R as ft, S as pt, T as mt, _ as ht, a as gt, b as _t, d as vt, f as yt, g as bt, h as xt, i as St, j as Ct, k as wt, l as Tt, m as Et, n as Dt, o as Ot, p as kt, s as At, v as jt, w as Mt, x as Nt, y as Pt, z as Ft } from "./keys-CHPcp-Nz.js";
|
|
8
|
+
import { t as It } from "./useI18n-D2L9Mkik.js";
|
|
9
|
+
import { t as I } from "./createLucideIcon-JWHwTI6N.js";
|
|
10
|
+
import { t as Lt } from "./loader-circle-C-Z6kgI6.js";
|
|
11
|
+
import { t as Rt } from "./message-circle-CEm5qckV.js";
|
|
12
|
+
import { t as zt } from "./trash-2-DE8CmxAG.js";
|
|
13
|
+
import { t as Bt } from "./triangle-alert-Djg6IG8N.js";
|
|
14
|
+
import { t as Vt } from "./LoadingTrack-KIcREPlS.js";
|
|
15
|
+
import { t as Ht } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
16
|
+
import "./useCloudI18n-BmiygEM4.js";
|
|
17
|
+
import { t as Ut } from "./useMergeTag-BTdDq5DC.js";
|
|
18
|
+
import { t as Wt } from "./useAliveFlag-C43EhZFY.js";
|
|
19
19
|
//#region ../core/dist/index.js
|
|
20
|
-
function
|
|
20
|
+
function Gt(e) {
|
|
21
21
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
let t =
|
|
23
|
+
function Kt(e) {
|
|
24
|
+
let t = A({
|
|
25
25
|
content: e.content ?? Fe(e.defaultFontFamily, e.templateDefaults),
|
|
26
26
|
selectedBlockId: null,
|
|
27
27
|
viewport: "desktop",
|
|
@@ -111,7 +111,7 @@ function Gt(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 >= Gt(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 Gt(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 >= Gt(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 Gt(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 qt = 50, Jt = 300, Yt = 1500;
|
|
177
|
+
function Xt(e) {
|
|
178
|
+
let { content: t, setContent: r, isRemoteOperation: i, maxSize: a = qt } = 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 me(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 Yt(e) {
|
|
|
193
193
|
if (u && u.blockId === e) {
|
|
194
194
|
clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
|
|
195
195
|
u = null;
|
|
196
|
-
},
|
|
196
|
+
}, Jt);
|
|
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
|
+
}, Jt)
|
|
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
|
+
}, Yt);
|
|
211
211
|
}
|
|
212
212
|
function b() {
|
|
213
213
|
if (o.value.length === 0) return;
|
|
@@ -239,33 +239,33 @@ function Yt(e) {
|
|
|
239
239
|
destroy: C
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Zt(e) {
|
|
243
243
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
244
244
|
...e,
|
|
245
|
-
id:
|
|
245
|
+
id: ye(),
|
|
246
246
|
cells: e.cells.map((e) => ({
|
|
247
247
|
...e,
|
|
248
|
-
id:
|
|
248
|
+
id: ye()
|
|
249
249
|
}))
|
|
250
250
|
})) : e.type === "social" ? e.icons = e.icons.map((e) => ({
|
|
251
251
|
...e,
|
|
252
|
-
id:
|
|
252
|
+
id: ye()
|
|
253
253
|
})) : e.type === "menu" && (e.items = e.items.map((e) => ({
|
|
254
254
|
...e,
|
|
255
|
-
id:
|
|
255
|
+
id: ye()
|
|
256
256
|
})));
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function Qt(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 = je(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 = ye(), Zt(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 = ye(), Zt(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 Zt(e) {
|
|
|
286
286
|
updateBlockProperty: l
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function $t(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;
|
|
@@ -308,7 +308,7 @@ function Qt(e) {
|
|
|
308
308
|
o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
|
|
309
309
|
}, i));
|
|
310
310
|
}
|
|
311
|
-
let m =
|
|
311
|
+
let m = ee(t, () => {
|
|
312
312
|
c() && !s && n() && p();
|
|
313
313
|
}, { deep: !0 });
|
|
314
314
|
function h() {
|
|
@@ -322,8 +322,8 @@ function Qt(e) {
|
|
|
322
322
|
destroy: h
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
function
|
|
326
|
-
let t =
|
|
325
|
+
function en(e) {
|
|
326
|
+
let t = A(/* @__PURE__ */ new Set()), r = n(() => t.size > 0);
|
|
327
327
|
function i(e) {
|
|
328
328
|
return t.has(e);
|
|
329
329
|
}
|
|
@@ -340,7 +340,7 @@ function $t(e) {
|
|
|
340
340
|
hasHiddenBlocks: r
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function tn(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 en(e) {
|
|
|
370
370
|
needsFetch: a
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function nn(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,29 +384,165 @@ function tn(e, t) {
|
|
|
384
384
|
t.record(), o(e);
|
|
385
385
|
};
|
|
386
386
|
}
|
|
387
|
+
function rn(e) {
|
|
388
|
+
let { provider: t } = e, n = _([]), r = _(!1), i = M(() => {
|
|
389
|
+
let e = /* @__PURE__ */ new Set();
|
|
390
|
+
for (let t of n.value) {
|
|
391
|
+
let n = t.category?.trim();
|
|
392
|
+
n && e.add(n);
|
|
393
|
+
}
|
|
394
|
+
return [...e].sort((e, t) => e.localeCompare(t));
|
|
395
|
+
}), a = M(() => typeof t.create == "function"), o = M(() => typeof t.update == "function"), s = M(() => typeof t.delete == "function");
|
|
396
|
+
function c(e) {
|
|
397
|
+
return o.value && e.canUpdate !== !1;
|
|
398
|
+
}
|
|
399
|
+
function l(e) {
|
|
400
|
+
return s.value && e.canDelete !== !1;
|
|
401
|
+
}
|
|
402
|
+
function u(e, t) {
|
|
403
|
+
throw new Pe(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
|
|
404
|
+
}
|
|
405
|
+
async function d(i) {
|
|
406
|
+
r.value = !0;
|
|
407
|
+
try {
|
|
408
|
+
n.value = await t.list(i);
|
|
409
|
+
} catch (t) {
|
|
410
|
+
throw e.onError?.(t), t;
|
|
411
|
+
} finally {
|
|
412
|
+
r.value = !1;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
async function f(r, i, a) {
|
|
416
|
+
let { create: o } = t;
|
|
417
|
+
typeof o != "function" && u("create", "disabled by the provider");
|
|
418
|
+
try {
|
|
419
|
+
let e = await o(a ? {
|
|
420
|
+
name: r,
|
|
421
|
+
content: i,
|
|
422
|
+
category: a
|
|
423
|
+
} : {
|
|
424
|
+
name: r,
|
|
425
|
+
content: i
|
|
426
|
+
});
|
|
427
|
+
return n.value = [e, ...n.value], e;
|
|
428
|
+
} catch (t) {
|
|
429
|
+
throw e.onError?.(t), t;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
async function p(r, i) {
|
|
433
|
+
let { update: a } = t;
|
|
434
|
+
typeof a != "function" && u("update", "disabled by the provider");
|
|
435
|
+
let o = n.value.find((e) => e.id === r);
|
|
436
|
+
o && o.canUpdate === !1 && u("update", `not permitted for entry "${r}"`);
|
|
437
|
+
try {
|
|
438
|
+
let e = await a(r, i);
|
|
439
|
+
return n.value = n.value.map((t) => t.id === r ? e : t), e;
|
|
440
|
+
} catch (t) {
|
|
441
|
+
throw e.onError?.(t), t;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
async function m(r) {
|
|
445
|
+
let { delete: i } = t;
|
|
446
|
+
typeof i != "function" && u("delete", "disabled by the provider");
|
|
447
|
+
let a = n.value.find((e) => e.id === r);
|
|
448
|
+
a && a.canDelete === !1 && u("delete", `not permitted for entry "${r}"`);
|
|
449
|
+
try {
|
|
450
|
+
await i(r), n.value = n.value.filter((e) => e.id !== r);
|
|
451
|
+
} catch (t) {
|
|
452
|
+
throw e.onError?.(t), t;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
return {
|
|
456
|
+
savedBlocks: n,
|
|
457
|
+
isLoading: r,
|
|
458
|
+
categories: i,
|
|
459
|
+
canCreate: a,
|
|
460
|
+
canUpdate: o,
|
|
461
|
+
canDelete: s,
|
|
462
|
+
canUpdateBlock: c,
|
|
463
|
+
canDeleteBlock: l,
|
|
464
|
+
load: d,
|
|
465
|
+
create: f,
|
|
466
|
+
update: p,
|
|
467
|
+
remove: m
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
var an = "templatical:saved-blocks";
|
|
471
|
+
function on(e = {}) {
|
|
472
|
+
let t = e.key ?? an;
|
|
473
|
+
function n() {
|
|
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
|
+
return localStorage;
|
|
476
|
+
}
|
|
477
|
+
function r() {
|
|
478
|
+
let e = n().getItem(t);
|
|
479
|
+
if (!e) return [];
|
|
480
|
+
try {
|
|
481
|
+
let t = JSON.parse(e);
|
|
482
|
+
return Array.isArray(t) ? t : [];
|
|
483
|
+
} catch {
|
|
484
|
+
return [];
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
function i(e) {
|
|
488
|
+
n().setItem(t, JSON.stringify(e));
|
|
489
|
+
}
|
|
490
|
+
return {
|
|
491
|
+
async list(e) {
|
|
492
|
+
let t = r(), n = e?.search?.trim().toLowerCase(), i = e?.category?.trim();
|
|
493
|
+
return t.filter((e) => !(n && !e.name.toLowerCase().includes(n) || i && e.category !== i));
|
|
494
|
+
},
|
|
495
|
+
async create(e) {
|
|
496
|
+
let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
|
|
497
|
+
id: ye(),
|
|
498
|
+
name: e.name,
|
|
499
|
+
content: e.content,
|
|
500
|
+
...e.category ? { category: e.category } : {},
|
|
501
|
+
createdAt: t,
|
|
502
|
+
updatedAt: t
|
|
503
|
+
};
|
|
504
|
+
return i([n, ...r()]), n;
|
|
505
|
+
},
|
|
506
|
+
async update(e, t) {
|
|
507
|
+
let n = r(), a = n.findIndex((t) => t.id === e);
|
|
508
|
+
if (a === -1) throw Error(`[Templatical] Saved block not found: ${e}`);
|
|
509
|
+
let o = {
|
|
510
|
+
...n[a],
|
|
511
|
+
...t,
|
|
512
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
513
|
+
}, s = [...n];
|
|
514
|
+
return s[a] = o, i(s), o;
|
|
515
|
+
},
|
|
516
|
+
async delete(e) {
|
|
517
|
+
let t = r();
|
|
518
|
+
if (!t.some((t) => t.id === e)) throw Error(`[Templatical] Saved block not found: ${e}`);
|
|
519
|
+
i(t.filter((t) => t.id !== e));
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
}
|
|
387
523
|
//#endregion
|
|
388
524
|
//#region src/utils/activeEditorTracker.ts
|
|
389
|
-
var
|
|
390
|
-
function
|
|
391
|
-
let e = ++
|
|
392
|
-
return
|
|
525
|
+
var sn = /* @__PURE__ */ new Set(), cn = 0, ln = 0;
|
|
526
|
+
function un() {
|
|
527
|
+
let e = ++ln;
|
|
528
|
+
return sn.add(e), cn === 0 && (cn = e), {
|
|
393
529
|
id: e,
|
|
394
|
-
isActive: () =>
|
|
530
|
+
isActive: () => sn.size <= 1 || cn === e,
|
|
395
531
|
claim: () => {
|
|
396
|
-
|
|
532
|
+
cn = e;
|
|
397
533
|
},
|
|
398
534
|
dispose: () => {
|
|
399
|
-
if (
|
|
400
|
-
let e = Array.from(
|
|
401
|
-
|
|
535
|
+
if (sn.delete(e), cn === e) {
|
|
536
|
+
let e = Array.from(sn);
|
|
537
|
+
cn = e[e.length - 1] ?? 0;
|
|
402
538
|
}
|
|
403
539
|
}
|
|
404
540
|
};
|
|
405
541
|
}
|
|
406
542
|
//#endregion
|
|
407
543
|
//#region src/composables/useImageUrlResolver.ts
|
|
408
|
-
function
|
|
409
|
-
let t =
|
|
544
|
+
function dn(e) {
|
|
545
|
+
let t = A(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
410
546
|
function r(e) {
|
|
411
547
|
return t.get(e);
|
|
412
548
|
}
|
|
@@ -438,8 +574,8 @@ function sn(e) {
|
|
|
438
574
|
lookup: a
|
|
439
575
|
};
|
|
440
576
|
}
|
|
441
|
-
function
|
|
442
|
-
let t =
|
|
577
|
+
function fn(e) {
|
|
578
|
+
let t = P(_t, null), n = M(e);
|
|
443
579
|
if (!t) return n;
|
|
444
580
|
let r;
|
|
445
581
|
function i() {
|
|
@@ -459,7 +595,7 @@ function cn(e) {
|
|
|
459
595
|
r = void 0, t.lookup(e);
|
|
460
596
|
}, 300);
|
|
461
597
|
}
|
|
462
|
-
}, { immediate: !0 }),
|
|
598
|
+
}, { immediate: !0 }), M(() => {
|
|
463
599
|
let e = n.value;
|
|
464
600
|
if (!e) return e;
|
|
465
601
|
let r = t.get(e);
|
|
@@ -468,7 +604,7 @@ function cn(e) {
|
|
|
468
604
|
}
|
|
469
605
|
//#endregion
|
|
470
606
|
//#region src/composables/useMergeTagPicker.ts
|
|
471
|
-
function
|
|
607
|
+
function pn() {
|
|
472
608
|
let e = _(!1), t = _([]), n = null;
|
|
473
609
|
function r(r) {
|
|
474
610
|
if (n) {
|
|
@@ -498,7 +634,7 @@ function ln() {
|
|
|
498
634
|
}
|
|
499
635
|
//#endregion
|
|
500
636
|
//#region src/composables/useLogicTagPicker.ts
|
|
501
|
-
function
|
|
637
|
+
function mn() {
|
|
502
638
|
let e = _(!1), t = _([]), n = _([]), r = null;
|
|
503
639
|
function i(i, a) {
|
|
504
640
|
if (r) {
|
|
@@ -529,11 +665,11 @@ function un() {
|
|
|
529
665
|
}
|
|
530
666
|
//#endregion
|
|
531
667
|
//#region src/composables/useTemplateLint.ts
|
|
532
|
-
function
|
|
668
|
+
function hn(e) {
|
|
533
669
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
534
670
|
}
|
|
535
|
-
function
|
|
536
|
-
let t = _([]), n = _(!1), r = _(!1), i = v(null), a =
|
|
671
|
+
function gn(e) {
|
|
672
|
+
let t = _([]), n = _(!1), r = _(!1), i = v(null), a = hn(e.options), o = null, s = !1;
|
|
537
673
|
a || l();
|
|
538
674
|
async function l() {
|
|
539
675
|
try {
|
|
@@ -574,14 +710,19 @@ function fn(e) {
|
|
|
574
710
|
}
|
|
575
711
|
//#endregion
|
|
576
712
|
//#region src/utils/blockTypeLabels.ts
|
|
577
|
-
function
|
|
713
|
+
function _n(e, t) {
|
|
578
714
|
return t.blocks[e] ?? e;
|
|
579
715
|
}
|
|
716
|
+
function vn(e, t, n = []) {
|
|
717
|
+
if (e.type !== "custom") return _n(e.type, t);
|
|
718
|
+
let { customType: r } = e;
|
|
719
|
+
return n.find((e) => e.type === r)?.name ?? r;
|
|
720
|
+
}
|
|
580
721
|
//#endregion
|
|
581
722
|
//#region src/composables/useKeyboardReorder.ts
|
|
582
|
-
function
|
|
583
|
-
let
|
|
584
|
-
function
|
|
723
|
+
function yn(e, t, n = []) {
|
|
724
|
+
let r = _(null), i = _(""), a = null;
|
|
725
|
+
function o(t) {
|
|
585
726
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
586
727
|
if (r !== -1) return {
|
|
587
728
|
index: r,
|
|
@@ -602,86 +743,86 @@ function mn(e, t) {
|
|
|
602
743
|
}
|
|
603
744
|
return null;
|
|
604
745
|
}
|
|
605
|
-
function
|
|
606
|
-
let
|
|
607
|
-
if (!
|
|
608
|
-
let
|
|
609
|
-
return
|
|
746
|
+
function s(r) {
|
|
747
|
+
let i = o(r);
|
|
748
|
+
if (!i) return "";
|
|
749
|
+
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
750
|
+
return a ? vn(a, t.t, n) : "";
|
|
610
751
|
}
|
|
611
|
-
function
|
|
752
|
+
function c(t, n) {
|
|
612
753
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
613
754
|
}
|
|
614
|
-
function c(e) {
|
|
615
|
-
r.value = "", queueMicrotask(() => {
|
|
616
|
-
r.value = e;
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
755
|
function l(e) {
|
|
620
|
-
|
|
756
|
+
i.value = "", queueMicrotask(() => {
|
|
757
|
+
i.value = e;
|
|
758
|
+
});
|
|
621
759
|
}
|
|
622
760
|
function u(e) {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
761
|
+
return r.value === e;
|
|
762
|
+
}
|
|
763
|
+
function d(e) {
|
|
764
|
+
let n = o(e);
|
|
765
|
+
n && (r.value = e, a = n, l(t.format(t.t.blockActions.lifted, {
|
|
766
|
+
block: s(e),
|
|
767
|
+
position: String(n.index + 1),
|
|
768
|
+
total: String(n.total)
|
|
628
769
|
})));
|
|
629
770
|
}
|
|
630
|
-
function
|
|
631
|
-
let i =
|
|
771
|
+
function f(n, r) {
|
|
772
|
+
let i = o(n);
|
|
632
773
|
if (!i) return;
|
|
633
|
-
let
|
|
634
|
-
|
|
635
|
-
block:
|
|
636
|
-
position: String(
|
|
774
|
+
let a = i.index + r;
|
|
775
|
+
a < 0 || a >= i.total || (e.moveBlock(n, a, i.sectionId, i.columnIndex), l(t.format(t.t.blockActions.moved, {
|
|
776
|
+
block: s(n),
|
|
777
|
+
position: String(a + 1),
|
|
637
778
|
total: String(i.total)
|
|
638
779
|
})));
|
|
639
780
|
}
|
|
640
|
-
function f(e) {
|
|
641
|
-
d(e, -1);
|
|
642
|
-
}
|
|
643
781
|
function p(e) {
|
|
644
|
-
|
|
782
|
+
f(e, -1);
|
|
645
783
|
}
|
|
646
784
|
function m(e) {
|
|
647
|
-
|
|
648
|
-
r && c(t.format(t.t.blockActions.dropped, {
|
|
649
|
-
block: o(e),
|
|
650
|
-
position: String(r.index + 1),
|
|
651
|
-
total: String(r.total)
|
|
652
|
-
})), n.value = null, i = null;
|
|
785
|
+
f(e, 1);
|
|
653
786
|
}
|
|
654
|
-
function h() {
|
|
655
|
-
let
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
787
|
+
function h(e) {
|
|
788
|
+
let n = o(e);
|
|
789
|
+
n && l(t.format(t.t.blockActions.dropped, {
|
|
790
|
+
block: s(e),
|
|
791
|
+
position: String(n.index + 1),
|
|
792
|
+
total: String(n.total)
|
|
793
|
+
})), r.value = null, a = null;
|
|
794
|
+
}
|
|
795
|
+
function g() {
|
|
796
|
+
let n = r.value;
|
|
797
|
+
if (n && a) {
|
|
798
|
+
let r = o(n), i = !!r && (r.sectionId !== a.sectionId || r.columnIndex !== a.columnIndex), c = !!r && r.index !== a.index;
|
|
799
|
+
r && (i || c) && e.moveBlock(n, a.index, a.sectionId, a.columnIndex), l(t.format(t.t.blockActions.cancelled, {
|
|
800
|
+
block: s(n),
|
|
801
|
+
position: String(a.index + 1)
|
|
661
802
|
}));
|
|
662
803
|
}
|
|
663
|
-
|
|
804
|
+
r.value = null, a = null;
|
|
664
805
|
}
|
|
665
806
|
return {
|
|
666
|
-
liftedBlockId:
|
|
667
|
-
announcement:
|
|
668
|
-
isLifted:
|
|
669
|
-
lift:
|
|
670
|
-
cancel:
|
|
671
|
-
moveUp:
|
|
672
|
-
moveDown:
|
|
673
|
-
drop:
|
|
807
|
+
liftedBlockId: r,
|
|
808
|
+
announcement: i,
|
|
809
|
+
isLifted: u,
|
|
810
|
+
lift: d,
|
|
811
|
+
cancel: g,
|
|
812
|
+
moveUp: p,
|
|
813
|
+
moveDown: m,
|
|
814
|
+
drop: h
|
|
674
815
|
};
|
|
675
816
|
}
|
|
676
817
|
//#endregion
|
|
677
818
|
//#region src/composables/useUiTheme.ts
|
|
678
|
-
function
|
|
679
|
-
let t =
|
|
680
|
-
return { resolvedTheme:
|
|
819
|
+
function bn(e) {
|
|
820
|
+
let t = Ye("(prefers-color-scheme: dark)");
|
|
821
|
+
return { resolvedTheme: M(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
681
822
|
}
|
|
682
823
|
//#endregion
|
|
683
824
|
//#region src/composables/useThemeStyles.ts
|
|
684
|
-
var
|
|
825
|
+
var xn = {
|
|
685
826
|
bg: "--tpl-bg",
|
|
686
827
|
bgElevated: "--tpl-bg-elevated",
|
|
687
828
|
bgHover: "--tpl-bg-hover",
|
|
@@ -705,10 +846,10 @@ var gn = {
|
|
|
705
846
|
dangerLight: "--tpl-danger-light",
|
|
706
847
|
canvasBg: "--tpl-canvas-bg"
|
|
707
848
|
};
|
|
708
|
-
function
|
|
709
|
-
return { themeStyles:
|
|
849
|
+
function Sn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
850
|
+
return { themeStyles: M(() => {
|
|
710
851
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
711
|
-
if (a) for (let [e, t] of Object.entries(
|
|
852
|
+
if (a) for (let [e, t] of Object.entries(xn)) {
|
|
712
853
|
let n = a[e];
|
|
713
854
|
n && (r[t] = n);
|
|
714
855
|
}
|
|
@@ -717,38 +858,38 @@ function _n({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
717
858
|
}
|
|
718
859
|
//#endregion
|
|
719
860
|
//#region src/utils/logger.ts
|
|
720
|
-
var
|
|
721
|
-
function
|
|
861
|
+
var Cn = "[Templatical]";
|
|
862
|
+
function wn() {
|
|
722
863
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
723
864
|
}
|
|
724
|
-
var
|
|
865
|
+
var Tn = {
|
|
725
866
|
warn(...e) {
|
|
726
|
-
console.warn(
|
|
867
|
+
console.warn(Cn, ...e);
|
|
727
868
|
},
|
|
728
869
|
error(...e) {
|
|
729
|
-
console.error(
|
|
870
|
+
console.error(Cn, ...e);
|
|
730
871
|
},
|
|
731
872
|
debug(...e) {
|
|
732
|
-
|
|
873
|
+
wn() || console.debug(Cn, ...e);
|
|
733
874
|
},
|
|
734
875
|
info(...e) {
|
|
735
|
-
|
|
876
|
+
wn() || console.info(Cn, ...e);
|
|
736
877
|
}
|
|
737
878
|
};
|
|
738
879
|
//#endregion
|
|
739
880
|
//#region src/composables/useBlockRegistry.ts
|
|
740
|
-
function
|
|
881
|
+
function En() {
|
|
741
882
|
let e = v(/* @__PURE__ */ new Map());
|
|
742
883
|
function t(t, n) {
|
|
743
|
-
e.value.set(t, n),
|
|
884
|
+
e.value.set(t, n), te(e);
|
|
744
885
|
}
|
|
745
886
|
function n(t, n) {
|
|
746
887
|
let r = `custom:${t.type}`, i = {
|
|
747
888
|
component: n,
|
|
748
|
-
createBlock: () =>
|
|
889
|
+
createBlock: () => Te(t),
|
|
749
890
|
definition: t
|
|
750
891
|
};
|
|
751
|
-
e.value.set(r, i),
|
|
892
|
+
e.value.set(r, i), te(e);
|
|
752
893
|
}
|
|
753
894
|
function r(t) {
|
|
754
895
|
if (t.type === "custom") {
|
|
@@ -777,7 +918,7 @@ function xn() {
|
|
|
777
918
|
strictFilters: !1
|
|
778
919
|
}).parseAndRender(t.template, e.fieldValues);
|
|
779
920
|
} catch (t) {
|
|
780
|
-
return
|
|
921
|
+
return Tn.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
781
922
|
}
|
|
782
923
|
}
|
|
783
924
|
function c(t) {
|
|
@@ -795,9 +936,9 @@ function xn() {
|
|
|
795
936
|
}
|
|
796
937
|
//#endregion
|
|
797
938
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
798
|
-
function
|
|
799
|
-
return
|
|
800
|
-
let n =
|
|
939
|
+
function Dn(e, t) {
|
|
940
|
+
return M(() => {
|
|
941
|
+
let n = On(e.value.blocks);
|
|
801
942
|
if (n.size === 0) return [];
|
|
802
943
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
803
944
|
for (let e of n) {
|
|
@@ -809,33 +950,33 @@ function Sn(e, t) {
|
|
|
809
950
|
return i;
|
|
810
951
|
});
|
|
811
952
|
}
|
|
812
|
-
function
|
|
953
|
+
function On(e) {
|
|
813
954
|
let t = /* @__PURE__ */ new Set();
|
|
814
|
-
return
|
|
955
|
+
return kn(e, t), t;
|
|
815
956
|
}
|
|
816
|
-
function
|
|
957
|
+
function kn(e, t) {
|
|
817
958
|
for (let n of e) {
|
|
818
|
-
if (
|
|
959
|
+
if (le(n)) {
|
|
819
960
|
t.add(n.customType);
|
|
820
961
|
continue;
|
|
821
962
|
}
|
|
822
963
|
if (n.type === "section") {
|
|
823
964
|
let e = n.children;
|
|
824
965
|
if (!e) continue;
|
|
825
|
-
for (let n of e)
|
|
966
|
+
for (let n of e) kn(n, t);
|
|
826
967
|
}
|
|
827
968
|
}
|
|
828
969
|
}
|
|
829
970
|
//#endregion
|
|
830
971
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
831
|
-
var
|
|
972
|
+
var An = [
|
|
832
973
|
{
|
|
833
974
|
type: "section",
|
|
834
975
|
createBlock: He
|
|
835
976
|
},
|
|
836
977
|
{
|
|
837
978
|
type: "title",
|
|
838
|
-
createBlock:
|
|
979
|
+
createBlock: ue
|
|
839
980
|
},
|
|
840
981
|
{
|
|
841
982
|
type: "paragraph",
|
|
@@ -843,7 +984,7 @@ var Tn = [
|
|
|
843
984
|
},
|
|
844
985
|
{
|
|
845
986
|
type: "image",
|
|
846
|
-
createBlock:
|
|
987
|
+
createBlock: Ee
|
|
847
988
|
},
|
|
848
989
|
{
|
|
849
990
|
type: "button",
|
|
@@ -851,7 +992,7 @@ var Tn = [
|
|
|
851
992
|
},
|
|
852
993
|
{
|
|
853
994
|
type: "divider",
|
|
854
|
-
createBlock:
|
|
995
|
+
createBlock: Me
|
|
855
996
|
},
|
|
856
997
|
{
|
|
857
998
|
type: "video",
|
|
@@ -859,15 +1000,15 @@ var Tn = [
|
|
|
859
1000
|
},
|
|
860
1001
|
{
|
|
861
1002
|
type: "social",
|
|
862
|
-
createBlock:
|
|
1003
|
+
createBlock: Se
|
|
863
1004
|
},
|
|
864
1005
|
{
|
|
865
1006
|
type: "menu",
|
|
866
|
-
createBlock:
|
|
1007
|
+
createBlock: be
|
|
867
1008
|
},
|
|
868
1009
|
{
|
|
869
1010
|
type: "table",
|
|
870
|
-
createBlock:
|
|
1011
|
+
createBlock: ve
|
|
871
1012
|
},
|
|
872
1013
|
{
|
|
873
1014
|
type: "spacer",
|
|
@@ -875,15 +1016,15 @@ var Tn = [
|
|
|
875
1016
|
},
|
|
876
1017
|
{
|
|
877
1018
|
type: "html",
|
|
878
|
-
createBlock:
|
|
1019
|
+
createBlock: De
|
|
879
1020
|
},
|
|
880
1021
|
{
|
|
881
1022
|
type: "countdown",
|
|
882
|
-
createBlock:
|
|
1023
|
+
createBlock: we
|
|
883
1024
|
}
|
|
884
1025
|
];
|
|
885
|
-
function
|
|
886
|
-
for (let n of
|
|
1026
|
+
function jn(e, t) {
|
|
1027
|
+
for (let n of An) {
|
|
887
1028
|
let r = t[n.type];
|
|
888
1029
|
r && e.registerBuiltIn(n.type, {
|
|
889
1030
|
component: r,
|
|
@@ -893,33 +1034,72 @@ function En(e, t) {
|
|
|
893
1034
|
}
|
|
894
1035
|
//#endregion
|
|
895
1036
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
896
|
-
function
|
|
1037
|
+
function Mn(e) {
|
|
897
1038
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
898
1039
|
}
|
|
899
1040
|
//#endregion
|
|
900
1041
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
901
|
-
function
|
|
1042
|
+
function Nn(e) {
|
|
902
1043
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
903
1044
|
}
|
|
904
|
-
function
|
|
905
|
-
let r = new Set(e.map((e) =>
|
|
906
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1045
|
+
function Pn(e, t, n) {
|
|
1046
|
+
let r = new Set(e.map((e) => $e(e))), i = [], a = (e, t) => {
|
|
1047
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has($e(o)) && i.push(`${t}.${n}: ${o}`) : Nn(o) && a(o, `${t}.${n}`);
|
|
907
1048
|
}, o = t;
|
|
908
1049
|
for (let [e, t] of Object.entries(Le)) {
|
|
909
1050
|
let n = o?.[e];
|
|
910
1051
|
a({
|
|
911
1052
|
...t,
|
|
912
|
-
...
|
|
1053
|
+
...Nn(n) ? n : {}
|
|
913
1054
|
}, e);
|
|
914
1055
|
}
|
|
915
1056
|
return a({
|
|
916
|
-
...
|
|
1057
|
+
...Ne,
|
|
917
1058
|
...n ?? {}
|
|
918
1059
|
}, "template"), i;
|
|
919
1060
|
}
|
|
920
1061
|
//#endregion
|
|
1062
|
+
//#region src/utils/resolveFieldColors.ts
|
|
1063
|
+
function Fn(e, t) {
|
|
1064
|
+
let n = Qe({ presets: e.presets }, qe), r = n.presets.length === 0, i = e.allowCustom ?? t.allowCustom;
|
|
1065
|
+
return {
|
|
1066
|
+
presets: r ? t.presets : n.presets,
|
|
1067
|
+
allowCustom: t.allowCustom !== !1 && i,
|
|
1068
|
+
invalidPresets: n.invalidPresets,
|
|
1069
|
+
emptyPresets: e.presets !== void 0 && e.presets.length === 0,
|
|
1070
|
+
presetsInherited: r,
|
|
1071
|
+
allowCustomIgnored: e.allowCustom === !0 && t.allowCustom === !1
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
//#endregion
|
|
1075
|
+
//#region src/utils/collectColorFieldIssues.ts
|
|
1076
|
+
function In(e, t) {
|
|
1077
|
+
let n = [], r = (r, i) => {
|
|
1078
|
+
let a = Fn(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1079
|
+
if (a.invalidPresets.length > 0 && n.push({
|
|
1080
|
+
id: s("invalid-presets"),
|
|
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." : "")
|
|
1082
|
+
}), a.emptyPresets && n.push({
|
|
1083
|
+
id: s("empty-presets"),
|
|
1084
|
+
message: `${o}: presets is empty — a field palette can only narrow the editor's, so an empty list is ignored and the field inherits colors.presets.`
|
|
1085
|
+
}), a.allowCustomIgnored && n.push({
|
|
1086
|
+
id: s("allow-custom-ignored"),
|
|
1087
|
+
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1088
|
+
}), !a.allowCustom && a.presets.length > 0) {
|
|
1089
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => $e(e)));
|
|
1090
|
+
e !== "" && !t.has($e(e)) && n.push({
|
|
1091
|
+
id: s("off-palette-default"),
|
|
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
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
};
|
|
1096
|
+
for (let t of e.fields) if (t.type === "color") r(t, t.key);
|
|
1097
|
+
else if (t.type === "repeatable") for (let e of t.fields) e.type === "color" && r(e, `${t.key}[].${e.key}`);
|
|
1098
|
+
return n;
|
|
1099
|
+
}
|
|
1100
|
+
//#endregion
|
|
921
1101
|
//#region src/utils/keyboardShortcuts.ts
|
|
922
|
-
function
|
|
1102
|
+
function Ln(e) {
|
|
923
1103
|
for (let t of e.composedPath()) {
|
|
924
1104
|
if (!(t instanceof HTMLElement)) continue;
|
|
925
1105
|
if (t.isContentEditable) return !0;
|
|
@@ -928,26 +1108,40 @@ function An(e) {
|
|
|
928
1108
|
}
|
|
929
1109
|
return !1;
|
|
930
1110
|
}
|
|
931
|
-
function
|
|
1111
|
+
function Rn(e, t) {
|
|
932
1112
|
let n = e.metaKey || e.ctrlKey;
|
|
933
1113
|
if (n && e.key.toLowerCase() === "s") {
|
|
934
1114
|
e.preventDefault(), t.onSave?.();
|
|
935
1115
|
return;
|
|
936
1116
|
}
|
|
937
1117
|
if (n && e.key.toLowerCase() === "z") {
|
|
938
|
-
if (
|
|
1118
|
+
if (Ln(e)) return;
|
|
939
1119
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
940
1120
|
return;
|
|
941
1121
|
}
|
|
1122
|
+
if (t.isPicking?.() && !Ln(e)) {
|
|
1123
|
+
if (e.key === "Escape") {
|
|
1124
|
+
e.preventDefault(), t.onCancelPick?.();
|
|
1125
|
+
return;
|
|
1126
|
+
}
|
|
1127
|
+
if (e.key === "Enter") {
|
|
1128
|
+
e.preventDefault(), t.onConfirmPick?.();
|
|
1129
|
+
return;
|
|
1130
|
+
}
|
|
1131
|
+
if (e.key === "Delete" || e.key === "Backspace") {
|
|
1132
|
+
e.preventDefault();
|
|
1133
|
+
return;
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
942
1136
|
if (e.key === "Escape") {
|
|
943
1137
|
t.selectBlock(null);
|
|
944
1138
|
return;
|
|
945
1139
|
}
|
|
946
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1140
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Ln(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
947
1141
|
}
|
|
948
1142
|
//#endregion
|
|
949
1143
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
950
|
-
function
|
|
1144
|
+
function zn(e, t, n) {
|
|
951
1145
|
if (!e) return [];
|
|
952
1146
|
let r = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), i = [], a = 0, o;
|
|
953
1147
|
for (; (o = r.exec(e)) !== null;) {
|
|
@@ -956,12 +1150,12 @@ function Mn(e, t, n) {
|
|
|
956
1150
|
value: e.slice(a, o.index)
|
|
957
1151
|
});
|
|
958
1152
|
let r = o[0];
|
|
959
|
-
|
|
1153
|
+
he(r, n) ? i.push({
|
|
960
1154
|
type: "tag",
|
|
961
|
-
value:
|
|
962
|
-
}) :
|
|
1155
|
+
value: de(r, t)
|
|
1156
|
+
}) : ke(r, n) ? i.push({
|
|
963
1157
|
type: "tag",
|
|
964
|
-
value:
|
|
1158
|
+
value: fe(r, n)
|
|
965
1159
|
}) : i.push({
|
|
966
1160
|
type: "text",
|
|
967
1161
|
value: r
|
|
@@ -974,27 +1168,27 @@ function Mn(e, t, n) {
|
|
|
974
1168
|
}
|
|
975
1169
|
//#endregion
|
|
976
1170
|
//#region src/components/MergeTagPreviewText.vue
|
|
977
|
-
var
|
|
1171
|
+
var Bn = y({
|
|
978
1172
|
name: "MergeTagPreviewText",
|
|
979
1173
|
props: { text: {
|
|
980
1174
|
type: String,
|
|
981
1175
|
required: !0
|
|
982
1176
|
} },
|
|
983
1177
|
setup(e) {
|
|
984
|
-
let t =
|
|
985
|
-
return () => r.value.map((e, t) => e.type === "tag" ?
|
|
1178
|
+
let t = P(mt, []), n = P(dt, xe.liquid), r = M(() => zn(e.text, t, n));
|
|
1179
|
+
return () => r.value.map((e, t) => e.type === "tag" ? ie("span", {
|
|
986
1180
|
key: t,
|
|
987
1181
|
class: "tpl-merge-tag-label"
|
|
988
1182
|
}, e.value) : e.value);
|
|
989
1183
|
}
|
|
990
|
-
}),
|
|
1184
|
+
}), Vn = { class: "tpl:text-center" }, Hn = ["href"], Un = /* @__PURE__ */ y({
|
|
991
1185
|
__name: "ButtonBlock",
|
|
992
1186
|
props: {
|
|
993
1187
|
block: {},
|
|
994
1188
|
viewport: {}
|
|
995
1189
|
},
|
|
996
1190
|
setup(e) {
|
|
997
|
-
let t = e, n =
|
|
1191
|
+
let t = e, n = M(() => {
|
|
998
1192
|
let e = {
|
|
999
1193
|
display: "inline-block",
|
|
1000
1194
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
@@ -1008,17 +1202,17 @@ var Nn = y({
|
|
|
1008
1202
|
};
|
|
1009
1203
|
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;
|
|
1010
1204
|
});
|
|
1011
|
-
return (t, r) => (f(), x("div",
|
|
1205
|
+
return (t, r) => (f(), x("div", Vn, [b("a", {
|
|
1012
1206
|
href: e.block.url || "#",
|
|
1013
1207
|
style: i(n.value),
|
|
1014
1208
|
class: "tpl:cursor-default",
|
|
1015
|
-
onClick: r[0] ||=
|
|
1016
|
-
}, [w(
|
|
1209
|
+
onClick: r[0] ||= F(() => {}, ["prevent"])
|
|
1210
|
+
}, [w(Bn, { text: e.block.text }, null, 8, ["text"])], 12, Hn)]));
|
|
1017
1211
|
}
|
|
1018
|
-
}),
|
|
1212
|
+
}), Wn = I("bookmark", [["path", {
|
|
1019
1213
|
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",
|
|
1020
1214
|
key: "oz39mx"
|
|
1021
|
-
}]]),
|
|
1215
|
+
}]]), Gn = I("box", [
|
|
1022
1216
|
["path", {
|
|
1023
1217
|
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",
|
|
1024
1218
|
key: "hh9hay"
|
|
@@ -1031,13 +1225,13 @@ var Nn = y({
|
|
|
1031
1225
|
d: "M12 22V12",
|
|
1032
1226
|
key: "d0xqtd"
|
|
1033
1227
|
}]
|
|
1034
|
-
]),
|
|
1228
|
+
]), Kn = I("code", [["path", {
|
|
1035
1229
|
d: "m16 18 6-6-6-6",
|
|
1036
1230
|
key: "eg8j8"
|
|
1037
1231
|
}], ["path", {
|
|
1038
1232
|
d: "m8 6-6 6 6 6",
|
|
1039
1233
|
key: "ppft3o"
|
|
1040
|
-
}]]),
|
|
1234
|
+
}]]), qn = I("copy", [["rect", {
|
|
1041
1235
|
width: "14",
|
|
1042
1236
|
height: "14",
|
|
1043
1237
|
x: "8",
|
|
@@ -1048,7 +1242,7 @@ var Nn = y({
|
|
|
1048
1242
|
}], ["path", {
|
|
1049
1243
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
1050
1244
|
key: "zix9uf"
|
|
1051
|
-
}]]),
|
|
1245
|
+
}]]), Jn = I("eye-off", [
|
|
1052
1246
|
["path", {
|
|
1053
1247
|
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",
|
|
1054
1248
|
key: "ct8e1f"
|
|
@@ -1065,10 +1259,10 @@ var Nn = y({
|
|
|
1065
1259
|
d: "m2 2 20 20",
|
|
1066
1260
|
key: "1ooewy"
|
|
1067
1261
|
}]
|
|
1068
|
-
]),
|
|
1262
|
+
]), Yn = I("funnel", [["path", {
|
|
1069
1263
|
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",
|
|
1070
1264
|
key: "sc7q7i"
|
|
1071
|
-
}]]),
|
|
1265
|
+
}]]), Xn = I("grip-vertical", [
|
|
1072
1266
|
["circle", {
|
|
1073
1267
|
cx: "9",
|
|
1074
1268
|
cy: "12",
|
|
@@ -1105,7 +1299,7 @@ var Nn = y({
|
|
|
1105
1299
|
r: "1",
|
|
1106
1300
|
key: "f4zoj3"
|
|
1107
1301
|
}]
|
|
1108
|
-
]),
|
|
1302
|
+
]), Zn = I("image", [
|
|
1109
1303
|
["rect", {
|
|
1110
1304
|
width: "18",
|
|
1111
1305
|
height: "18",
|
|
@@ -1125,13 +1319,13 @@ var Nn = y({
|
|
|
1125
1319
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
1126
1320
|
key: "1xmnt7"
|
|
1127
1321
|
}]
|
|
1128
|
-
]),
|
|
1322
|
+
]), Qn = I("navigation", [["polygon", {
|
|
1129
1323
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
1130
1324
|
key: "1ltx0t"
|
|
1131
|
-
}]]),
|
|
1325
|
+
}]]), $n = I("puzzle", [["path", {
|
|
1132
1326
|
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",
|
|
1133
1327
|
key: "w46dr5"
|
|
1134
|
-
}]]),
|
|
1328
|
+
}]]), er = I("share-2", [
|
|
1135
1329
|
["circle", {
|
|
1136
1330
|
cx: "18",
|
|
1137
1331
|
cy: "5",
|
|
@@ -1164,7 +1358,7 @@ var Nn = y({
|
|
|
1164
1358
|
y2: "10.49",
|
|
1165
1359
|
key: "1n3mei"
|
|
1166
1360
|
}]
|
|
1167
|
-
]),
|
|
1361
|
+
]), tr = I("table", [
|
|
1168
1362
|
["path", {
|
|
1169
1363
|
d: "M12 3v18",
|
|
1170
1364
|
key: "108xh3"
|
|
@@ -1185,7 +1379,7 @@ var Nn = y({
|
|
|
1185
1379
|
d: "M3 15h18",
|
|
1186
1380
|
key: "5xshup"
|
|
1187
1381
|
}]
|
|
1188
|
-
]),
|
|
1382
|
+
]), nr = I("video", [["path", {
|
|
1189
1383
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1190
1384
|
key: "ftymec"
|
|
1191
1385
|
}], ["rect", {
|
|
@@ -1195,18 +1389,18 @@ var Nn = y({
|
|
|
1195
1389
|
height: "12",
|
|
1196
1390
|
rx: "2",
|
|
1197
1391
|
key: "158x01"
|
|
1198
|
-
}]]),
|
|
1392
|
+
}]]), rr = ["innerHTML"], ir = [
|
|
1199
1393
|
"src",
|
|
1200
1394
|
"width",
|
|
1201
1395
|
"height"
|
|
1202
|
-
],
|
|
1396
|
+
], ar = /* @__PURE__ */ y({
|
|
1203
1397
|
__name: "CustomBlockIcon",
|
|
1204
1398
|
props: {
|
|
1205
1399
|
icon: {},
|
|
1206
1400
|
size: {}
|
|
1207
1401
|
},
|
|
1208
1402
|
setup(e) {
|
|
1209
|
-
let t = e, n =
|
|
1403
|
+
let t = e, n = M(() => t.size ?? 20), r = M(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), a = M(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
|
|
1210
1404
|
return (t, o) => r.value ? (f(), x("span", {
|
|
1211
1405
|
key: 0,
|
|
1212
1406
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
@@ -1215,14 +1409,14 @@ var Nn = y({
|
|
|
1215
1409
|
height: `${n.value}px`
|
|
1216
1410
|
}),
|
|
1217
1411
|
innerHTML: e.icon
|
|
1218
|
-
}, null, 12,
|
|
1412
|
+
}, null, 12, rr)) : a.value ? (f(), x("img", {
|
|
1219
1413
|
key: 1,
|
|
1220
1414
|
src: e.icon,
|
|
1221
1415
|
width: n.value,
|
|
1222
1416
|
height: n.value,
|
|
1223
1417
|
class: "tpl:inline-block",
|
|
1224
1418
|
alt: ""
|
|
1225
|
-
}, null, 8,
|
|
1419
|
+
}, null, 8, ir)) : (f(), D(k(Gn), {
|
|
1226
1420
|
key: 2,
|
|
1227
1421
|
size: n.value,
|
|
1228
1422
|
"stroke-width": 1.5
|
|
@@ -1231,16 +1425,16 @@ var Nn = y({
|
|
|
1231
1425
|
});
|
|
1232
1426
|
//#endregion
|
|
1233
1427
|
//#region src/composables/useEditorRoot.ts
|
|
1234
|
-
function
|
|
1235
|
-
return
|
|
1428
|
+
function or() {
|
|
1429
|
+
return P(bt, document) ?? document;
|
|
1236
1430
|
}
|
|
1237
1431
|
//#endregion
|
|
1238
1432
|
//#region src/composables/useFocusTrap.ts
|
|
1239
|
-
var
|
|
1240
|
-
function
|
|
1241
|
-
let n =
|
|
1433
|
+
var sr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1434
|
+
function cr(e, t) {
|
|
1435
|
+
let n = or(), r = null, i = null, a = null;
|
|
1242
1436
|
function o() {
|
|
1243
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1437
|
+
return e.value ? Array.from(e.value.querySelectorAll(sr)).filter((e) => e.offsetParent !== null) : [];
|
|
1244
1438
|
}
|
|
1245
1439
|
function s(e) {
|
|
1246
1440
|
if (e.key !== "Tab") return;
|
|
@@ -1255,7 +1449,7 @@ function tr(e, t) {
|
|
|
1255
1449
|
a = null;
|
|
1256
1450
|
let t = o();
|
|
1257
1451
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1258
|
-
}), i =
|
|
1452
|
+
}), i = tt(e, "keydown", s);
|
|
1259
1453
|
}
|
|
1260
1454
|
function d(e = {}) {
|
|
1261
1455
|
let t = e.restoreFocus !== !1;
|
|
@@ -1270,7 +1464,7 @@ function tr(e, t) {
|
|
|
1270
1464
|
}
|
|
1271
1465
|
//#endregion
|
|
1272
1466
|
//#region src/composables/useEmoji.ts
|
|
1273
|
-
function
|
|
1467
|
+
function lr() {
|
|
1274
1468
|
let [e, t] = Ge(!1), n = v([]), r = !1;
|
|
1275
1469
|
u(() => {
|
|
1276
1470
|
r = !0;
|
|
@@ -1296,7 +1490,7 @@ function nr() {
|
|
|
1296
1490
|
}
|
|
1297
1491
|
//#endregion
|
|
1298
1492
|
//#region src/composables/useDragDrop.ts
|
|
1299
|
-
function
|
|
1493
|
+
function ur(e) {
|
|
1300
1494
|
let { onBlockMove: t, onBlockAdd: n } = e, r = _(!1), i = _(null), a = _(null);
|
|
1301
1495
|
function o(e) {
|
|
1302
1496
|
r.value = !0, i.value = e;
|
|
@@ -1346,7 +1540,7 @@ function rr(e) {
|
|
|
1346
1540
|
}
|
|
1347
1541
|
//#endregion
|
|
1348
1542
|
//#region src/composables/useFonts.ts
|
|
1349
|
-
var
|
|
1543
|
+
var dr = [
|
|
1350
1544
|
{
|
|
1351
1545
|
value: "Arial",
|
|
1352
1546
|
label: "Arial"
|
|
@@ -1375,7 +1569,7 @@ var ir = [
|
|
|
1375
1569
|
value: "Courier New",
|
|
1376
1570
|
label: "Courier New"
|
|
1377
1571
|
}
|
|
1378
|
-
],
|
|
1572
|
+
], fr = {
|
|
1379
1573
|
arial: "Arial, sans-serif",
|
|
1380
1574
|
helvetica: "Helvetica, sans-serif",
|
|
1381
1575
|
georgia: "Georgia, serif",
|
|
@@ -1383,27 +1577,27 @@ var ir = [
|
|
|
1383
1577
|
verdana: "Verdana, sans-serif",
|
|
1384
1578
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1385
1579
|
"courier new": "'Courier New', monospace"
|
|
1386
|
-
},
|
|
1387
|
-
function
|
|
1388
|
-
if (e === void 0 || e === !0) return [...
|
|
1580
|
+
}, pr = "Arial, sans-serif";
|
|
1581
|
+
function mr(e) {
|
|
1582
|
+
if (e === void 0 || e === !0) return [...dr];
|
|
1389
1583
|
if (e === !1) return [];
|
|
1390
1584
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1391
1585
|
for (let i of e) {
|
|
1392
|
-
let e = i.toLowerCase(), a =
|
|
1586
|
+
let e = i.toLowerCase(), a = dr.find((t) => t.value.toLowerCase() === e);
|
|
1393
1587
|
if (!a) {
|
|
1394
|
-
r.has(e) || (r.add(e),
|
|
1588
|
+
r.has(e) || (r.add(e), Tn.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${dr.map((e) => e.value).join(", ")}.`));
|
|
1395
1589
|
continue;
|
|
1396
1590
|
}
|
|
1397
1591
|
n.has(a.value) || (n.add(a.value), t.push(a));
|
|
1398
1592
|
}
|
|
1399
1593
|
return t;
|
|
1400
1594
|
}
|
|
1401
|
-
function
|
|
1402
|
-
let t = _(e?.customFonts ?? []), n = _(!0), r = _(!1), i =
|
|
1595
|
+
function hr(e) {
|
|
1596
|
+
let t = _(e?.customFonts ?? []), n = _(!0), r = _(!1), i = mr(e?.builtIns), a = M(() => e?.defaultFallback ?? pr);
|
|
1403
1597
|
function o(e) {
|
|
1404
1598
|
n.value = e;
|
|
1405
1599
|
}
|
|
1406
|
-
let c =
|
|
1600
|
+
let c = M(() => {
|
|
1407
1601
|
let e = [...i];
|
|
1408
1602
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
1409
1603
|
let r = t.value.map((e) => ({
|
|
@@ -1416,22 +1610,22 @@ function cr(e) {
|
|
|
1416
1610
|
function l(e) {
|
|
1417
1611
|
return c.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1418
1612
|
}
|
|
1419
|
-
let d = e?.defaultFont ??
|
|
1420
|
-
l(d) ||
|
|
1613
|
+
let d = e?.defaultFont ?? pr.split(",")[0].trim();
|
|
1614
|
+
l(d) || Tn.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.`);
|
|
1421
1615
|
function f(e) {
|
|
1422
|
-
return
|
|
1616
|
+
return dr.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1423
1617
|
}
|
|
1424
1618
|
function p() {
|
|
1425
1619
|
if (e?.defaultFont) {
|
|
1426
|
-
if (!n.value && !f(e.defaultFont)) return
|
|
1620
|
+
if (!n.value && !f(e.defaultFont)) return pr;
|
|
1427
1621
|
if (l(e.defaultFont)) {
|
|
1428
1622
|
let t = c.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1429
1623
|
if (t) return t.value;
|
|
1430
1624
|
}
|
|
1431
1625
|
}
|
|
1432
|
-
return
|
|
1626
|
+
return pr;
|
|
1433
1627
|
}
|
|
1434
|
-
let m =
|
|
1628
|
+
let m = M(() => p());
|
|
1435
1629
|
function h(e) {
|
|
1436
1630
|
if (!e) return a.value;
|
|
1437
1631
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
@@ -1439,7 +1633,7 @@ function cr(e) {
|
|
|
1439
1633
|
let e = n.fallback ?? a.value;
|
|
1440
1634
|
return `'${n.name}', ${e}`;
|
|
1441
1635
|
}
|
|
1442
|
-
return
|
|
1636
|
+
return fr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${a.value}`);
|
|
1443
1637
|
}
|
|
1444
1638
|
let g = [], v = !1;
|
|
1445
1639
|
async function y() {
|
|
@@ -1455,7 +1649,7 @@ function cr(e) {
|
|
|
1455
1649
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1456
1650
|
});
|
|
1457
1651
|
} catch (t) {
|
|
1458
|
-
|
|
1652
|
+
Tn.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1459
1653
|
}
|
|
1460
1654
|
});
|
|
1461
1655
|
await Promise.allSettled(e), !v && (r.value = !0);
|
|
@@ -1482,8 +1676,8 @@ function cr(e) {
|
|
|
1482
1676
|
}
|
|
1483
1677
|
//#endregion
|
|
1484
1678
|
//#region src/composables/useLogicTag.ts
|
|
1485
|
-
function
|
|
1486
|
-
let e =
|
|
1679
|
+
function gr() {
|
|
1680
|
+
let e = P(it, []), t = P(pt, []), n = P(dt, xe.liquid), r = P(wt, null), i = P(Mt, null), a = _(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
|
|
1487
1681
|
async function c() {
|
|
1488
1682
|
if (r) {
|
|
1489
1683
|
a.value = !0;
|
|
@@ -1514,12 +1708,12 @@ function lr() {
|
|
|
1514
1708
|
}
|
|
1515
1709
|
//#endregion
|
|
1516
1710
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1517
|
-
function
|
|
1518
|
-
return
|
|
1711
|
+
function _r(e, t, n) {
|
|
1712
|
+
return ke(e, n) ? {
|
|
1519
1713
|
type: "logicMergeTagNode",
|
|
1520
1714
|
attrs: {
|
|
1521
1715
|
value: e,
|
|
1522
|
-
keyword:
|
|
1716
|
+
keyword: fe(e, n)
|
|
1523
1717
|
}
|
|
1524
1718
|
} : {
|
|
1525
1719
|
type: "mergeTagNode",
|
|
@@ -1531,15 +1725,15 @@ function ur(e, t, n) {
|
|
|
1531
1725
|
}
|
|
1532
1726
|
//#endregion
|
|
1533
1727
|
//#region src/utils/insertLogicTag.ts
|
|
1534
|
-
function
|
|
1728
|
+
function vr(e) {
|
|
1535
1729
|
return "before" in e && "after" in e;
|
|
1536
1730
|
}
|
|
1537
|
-
function
|
|
1538
|
-
if (!
|
|
1539
|
-
e.chain().focus().insertContent(
|
|
1731
|
+
function yr(e, t, n) {
|
|
1732
|
+
if (!vr(t)) {
|
|
1733
|
+
e.chain().focus().insertContent(_r(t.value, t.label, n)).run();
|
|
1540
1734
|
return;
|
|
1541
1735
|
}
|
|
1542
|
-
let r =
|
|
1736
|
+
let r = _r(t.before, t.label, n), i = _r(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1543
1737
|
if (a !== o) {
|
|
1544
1738
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1545
1739
|
return;
|
|
@@ -1548,20 +1742,20 @@ function fr(e, t, n) {
|
|
|
1548
1742
|
}
|
|
1549
1743
|
//#endregion
|
|
1550
1744
|
//#region src/utils/linkColorExtension.ts
|
|
1551
|
-
function
|
|
1745
|
+
function br(e) {
|
|
1552
1746
|
if (!e) return null;
|
|
1553
1747
|
let t = e.trim();
|
|
1554
1748
|
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;
|
|
1555
1749
|
}
|
|
1556
|
-
function
|
|
1750
|
+
function xr(e) {
|
|
1557
1751
|
return e.extend({ addAttributes() {
|
|
1558
1752
|
return {
|
|
1559
1753
|
...this.parent?.(),
|
|
1560
1754
|
color: {
|
|
1561
1755
|
default: null,
|
|
1562
|
-
parseHTML: (e) =>
|
|
1756
|
+
parseHTML: (e) => br(Xe(e.style.color)),
|
|
1563
1757
|
renderHTML: (e) => {
|
|
1564
|
-
let t =
|
|
1758
|
+
let t = br(e.color);
|
|
1565
1759
|
return t ? { style: `color: ${t}` } : {};
|
|
1566
1760
|
}
|
|
1567
1761
|
}
|
|
@@ -1570,9 +1764,9 @@ function mr(e) {
|
|
|
1570
1764
|
}
|
|
1571
1765
|
//#endregion
|
|
1572
1766
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1573
|
-
function
|
|
1767
|
+
function Sr(e) {
|
|
1574
1768
|
let t = _(!1), n = _(""), r = _(""), i = _(null);
|
|
1575
|
-
|
|
1769
|
+
cr(i, t);
|
|
1576
1770
|
function a() {
|
|
1577
1771
|
let i = e.value?.getAttributes("link") ?? {};
|
|
1578
1772
|
n.value = i.href || "", r.value = i.color || "", t.value = !0;
|
|
@@ -1581,7 +1775,7 @@ function hr(e) {
|
|
|
1581
1775
|
if (n.value) {
|
|
1582
1776
|
let t = c(n.value);
|
|
1583
1777
|
if (t !== null) {
|
|
1584
|
-
let n =
|
|
1778
|
+
let n = br(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1585
1779
|
n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
|
|
1586
1780
|
}
|
|
1587
1781
|
}
|
|
@@ -1628,10 +1822,10 @@ function hr(e) {
|
|
|
1628
1822
|
}
|
|
1629
1823
|
//#endregion
|
|
1630
1824
|
//#region src/composables/useRichTextEditor.ts
|
|
1631
|
-
function
|
|
1632
|
-
let t =
|
|
1633
|
-
async function
|
|
1634
|
-
|
|
1825
|
+
function Cr(e) {
|
|
1826
|
+
let t = P(xt, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: i, requestMergeTag: a, syntax: o, autocomplete: s } = Ut(), { canInsertLogicTag: l, isRequesting: u, requestLogicTag: d } = gr(), f = P(ft, null), p = (g(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = Ae(o), y = v(null), { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: E, closeLinkDialog: D, handleLinkKeydown: O } = Sr(y), { start: k, stop: A } = Ke(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), j = v(null), ee = _(!0), M = _(null), te = !1;
|
|
1827
|
+
async function N() {
|
|
1828
|
+
M.value = null, ee.value = !0;
|
|
1635
1829
|
try {
|
|
1636
1830
|
let { TiptapEditor: r, EC: i, extensions: a } = await e.loadExtensions({
|
|
1637
1831
|
mergeTags: n,
|
|
@@ -1640,8 +1834,8 @@ function gr(e) {
|
|
|
1640
1834
|
autocompleteEnabled: s,
|
|
1641
1835
|
suggestionEmptyText: p
|
|
1642
1836
|
});
|
|
1643
|
-
if (
|
|
1644
|
-
|
|
1837
|
+
if (te) return;
|
|
1838
|
+
j.value = i;
|
|
1645
1839
|
let c = /* @__PURE__ */ new Map();
|
|
1646
1840
|
a.forEach((e, t) => c.set(e.name, t));
|
|
1647
1841
|
let l = new r({
|
|
@@ -1649,27 +1843,27 @@ function gr(e) {
|
|
|
1649
1843
|
content: e.blockContent(),
|
|
1650
1844
|
editable: !0,
|
|
1651
1845
|
onUpdate: ({ editor: n }) => {
|
|
1652
|
-
|
|
1846
|
+
te || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
|
|
1653
1847
|
}
|
|
1654
1848
|
});
|
|
1655
|
-
if (
|
|
1849
|
+
if (te) {
|
|
1656
1850
|
l.destroy();
|
|
1657
1851
|
return;
|
|
1658
1852
|
}
|
|
1659
|
-
y.value = l,
|
|
1853
|
+
y.value = l, ee.value = !1, k();
|
|
1660
1854
|
} catch (t) {
|
|
1661
|
-
if (
|
|
1662
|
-
|
|
1855
|
+
if (te) return;
|
|
1856
|
+
Tn.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), M.value = t instanceof Error ? t.message : "Failed to load editor", ee.value = !1;
|
|
1663
1857
|
}
|
|
1664
1858
|
}
|
|
1665
|
-
function
|
|
1666
|
-
y.value?.destroy(), y.value = null,
|
|
1859
|
+
function ne() {
|
|
1860
|
+
y.value?.destroy(), y.value = null, N();
|
|
1667
1861
|
}
|
|
1668
|
-
|
|
1669
|
-
let
|
|
1862
|
+
N();
|
|
1863
|
+
let re = c(() => e.blockContent(), (e) => {
|
|
1670
1864
|
y.value && y.value.getHTML() !== e && y.value.commands.setContent(e, { emitUpdate: !1 });
|
|
1671
1865
|
});
|
|
1672
|
-
function
|
|
1866
|
+
function ie(t) {
|
|
1673
1867
|
if (i.value || u.value) return;
|
|
1674
1868
|
let n = t.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
1675
1869
|
if (!r) return;
|
|
@@ -1677,26 +1871,26 @@ function gr(e) {
|
|
|
1677
1871
|
let a = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1678
1872
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || a || e.onDone();
|
|
1679
1873
|
}
|
|
1680
|
-
|
|
1681
|
-
|
|
1874
|
+
tt(document, "mousedown", ie), h(() => {
|
|
1875
|
+
te = !0, re(), A(), y.value?.destroy();
|
|
1682
1876
|
});
|
|
1683
|
-
async function
|
|
1877
|
+
async function ae() {
|
|
1684
1878
|
let e = await a();
|
|
1685
|
-
|
|
1879
|
+
te || (e && y.value ? y.value.chain().focus().insertMergeTag({
|
|
1686
1880
|
label: e.label,
|
|
1687
1881
|
value: e.value
|
|
1688
1882
|
}).run() : y.value?.commands.focus());
|
|
1689
1883
|
}
|
|
1690
|
-
async function
|
|
1884
|
+
async function F() {
|
|
1691
1885
|
let e = await d();
|
|
1692
|
-
|
|
1886
|
+
te || (e && y.value ? yr(y.value, e, o) : y.value?.commands.focus());
|
|
1693
1887
|
}
|
|
1694
1888
|
return {
|
|
1695
1889
|
editor: y,
|
|
1696
|
-
EditorContent:
|
|
1697
|
-
isLoading:
|
|
1698
|
-
initError:
|
|
1699
|
-
retry:
|
|
1890
|
+
EditorContent: j,
|
|
1891
|
+
isLoading: ee,
|
|
1892
|
+
initError: M,
|
|
1893
|
+
retry: ne,
|
|
1700
1894
|
showLinkDialog: b,
|
|
1701
1895
|
linkUrl: x,
|
|
1702
1896
|
linkColor: S,
|
|
@@ -1712,36 +1906,36 @@ function gr(e) {
|
|
|
1712
1906
|
removeLink: E,
|
|
1713
1907
|
closeLinkDialog: D,
|
|
1714
1908
|
handleLinkKeydown: O,
|
|
1715
|
-
handleAddMergeTag:
|
|
1716
|
-
handleAddLogicTag:
|
|
1909
|
+
handleAddMergeTag: ae,
|
|
1910
|
+
handleAddLogicTag: F
|
|
1717
1911
|
};
|
|
1718
1912
|
}
|
|
1719
1913
|
//#endregion
|
|
1720
1914
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1721
|
-
var
|
|
1722
|
-
function
|
|
1723
|
-
let t =
|
|
1915
|
+
var wr = "(max-width: 767px)";
|
|
1916
|
+
function Tr(e) {
|
|
1917
|
+
let t = Ye(wr);
|
|
1724
1918
|
return {
|
|
1725
1919
|
isSmallScreen: t,
|
|
1726
|
-
showNotice:
|
|
1920
|
+
showNotice: M(() => (S(e) ?? !0) && t.value)
|
|
1727
1921
|
};
|
|
1728
1922
|
}
|
|
1729
1923
|
//#endregion
|
|
1730
1924
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1731
|
-
var
|
|
1925
|
+
var Er = { class: "tpl:w-full" }, Dr = {
|
|
1732
1926
|
key: 0,
|
|
1733
1927
|
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)]"
|
|
1734
|
-
},
|
|
1928
|
+
}, Or = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, kr = {
|
|
1735
1929
|
key: 1,
|
|
1736
1930
|
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)]"
|
|
1737
|
-
},
|
|
1931
|
+
}, Ar = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, jr = {
|
|
1738
1932
|
key: 2,
|
|
1739
1933
|
class: "tpl:relative"
|
|
1740
|
-
},
|
|
1934
|
+
}, Mr = ["innerHTML"], Nr = {
|
|
1741
1935
|
key: 0,
|
|
1742
1936
|
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]",
|
|
1743
1937
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1744
|
-
},
|
|
1938
|
+
}, Pr = /* @__PURE__ */ y({
|
|
1745
1939
|
__name: "CustomBlock",
|
|
1746
1940
|
props: {
|
|
1747
1941
|
block: {},
|
|
@@ -1749,9 +1943,9 @@ var yr = { class: "tpl:w-full" }, br = {
|
|
|
1749
1943
|
},
|
|
1750
1944
|
emits: ["fetchData"],
|
|
1751
1945
|
setup(e, { emit: t }) {
|
|
1752
|
-
let n = e, r = t, { t: i } =
|
|
1946
|
+
let n = e, r = t, { t: i } = It(), o = P(Ot, null), s = _(""), l = _(!1), u = M(() => o?.getDefinition(n.block.customType)), d = M(() => !!u.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: v } = tn({
|
|
1753
1947
|
definition: u,
|
|
1754
|
-
block:
|
|
1948
|
+
block: M(() => n.block),
|
|
1755
1949
|
onUpdate: (e, t) => {
|
|
1756
1950
|
r("fetchData", {
|
|
1757
1951
|
fieldValues: e,
|
|
@@ -1775,60 +1969,60 @@ var yr = { class: "tpl:w-full" }, br = {
|
|
|
1775
1969
|
y();
|
|
1776
1970
|
}), c(() => n.block.fieldValues, () => {
|
|
1777
1971
|
S();
|
|
1778
|
-
}, { deep: !0 }), (e, t) => (f(), x("div",
|
|
1972
|
+
}, { deep: !0 }), (e, t) => (f(), x("div", Er, [d.value ? l.value ? (f(), x("div", kr, [w(k(Bt), {
|
|
1779
1973
|
size: 24,
|
|
1780
1974
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1781
|
-
}), b("span",
|
|
1975
|
+
}), b("span", Ar, p(k(i).customBlocks.renderError), 1)])) : (f(), x("div", jr, [b("div", { innerHTML: s.value }, null, 8, Mr), k(v) && k(g) ? (f(), x("div", Nr, [k(m) ? (f(), D(Vt, {
|
|
1782
1976
|
key: 1,
|
|
1783
1977
|
class: "tpl:w-48"
|
|
1784
1978
|
})) : (f(), x("button", {
|
|
1785
1979
|
key: 0,
|
|
1786
1980
|
type: "button",
|
|
1787
1981
|
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)]",
|
|
1788
|
-
onClick: t[0] ||=
|
|
1789
|
-
}, [u.value?.icon ? (f(), D(
|
|
1982
|
+
onClick: t[0] ||= F((...e) => k(h) && k(h)(...e), ["stop"])
|
|
1983
|
+
}, [u.value?.icon ? (f(), D(ar, {
|
|
1790
1984
|
key: 0,
|
|
1791
1985
|
icon: u.value.icon,
|
|
1792
1986
|
size: 16
|
|
1793
|
-
}, null, 8, ["icon"])) :
|
|
1987
|
+
}, null, 8, ["icon"])) : N("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : N("", !0)])) : (f(), x("div", Dr, [w(k($n), {
|
|
1794
1988
|
size: 24,
|
|
1795
1989
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1796
|
-
}), b("span",
|
|
1990
|
+
}), b("span", Or, p(k(i).customBlocks.definitionNotFound), 1)]))]));
|
|
1797
1991
|
}
|
|
1798
|
-
}),
|
|
1992
|
+
}), Fr = { class: "tpl:w-full" }, Ir = /* @__PURE__ */ y({
|
|
1799
1993
|
__name: "DividerBlock",
|
|
1800
1994
|
props: {
|
|
1801
1995
|
block: {},
|
|
1802
1996
|
viewport: {}
|
|
1803
1997
|
},
|
|
1804
1998
|
setup(e) {
|
|
1805
|
-
let t = e, n =
|
|
1999
|
+
let t = e, n = M(() => ({
|
|
1806
2000
|
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
1807
2001
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
1808
2002
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1809
2003
|
}));
|
|
1810
|
-
return (e, t) => (f(), x("div",
|
|
2004
|
+
return (e, t) => (f(), x("div", Fr, [b("hr", {
|
|
1811
2005
|
class: "tpl:m-0 tpl:border-none",
|
|
1812
2006
|
style: i(n.value)
|
|
1813
2007
|
}, null, 4)]));
|
|
1814
2008
|
}
|
|
1815
|
-
}),
|
|
2009
|
+
}), Lr = { class: "tpl:w-full" }, Rr = ["srcdoc", "title"], zr = {
|
|
1816
2010
|
key: 1,
|
|
1817
2011
|
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)]"
|
|
1818
|
-
},
|
|
2012
|
+
}, Br = {
|
|
1819
2013
|
key: 0,
|
|
1820
2014
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1821
|
-
},
|
|
2015
|
+
}, Vr = {
|
|
1822
2016
|
key: 1,
|
|
1823
2017
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1824
|
-
},
|
|
2018
|
+
}, Hr = /* @__PURE__ */ y({
|
|
1825
2019
|
__name: "HtmlBlock",
|
|
1826
2020
|
props: {
|
|
1827
2021
|
block: {},
|
|
1828
2022
|
viewport: {}
|
|
1829
2023
|
},
|
|
1830
2024
|
setup(e) {
|
|
1831
|
-
let t = e, { t: n } =
|
|
2025
|
+
let t = e, { t: n } = It(), r = P(Pt, !1), a = M(() => t.block.content.trim().length > 0), o = M(() => r && a.value), s = _(null), l = _(60), u = null;
|
|
1832
2026
|
function d() {
|
|
1833
2027
|
let e = s.value?.contentDocument;
|
|
1834
2028
|
e && (l.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1842,7 +2036,7 @@ var yr = { class: "tpl:w-full" }, br = {
|
|
|
1842
2036
|
e || (u?.disconnect(), u = null);
|
|
1843
2037
|
}), h(() => {
|
|
1844
2038
|
u?.disconnect(), u = null;
|
|
1845
|
-
}), (t, r) => (f(), x("div",
|
|
2039
|
+
}), (t, r) => (f(), x("div", Lr, [o.value ? (f(), x("iframe", {
|
|
1846
2040
|
key: 0,
|
|
1847
2041
|
ref_key: "iframeRef",
|
|
1848
2042
|
ref: s,
|
|
@@ -1852,36 +2046,36 @@ var yr = { class: "tpl:w-full" }, br = {
|
|
|
1852
2046
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1853
2047
|
style: i({ height: `${l.value}px` }),
|
|
1854
2048
|
onLoad: m
|
|
1855
|
-
}, null, 44,
|
|
2049
|
+
}, null, 44, Rr)) : (f(), x("div", zr, [w(k(Kn), {
|
|
1856
2050
|
size: 24,
|
|
1857
2051
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1858
|
-
}), a.value ? (f(), x("span",
|
|
2052
|
+
}), a.value ? (f(), x("span", Br, p(k(n).html.preview), 1)) : (f(), x("span", Vr, p(k(n).html.empty), 1))]))]));
|
|
1859
2053
|
}
|
|
1860
|
-
}),
|
|
1861
|
-
function
|
|
1862
|
-
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || S(r), { isOverDropZone: a } =
|
|
2054
|
+
}), Ur = "image/";
|
|
2055
|
+
function Wr(e) {
|
|
2056
|
+
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || S(r), { isOverDropZone: a } = Je(t, {
|
|
1863
2057
|
preventDefaultForUnhandled: !0,
|
|
1864
2058
|
onDrop: (e) => {
|
|
1865
2059
|
if (!i()) return;
|
|
1866
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
2060
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(Ur));
|
|
1867
2061
|
t.length > 0 && n([t[0]]);
|
|
1868
2062
|
}
|
|
1869
2063
|
});
|
|
1870
|
-
return { isOver:
|
|
2064
|
+
return { isOver: M(() => i() && a.value) };
|
|
1871
2065
|
}
|
|
1872
2066
|
//#endregion
|
|
1873
2067
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1874
|
-
var
|
|
2068
|
+
var Gr = {
|
|
1875
2069
|
key: 0,
|
|
1876
2070
|
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)]",
|
|
1877
2071
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
1878
|
-
},
|
|
2072
|
+
}, Kr = ["href"], qr = ["src", "alt"], Jr = ["src", "alt"], Yr = {
|
|
1879
2073
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1880
2074
|
style: { opacity: "0.7" }
|
|
1881
|
-
},
|
|
2075
|
+
}, Xr = ["href"], Zr = ["src", "alt"], Qr = ["src", "alt"], $r = {
|
|
1882
2076
|
key: 4,
|
|
1883
2077
|
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)]"
|
|
1884
|
-
},
|
|
2078
|
+
}, ei = ["aria-label"], ti = { key: 1 }, ni = /* @__PURE__ */ y({
|
|
1885
2079
|
__name: "ImageBlock",
|
|
1886
2080
|
props: {
|
|
1887
2081
|
block: {},
|
|
@@ -1889,7 +2083,7 @@ var Rr = {
|
|
|
1889
2083
|
},
|
|
1890
2084
|
emits: ["update"],
|
|
1891
2085
|
setup(e, { emit: t }) {
|
|
1892
|
-
let n = e, r = t, { t: a } =
|
|
2086
|
+
let n = e, r = t, { t: a } = It(), { syntax: o } = Ut(), s = P(nt, null), c = M(() => !!s), l = Wt();
|
|
1893
2087
|
async function u() {
|
|
1894
2088
|
let e = await s?.({ accept: ["images"] });
|
|
1895
2089
|
if (l.alive && e) {
|
|
@@ -1897,7 +2091,7 @@ var Rr = {
|
|
|
1897
2091
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
1898
2092
|
}
|
|
1899
2093
|
}
|
|
1900
|
-
let d = _(), m = _(!1), h =
|
|
2094
|
+
let d = _(), m = _(!1), h = M(() => c.value && !m.value && !C.value);
|
|
1901
2095
|
async function g(e) {
|
|
1902
2096
|
if (s) {
|
|
1903
2097
|
m.value = !0;
|
|
@@ -1916,11 +2110,11 @@ var Rr = {
|
|
|
1916
2110
|
}
|
|
1917
2111
|
}
|
|
1918
2112
|
}
|
|
1919
|
-
let { isOver: v } =
|
|
2113
|
+
let { isOver: v } = Wr({
|
|
1920
2114
|
target: d,
|
|
1921
2115
|
enabled: h,
|
|
1922
2116
|
onFiles: g
|
|
1923
|
-
}), y =
|
|
2117
|
+
}), y = M(() => ({ textAlign: n.block.align })), S = M(() => {
|
|
1924
2118
|
let e = n.block.align;
|
|
1925
2119
|
return {
|
|
1926
2120
|
maxWidth: "100%",
|
|
@@ -1929,86 +2123,86 @@ var Rr = {
|
|
|
1929
2123
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1930
2124
|
marginRight: e === "center" ? "auto" : void 0
|
|
1931
2125
|
};
|
|
1932
|
-
}), C =
|
|
2126
|
+
}), C = M(() => Ce(n.block.src, o)), T = fn(() => C.value ? void 0 : n.block.src), E = fn(() => C.value ? n.block.placeholderUrl : void 0);
|
|
1933
2127
|
return (t, n) => (f(), x("div", {
|
|
1934
2128
|
ref_key: "dropZoneRef",
|
|
1935
2129
|
ref: d,
|
|
1936
2130
|
"data-testid": "image-drop-zone",
|
|
1937
2131
|
class: "tpl:relative tpl:w-full",
|
|
1938
2132
|
style: i(y.value)
|
|
1939
|
-
}, [h.value && (k(v) || m.value) ? (f(), x("div",
|
|
2133
|
+
}, [h.value && (k(v) || m.value) ? (f(), x("div", Gr, [m.value ? (f(), x(j, { key: 0 }, [w(k(Lt), {
|
|
1940
2134
|
class: "tpl-spinner",
|
|
1941
2135
|
size: 20,
|
|
1942
2136
|
"stroke-width": 2
|
|
1943
|
-
}), O(" " + p(k(a).image.uploading), 1)], 64)) : (f(), x(
|
|
2137
|
+
}), O(" " + p(k(a).image.uploading), 1)], 64)) : (f(), x(j, { key: 1 }, [w(k(ce), {
|
|
1944
2138
|
size: 20,
|
|
1945
2139
|
"stroke-width": 1.5
|
|
1946
|
-
}), O(" " + p(k(a).image.dropToUpload), 1)], 64))])) :
|
|
2140
|
+
}), O(" " + p(k(a).image.dropToUpload), 1)], 64))])) : N("", !0), e.block.src && C.value && e.block.placeholderUrl ? (f(), x(j, { key: 1 }, [e.block.linkUrl ? (f(), x("a", {
|
|
1947
2141
|
key: 0,
|
|
1948
2142
|
href: e.block.linkUrl,
|
|
1949
2143
|
target: "_blank",
|
|
1950
2144
|
rel: "noopener noreferrer",
|
|
1951
|
-
onClick: n[0] ||=
|
|
2145
|
+
onClick: n[0] ||= F(() => {}, ["prevent"])
|
|
1952
2146
|
}, [b("img", {
|
|
1953
2147
|
class: "tpl:border-0",
|
|
1954
2148
|
loading: "lazy",
|
|
1955
2149
|
src: k(E),
|
|
1956
2150
|
alt: e.block.alt || k(a).image.altTextPlaceholder,
|
|
1957
2151
|
style: i(S.value)
|
|
1958
|
-
}, null, 12,
|
|
2152
|
+
}, null, 12, qr)], 8, Kr)) : (f(), x("img", {
|
|
1959
2153
|
key: 1,
|
|
1960
2154
|
class: "tpl:border-0",
|
|
1961
2155
|
src: k(E),
|
|
1962
2156
|
alt: e.block.alt,
|
|
1963
2157
|
style: i(S.value)
|
|
1964
|
-
}, null, 12,
|
|
2158
|
+
}, null, 12, Jr))], 64)) : e.block.src && C.value ? (f(), x("div", {
|
|
1965
2159
|
key: 2,
|
|
1966
2160
|
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)]",
|
|
1967
2161
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, S.value])
|
|
1968
|
-
}, [w(k(
|
|
2162
|
+
}, [w(k(Zn), {
|
|
1969
2163
|
size: 32,
|
|
1970
2164
|
"stroke-width": 1.5,
|
|
1971
2165
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1972
2166
|
style: { opacity: "0.5" }
|
|
1973
|
-
}), b("span",
|
|
2167
|
+
}), b("span", Yr, [w(Bn, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (f(), x(j, { key: 3 }, [e.block.linkUrl ? (f(), x("a", {
|
|
1974
2168
|
key: 0,
|
|
1975
2169
|
href: e.block.linkUrl,
|
|
1976
2170
|
target: "_blank",
|
|
1977
2171
|
rel: "noopener noreferrer",
|
|
1978
|
-
onClick: n[1] ||=
|
|
2172
|
+
onClick: n[1] ||= F(() => {}, ["prevent"])
|
|
1979
2173
|
}, [b("img", {
|
|
1980
2174
|
class: "tpl:border-0",
|
|
1981
2175
|
loading: "lazy",
|
|
1982
2176
|
src: k(T),
|
|
1983
2177
|
alt: e.block.alt || k(a).image.altTextPlaceholder,
|
|
1984
2178
|
style: i(S.value)
|
|
1985
|
-
}, null, 12,
|
|
2179
|
+
}, null, 12, Zr)], 8, Xr)) : (f(), x("img", {
|
|
1986
2180
|
key: 1,
|
|
1987
2181
|
class: "tpl:border-0",
|
|
1988
2182
|
src: k(T),
|
|
1989
2183
|
alt: e.block.alt,
|
|
1990
2184
|
style: i(S.value)
|
|
1991
|
-
}, null, 12,
|
|
2185
|
+
}, null, 12, Qr))], 64)) : (f(), x("div", $r, [c.value ? (f(), x("button", {
|
|
1992
2186
|
key: 0,
|
|
1993
2187
|
"aria-label": k(a).image.browseMedia,
|
|
1994
2188
|
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)]",
|
|
1995
|
-
onClick:
|
|
1996
|
-
}, [w(k(
|
|
2189
|
+
onClick: F(u, ["stop"])
|
|
2190
|
+
}, [w(k(Zn), {
|
|
1997
2191
|
size: 14,
|
|
1998
2192
|
"stroke-width": 1.5
|
|
1999
|
-
}), O(" " + p(k(a).image.browseMedia), 1)], 8,
|
|
2193
|
+
}), O(" " + p(k(a).image.browseMedia), 1)], 8, ei)) : (f(), x("span", ti, p(k(a).image.clickToAdd), 1))]))], 4));
|
|
2000
2194
|
}
|
|
2001
|
-
}),
|
|
2195
|
+
}), ri = { class: "tpl:w-full" }, ii = ["href"], ai = {
|
|
2002
2196
|
key: 1,
|
|
2003
2197
|
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)]"
|
|
2004
|
-
},
|
|
2198
|
+
}, oi = /* @__PURE__ */ y({
|
|
2005
2199
|
__name: "MenuBlock",
|
|
2006
2200
|
props: {
|
|
2007
2201
|
block: {},
|
|
2008
2202
|
viewport: {}
|
|
2009
2203
|
},
|
|
2010
2204
|
setup(e) {
|
|
2011
|
-
let n = e, { t: r } =
|
|
2205
|
+
let n = e, { t: r } = It(), a = M(() => ({
|
|
2012
2206
|
display: "flex",
|
|
2013
2207
|
flexWrap: "wrap",
|
|
2014
2208
|
gap: `0 ${n.block.spacing}px`,
|
|
@@ -2016,14 +2210,14 @@ var Rr = {
|
|
|
2016
2210
|
fontSize: `${n.block.fontSize}px`,
|
|
2017
2211
|
fontFamily: n.block.fontFamily || "inherit",
|
|
2018
2212
|
alignItems: "center"
|
|
2019
|
-
})), o =
|
|
2213
|
+
})), o = M(() => n.block.items.length > 0);
|
|
2020
2214
|
function s(e) {
|
|
2021
2215
|
return e || n.block.linkColor || n.block.color;
|
|
2022
2216
|
}
|
|
2023
|
-
return (n, c) => (f(), x("div",
|
|
2217
|
+
return (n, c) => (f(), x("div", ri, [o.value ? (f(), x("div", {
|
|
2024
2218
|
key: 0,
|
|
2025
2219
|
style: i(a.value)
|
|
2026
|
-
}, [(f(!0), x(
|
|
2220
|
+
}, [(f(!0), x(j, null, t(e.block.items, (t, n) => (f(), x(j, { key: t.id }, [b("a", {
|
|
2027
2221
|
href: t.url || "#",
|
|
2028
2222
|
class: "tpl:cursor-default tpl:no-underline",
|
|
2029
2223
|
style: i({
|
|
@@ -2031,16 +2225,16 @@ var Rr = {
|
|
|
2031
2225
|
fontWeight: t.bold ? "bold" : "normal",
|
|
2032
2226
|
textDecoration: t.underline ? "underline" : "none"
|
|
2033
2227
|
}),
|
|
2034
|
-
onClick: c[0] ||=
|
|
2035
|
-
}, [w(
|
|
2228
|
+
onClick: c[0] ||= F(() => {}, ["prevent"])
|
|
2229
|
+
}, [w(Bn, { text: t.text || "..." }, null, 8, ["text"])], 12, ii), n < e.block.items.length - 1 ? (f(), x("span", {
|
|
2036
2230
|
key: 0,
|
|
2037
2231
|
style: i({
|
|
2038
2232
|
color: e.block.separatorColor,
|
|
2039
2233
|
padding: `0 ${e.block.spacing}px`
|
|
2040
2234
|
})
|
|
2041
|
-
}, p(e.block.separator), 5)) :
|
|
2235
|
+
}, p(e.block.separator), 5)) : N("", !0)], 64))), 128))], 4)) : (f(), x("div", ai, [w(k(Qn), { size: 16 }), b("span", null, p(k(r).menu.addLinks), 1)]))]));
|
|
2042
2236
|
}
|
|
2043
|
-
}),
|
|
2237
|
+
}), si = /* @__PURE__ */ new Set([
|
|
2044
2238
|
"http",
|
|
2045
2239
|
"https",
|
|
2046
2240
|
"mailto",
|
|
@@ -2050,7 +2244,7 @@ var Rr = {
|
|
|
2050
2244
|
"sms",
|
|
2051
2245
|
"xmpp",
|
|
2052
2246
|
"cid"
|
|
2053
|
-
]),
|
|
2247
|
+
]), ci = /* @__PURE__ */ new Set([
|
|
2054
2248
|
"SCRIPT",
|
|
2055
2249
|
"STYLE",
|
|
2056
2250
|
"IFRAME",
|
|
@@ -2060,7 +2254,7 @@ var Rr = {
|
|
|
2060
2254
|
"META",
|
|
2061
2255
|
"BASE",
|
|
2062
2256
|
"FORM"
|
|
2063
|
-
]),
|
|
2257
|
+
]), li = /* @__PURE__ */ new Set([
|
|
2064
2258
|
"href",
|
|
2065
2259
|
"xlink:href",
|
|
2066
2260
|
"formaction",
|
|
@@ -2069,16 +2263,16 @@ var Rr = {
|
|
|
2069
2263
|
"background",
|
|
2070
2264
|
"poster"
|
|
2071
2265
|
]);
|
|
2072
|
-
function
|
|
2266
|
+
function ui(e, t) {
|
|
2073
2267
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2074
2268
|
if (!n || n.startsWith("#")) return !0;
|
|
2075
2269
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
2076
2270
|
if (!r) return !0;
|
|
2077
2271
|
let i = r[1].toLowerCase();
|
|
2078
|
-
return
|
|
2272
|
+
return si.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
2079
2273
|
}
|
|
2080
|
-
function
|
|
2081
|
-
if (
|
|
2274
|
+
function di(e) {
|
|
2275
|
+
if (ci.has(e.tagName)) {
|
|
2082
2276
|
e.remove();
|
|
2083
2277
|
return;
|
|
2084
2278
|
}
|
|
@@ -2090,29 +2284,29 @@ function ii(e) {
|
|
|
2090
2284
|
e.removeAttribute(n);
|
|
2091
2285
|
continue;
|
|
2092
2286
|
}
|
|
2093
|
-
if (
|
|
2094
|
-
|
|
2287
|
+
if (li.has(t)) {
|
|
2288
|
+
ui(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
2095
2289
|
continue;
|
|
2096
2290
|
}
|
|
2097
2291
|
if (t === "src") {
|
|
2098
|
-
|
|
2292
|
+
ui(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
2099
2293
|
continue;
|
|
2100
2294
|
}
|
|
2101
2295
|
t === "srcdoc" && e.removeAttribute(n);
|
|
2102
2296
|
}
|
|
2103
2297
|
let n = Array.from(e.children);
|
|
2104
|
-
for (let e of n)
|
|
2298
|
+
for (let e of n) di(e);
|
|
2105
2299
|
}
|
|
2106
|
-
function
|
|
2300
|
+
function fi(e) {
|
|
2107
2301
|
if (typeof DOMParser > "u") return e;
|
|
2108
2302
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
2109
|
-
for (let e of n)
|
|
2303
|
+
for (let e of n) di(e);
|
|
2110
2304
|
return t.innerHTML;
|
|
2111
2305
|
}
|
|
2112
2306
|
//#endregion
|
|
2113
2307
|
//#region src/composables/useEditableTextBlock.ts
|
|
2114
|
-
function
|
|
2115
|
-
let t =
|
|
2308
|
+
function pi(e) {
|
|
2309
|
+
let t = P(mt, []), { syntax: n } = Ut(), r = M(() => fi(ge(_e(e(), t), n))), i = _(!1), a = _(null), { top: o, left: s } = Ze(a), { toLocal: c } = et(), l = M(() => c({
|
|
2116
2310
|
top: o.value - 8,
|
|
2117
2311
|
left: s.value
|
|
2118
2312
|
}));
|
|
@@ -2133,14 +2327,14 @@ function oi(e) {
|
|
|
2133
2327
|
}
|
|
2134
2328
|
//#endregion
|
|
2135
2329
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2136
|
-
var
|
|
2330
|
+
var mi = ["innerHTML"], hi = /* @__PURE__ */ y({
|
|
2137
2331
|
__name: "ParagraphBlock",
|
|
2138
2332
|
props: {
|
|
2139
2333
|
block: {},
|
|
2140
2334
|
viewport: {}
|
|
2141
2335
|
},
|
|
2142
2336
|
setup(e) {
|
|
2143
|
-
let t = e, n = C(() => import("./ParagraphEditor-
|
|
2337
|
+
let t = e, n = C(() => import("./ParagraphEditor-CkwBirNl.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = pi(() => t.block.content);
|
|
2144
2338
|
return (t, l) => (f(), x("div", {
|
|
2145
2339
|
ref_key: "blockRef",
|
|
2146
2340
|
ref: i,
|
|
@@ -2159,58 +2353,68 @@ var si = ["innerHTML"], ci = /* @__PURE__ */ y({
|
|
|
2159
2353
|
key: 1,
|
|
2160
2354
|
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",
|
|
2161
2355
|
innerHTML: k(o)
|
|
2162
|
-
}, null, 8,
|
|
2356
|
+
}, null, 8, mi))], 544));
|
|
2163
2357
|
}
|
|
2164
2358
|
});
|
|
2165
2359
|
//#endregion
|
|
2166
2360
|
//#region src/utils/blockComponentResolver.ts
|
|
2167
|
-
function
|
|
2361
|
+
function gi(e) {
|
|
2362
|
+
let t = { fontFamily: e.fontFamily };
|
|
2363
|
+
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
|
+
}
|
|
2365
|
+
function _i(e, t, n) {
|
|
2168
2366
|
if (t) {
|
|
2169
2367
|
let n = t.getComponent(e);
|
|
2170
2368
|
if (n) return n;
|
|
2171
2369
|
}
|
|
2172
2370
|
return n[e.type] ?? null;
|
|
2173
2371
|
}
|
|
2174
|
-
function
|
|
2372
|
+
function vi(e) {
|
|
2175
2373
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
2176
2374
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
2177
2375
|
backgroundColor: n || "transparent"
|
|
2178
2376
|
};
|
|
2179
2377
|
return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
2180
2378
|
}
|
|
2181
|
-
function
|
|
2379
|
+
function yi(e) {
|
|
2182
2380
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
2183
2381
|
let t = e.wrapper, n = {};
|
|
2184
2382
|
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;
|
|
2185
2383
|
}
|
|
2186
2384
|
//#endregion
|
|
2187
2385
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2188
|
-
var
|
|
2386
|
+
var bi = [
|
|
2387
|
+
"data-block-id",
|
|
2388
|
+
"data-block-type",
|
|
2389
|
+
"data-tpl-picked"
|
|
2390
|
+
], xi = ["aria-label"], Si = [
|
|
2189
2391
|
"aria-label",
|
|
2190
2392
|
"aria-pressed",
|
|
2191
2393
|
"title"
|
|
2192
|
-
],
|
|
2394
|
+
], Ci = ["aria-label", "title"], wi = ["aria-label", "title"], Ti = ["aria-label", "title"], Ei = {
|
|
2193
2395
|
key: 1,
|
|
2194
2396
|
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"
|
|
2195
|
-
},
|
|
2397
|
+
}, Di = { 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)]" }, Oi = {
|
|
2196
2398
|
key: 2,
|
|
2197
2399
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2198
|
-
},
|
|
2400
|
+
}, ki = ["aria-label", "title"], Ai = {
|
|
2199
2401
|
key: 3,
|
|
2200
2402
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2201
|
-
},
|
|
2403
|
+
}, ji = ["aria-label"], Mi = /*#__PURE__*/ Ht(/* @__PURE__ */ y({
|
|
2202
2404
|
__name: "BlockWrapper",
|
|
2203
2405
|
props: {
|
|
2204
2406
|
block: {},
|
|
2205
2407
|
isSelected: { type: Boolean },
|
|
2206
2408
|
viewport: {},
|
|
2207
|
-
previewMode: { type: Boolean }
|
|
2409
|
+
previewMode: { type: Boolean },
|
|
2410
|
+
nested: { type: Boolean },
|
|
2411
|
+
picked: { type: Boolean }
|
|
2208
2412
|
},
|
|
2209
2413
|
emits: ["select"],
|
|
2210
2414
|
setup(e, { emit: t }) {
|
|
2211
|
-
let n = C(() => import("./BlockIssueBadge-
|
|
2415
|
+
let n = C(() => import("./BlockIssueBadge-Dmj9rVra.js")), r = e, a = t, { t: s, format: c } = It(), l = P(Nt, 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);
|
|
2212
2416
|
async function h() {
|
|
2213
|
-
await
|
|
2417
|
+
await re(), u.value?.focus();
|
|
2214
2418
|
}
|
|
2215
2419
|
function g(e) {
|
|
2216
2420
|
if (l) {
|
|
@@ -2231,48 +2435,50 @@ var fi = ["data-block-id", "data-block-type"], pi = ["aria-label"], mi = [
|
|
|
2231
2435
|
}
|
|
2232
2436
|
}
|
|
2233
2437
|
}
|
|
2234
|
-
let v =
|
|
2438
|
+
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 ? {
|
|
2235
2439
|
desktop: s.viewport.desktop,
|
|
2236
2440
|
mobile: s.viewport.mobile
|
|
2237
|
-
}[r.viewport] ?? r.viewport : ""), E =
|
|
2238
|
-
let e =
|
|
2441
|
+
}[r.viewport] ?? r.viewport : ""), E = M(() => !!r.block.displayCondition), D = P(St, null), A = P(vt, null), j = P(At, {}), 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(() => {
|
|
2442
|
+
let e = vi(r.block), t = {
|
|
2239
2443
|
padding: e.padding,
|
|
2240
2444
|
backgroundColor: e.backgroundColor
|
|
2241
2445
|
};
|
|
2242
2446
|
return e.borderRadius && (t.borderRadius = e.borderRadius), t;
|
|
2243
|
-
}),
|
|
2244
|
-
function
|
|
2447
|
+
}), oe = M(() => yi(r.block));
|
|
2448
|
+
function se(e) {
|
|
2245
2449
|
r.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), a("select"));
|
|
2246
2450
|
}
|
|
2247
|
-
function se() {
|
|
2248
|
-
D?.deleteBlock(r.block.id);
|
|
2249
|
-
}
|
|
2250
2451
|
function ce() {
|
|
2251
|
-
D?.
|
|
2452
|
+
D?.deleteBlock(r.block.id);
|
|
2252
2453
|
}
|
|
2253
2454
|
function le() {
|
|
2254
|
-
|
|
2455
|
+
D?.duplicateBlock(r.block);
|
|
2255
2456
|
}
|
|
2256
2457
|
function ue() {
|
|
2257
|
-
|
|
2458
|
+
j.savedBlocks?.startPicking(r.block.id);
|
|
2258
2459
|
}
|
|
2259
|
-
|
|
2460
|
+
function de() {
|
|
2461
|
+
A?.toggleBlock(r.block.id);
|
|
2462
|
+
}
|
|
2463
|
+
return (t, r) => y.value ? N("", !0) : (f(), x("div", {
|
|
2260
2464
|
key: 0,
|
|
2261
2465
|
class: o(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
|
|
2262
2466
|
"tpl-block--selected": e.isSelected,
|
|
2263
|
-
"tpl-block--
|
|
2467
|
+
"tpl-block--picked": e.picked,
|
|
2468
|
+
"tpl-block--idle": !e.isSelected && !e.picked,
|
|
2264
2469
|
"tpl-block--lifted": d.value
|
|
2265
2470
|
}]),
|
|
2266
2471
|
"data-block-id": e.block.id,
|
|
2267
2472
|
"data-block-type": e.block.type,
|
|
2268
|
-
|
|
2473
|
+
"data-tpl-picked": e.picked || void 0,
|
|
2474
|
+
onClick: se
|
|
2269
2475
|
}, [
|
|
2270
2476
|
w(k(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
2271
|
-
|
|
2477
|
+
ne.value ? (f(), x("div", {
|
|
2272
2478
|
key: 0,
|
|
2273
2479
|
role: "toolbar",
|
|
2274
2480
|
"aria-label": k(s).blockActions.drag,
|
|
2275
|
-
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
2481
|
+
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
2276
2482
|
}, [
|
|
2277
2483
|
b("button", {
|
|
2278
2484
|
ref_key: "dragButtonRef",
|
|
@@ -2283,97 +2489,97 @@ var fi = ["data-block-id", "data-block-type"], pi = ["aria-label"], mi = [
|
|
|
2283
2489
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2284
2490
|
title: k(s).blockActions.drag,
|
|
2285
2491
|
onKeydown: g
|
|
2286
|
-
}, [w(k(
|
|
2492
|
+
}, [w(k(Xn), {
|
|
2287
2493
|
size: 14,
|
|
2288
2494
|
"stroke-width": 1.5
|
|
2289
|
-
})], 40,
|
|
2495
|
+
})], 40, Si),
|
|
2290
2496
|
b("button", {
|
|
2291
2497
|
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",
|
|
2292
2498
|
"aria-label": k(s).blockActions.duplicate,
|
|
2293
2499
|
title: k(s).blockActions.duplicate,
|
|
2294
|
-
onClick:
|
|
2295
|
-
}, [w(k(
|
|
2500
|
+
onClick: F(le, ["stop"])
|
|
2501
|
+
}, [w(k(qn), {
|
|
2296
2502
|
size: 14,
|
|
2297
2503
|
"stroke-width": 1.5
|
|
2298
|
-
})], 8,
|
|
2504
|
+
})], 8, Ci),
|
|
2299
2505
|
te.value ? (f(), x("button", {
|
|
2300
2506
|
key: 0,
|
|
2301
2507
|
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",
|
|
2302
|
-
"aria-label": k(s).blockActions.
|
|
2303
|
-
title: k(s).blockActions.
|
|
2304
|
-
onClick:
|
|
2305
|
-
}, [w(k(
|
|
2508
|
+
"aria-label": k(s).blockActions.saveAsBlock,
|
|
2509
|
+
title: k(s).blockActions.saveAsBlock,
|
|
2510
|
+
onClick: F(ue, ["stop"])
|
|
2511
|
+
}, [w(k(Wn), {
|
|
2306
2512
|
size: 14,
|
|
2307
2513
|
"stroke-width": 1.5
|
|
2308
|
-
})], 8,
|
|
2514
|
+
})], 8, wi)) : N("", !0),
|
|
2309
2515
|
b("button", {
|
|
2310
2516
|
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",
|
|
2311
2517
|
"aria-label": k(s).blockActions.delete,
|
|
2312
2518
|
title: k(s).blockActions.delete,
|
|
2313
|
-
onClick:
|
|
2314
|
-
}, [w(k(
|
|
2519
|
+
onClick: F(ce, ["stop"])
|
|
2520
|
+
}, [w(k(zt), {
|
|
2315
2521
|
size: 14,
|
|
2316
2522
|
"stroke-width": 1.5
|
|
2317
|
-
})], 8,
|
|
2318
|
-
], 8,
|
|
2319
|
-
v.value ? (f(), x("div",
|
|
2523
|
+
})], 8, Ti)
|
|
2524
|
+
], 8, xi)) : N("", !0),
|
|
2525
|
+
v.value ? (f(), x("div", Ei, [b("span", Di, [w(k(Jn), {
|
|
2320
2526
|
size: 12,
|
|
2321
2527
|
"stroke-width": 1.5
|
|
2322
|
-
}), O(" " + p(k(c)(k(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) :
|
|
2323
|
-
E.value && !v.value ? (f(), x("div",
|
|
2324
|
-
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2528
|
+
}), O(" " + p(k(c)(k(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : N("", !0),
|
|
2529
|
+
E.value && !v.value ? (f(), x("div", Oi, [b("button", {
|
|
2530
|
+
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)]",
|
|
2325
2531
|
"aria-label": k(s).blockActions.conditionToggle,
|
|
2326
2532
|
title: e.block.displayCondition?.label,
|
|
2327
|
-
onClick:
|
|
2328
|
-
}, [w(k(
|
|
2533
|
+
onClick: F(de, ["stop"])
|
|
2534
|
+
}, [w(k(Yn), {
|
|
2329
2535
|
size: 12,
|
|
2330
2536
|
"stroke-width": 2
|
|
2331
|
-
})], 8,
|
|
2332
|
-
|
|
2333
|
-
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
2334
|
-
"aria-label": k(c)(k(s).blockActions.comments, { count: String(
|
|
2335
|
-
onClick: r[0] ||=
|
|
2336
|
-
}, [w(k(
|
|
2537
|
+
})], 8, ki)])) : N("", !0),
|
|
2538
|
+
ie.value > 0 && !v.value ? (f(), x("div", Ai, [b("button", {
|
|
2539
|
+
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
|
+
"aria-label": k(c)(k(s).blockActions.comments, { count: String(ie.value) }),
|
|
2541
|
+
onClick: r[0] ||= F((t) => k(j).comments?.openForBlock(e.block.id), ["stop"])
|
|
2542
|
+
}, [w(k(Rt), {
|
|
2337
2543
|
size: 12,
|
|
2338
2544
|
"stroke-width": 2.5
|
|
2339
|
-
}), O(" " + p(
|
|
2340
|
-
|
|
2545
|
+
}), O(" " + p(ie.value), 1)], 8, ji)])) : N("", !0),
|
|
2546
|
+
oe.value ? (f(), x("div", {
|
|
2341
2547
|
key: 4,
|
|
2342
2548
|
class: "tpl-section-wrapper",
|
|
2343
|
-
style: i(
|
|
2549
|
+
style: i(oe.value)
|
|
2344
2550
|
}, [b("div", {
|
|
2345
2551
|
class: "tpl-block-content",
|
|
2346
|
-
style: i(
|
|
2552
|
+
style: i(ae.value)
|
|
2347
2553
|
}, [T(t.$slots, "default", {}, void 0, !0)], 4)], 4)) : (f(), x("div", {
|
|
2348
2554
|
key: 5,
|
|
2349
2555
|
class: "tpl-block-content",
|
|
2350
|
-
style: i(
|
|
2556
|
+
style: i(ae.value)
|
|
2351
2557
|
}, [T(t.$slots, "default", {}, void 0, !0)], 4))
|
|
2352
|
-
], 10,
|
|
2558
|
+
], 10, bi));
|
|
2353
2559
|
}
|
|
2354
|
-
}), [["__scopeId", "data-v-
|
|
2560
|
+
}), [["__scopeId", "data-v-43c10a08"]]);
|
|
2355
2561
|
//#endregion
|
|
2356
2562
|
//#region src/utils/unwrapParagraph.ts
|
|
2357
|
-
function
|
|
2563
|
+
function Ni(e) {
|
|
2358
2564
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2359
2565
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2360
2566
|
}
|
|
2361
2567
|
//#endregion
|
|
2362
2568
|
//#region src/components/blocks/TitleBlock.vue
|
|
2363
|
-
var
|
|
2569
|
+
var Pi = /* @__PURE__ */ y({
|
|
2364
2570
|
__name: "TitleBlock",
|
|
2365
2571
|
props: {
|
|
2366
2572
|
block: {},
|
|
2367
2573
|
viewport: {}
|
|
2368
2574
|
},
|
|
2369
2575
|
setup(e) {
|
|
2370
|
-
let t = e, n = C(() => import("./TitleEditor-
|
|
2576
|
+
let t = e, n = C(() => import("./TitleEditor-Bhgzh-iQ.js")), { isEditing: r, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = pi(() => t.block.content), u = M(() => {
|
|
2371
2577
|
let e = {
|
|
2372
2578
|
fontSize: `${Ie[t.block.level]}px`,
|
|
2373
2579
|
textAlign: t.block.textAlign
|
|
2374
2580
|
};
|
|
2375
2581
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2376
|
-
}), p =
|
|
2582
|
+
}), p = M(() => `h${t.block.level}`), m = M(() => Ni(s.value));
|
|
2377
2583
|
return (t, s) => (f(), x("div", {
|
|
2378
2584
|
ref_key: "blockRef",
|
|
2379
2585
|
ref: a,
|
|
@@ -2399,88 +2605,88 @@ var Ei = /* @__PURE__ */ y({
|
|
|
2399
2605
|
});
|
|
2400
2606
|
//#endregion
|
|
2401
2607
|
//#region src/utils/sectionColumnDrop.ts
|
|
2402
|
-
function
|
|
2608
|
+
function Fi(e) {
|
|
2403
2609
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2404
2610
|
}
|
|
2405
2611
|
//#endregion
|
|
2406
2612
|
//#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
|
|
2407
|
-
var
|
|
2613
|
+
var Ii = Object.defineProperty, Li = Object.getOwnPropertySymbols, Ri = Object.prototype.hasOwnProperty, zi = Object.prototype.propertyIsEnumerable, Bi = (e, t, n) => t in e ? Ii(e, t, {
|
|
2408
2614
|
enumerable: !0,
|
|
2409
2615
|
configurable: !0,
|
|
2410
2616
|
writable: !0,
|
|
2411
2617
|
value: n
|
|
2412
|
-
}) : e[t] = n,
|
|
2413
|
-
for (var n in t ||= {})
|
|
2414
|
-
if (
|
|
2618
|
+
}) : e[t] = n, Vi = (e, t) => {
|
|
2619
|
+
for (var n in t ||= {}) Ri.call(t, n) && Bi(e, n, t[n]);
|
|
2620
|
+
if (Li) for (var n of Li(t)) zi.call(t, n) && Bi(e, n, t[n]);
|
|
2415
2621
|
return e;
|
|
2416
|
-
},
|
|
2622
|
+
}, Hi = (e, t) => {
|
|
2417
2623
|
var n = {};
|
|
2418
|
-
for (var r in e)
|
|
2419
|
-
if (e != null &&
|
|
2624
|
+
for (var r in e) Ri.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2625
|
+
if (e != null && Li) for (var r of Li(e)) t.indexOf(r) < 0 && zi.call(e, r) && (n[r] = e[r]);
|
|
2420
2626
|
return n;
|
|
2421
|
-
},
|
|
2422
|
-
function
|
|
2423
|
-
console.warn(
|
|
2627
|
+
}, Ui = "[vue-draggable-plus]: ";
|
|
2628
|
+
function Wi(e) {
|
|
2629
|
+
console.warn(Ui + e);
|
|
2424
2630
|
}
|
|
2425
|
-
function
|
|
2426
|
-
console.error(
|
|
2631
|
+
function Gi(e) {
|
|
2632
|
+
console.error(Ui + e);
|
|
2427
2633
|
}
|
|
2428
|
-
function
|
|
2634
|
+
function Ki(e, t, n) {
|
|
2429
2635
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2430
2636
|
}
|
|
2431
|
-
function
|
|
2637
|
+
function qi(e) {
|
|
2432
2638
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2433
2639
|
}
|
|
2434
|
-
function
|
|
2435
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2640
|
+
function Ji(e) {
|
|
2641
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[qi(n)] = e[n]), t), {});
|
|
2436
2642
|
}
|
|
2437
|
-
function
|
|
2643
|
+
function Yi(e, t) {
|
|
2438
2644
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2439
2645
|
}
|
|
2440
|
-
function
|
|
2646
|
+
function Xi(e, t, n) {
|
|
2441
2647
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2442
2648
|
}
|
|
2443
|
-
function
|
|
2649
|
+
function Zi(e) {
|
|
2444
2650
|
return e === void 0;
|
|
2445
2651
|
}
|
|
2446
|
-
function
|
|
2652
|
+
function Qi(e) {
|
|
2447
2653
|
return typeof e == "string";
|
|
2448
2654
|
}
|
|
2449
|
-
function
|
|
2655
|
+
function $i(e, t, n) {
|
|
2450
2656
|
let r = e.children[n];
|
|
2451
2657
|
e.insertBefore(t, r);
|
|
2452
2658
|
}
|
|
2453
|
-
function
|
|
2659
|
+
function ea(e) {
|
|
2454
2660
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2455
2661
|
}
|
|
2456
|
-
function
|
|
2662
|
+
function ta(e, t = document) {
|
|
2457
2663
|
let n = null;
|
|
2458
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2664
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Wi(`Element not found: ${e}`), n;
|
|
2459
2665
|
}
|
|
2460
|
-
function
|
|
2666
|
+
function na(e, t, n = null) {
|
|
2461
2667
|
return function(...r) {
|
|
2462
2668
|
return e.apply(n, r), t.apply(n, r);
|
|
2463
2669
|
};
|
|
2464
2670
|
}
|
|
2465
|
-
function
|
|
2466
|
-
let n =
|
|
2671
|
+
function ra(e, t) {
|
|
2672
|
+
let n = Vi({}, e);
|
|
2467
2673
|
return Object.keys(t).forEach((r) => {
|
|
2468
|
-
n[r] ? n[r] =
|
|
2674
|
+
n[r] ? n[r] = na(e[r], t[r]) : n[r] = t[r];
|
|
2469
2675
|
}), n;
|
|
2470
2676
|
}
|
|
2471
|
-
function
|
|
2677
|
+
function ia(e) {
|
|
2472
2678
|
return e instanceof HTMLElement;
|
|
2473
2679
|
}
|
|
2474
|
-
function
|
|
2680
|
+
function aa(e, t) {
|
|
2475
2681
|
Object.keys(e).forEach((n) => {
|
|
2476
2682
|
t(n, e[n]);
|
|
2477
2683
|
});
|
|
2478
2684
|
}
|
|
2479
|
-
function
|
|
2685
|
+
function oa(e) {
|
|
2480
2686
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2481
2687
|
}
|
|
2482
|
-
var
|
|
2483
|
-
function
|
|
2688
|
+
var sa = Object.assign;
|
|
2689
|
+
function ca(e, t) {
|
|
2484
2690
|
var n = Object.keys(e);
|
|
2485
2691
|
if (Object.getOwnPropertySymbols) {
|
|
2486
2692
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2490,26 +2696,26 @@ function ea(e, t) {
|
|
|
2490
2696
|
}
|
|
2491
2697
|
return n;
|
|
2492
2698
|
}
|
|
2493
|
-
function
|
|
2699
|
+
function la(e) {
|
|
2494
2700
|
for (var t = 1; t < arguments.length; t++) {
|
|
2495
2701
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2496
|
-
t % 2 ?
|
|
2497
|
-
|
|
2498
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2702
|
+
t % 2 ? ca(Object(n), !0).forEach(function(t) {
|
|
2703
|
+
da(e, t, n[t]);
|
|
2704
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ca(Object(n)).forEach(function(t) {
|
|
2499
2705
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2500
2706
|
});
|
|
2501
2707
|
}
|
|
2502
2708
|
return e;
|
|
2503
2709
|
}
|
|
2504
|
-
function
|
|
2710
|
+
function ua(e) {
|
|
2505
2711
|
"@babel/helpers - typeof";
|
|
2506
|
-
return
|
|
2712
|
+
return ua = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2507
2713
|
return typeof e;
|
|
2508
2714
|
} : function(e) {
|
|
2509
2715
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2510
|
-
},
|
|
2716
|
+
}, ua(e);
|
|
2511
2717
|
}
|
|
2512
|
-
function
|
|
2718
|
+
function da(e, t, n) {
|
|
2513
2719
|
return t in e ? Object.defineProperty(e, t, {
|
|
2514
2720
|
value: n,
|
|
2515
2721
|
enumerable: !0,
|
|
@@ -2517,45 +2723,45 @@ function ra(e, t, n) {
|
|
|
2517
2723
|
writable: !0
|
|
2518
2724
|
}) : e[t] = n, e;
|
|
2519
2725
|
}
|
|
2520
|
-
function
|
|
2521
|
-
return
|
|
2726
|
+
function fa() {
|
|
2727
|
+
return fa = Object.assign || function(e) {
|
|
2522
2728
|
for (var t = 1; t < arguments.length; t++) {
|
|
2523
2729
|
var n = arguments[t];
|
|
2524
2730
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2525
2731
|
}
|
|
2526
2732
|
return e;
|
|
2527
|
-
},
|
|
2733
|
+
}, fa.apply(this, arguments);
|
|
2528
2734
|
}
|
|
2529
|
-
function
|
|
2735
|
+
function pa(e, t) {
|
|
2530
2736
|
if (e == null) return {};
|
|
2531
2737
|
var n = {}, r = Object.keys(e), i, a;
|
|
2532
2738
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2533
2739
|
return n;
|
|
2534
2740
|
}
|
|
2535
|
-
function
|
|
2741
|
+
function ma(e, t) {
|
|
2536
2742
|
if (e == null) return {};
|
|
2537
|
-
var n =
|
|
2743
|
+
var n = pa(e, t), r, i;
|
|
2538
2744
|
if (Object.getOwnPropertySymbols) {
|
|
2539
2745
|
var a = Object.getOwnPropertySymbols(e);
|
|
2540
2746
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2541
2747
|
}
|
|
2542
2748
|
return n;
|
|
2543
2749
|
}
|
|
2544
|
-
var
|
|
2545
|
-
function
|
|
2750
|
+
var ha = "1.15.2";
|
|
2751
|
+
function ga(e) {
|
|
2546
2752
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2547
2753
|
}
|
|
2548
|
-
var
|
|
2754
|
+
var _a = ga(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), va = ga(/Edge/i), ya = ga(/firefox/i), ba = ga(/safari/i) && !ga(/chrome/i) && !ga(/android/i), xa = ga(/iP(ad|od|hone)/i), Sa = ga(/chrome/i) && ga(/android/i), Ca = {
|
|
2549
2755
|
capture: !1,
|
|
2550
2756
|
passive: !1
|
|
2551
2757
|
};
|
|
2552
|
-
function I(e, t, n) {
|
|
2553
|
-
e.addEventListener(t, n, !la && ha);
|
|
2554
|
-
}
|
|
2555
2758
|
function L(e, t, n) {
|
|
2556
|
-
e.
|
|
2759
|
+
e.addEventListener(t, n, !_a && Ca);
|
|
2760
|
+
}
|
|
2761
|
+
function R(e, t, n) {
|
|
2762
|
+
e.removeEventListener(t, n, !_a && Ca);
|
|
2557
2763
|
}
|
|
2558
|
-
function
|
|
2764
|
+
function wa(e, t) {
|
|
2559
2765
|
if (t) {
|
|
2560
2766
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2561
2767
|
if (e.matches) return e.matches(t);
|
|
@@ -2567,41 +2773,41 @@ function ga(e, t) {
|
|
|
2567
2773
|
return !1;
|
|
2568
2774
|
}
|
|
2569
2775
|
}
|
|
2570
|
-
function
|
|
2776
|
+
function Ta(e) {
|
|
2571
2777
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2572
2778
|
}
|
|
2573
|
-
function
|
|
2779
|
+
function Ea(e, t, n, r) {
|
|
2574
2780
|
if (e) {
|
|
2575
2781
|
n ||= document;
|
|
2576
2782
|
do {
|
|
2577
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2783
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && wa(e, t) : wa(e, t)) || r && e === n) return e;
|
|
2578
2784
|
if (e === n) break;
|
|
2579
|
-
} while (e =
|
|
2785
|
+
} while (e = Ta(e));
|
|
2580
2786
|
}
|
|
2581
2787
|
return null;
|
|
2582
2788
|
}
|
|
2583
|
-
var
|
|
2584
|
-
function R(e, t, n) {
|
|
2585
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(ya, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(ya, " "));
|
|
2586
|
-
}
|
|
2789
|
+
var Da = /\s+/g;
|
|
2587
2790
|
function z(e, t, n) {
|
|
2791
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Da, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Da, " "));
|
|
2792
|
+
}
|
|
2793
|
+
function B(e, t, n) {
|
|
2588
2794
|
var r = e && e.style;
|
|
2589
2795
|
if (r) {
|
|
2590
2796
|
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];
|
|
2591
2797
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2592
2798
|
}
|
|
2593
2799
|
}
|
|
2594
|
-
function
|
|
2800
|
+
function Oa(e, t) {
|
|
2595
2801
|
var n = "";
|
|
2596
2802
|
if (typeof e == "string") n = e;
|
|
2597
2803
|
else do {
|
|
2598
|
-
var r =
|
|
2804
|
+
var r = B(e, "transform");
|
|
2599
2805
|
r && r !== "none" && (n = r + " " + n);
|
|
2600
2806
|
} while (!t && (e = e.parentNode));
|
|
2601
2807
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2602
2808
|
return i && new i(n);
|
|
2603
2809
|
}
|
|
2604
|
-
function
|
|
2810
|
+
function ka(e, t, n) {
|
|
2605
2811
|
if (e) {
|
|
2606
2812
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2607
2813
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2609,21 +2815,21 @@ function xa(e, t, n) {
|
|
|
2609
2815
|
}
|
|
2610
2816
|
return [];
|
|
2611
2817
|
}
|
|
2612
|
-
function
|
|
2818
|
+
function Aa() {
|
|
2613
2819
|
return document.scrollingElement || document.documentElement;
|
|
2614
2820
|
}
|
|
2615
|
-
function
|
|
2821
|
+
function V(e, t, n, r, i) {
|
|
2616
2822
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2617
2823
|
var a, o, s, c, l, u, d;
|
|
2618
|
-
if (e !== window && e.parentNode && e !==
|
|
2619
|
-
if (i && i.getBoundingClientRect && (
|
|
2824
|
+
if (e !== window && e.parentNode && e !== Aa() ? (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, !_a)) do
|
|
2825
|
+
if (i && i.getBoundingClientRect && (B(i, "transform") !== "none" || n && B(i, "position") !== "static")) {
|
|
2620
2826
|
var f = i.getBoundingClientRect();
|
|
2621
|
-
o -= f.top + parseInt(
|
|
2827
|
+
o -= f.top + parseInt(B(i, "border-top-width")), s -= f.left + parseInt(B(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
2622
2828
|
break;
|
|
2623
2829
|
}
|
|
2624
2830
|
while (i = i.parentNode);
|
|
2625
2831
|
if (r && e !== window) {
|
|
2626
|
-
var p =
|
|
2832
|
+
var p = Oa(i || e), m = p && p.a, h = p && p.d;
|
|
2627
2833
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2628
2834
|
}
|
|
2629
2835
|
return {
|
|
@@ -2636,18 +2842,18 @@ function B(e, t, n, r, i) {
|
|
|
2636
2842
|
};
|
|
2637
2843
|
}
|
|
2638
2844
|
}
|
|
2639
|
-
function
|
|
2640
|
-
for (var r =
|
|
2641
|
-
var a =
|
|
2845
|
+
function ja(e, t, n) {
|
|
2846
|
+
for (var r = La(e, !0), i = V(e)[t]; r;) {
|
|
2847
|
+
var a = V(r)[n], o = void 0;
|
|
2642
2848
|
if (o = i >= a, !o) return r;
|
|
2643
|
-
if (r ===
|
|
2644
|
-
r =
|
|
2849
|
+
if (r === Aa()) break;
|
|
2850
|
+
r = La(r, !1);
|
|
2645
2851
|
}
|
|
2646
2852
|
return !1;
|
|
2647
2853
|
}
|
|
2648
|
-
function
|
|
2854
|
+
function Ma(e, t, n, r) {
|
|
2649
2855
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2650
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2856
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Ea(o[a], n.draggable, e, !1)) {
|
|
2651
2857
|
if (i === t) return o[a];
|
|
2652
2858
|
i++;
|
|
2653
2859
|
}
|
|
@@ -2655,96 +2861,96 @@ function wa(e, t, n, r) {
|
|
|
2655
2861
|
}
|
|
2656
2862
|
return null;
|
|
2657
2863
|
}
|
|
2658
|
-
function
|
|
2659
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost ||
|
|
2864
|
+
function Na(e, t) {
|
|
2865
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || B(n, "display") === "none" || t && !wa(n, t));) n = n.previousElementSibling;
|
|
2660
2866
|
return n || null;
|
|
2661
2867
|
}
|
|
2662
|
-
function
|
|
2868
|
+
function Pa(e, t) {
|
|
2663
2869
|
var n = 0;
|
|
2664
2870
|
if (!e || !e.parentNode) return -1;
|
|
2665
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2871
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || wa(e, t)) && n++;
|
|
2666
2872
|
return n;
|
|
2667
2873
|
}
|
|
2668
|
-
function
|
|
2669
|
-
var t = 0, n = 0, r =
|
|
2874
|
+
function Fa(e) {
|
|
2875
|
+
var t = 0, n = 0, r = Aa();
|
|
2670
2876
|
if (e) do {
|
|
2671
|
-
var i =
|
|
2877
|
+
var i = Oa(e), a = i.a, o = i.d;
|
|
2672
2878
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2673
2879
|
} while (e !== r && (e = e.parentNode));
|
|
2674
2880
|
return [t, n];
|
|
2675
2881
|
}
|
|
2676
|
-
function
|
|
2882
|
+
function Ia(e, t) {
|
|
2677
2883
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2678
2884
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2679
2885
|
}
|
|
2680
2886
|
return -1;
|
|
2681
2887
|
}
|
|
2682
|
-
function
|
|
2683
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2888
|
+
function La(e, t) {
|
|
2889
|
+
if (!e || !e.getBoundingClientRect) return Aa();
|
|
2684
2890
|
var n = e, r = !1;
|
|
2685
2891
|
do
|
|
2686
2892
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2687
|
-
var i =
|
|
2893
|
+
var i = B(n);
|
|
2688
2894
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2689
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2895
|
+
if (!n.getBoundingClientRect || n === document.body) return Aa();
|
|
2690
2896
|
if (r || t) return n;
|
|
2691
2897
|
r = !0;
|
|
2692
2898
|
}
|
|
2693
2899
|
}
|
|
2694
2900
|
while (n = n.parentNode);
|
|
2695
|
-
return
|
|
2901
|
+
return Aa();
|
|
2696
2902
|
}
|
|
2697
|
-
function
|
|
2903
|
+
function Ra(e, t) {
|
|
2698
2904
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2699
2905
|
return e;
|
|
2700
2906
|
}
|
|
2701
|
-
function
|
|
2907
|
+
function za(e, t) {
|
|
2702
2908
|
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);
|
|
2703
2909
|
}
|
|
2704
|
-
var
|
|
2705
|
-
function
|
|
2910
|
+
var Ba;
|
|
2911
|
+
function Va(e, t) {
|
|
2706
2912
|
return function() {
|
|
2707
|
-
if (!
|
|
2913
|
+
if (!Ba) {
|
|
2708
2914
|
var n = arguments, r = this;
|
|
2709
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2710
|
-
|
|
2915
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Ba = setTimeout(function() {
|
|
2916
|
+
Ba = void 0;
|
|
2711
2917
|
}, t);
|
|
2712
2918
|
}
|
|
2713
2919
|
};
|
|
2714
2920
|
}
|
|
2715
|
-
function
|
|
2716
|
-
clearTimeout(
|
|
2921
|
+
function Ha() {
|
|
2922
|
+
clearTimeout(Ba), Ba = void 0;
|
|
2717
2923
|
}
|
|
2718
|
-
function
|
|
2924
|
+
function Ua(e, t, n) {
|
|
2719
2925
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2720
2926
|
}
|
|
2721
|
-
function
|
|
2927
|
+
function Wa(e) {
|
|
2722
2928
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2723
2929
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2724
2930
|
}
|
|
2725
|
-
function
|
|
2931
|
+
function Ga(e, t, n) {
|
|
2726
2932
|
var r = {};
|
|
2727
2933
|
return Array.from(e.children).forEach(function(i) {
|
|
2728
|
-
if (!(!
|
|
2729
|
-
var a =
|
|
2934
|
+
if (!(!Ea(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
2935
|
+
var a = V(i);
|
|
2730
2936
|
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);
|
|
2731
2937
|
}
|
|
2732
2938
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2733
2939
|
}
|
|
2734
|
-
var
|
|
2735
|
-
function
|
|
2940
|
+
var H = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2941
|
+
function Ka() {
|
|
2736
2942
|
var e = [], t;
|
|
2737
2943
|
return {
|
|
2738
2944
|
captureAnimationState: function() {
|
|
2739
2945
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
2740
|
-
if (!(
|
|
2946
|
+
if (!(B(t, "display") === "none" || t === Q.ghost)) {
|
|
2741
2947
|
e.push({
|
|
2742
2948
|
target: t,
|
|
2743
|
-
rect:
|
|
2949
|
+
rect: V(t)
|
|
2744
2950
|
});
|
|
2745
|
-
var n =
|
|
2951
|
+
var n = la({}, e[e.length - 1].rect);
|
|
2746
2952
|
if (t.thisAnimationDuration) {
|
|
2747
|
-
var r =
|
|
2953
|
+
var r = Oa(t, !0);
|
|
2748
2954
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2749
2955
|
}
|
|
2750
2956
|
t.fromRect = n;
|
|
@@ -2755,7 +2961,7 @@ function Ra() {
|
|
|
2755
2961
|
e.push(t);
|
|
2756
2962
|
},
|
|
2757
2963
|
removeAnimationState: function(t) {
|
|
2758
|
-
e.splice(
|
|
2964
|
+
e.splice(Ia(e, { target: t }), 1);
|
|
2759
2965
|
},
|
|
2760
2966
|
animateAll: function(n) {
|
|
2761
2967
|
var r = this;
|
|
@@ -2765,8 +2971,8 @@ function Ra() {
|
|
|
2765
2971
|
}
|
|
2766
2972
|
var i = !1, a = 0;
|
|
2767
2973
|
e.forEach(function(e) {
|
|
2768
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
2769
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2974
|
+
var t = 0, n = e.target, o = n.fromRect, s = V(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Oa(n, !0);
|
|
2975
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && za(c, s) && !za(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ja(u, c, l, r.options)), za(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() {
|
|
2770
2976
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2771
2977
|
}, t), n.thisAnimationDuration = t);
|
|
2772
2978
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2775,27 +2981,27 @@ function Ra() {
|
|
|
2775
2981
|
},
|
|
2776
2982
|
animate: function(e, t, n, r) {
|
|
2777
2983
|
if (r) {
|
|
2778
|
-
|
|
2779
|
-
var i =
|
|
2780
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
2781
|
-
|
|
2984
|
+
B(e, "transition", ""), B(e, "transform", "");
|
|
2985
|
+
var i = Oa(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2986
|
+
e.animatingX = !!s, e.animatingY = !!c, B(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = qa(e), B(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), B(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2987
|
+
B(e, "transition", ""), B(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2782
2988
|
}, r);
|
|
2783
2989
|
}
|
|
2784
2990
|
}
|
|
2785
2991
|
};
|
|
2786
2992
|
}
|
|
2787
|
-
function
|
|
2993
|
+
function qa(e) {
|
|
2788
2994
|
return e.offsetWidth;
|
|
2789
2995
|
}
|
|
2790
|
-
function
|
|
2996
|
+
function Ja(e, t, n, r) {
|
|
2791
2997
|
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;
|
|
2792
2998
|
}
|
|
2793
|
-
var
|
|
2999
|
+
var Ya = [], Xa = { initializeByDefault: !0 }, Za = {
|
|
2794
3000
|
mount: function(e) {
|
|
2795
|
-
for (var t in
|
|
2796
|
-
|
|
3001
|
+
for (var t in Xa) Xa.hasOwnProperty(t) && !(t in e) && (e[t] = Xa[t]);
|
|
3002
|
+
Ya.forEach(function(t) {
|
|
2797
3003
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2798
|
-
}),
|
|
3004
|
+
}), Ya.push(e);
|
|
2799
3005
|
},
|
|
2800
3006
|
pluginEvent: function(e, t, n) {
|
|
2801
3007
|
var r = this;
|
|
@@ -2803,16 +3009,16 @@ var Va = [], Ha = { initializeByDefault: !0 }, Ua = {
|
|
|
2803
3009
|
r.eventCanceled = !0;
|
|
2804
3010
|
};
|
|
2805
3011
|
var i = e + "Global";
|
|
2806
|
-
|
|
2807
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
3012
|
+
Ya.forEach(function(r) {
|
|
3013
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](la({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](la({ sortable: t }, n)));
|
|
2808
3014
|
});
|
|
2809
3015
|
},
|
|
2810
3016
|
initializePlugins: function(e, t, n, r) {
|
|
2811
|
-
for (var i in
|
|
3017
|
+
for (var i in Ya.forEach(function(r) {
|
|
2812
3018
|
var i = r.pluginName;
|
|
2813
3019
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2814
3020
|
var a = new r(e, t, e.options);
|
|
2815
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
3021
|
+
a.sortable = e, a.options = e.options, e[i] = a, fa(n, a.defaults);
|
|
2816
3022
|
}
|
|
2817
3023
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2818
3024
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2821,59 +3027,59 @@ var Va = [], Ha = { initializeByDefault: !0 }, Ua = {
|
|
|
2821
3027
|
},
|
|
2822
3028
|
getEventProperties: function(e, t) {
|
|
2823
3029
|
var n = {};
|
|
2824
|
-
return
|
|
2825
|
-
typeof r.eventProperties == "function" &&
|
|
3030
|
+
return Ya.forEach(function(r) {
|
|
3031
|
+
typeof r.eventProperties == "function" && fa(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2826
3032
|
}), n;
|
|
2827
3033
|
},
|
|
2828
3034
|
modifyOption: function(e, t, n) {
|
|
2829
3035
|
var r;
|
|
2830
|
-
return
|
|
3036
|
+
return Ya.forEach(function(i) {
|
|
2831
3037
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2832
3038
|
}), r;
|
|
2833
3039
|
}
|
|
2834
3040
|
};
|
|
2835
|
-
function
|
|
3041
|
+
function Qa(e) {
|
|
2836
3042
|
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;
|
|
2837
|
-
if (t ||= n && n[
|
|
3043
|
+
if (t ||= n && n[H], t) {
|
|
2838
3044
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2839
|
-
window.CustomEvent && !
|
|
3045
|
+
window.CustomEvent && !_a && !va ? h = new CustomEvent(r, {
|
|
2840
3046
|
bubbles: !0,
|
|
2841
3047
|
cancelable: !0
|
|
2842
3048
|
}) : (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;
|
|
2843
|
-
var v =
|
|
3049
|
+
var v = la(la({}, m), Za.getEventProperties(r, t));
|
|
2844
3050
|
for (var y in v) h[y] = v[y];
|
|
2845
3051
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2846
3052
|
}
|
|
2847
3053
|
}
|
|
2848
|
-
var
|
|
2849
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2850
|
-
|
|
2851
|
-
dragEl:
|
|
2852
|
-
parentEl:
|
|
2853
|
-
ghostEl:
|
|
2854
|
-
rootEl:
|
|
2855
|
-
nextEl:
|
|
2856
|
-
lastDownEl:
|
|
2857
|
-
cloneEl:
|
|
2858
|
-
cloneHidden:
|
|
2859
|
-
dragStarted:
|
|
3054
|
+
var $a = ["evt"], U = function(e, t) {
|
|
3055
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = ma(n, $a);
|
|
3056
|
+
Za.pluginEvent.bind(Q)(e, t, la({
|
|
3057
|
+
dragEl: G,
|
|
3058
|
+
parentEl: K,
|
|
3059
|
+
ghostEl: q,
|
|
3060
|
+
rootEl: J,
|
|
3061
|
+
nextEl: eo,
|
|
3062
|
+
lastDownEl: to,
|
|
3063
|
+
cloneEl: Y,
|
|
3064
|
+
cloneHidden: no,
|
|
3065
|
+
dragStarted: vo,
|
|
2860
3066
|
putSortable: X,
|
|
2861
3067
|
activeSortable: Q.active,
|
|
2862
3068
|
originalEvent: r,
|
|
2863
|
-
oldIndex:
|
|
2864
|
-
oldDraggableIndex:
|
|
2865
|
-
newIndex:
|
|
2866
|
-
newDraggableIndex:
|
|
2867
|
-
hideGhostForTarget:
|
|
2868
|
-
unhideGhostForTarget:
|
|
3069
|
+
oldIndex: ro,
|
|
3070
|
+
oldDraggableIndex: ao,
|
|
3071
|
+
newIndex: io,
|
|
3072
|
+
newDraggableIndex: oo,
|
|
3073
|
+
hideGhostForTarget: Io,
|
|
3074
|
+
unhideGhostForTarget: Lo,
|
|
2869
3075
|
cloneNowHidden: function() {
|
|
2870
|
-
|
|
3076
|
+
no = !0;
|
|
2871
3077
|
},
|
|
2872
3078
|
cloneNowShown: function() {
|
|
2873
|
-
|
|
3079
|
+
no = !1;
|
|
2874
3080
|
},
|
|
2875
3081
|
dispatchSortableEvent: function(e) {
|
|
2876
|
-
|
|
3082
|
+
W({
|
|
2877
3083
|
sortable: t,
|
|
2878
3084
|
name: e,
|
|
2879
3085
|
originalEvent: r
|
|
@@ -2881,46 +3087,46 @@ var Ga = ["evt"], H = function(e, t) {
|
|
|
2881
3087
|
}
|
|
2882
3088
|
}, i));
|
|
2883
3089
|
};
|
|
2884
|
-
function
|
|
2885
|
-
|
|
3090
|
+
function W(e) {
|
|
3091
|
+
Qa(la({
|
|
2886
3092
|
putSortable: X,
|
|
2887
|
-
cloneEl:
|
|
2888
|
-
targetEl:
|
|
2889
|
-
rootEl:
|
|
2890
|
-
oldIndex:
|
|
2891
|
-
oldDraggableIndex:
|
|
2892
|
-
newIndex:
|
|
2893
|
-
newDraggableIndex:
|
|
3093
|
+
cloneEl: Y,
|
|
3094
|
+
targetEl: G,
|
|
3095
|
+
rootEl: J,
|
|
3096
|
+
oldIndex: ro,
|
|
3097
|
+
oldDraggableIndex: ao,
|
|
3098
|
+
newIndex: io,
|
|
3099
|
+
newDraggableIndex: oo
|
|
2894
3100
|
}, e));
|
|
2895
3101
|
}
|
|
2896
|
-
var
|
|
2897
|
-
if (
|
|
2898
|
-
if (
|
|
3102
|
+
var G, K, q, J, eo, to, Y, no, ro, io, ao, oo, so, X, co = !1, lo = !1, uo = [], fo, po, mo, ho, go, _o, vo, yo, bo, xo = !1, So = !1, Co, Z, wo = [], To = !1, Eo = [], Do = typeof document < "u", Oo = xa, ko = va || _a ? "cssFloat" : "float", Ao = Do && !Sa && !xa && "draggable" in document.createElement("div"), jo = function() {
|
|
3103
|
+
if (Do) {
|
|
3104
|
+
if (_a) return !1;
|
|
2899
3105
|
var e = document.createElement("x");
|
|
2900
3106
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2901
3107
|
}
|
|
2902
|
-
}(),
|
|
2903
|
-
var n =
|
|
3108
|
+
}(), Mo = function(e, t) {
|
|
3109
|
+
var n = B(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Ma(e, 0, t), a = Ma(e, 1, t), o = i && B(i), s = a && B(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + V(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + V(a).width;
|
|
2904
3110
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2905
3111
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2906
3112
|
if (i && o.float && o.float !== "none") {
|
|
2907
3113
|
var u = o.float === "left" ? "left" : "right";
|
|
2908
3114
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2909
3115
|
}
|
|
2910
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2911
|
-
},
|
|
3116
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[ko] === "none" || a && n[ko] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
3117
|
+
}, No = function(e, t, n) {
|
|
2912
3118
|
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;
|
|
2913
3119
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2914
|
-
},
|
|
3120
|
+
}, Po = function(e, t) {
|
|
2915
3121
|
var n;
|
|
2916
|
-
return
|
|
2917
|
-
var i = r[
|
|
2918
|
-
if (!(!i ||
|
|
2919
|
-
var a =
|
|
3122
|
+
return uo.some(function(r) {
|
|
3123
|
+
var i = r[H].options.emptyInsertThreshold;
|
|
3124
|
+
if (!(!i || Na(r))) {
|
|
3125
|
+
var a = V(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2920
3126
|
if (o && s) return n = r;
|
|
2921
3127
|
}
|
|
2922
3128
|
}), n;
|
|
2923
|
-
},
|
|
3129
|
+
}, Fo = function(e) {
|
|
2924
3130
|
function t(e, n) {
|
|
2925
3131
|
return function(r, i, a, o) {
|
|
2926
3132
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2933,31 +3139,31 @@ var W, G, K, q, Ka, qa, J, Ja, Ya, Y, Xa, Za, Qa, X, $a = !1, eo = !1, to = [],
|
|
|
2933
3139
|
};
|
|
2934
3140
|
}
|
|
2935
3141
|
var n = {}, r = e.group;
|
|
2936
|
-
(!r ||
|
|
2937
|
-
},
|
|
2938
|
-
!
|
|
2939
|
-
},
|
|
2940
|
-
!
|
|
3142
|
+
(!r || ua(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;
|
|
3143
|
+
}, Io = function() {
|
|
3144
|
+
!jo && q && B(q, "display", "none");
|
|
3145
|
+
}, Lo = function() {
|
|
3146
|
+
!jo && q && B(q, "display", "");
|
|
2941
3147
|
};
|
|
2942
|
-
|
|
2943
|
-
if (
|
|
3148
|
+
Do && !Sa && document.addEventListener("click", function(e) {
|
|
3149
|
+
if (lo) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), lo = !1, !1;
|
|
2944
3150
|
}, !0);
|
|
2945
|
-
var
|
|
2946
|
-
if (
|
|
3151
|
+
var Ro = function(e) {
|
|
3152
|
+
if (G) {
|
|
2947
3153
|
e = e.touches ? e.touches[0] : e;
|
|
2948
|
-
var t =
|
|
3154
|
+
var t = Po(e.clientX, e.clientY);
|
|
2949
3155
|
if (t) {
|
|
2950
3156
|
var n = {};
|
|
2951
3157
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2952
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
3158
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[H]._onDragOver(n);
|
|
2953
3159
|
}
|
|
2954
3160
|
}
|
|
2955
|
-
},
|
|
2956
|
-
|
|
3161
|
+
}, zo = function(e) {
|
|
3162
|
+
G && G.parentNode[H]._isOutsideThisEl(e.target);
|
|
2957
3163
|
};
|
|
2958
3164
|
function Q(e, t) {
|
|
2959
3165
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2960
|
-
this.el = e, this.options = t =
|
|
3166
|
+
this.el = e, this.options = t = fa({}, t), e[H] = this;
|
|
2961
3167
|
var n = {
|
|
2962
3168
|
group: null,
|
|
2963
3169
|
sort: !0,
|
|
@@ -2970,7 +3176,7 @@ function Q(e, t) {
|
|
|
2970
3176
|
invertedSwapThreshold: null,
|
|
2971
3177
|
removeCloneOnHide: !0,
|
|
2972
3178
|
direction: function() {
|
|
2973
|
-
return
|
|
3179
|
+
return Mo(e, this.options);
|
|
2974
3180
|
},
|
|
2975
3181
|
ghostClass: "sortable-ghost",
|
|
2976
3182
|
chosenClass: "sortable-chosen",
|
|
@@ -2997,80 +3203,80 @@ function Q(e, t) {
|
|
|
2997
3203
|
x: 0,
|
|
2998
3204
|
y: 0
|
|
2999
3205
|
},
|
|
3000
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
3206
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !ba,
|
|
3001
3207
|
emptyInsertThreshold: 5
|
|
3002
3208
|
};
|
|
3003
|
-
for (var r in
|
|
3004
|
-
for (var i in
|
|
3005
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
3209
|
+
for (var r in Za.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
3210
|
+
for (var i in Fo(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
3211
|
+
this.nativeDraggable = !t.forceFallback && Ao, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? L(e, "pointerdown", this._onTapStart) : (L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart)), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), uo.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), fa(this, Ka());
|
|
3006
3212
|
}
|
|
3007
3213
|
Q.prototype = {
|
|
3008
3214
|
constructor: Q,
|
|
3009
3215
|
_isOutsideThisEl: function(e) {
|
|
3010
|
-
!this.el.contains(e) && e !== this.el && (
|
|
3216
|
+
!this.el.contains(e) && e !== this.el && (yo = null);
|
|
3011
3217
|
},
|
|
3012
3218
|
_getDirection: function(e, t) {
|
|
3013
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t,
|
|
3219
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, G) : this.options.direction;
|
|
3014
3220
|
},
|
|
3015
3221
|
_onTapStart: function(e) {
|
|
3016
3222
|
if (e.cancelable) {
|
|
3017
3223
|
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;
|
|
3018
|
-
if (
|
|
3019
|
-
if (
|
|
3224
|
+
if (Yo(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && ba && s && s.tagName.toUpperCase() === "SELECT") && (s = Ea(s, r.draggable, n, !1), !(s && s.animated) && to !== s)) {
|
|
3225
|
+
if (ro = Pa(s), ao = Pa(s, r.draggable), typeof l == "function") {
|
|
3020
3226
|
if (l.call(this, e, s, this)) {
|
|
3021
|
-
|
|
3227
|
+
W({
|
|
3022
3228
|
sortable: t,
|
|
3023
3229
|
rootEl: c,
|
|
3024
3230
|
name: "filter",
|
|
3025
3231
|
targetEl: s,
|
|
3026
3232
|
toEl: n,
|
|
3027
3233
|
fromEl: n
|
|
3028
|
-
}),
|
|
3234
|
+
}), U("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
3029
3235
|
return;
|
|
3030
3236
|
}
|
|
3031
3237
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
3032
|
-
if (r =
|
|
3238
|
+
if (r = Ea(c, r.trim(), n, !1), r) return W({
|
|
3033
3239
|
sortable: t,
|
|
3034
3240
|
rootEl: r,
|
|
3035
3241
|
name: "filter",
|
|
3036
3242
|
targetEl: s,
|
|
3037
3243
|
fromEl: n,
|
|
3038
3244
|
toEl: n
|
|
3039
|
-
}),
|
|
3245
|
+
}), U("filter", t, { evt: e }), !0;
|
|
3040
3246
|
}), l)) {
|
|
3041
3247
|
i && e.cancelable && e.preventDefault();
|
|
3042
3248
|
return;
|
|
3043
3249
|
}
|
|
3044
|
-
r.handle && !
|
|
3250
|
+
r.handle && !Ea(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
3045
3251
|
}
|
|
3046
3252
|
}
|
|
3047
3253
|
},
|
|
3048
3254
|
_prepareDragStart: function(e, t, n) {
|
|
3049
3255
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
3050
|
-
if (n && !
|
|
3051
|
-
var c =
|
|
3052
|
-
if (
|
|
3053
|
-
target:
|
|
3256
|
+
if (n && !G && n.parentNode === i) {
|
|
3257
|
+
var c = V(n);
|
|
3258
|
+
if (J = i, G = n, K = G.parentNode, eo = G.nextSibling, to = n, so = a.group, Q.dragged = G, fo = {
|
|
3259
|
+
target: G,
|
|
3054
3260
|
clientX: (t || e).clientX,
|
|
3055
3261
|
clientY: (t || e).clientY
|
|
3056
|
-
},
|
|
3057
|
-
if (
|
|
3262
|
+
}, go = fo.clientX - c.left, _o = fo.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
|
|
3263
|
+
if (U("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
3058
3264
|
r._onDrop();
|
|
3059
3265
|
return;
|
|
3060
3266
|
}
|
|
3061
|
-
r._disableDelayedDragEvents(), !
|
|
3267
|
+
r._disableDelayedDragEvents(), !ya && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), W({
|
|
3062
3268
|
sortable: r,
|
|
3063
3269
|
name: "choose",
|
|
3064
3270
|
originalEvent: e
|
|
3065
|
-
}),
|
|
3271
|
+
}), z(G, a.chosenClass, !0);
|
|
3066
3272
|
}, a.ignore.split(",").forEach(function(e) {
|
|
3067
|
-
|
|
3068
|
-
}),
|
|
3273
|
+
ka(G, e.trim(), Ho);
|
|
3274
|
+
}), L(o, "dragover", Ro), L(o, "mousemove", Ro), L(o, "touchmove", Ro), L(o, "mouseup", r._onDrop), L(o, "touchend", r._onDrop), L(o, "touchcancel", r._onDrop), ya && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), U("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(va || _a))) {
|
|
3069
3275
|
if (Q.eventCanceled) {
|
|
3070
3276
|
this._onDrop();
|
|
3071
3277
|
return;
|
|
3072
3278
|
}
|
|
3073
|
-
|
|
3279
|
+
L(o, "mouseup", r._disableDelayedDrag), L(o, "touchend", r._disableDelayedDrag), L(o, "touchcancel", r._disableDelayedDrag), L(o, "mousemove", r._delayedDragTouchMoveHandler), L(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && L(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
3074
3280
|
} else s();
|
|
3075
3281
|
}
|
|
3076
3282
|
},
|
|
@@ -3079,25 +3285,25 @@ Q.prototype = {
|
|
|
3079
3285
|
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();
|
|
3080
3286
|
},
|
|
3081
3287
|
_disableDelayedDrag: function() {
|
|
3082
|
-
|
|
3288
|
+
G && Ho(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3083
3289
|
},
|
|
3084
3290
|
_disableDelayedDragEvents: function() {
|
|
3085
3291
|
var e = this.el.ownerDocument;
|
|
3086
|
-
|
|
3292
|
+
R(e, "mouseup", this._disableDelayedDrag), R(e, "touchend", this._disableDelayedDrag), R(e, "touchcancel", this._disableDelayedDrag), R(e, "mousemove", this._delayedDragTouchMoveHandler), R(e, "touchmove", this._delayedDragTouchMoveHandler), R(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
3087
3293
|
},
|
|
3088
3294
|
_triggerDragStart: function(e, t) {
|
|
3089
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
3295
|
+
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? L(document, "pointermove", this._onTouchMove) : t ? L(document, "touchmove", this._onTouchMove) : L(document, "mousemove", this._onTouchMove) : (L(G, "dragend", this), L(J, "dragstart", this._onDragStart));
|
|
3090
3296
|
try {
|
|
3091
|
-
document.selection ?
|
|
3297
|
+
document.selection ? Xo(function() {
|
|
3092
3298
|
document.selection.empty();
|
|
3093
3299
|
}) : window.getSelection().removeAllRanges();
|
|
3094
3300
|
} catch {}
|
|
3095
3301
|
},
|
|
3096
3302
|
_dragStarted: function(e, t) {
|
|
3097
|
-
if (
|
|
3098
|
-
|
|
3303
|
+
if (co = !1, J && G) {
|
|
3304
|
+
U("dragStarted", this, { evt: t }), this.nativeDraggable && L(document, "dragover", zo);
|
|
3099
3305
|
var n = this.options;
|
|
3100
|
-
!e &&
|
|
3306
|
+
!e && z(G, n.dragClass, !1), z(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), W({
|
|
3101
3307
|
sortable: this,
|
|
3102
3308
|
name: "start",
|
|
3103
3309
|
originalEvent: t
|
|
@@ -3105,33 +3311,33 @@ Q.prototype = {
|
|
|
3105
3311
|
} else this._nulling();
|
|
3106
3312
|
},
|
|
3107
3313
|
_emulateDragOver: function() {
|
|
3108
|
-
if (
|
|
3109
|
-
this._lastX =
|
|
3110
|
-
for (var e = document.elementFromPoint(
|
|
3111
|
-
if (
|
|
3112
|
-
if (t[
|
|
3314
|
+
if (po) {
|
|
3315
|
+
this._lastX = po.clientX, this._lastY = po.clientY, Io();
|
|
3316
|
+
for (var e = document.elementFromPoint(po.clientX, po.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(po.clientX, po.clientY), e !== t);) t = e;
|
|
3317
|
+
if (G.parentNode[H]._isOutsideThisEl(e), t) do {
|
|
3318
|
+
if (t[H]) {
|
|
3113
3319
|
var n = void 0;
|
|
3114
|
-
if (n = t[
|
|
3115
|
-
clientX:
|
|
3116
|
-
clientY:
|
|
3320
|
+
if (n = t[H]._onDragOver({
|
|
3321
|
+
clientX: po.clientX,
|
|
3322
|
+
clientY: po.clientY,
|
|
3117
3323
|
target: e,
|
|
3118
3324
|
rootEl: t
|
|
3119
3325
|
}), n && !this.options.dragoverBubble) break;
|
|
3120
3326
|
}
|
|
3121
3327
|
e = t;
|
|
3122
3328
|
} while (t = t.parentNode);
|
|
3123
|
-
|
|
3329
|
+
Lo();
|
|
3124
3330
|
}
|
|
3125
3331
|
},
|
|
3126
3332
|
_onTouchMove: function(e) {
|
|
3127
|
-
if (
|
|
3128
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a =
|
|
3129
|
-
if (!Q.active &&
|
|
3333
|
+
if (fo) {
|
|
3334
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && Oa(q, !0), o = q && a && a.a, s = q && a && a.d, c = Oo && Z && Fa(Z), l = (i.clientX - fo.clientX + r.x) / (o || 1) + (c ? c[0] - wo[0] : 0) / (o || 1), u = (i.clientY - fo.clientY + r.y) / (s || 1) + (c ? c[1] - wo[1] : 0) / (s || 1);
|
|
3335
|
+
if (!Q.active && !co) {
|
|
3130
3336
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3131
3337
|
this._onDragStart(e, !0);
|
|
3132
3338
|
}
|
|
3133
|
-
if (
|
|
3134
|
-
a ? (a.e += l - (
|
|
3339
|
+
if (q) {
|
|
3340
|
+
a ? (a.e += l - (mo || 0), a.f += u - (ho || 0)) : a = {
|
|
3135
3341
|
a: 1,
|
|
3136
3342
|
b: 0,
|
|
3137
3343
|
c: 0,
|
|
@@ -3140,39 +3346,39 @@ Q.prototype = {
|
|
|
3140
3346
|
f: u
|
|
3141
3347
|
};
|
|
3142
3348
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3143
|
-
|
|
3349
|
+
B(q, "webkitTransform", d), B(q, "mozTransform", d), B(q, "msTransform", d), B(q, "transform", d), mo = l, ho = u, po = i;
|
|
3144
3350
|
}
|
|
3145
3351
|
e.cancelable && e.preventDefault();
|
|
3146
3352
|
}
|
|
3147
3353
|
},
|
|
3148
3354
|
_appendGhost: function() {
|
|
3149
|
-
if (!
|
|
3150
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
3151
|
-
if (
|
|
3152
|
-
for (Z = e;
|
|
3153
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
3355
|
+
if (!q) {
|
|
3356
|
+
var e = this.options.fallbackOnBody ? document.body : J, t = V(G, !0, Oo, !0, e), n = this.options;
|
|
3357
|
+
if (Oo) {
|
|
3358
|
+
for (Z = e; B(Z, "position") === "static" && B(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
3359
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Aa()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Aa(), wo = Fa(Z);
|
|
3154
3360
|
}
|
|
3155
|
-
|
|
3361
|
+
q = G.cloneNode(!0), z(q, n.ghostClass, !1), z(q, n.fallbackClass, !0), z(q, n.dragClass, !0), B(q, "transition", ""), B(q, "transform", ""), B(q, "box-sizing", "border-box"), B(q, "margin", 0), B(q, "top", t.top), B(q, "left", t.left), B(q, "width", t.width), B(q, "height", t.height), B(q, "opacity", "0.8"), B(q, "position", Oo ? "absolute" : "fixed"), B(q, "zIndex", "100000"), B(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), B(q, "transform-origin", go / parseInt(q.style.width) * 100 + "% " + _o / parseInt(q.style.height) * 100 + "%");
|
|
3156
3362
|
}
|
|
3157
3363
|
},
|
|
3158
3364
|
_onDragStart: function(e, t) {
|
|
3159
3365
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
3160
|
-
if (
|
|
3366
|
+
if (U("dragStart", this, { evt: e }), Q.eventCanceled) {
|
|
3161
3367
|
this._onDrop();
|
|
3162
3368
|
return;
|
|
3163
3369
|
}
|
|
3164
|
-
|
|
3165
|
-
|
|
3370
|
+
U("setupClone", this), Q.eventCanceled || (Y = Wa(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), z(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = Xo(function() {
|
|
3371
|
+
U("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || J.insertBefore(Y, G), n._hideClone(), W({
|
|
3166
3372
|
sortable: n,
|
|
3167
3373
|
name: "clone"
|
|
3168
3374
|
}));
|
|
3169
|
-
}), !t &&
|
|
3375
|
+
}), !t && z(G, i.dragClass, !0), t ? (lo = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (R(document, "mouseup", n._onDrop), R(document, "touchend", n._onDrop), R(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, G)), L(document, "drop", n), B(G, "transform", "translateZ(0)")), co = !0, n._dragStartId = Xo(n._dragStarted.bind(n, t, e)), L(document, "selectstart", n), vo = !0, ba && B(document.body, "user-select", "none");
|
|
3170
3376
|
},
|
|
3171
3377
|
_onDragOver: function(e) {
|
|
3172
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3173
|
-
if (
|
|
3378
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = so === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
3379
|
+
if (To) return;
|
|
3174
3380
|
function h(o, s) {
|
|
3175
|
-
|
|
3381
|
+
U(o, p, la({
|
|
3176
3382
|
evt: e,
|
|
3177
3383
|
isOwner: l,
|
|
3178
3384
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3184,7 +3390,7 @@ Q.prototype = {
|
|
|
3184
3390
|
target: n,
|
|
3185
3391
|
completed: _,
|
|
3186
3392
|
onMove: function(n, i) {
|
|
3187
|
-
return
|
|
3393
|
+
return Vo(J, t, G, r, n, V(n), e, i);
|
|
3188
3394
|
},
|
|
3189
3395
|
changed: v
|
|
3190
3396
|
}, s));
|
|
@@ -3193,119 +3399,119 @@ Q.prototype = {
|
|
|
3193
3399
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
3194
3400
|
}
|
|
3195
3401
|
function _(r) {
|
|
3196
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
3402
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (z(G, X ? X.options.ghostClass : c.options.ghostClass, !1), z(G, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
3197
3403
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3198
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n ===
|
|
3404
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (yo = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[H]._isOutsideThisEl(e.target), !r && Ro(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3199
3405
|
}
|
|
3200
3406
|
function v() {
|
|
3201
|
-
|
|
3407
|
+
io = Pa(G), oo = Pa(G, o.draggable), W({
|
|
3202
3408
|
sortable: p,
|
|
3203
3409
|
name: "change",
|
|
3204
3410
|
toEl: t,
|
|
3205
|
-
newIndex:
|
|
3206
|
-
newDraggableIndex:
|
|
3411
|
+
newIndex: io,
|
|
3412
|
+
newDraggableIndex: oo,
|
|
3207
3413
|
originalEvent: e
|
|
3208
3414
|
});
|
|
3209
3415
|
}
|
|
3210
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3211
|
-
if (
|
|
3212
|
-
if (
|
|
3213
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
3214
|
-
if (a) return
|
|
3215
|
-
var y =
|
|
3216
|
-
if (!y ||
|
|
3217
|
-
if (y ===
|
|
3218
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
3219
|
-
} else if (y &&
|
|
3220
|
-
var b =
|
|
3221
|
-
if (b ===
|
|
3222
|
-
if (n = b, i =
|
|
3416
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Ea(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3417
|
+
if (G.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3418
|
+
if (lo = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = so.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
|
|
3419
|
+
if (f = this._getDirection(e, n) === "vertical", r = V(G), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3420
|
+
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (eo ? J.insertBefore(G, eo) : J.appendChild(G)), _(!0);
|
|
3421
|
+
var y = Na(t, o.draggable);
|
|
3422
|
+
if (!y || Go(e, f, this) && !y.animated) {
|
|
3423
|
+
if (y === G) return _(!1);
|
|
3424
|
+
if (y && t === e.target && (n = y), n && (i = V(n)), Vo(J, t, G, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(G, y.nextSibling) : t.appendChild(G), K = t, v(), _(!0);
|
|
3425
|
+
} else if (y && Wo(e, f, this)) {
|
|
3426
|
+
var b = Ma(t, 0, o, !0);
|
|
3427
|
+
if (b === G) return _(!1);
|
|
3428
|
+
if (n = b, i = V(n), Vo(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
|
|
3223
3429
|
} else if (n.parentNode === t) {
|
|
3224
|
-
i =
|
|
3225
|
-
var x = 0, S, C =
|
|
3226
|
-
|
|
3430
|
+
i = V(n);
|
|
3431
|
+
var x = 0, S, C = G.parentNode !== t, w = !No(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = ja(n, "top", "top") || ja(G, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
3432
|
+
yo !== n && (S = i[T], xo = !1, So = !w && o.invertSwap || C), x = Ko(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, So, yo === n);
|
|
3227
3433
|
var O;
|
|
3228
3434
|
if (x !== 0) {
|
|
3229
|
-
var k =
|
|
3435
|
+
var k = Pa(G);
|
|
3230
3436
|
do
|
|
3231
|
-
k -= x, O =
|
|
3232
|
-
while (O && (
|
|
3437
|
+
k -= x, O = K.children[k];
|
|
3438
|
+
while (O && (B(O, "display") === "none" || O === q));
|
|
3233
3439
|
}
|
|
3234
3440
|
if (x === 0 || O === n) return _(!1);
|
|
3235
|
-
|
|
3236
|
-
var
|
|
3237
|
-
|
|
3238
|
-
var
|
|
3239
|
-
if (
|
|
3441
|
+
yo = n, bo = x;
|
|
3442
|
+
var A = n.nextElementSibling, j = !1;
|
|
3443
|
+
j = x === 1;
|
|
3444
|
+
var ee = Vo(J, t, G, r, n, i, e, j);
|
|
3445
|
+
if (ee !== !1) return (ee === 1 || ee === -1) && (j = ee === 1), To = !0, setTimeout(Uo, 30), g(), j && !A ? t.appendChild(G) : n.parentNode.insertBefore(G, j ? A : n), E && Ua(E, 0, D - E.scrollTop), K = G.parentNode, S !== void 0 && !So && (Co = Math.abs(S - V(n)[T])), v(), _(!0);
|
|
3240
3446
|
}
|
|
3241
|
-
if (t.contains(
|
|
3447
|
+
if (t.contains(G)) return _(!1);
|
|
3242
3448
|
}
|
|
3243
3449
|
return !1;
|
|
3244
3450
|
},
|
|
3245
3451
|
_ignoreWhileAnimating: null,
|
|
3246
3452
|
_offMoveEvents: function() {
|
|
3247
|
-
|
|
3453
|
+
R(document, "mousemove", this._onTouchMove), R(document, "touchmove", this._onTouchMove), R(document, "pointermove", this._onTouchMove), R(document, "dragover", Ro), R(document, "mousemove", Ro), R(document, "touchmove", Ro);
|
|
3248
3454
|
},
|
|
3249
3455
|
_offUpEvents: function() {
|
|
3250
3456
|
var e = this.el.ownerDocument;
|
|
3251
|
-
|
|
3457
|
+
R(e, "mouseup", this._onDrop), R(e, "touchend", this._onDrop), R(e, "pointerup", this._onDrop), R(e, "touchcancel", this._onDrop), R(document, "selectstart", this);
|
|
3252
3458
|
},
|
|
3253
3459
|
_onDrop: function(e) {
|
|
3254
3460
|
var t = this.el, n = this.options;
|
|
3255
|
-
if (
|
|
3461
|
+
if (io = Pa(G), oo = Pa(G, n.draggable), U("drop", this, { evt: e }), K = G && G.parentNode, io = Pa(G), oo = Pa(G, n.draggable), Q.eventCanceled) {
|
|
3256
3462
|
this._nulling();
|
|
3257
3463
|
return;
|
|
3258
3464
|
}
|
|
3259
|
-
|
|
3465
|
+
co = !1, So = !1, xo = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Zo(this.cloneId), Zo(this._dragStartId), this.nativeDraggable && (R(document, "drop", this), R(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), ba && B(document.body, "user-select", ""), B(G, "transform", ""), e && (vo && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), q && q.parentNode && q.parentNode.removeChild(q), (J === K || X && X.lastPutMode !== "clone") && Y && Y.parentNode && Y.parentNode.removeChild(Y), G && (this.nativeDraggable && R(G, "dragend", this), Ho(G), G.style["will-change"] = "", vo && !co && z(G, X ? X.options.ghostClass : this.options.ghostClass, !1), z(G, this.options.chosenClass, !1), W({
|
|
3260
3466
|
sortable: this,
|
|
3261
3467
|
name: "unchoose",
|
|
3262
|
-
toEl:
|
|
3468
|
+
toEl: K,
|
|
3263
3469
|
newIndex: null,
|
|
3264
3470
|
newDraggableIndex: null,
|
|
3265
3471
|
originalEvent: e
|
|
3266
|
-
}),
|
|
3472
|
+
}), J === K ? io !== ro && io >= 0 && (W({
|
|
3267
3473
|
sortable: this,
|
|
3268
3474
|
name: "update",
|
|
3269
|
-
toEl:
|
|
3475
|
+
toEl: K,
|
|
3270
3476
|
originalEvent: e
|
|
3271
|
-
}),
|
|
3477
|
+
}), W({
|
|
3272
3478
|
sortable: this,
|
|
3273
3479
|
name: "sort",
|
|
3274
|
-
toEl:
|
|
3480
|
+
toEl: K,
|
|
3275
3481
|
originalEvent: e
|
|
3276
|
-
})) : (
|
|
3277
|
-
rootEl:
|
|
3482
|
+
})) : (io >= 0 && (W({
|
|
3483
|
+
rootEl: K,
|
|
3278
3484
|
name: "add",
|
|
3279
|
-
toEl:
|
|
3280
|
-
fromEl:
|
|
3485
|
+
toEl: K,
|
|
3486
|
+
fromEl: J,
|
|
3281
3487
|
originalEvent: e
|
|
3282
|
-
}),
|
|
3488
|
+
}), W({
|
|
3283
3489
|
sortable: this,
|
|
3284
3490
|
name: "remove",
|
|
3285
|
-
toEl:
|
|
3491
|
+
toEl: K,
|
|
3286
3492
|
originalEvent: e
|
|
3287
|
-
}),
|
|
3288
|
-
rootEl:
|
|
3493
|
+
}), W({
|
|
3494
|
+
rootEl: K,
|
|
3289
3495
|
name: "sort",
|
|
3290
|
-
toEl:
|
|
3291
|
-
fromEl:
|
|
3496
|
+
toEl: K,
|
|
3497
|
+
fromEl: J,
|
|
3292
3498
|
originalEvent: e
|
|
3293
|
-
}),
|
|
3499
|
+
}), W({
|
|
3294
3500
|
sortable: this,
|
|
3295
3501
|
name: "sort",
|
|
3296
|
-
toEl:
|
|
3502
|
+
toEl: K,
|
|
3297
3503
|
originalEvent: e
|
|
3298
|
-
})), X && X.save()), Q.active && ((
|
|
3504
|
+
})), X && X.save()), Q.active && ((io == null || io === -1) && (io = ro, oo = ao), W({
|
|
3299
3505
|
sortable: this,
|
|
3300
3506
|
name: "end",
|
|
3301
|
-
toEl:
|
|
3507
|
+
toEl: K,
|
|
3302
3508
|
originalEvent: e
|
|
3303
3509
|
}), this.save()))), this._nulling();
|
|
3304
3510
|
},
|
|
3305
3511
|
_nulling: function() {
|
|
3306
|
-
|
|
3512
|
+
U("nulling", this), J = G = K = q = eo = Y = to = no = fo = po = vo = io = oo = ro = ao = yo = bo = X = so = Q.dragged = Q.ghost = Q.clone = Q.active = null, Eo.forEach(function(e) {
|
|
3307
3513
|
e.checked = !0;
|
|
3308
|
-
}),
|
|
3514
|
+
}), Eo.length = mo = ho = 0;
|
|
3309
3515
|
},
|
|
3310
3516
|
handleEvent: function(e) {
|
|
3311
3517
|
switch (e.type) {
|
|
@@ -3315,7 +3521,7 @@ Q.prototype = {
|
|
|
3315
3521
|
break;
|
|
3316
3522
|
case "dragenter":
|
|
3317
3523
|
case "dragover":
|
|
3318
|
-
|
|
3524
|
+
G && (this._onDragOver(e), Bo(e));
|
|
3319
3525
|
break;
|
|
3320
3526
|
case "selectstart":
|
|
3321
3527
|
e.preventDefault();
|
|
@@ -3323,14 +3529,14 @@ Q.prototype = {
|
|
|
3323
3529
|
}
|
|
3324
3530
|
},
|
|
3325
3531
|
toArray: function() {
|
|
3326
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3532
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ea(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Jo(t));
|
|
3327
3533
|
return e;
|
|
3328
3534
|
},
|
|
3329
3535
|
sort: function(e, t) {
|
|
3330
3536
|
var n = {}, r = this.el;
|
|
3331
3537
|
this.toArray().forEach(function(e, t) {
|
|
3332
3538
|
var i = r.children[t];
|
|
3333
|
-
|
|
3539
|
+
Ea(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3334
3540
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3335
3541
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3336
3542
|
}), t && this.animateAll();
|
|
@@ -3340,25 +3546,25 @@ Q.prototype = {
|
|
|
3340
3546
|
e && e.set && e.set(this);
|
|
3341
3547
|
},
|
|
3342
3548
|
closest: function(e, t) {
|
|
3343
|
-
return
|
|
3549
|
+
return Ea(e, t || this.options.draggable, this.el, !1);
|
|
3344
3550
|
},
|
|
3345
3551
|
option: function(e, t) {
|
|
3346
3552
|
var n = this.options;
|
|
3347
3553
|
if (t === void 0) return n[e];
|
|
3348
|
-
var r =
|
|
3349
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
3554
|
+
var r = Za.modifyOption(this, e, t);
|
|
3555
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && Fo(n);
|
|
3350
3556
|
},
|
|
3351
3557
|
destroy: function() {
|
|
3352
|
-
|
|
3558
|
+
U("destroy", this);
|
|
3353
3559
|
var e = this.el;
|
|
3354
|
-
e[
|
|
3560
|
+
e[H] = null, R(e, "mousedown", this._onTapStart), R(e, "touchstart", this._onTapStart), R(e, "pointerdown", this._onTapStart), this.nativeDraggable && (R(e, "dragover", this), R(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3355
3561
|
e.removeAttribute("draggable");
|
|
3356
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3562
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), uo.splice(uo.indexOf(this.el), 1), this.el = e = null;
|
|
3357
3563
|
},
|
|
3358
3564
|
_hideClone: function() {
|
|
3359
|
-
if (!
|
|
3360
|
-
if (
|
|
3361
|
-
|
|
3565
|
+
if (!no) {
|
|
3566
|
+
if (U("hideClone", this), Q.eventCanceled) return;
|
|
3567
|
+
B(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), no = !0;
|
|
3362
3568
|
}
|
|
3363
3569
|
},
|
|
3364
3570
|
_showClone: function(e) {
|
|
@@ -3366,99 +3572,99 @@ Q.prototype = {
|
|
|
3366
3572
|
this._hideClone();
|
|
3367
3573
|
return;
|
|
3368
3574
|
}
|
|
3369
|
-
if (
|
|
3370
|
-
if (
|
|
3371
|
-
|
|
3575
|
+
if (no) {
|
|
3576
|
+
if (U("showClone", this), Q.eventCanceled) return;
|
|
3577
|
+
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : eo ? J.insertBefore(Y, eo) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), B(Y, "display", ""), no = !1;
|
|
3372
3578
|
}
|
|
3373
3579
|
}
|
|
3374
3580
|
};
|
|
3375
|
-
function
|
|
3581
|
+
function Bo(e) {
|
|
3376
3582
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3377
3583
|
}
|
|
3378
|
-
function
|
|
3379
|
-
var c, l = e[
|
|
3380
|
-
return window.CustomEvent && !
|
|
3584
|
+
function Vo(e, t, n, r, i, a, o, s) {
|
|
3585
|
+
var c, l = e[H], u = l.options.onMove, d;
|
|
3586
|
+
return window.CustomEvent && !_a && !va ? c = new CustomEvent("move", {
|
|
3381
3587
|
bubbles: !0,
|
|
3382
3588
|
cancelable: !0
|
|
3383
|
-
}) : (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 ||
|
|
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 || V(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3384
3590
|
}
|
|
3385
|
-
function
|
|
3591
|
+
function Ho(e) {
|
|
3386
3592
|
e.draggable = !1;
|
|
3387
3593
|
}
|
|
3388
|
-
function
|
|
3389
|
-
|
|
3594
|
+
function Uo() {
|
|
3595
|
+
To = !1;
|
|
3390
3596
|
}
|
|
3391
|
-
function
|
|
3392
|
-
var r =
|
|
3597
|
+
function Wo(e, t, n) {
|
|
3598
|
+
var r = V(Ma(n.el, 0, n.options, !0)), i = Ga(n.el, n.options, q), a = 10;
|
|
3393
3599
|
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;
|
|
3394
3600
|
}
|
|
3395
|
-
function
|
|
3396
|
-
var r =
|
|
3601
|
+
function Go(e, t, n) {
|
|
3602
|
+
var r = V(Na(n.el, n.options.draggable)), i = Ga(n.el, n.options, q), a = 10;
|
|
3397
3603
|
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;
|
|
3398
3604
|
}
|
|
3399
|
-
function
|
|
3605
|
+
function Ko(e, t, n, r, i, a, o, s) {
|
|
3400
3606
|
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;
|
|
3401
3607
|
if (!o) {
|
|
3402
|
-
if (s &&
|
|
3403
|
-
if (!
|
|
3404
|
-
else if (
|
|
3405
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3608
|
+
if (s && Co < l * i) {
|
|
3609
|
+
if (!xo && (bo === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (xo = !0), xo) f = !0;
|
|
3610
|
+
else if (bo === 1 ? c < u + Co : c > d - Co) return -bo;
|
|
3611
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return qo(t);
|
|
3406
3612
|
}
|
|
3407
3613
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3408
3614
|
}
|
|
3409
|
-
function
|
|
3410
|
-
return
|
|
3615
|
+
function qo(e) {
|
|
3616
|
+
return Pa(G) < Pa(e) ? 1 : -1;
|
|
3411
3617
|
}
|
|
3412
|
-
function
|
|
3618
|
+
function Jo(e) {
|
|
3413
3619
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3414
3620
|
return r.toString(36);
|
|
3415
3621
|
}
|
|
3416
|
-
function
|
|
3417
|
-
|
|
3622
|
+
function Yo(e) {
|
|
3623
|
+
Eo.length = 0;
|
|
3418
3624
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3419
3625
|
var r = t[n];
|
|
3420
|
-
r.checked &&
|
|
3626
|
+
r.checked && Eo.push(r);
|
|
3421
3627
|
}
|
|
3422
3628
|
}
|
|
3423
|
-
function
|
|
3629
|
+
function Xo(e) {
|
|
3424
3630
|
return setTimeout(e, 0);
|
|
3425
3631
|
}
|
|
3426
|
-
function
|
|
3632
|
+
function Zo(e) {
|
|
3427
3633
|
return clearTimeout(e);
|
|
3428
3634
|
}
|
|
3429
|
-
|
|
3430
|
-
(Q.active ||
|
|
3635
|
+
Do && L(document, "touchmove", function(e) {
|
|
3636
|
+
(Q.active || co) && e.cancelable && e.preventDefault();
|
|
3431
3637
|
}), Q.utils = {
|
|
3432
|
-
on:
|
|
3433
|
-
off:
|
|
3434
|
-
css:
|
|
3435
|
-
find:
|
|
3638
|
+
on: L,
|
|
3639
|
+
off: R,
|
|
3640
|
+
css: B,
|
|
3641
|
+
find: ka,
|
|
3436
3642
|
is: function(e, t) {
|
|
3437
|
-
return !!
|
|
3643
|
+
return !!Ea(e, t, e, !1);
|
|
3438
3644
|
},
|
|
3439
|
-
extend:
|
|
3440
|
-
throttle:
|
|
3441
|
-
closest:
|
|
3442
|
-
toggleClass:
|
|
3443
|
-
clone:
|
|
3444
|
-
index:
|
|
3445
|
-
nextTick:
|
|
3446
|
-
cancelNextTick:
|
|
3447
|
-
detectDirection:
|
|
3448
|
-
getChild:
|
|
3645
|
+
extend: Ra,
|
|
3646
|
+
throttle: Va,
|
|
3647
|
+
closest: Ea,
|
|
3648
|
+
toggleClass: z,
|
|
3649
|
+
clone: Wa,
|
|
3650
|
+
index: Pa,
|
|
3651
|
+
nextTick: Xo,
|
|
3652
|
+
cancelNextTick: Zo,
|
|
3653
|
+
detectDirection: Mo,
|
|
3654
|
+
getChild: Ma
|
|
3449
3655
|
}, Q.get = function(e) {
|
|
3450
|
-
return e[
|
|
3656
|
+
return e[H];
|
|
3451
3657
|
}, Q.mount = function() {
|
|
3452
3658
|
var e = [...arguments];
|
|
3453
3659
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3454
3660
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3455
|
-
e.utils && (Q.utils =
|
|
3661
|
+
e.utils && (Q.utils = la(la({}, Q.utils), e.utils)), Za.mount(e);
|
|
3456
3662
|
});
|
|
3457
3663
|
}, Q.create = function(e, t) {
|
|
3458
3664
|
return new Q(e, t);
|
|
3459
|
-
}, Q.version =
|
|
3460
|
-
var $ = [],
|
|
3461
|
-
function
|
|
3665
|
+
}, Q.version = ha;
|
|
3666
|
+
var $ = [], Qo, $o, es = !1, ts, ns, rs, is;
|
|
3667
|
+
function as() {
|
|
3462
3668
|
function e() {
|
|
3463
3669
|
for (var e in this.defaults = {
|
|
3464
3670
|
scroll: !0,
|
|
@@ -3471,70 +3677,70 @@ function Xo() {
|
|
|
3471
3677
|
return e.prototype = {
|
|
3472
3678
|
dragStarted: function(e) {
|
|
3473
3679
|
var t = e.originalEvent;
|
|
3474
|
-
this.sortable.nativeDraggable ?
|
|
3680
|
+
this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? L(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? L(document, "touchmove", this._handleFallbackAutoScroll) : L(document, "mousemove", this._handleFallbackAutoScroll);
|
|
3475
3681
|
},
|
|
3476
3682
|
dragOverCompleted: function(e) {
|
|
3477
3683
|
var t = e.originalEvent;
|
|
3478
3684
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3479
3685
|
},
|
|
3480
3686
|
drop: function() {
|
|
3481
|
-
this.sortable.nativeDraggable ?
|
|
3687
|
+
this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : (R(document, "pointermove", this._handleFallbackAutoScroll), R(document, "touchmove", this._handleFallbackAutoScroll), R(document, "mousemove", this._handleFallbackAutoScroll)), ss(), os(), Ha();
|
|
3482
3688
|
},
|
|
3483
3689
|
nulling: function() {
|
|
3484
|
-
|
|
3690
|
+
rs = $o = Qo = es = is = ts = ns = null, $.length = 0;
|
|
3485
3691
|
},
|
|
3486
3692
|
_handleFallbackAutoScroll: function(e) {
|
|
3487
3693
|
this._handleAutoScroll(e, !0);
|
|
3488
3694
|
},
|
|
3489
3695
|
_handleAutoScroll: function(e, t) {
|
|
3490
3696
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3491
|
-
if (
|
|
3492
|
-
|
|
3493
|
-
var o =
|
|
3494
|
-
|
|
3495
|
-
var a =
|
|
3496
|
-
a !== o && (o = a,
|
|
3497
|
-
}, 10),
|
|
3697
|
+
if (rs = e, t || this.options.forceAutoScrollFallback || va || _a || ba) {
|
|
3698
|
+
cs(e, this.options, a, t);
|
|
3699
|
+
var o = La(a, !0);
|
|
3700
|
+
es && (!is || r !== ts || i !== ns) && (is && ss(), is = setInterval(function() {
|
|
3701
|
+
var a = La(document.elementFromPoint(r, i), !0);
|
|
3702
|
+
a !== o && (o = a, os()), cs(e, n.options, a, t);
|
|
3703
|
+
}, 10), ts = r, ns = i);
|
|
3498
3704
|
} else {
|
|
3499
|
-
if (!this.options.bubbleScroll ||
|
|
3500
|
-
|
|
3705
|
+
if (!this.options.bubbleScroll || La(a, !0) === Aa()) {
|
|
3706
|
+
os();
|
|
3501
3707
|
return;
|
|
3502
3708
|
}
|
|
3503
|
-
|
|
3709
|
+
cs(e, this.options, La(a, !1), !1);
|
|
3504
3710
|
}
|
|
3505
3711
|
}
|
|
3506
|
-
},
|
|
3712
|
+
}, fa(e, {
|
|
3507
3713
|
pluginName: "scroll",
|
|
3508
3714
|
initializeByDefault: !0
|
|
3509
3715
|
});
|
|
3510
3716
|
}
|
|
3511
|
-
function
|
|
3717
|
+
function os() {
|
|
3512
3718
|
$.forEach(function(e) {
|
|
3513
3719
|
clearInterval(e.pid);
|
|
3514
3720
|
}), $ = [];
|
|
3515
3721
|
}
|
|
3516
|
-
function
|
|
3517
|
-
clearInterval(
|
|
3722
|
+
function ss() {
|
|
3723
|
+
clearInterval(is);
|
|
3518
3724
|
}
|
|
3519
|
-
var
|
|
3725
|
+
var cs = Va(function(e, t, n, r) {
|
|
3520
3726
|
if (t.scroll) {
|
|
3521
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3522
|
-
|
|
3523
|
-
var d = 0, f =
|
|
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 = Aa(), l = !1, u;
|
|
3728
|
+
$o !== n && ($o = n, os(), Qo = t.scroll, u = t.scrollFn, Qo === !0 && (Qo = La(n, !0)));
|
|
3729
|
+
var d = 0, f = Qo;
|
|
3524
3730
|
do {
|
|
3525
|
-
var p = f, m =
|
|
3731
|
+
var p = f, m = V(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = B(p), E = p.scrollLeft, D = p.scrollTop;
|
|
3526
3732
|
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"));
|
|
3527
3733
|
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);
|
|
3528
|
-
if (!$[d]) for (var
|
|
3734
|
+
if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
|
|
3529
3735
|
($[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() {
|
|
3530
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3736
|
+
r && this.layer === 0 && Q.active._onTouchMove(rs);
|
|
3531
3737
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3532
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
3738
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[H], n, t, e, rs, $[this.layer].el) !== "continue" || Ua($[this.layer].el, n, t);
|
|
3533
3739
|
}.bind({ layer: d }), 24))), d++;
|
|
3534
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3535
|
-
|
|
3740
|
+
} while (t.bubbleScroll && f !== c && (f = La(f, !1)));
|
|
3741
|
+
es = l;
|
|
3536
3742
|
}
|
|
3537
|
-
}, 30),
|
|
3743
|
+
}, 30), ls = function(e) {
|
|
3538
3744
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3539
3745
|
if (t) {
|
|
3540
3746
|
var c = n || i;
|
|
@@ -3546,8 +3752,8 @@ var $o = Na(function(e, t, n, r) {
|
|
|
3546
3752
|
}));
|
|
3547
3753
|
}
|
|
3548
3754
|
};
|
|
3549
|
-
function
|
|
3550
|
-
|
|
3755
|
+
function us() {}
|
|
3756
|
+
us.prototype = {
|
|
3551
3757
|
startIndex: null,
|
|
3552
3758
|
dragStart: function(e) {
|
|
3553
3759
|
var t = e.oldDraggableIndex;
|
|
@@ -3556,72 +3762,72 @@ ts.prototype = {
|
|
|
3556
3762
|
onSpill: function(e) {
|
|
3557
3763
|
var t = e.dragEl, n = e.putSortable;
|
|
3558
3764
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3559
|
-
var r =
|
|
3765
|
+
var r = Ma(this.sortable.el, this.startIndex, this.options);
|
|
3560
3766
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3561
3767
|
},
|
|
3562
|
-
drop:
|
|
3563
|
-
},
|
|
3564
|
-
function
|
|
3565
|
-
|
|
3768
|
+
drop: ls
|
|
3769
|
+
}, fa(us, { pluginName: "revertOnSpill" });
|
|
3770
|
+
function ds() {}
|
|
3771
|
+
ds.prototype = {
|
|
3566
3772
|
onSpill: function(e) {
|
|
3567
3773
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3568
3774
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3569
3775
|
},
|
|
3570
|
-
drop:
|
|
3571
|
-
},
|
|
3572
|
-
function
|
|
3776
|
+
drop: ls
|
|
3777
|
+
}, fa(ds, { pluginName: "removeOnSpill" }), Q.mount(new as()), Q.mount(ds, us);
|
|
3778
|
+
function fs(e) {
|
|
3573
3779
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3574
3780
|
}
|
|
3575
|
-
function
|
|
3576
|
-
|
|
3781
|
+
function ps(e) {
|
|
3782
|
+
ne() && r(e);
|
|
3577
3783
|
}
|
|
3578
|
-
function
|
|
3579
|
-
|
|
3784
|
+
function ms(e) {
|
|
3785
|
+
ne() ? a(e) : re(e);
|
|
3580
3786
|
}
|
|
3581
|
-
var
|
|
3582
|
-
function
|
|
3583
|
-
|
|
3787
|
+
var hs = null, gs = null;
|
|
3788
|
+
function _s(e = null, t = null) {
|
|
3789
|
+
hs = e, gs = t;
|
|
3584
3790
|
}
|
|
3585
|
-
function
|
|
3791
|
+
function vs() {
|
|
3586
3792
|
return {
|
|
3587
|
-
data:
|
|
3588
|
-
clonedData:
|
|
3793
|
+
data: hs,
|
|
3794
|
+
clonedData: gs
|
|
3589
3795
|
};
|
|
3590
3796
|
}
|
|
3591
|
-
var
|
|
3592
|
-
function
|
|
3593
|
-
let t =
|
|
3797
|
+
var ys = Symbol("cloneElement");
|
|
3798
|
+
function bs(...e) {
|
|
3799
|
+
let t = ne()?.proxy, n = null, r = e[0], [, i, a] = e;
|
|
3594
3800
|
Array.isArray(k(i)) || (a = i, i = null);
|
|
3595
|
-
let o = null, { immediate: s = !0, clone: l =
|
|
3801
|
+
let o = null, { immediate: s = !0, clone: l = fs, forceFallback: u, fallbackOnBody: d, customUpdate: f } = k(a) ?? {};
|
|
3596
3802
|
function p(e) {
|
|
3597
3803
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3598
3804
|
n = u && !d ? o.slice(0, -1) : o;
|
|
3599
3805
|
let s = k(k(i)?.[r]), c = l(s);
|
|
3600
|
-
|
|
3806
|
+
_s(s, c), a[ys] = c;
|
|
3601
3807
|
}
|
|
3602
3808
|
function m(e) {
|
|
3603
|
-
let t = e.item[
|
|
3604
|
-
if (!
|
|
3605
|
-
if (
|
|
3809
|
+
let t = e.item[ys];
|
|
3810
|
+
if (!Zi(t)) {
|
|
3811
|
+
if (ea(e.item), g(i)) {
|
|
3606
3812
|
let n = [...k(i)];
|
|
3607
|
-
i.value =
|
|
3813
|
+
i.value = Xi(n, e.newDraggableIndex, t);
|
|
3608
3814
|
return;
|
|
3609
3815
|
}
|
|
3610
|
-
|
|
3816
|
+
Xi(k(i), e.newDraggableIndex, t);
|
|
3611
3817
|
}
|
|
3612
3818
|
}
|
|
3613
3819
|
function h(e) {
|
|
3614
3820
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3615
|
-
if (
|
|
3616
|
-
|
|
3821
|
+
if ($i(t, n, r), o === "clone") {
|
|
3822
|
+
ea(s);
|
|
3617
3823
|
return;
|
|
3618
3824
|
}
|
|
3619
3825
|
if (g(i)) {
|
|
3620
3826
|
let e = [...k(i)];
|
|
3621
|
-
i.value =
|
|
3827
|
+
i.value = Yi(e, a);
|
|
3622
3828
|
return;
|
|
3623
3829
|
}
|
|
3624
|
-
|
|
3830
|
+
Yi(k(i), a);
|
|
3625
3831
|
}
|
|
3626
3832
|
function _(e) {
|
|
3627
3833
|
if (f) {
|
|
@@ -3629,12 +3835,12 @@ function ds(...e) {
|
|
|
3629
3835
|
return;
|
|
3630
3836
|
}
|
|
3631
3837
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3632
|
-
if (
|
|
3838
|
+
if (ea(n), $i(t, n, r), g(i)) {
|
|
3633
3839
|
let e = [...k(i)];
|
|
3634
|
-
i.value =
|
|
3840
|
+
i.value = Ki(e, a, o);
|
|
3635
3841
|
return;
|
|
3636
3842
|
}
|
|
3637
|
-
|
|
3843
|
+
Ki(k(i), a, o);
|
|
3638
3844
|
}
|
|
3639
3845
|
function v(e) {
|
|
3640
3846
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -3652,8 +3858,8 @@ function ds(...e) {
|
|
|
3652
3858
|
} finally {
|
|
3653
3859
|
n = null;
|
|
3654
3860
|
}
|
|
3655
|
-
|
|
3656
|
-
if (
|
|
3861
|
+
re(() => {
|
|
3862
|
+
if (_s(), o) throw o;
|
|
3657
3863
|
});
|
|
3658
3864
|
}
|
|
3659
3865
|
let y = {
|
|
@@ -3665,19 +3871,19 @@ function ds(...e) {
|
|
|
3665
3871
|
};
|
|
3666
3872
|
function b(e) {
|
|
3667
3873
|
let n = k(r);
|
|
3668
|
-
return e ||=
|
|
3874
|
+
return e ||= Qi(n) ? ta(n, t?.$el) : n, e && !ia(e) && (e = e.$el), e || Gi("Root element not found"), e;
|
|
3669
3875
|
}
|
|
3670
3876
|
function x() {
|
|
3671
|
-
let e = k(a) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3672
|
-
return
|
|
3673
|
-
|
|
3674
|
-
}),
|
|
3877
|
+
let e = k(a) ?? {}, { immediate: t, clone: n } = e, r = Hi(e, ["immediate", "clone"]);
|
|
3878
|
+
return aa(r, (e, t) => {
|
|
3879
|
+
oa(e) && (r[e] = (e, ...n) => (sa(e, vs()), t(e, ...n)));
|
|
3880
|
+
}), ra(i === null ? {} : y, r);
|
|
3675
3881
|
}
|
|
3676
3882
|
let S = (e) => {
|
|
3677
3883
|
e = b(e), o && C.destroy(), o = new Q(e, x());
|
|
3678
3884
|
};
|
|
3679
3885
|
c(() => a, () => {
|
|
3680
|
-
o &&
|
|
3886
|
+
o && aa(x(), (e, t) => {
|
|
3681
3887
|
o?.option(e, t);
|
|
3682
3888
|
});
|
|
3683
3889
|
}, { deep: !0 });
|
|
@@ -3690,15 +3896,15 @@ function ds(...e) {
|
|
|
3690
3896
|
toArray: () => o?.toArray(),
|
|
3691
3897
|
closest: (...e) => o?.closest(...e)
|
|
3692
3898
|
};
|
|
3693
|
-
return
|
|
3899
|
+
return ms(() => {
|
|
3694
3900
|
s && S();
|
|
3695
|
-
}),
|
|
3901
|
+
}), ps(C.destroy), Vi({
|
|
3696
3902
|
start: S,
|
|
3697
3903
|
pause: () => C?.option("disabled", !0),
|
|
3698
3904
|
resume: () => C?.option("disabled", !1)
|
|
3699
3905
|
}, C);
|
|
3700
3906
|
}
|
|
3701
|
-
var
|
|
3907
|
+
var xs = [
|
|
3702
3908
|
"update",
|
|
3703
3909
|
"start",
|
|
3704
3910
|
"add",
|
|
@@ -3711,7 +3917,7 @@ var fs = [
|
|
|
3711
3917
|
"clone",
|
|
3712
3918
|
"move",
|
|
3713
3919
|
"change"
|
|
3714
|
-
],
|
|
3920
|
+
], Ss = y({
|
|
3715
3921
|
name: "VueDraggable",
|
|
3716
3922
|
model: {
|
|
3717
3923
|
prop: "modelValue",
|
|
@@ -3761,37 +3967,37 @@ var fs = [
|
|
|
3761
3967
|
"tag",
|
|
3762
3968
|
"target",
|
|
3763
3969
|
"customUpdate",
|
|
3764
|
-
...
|
|
3970
|
+
...xs.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3765
3971
|
],
|
|
3766
|
-
emits: ["update:modelValue", ...
|
|
3972
|
+
emits: ["update:modelValue", ...xs],
|
|
3767
3973
|
setup(t, { slots: n, emit: r, expose: i, attrs: a }) {
|
|
3768
|
-
let o =
|
|
3974
|
+
let o = xs.reduce((e, t) => {
|
|
3769
3975
|
let n = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3770
3976
|
return e[n] = (...e) => r(t, ...e), e;
|
|
3771
|
-
}, {}), s =
|
|
3772
|
-
let n = e(t), { modelValue: r } = n, i =
|
|
3977
|
+
}, {}), s = M(() => {
|
|
3978
|
+
let n = e(t), { modelValue: r } = n, i = Hi(n, ["modelValue"]), s = Object.entries(i).reduce((e, [t, n]) => {
|
|
3773
3979
|
let r = k(n);
|
|
3774
3980
|
return r !== void 0 && (e[t] = r), e;
|
|
3775
3981
|
}, {});
|
|
3776
|
-
return
|
|
3777
|
-
}), c =
|
|
3982
|
+
return Vi(Vi({}, o), Ji(Vi(Vi({}, a), s)));
|
|
3983
|
+
}), c = M({
|
|
3778
3984
|
get: () => t.modelValue,
|
|
3779
3985
|
set: (e) => r("update:modelValue", e)
|
|
3780
|
-
}), l = _(), u =
|
|
3781
|
-
return i(u), () =>
|
|
3986
|
+
}), l = _(), u = A(bs(t.target || l, c, s));
|
|
3987
|
+
return i(u), () => ie(t.tag || "div", { ref: l }, (n?.default)?.call(n, u));
|
|
3782
3988
|
}
|
|
3783
|
-
}),
|
|
3989
|
+
}), Cs = {
|
|
3784
3990
|
mounted: "mounted",
|
|
3785
3991
|
unmounted: "unmounted"
|
|
3786
3992
|
};
|
|
3787
|
-
|
|
3993
|
+
Cs.mounted, Cs.unmounted;
|
|
3788
3994
|
//#endregion
|
|
3789
3995
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3790
|
-
var
|
|
3996
|
+
var ws = { class: "tpl:w-full" }, Ts = {
|
|
3791
3997
|
key: 0,
|
|
3792
3998
|
"data-testid": "section-drop-hint",
|
|
3793
|
-
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
3794
|
-
},
|
|
3999
|
+
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
|
+
}, Es = /* @__PURE__ */ y({
|
|
3795
4001
|
__name: "SectionBlock",
|
|
3796
4002
|
props: {
|
|
3797
4003
|
block: {},
|
|
@@ -3799,13 +4005,22 @@ var hs = { class: "tpl:w-full" }, gs = {
|
|
|
3799
4005
|
},
|
|
3800
4006
|
setup(e) {
|
|
3801
4007
|
let n = {
|
|
3802
|
-
title:
|
|
3803
|
-
paragraph:
|
|
3804
|
-
image:
|
|
3805
|
-
button:
|
|
3806
|
-
divider:
|
|
3807
|
-
custom:
|
|
3808
|
-
}, r = e, { t: a } =
|
|
4008
|
+
title: Pi,
|
|
4009
|
+
paragraph: hi,
|
|
4010
|
+
image: ni,
|
|
4011
|
+
button: Un,
|
|
4012
|
+
divider: Ir,
|
|
4013
|
+
custom: Pr
|
|
4014
|
+
}, r = e, { t: a } = It(), s = rt(xt, "SectionBlock"), c = P(vt, null), l = P(Ot, null), u = P(At, {});
|
|
4015
|
+
function h(e) {
|
|
4016
|
+
let t = u.savedBlocks;
|
|
4017
|
+
if (t?.isPicking.value) {
|
|
4018
|
+
t.togglePick(r.block.id);
|
|
4019
|
+
return;
|
|
4020
|
+
}
|
|
4021
|
+
s.selectBlock(e);
|
|
4022
|
+
}
|
|
4023
|
+
let g = M(() => {
|
|
3809
4024
|
switch (r.block.columns) {
|
|
3810
4025
|
case "2": return ["50%", "50%"];
|
|
3811
4026
|
case "3": return [
|
|
@@ -3817,38 +4032,38 @@ var hs = { class: "tpl:w-full" }, gs = {
|
|
|
3817
4032
|
case "2-1": return ["66.67%", "33.33%"];
|
|
3818
4033
|
default: return ["100%"];
|
|
3819
4034
|
}
|
|
3820
|
-
}),
|
|
3821
|
-
let e =
|
|
4035
|
+
}), _ = M(() => {
|
|
4036
|
+
let e = g.value.length, t = [...r.block.children];
|
|
3822
4037
|
for (; t.length < e;) t.push([]);
|
|
3823
4038
|
return t.slice(0, e);
|
|
3824
|
-
}),
|
|
3825
|
-
function
|
|
3826
|
-
return
|
|
4039
|
+
}), v = M(() => r.viewport === "mobile" && r.block.stackOnMobile !== !1);
|
|
4040
|
+
function y(e) {
|
|
4041
|
+
return _.value[e] || [];
|
|
3827
4042
|
}
|
|
3828
|
-
function
|
|
4043
|
+
function S(e, t) {
|
|
3829
4044
|
let n = t.map((e) => JSON.parse(JSON.stringify(e))), i = [...r.block.children];
|
|
3830
4045
|
for (; i.length <= e;) i.push([]);
|
|
3831
4046
|
i[e] = n, s.updateBlock(r.block.id, { children: i });
|
|
3832
4047
|
}
|
|
3833
|
-
function
|
|
3834
|
-
return
|
|
4048
|
+
function C(e) {
|
|
4049
|
+
return _i(e, l, n);
|
|
3835
4050
|
}
|
|
3836
|
-
function
|
|
4051
|
+
function T(e, t) {
|
|
3837
4052
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
3838
4053
|
fieldValues: t.fieldValues,
|
|
3839
4054
|
dataSourceFetched: t.dataSourceFetched
|
|
3840
4055
|
});
|
|
3841
4056
|
}
|
|
3842
|
-
return (n, r) => (f(), x("div",
|
|
4057
|
+
return (n, r) => (f(), x("div", ws, [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", {
|
|
3843
4058
|
key: r,
|
|
3844
|
-
class: o(["tpl:relative tpl:min-h-[60px] tpl:rounded",
|
|
3845
|
-
style: i({ width:
|
|
3846
|
-
}, [w(k(
|
|
3847
|
-
"model-value":
|
|
4059
|
+
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
|
+
style: i({ width: v.value ? "100%" : g.value[r] })
|
|
4061
|
+
}, [w(k(Ss), {
|
|
4062
|
+
"model-value": y(r),
|
|
3848
4063
|
group: {
|
|
3849
4064
|
name: "blocks",
|
|
3850
4065
|
pull: !0,
|
|
3851
|
-
put: (e, t, n) => k(
|
|
4066
|
+
put: (e, t, n) => k(Fi)(n)
|
|
3852
4067
|
},
|
|
3853
4068
|
animation: 150,
|
|
3854
4069
|
"ghost-class": "tpl-ghost",
|
|
@@ -3859,19 +4074,20 @@ var hs = { class: "tpl:w-full" }, gs = {
|
|
|
3859
4074
|
"empty-insert-threshold": 20,
|
|
3860
4075
|
"force-fallback": !0,
|
|
3861
4076
|
class: "tpl:min-h-[60px]",
|
|
3862
|
-
"onUpdate:modelValue": (e) =>
|
|
4077
|
+
"onUpdate:modelValue": (e) => S(r, e)
|
|
3863
4078
|
}, {
|
|
3864
|
-
default: m(() => [(f(!0), x(
|
|
4079
|
+
default: m(() => [(f(!0), x(j, null, t(y(r), (t) => ae((f(), x("div", { key: t.id }, [w(Mi, {
|
|
3865
4080
|
block: t,
|
|
3866
4081
|
"is-selected": k(s).state.selectedBlockId === t.id,
|
|
3867
4082
|
viewport: e.viewport,
|
|
3868
4083
|
"preview-mode": k(s).state.previewMode,
|
|
3869
|
-
|
|
4084
|
+
nested: "",
|
|
4085
|
+
onSelect: (e) => h(t.id)
|
|
3870
4086
|
}, {
|
|
3871
|
-
default: m(() => [(f(), D(d(
|
|
4087
|
+
default: m(() => [(f(), D(d(C(t)), {
|
|
3872
4088
|
block: t,
|
|
3873
4089
|
viewport: e.viewport,
|
|
3874
|
-
onFetchData: (e) =>
|
|
4090
|
+
onFetchData: (e) => T(t, e),
|
|
3875
4091
|
onUpdate: (e) => k(s).updateBlock(t.id, e)
|
|
3876
4092
|
}, null, 40, [
|
|
3877
4093
|
"block",
|
|
@@ -3886,19 +4102,19 @@ var hs = { class: "tpl:w-full" }, gs = {
|
|
|
3886
4102
|
"viewport",
|
|
3887
4103
|
"preview-mode",
|
|
3888
4104
|
"onSelect"
|
|
3889
|
-
])])), [[
|
|
4105
|
+
])])), [[oe, !k(c)?.isHidden(t.id)]])), 128))]),
|
|
3890
4106
|
_: 2
|
|
3891
4107
|
}, 1032, [
|
|
3892
4108
|
"model-value",
|
|
3893
4109
|
"group",
|
|
3894
4110
|
"onUpdate:modelValue"
|
|
3895
|
-
]),
|
|
4111
|
+
]), y(r).length === 0 ? (f(), x("div", Ts, [b("span", null, p(k(a).section.dropHere), 1)])) : N("", !0)], 6))), 128))], 2)]));
|
|
3896
4112
|
}
|
|
3897
|
-
}),
|
|
4113
|
+
}), Ds = Oe, Os = {
|
|
3898
4114
|
small: 24,
|
|
3899
4115
|
medium: 32,
|
|
3900
4116
|
large: 48
|
|
3901
|
-
},
|
|
4117
|
+
}, ks = [
|
|
3902
4118
|
"facebook",
|
|
3903
4119
|
"twitter",
|
|
3904
4120
|
"instagram",
|
|
@@ -3916,11 +4132,11 @@ var hs = { class: "tpl:w-full" }, gs = {
|
|
|
3916
4132
|
"github",
|
|
3917
4133
|
"dribbble",
|
|
3918
4134
|
"behance"
|
|
3919
|
-
],
|
|
4135
|
+
], As = [
|
|
3920
4136
|
"width",
|
|
3921
4137
|
"height",
|
|
3922
4138
|
"fill"
|
|
3923
|
-
],
|
|
4139
|
+
], js = ["d"], Ms = /* @__PURE__ */ y({
|
|
3924
4140
|
__name: "SocialIconSvg",
|
|
3925
4141
|
props: {
|
|
3926
4142
|
platform: {},
|
|
@@ -3928,7 +4144,7 @@ var hs = { class: "tpl:w-full" }, gs = {
|
|
|
3928
4144
|
iconSize: {}
|
|
3929
4145
|
},
|
|
3930
4146
|
setup(e) {
|
|
3931
|
-
let t = e, n =
|
|
4147
|
+
let t = e, n = M(() => Ds[t.platform]), r = M(() => Os[t.iconSize]), a = M(() => {
|
|
3932
4148
|
let e = {
|
|
3933
4149
|
display: "inline-flex",
|
|
3934
4150
|
alignItems: "center",
|
|
@@ -3965,40 +4181,40 @@ var hs = { class: "tpl:w-full" }, gs = {
|
|
|
3965
4181
|
};
|
|
3966
4182
|
default: return e;
|
|
3967
4183
|
}
|
|
3968
|
-
}), o =
|
|
4184
|
+
}), o = M(() => Math.floor(r.value * .6)), s = M(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
|
|
3969
4185
|
return (e, t) => (f(), x("span", { style: i(a.value) }, [(f(), x("svg", {
|
|
3970
4186
|
width: o.value,
|
|
3971
4187
|
height: o.value,
|
|
3972
4188
|
viewBox: "0 0 24 24",
|
|
3973
4189
|
fill: s.value,
|
|
3974
4190
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3975
|
-
}, [b("path", { d: n.value.path }, null, 8,
|
|
4191
|
+
}, [b("path", { d: n.value.path }, null, 8, js)], 8, As))], 4));
|
|
3976
4192
|
}
|
|
3977
|
-
}),
|
|
4193
|
+
}), Ns = { class: "tpl:w-full" }, Ps = ["href"], Fs = {
|
|
3978
4194
|
key: 1,
|
|
3979
4195
|
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)]"
|
|
3980
|
-
},
|
|
4196
|
+
}, Is = /* @__PURE__ */ y({
|
|
3981
4197
|
__name: "SocialIconsBlock",
|
|
3982
4198
|
props: {
|
|
3983
4199
|
block: {},
|
|
3984
4200
|
viewport: {}
|
|
3985
4201
|
},
|
|
3986
4202
|
setup(e) {
|
|
3987
|
-
let n = e, { t: r } =
|
|
4203
|
+
let n = e, { t: r } = It(), a = M(() => ({
|
|
3988
4204
|
display: "flex",
|
|
3989
4205
|
flexWrap: "wrap",
|
|
3990
4206
|
gap: `${n.block.spacing}px`,
|
|
3991
4207
|
justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
|
|
3992
|
-
})), o =
|
|
3993
|
-
return (n, s) => (f(), x("div",
|
|
4208
|
+
})), o = M(() => n.block.icons.length > 0);
|
|
4209
|
+
return (n, s) => (f(), x("div", Ns, [o.value ? (f(), x("div", {
|
|
3994
4210
|
key: 0,
|
|
3995
4211
|
style: i(a.value)
|
|
3996
|
-
}, [(f(!0), x(
|
|
4212
|
+
}, [(f(!0), x(j, null, t(e.block.icons, (t) => (f(), x("a", {
|
|
3997
4213
|
key: t.id,
|
|
3998
4214
|
href: t.url || "#",
|
|
3999
4215
|
class: "tpl:cursor-default",
|
|
4000
|
-
onClick: s[0] ||=
|
|
4001
|
-
}, [w(
|
|
4216
|
+
onClick: s[0] ||= F(() => {}, ["prevent"])
|
|
4217
|
+
}, [w(Ms, {
|
|
4002
4218
|
platform: t.platform,
|
|
4003
4219
|
"icon-style": e.block.iconStyle,
|
|
4004
4220
|
"icon-size": e.block.iconSize
|
|
@@ -4006,44 +4222,44 @@ var hs = { class: "tpl:w-full" }, gs = {
|
|
|
4006
4222
|
"platform",
|
|
4007
4223
|
"icon-style",
|
|
4008
4224
|
"icon-size"
|
|
4009
|
-
])], 8,
|
|
4225
|
+
])], 8, Ps))), 128))], 4)) : (f(), x("div", Fs, [w(k(er), { size: 16 }), b("span", null, p(k(r).social.addIcons), 1)]))]));
|
|
4010
4226
|
}
|
|
4011
|
-
}),
|
|
4227
|
+
}), Ls = { class: "tpl:w-full" }, Rs = {
|
|
4012
4228
|
key: 0,
|
|
4013
4229
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4014
4230
|
style: {
|
|
4015
4231
|
"background-color": "var(--tpl-bg-hover)",
|
|
4016
4232
|
color: "var(--tpl-text-dim)"
|
|
4017
4233
|
}
|
|
4018
|
-
},
|
|
4234
|
+
}, zs = /* @__PURE__ */ y({
|
|
4019
4235
|
__name: "SpacerBlock",
|
|
4020
4236
|
props: {
|
|
4021
4237
|
block: {},
|
|
4022
4238
|
viewport: {}
|
|
4023
4239
|
},
|
|
4024
4240
|
setup(e) {
|
|
4025
|
-
let t = e, n =
|
|
4241
|
+
let t = e, n = rt(xt, "SpacerBlock"), r = M(() => ({
|
|
4026
4242
|
height: `${t.block.height}px`,
|
|
4027
4243
|
minHeight: `${t.block.height}px`,
|
|
4028
4244
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4029
4245
|
}));
|
|
4030
|
-
return (t, a) => (f(), x("div",
|
|
4246
|
+
return (t, a) => (f(), x("div", Ls, [b("div", {
|
|
4031
4247
|
style: i(r.value),
|
|
4032
4248
|
class: o(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !k(n).state.previewMode }])
|
|
4033
|
-
}, [k(n).state.previewMode ?
|
|
4249
|
+
}, [k(n).state.previewMode ? N("", !0) : (f(), x("span", Rs, p(e.block.height) + "px ", 1))], 6)]));
|
|
4034
4250
|
}
|
|
4035
|
-
}),
|
|
4251
|
+
}), Bs = { class: "tpl:w-full" }, Vs = { key: 0 }, Hs = [
|
|
4036
4252
|
"aria-label",
|
|
4037
4253
|
"data-placeholder",
|
|
4038
4254
|
"onBlur"
|
|
4039
|
-
],
|
|
4255
|
+
], Us = [
|
|
4040
4256
|
"aria-label",
|
|
4041
4257
|
"data-placeholder",
|
|
4042
4258
|
"onBlur"
|
|
4043
|
-
],
|
|
4259
|
+
], Ws = {
|
|
4044
4260
|
key: 1,
|
|
4045
4261
|
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)]"
|
|
4046
|
-
},
|
|
4262
|
+
}, Gs = /*#__PURE__*/ Ht(/* @__PURE__ */ y({
|
|
4047
4263
|
__name: "TableBlock",
|
|
4048
4264
|
props: {
|
|
4049
4265
|
block: {},
|
|
@@ -4057,7 +4273,7 @@ var hs = { class: "tpl:w-full" }, gs = {
|
|
|
4057
4273
|
updated(e, t) {
|
|
4058
4274
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
4059
4275
|
}
|
|
4060
|
-
}, r = e, { t: a } =
|
|
4276
|
+
}, r = e, { t: a } = It(), o = rt(xt, "TableBlock"), s = M(() => r.block.rows.length > 0), c = M(() => {
|
|
4061
4277
|
let e = {
|
|
4062
4278
|
width: "100%",
|
|
4063
4279
|
borderCollapse: "collapse",
|
|
@@ -4066,15 +4282,15 @@ var hs = { class: "tpl:w-full" }, gs = {
|
|
|
4066
4282
|
fontFamily: r.block.fontFamily || "inherit"
|
|
4067
4283
|
};
|
|
4068
4284
|
return r.block.color && (e.color = r.block.color), e;
|
|
4069
|
-
}), l =
|
|
4285
|
+
}), l = M(() => ({
|
|
4070
4286
|
border: `${r.block.borderWidth}px solid ${r.block.borderColor}`,
|
|
4071
4287
|
padding: `${r.block.cellPadding}px`,
|
|
4072
4288
|
textAlign: r.block.textAlign
|
|
4073
|
-
})), u =
|
|
4289
|
+
})), u = M(() => ({
|
|
4074
4290
|
...l.value,
|
|
4075
4291
|
fontWeight: "bold",
|
|
4076
4292
|
backgroundColor: r.block.headerBackgroundColor || "transparent"
|
|
4077
|
-
})), d =
|
|
4293
|
+
})), d = M(() => r.block.hasHeaderRow && r.block.rows.length > 0 ? r.block.rows[0] : null), m = M(() => r.block.hasHeaderRow ? r.block.rows.slice(1) : r.block.rows);
|
|
4078
4294
|
function h() {
|
|
4079
4295
|
o.selectBlock(r.block.id);
|
|
4080
4296
|
}
|
|
@@ -4088,31 +4304,31 @@ var hs = { class: "tpl:w-full" }, gs = {
|
|
|
4088
4304
|
} : n);
|
|
4089
4305
|
o.updateBlock(r.block.id, { rows: a });
|
|
4090
4306
|
}
|
|
4091
|
-
return (e, r) => (f(), x("div",
|
|
4307
|
+
return (e, r) => (f(), x("div", Bs, [s.value ? (f(), x("table", {
|
|
4092
4308
|
key: 0,
|
|
4093
4309
|
style: i(c.value),
|
|
4094
4310
|
class: "tpl-table-editable"
|
|
4095
|
-
}, [d.value ? (f(), x("thead",
|
|
4311
|
+
}, [d.value ? (f(), x("thead", Vs, [b("tr", null, [(f(!0), x(j, null, t(d.value.cells, (e) => ae((f(), x("th", {
|
|
4096
4312
|
key: e.id,
|
|
4097
4313
|
style: i(u.value),
|
|
4098
4314
|
"aria-label": k(a).table.cellPlaceholder,
|
|
4099
4315
|
contenteditable: "true",
|
|
4100
4316
|
"data-placeholder": k(a).table.cellPlaceholder,
|
|
4101
4317
|
onBlur: (t) => g(d.value.id, e.id, t),
|
|
4102
|
-
onKeydown: r[0] ||=
|
|
4103
|
-
onClick:
|
|
4104
|
-
}, null, 44,
|
|
4318
|
+
onKeydown: r[0] ||= se(F((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4319
|
+
onClick: F(h, ["stop"])
|
|
4320
|
+
}, null, 44, Hs)), [[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", {
|
|
4105
4321
|
key: t.id,
|
|
4106
4322
|
style: i(l.value),
|
|
4107
4323
|
"aria-label": k(a).table.cellPlaceholder,
|
|
4108
4324
|
contenteditable: "true",
|
|
4109
4325
|
"data-placeholder": k(a).table.cellPlaceholder,
|
|
4110
4326
|
onBlur: (n) => g(e.id, t.id, n),
|
|
4111
|
-
onKeydown: r[1] ||=
|
|
4112
|
-
onClick:
|
|
4113
|
-
}, null, 44,
|
|
4327
|
+
onKeydown: r[1] ||= se(F((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4328
|
+
onClick: F(h, ["stop"])
|
|
4329
|
+
}, null, 44, Us)), [[n, t.content]])), 128))]))), 128))])], 4)) : (f(), x("div", Ws, [w(k(tr), { size: 16 }), b("span", null, p(k(a).table.empty), 1)]))]));
|
|
4114
4330
|
}
|
|
4115
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
4331
|
+
}), [["__scopeId", "data-v-963ac422"]]), Ks = /* @__PURE__ */ y({
|
|
4116
4332
|
__name: "VideoPlayButton",
|
|
4117
4333
|
props: { hoverEffect: {
|
|
4118
4334
|
type: Boolean,
|
|
@@ -4130,7 +4346,7 @@ var hs = { class: "tpl:w-full" }, gs = {
|
|
|
4130
4346
|
});
|
|
4131
4347
|
//#endregion
|
|
4132
4348
|
//#region src/utils/videoThumbnail.ts
|
|
4133
|
-
function
|
|
4349
|
+
function qs(e) {
|
|
4134
4350
|
if (!e) return {
|
|
4135
4351
|
platform: "unknown",
|
|
4136
4352
|
videoId: null,
|
|
@@ -4162,25 +4378,25 @@ function Rs(e) {
|
|
|
4162
4378
|
thumbnailUrl: null
|
|
4163
4379
|
};
|
|
4164
4380
|
}
|
|
4165
|
-
function
|
|
4166
|
-
return t ||
|
|
4381
|
+
function Js(e, t) {
|
|
4382
|
+
return t || qs(e).thumbnailUrl;
|
|
4167
4383
|
}
|
|
4168
4384
|
//#endregion
|
|
4169
4385
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4170
|
-
var
|
|
4386
|
+
var Ys = ["src", "alt"], Xs = {
|
|
4171
4387
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4172
4388
|
style: { opacity: "0.7" }
|
|
4173
|
-
},
|
|
4389
|
+
}, Zs = ["href"], Qs = ["src", "alt"], $s = ["src", "alt"], ec = {
|
|
4174
4390
|
key: 3,
|
|
4175
4391
|
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)]"
|
|
4176
|
-
},
|
|
4392
|
+
}, tc = /* @__PURE__ */ y({
|
|
4177
4393
|
__name: "VideoBlock",
|
|
4178
4394
|
props: {
|
|
4179
4395
|
block: {},
|
|
4180
4396
|
viewport: {}
|
|
4181
4397
|
},
|
|
4182
4398
|
setup(e) {
|
|
4183
|
-
let t = e, { t: n } =
|
|
4399
|
+
let t = e, { t: n } = It(), { syntax: r } = Ut(), a = M(() => Ce(t.block.url, r) || Ce(t.block.thumbnailUrl, r)), o = fn(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), s = fn(() => a.value ? t.block.placeholderUrl : void 0), c = M(() => a.value ? null : t.block.thumbnailUrl ? o.value ?? null : Js(t.block.url)), l = M(() => ({ textAlign: t.block.align })), u = M(() => {
|
|
4184
4400
|
let e = t.block.align;
|
|
4185
4401
|
return {
|
|
4186
4402
|
maxWidth: "100%",
|
|
@@ -4189,7 +4405,7 @@ var Bs = ["src", "alt"], Vs = {
|
|
|
4189
4405
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
4190
4406
|
marginRight: e === "center" ? "auto" : void 0
|
|
4191
4407
|
};
|
|
4192
|
-
}), d =
|
|
4408
|
+
}), d = M(() => Ce(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
4193
4409
|
return (t, r) => (f(), x("div", {
|
|
4194
4410
|
class: "tpl:w-full",
|
|
4195
4411
|
style: i(l.value)
|
|
@@ -4201,28 +4417,28 @@ var Bs = ["src", "alt"], Vs = {
|
|
|
4201
4417
|
class: "tpl:w-full tpl:border-0",
|
|
4202
4418
|
src: k(s),
|
|
4203
4419
|
alt: e.block.alt
|
|
4204
|
-
}, null, 8,
|
|
4420
|
+
}, null, 8, Ys), w(Ks)], 4)) : a.value ? (f(), x("div", {
|
|
4205
4421
|
key: 1,
|
|
4206
4422
|
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)]",
|
|
4207
4423
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
4208
|
-
}, [w(k(
|
|
4424
|
+
}, [w(k(nr), {
|
|
4209
4425
|
size: 36,
|
|
4210
4426
|
"stroke-width": 1.5,
|
|
4211
4427
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4212
4428
|
style: { opacity: "0.5" }
|
|
4213
|
-
}), b("span",
|
|
4429
|
+
}), b("span", Xs, [w(Bn, { text: d.value }, null, 8, ["text"])])], 4)) : c.value ? (f(), x(j, { key: 2 }, [e.block.url ? (f(), x("a", {
|
|
4214
4430
|
key: 0,
|
|
4215
4431
|
href: e.block.url,
|
|
4216
4432
|
target: "_blank",
|
|
4217
4433
|
rel: "noopener noreferrer",
|
|
4218
4434
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
4219
4435
|
style: i(u.value),
|
|
4220
|
-
onClick: r[0] ||=
|
|
4436
|
+
onClick: r[0] ||= F(() => {}, ["prevent"])
|
|
4221
4437
|
}, [b("img", {
|
|
4222
4438
|
class: "tpl:w-full tpl:border-0",
|
|
4223
4439
|
src: c.value,
|
|
4224
4440
|
alt: e.block.alt
|
|
4225
|
-
}, null, 8,
|
|
4441
|
+
}, null, 8, Qs), w(Ks, { "hover-effect": "" })], 12, Zs)) : (f(), x("div", {
|
|
4226
4442
|
key: 1,
|
|
4227
4443
|
class: "tpl:relative tpl:inline-block",
|
|
4228
4444
|
style: i(u.value)
|
|
@@ -4230,48 +4446,48 @@ var Bs = ["src", "alt"], Vs = {
|
|
|
4230
4446
|
class: "tpl:w-full tpl:border-0",
|
|
4231
4447
|
src: c.value,
|
|
4232
4448
|
alt: e.block.alt
|
|
4233
|
-
}, null, 8,
|
|
4449
|
+
}, null, 8, $s), w(Ks)], 4))], 64)) : (f(), x("div", ec, [w(k(nr), {
|
|
4234
4450
|
size: 40,
|
|
4235
4451
|
"stroke-width": 1.5,
|
|
4236
4452
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4237
4453
|
}), b("span", null, p(k(n).video.addVideo), 1)]))], 4));
|
|
4238
4454
|
}
|
|
4239
|
-
}),
|
|
4240
|
-
section:
|
|
4241
|
-
title:
|
|
4242
|
-
paragraph:
|
|
4243
|
-
image:
|
|
4244
|
-
button:
|
|
4245
|
-
divider:
|
|
4246
|
-
video:
|
|
4247
|
-
social:
|
|
4248
|
-
menu:
|
|
4249
|
-
table:
|
|
4250
|
-
spacer:
|
|
4251
|
-
html:
|
|
4252
|
-
countdown: C(() => import("./CountdownBlock-
|
|
4455
|
+
}), nc = {
|
|
4456
|
+
section: Es,
|
|
4457
|
+
title: Pi,
|
|
4458
|
+
paragraph: hi,
|
|
4459
|
+
image: ni,
|
|
4460
|
+
button: Un,
|
|
4461
|
+
divider: Ir,
|
|
4462
|
+
video: tc,
|
|
4463
|
+
social: Is,
|
|
4464
|
+
menu: oi,
|
|
4465
|
+
table: Gs,
|
|
4466
|
+
spacer: zs,
|
|
4467
|
+
html: Hr,
|
|
4468
|
+
countdown: C(() => import("./CountdownBlock-BUHYIAe9.js").then((e) => e.n))
|
|
4253
4469
|
};
|
|
4254
|
-
function
|
|
4255
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } =
|
|
4470
|
+
function rc(e) {
|
|
4471
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = It(r);
|
|
4256
4472
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
4257
|
-
let { resolvedTheme: l } =
|
|
4473
|
+
let { resolvedTheme: l } = bn(M(() => t.state.uiTheme)), d = _(n.theme ?? {}), { themeStyles: f } = Sn({
|
|
4258
4474
|
themeOverrides: d,
|
|
4259
4475
|
resolvedTheme: l,
|
|
4260
4476
|
extraStyles: e.themeExtraStyles
|
|
4261
|
-
}), p =
|
|
4477
|
+
}), p = Xt({
|
|
4262
4478
|
content: t.content,
|
|
4263
4479
|
setContent: (e, n) => t.setContent(e, n),
|
|
4264
4480
|
...e.historyOptions
|
|
4265
4481
|
});
|
|
4266
|
-
|
|
4267
|
-
let m =
|
|
4482
|
+
nn(t, p);
|
|
4483
|
+
let m = Qt({
|
|
4268
4484
|
addBlock: t.addBlock,
|
|
4269
4485
|
removeBlock: t.removeBlock,
|
|
4270
4486
|
updateBlock: t.updateBlock,
|
|
4271
4487
|
selectBlock: t.selectBlock,
|
|
4272
4488
|
findBlockLocation: t.findBlockLocation,
|
|
4273
4489
|
blockDefaults: n.blockDefaults
|
|
4274
|
-
}), h =
|
|
4490
|
+
}), h = en(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? $t({
|
|
4275
4491
|
content: t.content,
|
|
4276
4492
|
isDirty: () => t.state.isDirty,
|
|
4277
4493
|
...e.autoSaveOptions
|
|
@@ -4279,53 +4495,60 @@ function Js(e) {
|
|
|
4279
4495
|
g && (v = c(p.isNavigating, (e) => {
|
|
4280
4496
|
e ? g.pause() : g.resume();
|
|
4281
4497
|
}));
|
|
4282
|
-
let y =
|
|
4498
|
+
let y = yn(t, {
|
|
4283
4499
|
t: a,
|
|
4284
4500
|
format: o
|
|
4285
|
-
}), b =
|
|
4286
|
-
if (
|
|
4287
|
-
|
|
4288
|
-
|
|
4501
|
+
}, n.customBlocks ?? []), b = Qe(n.colors);
|
|
4502
|
+
if (b.allowCustomIgnored && Tn.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 && Tn.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
|
|
4503
|
+
let e = Pn(b.presets, n.blockDefaults, n.templateDefaults);
|
|
4504
|
+
e.length > 0 && Tn.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
|
+
}
|
|
4506
|
+
let x = En();
|
|
4507
|
+
jn(x, nc);
|
|
4508
|
+
let S = /* @__PURE__ */ new Set();
|
|
4509
|
+
function C(e) {
|
|
4510
|
+
for (let t of e) {
|
|
4511
|
+
x.registerCustom(t, Pr);
|
|
4512
|
+
for (let e of In(t, b)) S.has(e.id) || (S.add(e.id), Tn.warn(e.message));
|
|
4513
|
+
}
|
|
4289
4514
|
}
|
|
4290
|
-
|
|
4291
|
-
|
|
4515
|
+
n.customBlocks?.length && C(n.customBlocks);
|
|
4516
|
+
let w = un();
|
|
4517
|
+
if (s() && u(w.dispose), e.containerEl) {
|
|
4292
4518
|
let t = e.containerEl;
|
|
4293
|
-
|
|
4519
|
+
tt(document, "pointerdown", (e) => {
|
|
4294
4520
|
let n = t.value;
|
|
4295
|
-
n && (e.composedPath?.() ?? []).includes(n) &&
|
|
4521
|
+
n && (e.composedPath?.() ?? []).includes(n) && w.claim();
|
|
4296
4522
|
}, { capture: !0 });
|
|
4297
4523
|
}
|
|
4298
|
-
function
|
|
4299
|
-
|
|
4524
|
+
function T(r) {
|
|
4525
|
+
w.isActive() && Rn(r, {
|
|
4300
4526
|
history: p,
|
|
4301
4527
|
selectBlock: (e) => t.selectBlock(e),
|
|
4302
4528
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
4303
4529
|
removeBlock: (e) => t.removeBlock(e),
|
|
4304
4530
|
onSave: n.onSave,
|
|
4305
|
-
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
4531
|
+
onBeforeUndo: e.keyboardOptions?.onBeforeUndo,
|
|
4532
|
+
isPicking: () => e.capabilities?.savedBlocks?.isPicking.value === !0,
|
|
4533
|
+
onConfirmPick: () => e.capabilities?.savedBlocks?.confirmPicking(),
|
|
4534
|
+
onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
|
|
4306
4535
|
});
|
|
4307
4536
|
}
|
|
4308
|
-
|
|
4309
|
-
let
|
|
4310
|
-
E(
|
|
4311
|
-
let
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
e.length > 0 && bn.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.`);
|
|
4315
|
-
}
|
|
4316
|
-
E(wt, T), E(Ot, Sn(t.content, b));
|
|
4317
|
-
let D = me(n.mergeTags?.syntax);
|
|
4318
|
-
E(pt, n.mergeTags?.tags ?? []), E(ut, D), E(St, n.mergeTags?.onRequest ?? null), E(at, n.mergeTags?.autocomplete !== !1), E(it, ln()), E(rt, n.logicTags?.tags ?? []), E(ft, n.logicTags?.pairs ?? []), E(Ct, n.logicTags?.onRequest ?? null), E(jt, un()), E(tt, n.onRequestMedia ?? null), E(gt, n.resolveImageUrl ? sn(n.resolveImageUrl) : null), E(Tt, n.displayConditions?.conditions ?? []), E(Et, n.displayConditions?.allowCustom ?? !1), E(kt, e.capabilities ?? {}), E(Mt, y);
|
|
4319
|
-
let O = dn(n.lint) ? null : fn({
|
|
4537
|
+
tt(document, "keydown", T);
|
|
4538
|
+
let D = _(null);
|
|
4539
|
+
E(bt, e.editorRoot ?? document), E(ut, D), E(ft, r), E(xt, t), E(jt, p), E(St, m), E(vt, h), E(ht, i), E(ct, f), E(Ft, l), E(gt, n.blockDefaults), E(Ot, x), E(yt, n.customBlocks ?? []), E(lt, n.paletteBlocks), E(Pt, Mn(n.htmlBlockPreview)), E(Tt, b), E(kt, Dn(t.content, x));
|
|
4540
|
+
let O = pe(n.mergeTags?.syntax);
|
|
4541
|
+
E(mt, n.mergeTags?.tags ?? []), E(dt, O), E(Ct, n.mergeTags?.onRequest ?? null), E(ot, n.mergeTags?.autocomplete !== !1), E(at, pn()), E(it, n.logicTags?.tags ?? []), E(pt, n.logicTags?.pairs ?? []), E(wt, n.logicTags?.onRequest ?? null), E(Mt, mn()), E(nt, n.onRequestMedia ?? null), E(_t, n.resolveImageUrl ? dn(n.resolveImageUrl) : null), E(Et, n.displayConditions?.conditions ?? []), E(Dt, n.displayConditions?.allowCustom ?? !1), E(At, e.capabilities ?? {}), E(Nt, y);
|
|
4542
|
+
let k = hn(n.lint) ? null : gn({
|
|
4320
4543
|
content: t.content,
|
|
4321
4544
|
options: n.lint ?? {},
|
|
4322
4545
|
updateBlock: t.updateBlock,
|
|
4323
4546
|
updateSettings: t.updateSettings,
|
|
4324
4547
|
removeBlock: t.removeBlock
|
|
4325
4548
|
});
|
|
4326
|
-
E(
|
|
4327
|
-
function
|
|
4328
|
-
v?.(),
|
|
4549
|
+
E(st, k);
|
|
4550
|
+
function A() {
|
|
4551
|
+
v?.(), k?.destroy(), g?.destroy(), p.destroy();
|
|
4329
4552
|
}
|
|
4330
4553
|
return {
|
|
4331
4554
|
t: a,
|
|
@@ -4337,13 +4560,13 @@ function Js(e) {
|
|
|
4337
4560
|
resolvedTheme: l,
|
|
4338
4561
|
themeStyles: f,
|
|
4339
4562
|
themeOverrides: d,
|
|
4340
|
-
registry:
|
|
4563
|
+
registry: x,
|
|
4341
4564
|
keyboardReorder: y,
|
|
4342
|
-
templateLint:
|
|
4343
|
-
popoverRoot:
|
|
4344
|
-
registerCustomBlocks:
|
|
4345
|
-
destroy:
|
|
4565
|
+
templateLint: k,
|
|
4566
|
+
popoverRoot: D,
|
|
4567
|
+
registerCustomBlocks: C,
|
|
4568
|
+
destroy: A
|
|
4346
4569
|
};
|
|
4347
4570
|
}
|
|
4348
4571
|
//#endregion
|
|
4349
|
-
export {
|
|
4572
|
+
export { tr as A, Fn as B, xr as C, lr as D, ur as E, Jn as F, tn as G, vn as H, qn as I, Kt as K, Kn as L, Qn as M, Zn as N, cr as O, Xn as P, Wn as R, Cr as S, hr as T, _n as U, Tn as V, on as W, Wr as _, Is as a, Pr as b, Ss as c, vi as d, gi as f, ni as g, oi as h, zs as i, er as j, ar as k, Pi as l, hi as m, tc as n, ks as o, _i as p, rn as q, Gs as r, Es as s, rc as t, Mi as u, Hr as v, gr as w, Tr as x, Ir as y, Un as z };
|