@templatical/editor 0.54.2 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiAltTextPopover-BBKVJ6HA.js → AiAltTextPopover-D5QosKvB.js} +1 -1
- package/dist/{AiAltTextReview-BuVbeQh-.js → AiAltTextReview-D1W_lrI_.js} +1 -1
- package/dist/{AiRewriteMenu-ZpYJfm-O.js → AiRewriteMenu-BwztoMov.js} +4 -4
- package/dist/{BlockPreviewCanvas-DtOo5y3U.js → BlockPreviewCanvas-C23A6FRm.js} +4 -4
- package/dist/{CloudPanels-DQRWMc59.js → CloudPanels-Baoaj6Xf.js} +1 -1
- package/dist/{CountdownToolbar-DTpMEDyh.js → CountdownToolbar-CA_gDIdZ.js} +4 -4
- package/dist/{IssuesPanel-BZn7-p9e.js → IssuesPanel-nmFhWG1p.js} +1 -1
- package/dist/{LanguageMenu-OOmQWVzO.js → LanguageMenu-DcABUYop.js} +3 -3
- package/dist/{LogicTagInsertButton-XESwnJia.js → LogicTagInsertButton-qZ82VMFx.js} +284 -279
- package/dist/{MergeTagInput-CAsBRoSm.js → MergeTagInput-JJeZbFkD.js} +1 -1
- package/dist/{MergeTagModeToggle-bOf27Hg1.js → MergeTagModeToggle-DDucd1eC.js} +1 -1
- package/dist/{MergeTagTextarea-DH_6JFui.js → MergeTagTextarea-dQ2LRrNB.js} +2 -2
- package/dist/{ParagraphEditor-XGUkV5Uw.js → ParagraphEditor-VXYwGoz_.js} +8 -8
- package/dist/{RestoreVersionDialog-C72kWccI.js → RestoreVersionDialog-BibNvAaJ.js} +1 -1
- package/dist/{RichTextEditorContent-BZN8KRvR.js → RichTextEditorContent-CU5EOlM_.js} +2 -2
- package/dist/{SaveBlockDialog-CKOnTMTU.js → SaveBlockDialog-S9aFi0cy.js} +4 -4
- package/dist/{SavedBlocksBrowserModal-BrlNxqDH.js → SavedBlocksBrowserModal-DIdn6B0J.js} +4 -4
- package/dist/{SavedBlocksPanels--lPR6gdh.js → SavedBlocksPanels-Cme2M6u8.js} +1 -1
- package/dist/{SavedBlocksPickBar-4ON4_KKl.js → SavedBlocksPickBar-BDmA7r3m.js} +1 -1
- package/dist/{TemplateSettings-BE0jZmRJ.js → TemplateSettings-C_LHLm5M.js} +4 -4
- package/dist/{TestEmailModal-BKmNGrZN.js → TestEmailModal-CLIRn7eL.js} +5 -5
- package/dist/{TestEmailPanel-DT1wllX3.js → TestEmailPanel-frdtjC8h.js} +1 -1
- package/dist/{TitleEditor-HjVZuUTB.js → TitleEditor-D5kC56Jl.js} +4 -4
- package/dist/{Toolbar-BppchV2k.js → Toolbar-D904Yw_R.js} +551 -503
- package/dist/{TplModal-BFWOoK8l.js → TplModal-BBdotDf1.js} +1 -1
- package/dist/{VersionHistoryPanels-D4yNVLvq.js → VersionHistoryPanels-DhagEgOk.js} +1 -1
- package/dist/{WrapperBlock-BUzQTZuu.js → WrapperBlock-BAT3T0Cz.js} +3 -3
- package/dist/{blockTypeIcons-D91v9k0x.js → blockTypeIcons-CoRQV_hP.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/{cdn/chunks/ca-DOuIxWRv.js → ca-DIkMxYCN.js} +10 -3
- package/dist/cdn/chunks/{AiAltTextPopover-CAI18sdv.js → AiAltTextPopover-CUGOPuRo.js} +2 -2
- package/dist/cdn/chunks/{AiAltTextPopover-CAI18sdv.js.map → AiAltTextPopover-CUGOPuRo.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-CWEyMOF-.js → AiAltTextReview-B9vm_L-8.js} +2 -2
- package/dist/cdn/chunks/{AiAltTextReview-CWEyMOF-.js.map → AiAltTextReview-B9vm_L-8.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-BEepu1vo.js → AiRewriteMenu-BvV_7tNZ.js} +7 -7
- package/dist/cdn/chunks/{AiRewriteMenu-BEepu1vo.js.map → AiRewriteMenu-BvV_7tNZ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-B6ndvof2.js → BlockPreviewCanvas-Dr-xGq6v.js} +7 -7
- package/dist/cdn/chunks/{BlockPreviewCanvas-B6ndvof2.js.map → BlockPreviewCanvas-Dr-xGq6v.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-BGwDb0jB.js → CloudPanels-CQ0vNgsH.js} +2 -2
- package/dist/cdn/chunks/{CloudPanels-BGwDb0jB.js.map → CloudPanels-CQ0vNgsH.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-B-0FsTj-.js → CountdownToolbar-BxW-J7DX.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-B-0FsTj-.js.map → CountdownToolbar-BxW-J7DX.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-LyjMBDok.js → IssuesPanel-BoHeIjvw.js} +3 -3
- package/dist/cdn/chunks/{IssuesPanel-LyjMBDok.js.map → IssuesPanel-BoHeIjvw.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-CGwMCOQ5.js → LanguageMenu-BnYN5N1h.js} +7 -7
- package/dist/cdn/chunks/{LanguageMenu-CGwMCOQ5.js.map → LanguageMenu-BnYN5N1h.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-PDKuo2J3.js → LogicTagInsertButton-Bt2PXbQ0.js} +255 -250
- package/dist/cdn/chunks/LogicTagInsertButton-Bt2PXbQ0.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagInput-DoQHBJk2.js → MergeTagInput-BELdMRni.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput-DoQHBJk2.js.map → MergeTagInput-BELdMRni.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-Ct5IG4VW.js → MergeTagModeToggle-DKfMDIEF.js} +2 -2
- package/dist/cdn/chunks/{MergeTagModeToggle-Ct5IG4VW.js.map → MergeTagModeToggle-DKfMDIEF.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-BMsnjphR.js → MergeTagTextarea-w6xen3Xh.js} +5 -5
- package/dist/cdn/chunks/{MergeTagTextarea-BMsnjphR.js.map → MergeTagTextarea-w6xen3Xh.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CVW-kuHW.js → ParagraphEditor-Cal9hY3U.js} +9 -9
- package/dist/cdn/chunks/{ParagraphEditor-CVW-kuHW.js.map → ParagraphEditor-Cal9hY3U.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-7MFZz-Sb.js → RestoreVersionDialog-f_ulmASY.js} +2 -2
- package/dist/cdn/chunks/{RestoreVersionDialog-7MFZz-Sb.js.map → RestoreVersionDialog-f_ulmASY.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-CiL-SkZg.js → RichTextEditorContent-C_v0kS4A.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-CiL-SkZg.js.map → RichTextEditorContent-C_v0kS4A.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CxdekCYy.js → SaveBlockDialog-C6N9RFls.js} +5 -5
- package/dist/cdn/chunks/{SaveBlockDialog-CxdekCYy.js.map → SaveBlockDialog-C6N9RFls.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-D9CAa2U3.js → SavedBlocksBrowserModal-Bl2sl09D.js} +4 -4
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-D9CAa2U3.js.map → SavedBlocksBrowserModal-Bl2sl09D.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-jfkYWtss.js → SavedBlocksPanels-DqVcmEUK.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-jfkYWtss.js.map → SavedBlocksPanels-DqVcmEUK.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-yaCumC4j.js → SavedBlocksPickBar-DE-J1JVL.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPickBar-yaCumC4j.js.map → SavedBlocksPickBar-DE-J1JVL.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-SaV2UVh_.js → TemplateSettings-CpoKZ8oV.js} +5 -5
- package/dist/cdn/chunks/{TemplateSettings-SaV2UVh_.js.map → TemplateSettings-CpoKZ8oV.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-ByfhP_sm.js → TestEmailModal-DI3z__Bd.js} +8 -8
- package/dist/cdn/chunks/{TestEmailModal-ByfhP_sm.js.map → TestEmailModal-DI3z__Bd.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-CfzpqpDs.js → TestEmailPanel-Cp5d2YGn.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-CfzpqpDs.js.map → TestEmailPanel-Cp5d2YGn.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-Ceb0YfWv.js → TitleEditor-C2syRLdZ.js} +4 -4
- package/dist/cdn/chunks/{TitleEditor-Ceb0YfWv.js.map → TitleEditor-C2syRLdZ.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-Cv6Rv1S-.js → Toolbar-NEE8qxYh.js} +754 -706
- package/dist/cdn/chunks/Toolbar-NEE8qxYh.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-DGpGdwgf.js → TplModal-B1MgvtX8.js} +2 -2
- package/dist/cdn/chunks/{TplModal-DGpGdwgf.js.map → TplModal-B1MgvtX8.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BJnHCMAH.js → VersionHistoryPanels-Cefd8i_e.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-BJnHCMAH.js.map → VersionHistoryPanels-Cefd8i_e.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-C_uE5rPJ.js → WrapperBlock-DFY-7YSs.js} +4 -4
- package/dist/cdn/chunks/{WrapperBlock-C_uE5rPJ.js.map → WrapperBlock-DFY-7YSs.js.map} +1 -1
- package/dist/{ca-DOuIxWRv.js → cdn/chunks/ca-DIkMxYCN.js} +12 -1
- package/dist/cdn/chunks/{ca-DOuIxWRv.js.map → ca-DIkMxYCN.js.map} +1 -1
- package/dist/cdn/chunks/{composables-BxikPuC1.js → composables-nyxwrM27.js} +610 -594
- package/dist/cdn/chunks/composables-nyxwrM27.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-D2DUaudp.js → createCloudRuntime-DJkDGKQ_.js} +3 -3
- package/dist/cdn/chunks/{createCloudRuntime-D2DUaudp.js.map → createCloudRuntime-DJkDGKQ_.js.map} +1 -1
- package/dist/{de-DaOUfYBX.js → cdn/chunks/de-Cc6Ue0UD.js} +12 -1
- package/dist/cdn/chunks/de-Cc6Ue0UD.js.map +1 -0
- package/dist/cdn/chunks/{en-C0pHHMiR.js → en-BX4FujAQ.js} +11 -2
- package/dist/cdn/chunks/en-BX4FujAQ.js.map +1 -0
- package/dist/{es-CxyEKr6n.js → cdn/chunks/es-Do5b-MKU.js} +12 -1
- package/dist/cdn/chunks/es-Do5b-MKU.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DuDWpKo7.js → extensions-BcwkOjVq.js} +76 -70
- package/dist/cdn/chunks/extensions-BcwkOjVq.js.map +1 -0
- package/dist/{fr-CYbamiI6.js → cdn/chunks/fr-S1n2Ebzp.js} +12 -1
- package/dist/cdn/chunks/fr-S1n2Ebzp.js.map +1 -0
- package/dist/cdn/chunks/{ja-DfaIAoGI.js → ja-DLwcq4bA.js} +11 -2
- package/dist/cdn/chunks/ja-DLwcq4bA.js.map +1 -0
- package/dist/{nl-DkrB-VKZ.js → cdn/chunks/nl-0JSWaZpT.js} +12 -1
- package/dist/cdn/chunks/nl-0JSWaZpT.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-Bn_hl4jd.js → normalizeMergeTagMarkup-BrGw5jxk.js} +99 -89
- package/dist/cdn/chunks/normalizeMergeTagMarkup-BrGw5jxk.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-C9oavydG.js → preRenderCustomBlocks-Cj0XYwuh.js} +4 -4
- package/dist/cdn/chunks/{preRenderCustomBlocks-C9oavydG.js.map → preRenderCustomBlocks-Cj0XYwuh.js.map} +1 -1
- package/dist/{pt-BR-CY5Ye7eP.js → cdn/chunks/pt-BR-D3VlIMDZ.js} +12 -1
- package/dist/cdn/chunks/pt-BR-D3VlIMDZ.js.map +1 -0
- package/dist/cdn/chunks/{sanitizeHtml-DfXoetOm.js → sanitizeHtml-GxJCxKcP.js} +3 -3
- package/dist/cdn/chunks/{sanitizeHtml-DfXoetOm.js.map → sanitizeHtml-GxJCxKcP.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-DPwkrn5v.js → socialIcons-B5zrrV8-.js} +387 -386
- package/dist/cdn/chunks/{socialIcons-DPwkrn5v.js.map → socialIcons-B5zrrV8-.js.map} +1 -1
- package/dist/cdn/chunks/{src-712f3ofG.js → src-Diw9SLIe.js} +673 -554
- package/dist/cdn/chunks/src-Diw9SLIe.js.map +1 -0
- package/dist/cdn/chunks/{src-B2tQbzf6.js → src-UR3AQocX.js} +221 -215
- package/dist/cdn/chunks/src-UR3AQocX.js.map +1 -0
- package/dist/cdn/chunks/{src-ZFw5fg_z.js → src-v47QHNmB.js} +809 -659
- package/dist/cdn/chunks/src-v47QHNmB.js.map +1 -0
- package/dist/cdn/chunks/useLocalizedDisplay-DekV8qar.js +33 -0
- package/dist/cdn/chunks/{useLocalizedDisplay-DiNjT22M.js.map → useLocalizedDisplay-DekV8qar.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-SvMW4g00.js → useLogicTag-Cbp3I7UN.js} +2 -2
- package/dist/cdn/chunks/{useLogicTag-SvMW4g00.js.map → useLogicTag-Cbp3I7UN.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-JLz3Pqcw.js → useMergeTag-1lrpNyR5.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-JLz3Pqcw.js.map → useMergeTag-1lrpNyR5.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-BcoPpkDS.js → withCurrentFont-DZfmiv8V.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-BcoPpkDS.js.map → withCurrentFont-DZfmiv8V.js.map} +1 -1
- package/dist/cdn/editor.js +284 -284
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{composables-BbPFRlBf.js → composables-DPgNn9GZ.js} +929 -913
- package/dist/{createCloudRuntime-Dlrg88gS.js → createCloudRuntime-Bw8TLmQ8.js} +2 -2
- package/dist/{cdn/chunks/de-DaOUfYBX.js → de-Cc6Ue0UD.js} +10 -3
- package/dist/{dist-C34cYI5S.js → dist-CBdk1Vcb.js} +963 -813
- package/dist/{en-C0pHHMiR.js → en-BX4FujAQ.js} +10 -1
- package/dist/{cdn/chunks/es-CxyEKr6n.js → es-Do5b-MKU.js} +10 -3
- package/dist/{extensions-xCiyqSg7.js → extensions-QFAARrjF.js} +338 -332
- package/dist/{cdn/chunks/fr-CYbamiI6.js → fr-S1n2Ebzp.js} +10 -3
- package/dist/index.d.ts +14 -1
- package/dist/{ja-DfaIAoGI.js → ja-DLwcq4bA.js} +10 -1
- package/dist/{cdn/chunks/nl-DkrB-VKZ.js → nl-0JSWaZpT.js} +10 -3
- package/dist/{normalizeMergeTagMarkup-C7FGNURu.js → normalizeMergeTagMarkup-BS0nRvhq.js} +89 -79
- package/dist/{preRenderCustomBlocks-DvbRa3L3.js → preRenderCustomBlocks-CiKvKd8V.js} +1 -1
- package/dist/{cdn/chunks/pt-BR-CY5Ye7eP.js → pt-BR-D3VlIMDZ.js} +10 -3
- package/dist/{sanitizeHtml-D_ab7dD6.js → sanitizeHtml-USjTyALR.js} +1 -1
- package/dist/{socialIcons-DhAolBjt.js → socialIcons-NvIg5ahU.js} +338 -337
- package/dist/templatical-editor.js +41 -41
- package/dist/{useLocalizedDisplay-C9MBFUr4.js → useLocalizedDisplay-LdjosX4w.js} +1 -1
- package/dist/{useLogicTag-BmuakZBd.js → useLogicTag-D8zgkXfb.js} +1 -1
- package/dist/{useMergeTag-DC4a8b_v.js → useMergeTag-k7Kr0nMd.js} +1 -1
- package/dist/{withCurrentFont-BSxJai99.js → withCurrentFont-Bzeg_gfH.js} +1 -1
- package/package.json +7 -7
- package/dist/cdn/chunks/LogicTagInsertButton-PDKuo2J3.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-Cv6Rv1S-.js.map +0 -1
- package/dist/cdn/chunks/composables-BxikPuC1.js.map +0 -1
- package/dist/cdn/chunks/de-DaOUfYBX.js.map +0 -1
- package/dist/cdn/chunks/en-C0pHHMiR.js.map +0 -1
- package/dist/cdn/chunks/es-CxyEKr6n.js.map +0 -1
- package/dist/cdn/chunks/extensions-DuDWpKo7.js.map +0 -1
- package/dist/cdn/chunks/fr-CYbamiI6.js.map +0 -1
- package/dist/cdn/chunks/ja-DfaIAoGI.js.map +0 -1
- package/dist/cdn/chunks/nl-DkrB-VKZ.js.map +0 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-Bn_hl4jd.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CY5Ye7eP.js.map +0 -1
- package/dist/cdn/chunks/src-712f3ofG.js.map +0 -1
- package/dist/cdn/chunks/src-B2tQbzf6.js.map +0 -1
- package/dist/cdn/chunks/src-ZFw5fg_z.js.map +0 -1
- package/dist/cdn/chunks/useLocalizedDisplay-DiNjT22M.js +0 -33
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { A as e, B as t, D as n, F as r, Ft as i, H as a, L as o, M as s, Mt as c, N as l, O as u, P as d, Pt as f, Q as p, S as m, U as h, W as g, Y as _, Z as v, _ as y, a as b, at as x, b as S, c as C, ct as w, d as T, et as E, f as D, g as O, j as k, k as A, l as j, nt as M, ot as N, q as ee, r as P, st as te, u as F, v as I, w as L, y as R } from "./vue.runtime.esm-bundler-BJXc_Mri.js";
|
|
2
2
|
import { c as z, o as ne, s as re } from "./runtime-dom.esm-bundler-DlHp8xgy.js";
|
|
3
|
-
import { $t as ie, A as ae, B as oe, Bt as se, Dt as B, G as ce, Gt as le, Ht as ue, I as de, It as fe, J as pe, Jt as me, K as he, Kt as ge, L as _e, Lt as ve, M as ye, N as be, O as xe, P as Se, Q as Ce,
|
|
4
|
-
import { B as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { n as
|
|
9
|
-
import { t as
|
|
10
|
-
import { n as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { $ as
|
|
16
|
-
import { t as
|
|
17
|
-
import { n as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { m as
|
|
21
|
-
import { _ as
|
|
22
|
-
import { a as
|
|
23
|
-
import { t as
|
|
3
|
+
import { $t as ie, A as ae, B as oe, Bt as se, Dt as B, G as ce, Gt as le, Ht as ue, I as de, It as fe, J as pe, Jt as me, K as he, Kt as ge, L as _e, Lt as ve, M as ye, N as be, O as xe, P as Se, Q as Ce, R as we, Rt as Te, Ut as Ee, V as De, Vt as Oe, W as ke, Wt as Ae, X as je, Xt as Me, Yt as Ne, Zt as Pe, bt as Fe, c as Ie, ct as Le, en as Re, f as ze, ft as Be, g as Ve, gt as He, it as Ue, j as We, jt as Ge, kt as Ke, lt as qe, nn as Je, nt as Ye, o as Xe, ot as Ze, p as Qe, pt as $e, q as et, qt as tt, rn as nt, rt, s as it, tn as at, tt as ot, ut as st, v as ct, vt as lt, x as ut, y as dt, yt as ft, z as pt, zt as mt } from "./dist-CBdk1Vcb.js";
|
|
4
|
+
import { B as ht, C as gt, D as _t, E as vt, F as yt, H as bt, O as xt, P as St, T as Ct, U as wt, _ as Tt, a as Et, f as Dt, h as Ot, k as kt, n as At, o as jt, t as Mt, u as Nt, v as Pt, w as Ft, x as It, y as Lt, z as Rt } from "./socialIcons-NvIg5ahU.js";
|
|
5
|
+
import { t as zt } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
6
|
+
import { t as Bt } from "./createLucideIcon-CgDE3xAR.js";
|
|
7
|
+
import { t as Vt } from "./clock-BVT5u2uG.js";
|
|
8
|
+
import { n as Ht } from "./upload-Cp8o-hrN.js";
|
|
9
|
+
import { t as Ut } from "./image-Ch8tR35K.js";
|
|
10
|
+
import { n as Wt, r as Gt, t as Kt } from "./sanitizeHtml-USjTyALR.js";
|
|
11
|
+
import { t as qt } from "./message-circle-C23R6OJR.js";
|
|
12
|
+
import { t as Jt } from "./pencil-BK7GrQuA.js";
|
|
13
|
+
import { t as Yt } from "./trash-B99WixTA.js";
|
|
14
|
+
import { t as Xt } from "./triangle-alert-CHMiDkHa.js";
|
|
15
|
+
import { $ as Zt, A as Qt, B as $t, C as en, D as tn, F as nn, G as rn, H as an, I as on, J as sn, K as cn, L as ln, M as un, N as dn, O as fn, P as pn, Q as mn, R as hn, S as gn, T as _n, U as vn, V as yn, W as bn, X as xn, _ as Sn, a as Cn, at as wn, b as Tn, c as En, d as Dn, et as On, g as kn, h as An, i as jn, it as Mn, j as Nn, k as Pn, l as Fn, m as In, nt as Ln, ot as Rn, p as zn, q as Bn, r as Vn, rt as Hn, s as Un, tt as Wn, u as Gn, v as Kn, w as qn, x as Jn, y as Yn, z as Xn } from "./keys-BCqskl51.js";
|
|
16
|
+
import { t as Zn } from "./useI18n-CgtvtF4C.js";
|
|
17
|
+
import { n as Qn } from "./useLocalizedDisplay-LdjosX4w.js";
|
|
18
|
+
import { t as $n } from "./plural-CyxrJXL1.js";
|
|
19
|
+
import { t as er } from "./languageName-DEEOhDWI.js";
|
|
20
|
+
import { m as tr, w as nr, x as rr } from "./styleConstants-CgiNKdnc.js";
|
|
21
|
+
import { _ as ir, h as ar, v as or, y as sr } from "./dist-CX7skkvG.js";
|
|
22
|
+
import { a as cr, c as lr, i as ur, l as dr } from "./dist-0alKVRc_.js";
|
|
23
|
+
import { t as fr } from "./useEditorRoot-DY3mgcHm.js";
|
|
24
24
|
import "./useCloudI18n-Dh2iydo1.js";
|
|
25
|
-
import { t as
|
|
26
|
-
import { t as
|
|
27
|
-
import { a as
|
|
28
|
-
import { t as
|
|
29
|
-
import { r as
|
|
30
|
-
import { t as
|
|
31
|
-
import { t as
|
|
32
|
-
var
|
|
25
|
+
import { t as pr } from "./useMergeTag-k7Kr0nMd.js";
|
|
26
|
+
import { t as mr } from "./logger-BOu7oEtk.js";
|
|
27
|
+
import { a as hr, c as gr, i as _r, n as vr, o as yr, t as br } from "./usePopoverPosition-VDQjyX_A.js";
|
|
28
|
+
import { t as xr } from "./useLogicTag-D8zgkXfb.js";
|
|
29
|
+
import { r as Sr, t as Cr } from "./templateSettingsFields-cjlP-jdw.js";
|
|
30
|
+
import { t as wr } from "./LoadingTrack-BG8cg9xi.js";
|
|
31
|
+
import { t as Tr } from "./readableTextColor-BfZUGnVj.js";
|
|
32
|
+
var Er = Bt({
|
|
33
33
|
name: "bookmark",
|
|
34
34
|
size: 24,
|
|
35
35
|
node: [["path", {
|
|
36
36
|
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",
|
|
37
37
|
key: "oz39mx"
|
|
38
38
|
}]]
|
|
39
|
-
}),
|
|
39
|
+
}), Dr = Bt({
|
|
40
40
|
name: "box",
|
|
41
41
|
size: 24,
|
|
42
42
|
node: [
|
|
@@ -53,7 +53,7 @@ var wr = Rt({
|
|
|
53
53
|
key: "d0xqtd"
|
|
54
54
|
}]
|
|
55
55
|
]
|
|
56
|
-
}),
|
|
56
|
+
}), Or = Bt({
|
|
57
57
|
name: "eye-off",
|
|
58
58
|
size: 24,
|
|
59
59
|
node: [
|
|
@@ -74,7 +74,7 @@ var wr = Rt({
|
|
|
74
74
|
key: "1ooewy"
|
|
75
75
|
}]
|
|
76
76
|
]
|
|
77
|
-
}),
|
|
77
|
+
}), kr = Bt({
|
|
78
78
|
name: "funnel",
|
|
79
79
|
size: 24,
|
|
80
80
|
node: [["path", {
|
|
@@ -82,7 +82,7 @@ var wr = Rt({
|
|
|
82
82
|
key: "sc7q7i"
|
|
83
83
|
}]],
|
|
84
84
|
aliases: ["filter"]
|
|
85
|
-
}),
|
|
85
|
+
}), Ar = Bt({
|
|
86
86
|
name: "grip-vertical",
|
|
87
87
|
size: 24,
|
|
88
88
|
node: [
|
|
@@ -123,14 +123,14 @@ var wr = Rt({
|
|
|
123
123
|
key: "f4zoj3"
|
|
124
124
|
}]
|
|
125
125
|
]
|
|
126
|
-
}),
|
|
126
|
+
}), jr = Bt({
|
|
127
127
|
name: "puzzle",
|
|
128
128
|
size: 24,
|
|
129
129
|
node: [["path", {
|
|
130
130
|
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",
|
|
131
131
|
key: "w46dr5"
|
|
132
132
|
}]]
|
|
133
|
-
}),
|
|
133
|
+
}), Mr = Bt({
|
|
134
134
|
name: "video",
|
|
135
135
|
size: 24,
|
|
136
136
|
node: [["path", {
|
|
@@ -144,11 +144,11 @@ var wr = Rt({
|
|
|
144
144
|
rx: "2",
|
|
145
145
|
key: "158x01"
|
|
146
146
|
}]]
|
|
147
|
-
}),
|
|
148
|
-
function
|
|
149
|
-
let r =
|
|
147
|
+
}), Nr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
148
|
+
function Pr(e, n) {
|
|
149
|
+
let r = fr(), i = null, a = null, o = null;
|
|
150
150
|
function s() {
|
|
151
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
151
|
+
return e.value ? Array.from(e.value.querySelectorAll(Nr)).filter((e) => e.offsetParent !== null) : [];
|
|
152
152
|
}
|
|
153
153
|
function c(e) {
|
|
154
154
|
if (e.key !== "Tab") return;
|
|
@@ -163,7 +163,7 @@ function Mr(e, n) {
|
|
|
163
163
|
o = null;
|
|
164
164
|
let t = s();
|
|
165
165
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
166
|
-
}), a =
|
|
166
|
+
}), a = cr(e, "keydown", c);
|
|
167
167
|
}
|
|
168
168
|
function u(e = {}) {
|
|
169
169
|
let t = e.restoreFocus !== !1;
|
|
@@ -177,8 +177,8 @@ function Mr(e, n) {
|
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
// src/composables/useEmoji.ts
|
|
180
|
-
function
|
|
181
|
-
let [e, n] =
|
|
180
|
+
function Fr() {
|
|
181
|
+
let [e, n] = or(!1), r = M([]), i = !1;
|
|
182
182
|
v(() => {
|
|
183
183
|
i = !0;
|
|
184
184
|
}), t(e, async (e) => {
|
|
@@ -202,7 +202,7 @@ function Nr() {
|
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
204
|
// src/composables/useBlockRegistry.ts
|
|
205
|
-
function
|
|
205
|
+
function Ir() {
|
|
206
206
|
let e = M(/* @__PURE__ */ new Map());
|
|
207
207
|
function t(t, n) {
|
|
208
208
|
e.value.set(t, n), te(e);
|
|
@@ -238,7 +238,7 @@ function Pr() {
|
|
|
238
238
|
try {
|
|
239
239
|
return await Se(await import("./liquid.browser-DUXEekoN.js")).parseAndRender(t.template, e.fieldValues);
|
|
240
240
|
} catch (t) {
|
|
241
|
-
return
|
|
241
|
+
return mr.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
function c(t) {
|
|
@@ -255,7 +255,7 @@ function Pr() {
|
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
257
|
// src/composables/useFonts.ts
|
|
258
|
-
var
|
|
258
|
+
var Lr = [
|
|
259
259
|
{
|
|
260
260
|
value: "Arial",
|
|
261
261
|
label: "Arial"
|
|
@@ -284,19 +284,19 @@ var Fr = [
|
|
|
284
284
|
value: "Courier New",
|
|
285
285
|
label: "Courier New"
|
|
286
286
|
}
|
|
287
|
-
],
|
|
288
|
-
function
|
|
289
|
-
if (e === void 0 || e === !0) return [...
|
|
287
|
+
], Rr = "Arial, sans-serif";
|
|
288
|
+
function zr(e) {
|
|
289
|
+
if (e === void 0 || e === !0) return [...Lr];
|
|
290
290
|
if (e === !1) return [];
|
|
291
291
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
292
292
|
for (let i of e) {
|
|
293
|
-
let e = i.toLowerCase(), a =
|
|
294
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e),
|
|
293
|
+
let e = i.toLowerCase(), a = Lr.find((t) => t.value.toLowerCase() === e);
|
|
294
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), mr.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Lr.map((e) => e.value).join(", ")}.`));
|
|
295
295
|
}
|
|
296
296
|
return t;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
299
|
-
let t = E(e?.customFonts ?? []), n = E(!1), r =
|
|
298
|
+
function Br(e) {
|
|
299
|
+
let t = E(e?.customFonts ?? []), n = E(!1), r = zr(e?.builtIns), i = C(() => e?.defaultFallback ?? Rr), a = C(() => {
|
|
300
300
|
let e = [...r], n = t.value.map((e) => ({
|
|
301
301
|
value: e.name,
|
|
302
302
|
label: e.name,
|
|
@@ -307,14 +307,14 @@ function Rr(e) {
|
|
|
307
307
|
function o(e) {
|
|
308
308
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
309
309
|
}
|
|
310
|
-
let s = e?.defaultFont ??
|
|
311
|
-
o(s) ||
|
|
310
|
+
let s = e?.defaultFont ?? Rr.split(",")[0].trim();
|
|
311
|
+
o(s) || mr.warn(`config.fonts: new templates seed "${s}", 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.`);
|
|
312
312
|
function c() {
|
|
313
313
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
314
314
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
315
315
|
if (t) return t.value;
|
|
316
316
|
}
|
|
317
|
-
return
|
|
317
|
+
return Rr;
|
|
318
318
|
}
|
|
319
319
|
let l = C(() => c());
|
|
320
320
|
function u(e) {
|
|
@@ -337,7 +337,7 @@ function Rr(e) {
|
|
|
337
337
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
338
338
|
});
|
|
339
339
|
} catch (t) {
|
|
340
|
-
|
|
340
|
+
mr.warn(`Failed to load custom font "${e.name}":`, t);
|
|
341
341
|
}
|
|
342
342
|
});
|
|
343
343
|
await Promise.allSettled(e), !f && (n.value = !0);
|
|
@@ -361,7 +361,7 @@ function Rr(e) {
|
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
// src/composables/useThemeStyles.ts
|
|
364
|
-
var
|
|
364
|
+
var Vr = {
|
|
365
365
|
bg: "--tpl-bg",
|
|
366
366
|
bgElevated: "--tpl-bg-elevated",
|
|
367
367
|
bgHover: "--tpl-bg-hover",
|
|
@@ -385,10 +385,10 @@ var zr = {
|
|
|
385
385
|
dangerLight: "--tpl-danger-light",
|
|
386
386
|
canvasBg: "--tpl-canvas-bg"
|
|
387
387
|
};
|
|
388
|
-
function
|
|
388
|
+
function Hr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
389
389
|
return { themeStyles: C(() => {
|
|
390
390
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
391
|
-
if (a) for (let [e, t] of Object.entries(
|
|
391
|
+
if (a) for (let [e, t] of Object.entries(Vr)) {
|
|
392
392
|
let n = a[e];
|
|
393
393
|
n && (r[t] = n);
|
|
394
394
|
}
|
|
@@ -396,8 +396,8 @@ function Br({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
396
396
|
}) };
|
|
397
397
|
}
|
|
398
398
|
// src/utils/mergeTagNodeSpec.ts
|
|
399
|
-
function
|
|
400
|
-
return
|
|
399
|
+
function Ur(e, t, n) {
|
|
400
|
+
return lt(e, n) ? {
|
|
401
401
|
type: "logicMergeTagNode",
|
|
402
402
|
attrs: {
|
|
403
403
|
value: e,
|
|
@@ -412,32 +412,32 @@ function Vr(e, t, n) {
|
|
|
412
412
|
};
|
|
413
413
|
}
|
|
414
414
|
// src/utils/insertLogicTag.ts
|
|
415
|
-
function
|
|
415
|
+
function Wr(e) {
|
|
416
416
|
return "before" in e && "after" in e;
|
|
417
417
|
}
|
|
418
|
-
function
|
|
419
|
-
if (!
|
|
420
|
-
e.chain().focus().insertContent(
|
|
418
|
+
function Gr(e, t, n) {
|
|
419
|
+
if (!Wr(t)) {
|
|
420
|
+
e.chain().focus().insertContent(Ur(t.value, t.label, n)).run();
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
|
-
let r =
|
|
423
|
+
let r = Ur(t.before, t.label, n), i = Ur(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
424
424
|
a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
425
425
|
}
|
|
426
426
|
// src/utils/linkColorExtension.ts
|
|
427
|
-
function
|
|
427
|
+
function Kr(e) {
|
|
428
428
|
if (!e) return null;
|
|
429
429
|
let t = e.trim();
|
|
430
430
|
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;
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function qr(e) {
|
|
433
433
|
return e.extend({ addAttributes() {
|
|
434
434
|
return {
|
|
435
435
|
...this.parent?.(),
|
|
436
436
|
color: {
|
|
437
437
|
default: null,
|
|
438
|
-
parseHTML: (e) =>
|
|
438
|
+
parseHTML: (e) => Kr(yr(e.style.color)),
|
|
439
439
|
renderHTML: (e) => {
|
|
440
|
-
let t =
|
|
440
|
+
let t = Kr(e.color);
|
|
441
441
|
return t ? { style: `color: ${t}` } : {};
|
|
442
442
|
}
|
|
443
443
|
}
|
|
@@ -445,9 +445,9 @@ function Gr(e) {
|
|
|
445
445
|
} });
|
|
446
446
|
}
|
|
447
447
|
// src/composables/useRichTextLinkDialog.ts
|
|
448
|
-
function
|
|
448
|
+
function Jr(e, t = Ve.liquid, n = () => !0) {
|
|
449
449
|
let r = E(!1), i = E(""), a = E(""), o = E(null);
|
|
450
|
-
|
|
450
|
+
Pr(o, r);
|
|
451
451
|
function s() {
|
|
452
452
|
if (!n()) return;
|
|
453
453
|
let t = e.value?.getAttributes("link") ?? {};
|
|
@@ -458,7 +458,7 @@ function Kr(e, t = Ve.liquid, n = () => !0) {
|
|
|
458
458
|
if (i.value) {
|
|
459
459
|
let t = d(i.value);
|
|
460
460
|
if (t !== null) {
|
|
461
|
-
let n =
|
|
461
|
+
let n = Kr(a.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
462
462
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
463
463
|
}
|
|
464
464
|
}
|
|
@@ -475,8 +475,8 @@ function Kr(e, t = Ve.liquid, n = () => !0) {
|
|
|
475
475
|
if (t.startsWith("#")) return t;
|
|
476
476
|
if (t.startsWith("//")) return `https:${t}`;
|
|
477
477
|
if (l.test(t)) return t;
|
|
478
|
-
let n =
|
|
479
|
-
return n ?
|
|
478
|
+
let n = Ye(t);
|
|
479
|
+
return n ? Qe.some((e) => e === n) ? t : null : u(t) ? t : `https://${t}`;
|
|
480
480
|
}
|
|
481
481
|
function f() {
|
|
482
482
|
n() && (e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), p());
|
|
@@ -500,13 +500,13 @@ function Kr(e, t = Ve.liquid, n = () => !0) {
|
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
502
|
// src/composables/useRichTextEditor.ts
|
|
503
|
-
function
|
|
504
|
-
let n = L(
|
|
503
|
+
function Yr(e) {
|
|
504
|
+
let n = L(Kn, null), r = gr(), { mergeTags: i, canRequestMergeTag: a, isRequesting: o, requestMergeTag: s, syntax: c, autocomplete: l } = pr(), { canInsertLogicTag: u, isRequesting: d, requestLogicTag: f } = xr(), p = L(Wn, null), m = (_(p) ? p.value : p)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", h = Be(c), g = M(null), v = n?.content ? Qn(n) : null, y = () => mt(v?.settings.value ?? { locale: "en" });
|
|
505
505
|
t(y, (e) => {
|
|
506
506
|
let t = g.value?.view.dom;
|
|
507
507
|
t && t.setAttribute("dir", e);
|
|
508
508
|
});
|
|
509
|
-
let { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } =
|
|
509
|
+
let { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } = Jr(g, c, () => r.value);
|
|
510
510
|
t(r, (e) => {
|
|
511
511
|
if (g.value?.setEditable(e, !1), !e) {
|
|
512
512
|
O();
|
|
@@ -514,7 +514,7 @@ function qr(e) {
|
|
|
514
514
|
e && e.view.dispatch(e.state.tr);
|
|
515
515
|
}
|
|
516
516
|
});
|
|
517
|
-
let { start: j, stop: N } =
|
|
517
|
+
let { start: j, stop: N } = ir(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ee = M(null), P = E(!0), te = E(null), F = !1, I = null;
|
|
518
518
|
async function R() {
|
|
519
519
|
te.value = null, P.value = !0;
|
|
520
520
|
try {
|
|
@@ -545,7 +545,7 @@ function qr(e) {
|
|
|
545
545
|
g.value = u, P.value = !1, j();
|
|
546
546
|
} catch (t) {
|
|
547
547
|
if (F) return;
|
|
548
|
-
|
|
548
|
+
mr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), te.value = t instanceof Error ? t.message : "Failed to load editor", P.value = !1;
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
551
|
function z() {
|
|
@@ -563,7 +563,7 @@ function qr(e) {
|
|
|
563
563
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
564
564
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || e.onDone();
|
|
565
565
|
}
|
|
566
|
-
|
|
566
|
+
cr(document, "mousedown", re), A(() => {
|
|
567
567
|
F = !0, ne(), N(), g.value?.destroy();
|
|
568
568
|
});
|
|
569
569
|
async function ie() {
|
|
@@ -577,7 +577,7 @@ function qr(e) {
|
|
|
577
577
|
async function ae() {
|
|
578
578
|
if (!r.value) return;
|
|
579
579
|
let e = await f();
|
|
580
|
-
!F && r.value && (e && g.value ?
|
|
580
|
+
!F && r.value && (e && g.value ? Gr(g.value, e, c) : g.value?.commands.focus());
|
|
581
581
|
}
|
|
582
582
|
return {
|
|
583
583
|
editor: g,
|
|
@@ -606,25 +606,25 @@ function qr(e) {
|
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
608
|
// src/utils/activeEditorTracker.ts
|
|
609
|
-
var
|
|
610
|
-
function
|
|
611
|
-
let e = ++
|
|
612
|
-
return
|
|
609
|
+
var Xr = /* @__PURE__ */ new Set(), Zr = 0, Qr = 0;
|
|
610
|
+
function $r() {
|
|
611
|
+
let e = ++Qr;
|
|
612
|
+
return Xr.add(e), Zr === 0 && (Zr = e), {
|
|
613
613
|
id: e,
|
|
614
|
-
isActive: () =>
|
|
614
|
+
isActive: () => Xr.size <= 1 || Zr === e,
|
|
615
615
|
claim: () => {
|
|
616
|
-
|
|
616
|
+
Zr = e;
|
|
617
617
|
},
|
|
618
618
|
dispose: () => {
|
|
619
|
-
if (
|
|
620
|
-
let e = Array.from(
|
|
621
|
-
|
|
619
|
+
if (Xr.delete(e), Zr === e) {
|
|
620
|
+
let e = Array.from(Xr);
|
|
621
|
+
Zr = e[e.length - 1] ?? 0;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
626
|
// src/utils/resolveLintOptions.ts
|
|
627
|
-
function
|
|
627
|
+
function ei(e) {
|
|
628
628
|
let t = e.contentLocale ?? e.content?.settings.locale;
|
|
629
629
|
return {
|
|
630
630
|
...e.lint,
|
|
@@ -633,8 +633,8 @@ function Qr(e) {
|
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
635
|
// src/composables/usePreviewResolution.ts
|
|
636
|
-
var
|
|
637
|
-
function
|
|
636
|
+
var ti = 500;
|
|
637
|
+
function ni(e) {
|
|
638
638
|
let n = typeof e.resolvePreview == "function", r = E(null), i = E(!1), a = E(!1), o = 0, s = null;
|
|
639
639
|
function c() {
|
|
640
640
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -666,7 +666,7 @@ function ei(e) {
|
|
|
666
666
|
function u() {
|
|
667
667
|
n && (c(), r.value === null ? l() : s = setTimeout(() => {
|
|
668
668
|
s = null, l();
|
|
669
|
-
},
|
|
669
|
+
}, ti));
|
|
670
670
|
}
|
|
671
671
|
return t(() => [
|
|
672
672
|
e.isActive(),
|
|
@@ -689,7 +689,7 @@ function ei(e) {
|
|
|
689
689
|
};
|
|
690
690
|
}
|
|
691
691
|
// src/composables/useMergeTagPicker.ts
|
|
692
|
-
function
|
|
692
|
+
function ri() {
|
|
693
693
|
let e = E(!1), t = E([]), n = E(null), r = null;
|
|
694
694
|
function i(i, a) {
|
|
695
695
|
if (r) {
|
|
@@ -719,7 +719,7 @@ function ti() {
|
|
|
719
719
|
};
|
|
720
720
|
}
|
|
721
721
|
// src/composables/useLogicTagPicker.ts
|
|
722
|
-
function
|
|
722
|
+
function ii() {
|
|
723
723
|
let e = E(!1), t = E([]), n = E([]), r = null;
|
|
724
724
|
function i(i, a) {
|
|
725
725
|
if (r) {
|
|
@@ -749,23 +749,23 @@ function ni() {
|
|
|
749
749
|
};
|
|
750
750
|
}
|
|
751
751
|
// src/composables/useTemplateLint.ts
|
|
752
|
-
function
|
|
752
|
+
function ai(e) {
|
|
753
753
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 && e.deliverability === !1 && e.compatibility === !1 && e.localization === !1 : !1;
|
|
754
754
|
}
|
|
755
|
-
var
|
|
756
|
-
function
|
|
755
|
+
var oi = !1;
|
|
756
|
+
function si(e) {
|
|
757
757
|
let n = E([]), r = E(0), i = E(-1), a = t(e.content, () => {
|
|
758
758
|
r.value++;
|
|
759
|
-
}, { deep: !0 }), o = E(!1), s = E(!1), c = M(null), l =
|
|
759
|
+
}, { deep: !0 }), o = E(!1), s = E(!1), c = M(null), l = ai(e.options), u = null, d = !1;
|
|
760
760
|
l || f();
|
|
761
761
|
async function f() {
|
|
762
762
|
try {
|
|
763
763
|
let t = await import("@templatical/quality");
|
|
764
764
|
if (d) return;
|
|
765
|
-
c.value = { lintTemplate: t.lintTemplate }, o.value = !0, p(), u =
|
|
765
|
+
c.value = { lintTemplate: t.lintTemplate }, o.value = !0, p(), u = sr(r, p, { debounce: e.debounce ?? 500 });
|
|
766
766
|
} catch {
|
|
767
767
|
if (d) return;
|
|
768
|
-
s.value = !0,
|
|
768
|
+
s.value = !0, oi || (oi = !0, mr.info("@templatical/quality isn't installed, so the Issues panel and its lint badges are off. Add @templatical/quality to your dependencies to turn them on."));
|
|
769
769
|
}
|
|
770
770
|
}
|
|
771
771
|
function p() {
|
|
@@ -804,7 +804,7 @@ function ai(e) {
|
|
|
804
804
|
};
|
|
805
805
|
}
|
|
806
806
|
// src/composables/useKeyboardReorder.ts
|
|
807
|
-
function
|
|
807
|
+
function ci(e, t, n = []) {
|
|
808
808
|
let r = E(null), i = E(""), a = null;
|
|
809
809
|
function o(t) {
|
|
810
810
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -831,7 +831,7 @@ function oi(e, t, n = []) {
|
|
|
831
831
|
let i = o(r);
|
|
832
832
|
if (!i) return "";
|
|
833
833
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
834
|
-
return a ?
|
|
834
|
+
return a ? Lt(a, t.t, n) : "";
|
|
835
835
|
}
|
|
836
836
|
function c(t, n) {
|
|
837
837
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -899,14 +899,14 @@ function oi(e, t, n = []) {
|
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
901
|
// src/composables/useUiTheme.ts
|
|
902
|
-
function
|
|
903
|
-
let t =
|
|
902
|
+
function li(e) {
|
|
903
|
+
let t = lr("(prefers-color-scheme: dark)");
|
|
904
904
|
return { resolvedTheme: C(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
905
905
|
}
|
|
906
906
|
// src/composables/useCustomBlockStylesheets.ts
|
|
907
|
-
function
|
|
907
|
+
function ui(e, t) {
|
|
908
908
|
return C(() => {
|
|
909
|
-
let n =
|
|
909
|
+
let n = di(e.value.blocks);
|
|
910
910
|
if (n.size === 0) return [];
|
|
911
911
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
912
912
|
for (let e of n) {
|
|
@@ -918,27 +918,27 @@ function ci(e, t) {
|
|
|
918
918
|
return i;
|
|
919
919
|
});
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function di(e) {
|
|
922
922
|
let t = /* @__PURE__ */ new Set();
|
|
923
|
-
return
|
|
923
|
+
return fi(e, t), t;
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function fi(e, t) {
|
|
926
926
|
for (let n of e) if (He(n)) t.add(n.customType);
|
|
927
927
|
else if (n.type === "section") {
|
|
928
928
|
let e = n.children;
|
|
929
929
|
if (!e) continue;
|
|
930
|
-
for (let n of e)
|
|
931
|
-
} else B(n) &&
|
|
930
|
+
for (let n of e) fi(n, t);
|
|
931
|
+
} else B(n) && fi(n.children, t);
|
|
932
932
|
}
|
|
933
933
|
// src/utils/registerBuiltInBlocks.ts
|
|
934
|
-
var
|
|
934
|
+
var pi = [
|
|
935
935
|
{
|
|
936
936
|
type: "section",
|
|
937
|
-
createBlock:
|
|
937
|
+
createBlock: De
|
|
938
938
|
},
|
|
939
939
|
{
|
|
940
940
|
type: "title",
|
|
941
|
-
createBlock:
|
|
941
|
+
createBlock: et
|
|
942
942
|
},
|
|
943
943
|
{
|
|
944
944
|
type: "paragraph",
|
|
@@ -946,7 +946,7 @@ var di = [
|
|
|
946
946
|
},
|
|
947
947
|
{
|
|
948
948
|
type: "image",
|
|
949
|
-
createBlock:
|
|
949
|
+
createBlock: we
|
|
950
950
|
},
|
|
951
951
|
{
|
|
952
952
|
type: "button",
|
|
@@ -962,11 +962,11 @@ var di = [
|
|
|
962
962
|
},
|
|
963
963
|
{
|
|
964
964
|
type: "social",
|
|
965
|
-
createBlock:
|
|
965
|
+
createBlock: ke
|
|
966
966
|
},
|
|
967
967
|
{
|
|
968
968
|
type: "menu",
|
|
969
|
-
createBlock:
|
|
969
|
+
createBlock: pt
|
|
970
970
|
},
|
|
971
971
|
{
|
|
972
972
|
type: "table",
|
|
@@ -985,8 +985,8 @@ var di = [
|
|
|
985
985
|
createBlock: ye
|
|
986
986
|
}
|
|
987
987
|
];
|
|
988
|
-
function
|
|
989
|
-
for (let n of
|
|
988
|
+
function mi(e, t) {
|
|
989
|
+
for (let n of pi) {
|
|
990
990
|
let r = t[n.type];
|
|
991
991
|
r && e.registerBuiltIn(n.type, {
|
|
992
992
|
component: r,
|
|
@@ -995,31 +995,31 @@ function fi(e, t) {
|
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
997
|
// src/utils/resolveHtmlBlockPreview.ts
|
|
998
|
-
function
|
|
998
|
+
function hi(e) {
|
|
999
999
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
1000
1000
|
}
|
|
1001
1001
|
// src/utils/collectOffPaletteDefaults.ts
|
|
1002
|
-
function
|
|
1002
|
+
function gi(e) {
|
|
1003
1003
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1006
|
-
let r = new Set(e.map((e) =>
|
|
1007
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1005
|
+
function _i(e, t, n) {
|
|
1006
|
+
let r = new Set(e.map((e) => hr(e))), i = [], a = (e, t) => {
|
|
1007
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(hr(o)) && i.push(`${t}.${n}: ${o}`) : gi(o) && a(o, `${t}.${n}`);
|
|
1008
1008
|
}, o = t;
|
|
1009
|
-
for (let [e, t] of Object.entries(
|
|
1009
|
+
for (let [e, t] of Object.entries(Xe)) {
|
|
1010
1010
|
let n = o?.[e];
|
|
1011
1011
|
a({
|
|
1012
1012
|
...t,
|
|
1013
|
-
...
|
|
1013
|
+
...gi(n) ? n : {}
|
|
1014
1014
|
}, e);
|
|
1015
1015
|
}
|
|
1016
1016
|
return a({
|
|
1017
|
-
...
|
|
1017
|
+
...it,
|
|
1018
1018
|
...n ?? {}
|
|
1019
1019
|
}, "template"), i;
|
|
1020
1020
|
}
|
|
1021
1021
|
// src/utils/localizedBlockDefaults.ts
|
|
1022
|
-
function
|
|
1022
|
+
function vi(e) {
|
|
1023
1023
|
return {
|
|
1024
1024
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
1025
1025
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -1027,62 +1027,62 @@ function gi(e) {
|
|
|
1027
1027
|
};
|
|
1028
1028
|
}
|
|
1029
1029
|
// src/i18n/index.ts
|
|
1030
|
-
var
|
|
1031
|
-
"./locales/ca.ts": () => import("./ca-
|
|
1032
|
-
"./locales/de.ts": () => import("./de-
|
|
1033
|
-
"./locales/en.ts": () => import("./en-
|
|
1034
|
-
"./locales/es.ts": () => import("./es-
|
|
1035
|
-
"./locales/fr.ts": () => import("./fr-
|
|
1036
|
-
"./locales/ja.ts": () => import("./ja-
|
|
1037
|
-
"./locales/nl.ts": () => import("./nl-
|
|
1038
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
1039
|
-
}),
|
|
1030
|
+
var yi = /* #__PURE__ */ Object.assign({
|
|
1031
|
+
"./locales/ca.ts": () => import("./ca-DIkMxYCN.js"),
|
|
1032
|
+
"./locales/de.ts": () => import("./de-Cc6Ue0UD.js"),
|
|
1033
|
+
"./locales/en.ts": () => import("./en-BX4FujAQ.js"),
|
|
1034
|
+
"./locales/es.ts": () => import("./es-Do5b-MKU.js"),
|
|
1035
|
+
"./locales/fr.ts": () => import("./fr-S1n2Ebzp.js"),
|
|
1036
|
+
"./locales/ja.ts": () => import("./ja-DLwcq4bA.js"),
|
|
1037
|
+
"./locales/nl.ts": () => import("./nl-0JSWaZpT.js"),
|
|
1038
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-D3VlIMDZ.js")
|
|
1039
|
+
}), bi = /* #__PURE__ */ Object.assign({
|
|
1040
1040
|
"./locales/cloud/de.ts": () => import("./de-6M4JoHoD.js"),
|
|
1041
1041
|
"./locales/cloud/en.ts": () => import("./en-FzUuJ8HW.js"),
|
|
1042
1042
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-Bp92Fc6J.js")
|
|
1043
1043
|
});
|
|
1044
|
-
function
|
|
1044
|
+
function xi(e) {
|
|
1045
1045
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
1046
1046
|
}
|
|
1047
|
-
var
|
|
1048
|
-
function
|
|
1047
|
+
var Si = xi(yi), Ci = xi(bi);
|
|
1048
|
+
function wi(e) {
|
|
1049
1049
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1052
|
-
let n =
|
|
1053
|
-
return t.find((e) =>
|
|
1051
|
+
function Ti(e, t) {
|
|
1052
|
+
let n = wi(e);
|
|
1053
|
+
return t.find((e) => wi(e) === n);
|
|
1054
1054
|
}
|
|
1055
|
-
function
|
|
1056
|
-
return
|
|
1055
|
+
function Ei(e) {
|
|
1056
|
+
return wi(e).split("-")[0];
|
|
1057
1057
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return
|
|
1058
|
+
function Di(e, t) {
|
|
1059
|
+
return Ti(e, t) ?? Ti(Ei(e), t);
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1062
|
-
return
|
|
1061
|
+
function Oi(e, t) {
|
|
1062
|
+
return Di(e, t) ?? "en";
|
|
1063
1063
|
}
|
|
1064
|
-
async function
|
|
1065
|
-
let t =
|
|
1064
|
+
async function ki(e) {
|
|
1065
|
+
let t = yi[`./locales/${Oi(e, Si)}.ts`];
|
|
1066
1066
|
return (await t()).default;
|
|
1067
1067
|
}
|
|
1068
|
-
async function
|
|
1069
|
-
let t =
|
|
1068
|
+
async function Ai(e) {
|
|
1069
|
+
let t = bi[`./locales/cloud/${Oi(e, Ci)}.ts`];
|
|
1070
1070
|
return (await t()).default;
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
return
|
|
1072
|
+
function ji(e) {
|
|
1073
|
+
return Di(e, Si) !== void 0;
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1076
|
-
return
|
|
1075
|
+
function Mi(e) {
|
|
1076
|
+
return Di(e, Ci) !== void 0;
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1079
|
-
return [...
|
|
1078
|
+
function Ni() {
|
|
1079
|
+
return [...Si];
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1082
|
-
return [...
|
|
1081
|
+
function Pi() {
|
|
1082
|
+
return [...Ci];
|
|
1083
1083
|
}
|
|
1084
1084
|
// src/i18n/contentDefaults.ts
|
|
1085
|
-
var
|
|
1085
|
+
var Fi = {
|
|
1086
1086
|
en: {
|
|
1087
1087
|
video: "Video",
|
|
1088
1088
|
days: "Days",
|
|
@@ -1148,17 +1148,17 @@ var Ni = {
|
|
|
1148
1148
|
expired: "このオファーは終了しました"
|
|
1149
1149
|
}
|
|
1150
1150
|
};
|
|
1151
|
-
Object.keys(
|
|
1152
|
-
var
|
|
1153
|
-
function
|
|
1154
|
-
if (!e) return
|
|
1155
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
1156
|
-
if (n) return
|
|
1157
|
-
let r =
|
|
1158
|
-
return r ?
|
|
1159
|
-
}
|
|
1160
|
-
function
|
|
1161
|
-
let t =
|
|
1151
|
+
Object.keys(Fi);
|
|
1152
|
+
var Ii = new Map(Object.keys(Fi).map((e) => [e.toLowerCase(), e]));
|
|
1153
|
+
function Li(e) {
|
|
1154
|
+
if (!e) return Fi.en;
|
|
1155
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = Ii.get(t);
|
|
1156
|
+
if (n) return Fi[n];
|
|
1157
|
+
let r = Ii.get(Ei(t));
|
|
1158
|
+
return r ? Fi[r] : Fi.en;
|
|
1159
|
+
}
|
|
1160
|
+
function Ri(e) {
|
|
1161
|
+
let t = Li(e);
|
|
1162
1162
|
return {
|
|
1163
1163
|
video: { alt: t.video },
|
|
1164
1164
|
countdown: {
|
|
@@ -1171,9 +1171,9 @@ function Ii(e) {
|
|
|
1171
1171
|
};
|
|
1172
1172
|
}
|
|
1173
1173
|
// src/utils/collectColorFieldIssues.ts
|
|
1174
|
-
function
|
|
1174
|
+
function zi(e, t) {
|
|
1175
1175
|
let n = [], r = (r, i) => {
|
|
1176
|
-
let a =
|
|
1176
|
+
let a = Pt(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1177
1177
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1178
1178
|
id: s("invalid-presets"),
|
|
1179
1179
|
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." : "")
|
|
@@ -1184,8 +1184,8 @@ function Li(e, t) {
|
|
|
1184
1184
|
id: s("allow-custom-ignored"),
|
|
1185
1185
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1186
1186
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1187
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1188
|
-
e !== "" && !t.has(
|
|
1187
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => hr(e)));
|
|
1188
|
+
e !== "" && !t.has(hr(e)) && n.push({
|
|
1189
1189
|
id: s("off-palette-default"),
|
|
1190
1190
|
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.`
|
|
1191
1191
|
});
|
|
@@ -1196,7 +1196,7 @@ function Li(e, t) {
|
|
|
1196
1196
|
return n;
|
|
1197
1197
|
}
|
|
1198
1198
|
// src/utils/keyboardShortcuts.ts
|
|
1199
|
-
function
|
|
1199
|
+
function Bi(e) {
|
|
1200
1200
|
for (let t of e.composedPath()) {
|
|
1201
1201
|
if (!(t instanceof HTMLElement)) continue;
|
|
1202
1202
|
if (t.isContentEditable) return !0;
|
|
@@ -1205,14 +1205,14 @@ function Ri(e) {
|
|
|
1205
1205
|
}
|
|
1206
1206
|
return !1;
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1208
|
+
function Vi(e, t) {
|
|
1209
1209
|
let n = e.metaKey || e.ctrlKey;
|
|
1210
1210
|
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
1211
1211
|
else if (n && e.key.toLowerCase() === "z") {
|
|
1212
|
-
if (
|
|
1212
|
+
if (Bi(e)) return;
|
|
1213
1213
|
e.preventDefault(), e.shiftKey ? t.history.redo() : t.history.undo();
|
|
1214
1214
|
} else {
|
|
1215
|
-
if (t.isPicking?.() && !
|
|
1215
|
+
if (t.isPicking?.() && !Bi(e)) {
|
|
1216
1216
|
if (e.key === "Escape") {
|
|
1217
1217
|
e.preventDefault(), t.onCancelPick?.();
|
|
1218
1218
|
return;
|
|
@@ -1226,188 +1226,192 @@ function zi(e, t) {
|
|
|
1226
1226
|
return;
|
|
1227
1227
|
}
|
|
1228
1228
|
}
|
|
1229
|
-
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1229
|
+
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Bi(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1230
1230
|
}
|
|
1231
1231
|
}
|
|
1232
1232
|
// src/utils/blockComponentResolver.ts
|
|
1233
|
-
function
|
|
1233
|
+
function Hi(e, t) {
|
|
1234
1234
|
let n = { fontFamily: t(e.fontFamily) };
|
|
1235
1235
|
return e.textColor && (n.color = e.textColor), e.linkColor && (n["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (n["--tpl-doc-link-underline"] = "underline"), n;
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1237
|
+
function Ui(e, t, n) {
|
|
1238
1238
|
if (t) {
|
|
1239
1239
|
let n = t.getComponent(e);
|
|
1240
1240
|
if (n) return n;
|
|
1241
1241
|
}
|
|
1242
1242
|
return n[e.type] ?? null;
|
|
1243
1243
|
}
|
|
1244
|
-
var
|
|
1245
|
-
function
|
|
1244
|
+
var Wi = "--tpl-block-bg-layer", Gi = "tpl-has-bg-image";
|
|
1245
|
+
function Ki(e, t) {
|
|
1246
1246
|
if (t === null) return {};
|
|
1247
|
-
let n =
|
|
1247
|
+
let n = Te(e);
|
|
1248
1248
|
if (n === null) return {};
|
|
1249
|
-
let r = t?.trim(), i = r ?
|
|
1249
|
+
let r = t?.trim(), i = r ? ot(r) : n.url;
|
|
1250
1250
|
return {
|
|
1251
1251
|
backgroundImage: `url("${i}")`,
|
|
1252
1252
|
backgroundSize: n.size,
|
|
1253
1253
|
backgroundPosition: n.position,
|
|
1254
1254
|
backgroundRepeat: n.repeat,
|
|
1255
|
-
[
|
|
1255
|
+
[Wi]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
1256
1256
|
};
|
|
1257
1257
|
}
|
|
1258
|
-
function
|
|
1259
|
-
return e &&
|
|
1258
|
+
function qi(e) {
|
|
1259
|
+
return e && Wi in e ? Gi : void 0;
|
|
1260
1260
|
}
|
|
1261
|
-
var
|
|
1261
|
+
var Ji = {
|
|
1262
1262
|
top: "flex-start",
|
|
1263
1263
|
middle: "center",
|
|
1264
1264
|
bottom: "flex-end"
|
|
1265
1265
|
};
|
|
1266
|
-
function
|
|
1267
|
-
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${
|
|
1266
|
+
function Yi(e, t) {
|
|
1267
|
+
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${Xi(t, e.aspectRatio)}px` } : { aspectRatio: `1 / ${e.aspectRatio ?? 1}` };
|
|
1268
1268
|
return {
|
|
1269
1269
|
display: "flex",
|
|
1270
1270
|
flexDirection: "column",
|
|
1271
|
-
justifyContent:
|
|
1271
|
+
justifyContent: Ji[e.verticalAlign],
|
|
1272
1272
|
boxSizing: "border-box",
|
|
1273
1273
|
...n
|
|
1274
1274
|
};
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1276
|
+
function Xi(e, t) {
|
|
1277
1277
|
return Math.max(1, Math.round(Math.max(1, Math.round(e)) * t));
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1279
|
+
function Zi(e, t = {}) {
|
|
1280
1280
|
if (e.type === "wrapper") return {};
|
|
1281
1281
|
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
1282
1282
|
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
1283
1283
|
backgroundColor: r || "transparent"
|
|
1284
1284
|
};
|
|
1285
1285
|
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? ze.paragraphGap : ze.paragraphGap}px`), e.type === "section") {
|
|
1286
|
-
let n =
|
|
1286
|
+
let n = nt(e.borderRadius);
|
|
1287
1287
|
n !== null && (i.borderRadius = n);
|
|
1288
|
-
let r =
|
|
1289
|
-
r?.applied && e.backgroundImage ? (Object.assign(i,
|
|
1288
|
+
let r = Oe(e);
|
|
1289
|
+
r?.applied && e.backgroundImage ? (Object.assign(i, Yi(r, t.heroBoxWidth)), Object.assign(i, Ki({
|
|
1290
1290
|
...e.backgroundImage,
|
|
1291
1291
|
size: "cover",
|
|
1292
1292
|
repeat: !1
|
|
1293
|
-
}, t.backgroundImageUrl))) : (Object.assign(i,
|
|
1293
|
+
}, t.backgroundImageUrl))) : (Object.assign(i, $i(e.border)), Object.assign(i, Ki(e.backgroundImage, t.backgroundImageUrl)));
|
|
1294
1294
|
}
|
|
1295
1295
|
return i;
|
|
1296
1296
|
}
|
|
1297
|
-
function
|
|
1298
|
-
return e.type === "section" ?
|
|
1299
|
-
backgroundImageUrl:
|
|
1297
|
+
function Qi(e, t, n, r) {
|
|
1298
|
+
return e.type === "section" ? Zi(e, {
|
|
1299
|
+
backgroundImageUrl: gt(t, e.backgroundImage, n),
|
|
1300
1300
|
heroBoxWidth: r
|
|
1301
|
-
}) :
|
|
1301
|
+
}) : Zi(e);
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1303
|
+
function $i(e) {
|
|
1304
1304
|
let t = {};
|
|
1305
|
-
for (let [n, r] of Object.entries(
|
|
1305
|
+
for (let [n, r] of Object.entries(Je(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
1306
1306
|
return t;
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function ea(e, t = {}) {
|
|
1309
1309
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
1310
1310
|
let n = e.wrapper, r = {};
|
|
1311
1311
|
n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && (r.padding = `${n.padding.top}px ${n.padding.right}px ${n.padding.bottom}px ${n.padding.left}px`);
|
|
1312
|
-
let i =
|
|
1313
|
-
return i !== null && (r.borderRadius = i), Object.assign(r,
|
|
1312
|
+
let i = nt(n.borderRadius);
|
|
1313
|
+
return i !== null && (r.borderRadius = i), Object.assign(r, Ki(n.backgroundImage, t.backgroundImageUrl)), r;
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1315
|
+
function ta(e, t = {}) {
|
|
1316
1316
|
if (e.type !== "wrapper") return null;
|
|
1317
1317
|
let n = {};
|
|
1318
1318
|
if (e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding) {
|
|
1319
1319
|
let t = e.styles.padding;
|
|
1320
1320
|
n.padding = `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`;
|
|
1321
1321
|
}
|
|
1322
|
-
return e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n,
|
|
1322
|
+
return e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Ki(e.backgroundImage, t.backgroundImageUrl)), n;
|
|
1323
1323
|
}
|
|
1324
1324
|
// src/utils/mergeTagLabelSegments.ts
|
|
1325
|
-
function
|
|
1325
|
+
function na(e, t, n, r = !1) {
|
|
1326
1326
|
if (!e) return [];
|
|
1327
|
-
let i =
|
|
1328
|
-
for (
|
|
1329
|
-
|
|
1327
|
+
let i = [], a = 0;
|
|
1328
|
+
for (let o of tt(e, n)) {
|
|
1329
|
+
o.index > a && i.push({
|
|
1330
1330
|
type: "text",
|
|
1331
|
-
value: e.slice(
|
|
1331
|
+
value: e.slice(a, o.index)
|
|
1332
1332
|
});
|
|
1333
|
-
let
|
|
1334
|
-
if (
|
|
1335
|
-
let e = r ?
|
|
1336
|
-
|
|
1333
|
+
let s = o.value;
|
|
1334
|
+
if (ft(s, n)) {
|
|
1335
|
+
let e = r ? st(s, t) : void 0;
|
|
1336
|
+
i.push(e === void 0 ? {
|
|
1337
1337
|
type: "tag",
|
|
1338
|
-
value: qe(
|
|
1338
|
+
value: qe(s, t)
|
|
1339
1339
|
} : {
|
|
1340
1340
|
type: "text",
|
|
1341
1341
|
value: e
|
|
1342
1342
|
});
|
|
1343
|
-
} else
|
|
1343
|
+
} else lt(s, n) ? i.push({
|
|
1344
1344
|
type: "tag",
|
|
1345
|
-
value: Le(
|
|
1346
|
-
}) :
|
|
1345
|
+
value: Le(s, n)
|
|
1346
|
+
}) : i.push({
|
|
1347
1347
|
type: "text",
|
|
1348
|
-
value:
|
|
1348
|
+
value: s
|
|
1349
1349
|
});
|
|
1350
|
-
|
|
1350
|
+
a = o.index + s.length;
|
|
1351
1351
|
}
|
|
1352
|
-
return
|
|
1352
|
+
return a < e.length && i.push({
|
|
1353
1353
|
type: "text",
|
|
1354
|
-
value: e.slice(
|
|
1355
|
-
}),
|
|
1354
|
+
value: e.slice(a)
|
|
1355
|
+
}), i;
|
|
1356
1356
|
}
|
|
1357
1357
|
// src/components/MergeTagPreviewText.vue
|
|
1358
|
-
var
|
|
1358
|
+
var ra = R({
|
|
1359
1359
|
name: "MergeTagPreviewText",
|
|
1360
1360
|
props: { text: {
|
|
1361
1361
|
type: String,
|
|
1362
1362
|
required: !0
|
|
1363
1363
|
} },
|
|
1364
1364
|
setup(e) {
|
|
1365
|
-
let t = L(
|
|
1365
|
+
let t = L(pn, yn), n = L($t, Ve.liquid), r = L(wn, null), i = C(() => na(e.text, t.value, n, r?.value ?? !1));
|
|
1366
1366
|
return () => i.value.map((e, t) => e.type === "tag" ? m("span", {
|
|
1367
1367
|
key: t,
|
|
1368
1368
|
class: "tpl-merge-tag-label"
|
|
1369
1369
|
}, e.value) : e.value);
|
|
1370
1370
|
}
|
|
1371
|
-
}),
|
|
1371
|
+
}), ia = ["href"], aa = /* @__PURE__ */ R({
|
|
1372
1372
|
__name: "ButtonBlock",
|
|
1373
1373
|
props: {
|
|
1374
1374
|
block: {},
|
|
1375
1375
|
viewport: {}
|
|
1376
1376
|
},
|
|
1377
1377
|
setup(e) {
|
|
1378
|
-
let t = e, n =
|
|
1378
|
+
let t = e, n = Rn(Tn, "ButtonBlock");
|
|
1379
|
+
function r(e) {
|
|
1380
|
+
return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
|
|
1381
|
+
}
|
|
1382
|
+
let i = C(() => {
|
|
1379
1383
|
let e = {
|
|
1380
1384
|
display: "inline-block",
|
|
1381
1385
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
1382
1386
|
backgroundColor: t.block.backgroundColor,
|
|
1383
1387
|
color: t.block.textColor,
|
|
1384
1388
|
fontSize: `${t.block.fontSize}px`,
|
|
1385
|
-
fontWeight:
|
|
1389
|
+
fontWeight: r(t.block.fontWeight),
|
|
1386
1390
|
textDecoration: "none",
|
|
1387
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` :
|
|
1391
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : nt(t.block.borderRadius) ?? "0px",
|
|
1388
1392
|
textAlign: "center"
|
|
1389
1393
|
};
|
|
1390
|
-
return Object.assign(e,
|
|
1391
|
-
}),
|
|
1392
|
-
return (t, n) => (s(), D("div", { style: f(
|
|
1394
|
+
return Object.assign(e, $i(t.block.border)), t.block.fontFamily && (e.fontFamily = n.resolveFontFamily(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;
|
|
1395
|
+
}), a = C(() => ({ textAlign: t.block.align ?? "center" }));
|
|
1396
|
+
return (t, n) => (s(), D("div", { style: f(a.value) }, [j("a", {
|
|
1393
1397
|
href: e.block.url || "#",
|
|
1394
|
-
style: f(
|
|
1398
|
+
style: f(i.value),
|
|
1395
1399
|
class: "tpl:cursor-default",
|
|
1396
1400
|
onClick: n[0] ||= z(() => {}, ["prevent"])
|
|
1397
|
-
}, [y(
|
|
1401
|
+
}, [y(ra, { text: e.block.text }, null, 8, ["text"])], 12, ia)], 4));
|
|
1398
1402
|
}
|
|
1399
|
-
}),
|
|
1403
|
+
}), oa = ["innerHTML"], sa = [
|
|
1400
1404
|
"src",
|
|
1401
1405
|
"width",
|
|
1402
1406
|
"height"
|
|
1403
|
-
],
|
|
1407
|
+
], ca = /* @__PURE__ */ R({
|
|
1404
1408
|
__name: "CustomBlockIcon",
|
|
1405
1409
|
props: {
|
|
1406
1410
|
icon: {},
|
|
1407
1411
|
size: {}
|
|
1408
1412
|
},
|
|
1409
1413
|
setup(e) {
|
|
1410
|
-
let t = e, n = C(() => t.size ?? 20), r = C(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = C(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), a = C(() => r.value ?
|
|
1414
|
+
let t = e, n = C(() => t.size ?? 20), r = C(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = C(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), a = C(() => r.value ? Wt(t.icon ?? "") : "");
|
|
1411
1415
|
return (t, o) => r.value ? (s(), D("span", {
|
|
1412
1416
|
key: 0,
|
|
1413
1417
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
@@ -1416,33 +1420,33 @@ var ta = R({
|
|
|
1416
1420
|
height: `${n.value}px`
|
|
1417
1421
|
}),
|
|
1418
1422
|
innerHTML: a.value
|
|
1419
|
-
}, null, 12,
|
|
1423
|
+
}, null, 12, oa)) : i.value ? (s(), D("img", {
|
|
1420
1424
|
key: 1,
|
|
1421
1425
|
src: e.icon,
|
|
1422
1426
|
width: n.value,
|
|
1423
1427
|
height: n.value,
|
|
1424
1428
|
class: "tpl:inline-block",
|
|
1425
1429
|
alt: ""
|
|
1426
|
-
}, null, 8,
|
|
1430
|
+
}, null, 8, sa)) : (s(), F(w(Dr), {
|
|
1427
1431
|
key: 2,
|
|
1428
1432
|
size: n.value,
|
|
1429
1433
|
"stroke-width": 1.5
|
|
1430
1434
|
}, null, 8, ["size"]));
|
|
1431
1435
|
}
|
|
1432
|
-
}),
|
|
1436
|
+
}), la = { class: "tpl:w-full" }, ua = {
|
|
1433
1437
|
key: 0,
|
|
1434
1438
|
class: "tpl:flex tpl:box-border 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)]"
|
|
1435
|
-
},
|
|
1439
|
+
}, da = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, fa = {
|
|
1436
1440
|
key: 1,
|
|
1437
1441
|
class: "tpl:flex tpl:box-border 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)]"
|
|
1438
|
-
},
|
|
1442
|
+
}, pa = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ma = {
|
|
1439
1443
|
key: 2,
|
|
1440
1444
|
class: "tpl:relative"
|
|
1441
|
-
},
|
|
1445
|
+
}, ha = ["innerHTML"], ga = {
|
|
1442
1446
|
key: 0,
|
|
1443
1447
|
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]",
|
|
1444
1448
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1445
|
-
},
|
|
1449
|
+
}, _a = /* @__PURE__ */ R({
|
|
1446
1450
|
__name: "CustomBlock",
|
|
1447
1451
|
props: {
|
|
1448
1452
|
block: {},
|
|
@@ -1450,7 +1454,7 @@ var ta = R({
|
|
|
1450
1454
|
},
|
|
1451
1455
|
emits: ["fetchData"],
|
|
1452
1456
|
setup(n, { emit: r }) {
|
|
1453
|
-
let a = n, o = r, { t: c } =
|
|
1457
|
+
let a = n, o = r, { t: c } = Zn(), l = L(Fn, null), u = E(""), d = C(() => Kt(u.value)), f = E(!1), p = C(() => l?.getDefinition(a.block.customType)), m = C(() => !!p.value), h = C(() => a.block), { isFetching: g, fetch: _, needsFetch: v, hasDataSource: b } = ht({
|
|
1454
1458
|
definition: p,
|
|
1455
1459
|
block: h,
|
|
1456
1460
|
onUpdate: (e, t) => {
|
|
@@ -1459,10 +1463,10 @@ var ta = R({
|
|
|
1459
1463
|
dataSourceFetched: t
|
|
1460
1464
|
});
|
|
1461
1465
|
}
|
|
1462
|
-
}), x = L(
|
|
1466
|
+
}), x = L(pn, yn), S = L(wn, null), k = C(() => {
|
|
1463
1467
|
if (!S?.value) return a.block;
|
|
1464
1468
|
let e = {};
|
|
1465
|
-
for (let [t, n] of Object.entries(a.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
1469
|
+
for (let [t, n] of Object.entries(a.block.fieldValues)) e[t] = typeof n == "string" ? Re(n, x.value) : n;
|
|
1466
1470
|
return {
|
|
1467
1471
|
...a.block,
|
|
1468
1472
|
fieldValues: e
|
|
@@ -1479,17 +1483,17 @@ var ta = R({
|
|
|
1479
1483
|
}
|
|
1480
1484
|
}
|
|
1481
1485
|
}
|
|
1482
|
-
let M =
|
|
1486
|
+
let M = ar(A, 150);
|
|
1483
1487
|
return e(() => {
|
|
1484
1488
|
A();
|
|
1485
1489
|
}), t(() => a.block.fieldValues, () => {
|
|
1486
1490
|
M();
|
|
1487
1491
|
}, { deep: !0 }), t(() => S?.value, () => {
|
|
1488
1492
|
M();
|
|
1489
|
-
}), (e, t) => (s(), D("div",
|
|
1493
|
+
}), (e, t) => (s(), D("div", la, [m.value ? f.value ? (s(), D("div", fa, [y(w(Xt), {
|
|
1490
1494
|
size: 24,
|
|
1491
1495
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1492
|
-
}), j("span",
|
|
1496
|
+
}), j("span", pa, i(w(c).customBlocks.renderError), 1)])) : (s(), D("div", ma, [j("div", { innerHTML: d.value }, null, 8, ha), w(b) && w(v) ? (s(), D("div", ga, [w(g) ? (s(), F(wr, {
|
|
1493
1497
|
key: 1,
|
|
1494
1498
|
class: "tpl:w-48"
|
|
1495
1499
|
})) : (s(), D("button", {
|
|
@@ -1497,16 +1501,16 @@ var ta = R({
|
|
|
1497
1501
|
type: "button",
|
|
1498
1502
|
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-[var(--tpl-shadow)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:shadow-[var(--tpl-shadow-md)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1499
1503
|
onClick: t[0] ||= z((...e) => w(_) && w(_)(...e), ["stop"])
|
|
1500
|
-
}, [p.value?.icon ? (s(), F(
|
|
1504
|
+
}, [p.value?.icon ? (s(), F(ca, {
|
|
1501
1505
|
key: 0,
|
|
1502
1506
|
icon: p.value.icon,
|
|
1503
1507
|
size: 16
|
|
1504
|
-
}, null, 8, ["icon"])) : T("", !0), O(" " + i(p.value?.dataSource?.label || w(c).customBlocks.dataSource.fetchButton), 1)]))])) : T("", !0)])) : (s(), D("div",
|
|
1508
|
+
}, null, 8, ["icon"])) : T("", !0), O(" " + i(p.value?.dataSource?.label || w(c).customBlocks.dataSource.fetchButton), 1)]))])) : T("", !0)])) : (s(), D("div", ua, [y(w(jr), {
|
|
1505
1509
|
size: 24,
|
|
1506
1510
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1507
|
-
}), j("span",
|
|
1511
|
+
}), j("span", da, i(w(c).customBlocks.definitionNotFound), 1)]))]));
|
|
1508
1512
|
}
|
|
1509
|
-
}),
|
|
1513
|
+
}), va = { class: "tpl:w-full" }, ya = /* @__PURE__ */ R({
|
|
1510
1514
|
__name: "DividerBlock",
|
|
1511
1515
|
props: {
|
|
1512
1516
|
block: {},
|
|
@@ -1518,28 +1522,28 @@ var ta = R({
|
|
|
1518
1522
|
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1519
1523
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1520
1524
|
}));
|
|
1521
|
-
return (e, t) => (s(), D("div",
|
|
1525
|
+
return (e, t) => (s(), D("div", va, [j("hr", {
|
|
1522
1526
|
class: "tpl:m-0 tpl:border-none",
|
|
1523
1527
|
style: f(n.value)
|
|
1524
1528
|
}, null, 4)]));
|
|
1525
1529
|
}
|
|
1526
|
-
}),
|
|
1530
|
+
}), ba = { class: "tpl:w-full" }, xa = ["srcdoc", "title"], Sa = {
|
|
1527
1531
|
key: 1,
|
|
1528
1532
|
class: "tpl:flex tpl:box-border 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)]"
|
|
1529
|
-
},
|
|
1533
|
+
}, Ca = {
|
|
1530
1534
|
key: 0,
|
|
1531
1535
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1532
|
-
},
|
|
1536
|
+
}, wa = {
|
|
1533
1537
|
key: 1,
|
|
1534
1538
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1535
|
-
},
|
|
1539
|
+
}, Ta = /* @__PURE__ */ R({
|
|
1536
1540
|
__name: "HtmlBlock",
|
|
1537
1541
|
props: {
|
|
1538
1542
|
block: {},
|
|
1539
1543
|
viewport: {}
|
|
1540
1544
|
},
|
|
1541
1545
|
setup(e) {
|
|
1542
|
-
let n = e, { t: r } =
|
|
1546
|
+
let n = e, { t: r } = Zn(), a = L(gn, !1), o = C(() => n.block.content.trim().length > 0), c = C(() => a && o.value), l = L(pn, yn), u = L(wn, null), d = C(() => u?.value ? Re(n.block.content, l.value) : n.block.content), p = E(null), m = E(60), h = null;
|
|
1543
1547
|
function g() {
|
|
1544
1548
|
let e = p.value?.contentDocument;
|
|
1545
1549
|
e && (m.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1553,7 +1557,7 @@ var ta = R({
|
|
|
1553
1557
|
e || (h?.disconnect(), h = null);
|
|
1554
1558
|
}), A(() => {
|
|
1555
1559
|
h?.disconnect(), h = null;
|
|
1556
|
-
}), (e, t) => (s(), D("div",
|
|
1560
|
+
}), (e, t) => (s(), D("div", ba, [c.value ? (s(), D("iframe", {
|
|
1557
1561
|
key: 0,
|
|
1558
1562
|
ref_key: "iframeRef",
|
|
1559
1563
|
ref: p,
|
|
@@ -1563,18 +1567,18 @@ var ta = R({
|
|
|
1563
1567
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1564
1568
|
style: f({ height: `${m.value}px` }),
|
|
1565
1569
|
onLoad: _
|
|
1566
|
-
}, null, 44,
|
|
1570
|
+
}, null, 44, xa)) : (s(), D("div", Sa, [y(w(kt), {
|
|
1567
1571
|
size: 24,
|
|
1568
1572
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1569
|
-
}), o.value ? (s(), D("span",
|
|
1573
|
+
}), o.value ? (s(), D("span", Ca, i(w(r).html.preview), 1)) : (s(), D("span", wa, i(w(r).html.empty), 1))]))]));
|
|
1570
1574
|
}
|
|
1571
|
-
}),
|
|
1575
|
+
}), Ea = ["data-drop-enabled"], Da = ["href"], Oa = ["src", "alt"], ka = ["src", "alt"], Aa = {
|
|
1572
1576
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1573
1577
|
style: { opacity: "0.7" }
|
|
1574
|
-
},
|
|
1578
|
+
}, ja = ["href"], Ma = ["src", "alt"], Na = ["src", "alt"], Pa = {
|
|
1575
1579
|
key: 4,
|
|
1576
1580
|
class: "tpl:flex tpl:box-border 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)]"
|
|
1577
|
-
},
|
|
1581
|
+
}, Fa = ["aria-label"], Ia = { key: 1 }, La = /* @__PURE__ */ R({
|
|
1578
1582
|
__name: "ImageBlock",
|
|
1579
1583
|
props: {
|
|
1580
1584
|
block: {},
|
|
@@ -1582,20 +1586,20 @@ var ta = R({
|
|
|
1582
1586
|
},
|
|
1583
1587
|
emits: ["update"],
|
|
1584
1588
|
setup(e, { emit: t }) {
|
|
1585
|
-
let n = e, r = t, { t: a } =
|
|
1589
|
+
let n = e, r = t, { t: a } = Zn(), { syntax: o } = pr(), c = C(() => xe(n.block.src, o));
|
|
1586
1590
|
function l(e) {
|
|
1587
1591
|
let t = {
|
|
1588
1592
|
src: e.url,
|
|
1589
|
-
...
|
|
1593
|
+
...Ot(Tt(e.width, e.height))
|
|
1590
1594
|
};
|
|
1591
1595
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
1592
1596
|
}
|
|
1593
|
-
let u = E(), { canBrowse: d, dropEnabled: p, isUploading: m, showOverlay: h, openMediaBrowser: g } =
|
|
1597
|
+
let u = E(), { canBrowse: d, dropEnabled: p, isUploading: m, showOverlay: h, openMediaBrowser: g } = Nt({
|
|
1594
1598
|
target: u,
|
|
1595
1599
|
blocked: c,
|
|
1596
1600
|
apply: l
|
|
1597
1601
|
}), _ = C(() => ({ textAlign: n.block.align })), v = C(() => {
|
|
1598
|
-
let e = n.block.border, t = ["left", "right"].map((t) =>
|
|
1602
|
+
let e = n.block.border, t = ["left", "right"].map((t) => at(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1599
1603
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1600
1604
|
}), b = C(() => {
|
|
1601
1605
|
let e = n.block.align;
|
|
@@ -1603,13 +1607,13 @@ var ta = R({
|
|
|
1603
1607
|
maxWidth: "100%",
|
|
1604
1608
|
width: n.block.width === "full" ? v.value : `${n.block.width}px`,
|
|
1605
1609
|
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1606
|
-
borderRadius:
|
|
1607
|
-
|
|
1610
|
+
borderRadius: nt(n.block.borderRadius) ?? void 0,
|
|
1611
|
+
...$i(n.block.border),
|
|
1608
1612
|
display: "block",
|
|
1609
1613
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1610
1614
|
marginRight: e === "center" ? "auto" : void 0
|
|
1611
1615
|
};
|
|
1612
|
-
}), x =
|
|
1616
|
+
}), x = Ct(() => c.value ? void 0 : n.block.src), S = Ct(() => c.value ? n.block.placeholderUrl : void 0);
|
|
1613
1617
|
return (t, n) => (s(), D("div", {
|
|
1614
1618
|
ref_key: "dropZoneRef",
|
|
1615
1619
|
ref: u,
|
|
@@ -1617,7 +1621,7 @@ var ta = R({
|
|
|
1617
1621
|
"data-drop-enabled": w(p),
|
|
1618
1622
|
class: "tpl:relative tpl:w-full",
|
|
1619
1623
|
style: f(_.value)
|
|
1620
|
-
}, [w(h) ? (s(), F(
|
|
1624
|
+
}, [w(h) ? (s(), F(Dt, {
|
|
1621
1625
|
key: 0,
|
|
1622
1626
|
uploading: w(m),
|
|
1623
1627
|
size: "canvas"
|
|
@@ -1633,22 +1637,22 @@ var ta = R({
|
|
|
1633
1637
|
src: w(S),
|
|
1634
1638
|
alt: e.block.alt || w(a).image.altTextPlaceholder,
|
|
1635
1639
|
style: f(b.value)
|
|
1636
|
-
}, null, 12,
|
|
1640
|
+
}, null, 12, Oa)], 8, Da)) : (s(), D("img", {
|
|
1637
1641
|
key: 1,
|
|
1638
1642
|
class: "tpl:border-0",
|
|
1639
1643
|
src: w(S),
|
|
1640
1644
|
alt: e.block.alt,
|
|
1641
1645
|
style: f(b.value)
|
|
1642
|
-
}, null, 12,
|
|
1646
|
+
}, null, 12, ka))], 64)) : e.block.src && c.value ? (s(), D("div", {
|
|
1643
1647
|
key: 2,
|
|
1644
1648
|
class: "tpl:!flex tpl:box-border 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)]",
|
|
1645
1649
|
style: f([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, b.value])
|
|
1646
|
-
}, [y(w(
|
|
1650
|
+
}, [y(w(Ut), {
|
|
1647
1651
|
size: 32,
|
|
1648
1652
|
"stroke-width": 1.5,
|
|
1649
1653
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1650
1654
|
style: { opacity: "0.5" }
|
|
1651
|
-
}), j("span",
|
|
1655
|
+
}), j("span", Aa, [y(ra, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (s(), D(P, { key: 3 }, [e.block.linkUrl ? (s(), D("a", {
|
|
1652
1656
|
key: 0,
|
|
1653
1657
|
href: e.block.linkUrl,
|
|
1654
1658
|
target: "_blank",
|
|
@@ -1660,33 +1664,33 @@ var ta = R({
|
|
|
1660
1664
|
src: w(x),
|
|
1661
1665
|
alt: e.block.alt || w(a).image.altTextPlaceholder,
|
|
1662
1666
|
style: f(b.value)
|
|
1663
|
-
}, null, 12,
|
|
1667
|
+
}, null, 12, Ma)], 8, ja)) : (s(), D("img", {
|
|
1664
1668
|
key: 1,
|
|
1665
1669
|
class: "tpl:border-0",
|
|
1666
1670
|
src: w(x),
|
|
1667
1671
|
alt: e.block.alt,
|
|
1668
1672
|
style: f(b.value)
|
|
1669
|
-
}, null, 12,
|
|
1673
|
+
}, null, 12, Na))], 64)) : (s(), D("div", Pa, [w(d) ? (s(), D("button", {
|
|
1670
1674
|
key: 0,
|
|
1671
1675
|
"aria-label": w(a).image.browseMedia,
|
|
1672
1676
|
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:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1673
1677
|
onClick: n[2] ||= z((...e) => w(g) && w(g)(...e), ["stop"])
|
|
1674
|
-
}, [y(w(
|
|
1678
|
+
}, [y(w(Ut), {
|
|
1675
1679
|
size: 14,
|
|
1676
1680
|
"stroke-width": 1.5
|
|
1677
|
-
}), O(" " + i(w(a).image.browseMedia), 1)], 8,
|
|
1681
|
+
}), O(" " + i(w(a).image.browseMedia), 1)], 8, Fa)) : (s(), D("span", Ia, i(w(a).image.clickToAdd), 1))]))], 12, Ea));
|
|
1678
1682
|
}
|
|
1679
|
-
}),
|
|
1683
|
+
}), Ra = { class: "tpl:w-full" }, za = ["href"], Ba = {
|
|
1680
1684
|
key: 1,
|
|
1681
1685
|
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)]"
|
|
1682
|
-
},
|
|
1686
|
+
}, Va = /* @__PURE__ */ R({
|
|
1683
1687
|
__name: "MenuBlock",
|
|
1684
1688
|
props: {
|
|
1685
1689
|
block: {},
|
|
1686
1690
|
viewport: {}
|
|
1687
1691
|
},
|
|
1688
1692
|
setup(e) {
|
|
1689
|
-
let t = e, { t: n } =
|
|
1693
|
+
let t = e, { t: n } = Zn(), r = Rn(Tn, "MenuBlock"), a = C(() => ({
|
|
1690
1694
|
display: "flex",
|
|
1691
1695
|
flexWrap: "wrap",
|
|
1692
1696
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1698,7 +1702,7 @@ var ta = R({
|
|
|
1698
1702
|
function c(e) {
|
|
1699
1703
|
return e || t.block.linkColor || t.block.color;
|
|
1700
1704
|
}
|
|
1701
|
-
return (t, r) => (s(), D("div",
|
|
1705
|
+
return (t, r) => (s(), D("div", Ra, [o.value ? (s(), D("div", {
|
|
1702
1706
|
key: 0,
|
|
1703
1707
|
style: f(a.value)
|
|
1704
1708
|
}, [(s(!0), D(P, null, d(e.block.items, (t, n) => (s(), D(P, { key: t.id }, [j("a", {
|
|
@@ -1710,18 +1714,18 @@ var ta = R({
|
|
|
1710
1714
|
textDecoration: t.underline ? "underline" : "none"
|
|
1711
1715
|
}),
|
|
1712
1716
|
onClick: r[0] ||= z(() => {}, ["prevent"])
|
|
1713
|
-
}, [y(
|
|
1717
|
+
}, [y(ra, { text: t.text || "..." }, null, 8, ["text"])], 12, za), n < e.block.items.length - 1 ? (s(), D("span", {
|
|
1714
1718
|
key: 0,
|
|
1715
1719
|
style: f({
|
|
1716
1720
|
color: e.block.separatorColor,
|
|
1717
1721
|
padding: `0 ${e.block.spacing}px`
|
|
1718
1722
|
})
|
|
1719
|
-
}, i(e.block.separator), 5)) : T("", !0)], 64))), 128))], 4)) : (s(), D("div",
|
|
1723
|
+
}, i(e.block.separator), 5)) : T("", !0)], 64))), 128))], 4)) : (s(), D("div", Ba, [y(w(xt), { size: 16 }), j("span", null, i(w(n).menu.addLinks), 1)]))]));
|
|
1720
1724
|
}
|
|
1721
1725
|
});
|
|
1722
1726
|
// src/composables/useEditableTextBlock.ts
|
|
1723
|
-
function
|
|
1724
|
-
let t = L(
|
|
1727
|
+
function Ha(e) {
|
|
1728
|
+
let t = L(pn, yn), n = L(wn, null), { syntax: r } = pr(), i = C(() => n?.value ? ie(e(), t.value) : Ee(e(), t.value)), a = C(() => rt(Kt(ue(i.value, r)))), o = E(!1), s = E(null), { top: c, left: l } = ur(s), { toLocal: u } = br(), d = C(() => u({
|
|
1725
1729
|
top: c.value - 8,
|
|
1726
1730
|
left: l.value
|
|
1727
1731
|
}));
|
|
@@ -1741,14 +1745,14 @@ function Ba(e) {
|
|
|
1741
1745
|
};
|
|
1742
1746
|
}
|
|
1743
1747
|
// src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1744
|
-
var
|
|
1748
|
+
var Ua = ["innerHTML"], Wa = /* @__PURE__ */ R({
|
|
1745
1749
|
__name: "ParagraphBlock",
|
|
1746
1750
|
props: {
|
|
1747
1751
|
block: {},
|
|
1748
1752
|
viewport: {}
|
|
1749
1753
|
},
|
|
1750
1754
|
setup(e) {
|
|
1751
|
-
let t = e, n = I(() => import("./ParagraphEditor-
|
|
1755
|
+
let t = e, n = I(() => import("./ParagraphEditor-VXYwGoz_.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = Ha(() => t.block.content);
|
|
1752
1756
|
return (t, u) => (s(), D("div", {
|
|
1753
1757
|
ref_key: "blockRef",
|
|
1754
1758
|
ref: i,
|
|
@@ -1767,11 +1771,11 @@ var Va = ["innerHTML"], Ha = /* @__PURE__ */ R({
|
|
|
1767
1771
|
key: 1,
|
|
1768
1772
|
class: "tpl-text-content tpl:outline-none",
|
|
1769
1773
|
innerHTML: w(o)
|
|
1770
|
-
}, null, 8,
|
|
1774
|
+
}, null, 8, Ua))], 544));
|
|
1771
1775
|
}
|
|
1772
1776
|
});
|
|
1773
1777
|
// src/utils/updateBlockList.ts
|
|
1774
|
-
function
|
|
1778
|
+
function Ga(e, t, n, r = 0, i) {
|
|
1775
1779
|
let a = n ? e.content.value.blocks.find((e) => e.id === n) : void 0, o = n ? a?.type === "section" ? a.children[r] ?? [] : [] : e.content.value.blocks, s = t.map((e) => e.id);
|
|
1776
1780
|
if (o.some((e) => !s.includes(e.id))) return;
|
|
1777
1781
|
let c = t.filter((e) => !o.some((t) => t.id === e.id)), l, u = -1;
|
|
@@ -1784,7 +1788,7 @@ function Ua(e, t, n, r = 0, i) {
|
|
|
1784
1788
|
l && (e.findBlockLocation(l.id) ? e.moveBlock(l.id, u, n, r) : e.addBlock(JSON.parse(JSON.stringify(l)), n, r, u));
|
|
1785
1789
|
}
|
|
1786
1790
|
// src/utils/mergeTagTokens.ts
|
|
1787
|
-
function
|
|
1791
|
+
function Ka(e, t, n) {
|
|
1788
1792
|
let r = [], i = "\0MT";
|
|
1789
1793
|
for (; e.includes(i);) i += "_";
|
|
1790
1794
|
let a = n === "html" ? ve(e, (e) => {
|
|
@@ -1793,58 +1797,70 @@ function Wa(e, t, n) {
|
|
|
1793
1797
|
}) : e, o = Array.from(a.matchAll(RegExp(`${i}\\d+\u0000`, "g")), (e) => ({
|
|
1794
1798
|
start: e.index,
|
|
1795
1799
|
end: e.index + e[0].length
|
|
1796
|
-
})), s = [];
|
|
1797
|
-
for (let e of [
|
|
1798
|
-
let
|
|
1799
|
-
for (let
|
|
1800
|
-
let t =
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1800
|
+
})), s = [], c = me(a, t, "logic"), l = [], u = 0;
|
|
1801
|
+
for (let e of ["logic", "value"]) {
|
|
1802
|
+
let r = 0;
|
|
1803
|
+
for (let i of e === "logic" ? c : me(a, t, "value")) {
|
|
1804
|
+
let t = i.index, a = t + i.value.length;
|
|
1805
|
+
for (; o[r]?.end <= t;) r++;
|
|
1806
|
+
let c = o[r];
|
|
1807
|
+
if (!(c && t < c.end && a > c.start)) {
|
|
1808
|
+
if (e === "value") {
|
|
1809
|
+
for (; l[u]?.end <= t;) u++;
|
|
1810
|
+
let e = l[u];
|
|
1811
|
+
if (e && t < e.end && a > e.start) continue;
|
|
1812
|
+
}
|
|
1813
|
+
e === "logic" && l.push({
|
|
1814
|
+
start: t,
|
|
1815
|
+
end: a
|
|
1816
|
+
}), s.push({
|
|
1817
|
+
start: t,
|
|
1818
|
+
end: a,
|
|
1819
|
+
value: n === "html" ? je(i.value) : i.value
|
|
1820
|
+
});
|
|
1821
|
+
}
|
|
1806
1822
|
}
|
|
1807
1823
|
}
|
|
1808
1824
|
return [...r, ...s.map((e) => e.value)].sort();
|
|
1809
1825
|
}
|
|
1810
|
-
function
|
|
1811
|
-
return JSON.stringify(
|
|
1826
|
+
function qa(e, t, n, r) {
|
|
1827
|
+
return JSON.stringify(Ka(e, n, r)) !== JSON.stringify(Ka(t, n, r));
|
|
1812
1828
|
}
|
|
1813
1829
|
// src/components/localization/LocaleStatusChip.vue?vue&type=script&setup=true&lang.ts
|
|
1814
|
-
var
|
|
1830
|
+
var Ja = [
|
|
1815
1831
|
"data-state",
|
|
1816
1832
|
"aria-label",
|
|
1817
1833
|
"title",
|
|
1818
1834
|
"aria-expanded",
|
|
1819
1835
|
"aria-controls",
|
|
1820
1836
|
"onKeydown"
|
|
1821
|
-
],
|
|
1837
|
+
], Ya = [
|
|
1822
1838
|
"aria-label",
|
|
1823
1839
|
"aria-labelledby",
|
|
1824
1840
|
"aria-describedby",
|
|
1825
1841
|
"onKeydown"
|
|
1826
|
-
],
|
|
1842
|
+
], Xa = ["id"], Za = ["id"], Qa = { class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:justify-end tpl:gap-2" }, $a = ["disabled"], eo = {
|
|
1827
1843
|
key: 0,
|
|
1828
1844
|
class: "tpl:m-0 tpl:mb-2 tpl:text-xs tpl:font-medium"
|
|
1829
|
-
},
|
|
1845
|
+
}, to = {
|
|
1830
1846
|
key: 1,
|
|
1831
1847
|
class: "tpl:m-0"
|
|
1832
|
-
},
|
|
1848
|
+
}, no = { class: "tpl:m-0" }, ro = { class: "tpl:mt-2 tpl:mb-0 tpl:break-words tpl:text-[var(--tpl-chrome-text-muted)]" }, io = {
|
|
1833
1849
|
key: 3,
|
|
1834
1850
|
class: "tpl:m-0"
|
|
1835
|
-
},
|
|
1851
|
+
}, ao = {
|
|
1836
1852
|
key: 4,
|
|
1837
1853
|
class: "tpl:m-0"
|
|
1838
|
-
},
|
|
1854
|
+
}, oo = {
|
|
1839
1855
|
key: 5,
|
|
1840
1856
|
class: "tpl:m-0"
|
|
1841
|
-
},
|
|
1857
|
+
}, so = {
|
|
1842
1858
|
key: 6,
|
|
1843
1859
|
class: "tpl:m-0 tpl:list-none tpl:p-0"
|
|
1844
|
-
},
|
|
1860
|
+
}, co = ["onClick"], lo = {
|
|
1845
1861
|
key: 7,
|
|
1846
1862
|
class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
1847
|
-
},
|
|
1863
|
+
}, uo = ["data-testid", "disabled"], fo = /*#__PURE__*/ zt(/* @__PURE__ */ R({
|
|
1848
1864
|
__name: "LocaleStatusChip",
|
|
1849
1865
|
props: {
|
|
1850
1866
|
blockId: {},
|
|
@@ -1864,24 +1880,24 @@ var Ka = [
|
|
|
1864
1880
|
},
|
|
1865
1881
|
emits: ["target"],
|
|
1866
1882
|
setup(e, { emit: n }) {
|
|
1867
|
-
let r = e, a = n, l = L(
|
|
1883
|
+
let r = e, a = n, l = L(Kn, null), p = L(Ln, null), m = L(tn, null), h = L(Hn, "en") ?? "en", { t: g, format: _ } = Zn(), v = fr(), y = vr(), { toLocal: x } = br(), S = E(null), O = E(null), A = E(!1), M = E(!1), N = E(null), ee = E(null), te = null, I = E({
|
|
1868
1884
|
top: 0,
|
|
1869
1885
|
left: 0
|
|
1870
1886
|
}), R = E({
|
|
1871
1887
|
maxHeight: 0,
|
|
1872
1888
|
maxWidth: 0
|
|
1873
|
-
}), ne = `tpl-locale-popover-${
|
|
1889
|
+
}), ne = `tpl-locale-popover-${Ze()}`, ie = C(() => er(l?.activeLocale?.value ?? "")), ae = C(() => er(l?.content.value.settings.locale ?? "en"));
|
|
1874
1890
|
function oe(e, t) {
|
|
1875
1891
|
switch (e) {
|
|
1876
1892
|
case "tags-differ": return g.localization.tagsDiffer;
|
|
1877
1893
|
case "hidden": return _(g.localization.hidden, { language: ie.value });
|
|
1878
1894
|
case "changed": return _(g.localization.changed, { language: ie.value });
|
|
1879
|
-
case "default-stale": return
|
|
1880
|
-
case "missing": return t === 1 ? g.localization.notTranslated :
|
|
1881
|
-
default: return t === 1 ? g.localization.outOfDate :
|
|
1895
|
+
case "default-stale": return $n(g.localization.staleLanguages, t, h);
|
|
1896
|
+
case "missing": return t === 1 ? g.localization.notTranslated : $n(g.localization.notTranslatedCount, t, h);
|
|
1897
|
+
default: return t === 1 ? g.localization.outOfDate : $n(g.localization.staleCount, t, h);
|
|
1882
1898
|
}
|
|
1883
1899
|
}
|
|
1884
|
-
let se = C(() => oe(r.state, r.count)), B = C(() => r.popoverState ?? r.state), ce = C(() => r.popoverCount ?? r.count), le = C(() => oe(B.value, ce.value)), ue = C(() => r.state === "hidden" ?
|
|
1900
|
+
let se = C(() => oe(r.state, r.count)), B = C(() => r.popoverState ?? r.state), ce = C(() => r.popoverCount ?? r.count), le = C(() => oe(B.value, ce.value)), ue = C(() => r.state === "hidden" ? Or : r.state === "changed" ? Jt : r.state === "default-stale" ? Gt : r.state === "stale" ? Vt : Xt), de = C(() => B.value === "default-stale" || (B.value === "missing" || B.value === "stale") && ce.value > 1), fe = C(() => r.editable && r.eligibleGaps && p?.isAvailable.value);
|
|
1885
1901
|
function pe(e = !1) {
|
|
1886
1902
|
A.value = !1, M.value = !1, te = null, e && S.value?.focus({ preventScroll: !0 });
|
|
1887
1903
|
}
|
|
@@ -1990,7 +2006,7 @@ var Ka = [
|
|
|
1990
2006
|
size: 12,
|
|
1991
2007
|
"stroke-width": 2,
|
|
1992
2008
|
"aria-hidden": "true"
|
|
1993
|
-
}))], 40,
|
|
2009
|
+
}))], 40, Ja), w(y) && A.value ? (s(), F(b, {
|
|
1994
2010
|
key: 0,
|
|
1995
2011
|
to: w(y)
|
|
1996
2012
|
}, [j("div", {
|
|
@@ -2016,80 +2032,80 @@ var Ka = [
|
|
|
2016
2032
|
j("h3", {
|
|
2017
2033
|
id: `${ne}-question`,
|
|
2018
2034
|
class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
2019
|
-
}, i(w(
|
|
2035
|
+
}, i(w($n)(w(g).localization.translationConfirmation, e.translationCount ?? 0, w(h))), 9, Xa),
|
|
2020
2036
|
j("p", {
|
|
2021
2037
|
id: `${ne}-warning`,
|
|
2022
2038
|
class: "tpl:m-0 tpl:text-[var(--tpl-text-muted)]"
|
|
2023
|
-
}, i(w(_)(w(g).localization.translationDescription, { language: ie.value })), 9,
|
|
2024
|
-
j("div",
|
|
2039
|
+
}, i(w(_)(w(g).localization.translationDescription, { language: ie.value })), 9, Za),
|
|
2040
|
+
j("div", Qa, [j("button", {
|
|
2025
2041
|
ref_key: "confirmationCancel",
|
|
2026
2042
|
ref: ee,
|
|
2027
2043
|
type: "button",
|
|
2028
2044
|
"data-testid": "translation-confirm-cancel",
|
|
2029
|
-
class: c(w(
|
|
2045
|
+
class: c(w(nr)),
|
|
2030
2046
|
onClick: Te
|
|
2031
2047
|
}, i(w(g).localization.cancel), 3), j("button", {
|
|
2032
2048
|
type: "button",
|
|
2033
2049
|
"data-testid": "translation-confirm",
|
|
2034
|
-
class: c(w(
|
|
2050
|
+
class: c(w(rr)),
|
|
2035
2051
|
disabled: !fe.value || !!w(p)?.running.value || !e.translationCount,
|
|
2036
2052
|
onClick: De
|
|
2037
|
-
}, i(w(
|
|
2053
|
+
}, i(w($n)(w(g).localization.translateAllFields, e.translationCount ?? 0, w(h))), 11, $a)])
|
|
2038
2054
|
], 64)) : (s(), D(P, { key: 1 }, [
|
|
2039
|
-
de.value ? (s(), D("p",
|
|
2040
|
-
B.value === "missing" ? (s(), D("p",
|
|
2055
|
+
de.value ? (s(), D("p", eo, i(le.value), 1)) : T("", !0),
|
|
2056
|
+
B.value === "missing" ? (s(), D("p", to, i(w(_)(w(g).localization.missingExplanation, { default: ae.value })), 1)) : B.value === "stale" ? (s(), D(P, { key: 2 }, [j("p", no, i(w(_)(w(g).localization.staleExplanation, { default: ae.value })), 1), j("p", ro, i(w(_)(w(g).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : B.value === "tags-differ" ? (s(), D("p", io, i(w(_)(w(g).localization.tagsDifferExplanation, { default: ae.value })), 1)) : B.value === "changed" ? (s(), D("p", ao, i(w($n)(w(g).localization.changedProperties, ce.value, w(h), { default: ae.value })), 1)) : B.value === "hidden" ? (s(), D("p", oo, i(w(_)(w(g).localization.hiddenExplanation, { language: ie.value })), 1)) : (s(), D("ul", so, [(s(!0), D(P, null, d(e.staleLocales, (e) => (s(), D("li", {
|
|
2041
2057
|
key: e,
|
|
2042
2058
|
class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
|
|
2043
|
-
}, [j("span", null, i(w(
|
|
2059
|
+
}, [j("span", null, i(w(er)(e)), 1), j("button", {
|
|
2044
2060
|
type: "button",
|
|
2045
|
-
class: c(w(
|
|
2061
|
+
class: c(w(tr)),
|
|
2046
2062
|
onClick: (t) => Ce(e)
|
|
2047
|
-
}, i(w(g).localization.open), 11,
|
|
2048
|
-
e.editable && B.value !== "default-stale" ? (s(), D("div",
|
|
2063
|
+
}, i(w(g).localization.open), 11, co)]))), 128))])),
|
|
2064
|
+
e.editable && B.value !== "default-stale" ? (s(), D("div", lo, [
|
|
2049
2065
|
fe.value && (B.value === "missing" || B.value === "stale" || B.value === "tags-differ") ? (s(), D("button", {
|
|
2050
2066
|
key: 0,
|
|
2051
2067
|
type: "button",
|
|
2052
2068
|
ref_key: "retranslate",
|
|
2053
2069
|
ref: N,
|
|
2054
2070
|
"data-testid": B.value === "missing" ? "locale-translate" : "locale-retranslate",
|
|
2055
|
-
class: c(w(
|
|
2071
|
+
class: c(w(nr)),
|
|
2056
2072
|
disabled: !!w(p)?.running.value,
|
|
2057
2073
|
onClick: we
|
|
2058
|
-
}, i(B.value === "missing" ? w(g).localization.translate : w(g).localization.retranslate), 11,
|
|
2074
|
+
}, i(B.value === "missing" ? w(g).localization.translate : w(g).localization.retranslate), 11, uo)) : T("", !0),
|
|
2059
2075
|
B.value === "stale" || B.value === "tags-differ" ? (s(), D(P, { key: 1 }, [B.value === "stale" ? (s(), D("button", {
|
|
2060
2076
|
key: 0,
|
|
2061
2077
|
type: "button",
|
|
2062
2078
|
"data-testid": "locale-keep",
|
|
2063
|
-
class: c(fe.value ? w(
|
|
2079
|
+
class: c(fe.value ? w(tr) : w(nr)),
|
|
2064
2080
|
onClick: be
|
|
2065
2081
|
}, i(w(g).localization.keep), 3)) : T("", !0), j("button", {
|
|
2066
2082
|
type: "button",
|
|
2067
2083
|
"data-testid": "locale-use-default",
|
|
2068
|
-
class: c(B.value === "tags-differ" && !fe.value ? w(
|
|
2084
|
+
class: c(B.value === "tags-differ" && !fe.value ? w(nr) : w(tr)),
|
|
2069
2085
|
onClick: n[0] ||= (t) => xe(B.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
|
|
2070
2086
|
}, i(w(_)(w(g).localization.useDefaultLanguage, { default: ae.value })), 3)], 64)) : T("", !0),
|
|
2071
2087
|
B.value === "changed" ? (s(), D("button", {
|
|
2072
2088
|
key: 2,
|
|
2073
2089
|
type: "button",
|
|
2074
2090
|
"data-testid": "locale-reset",
|
|
2075
|
-
class: c(w(
|
|
2091
|
+
class: c(w(nr)),
|
|
2076
2092
|
onClick: n[1] ||= (t) => xe(e.setPaths)
|
|
2077
2093
|
}, i(w(g).localization.resetChanges), 3)) : T("", !0),
|
|
2078
2094
|
B.value === "hidden" ? (s(), D("button", {
|
|
2079
2095
|
key: 3,
|
|
2080
2096
|
type: "button",
|
|
2081
2097
|
"data-testid": "locale-show",
|
|
2082
|
-
class: c(w(
|
|
2098
|
+
class: c(w(nr)),
|
|
2083
2099
|
onClick: Se
|
|
2084
2100
|
}, i(w(g).localization.show), 3)) : T("", !0)
|
|
2085
2101
|
])) : T("", !0)
|
|
2086
|
-
], 64))], 44,
|
|
2102
|
+
], 64))], 44, Ya)], 8, ["to"])) : T("", !0)], 64));
|
|
2087
2103
|
}
|
|
2088
|
-
}), [["__scopeId", "data-v-3343ae7d"]]),
|
|
2104
|
+
}), [["__scopeId", "data-v-3343ae7d"]]), po = /* @__PURE__ */ R({
|
|
2089
2105
|
__name: "LocaleMarkers",
|
|
2090
2106
|
props: { block: {} },
|
|
2091
2107
|
setup(e) {
|
|
2092
|
-
let n = e, r = L(
|
|
2108
|
+
let n = e, r = L(Kn, null), i = L(fn, void 0), a = L(An, []), o = L($t, Ve.liquid), c = L(jn, C(() => /* @__PURE__ */ new Set())), l = C(() => r?.activeLocale?.value), u = C(() => l.value ? n.block.l10n?.[l.value] : void 0), d = C(() => ({
|
|
2093
2109
|
blocks: [n.block.type === "section" || n.block.type === "wrapper" ? {
|
|
2094
2110
|
...n.block,
|
|
2095
2111
|
children: []
|
|
@@ -2103,8 +2119,8 @@ var Ka = [
|
|
|
2103
2119
|
stale: [],
|
|
2104
2120
|
translated: []
|
|
2105
2121
|
}), p = C(() => f.value.stale.map((e) => e.slice(n.block.id.length + 1))), m = C(() => f.value.translated.flatMap((e) => {
|
|
2106
|
-
let t = e.slice(n.block.id.length + 1), r = fe(n.block, t), i = u.value?.text?.[t]?.value, a = n.block.type === "html" ||
|
|
2107
|
-
return typeof r == "string" && i !== void 0 &&
|
|
2122
|
+
let t = e.slice(n.block.id.length + 1), r = fe(n.block, t), i = u.value?.text?.[t]?.value, a = n.block.type === "html" || dt[n.block.type]?.includes(t) ? "html" : "text";
|
|
2123
|
+
return typeof r == "string" && i !== void 0 && qa(r, i, o, a) ? [t] : [];
|
|
2108
2124
|
})), h = E(null), g = C(() => r && l.value && !c.value.has(l.value) ? Ge(d.value, l.value, {
|
|
2109
2125
|
syntax: o,
|
|
2110
2126
|
definitions: a,
|
|
@@ -2131,7 +2147,7 @@ var Ka = [
|
|
|
2131
2147
|
let t = e.split(/<[^>]*>/).join("");
|
|
2132
2148
|
return Array.from(t).slice(0, 60).join("");
|
|
2133
2149
|
});
|
|
2134
|
-
return (t, n) => w(i) && b.value ? (s(), F(
|
|
2150
|
+
return (t, n) => w(i) && b.value ? (s(), F(fo, {
|
|
2135
2151
|
key: 0,
|
|
2136
2152
|
"block-id": e.block.id,
|
|
2137
2153
|
state: b.value,
|
|
@@ -2165,21 +2181,21 @@ var Ka = [
|
|
|
2165
2181
|
"editable"
|
|
2166
2182
|
])) : T("", !0);
|
|
2167
2183
|
}
|
|
2168
|
-
}),
|
|
2184
|
+
}), mo = [
|
|
2169
2185
|
"data-block-id",
|
|
2170
2186
|
"data-block-type",
|
|
2171
2187
|
"data-tpl-picked"
|
|
2172
|
-
],
|
|
2188
|
+
], ho = ["aria-label"], go = ["data-lock-holder"], _o = ["aria-label"], vo = [
|
|
2173
2189
|
"aria-label",
|
|
2174
2190
|
"aria-pressed",
|
|
2175
2191
|
"title"
|
|
2176
|
-
],
|
|
2192
|
+
], yo = ["aria-label", "title"], bo = ["aria-label", "title"], xo = ["aria-label", "title"], So = {
|
|
2177
2193
|
key: 3,
|
|
2178
2194
|
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"
|
|
2179
|
-
},
|
|
2195
|
+
}, Co = { 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)]" }, wo = {
|
|
2180
2196
|
key: 4,
|
|
2181
2197
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2182
|
-
},
|
|
2198
|
+
}, To = ["aria-label", "title"], Eo = /*#__PURE__*/ zt(/* @__PURE__ */ R({
|
|
2183
2199
|
__name: "BlockWrapper",
|
|
2184
2200
|
props: {
|
|
2185
2201
|
block: {},
|
|
@@ -2192,7 +2208,7 @@ var Ka = [
|
|
|
2192
2208
|
},
|
|
2193
2209
|
emits: ["select"],
|
|
2194
2210
|
setup(e, { emit: n }) {
|
|
2195
|
-
let o = I(() => import("./BlockIssueBadge-DaPTq1RE.js")), l = e, d = C(() => l.displayBlock ?? l.block), p = n, { t: m, format: h } =
|
|
2211
|
+
let o = I(() => import("./BlockIssueBadge-DaPTq1RE.js")), l = e, d = C(() => l.displayBlock ?? l.block), p = n, { t: m, format: h } = Zn(), g = L(qn, null), _ = E(null), v = C(() => g?.liftedBlockId.value === l.block.id), b = C(() => v.value ? h(m.blockActions.dragLifted, { block: l.block.type }) : m.blockActions.drag);
|
|
2196
2212
|
async function x() {
|
|
2197
2213
|
await u(), _.value?.focus();
|
|
2198
2214
|
}
|
|
@@ -2202,7 +2218,7 @@ var Ka = [
|
|
|
2202
2218
|
let k = C(() => !l.viewport || !d.value.visibility ? !1 : d.value.visibility[l.viewport] === !1), A = C(() => !!(ye?.activeLocale?.value && l.block.l10n?.[ye.activeLocale.value]?.hidden)), M = C(() => l.previewMode === !0 && (k.value || A.value)), N = C(() => l.viewport ? {
|
|
2203
2219
|
desktop: m.viewport.desktop,
|
|
2204
2220
|
mobile: m.viewport.mobile
|
|
2205
|
-
}[l.viewport] ?? l.viewport : ""), ee = C(() => !!d.value.displayCondition), P = L(
|
|
2221
|
+
}[l.viewport] ?? l.viewport : ""), ee = C(() => !!d.value.displayCondition), P = L(Un, null), te = L(In, null), R = L(Dn, {}), ne = C(() => R.savedBlocks?.isPicking.value === !0), re = C(() => !l.nested && R.savedBlocks?.isAvailable.value === !0 && R.savedBlocks?.canCreate.value === !0), ie = C(() => l.isSelected && !ne.value), ae = C(() => R.comments?.getBlockCount(l.block.id) ?? 0), oe = E(null), se = E(null), B = E(null), ce = E(null), le = E({
|
|
2206
2222
|
left: "calc(100% + 8px)",
|
|
2207
2223
|
top: "50%"
|
|
2208
2224
|
}), ue = E(!1), de = C(() => se.value ?? ce.value), fe = C(() => de.value?.closest(".tpl-body"));
|
|
@@ -2235,19 +2251,19 @@ var Ka = [
|
|
|
2235
2251
|
top: h
|
|
2236
2252
|
});
|
|
2237
2253
|
}
|
|
2238
|
-
a(pe),
|
|
2254
|
+
a(pe), dr(C(() => de.value ? [
|
|
2239
2255
|
oe.value,
|
|
2240
2256
|
se.value,
|
|
2241
2257
|
B.value,
|
|
2242
2258
|
ce.value,
|
|
2243
2259
|
fe.value
|
|
2244
|
-
].filter((e) => !!e) : []), pe),
|
|
2245
|
-
let me = C(() => R.collaboration?.lockOf(l.block.id) ?? null), he = C(() => me.value?.holder.type === "guest" ? m.collaboration.guest : me.value?.holder.name ?? ""), ge = C(() => R.collaboration?.agentHighlightOf(l.block.id) ?? R.ai?.highlightOf(l.block.id) ?? null), _e =
|
|
2246
|
-
t([() => ye?.activeLocale?.value, () => be &&
|
|
2247
|
-
let Se = L(
|
|
2260
|
+
].filter((e) => !!e) : []), pe), cr(fe, "scroll", pe, { passive: !0 });
|
|
2261
|
+
let me = C(() => R.collaboration?.lockOf(l.block.id) ?? null), he = C(() => me.value?.holder.type === "guest" ? m.collaboration.guest : me.value?.holder.name ?? ""), ge = C(() => R.collaboration?.agentHighlightOf(l.block.id) ?? R.ai?.highlightOf(l.block.id) ?? null), _e = Ft(() => d.value.type === "section" ? d.value.backgroundImage : void 0), ve = Ft(() => d.value.type === "section" ? d.value.wrapper?.backgroundImage : void 0), ye = L(Kn, null), be = ye ? Qn(ye) : null, xe = L(Pn, null) ?? be?.content ?? null;
|
|
2262
|
+
t([() => ye?.activeLocale?.value, () => be && mt(be.settings.value)], pe, { flush: "post" });
|
|
2263
|
+
let Se = L(_n, void 0), Ce = C(() => Zi(d.value, {
|
|
2248
2264
|
backgroundImageUrl: _e.value,
|
|
2249
|
-
heroBoxWidth:
|
|
2250
|
-
})), we = C(() =>
|
|
2265
|
+
heroBoxWidth: Et(d.value) ? jt(d.value, xe?.value, Se) : void 0
|
|
2266
|
+
})), we = C(() => ea(d.value, { backgroundImageUrl: ve.value }));
|
|
2251
2267
|
function Te(e) {
|
|
2252
2268
|
l.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), p("select"));
|
|
2253
2269
|
}
|
|
@@ -2291,12 +2307,12 @@ var Ka = [
|
|
|
2291
2307
|
class: c(["tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:shrink-0 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:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]", ue.value ? void 0 : "tpl:absolute tpl:-top-2 tpl:inset-s-full tpl:ms-2"]),
|
|
2292
2308
|
"aria-label": w(h)(w(m).blockActions.comments, { count: String(ae.value) }),
|
|
2293
2309
|
onClick: n[0] ||= z((t) => w(R).comments?.openForBlock(e.block.id), ["stop"])
|
|
2294
|
-
}, [y(w(
|
|
2310
|
+
}, [y(w(qt), {
|
|
2295
2311
|
size: 12,
|
|
2296
2312
|
"stroke-width": 2.5
|
|
2297
|
-
}), O(" " + i(ae.value), 1)], 10,
|
|
2313
|
+
}), O(" " + i(ae.value), 1)], 10, ho)) : T("", !0),
|
|
2298
2314
|
y(w(o), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
2299
|
-
e.previewMode ? T("", !0) : (s(), F(
|
|
2315
|
+
e.previewMode ? T("", !0) : (s(), F(po, {
|
|
2300
2316
|
key: 1,
|
|
2301
2317
|
block: e.block
|
|
2302
2318
|
}, null, 8, ["block"]))
|
|
@@ -2314,9 +2330,9 @@ var Ka = [
|
|
|
2314
2330
|
class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:-translate-x-1/2 tpl:-translate-y-full tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
|
|
2315
2331
|
style: f({
|
|
2316
2332
|
backgroundColor: me.value.holder.color,
|
|
2317
|
-
color: w(
|
|
2333
|
+
color: w(Tr)(me.value.holder.color)
|
|
2318
2334
|
})
|
|
2319
|
-
}, i(w(h)(w(m).collaboration.editing, { name: he.value })), 5)], 12,
|
|
2335
|
+
}, i(w(h)(w(m).collaboration.editing, { name: he.value })), 5)], 12, go)) : T("", !0),
|
|
2320
2336
|
ge.value === null ? T("", !0) : (s(), D("div", {
|
|
2321
2337
|
key: ge.value,
|
|
2322
2338
|
"data-testid": "block-agent-highlight",
|
|
@@ -2341,70 +2357,70 @@ var Ka = [
|
|
|
2341
2357
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2342
2358
|
title: w(m).blockActions.drag,
|
|
2343
2359
|
onKeydown: S
|
|
2344
|
-
}, [y(w(
|
|
2360
|
+
}, [y(w(Ar), {
|
|
2345
2361
|
size: 14,
|
|
2346
2362
|
"stroke-width": 1.5
|
|
2347
|
-
})], 40,
|
|
2363
|
+
})], 40, vo),
|
|
2348
2364
|
j("button", {
|
|
2349
2365
|
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",
|
|
2350
2366
|
"aria-label": w(m).blockActions.duplicate,
|
|
2351
2367
|
title: w(m).blockActions.duplicate,
|
|
2352
2368
|
onClick: z(De, ["stop"])
|
|
2353
|
-
}, [y(w(
|
|
2369
|
+
}, [y(w(Ht), {
|
|
2354
2370
|
size: 14,
|
|
2355
2371
|
"stroke-width": 1.5
|
|
2356
|
-
})], 8,
|
|
2372
|
+
})], 8, yo),
|
|
2357
2373
|
re.value ? (s(), D("button", {
|
|
2358
2374
|
key: 0,
|
|
2359
2375
|
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",
|
|
2360
2376
|
"aria-label": w(m).blockActions.saveAsBlock,
|
|
2361
2377
|
title: w(m).blockActions.saveAsBlock,
|
|
2362
2378
|
onClick: z(Oe, ["stop"])
|
|
2363
|
-
}, [y(w(
|
|
2379
|
+
}, [y(w(Er), {
|
|
2364
2380
|
size: 14,
|
|
2365
2381
|
"stroke-width": 1.5
|
|
2366
|
-
})], 8,
|
|
2382
|
+
})], 8, bo)) : T("", !0),
|
|
2367
2383
|
j("button", {
|
|
2368
2384
|
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",
|
|
2369
2385
|
"aria-label": w(m).blockActions.delete,
|
|
2370
2386
|
title: w(m).blockActions.delete,
|
|
2371
2387
|
onClick: z(Ee, ["stop"])
|
|
2372
|
-
}, [y(w(
|
|
2388
|
+
}, [y(w(Yt), {
|
|
2373
2389
|
size: 14,
|
|
2374
2390
|
"stroke-width": 1.5
|
|
2375
|
-
})], 8,
|
|
2376
|
-
], 12,
|
|
2377
|
-
k.value ? (s(), D("div",
|
|
2391
|
+
})], 8, xo)
|
|
2392
|
+
], 12, _o)) : T("", !0),
|
|
2393
|
+
k.value ? (s(), D("div", So, [j("span", Co, [y(w(Or), {
|
|
2378
2394
|
size: 12,
|
|
2379
2395
|
"stroke-width": 1.5
|
|
2380
2396
|
}), O(" " + i(w(h)(w(m).blockActions.hiddenOnViewport, { viewport: N.value })), 1)])])) : T("", !0),
|
|
2381
|
-
ee.value && !k.value ? (s(), D("div",
|
|
2397
|
+
ee.value && !k.value ? (s(), D("div", wo, [j("button", {
|
|
2382
2398
|
"data-testid": "condition-toggle",
|
|
2383
2399
|
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:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2384
2400
|
"aria-label": w(m).blockActions.conditionToggle,
|
|
2385
2401
|
title: e.block.displayCondition?.label,
|
|
2386
2402
|
onClick: z(ke, ["stop"])
|
|
2387
|
-
}, [y(w(
|
|
2403
|
+
}, [y(w(kr), {
|
|
2388
2404
|
size: 12,
|
|
2389
2405
|
"stroke-width": 2
|
|
2390
|
-
})], 8,
|
|
2406
|
+
})], 8, To)])) : T("", !0),
|
|
2391
2407
|
we.value ? (s(), D("div", {
|
|
2392
2408
|
key: 5,
|
|
2393
|
-
class: c(["tpl-section-wrapper tpl-email-surface", w(
|
|
2409
|
+
class: c(["tpl-section-wrapper tpl-email-surface", w(qi)(we.value)]),
|
|
2394
2410
|
style: f(we.value)
|
|
2395
2411
|
}, [j("div", {
|
|
2396
|
-
class: c(["tpl-block-content tpl-email-surface", w(
|
|
2412
|
+
class: c(["tpl-block-content tpl-email-surface", w(qi)(Ce.value)]),
|
|
2397
2413
|
style: f(Ce.value)
|
|
2398
2414
|
}, [r(t.$slots, "default", {}, void 0, !0)], 6)], 6)) : (s(), D("div", {
|
|
2399
2415
|
key: 6,
|
|
2400
|
-
class: c(["tpl-block-content tpl-email-surface", w(
|
|
2416
|
+
class: c(["tpl-block-content tpl-email-surface", w(qi)(Ce.value)]),
|
|
2401
2417
|
style: f(Ce.value)
|
|
2402
2418
|
}, [r(t.$slots, "default", {}, void 0, !0)], 6))
|
|
2403
|
-
], 10,
|
|
2419
|
+
], 10, mo));
|
|
2404
2420
|
}
|
|
2405
2421
|
}), [["__scopeId", "data-v-8c371dc9"]]);
|
|
2406
2422
|
// src/utils/unwrapParagraph.ts
|
|
2407
|
-
function
|
|
2423
|
+
function Do(e) {
|
|
2408
2424
|
let t = /^\s*<p\b/.exec(e);
|
|
2409
2425
|
if (!t) return e;
|
|
2410
2426
|
let n = Ue(e, t[0].length);
|
|
@@ -2415,22 +2431,22 @@ function To(e) {
|
|
|
2415
2431
|
return /<\/p>\s*<p\b/i.test(i) ? e : i;
|
|
2416
2432
|
}
|
|
2417
2433
|
// src/components/blocks/TitleBlock.vue
|
|
2418
|
-
var
|
|
2434
|
+
var Oo = /* @__PURE__ */ R({
|
|
2419
2435
|
__name: "TitleBlock",
|
|
2420
2436
|
props: {
|
|
2421
2437
|
block: {},
|
|
2422
2438
|
viewport: {}
|
|
2423
2439
|
},
|
|
2424
2440
|
setup(e) {
|
|
2425
|
-
let t = e, n = I(() => import("./TitleEditor-
|
|
2441
|
+
let t = e, n = I(() => import("./TitleEditor-D5kC56Jl.js")), r = Rn(Tn, "TitleBlock"), { isEditing: i, blockRef: a, toolbarPosition: c, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = Ha(() => t.block.content), p = C(() => {
|
|
2426
2442
|
let e = {
|
|
2427
2443
|
fontSize: `${Ie[t.block.level]}px`,
|
|
2428
|
-
lineHeight: String(
|
|
2444
|
+
lineHeight: String(ct),
|
|
2429
2445
|
fontWeight: "700",
|
|
2430
2446
|
textAlign: t.block.textAlign
|
|
2431
2447
|
};
|
|
2432
2448
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
|
|
2433
|
-
}), m = C(() => `h${t.block.level}`), h = C(() =>
|
|
2449
|
+
}), m = C(() => `h${t.block.level}`), h = C(() => Kt(Do(l.value)));
|
|
2434
2450
|
return (t, r) => (s(), D("div", {
|
|
2435
2451
|
ref_key: "blockRef",
|
|
2436
2452
|
ref: a,
|
|
@@ -2456,14 +2472,14 @@ var Eo = /* @__PURE__ */ R({
|
|
|
2456
2472
|
innerHTML: h.value
|
|
2457
2473
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2458
2474
|
}
|
|
2459
|
-
}),
|
|
2460
|
-
function
|
|
2475
|
+
}), ko = "hero", Ao = "#1f2937", jo = "#ffffff";
|
|
2476
|
+
function Mo(e, t) {
|
|
2461
2477
|
let n = ae("title", e);
|
|
2462
|
-
n.color =
|
|
2478
|
+
n.color = jo, n.textAlign = "center";
|
|
2463
2479
|
let r = ae("paragraph", e);
|
|
2464
|
-
r.content = `<p style="text-align: center"><span style="color: ${
|
|
2480
|
+
r.content = `<p style="text-align: center"><span style="color: ${jo}">${No(t)}</span></p>`;
|
|
2465
2481
|
let i = ae("button", e);
|
|
2466
|
-
return i.align = "center",
|
|
2482
|
+
return i.align = "center", De({
|
|
2467
2483
|
columns: "1",
|
|
2468
2484
|
children: [[
|
|
2469
2485
|
n,
|
|
@@ -2481,96 +2497,96 @@ function Ao(e, t) {
|
|
|
2481
2497
|
bottom: 48,
|
|
2482
2498
|
left: 24
|
|
2483
2499
|
},
|
|
2484
|
-
backgroundColor:
|
|
2500
|
+
backgroundColor: Ao
|
|
2485
2501
|
}
|
|
2486
2502
|
});
|
|
2487
2503
|
}
|
|
2488
|
-
function
|
|
2504
|
+
function No(e) {
|
|
2489
2505
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2490
2506
|
}
|
|
2491
2507
|
// src/utils/sectionColumnDrop.ts
|
|
2492
|
-
var
|
|
2493
|
-
function
|
|
2494
|
-
return e.dataset.blockType !== "section" && !
|
|
2508
|
+
var Po = /* @__PURE__ */ new Set(["section", ko]);
|
|
2509
|
+
function Fo(e) {
|
|
2510
|
+
return e.dataset.blockType !== "section" && !Po.has(e.dataset.paletteType ?? "");
|
|
2495
2511
|
}
|
|
2496
2512
|
// ../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
|
|
2497
|
-
var
|
|
2513
|
+
var Io = Object.defineProperty, Lo = Object.getOwnPropertySymbols, Ro = Object.prototype.hasOwnProperty, zo = Object.prototype.propertyIsEnumerable, Bo = (e, t, n) => t in e ? Io(e, t, {
|
|
2498
2514
|
enumerable: !0,
|
|
2499
2515
|
configurable: !0,
|
|
2500
2516
|
writable: !0,
|
|
2501
2517
|
value: n
|
|
2502
|
-
}) : e[t] = n,
|
|
2503
|
-
for (var n in t ||= {})
|
|
2504
|
-
if (
|
|
2518
|
+
}) : e[t] = n, Vo = (e, t) => {
|
|
2519
|
+
for (var n in t ||= {}) Ro.call(t, n) && Bo(e, n, t[n]);
|
|
2520
|
+
if (Lo) for (var n of Lo(t)) zo.call(t, n) && Bo(e, n, t[n]);
|
|
2505
2521
|
return e;
|
|
2506
|
-
},
|
|
2522
|
+
}, Ho = (e, t) => {
|
|
2507
2523
|
var n = {};
|
|
2508
|
-
for (var r in e)
|
|
2509
|
-
if (e != null &&
|
|
2524
|
+
for (var r in e) Ro.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2525
|
+
if (e != null && Lo) for (var r of Lo(e)) t.indexOf(r) < 0 && zo.call(e, r) && (n[r] = e[r]);
|
|
2510
2526
|
return n;
|
|
2511
|
-
},
|
|
2512
|
-
function
|
|
2513
|
-
console.warn(
|
|
2527
|
+
}, Uo = "[vue-draggable-plus]: ";
|
|
2528
|
+
function Wo(e) {
|
|
2529
|
+
console.warn(Uo + e);
|
|
2514
2530
|
}
|
|
2515
|
-
function
|
|
2516
|
-
console.error(
|
|
2531
|
+
function Go(e) {
|
|
2532
|
+
console.error(Uo + e);
|
|
2517
2533
|
}
|
|
2518
|
-
function
|
|
2534
|
+
function Ko(e, t, n) {
|
|
2519
2535
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2520
2536
|
}
|
|
2521
|
-
function
|
|
2537
|
+
function qo(e) {
|
|
2522
2538
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2523
2539
|
}
|
|
2524
|
-
function
|
|
2525
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2540
|
+
function Jo(e) {
|
|
2541
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[qo(n)] = e[n]), t), {});
|
|
2526
2542
|
}
|
|
2527
|
-
function
|
|
2543
|
+
function Yo(e, t) {
|
|
2528
2544
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2529
2545
|
}
|
|
2530
|
-
function
|
|
2546
|
+
function Xo(e, t, n) {
|
|
2531
2547
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2532
2548
|
}
|
|
2533
|
-
function
|
|
2549
|
+
function Zo(e) {
|
|
2534
2550
|
return e === void 0;
|
|
2535
2551
|
}
|
|
2536
|
-
function
|
|
2552
|
+
function Qo(e) {
|
|
2537
2553
|
return typeof e == "string";
|
|
2538
2554
|
}
|
|
2539
|
-
function
|
|
2555
|
+
function $o(e, t, n) {
|
|
2540
2556
|
let r = e.children[n];
|
|
2541
2557
|
e.insertBefore(t, r);
|
|
2542
2558
|
}
|
|
2543
|
-
function
|
|
2559
|
+
function es(e) {
|
|
2544
2560
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2545
2561
|
}
|
|
2546
|
-
function
|
|
2562
|
+
function ts(e, t = document) {
|
|
2547
2563
|
let n = null;
|
|
2548
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2564
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Wo(`Element not found: ${e}`), n;
|
|
2549
2565
|
}
|
|
2550
|
-
function
|
|
2566
|
+
function ns(e, t, n = null) {
|
|
2551
2567
|
return function(...r) {
|
|
2552
2568
|
return e.apply(n, r), t.apply(n, r);
|
|
2553
2569
|
};
|
|
2554
2570
|
}
|
|
2555
|
-
function
|
|
2556
|
-
let n =
|
|
2571
|
+
function rs(e, t) {
|
|
2572
|
+
let n = Vo({}, e);
|
|
2557
2573
|
return Object.keys(t).forEach((r) => {
|
|
2558
|
-
n[r] ? n[r] =
|
|
2574
|
+
n[r] ? n[r] = ns(e[r], t[r]) : n[r] = t[r];
|
|
2559
2575
|
}), n;
|
|
2560
2576
|
}
|
|
2561
|
-
function
|
|
2577
|
+
function is(e) {
|
|
2562
2578
|
return e instanceof HTMLElement;
|
|
2563
2579
|
}
|
|
2564
|
-
function
|
|
2580
|
+
function as(e, t) {
|
|
2565
2581
|
Object.keys(e).forEach((n) => {
|
|
2566
2582
|
t(n, e[n]);
|
|
2567
2583
|
});
|
|
2568
2584
|
}
|
|
2569
|
-
function
|
|
2585
|
+
function os(e) {
|
|
2570
2586
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2571
2587
|
}
|
|
2572
|
-
var
|
|
2573
|
-
function
|
|
2588
|
+
var ss = Object.assign;
|
|
2589
|
+
function cs(e, t) {
|
|
2574
2590
|
var n = Object.keys(e);
|
|
2575
2591
|
if (Object.getOwnPropertySymbols) {
|
|
2576
2592
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2580,26 +2596,26 @@ function os(e, t) {
|
|
|
2580
2596
|
}
|
|
2581
2597
|
return n;
|
|
2582
2598
|
}
|
|
2583
|
-
function
|
|
2599
|
+
function ls(e) {
|
|
2584
2600
|
for (var t = 1; t < arguments.length; t++) {
|
|
2585
2601
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2586
|
-
t % 2 ?
|
|
2587
|
-
|
|
2588
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2602
|
+
t % 2 ? cs(Object(n), !0).forEach(function(t) {
|
|
2603
|
+
ds(e, t, n[t]);
|
|
2604
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : cs(Object(n)).forEach(function(t) {
|
|
2589
2605
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2590
2606
|
});
|
|
2591
2607
|
}
|
|
2592
2608
|
return e;
|
|
2593
2609
|
}
|
|
2594
|
-
function
|
|
2610
|
+
function us(e) {
|
|
2595
2611
|
"@babel/helpers - typeof";
|
|
2596
|
-
return
|
|
2612
|
+
return us = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2597
2613
|
return typeof e;
|
|
2598
2614
|
} : function(e) {
|
|
2599
2615
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2600
|
-
},
|
|
2616
|
+
}, us(e);
|
|
2601
2617
|
}
|
|
2602
|
-
function
|
|
2618
|
+
function ds(e, t, n) {
|
|
2603
2619
|
return t in e ? Object.defineProperty(e, t, {
|
|
2604
2620
|
value: n,
|
|
2605
2621
|
enumerable: !0,
|
|
@@ -2607,44 +2623,44 @@ function ls(e, t, n) {
|
|
|
2607
2623
|
writable: !0
|
|
2608
2624
|
}) : e[t] = n, e;
|
|
2609
2625
|
}
|
|
2610
|
-
function
|
|
2611
|
-
return
|
|
2626
|
+
function fs() {
|
|
2627
|
+
return fs = Object.assign || function(e) {
|
|
2612
2628
|
for (var t = 1; t < arguments.length; t++) {
|
|
2613
2629
|
var n = arguments[t];
|
|
2614
2630
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2615
2631
|
}
|
|
2616
2632
|
return e;
|
|
2617
|
-
},
|
|
2633
|
+
}, fs.apply(this, arguments);
|
|
2618
2634
|
}
|
|
2619
|
-
function
|
|
2635
|
+
function ps(e, t) {
|
|
2620
2636
|
if (e == null) return {};
|
|
2621
2637
|
for (var n = {}, r = Object.keys(e), i, a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2622
2638
|
return n;
|
|
2623
2639
|
}
|
|
2624
|
-
function
|
|
2640
|
+
function ms(e, t) {
|
|
2625
2641
|
if (e == null) return {};
|
|
2626
|
-
var n =
|
|
2642
|
+
var n = ps(e, t), r, i;
|
|
2627
2643
|
if (Object.getOwnPropertySymbols) {
|
|
2628
2644
|
var a = Object.getOwnPropertySymbols(e);
|
|
2629
2645
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2630
2646
|
}
|
|
2631
2647
|
return n;
|
|
2632
2648
|
}
|
|
2633
|
-
var
|
|
2634
|
-
function
|
|
2649
|
+
var hs = "1.15.2";
|
|
2650
|
+
function gs(e) {
|
|
2635
2651
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2636
2652
|
}
|
|
2637
|
-
var
|
|
2653
|
+
var _s = gs(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), vs = gs(/Edge/i), ys = gs(/firefox/i), bs = gs(/safari/i) && !gs(/chrome/i) && !gs(/android/i), xs = gs(/iP(ad|od|hone)/i), Ss = gs(/chrome/i) && gs(/android/i), Cs = {
|
|
2638
2654
|
capture: !1,
|
|
2639
2655
|
passive: !1
|
|
2640
2656
|
};
|
|
2641
2657
|
function V(e, t, n) {
|
|
2642
|
-
e.addEventListener(t, n, !
|
|
2658
|
+
e.addEventListener(t, n, !_s && Cs);
|
|
2643
2659
|
}
|
|
2644
2660
|
function H(e, t, n) {
|
|
2645
|
-
e.removeEventListener(t, n, !
|
|
2661
|
+
e.removeEventListener(t, n, !_s && Cs);
|
|
2646
2662
|
}
|
|
2647
|
-
function
|
|
2663
|
+
function ws(e, t) {
|
|
2648
2664
|
if (t) {
|
|
2649
2665
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2650
2666
|
if (e.matches) return e.matches(t);
|
|
@@ -2656,22 +2672,22 @@ function Ss(e, t) {
|
|
|
2656
2672
|
return !1;
|
|
2657
2673
|
}
|
|
2658
2674
|
}
|
|
2659
|
-
function
|
|
2675
|
+
function Ts(e) {
|
|
2660
2676
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2661
2677
|
}
|
|
2662
|
-
function
|
|
2678
|
+
function Es(e, t, n, r) {
|
|
2663
2679
|
if (e) {
|
|
2664
2680
|
n ||= document;
|
|
2665
2681
|
do {
|
|
2666
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2682
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && ws(e, t) : ws(e, t)) || r && e === n) return e;
|
|
2667
2683
|
if (e === n) break;
|
|
2668
|
-
} while (e =
|
|
2684
|
+
} while (e = Ts(e));
|
|
2669
2685
|
}
|
|
2670
2686
|
return null;
|
|
2671
2687
|
}
|
|
2672
|
-
var
|
|
2673
|
-
function
|
|
2674
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2688
|
+
var Ds = /\s+/g;
|
|
2689
|
+
function Os(e, t, n) {
|
|
2690
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Ds, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Ds, " "));
|
|
2675
2691
|
}
|
|
2676
2692
|
function U(e, t, n) {
|
|
2677
2693
|
var r = e && e.style;
|
|
@@ -2680,7 +2696,7 @@ function U(e, t, n) {
|
|
|
2680
2696
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2681
2697
|
}
|
|
2682
2698
|
}
|
|
2683
|
-
function
|
|
2699
|
+
function ks(e, t) {
|
|
2684
2700
|
var n = "";
|
|
2685
2701
|
if (typeof e == "string") n = e;
|
|
2686
2702
|
else do {
|
|
@@ -2690,7 +2706,7 @@ function Ds(e, t) {
|
|
|
2690
2706
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2691
2707
|
return i && new i(n);
|
|
2692
2708
|
}
|
|
2693
|
-
function
|
|
2709
|
+
function As(e, t, n) {
|
|
2694
2710
|
if (e) {
|
|
2695
2711
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2696
2712
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2698,13 +2714,13 @@ function Os(e, t, n) {
|
|
|
2698
2714
|
}
|
|
2699
2715
|
return [];
|
|
2700
2716
|
}
|
|
2701
|
-
function
|
|
2717
|
+
function js() {
|
|
2702
2718
|
return document.scrollingElement || document.documentElement;
|
|
2703
2719
|
}
|
|
2704
2720
|
function W(e, t, n, r, i) {
|
|
2705
2721
|
if (e.getBoundingClientRect || e === window) {
|
|
2706
2722
|
var a, o, s, c, l, u, d;
|
|
2707
|
-
if (e !== window && e.parentNode && e !==
|
|
2723
|
+
if (e !== window && e.parentNode && e !== js() ? (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, !_s)) do
|
|
2708
2724
|
if (i && i.getBoundingClientRect && (U(i, "transform") !== "none" || n && U(i, "position") !== "static")) {
|
|
2709
2725
|
var f = i.getBoundingClientRect();
|
|
2710
2726
|
o -= f.top + parseInt(U(i, "border-top-width")), s -= f.left + parseInt(U(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
@@ -2712,7 +2728,7 @@ function W(e, t, n, r, i) {
|
|
|
2712
2728
|
}
|
|
2713
2729
|
while (i = i.parentNode);
|
|
2714
2730
|
if (r && e !== window) {
|
|
2715
|
-
var p =
|
|
2731
|
+
var p = ks(i || e), m = p && p.a, h = p && p.d;
|
|
2716
2732
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2717
2733
|
}
|
|
2718
2734
|
return {
|
|
@@ -2725,18 +2741,18 @@ function W(e, t, n, r, i) {
|
|
|
2725
2741
|
};
|
|
2726
2742
|
}
|
|
2727
2743
|
}
|
|
2728
|
-
function
|
|
2729
|
-
for (var r =
|
|
2744
|
+
function Ms(e, t, n) {
|
|
2745
|
+
for (var r = Rs(e, !0), i = W(e)[t]; r;) {
|
|
2730
2746
|
var a = W(r)[n], o = void 0;
|
|
2731
2747
|
if (o = i >= a, !o) return r;
|
|
2732
|
-
if (r ===
|
|
2733
|
-
r =
|
|
2748
|
+
if (r === js()) break;
|
|
2749
|
+
r = Rs(r, !1);
|
|
2734
2750
|
}
|
|
2735
2751
|
return !1;
|
|
2736
2752
|
}
|
|
2737
|
-
function
|
|
2753
|
+
function Ns(e, t, n, r) {
|
|
2738
2754
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2739
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2755
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Es(o[a], n.draggable, e, !1)) {
|
|
2740
2756
|
if (i === t) return o[a];
|
|
2741
2757
|
i++;
|
|
2742
2758
|
}
|
|
@@ -2744,84 +2760,84 @@ function js(e, t, n, r) {
|
|
|
2744
2760
|
}
|
|
2745
2761
|
return null;
|
|
2746
2762
|
}
|
|
2747
|
-
function
|
|
2748
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || U(n, "display") === "none" || t && !
|
|
2763
|
+
function Ps(e, t) {
|
|
2764
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || U(n, "display") === "none" || t && !ws(n, t));) n = n.previousElementSibling;
|
|
2749
2765
|
return n || null;
|
|
2750
2766
|
}
|
|
2751
|
-
function
|
|
2767
|
+
function Fs(e, t) {
|
|
2752
2768
|
var n = 0;
|
|
2753
2769
|
if (!e || !e.parentNode) return -1;
|
|
2754
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2770
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || ws(e, t)) && n++;
|
|
2755
2771
|
return n;
|
|
2756
2772
|
}
|
|
2757
|
-
function
|
|
2758
|
-
var t = 0, n = 0, r =
|
|
2773
|
+
function Is(e) {
|
|
2774
|
+
var t = 0, n = 0, r = js();
|
|
2759
2775
|
if (e) do {
|
|
2760
|
-
var i =
|
|
2776
|
+
var i = ks(e), a = i.a, o = i.d;
|
|
2761
2777
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2762
2778
|
} while (e !== r && (e = e.parentNode));
|
|
2763
2779
|
return [t, n];
|
|
2764
2780
|
}
|
|
2765
|
-
function
|
|
2781
|
+
function Ls(e, t) {
|
|
2766
2782
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2767
2783
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2768
2784
|
}
|
|
2769
2785
|
return -1;
|
|
2770
2786
|
}
|
|
2771
|
-
function
|
|
2772
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2787
|
+
function Rs(e, t) {
|
|
2788
|
+
if (!e || !e.getBoundingClientRect) return js();
|
|
2773
2789
|
var n = e, r = !1;
|
|
2774
2790
|
do
|
|
2775
2791
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2776
2792
|
var i = U(n);
|
|
2777
2793
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2778
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2794
|
+
if (!n.getBoundingClientRect || n === document.body) return js();
|
|
2779
2795
|
if (r || t) return n;
|
|
2780
2796
|
r = !0;
|
|
2781
2797
|
}
|
|
2782
2798
|
}
|
|
2783
2799
|
while (n = n.parentNode);
|
|
2784
|
-
return
|
|
2800
|
+
return js();
|
|
2785
2801
|
}
|
|
2786
|
-
function
|
|
2802
|
+
function zs(e, t) {
|
|
2787
2803
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2788
2804
|
return e;
|
|
2789
2805
|
}
|
|
2790
|
-
function
|
|
2806
|
+
function Bs(e, t) {
|
|
2791
2807
|
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);
|
|
2792
2808
|
}
|
|
2793
|
-
var
|
|
2794
|
-
function
|
|
2809
|
+
var Vs;
|
|
2810
|
+
function Hs(e, t) {
|
|
2795
2811
|
return function() {
|
|
2796
|
-
if (!
|
|
2812
|
+
if (!Vs) {
|
|
2797
2813
|
var n = arguments, r = this;
|
|
2798
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2799
|
-
|
|
2814
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Vs = setTimeout(function() {
|
|
2815
|
+
Vs = void 0;
|
|
2800
2816
|
}, t);
|
|
2801
2817
|
}
|
|
2802
2818
|
};
|
|
2803
2819
|
}
|
|
2804
|
-
function
|
|
2805
|
-
clearTimeout(
|
|
2820
|
+
function Us() {
|
|
2821
|
+
clearTimeout(Vs), Vs = void 0;
|
|
2806
2822
|
}
|
|
2807
|
-
function
|
|
2823
|
+
function Ws(e, t, n) {
|
|
2808
2824
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2809
2825
|
}
|
|
2810
|
-
function
|
|
2826
|
+
function Gs(e) {
|
|
2811
2827
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2812
2828
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2813
2829
|
}
|
|
2814
|
-
function
|
|
2830
|
+
function Ks(e, t, n) {
|
|
2815
2831
|
var r = {};
|
|
2816
2832
|
return Array.from(e.children).forEach(function(i) {
|
|
2817
|
-
if (
|
|
2833
|
+
if (Es(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
2818
2834
|
var a = W(i);
|
|
2819
2835
|
r.left = Math.min(r.left ?? 1 / 0, a.left), r.top = Math.min(r.top ?? 1 / 0, a.top), r.right = Math.max(r.right ?? -1 / 0, a.right), r.bottom = Math.max(r.bottom ?? -1 / 0, a.bottom);
|
|
2820
2836
|
}
|
|
2821
2837
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2822
2838
|
}
|
|
2823
|
-
var
|
|
2824
|
-
function
|
|
2839
|
+
var qs = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2840
|
+
function Js() {
|
|
2825
2841
|
var e = [], t;
|
|
2826
2842
|
return {
|
|
2827
2843
|
captureAnimationState: function() {
|
|
@@ -2831,9 +2847,9 @@ function Ks() {
|
|
|
2831
2847
|
target: t,
|
|
2832
2848
|
rect: W(t)
|
|
2833
2849
|
});
|
|
2834
|
-
var n =
|
|
2850
|
+
var n = ls({}, e[e.length - 1].rect);
|
|
2835
2851
|
if (t.thisAnimationDuration) {
|
|
2836
|
-
var r =
|
|
2852
|
+
var r = ks(t, !0);
|
|
2837
2853
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2838
2854
|
}
|
|
2839
2855
|
t.fromRect = n;
|
|
@@ -2844,7 +2860,7 @@ function Ks() {
|
|
|
2844
2860
|
e.push(t);
|
|
2845
2861
|
},
|
|
2846
2862
|
removeAnimationState: function(t) {
|
|
2847
|
-
e.splice(
|
|
2863
|
+
e.splice(Ls(e, { target: t }), 1);
|
|
2848
2864
|
},
|
|
2849
2865
|
animateAll: function(n) {
|
|
2850
2866
|
var r = this;
|
|
@@ -2852,8 +2868,8 @@ function Ks() {
|
|
|
2852
2868
|
else {
|
|
2853
2869
|
var i = !1, a = 0;
|
|
2854
2870
|
e.forEach(function(e) {
|
|
2855
|
-
var t = 0, n = e.target, o = n.fromRect, s = W(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2856
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2871
|
+
var t = 0, n = e.target, o = n.fromRect, s = W(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = ks(n, !0);
|
|
2872
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Bs(c, s) && !Bs(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Xs(u, c, l, r.options)), Bs(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() {
|
|
2857
2873
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2858
2874
|
}, t), n.thisAnimationDuration = t);
|
|
2859
2875
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2864,26 +2880,26 @@ function Ks() {
|
|
|
2864
2880
|
animate: function(e, t, n, r) {
|
|
2865
2881
|
if (r) {
|
|
2866
2882
|
U(e, "transition", ""), U(e, "transform", "");
|
|
2867
|
-
var i =
|
|
2868
|
-
e.animatingX = !!s, e.animatingY = !!c, U(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
2883
|
+
var i = ks(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2884
|
+
e.animatingX = !!s, e.animatingY = !!c, U(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Ys(e), U(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), U(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2869
2885
|
U(e, "transition", ""), U(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2870
2886
|
}, r);
|
|
2871
2887
|
}
|
|
2872
2888
|
}
|
|
2873
2889
|
};
|
|
2874
2890
|
}
|
|
2875
|
-
function
|
|
2891
|
+
function Ys(e) {
|
|
2876
2892
|
return e.offsetWidth;
|
|
2877
2893
|
}
|
|
2878
|
-
function
|
|
2894
|
+
function Xs(e, t, n, r) {
|
|
2879
2895
|
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;
|
|
2880
2896
|
}
|
|
2881
|
-
var
|
|
2897
|
+
var Zs = [], Qs = { initializeByDefault: !0 }, $s = {
|
|
2882
2898
|
mount: function(e) {
|
|
2883
|
-
for (var t in
|
|
2884
|
-
|
|
2899
|
+
for (var t in Qs) Qs.hasOwnProperty(t) && !(t in e) && (e[t] = Qs[t]);
|
|
2900
|
+
Zs.forEach(function(t) {
|
|
2885
2901
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2886
|
-
}),
|
|
2902
|
+
}), Zs.push(e);
|
|
2887
2903
|
},
|
|
2888
2904
|
pluginEvent: function(e, t, n) {
|
|
2889
2905
|
var r = this;
|
|
@@ -2891,16 +2907,16 @@ var Ys = [], Xs = { initializeByDefault: !0 }, Zs = {
|
|
|
2891
2907
|
r.eventCanceled = !0;
|
|
2892
2908
|
};
|
|
2893
2909
|
var i = e + "Global";
|
|
2894
|
-
|
|
2895
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2910
|
+
Zs.forEach(function(r) {
|
|
2911
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](ls({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](ls({ sortable: t }, n)));
|
|
2896
2912
|
});
|
|
2897
2913
|
},
|
|
2898
2914
|
initializePlugins: function(e, t, n, r) {
|
|
2899
|
-
for (var i in
|
|
2915
|
+
for (var i in Zs.forEach(function(r) {
|
|
2900
2916
|
var i = r.pluginName;
|
|
2901
2917
|
if (e.options[i] || r.initializeByDefault) {
|
|
2902
2918
|
var a = new r(e, t, e.options);
|
|
2903
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2919
|
+
a.sortable = e, a.options = e.options, e[i] = a, fs(n, a.defaults);
|
|
2904
2920
|
}
|
|
2905
2921
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2906
2922
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2909,59 +2925,59 @@ var Ys = [], Xs = { initializeByDefault: !0 }, Zs = {
|
|
|
2909
2925
|
},
|
|
2910
2926
|
getEventProperties: function(e, t) {
|
|
2911
2927
|
var n = {};
|
|
2912
|
-
return
|
|
2913
|
-
typeof r.eventProperties == "function" &&
|
|
2928
|
+
return Zs.forEach(function(r) {
|
|
2929
|
+
typeof r.eventProperties == "function" && fs(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2914
2930
|
}), n;
|
|
2915
2931
|
},
|
|
2916
2932
|
modifyOption: function(e, t, n) {
|
|
2917
2933
|
var r;
|
|
2918
|
-
return
|
|
2934
|
+
return Zs.forEach(function(i) {
|
|
2919
2935
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2920
2936
|
}), r;
|
|
2921
2937
|
}
|
|
2922
2938
|
};
|
|
2923
|
-
function
|
|
2939
|
+
function ec(e) {
|
|
2924
2940
|
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;
|
|
2925
|
-
if (t ||= n && n[
|
|
2941
|
+
if (t ||= n && n[qs], t) {
|
|
2926
2942
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2927
|
-
window.CustomEvent && !
|
|
2943
|
+
window.CustomEvent && !_s && !vs ? h = new CustomEvent(r, {
|
|
2928
2944
|
bubbles: !0,
|
|
2929
2945
|
cancelable: !0
|
|
2930
2946
|
}) : (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;
|
|
2931
|
-
var v =
|
|
2947
|
+
var v = ls(ls({}, m), $s.getEventProperties(r, t));
|
|
2932
2948
|
for (var y in v) h[y] = v[y];
|
|
2933
2949
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2934
2950
|
}
|
|
2935
2951
|
}
|
|
2936
|
-
var
|
|
2937
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2938
|
-
|
|
2952
|
+
var tc = ["evt"], nc = function(e, t) {
|
|
2953
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = ms(n, tc);
|
|
2954
|
+
$s.pluginEvent.bind(Q)(e, t, ls({
|
|
2939
2955
|
dragEl: G,
|
|
2940
2956
|
parentEl: K,
|
|
2941
2957
|
ghostEl: q,
|
|
2942
2958
|
rootEl: J,
|
|
2943
|
-
nextEl:
|
|
2944
|
-
lastDownEl:
|
|
2959
|
+
nextEl: ic,
|
|
2960
|
+
lastDownEl: ac,
|
|
2945
2961
|
cloneEl: Y,
|
|
2946
|
-
cloneHidden:
|
|
2947
|
-
dragStarted:
|
|
2962
|
+
cloneHidden: oc,
|
|
2963
|
+
dragStarted: xc,
|
|
2948
2964
|
putSortable: X,
|
|
2949
2965
|
activeSortable: Q.active,
|
|
2950
2966
|
originalEvent: r,
|
|
2951
|
-
oldIndex:
|
|
2952
|
-
oldDraggableIndex:
|
|
2953
|
-
newIndex:
|
|
2954
|
-
newDraggableIndex:
|
|
2955
|
-
hideGhostForTarget:
|
|
2956
|
-
unhideGhostForTarget:
|
|
2967
|
+
oldIndex: sc,
|
|
2968
|
+
oldDraggableIndex: lc,
|
|
2969
|
+
newIndex: cc,
|
|
2970
|
+
newDraggableIndex: uc,
|
|
2971
|
+
hideGhostForTarget: zc,
|
|
2972
|
+
unhideGhostForTarget: Bc,
|
|
2957
2973
|
cloneNowHidden: function() {
|
|
2958
|
-
|
|
2974
|
+
oc = !0;
|
|
2959
2975
|
},
|
|
2960
2976
|
cloneNowShown: function() {
|
|
2961
|
-
|
|
2977
|
+
oc = !1;
|
|
2962
2978
|
},
|
|
2963
2979
|
dispatchSortableEvent: function(e) {
|
|
2964
|
-
|
|
2980
|
+
rc({
|
|
2965
2981
|
sortable: t,
|
|
2966
2982
|
name: e,
|
|
2967
2983
|
originalEvent: r
|
|
@@ -2969,46 +2985,46 @@ var $s = ["evt"], ec = function(e, t) {
|
|
|
2969
2985
|
}
|
|
2970
2986
|
}, i));
|
|
2971
2987
|
};
|
|
2972
|
-
function
|
|
2973
|
-
|
|
2988
|
+
function rc(e) {
|
|
2989
|
+
ec(ls({
|
|
2974
2990
|
putSortable: X,
|
|
2975
2991
|
cloneEl: Y,
|
|
2976
2992
|
targetEl: G,
|
|
2977
2993
|
rootEl: J,
|
|
2978
|
-
oldIndex:
|
|
2979
|
-
oldDraggableIndex:
|
|
2980
|
-
newIndex:
|
|
2981
|
-
newDraggableIndex:
|
|
2994
|
+
oldIndex: sc,
|
|
2995
|
+
oldDraggableIndex: lc,
|
|
2996
|
+
newIndex: cc,
|
|
2997
|
+
newDraggableIndex: uc
|
|
2982
2998
|
}, e));
|
|
2983
2999
|
}
|
|
2984
|
-
var G, K, q, J,
|
|
2985
|
-
if (
|
|
2986
|
-
if (
|
|
3000
|
+
var G, K, q, J, ic, ac, Y, oc, sc, cc, lc, uc, dc, X, fc = !1, pc = !1, mc = [], hc, gc, _c, vc, yc, bc, xc, Sc, Cc, wc = !1, Tc = !1, Ec, Z, Dc = [], Oc = !1, kc = [], Ac = typeof document < "u", jc = xs, Mc = vs || _s ? "cssFloat" : "float", Nc = Ac && !Ss && !xs && "draggable" in document.createElement("div"), Pc = function() {
|
|
3001
|
+
if (Ac) {
|
|
3002
|
+
if (_s) return !1;
|
|
2987
3003
|
var e = document.createElement("x");
|
|
2988
3004
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2989
3005
|
}
|
|
2990
|
-
}(),
|
|
2991
|
-
var n = U(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
3006
|
+
}(), Fc = function(e, t) {
|
|
3007
|
+
var n = U(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Ns(e, 0, t), a = Ns(e, 1, t), o = i && U(i), s = a && U(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + W(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + W(a).width;
|
|
2992
3008
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2993
3009
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2994
3010
|
if (i && o.float && o.float !== "none") {
|
|
2995
3011
|
var u = o.float === "left" ? "left" : "right";
|
|
2996
3012
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2997
3013
|
}
|
|
2998
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2999
|
-
},
|
|
3014
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Mc] === "none" || a && n[Mc] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
3015
|
+
}, Ic = function(e, t, n) {
|
|
3000
3016
|
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;
|
|
3001
3017
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
3002
|
-
},
|
|
3018
|
+
}, Lc = function(e, t) {
|
|
3003
3019
|
var n;
|
|
3004
|
-
return
|
|
3005
|
-
var i = r[
|
|
3006
|
-
if (i && !
|
|
3020
|
+
return mc.some(function(r) {
|
|
3021
|
+
var i = r[qs].options.emptyInsertThreshold;
|
|
3022
|
+
if (i && !Ps(r)) {
|
|
3007
3023
|
var a = W(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
3008
3024
|
if (o && s) return n = r;
|
|
3009
3025
|
}
|
|
3010
3026
|
}), n;
|
|
3011
|
-
},
|
|
3027
|
+
}, Rc = function(e) {
|
|
3012
3028
|
function t(e, n) {
|
|
3013
3029
|
return function(r, i, a, o) {
|
|
3014
3030
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -3021,31 +3037,31 @@ var G, K, q, J, nc, rc, Y, ic, ac, oc, sc, cc, lc, X, uc = !1, dc = !1, fc = [],
|
|
|
3021
3037
|
};
|
|
3022
3038
|
}
|
|
3023
3039
|
var n = {}, r = e.group;
|
|
3024
|
-
r &&
|
|
3025
|
-
},
|
|
3026
|
-
!
|
|
3027
|
-
},
|
|
3028
|
-
!
|
|
3040
|
+
r && us(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;
|
|
3041
|
+
}, zc = function() {
|
|
3042
|
+
!Pc && q && U(q, "display", "none");
|
|
3043
|
+
}, Bc = function() {
|
|
3044
|
+
!Pc && q && U(q, "display", "");
|
|
3029
3045
|
};
|
|
3030
|
-
|
|
3031
|
-
if (
|
|
3046
|
+
Ac && !Ss && document.addEventListener("click", function(e) {
|
|
3047
|
+
if (pc) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), pc = !1, !1;
|
|
3032
3048
|
}, !0);
|
|
3033
|
-
var
|
|
3049
|
+
var Vc = function(e) {
|
|
3034
3050
|
if (G) {
|
|
3035
3051
|
e = e.touches ? e.touches[0] : e;
|
|
3036
|
-
var t =
|
|
3052
|
+
var t = Lc(e.clientX, e.clientY);
|
|
3037
3053
|
if (t) {
|
|
3038
3054
|
var n = {};
|
|
3039
3055
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
3040
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
3056
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[qs]._onDragOver(n);
|
|
3041
3057
|
}
|
|
3042
3058
|
}
|
|
3043
|
-
},
|
|
3044
|
-
G && G.parentNode[
|
|
3059
|
+
}, Hc = function(e) {
|
|
3060
|
+
G && G.parentNode[qs]._isOutsideThisEl(e.target);
|
|
3045
3061
|
};
|
|
3046
3062
|
function Q(e, t) {
|
|
3047
3063
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
3048
|
-
this.el = e, this.options = t =
|
|
3064
|
+
this.el = e, this.options = t = fs({}, t), e[qs] = this;
|
|
3049
3065
|
var n = {
|
|
3050
3066
|
group: null,
|
|
3051
3067
|
sort: !0,
|
|
@@ -3058,7 +3074,7 @@ function Q(e, t) {
|
|
|
3058
3074
|
invertedSwapThreshold: null,
|
|
3059
3075
|
removeCloneOnHide: !0,
|
|
3060
3076
|
direction: function() {
|
|
3061
|
-
return
|
|
3077
|
+
return Fc(e, this.options);
|
|
3062
3078
|
},
|
|
3063
3079
|
ghostClass: "sortable-ghost",
|
|
3064
3080
|
chosenClass: "sortable-chosen",
|
|
@@ -3085,17 +3101,17 @@ function Q(e, t) {
|
|
|
3085
3101
|
x: 0,
|
|
3086
3102
|
y: 0
|
|
3087
3103
|
},
|
|
3088
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
3104
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !bs,
|
|
3089
3105
|
emptyInsertThreshold: 5
|
|
3090
3106
|
};
|
|
3091
|
-
for (var r in
|
|
3092
|
-
for (var i in
|
|
3093
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
3107
|
+
for (var r in $s.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
3108
|
+
for (var i in Rc(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
3109
|
+
this.nativeDraggable = !t.forceFallback && Nc, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? V(e, "pointerdown", this._onTapStart) : (V(e, "mousedown", this._onTapStart), V(e, "touchstart", this._onTapStart)), this.nativeDraggable && (V(e, "dragover", this), V(e, "dragenter", this)), mc.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), fs(this, Js());
|
|
3094
3110
|
}
|
|
3095
3111
|
Q.prototype = {
|
|
3096
3112
|
constructor: Q,
|
|
3097
3113
|
_isOutsideThisEl: function(e) {
|
|
3098
|
-
!this.el.contains(e) && e !== this.el && (
|
|
3114
|
+
!this.el.contains(e) && e !== this.el && (Sc = null);
|
|
3099
3115
|
},
|
|
3100
3116
|
_getDirection: function(e, t) {
|
|
3101
3117
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, G) : this.options.direction;
|
|
@@ -3103,33 +3119,33 @@ Q.prototype = {
|
|
|
3103
3119
|
_onTapStart: function(e) {
|
|
3104
3120
|
if (e.cancelable) {
|
|
3105
3121
|
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;
|
|
3106
|
-
if (
|
|
3107
|
-
if (
|
|
3122
|
+
if (Qc(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && bs && s && s.tagName.toUpperCase() === "SELECT") && (s = Es(s, r.draggable, n, !1), !(s && s.animated) && ac !== s)) {
|
|
3123
|
+
if (sc = Fs(s), lc = Fs(s, r.draggable), typeof l == "function") {
|
|
3108
3124
|
if (l.call(this, e, s, this)) {
|
|
3109
|
-
|
|
3125
|
+
rc({
|
|
3110
3126
|
sortable: t,
|
|
3111
3127
|
rootEl: c,
|
|
3112
3128
|
name: "filter",
|
|
3113
3129
|
targetEl: s,
|
|
3114
3130
|
toEl: n,
|
|
3115
3131
|
fromEl: n
|
|
3116
|
-
}),
|
|
3132
|
+
}), nc("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
3117
3133
|
return;
|
|
3118
3134
|
}
|
|
3119
3135
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
3120
|
-
if (r =
|
|
3136
|
+
if (r = Es(c, r.trim(), n, !1), r) return rc({
|
|
3121
3137
|
sortable: t,
|
|
3122
3138
|
rootEl: r,
|
|
3123
3139
|
name: "filter",
|
|
3124
3140
|
targetEl: s,
|
|
3125
3141
|
fromEl: n,
|
|
3126
3142
|
toEl: n
|
|
3127
|
-
}),
|
|
3143
|
+
}), nc("filter", t, { evt: e }), !0;
|
|
3128
3144
|
}), l)) {
|
|
3129
3145
|
i && e.cancelable && e.preventDefault();
|
|
3130
3146
|
return;
|
|
3131
3147
|
}
|
|
3132
|
-
r.handle && !
|
|
3148
|
+
r.handle && !Es(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
3133
3149
|
}
|
|
3134
3150
|
}
|
|
3135
3151
|
},
|
|
@@ -3137,19 +3153,19 @@ Q.prototype = {
|
|
|
3137
3153
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
3138
3154
|
if (n && !G && n.parentNode === i) {
|
|
3139
3155
|
var c = W(n);
|
|
3140
|
-
if (J = i, G = n, K = G.parentNode,
|
|
3156
|
+
if (J = i, G = n, K = G.parentNode, ic = G.nextSibling, ac = n, dc = a.group, Q.dragged = G, hc = {
|
|
3141
3157
|
target: G,
|
|
3142
3158
|
clientX: (t || e).clientX,
|
|
3143
3159
|
clientY: (t || e).clientY
|
|
3144
|
-
},
|
|
3145
|
-
|
|
3160
|
+
}, yc = hc.clientX - c.left, bc = hc.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
|
|
3161
|
+
nc("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !ys && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), rc({
|
|
3146
3162
|
sortable: r,
|
|
3147
3163
|
name: "choose",
|
|
3148
3164
|
originalEvent: e
|
|
3149
|
-
}),
|
|
3165
|
+
}), Os(G, a.chosenClass, !0));
|
|
3150
3166
|
}, a.ignore.split(",").forEach(function(e) {
|
|
3151
|
-
|
|
3152
|
-
}), V(o, "dragover",
|
|
3167
|
+
As(G, e.trim(), Gc);
|
|
3168
|
+
}), V(o, "dragover", Vc), V(o, "mousemove", Vc), V(o, "touchmove", Vc), V(o, "mouseup", r._onDrop), V(o, "touchend", r._onDrop), V(o, "touchcancel", r._onDrop), ys && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), nc("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(vs || _s))) {
|
|
3153
3169
|
if (Q.eventCanceled) {
|
|
3154
3170
|
this._onDrop();
|
|
3155
3171
|
return;
|
|
@@ -3163,7 +3179,7 @@ Q.prototype = {
|
|
|
3163
3179
|
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();
|
|
3164
3180
|
},
|
|
3165
3181
|
_disableDelayedDrag: function() {
|
|
3166
|
-
G &&
|
|
3182
|
+
G && Gc(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3167
3183
|
},
|
|
3168
3184
|
_disableDelayedDragEvents: function() {
|
|
3169
3185
|
var e = this.el.ownerDocument;
|
|
@@ -3172,16 +3188,16 @@ Q.prototype = {
|
|
|
3172
3188
|
_triggerDragStart: function(e, t) {
|
|
3173
3189
|
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? V(document, "pointermove", this._onTouchMove) : t ? V(document, "touchmove", this._onTouchMove) : V(document, "mousemove", this._onTouchMove) : (V(G, "dragend", this), V(J, "dragstart", this._onDragStart));
|
|
3174
3190
|
try {
|
|
3175
|
-
document.selection ?
|
|
3191
|
+
document.selection ? $c(function() {
|
|
3176
3192
|
document.selection.empty();
|
|
3177
3193
|
}) : window.getSelection().removeAllRanges();
|
|
3178
3194
|
} catch {}
|
|
3179
3195
|
},
|
|
3180
3196
|
_dragStarted: function(e, t) {
|
|
3181
|
-
if (
|
|
3182
|
-
|
|
3197
|
+
if (fc = !1, J && G) {
|
|
3198
|
+
nc("dragStarted", this, { evt: t }), this.nativeDraggable && V(document, "dragover", Hc);
|
|
3183
3199
|
var n = this.options;
|
|
3184
|
-
!e &&
|
|
3200
|
+
!e && Os(G, n.dragClass, !1), Os(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), rc({
|
|
3185
3201
|
sortable: this,
|
|
3186
3202
|
name: "start",
|
|
3187
3203
|
originalEvent: t
|
|
@@ -3189,33 +3205,33 @@ Q.prototype = {
|
|
|
3189
3205
|
} else this._nulling();
|
|
3190
3206
|
},
|
|
3191
3207
|
_emulateDragOver: function() {
|
|
3192
|
-
if (
|
|
3193
|
-
this._lastX =
|
|
3194
|
-
for (var e = document.elementFromPoint(
|
|
3195
|
-
if (G.parentNode[
|
|
3196
|
-
if (t[
|
|
3208
|
+
if (gc) {
|
|
3209
|
+
this._lastX = gc.clientX, this._lastY = gc.clientY, zc();
|
|
3210
|
+
for (var e = document.elementFromPoint(gc.clientX, gc.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(gc.clientX, gc.clientY), e !== t);) t = e;
|
|
3211
|
+
if (G.parentNode[qs]._isOutsideThisEl(e), t) do {
|
|
3212
|
+
if (t[qs]) {
|
|
3197
3213
|
var n = void 0;
|
|
3198
|
-
if (n = t[
|
|
3199
|
-
clientX:
|
|
3200
|
-
clientY:
|
|
3214
|
+
if (n = t[qs]._onDragOver({
|
|
3215
|
+
clientX: gc.clientX,
|
|
3216
|
+
clientY: gc.clientY,
|
|
3201
3217
|
target: e,
|
|
3202
3218
|
rootEl: t
|
|
3203
3219
|
}), n && !this.options.dragoverBubble) break;
|
|
3204
3220
|
}
|
|
3205
3221
|
e = t;
|
|
3206
3222
|
} while (t = t.parentNode);
|
|
3207
|
-
|
|
3223
|
+
Bc();
|
|
3208
3224
|
}
|
|
3209
3225
|
},
|
|
3210
3226
|
_onTouchMove: function(e) {
|
|
3211
|
-
if (
|
|
3212
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q &&
|
|
3213
|
-
if (!Q.active && !
|
|
3227
|
+
if (hc) {
|
|
3228
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && ks(q, !0), o = q && a && a.a, s = q && a && a.d, c = jc && Z && Is(Z), l = (i.clientX - hc.clientX + r.x) / (o || 1) + (c ? c[0] - Dc[0] : 0) / (o || 1), u = (i.clientY - hc.clientY + r.y) / (s || 1) + (c ? c[1] - Dc[1] : 0) / (s || 1);
|
|
3229
|
+
if (!Q.active && !fc) {
|
|
3214
3230
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3215
3231
|
this._onDragStart(e, !0);
|
|
3216
3232
|
}
|
|
3217
3233
|
if (q) {
|
|
3218
|
-
a ? (a.e += l - (
|
|
3234
|
+
a ? (a.e += l - (_c || 0), a.f += u - (vc || 0)) : a = {
|
|
3219
3235
|
a: 1,
|
|
3220
3236
|
b: 0,
|
|
3221
3237
|
c: 0,
|
|
@@ -3224,35 +3240,35 @@ Q.prototype = {
|
|
|
3224
3240
|
f: u
|
|
3225
3241
|
};
|
|
3226
3242
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3227
|
-
U(q, "webkitTransform", d), U(q, "mozTransform", d), U(q, "msTransform", d), U(q, "transform", d),
|
|
3243
|
+
U(q, "webkitTransform", d), U(q, "mozTransform", d), U(q, "msTransform", d), U(q, "transform", d), _c = l, vc = u, gc = i;
|
|
3228
3244
|
}
|
|
3229
3245
|
e.cancelable && e.preventDefault();
|
|
3230
3246
|
}
|
|
3231
3247
|
},
|
|
3232
3248
|
_appendGhost: function() {
|
|
3233
3249
|
if (!q) {
|
|
3234
|
-
var e = this.options.fallbackOnBody ? document.body : J, t = W(G, !0,
|
|
3235
|
-
if (
|
|
3250
|
+
var e = this.options.fallbackOnBody ? document.body : J, t = W(G, !0, jc, !0, e), n = this.options;
|
|
3251
|
+
if (jc) {
|
|
3236
3252
|
for (Z = e; U(Z, "position") === "static" && U(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
3237
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
3253
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = js()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = js(), Dc = Is(Z);
|
|
3238
3254
|
}
|
|
3239
|
-
q = G.cloneNode(!0),
|
|
3255
|
+
q = G.cloneNode(!0), Os(q, n.ghostClass, !1), Os(q, n.fallbackClass, !0), Os(q, n.dragClass, !0), U(q, "transition", ""), U(q, "transform", ""), U(q, "box-sizing", "border-box"), U(q, "margin", 0), U(q, "top", t.top), U(q, "left", t.left), U(q, "width", t.width), U(q, "height", t.height), U(q, "opacity", "0.8"), U(q, "position", jc ? "absolute" : "fixed"), U(q, "zIndex", "100000"), U(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), U(q, "transform-origin", yc / parseInt(q.style.width) * 100 + "% " + bc / parseInt(q.style.height) * 100 + "%");
|
|
3240
3256
|
}
|
|
3241
3257
|
},
|
|
3242
3258
|
_onDragStart: function(e, t) {
|
|
3243
3259
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
3244
|
-
|
|
3245
|
-
|
|
3260
|
+
nc("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (nc("setupClone", this), Q.eventCanceled || (Y = Gs(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), Os(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = $c(function() {
|
|
3261
|
+
nc("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || J.insertBefore(Y, G), n._hideClone(), rc({
|
|
3246
3262
|
sortable: n,
|
|
3247
3263
|
name: "clone"
|
|
3248
3264
|
}));
|
|
3249
|
-
}), !t &&
|
|
3265
|
+
}), !t && Os(G, i.dragClass, !0), t ? (pc = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (H(document, "mouseup", n._onDrop), H(document, "touchend", n._onDrop), H(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, G)), V(document, "drop", n), U(G, "transform", "translateZ(0)")), fc = !0, n._dragStartId = $c(n._dragStarted.bind(n, t, e)), V(document, "selectstart", n), xc = !0, bs && U(document.body, "user-select", "none"));
|
|
3250
3266
|
},
|
|
3251
3267
|
_onDragOver: function(e) {
|
|
3252
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3253
|
-
if (
|
|
3268
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = dc === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
3269
|
+
if (Oc) return;
|
|
3254
3270
|
function h(o, s) {
|
|
3255
|
-
|
|
3271
|
+
nc(o, p, ls({
|
|
3256
3272
|
evt: e,
|
|
3257
3273
|
isOwner: l,
|
|
3258
3274
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3264,7 +3280,7 @@ Q.prototype = {
|
|
|
3264
3280
|
target: n,
|
|
3265
3281
|
completed: _,
|
|
3266
3282
|
onMove: function(n, i) {
|
|
3267
|
-
return
|
|
3283
|
+
return Wc(J, t, G, r, n, W(n), e, i);
|
|
3268
3284
|
},
|
|
3269
3285
|
changed: v
|
|
3270
3286
|
}, s));
|
|
@@ -3273,50 +3289,50 @@ Q.prototype = {
|
|
|
3273
3289
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
3274
3290
|
}
|
|
3275
3291
|
function _(r) {
|
|
3276
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
3292
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (Os(G, X ? X.options.ghostClass : c.options.ghostClass, !1), Os(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() {
|
|
3277
3293
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3278
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (
|
|
3294
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (Sc = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[qs]._isOutsideThisEl(e.target), !r && Vc(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3279
3295
|
}
|
|
3280
3296
|
function v() {
|
|
3281
|
-
|
|
3297
|
+
cc = Fs(G), uc = Fs(G, o.draggable), rc({
|
|
3282
3298
|
sortable: p,
|
|
3283
3299
|
name: "change",
|
|
3284
3300
|
toEl: t,
|
|
3285
|
-
newIndex:
|
|
3286
|
-
newDraggableIndex:
|
|
3301
|
+
newIndex: cc,
|
|
3302
|
+
newDraggableIndex: uc,
|
|
3287
3303
|
originalEvent: e
|
|
3288
3304
|
});
|
|
3289
3305
|
}
|
|
3290
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3306
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Es(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3291
3307
|
if (G.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3292
|
-
if (
|
|
3308
|
+
if (pc = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = dc.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
|
|
3293
3309
|
if (f = this._getDirection(e, n) === "vertical", r = W(G), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3294
|
-
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
3295
|
-
var y =
|
|
3296
|
-
if (!y ||
|
|
3310
|
+
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (ic ? J.insertBefore(G, ic) : J.appendChild(G)), _(!0);
|
|
3311
|
+
var y = Ps(t, o.draggable);
|
|
3312
|
+
if (!y || Jc(e, f, this) && !y.animated) {
|
|
3297
3313
|
if (y === G) return _(!1);
|
|
3298
|
-
if (y && t === e.target && (n = y), n && (i = W(n)),
|
|
3299
|
-
} else if (y &&
|
|
3300
|
-
var b =
|
|
3314
|
+
if (y && t === e.target && (n = y), n && (i = W(n)), Wc(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);
|
|
3315
|
+
} else if (y && qc(e, f, this)) {
|
|
3316
|
+
var b = Ns(t, 0, o, !0);
|
|
3301
3317
|
if (b === G) return _(!1);
|
|
3302
|
-
if (n = b, i = W(n),
|
|
3318
|
+
if (n = b, i = W(n), Wc(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
|
|
3303
3319
|
} else if (n.parentNode === t) {
|
|
3304
3320
|
i = W(n);
|
|
3305
|
-
var x = 0, S, C = G.parentNode !== t, w = !
|
|
3306
|
-
|
|
3321
|
+
var x = 0, S, C = G.parentNode !== t, w = !Ic(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Ms(n, "top", "top") || Ms(G, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
3322
|
+
Sc !== n && (S = i[T], wc = !1, Tc = !w && o.invertSwap || C), x = Yc(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Tc, Sc === n);
|
|
3307
3323
|
var O;
|
|
3308
3324
|
if (x !== 0) {
|
|
3309
|
-
var k =
|
|
3325
|
+
var k = Fs(G);
|
|
3310
3326
|
do
|
|
3311
3327
|
k -= x, O = K.children[k];
|
|
3312
3328
|
while (O && (U(O, "display") === "none" || O === q));
|
|
3313
3329
|
}
|
|
3314
3330
|
if (x === 0 || O === n) return _(!1);
|
|
3315
|
-
|
|
3331
|
+
Sc = n, Cc = x;
|
|
3316
3332
|
var A = n.nextElementSibling, j = !1;
|
|
3317
3333
|
j = x === 1;
|
|
3318
|
-
var M =
|
|
3319
|
-
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1),
|
|
3334
|
+
var M = Wc(J, t, G, r, n, i, e, j);
|
|
3335
|
+
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1), Oc = !0, setTimeout(Kc, 30), g(), j && !A ? t.appendChild(G) : n.parentNode.insertBefore(G, j ? A : n), E && Ws(E, 0, D - E.scrollTop), K = G.parentNode, S !== void 0 && !Tc && (Ec = Math.abs(S - W(n)[T])), v(), _(!0);
|
|
3320
3336
|
}
|
|
3321
3337
|
if (t.contains(G)) return _(!1);
|
|
3322
3338
|
}
|
|
@@ -3324,7 +3340,7 @@ Q.prototype = {
|
|
|
3324
3340
|
},
|
|
3325
3341
|
_ignoreWhileAnimating: null,
|
|
3326
3342
|
_offMoveEvents: function() {
|
|
3327
|
-
H(document, "mousemove", this._onTouchMove), H(document, "touchmove", this._onTouchMove), H(document, "pointermove", this._onTouchMove), H(document, "dragover",
|
|
3343
|
+
H(document, "mousemove", this._onTouchMove), H(document, "touchmove", this._onTouchMove), H(document, "pointermove", this._onTouchMove), H(document, "dragover", Vc), H(document, "mousemove", Vc), H(document, "touchmove", Vc);
|
|
3328
3344
|
},
|
|
3329
3345
|
_offUpEvents: function() {
|
|
3330
3346
|
var e = this.el.ownerDocument;
|
|
@@ -3332,46 +3348,46 @@ Q.prototype = {
|
|
|
3332
3348
|
},
|
|
3333
3349
|
_onDrop: function(e) {
|
|
3334
3350
|
var t = this.el, n = this.options;
|
|
3335
|
-
|
|
3351
|
+
cc = Fs(G), uc = Fs(G, n.draggable), nc("drop", this, { evt: e }), K = G && G.parentNode, cc = Fs(G), uc = Fs(G, n.draggable), Q.eventCanceled || (fc = !1, Tc = !1, wc = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), el(this.cloneId), el(this._dragStartId), this.nativeDraggable && (H(document, "drop", this), H(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), bs && U(document.body, "user-select", ""), U(G, "transform", ""), e && (xc && (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 && H(G, "dragend", this), Gc(G), G.style["will-change"] = "", xc && !fc && Os(G, X ? X.options.ghostClass : this.options.ghostClass, !1), Os(G, this.options.chosenClass, !1), rc({
|
|
3336
3352
|
sortable: this,
|
|
3337
3353
|
name: "unchoose",
|
|
3338
3354
|
toEl: K,
|
|
3339
3355
|
newIndex: null,
|
|
3340
3356
|
newDraggableIndex: null,
|
|
3341
3357
|
originalEvent: e
|
|
3342
|
-
}), J === K ?
|
|
3358
|
+
}), J === K ? cc !== sc && cc >= 0 && (rc({
|
|
3343
3359
|
sortable: this,
|
|
3344
3360
|
name: "update",
|
|
3345
3361
|
toEl: K,
|
|
3346
3362
|
originalEvent: e
|
|
3347
|
-
}),
|
|
3363
|
+
}), rc({
|
|
3348
3364
|
sortable: this,
|
|
3349
3365
|
name: "sort",
|
|
3350
3366
|
toEl: K,
|
|
3351
3367
|
originalEvent: e
|
|
3352
|
-
})) : (
|
|
3368
|
+
})) : (cc >= 0 && (rc({
|
|
3353
3369
|
rootEl: K,
|
|
3354
3370
|
name: "add",
|
|
3355
3371
|
toEl: K,
|
|
3356
3372
|
fromEl: J,
|
|
3357
3373
|
originalEvent: e
|
|
3358
|
-
}),
|
|
3374
|
+
}), rc({
|
|
3359
3375
|
sortable: this,
|
|
3360
3376
|
name: "remove",
|
|
3361
3377
|
toEl: K,
|
|
3362
3378
|
originalEvent: e
|
|
3363
|
-
}),
|
|
3379
|
+
}), rc({
|
|
3364
3380
|
rootEl: K,
|
|
3365
3381
|
name: "sort",
|
|
3366
3382
|
toEl: K,
|
|
3367
3383
|
fromEl: J,
|
|
3368
3384
|
originalEvent: e
|
|
3369
|
-
}),
|
|
3385
|
+
}), rc({
|
|
3370
3386
|
sortable: this,
|
|
3371
3387
|
name: "sort",
|
|
3372
3388
|
toEl: K,
|
|
3373
3389
|
originalEvent: e
|
|
3374
|
-
})), X && X.save()), Q.active && ((
|
|
3390
|
+
})), X && X.save()), Q.active && ((cc == null || cc === -1) && (cc = sc, uc = lc), rc({
|
|
3375
3391
|
sortable: this,
|
|
3376
3392
|
name: "end",
|
|
3377
3393
|
toEl: K,
|
|
@@ -3379,9 +3395,9 @@ Q.prototype = {
|
|
|
3379
3395
|
}), this.save())))), this._nulling();
|
|
3380
3396
|
},
|
|
3381
3397
|
_nulling: function() {
|
|
3382
|
-
|
|
3398
|
+
nc("nulling", this), J = G = K = q = ic = Y = ac = oc = hc = gc = xc = cc = uc = sc = lc = Sc = Cc = X = dc = Q.dragged = Q.ghost = Q.clone = Q.active = null, kc.forEach(function(e) {
|
|
3383
3399
|
e.checked = !0;
|
|
3384
|
-
}),
|
|
3400
|
+
}), kc.length = _c = vc = 0;
|
|
3385
3401
|
},
|
|
3386
3402
|
handleEvent: function(e) {
|
|
3387
3403
|
switch (e.type) {
|
|
@@ -3391,20 +3407,20 @@ Q.prototype = {
|
|
|
3391
3407
|
break;
|
|
3392
3408
|
case "dragenter":
|
|
3393
3409
|
case "dragover":
|
|
3394
|
-
G && (this._onDragOver(e),
|
|
3410
|
+
G && (this._onDragOver(e), Uc(e));
|
|
3395
3411
|
break;
|
|
3396
3412
|
case "selectstart": e.preventDefault();
|
|
3397
3413
|
}
|
|
3398
3414
|
},
|
|
3399
3415
|
toArray: function() {
|
|
3400
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3416
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Es(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Zc(t));
|
|
3401
3417
|
return e;
|
|
3402
3418
|
},
|
|
3403
3419
|
sort: function(e, t) {
|
|
3404
3420
|
var n = {}, r = this.el;
|
|
3405
3421
|
this.toArray().forEach(function(e, t) {
|
|
3406
3422
|
var i = r.children[t];
|
|
3407
|
-
|
|
3423
|
+
Es(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3408
3424
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3409
3425
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3410
3426
|
}), t && this.animateAll();
|
|
@@ -3414,122 +3430,122 @@ Q.prototype = {
|
|
|
3414
3430
|
e && e.set && e.set(this);
|
|
3415
3431
|
},
|
|
3416
3432
|
closest: function(e, t) {
|
|
3417
|
-
return
|
|
3433
|
+
return Es(e, t || this.options.draggable, this.el, !1);
|
|
3418
3434
|
},
|
|
3419
3435
|
option: function(e, t) {
|
|
3420
3436
|
var n = this.options;
|
|
3421
3437
|
if (t === void 0) return n[e];
|
|
3422
|
-
var r =
|
|
3423
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
3438
|
+
var r = $s.modifyOption(this, e, t);
|
|
3439
|
+
n[e] = r === void 0 ? t : r, e === "group" && Rc(n);
|
|
3424
3440
|
},
|
|
3425
3441
|
destroy: function() {
|
|
3426
|
-
|
|
3442
|
+
nc("destroy", this);
|
|
3427
3443
|
var e = this.el;
|
|
3428
|
-
e[
|
|
3444
|
+
e[qs] = null, H(e, "mousedown", this._onTapStart), H(e, "touchstart", this._onTapStart), H(e, "pointerdown", this._onTapStart), this.nativeDraggable && (H(e, "dragover", this), H(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3429
3445
|
e.removeAttribute("draggable");
|
|
3430
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3446
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), mc.splice(mc.indexOf(this.el), 1), this.el = e = null;
|
|
3431
3447
|
},
|
|
3432
3448
|
_hideClone: function() {
|
|
3433
|
-
if (!
|
|
3434
|
-
if (
|
|
3435
|
-
U(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y),
|
|
3449
|
+
if (!oc) {
|
|
3450
|
+
if (nc("hideClone", this), Q.eventCanceled) return;
|
|
3451
|
+
U(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), oc = !0;
|
|
3436
3452
|
}
|
|
3437
3453
|
},
|
|
3438
3454
|
_showClone: function(e) {
|
|
3439
3455
|
if (e.lastPutMode !== "clone") this._hideClone();
|
|
3440
|
-
else if (
|
|
3441
|
-
if (
|
|
3442
|
-
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) :
|
|
3456
|
+
else if (oc) {
|
|
3457
|
+
if (nc("showClone", this), Q.eventCanceled) return;
|
|
3458
|
+
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : ic ? J.insertBefore(Y, ic) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), U(Y, "display", ""), oc = !1;
|
|
3443
3459
|
}
|
|
3444
3460
|
}
|
|
3445
3461
|
};
|
|
3446
|
-
function
|
|
3462
|
+
function Uc(e) {
|
|
3447
3463
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3448
3464
|
}
|
|
3449
|
-
function
|
|
3450
|
-
var c, l = e[
|
|
3451
|
-
return window.CustomEvent && !
|
|
3465
|
+
function Wc(e, t, n, r, i, a, o, s) {
|
|
3466
|
+
var c, l = e[qs], u = l.options.onMove, d;
|
|
3467
|
+
return window.CustomEvent && !_s && !vs ? c = new CustomEvent("move", {
|
|
3452
3468
|
bubbles: !0,
|
|
3453
3469
|
cancelable: !0
|
|
3454
3470
|
}) : (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 || W(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3455
3471
|
}
|
|
3456
|
-
function
|
|
3472
|
+
function Gc(e) {
|
|
3457
3473
|
e.draggable = !1;
|
|
3458
3474
|
}
|
|
3459
|
-
function
|
|
3460
|
-
|
|
3475
|
+
function Kc() {
|
|
3476
|
+
Oc = !1;
|
|
3461
3477
|
}
|
|
3462
|
-
function
|
|
3463
|
-
var r = W(
|
|
3478
|
+
function qc(e, t, n) {
|
|
3479
|
+
var r = W(Ns(n.el, 0, n.options, !0)), i = Ks(n.el, n.options, q), a = 10;
|
|
3464
3480
|
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;
|
|
3465
3481
|
}
|
|
3466
|
-
function
|
|
3467
|
-
var r = W(
|
|
3482
|
+
function Jc(e, t, n) {
|
|
3483
|
+
var r = W(Ps(n.el, n.options.draggable)), i = Ks(n.el, n.options, q), a = 10;
|
|
3468
3484
|
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;
|
|
3469
3485
|
}
|
|
3470
|
-
function
|
|
3486
|
+
function Yc(e, t, n, r, i, a, o, s) {
|
|
3471
3487
|
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;
|
|
3472
3488
|
if (!o) {
|
|
3473
|
-
if (s &&
|
|
3474
|
-
if (!
|
|
3475
|
-
else if (
|
|
3476
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3489
|
+
if (s && Ec < l * i) {
|
|
3490
|
+
if (!wc && (Cc === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (wc = !0), wc) f = !0;
|
|
3491
|
+
else if (Cc === 1 ? c < u + Ec : c > d - Ec) return -Cc;
|
|
3492
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Xc(t);
|
|
3477
3493
|
}
|
|
3478
3494
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3479
3495
|
}
|
|
3480
|
-
function
|
|
3481
|
-
return
|
|
3496
|
+
function Xc(e) {
|
|
3497
|
+
return Fs(G) < Fs(e) ? 1 : -1;
|
|
3482
3498
|
}
|
|
3483
|
-
function
|
|
3499
|
+
function Zc(e) {
|
|
3484
3500
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3485
3501
|
return r.toString(36);
|
|
3486
3502
|
}
|
|
3487
|
-
function
|
|
3488
|
-
|
|
3503
|
+
function Qc(e) {
|
|
3504
|
+
kc.length = 0;
|
|
3489
3505
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3490
3506
|
var r = t[n];
|
|
3491
|
-
r.checked &&
|
|
3507
|
+
r.checked && kc.push(r);
|
|
3492
3508
|
}
|
|
3493
3509
|
}
|
|
3494
|
-
function
|
|
3510
|
+
function $c(e) {
|
|
3495
3511
|
return setTimeout(e, 0);
|
|
3496
3512
|
}
|
|
3497
|
-
function
|
|
3513
|
+
function el(e) {
|
|
3498
3514
|
return clearTimeout(e);
|
|
3499
3515
|
}
|
|
3500
|
-
|
|
3501
|
-
(Q.active ||
|
|
3516
|
+
Ac && V(document, "touchmove", function(e) {
|
|
3517
|
+
(Q.active || fc) && e.cancelable && e.preventDefault();
|
|
3502
3518
|
}), Q.utils = {
|
|
3503
3519
|
on: V,
|
|
3504
3520
|
off: H,
|
|
3505
3521
|
css: U,
|
|
3506
|
-
find:
|
|
3522
|
+
find: As,
|
|
3507
3523
|
is: function(e, t) {
|
|
3508
|
-
return !!
|
|
3524
|
+
return !!Es(e, t, e, !1);
|
|
3509
3525
|
},
|
|
3510
|
-
extend:
|
|
3511
|
-
throttle:
|
|
3512
|
-
closest:
|
|
3513
|
-
toggleClass:
|
|
3514
|
-
clone:
|
|
3515
|
-
index:
|
|
3516
|
-
nextTick:
|
|
3517
|
-
cancelNextTick:
|
|
3518
|
-
detectDirection:
|
|
3519
|
-
getChild:
|
|
3526
|
+
extend: zs,
|
|
3527
|
+
throttle: Hs,
|
|
3528
|
+
closest: Es,
|
|
3529
|
+
toggleClass: Os,
|
|
3530
|
+
clone: Gs,
|
|
3531
|
+
index: Fs,
|
|
3532
|
+
nextTick: $c,
|
|
3533
|
+
cancelNextTick: el,
|
|
3534
|
+
detectDirection: Fc,
|
|
3535
|
+
getChild: Ns
|
|
3520
3536
|
}, Q.get = function(e) {
|
|
3521
|
-
return e[
|
|
3537
|
+
return e[qs];
|
|
3522
3538
|
}, Q.mount = function() {
|
|
3523
3539
|
var e = [...arguments];
|
|
3524
3540
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3525
3541
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3526
|
-
e.utils && (Q.utils =
|
|
3542
|
+
e.utils && (Q.utils = ls(ls({}, Q.utils), e.utils)), $s.mount(e);
|
|
3527
3543
|
});
|
|
3528
3544
|
}, Q.create = function(e, t) {
|
|
3529
3545
|
return new Q(e, t);
|
|
3530
|
-
}, Q.version =
|
|
3531
|
-
var $ = [],
|
|
3532
|
-
function
|
|
3546
|
+
}, Q.version = hs;
|
|
3547
|
+
var $ = [], tl, nl, rl = !1, il, al, ol, sl;
|
|
3548
|
+
function cl() {
|
|
3533
3549
|
function e() {
|
|
3534
3550
|
for (var e in this.defaults = {
|
|
3535
3551
|
scroll: !0,
|
|
@@ -3549,63 +3565,63 @@ function ol() {
|
|
|
3549
3565
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3550
3566
|
},
|
|
3551
3567
|
drop: function() {
|
|
3552
|
-
this.sortable.nativeDraggable ? H(document, "dragover", this._handleAutoScroll) : (H(document, "pointermove", this._handleFallbackAutoScroll), H(document, "touchmove", this._handleFallbackAutoScroll), H(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3568
|
+
this.sortable.nativeDraggable ? H(document, "dragover", this._handleAutoScroll) : (H(document, "pointermove", this._handleFallbackAutoScroll), H(document, "touchmove", this._handleFallbackAutoScroll), H(document, "mousemove", this._handleFallbackAutoScroll)), ul(), ll(), Us();
|
|
3553
3569
|
},
|
|
3554
3570
|
nulling: function() {
|
|
3555
|
-
|
|
3571
|
+
ol = nl = tl = rl = sl = il = al = null, $.length = 0;
|
|
3556
3572
|
},
|
|
3557
3573
|
_handleFallbackAutoScroll: function(e) {
|
|
3558
3574
|
this._handleAutoScroll(e, !0);
|
|
3559
3575
|
},
|
|
3560
3576
|
_handleAutoScroll: function(e, t) {
|
|
3561
3577
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3562
|
-
if (
|
|
3563
|
-
|
|
3564
|
-
var o =
|
|
3565
|
-
|
|
3566
|
-
var a =
|
|
3567
|
-
a !== o && (o = a,
|
|
3568
|
-
}, 10),
|
|
3578
|
+
if (ol = e, t || this.options.forceAutoScrollFallback || vs || _s || bs) {
|
|
3579
|
+
dl(e, this.options, a, t);
|
|
3580
|
+
var o = Rs(a, !0);
|
|
3581
|
+
rl && (!sl || r !== il || i !== al) && (sl && ul(), sl = setInterval(function() {
|
|
3582
|
+
var a = Rs(document.elementFromPoint(r, i), !0);
|
|
3583
|
+
a !== o && (o = a, ll()), dl(e, n.options, a, t);
|
|
3584
|
+
}, 10), il = r, al = i);
|
|
3569
3585
|
} else {
|
|
3570
|
-
if (!this.options.bubbleScroll ||
|
|
3571
|
-
|
|
3586
|
+
if (!this.options.bubbleScroll || Rs(a, !0) === js()) {
|
|
3587
|
+
ll();
|
|
3572
3588
|
return;
|
|
3573
3589
|
}
|
|
3574
|
-
|
|
3590
|
+
dl(e, this.options, Rs(a, !1), !1);
|
|
3575
3591
|
}
|
|
3576
3592
|
}
|
|
3577
|
-
},
|
|
3593
|
+
}, fs(e, {
|
|
3578
3594
|
pluginName: "scroll",
|
|
3579
3595
|
initializeByDefault: !0
|
|
3580
3596
|
});
|
|
3581
3597
|
}
|
|
3582
|
-
function
|
|
3598
|
+
function ll() {
|
|
3583
3599
|
$.forEach(function(e) {
|
|
3584
3600
|
clearInterval(e.pid);
|
|
3585
3601
|
}), $ = [];
|
|
3586
3602
|
}
|
|
3587
|
-
function
|
|
3588
|
-
clearInterval(
|
|
3603
|
+
function ul() {
|
|
3604
|
+
clearInterval(sl);
|
|
3589
3605
|
}
|
|
3590
|
-
var
|
|
3606
|
+
var dl = Hs(function(e, t, n, r) {
|
|
3591
3607
|
if (t.scroll) {
|
|
3592
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3593
|
-
|
|
3594
|
-
var d = 0, f =
|
|
3608
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = js(), l = !1, u;
|
|
3609
|
+
nl !== n && (nl = n, ll(), tl = t.scroll, u = t.scrollFn, tl === !0 && (tl = Rs(n, !0)));
|
|
3610
|
+
var d = 0, f = tl;
|
|
3595
3611
|
do {
|
|
3596
3612
|
var p = f, m = W(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 = U(p), E = p.scrollLeft, D = p.scrollTop;
|
|
3597
3613
|
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"));
|
|
3598
3614
|
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);
|
|
3599
3615
|
if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
|
|
3600
3616
|
($[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() {
|
|
3601
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3617
|
+
r && this.layer === 0 && Q.active._onTouchMove(ol);
|
|
3602
3618
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3603
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
3619
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[qs], n, t, e, ol, $[this.layer].el) !== "continue" || Ws($[this.layer].el, n, t);
|
|
3604
3620
|
}.bind({ layer: d }), 24))), d++;
|
|
3605
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3606
|
-
|
|
3621
|
+
} while (t.bubbleScroll && f !== c && (f = Rs(f, !1)));
|
|
3622
|
+
rl = l;
|
|
3607
3623
|
}
|
|
3608
|
-
}, 30),
|
|
3624
|
+
}, 30), fl = function(e) {
|
|
3609
3625
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3610
3626
|
if (t) {
|
|
3611
3627
|
var c = n || i;
|
|
@@ -3617,8 +3633,8 @@ var ll = Bs(function(e, t, n, r) {
|
|
|
3617
3633
|
}));
|
|
3618
3634
|
}
|
|
3619
3635
|
};
|
|
3620
|
-
function
|
|
3621
|
-
|
|
3636
|
+
function pl() {}
|
|
3637
|
+
pl.prototype = {
|
|
3622
3638
|
startIndex: null,
|
|
3623
3639
|
dragStart: function(e) {
|
|
3624
3640
|
var t = e.oldDraggableIndex;
|
|
@@ -3627,67 +3643,67 @@ dl.prototype = {
|
|
|
3627
3643
|
onSpill: function(e) {
|
|
3628
3644
|
var t = e.dragEl, n = e.putSortable;
|
|
3629
3645
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3630
|
-
var r =
|
|
3646
|
+
var r = Ns(this.sortable.el, this.startIndex, this.options);
|
|
3631
3647
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3632
3648
|
},
|
|
3633
|
-
drop:
|
|
3634
|
-
},
|
|
3635
|
-
function
|
|
3636
|
-
|
|
3649
|
+
drop: fl
|
|
3650
|
+
}, fs(pl, { pluginName: "revertOnSpill" });
|
|
3651
|
+
function ml() {}
|
|
3652
|
+
ml.prototype = {
|
|
3637
3653
|
onSpill: function(e) {
|
|
3638
3654
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3639
3655
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3640
3656
|
},
|
|
3641
|
-
drop:
|
|
3642
|
-
},
|
|
3643
|
-
function
|
|
3657
|
+
drop: fl
|
|
3658
|
+
}, fs(ml, { pluginName: "removeOnSpill" }), Q.mount(new cl()), Q.mount(ml, pl);
|
|
3659
|
+
function hl(e) {
|
|
3644
3660
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3645
3661
|
}
|
|
3646
|
-
function
|
|
3662
|
+
function gl(e) {
|
|
3647
3663
|
S() && k(e);
|
|
3648
3664
|
}
|
|
3649
|
-
function
|
|
3665
|
+
function _l(t) {
|
|
3650
3666
|
S() ? e(t) : u(t);
|
|
3651
3667
|
}
|
|
3652
|
-
var
|
|
3653
|
-
function
|
|
3654
|
-
|
|
3668
|
+
var vl = null, yl = null;
|
|
3669
|
+
function bl(e = null, t = null) {
|
|
3670
|
+
vl = e, yl = t;
|
|
3655
3671
|
}
|
|
3656
|
-
function
|
|
3672
|
+
function xl() {
|
|
3657
3673
|
return {
|
|
3658
|
-
data:
|
|
3659
|
-
clonedData:
|
|
3674
|
+
data: vl,
|
|
3675
|
+
clonedData: yl
|
|
3660
3676
|
};
|
|
3661
3677
|
}
|
|
3662
|
-
var
|
|
3663
|
-
function
|
|
3678
|
+
var Sl = Symbol("cloneElement");
|
|
3679
|
+
function Cl(...e) {
|
|
3664
3680
|
let n = S()?.proxy, r = null, i = e[0], [, a, o] = e;
|
|
3665
3681
|
Array.isArray(w(a)) || (o = a, a = null);
|
|
3666
|
-
let s = null, { immediate: c = !0, clone: l =
|
|
3682
|
+
let s = null, { immediate: c = !0, clone: l = hl, forceFallback: d, fallbackOnBody: f, customUpdate: p } = w(o) ?? {};
|
|
3667
3683
|
function m(e) {
|
|
3668
3684
|
let { from: t, oldIndex: n, item: i } = e, o = Array.from(t.childNodes);
|
|
3669
3685
|
r = d && !f ? o.slice(0, -1) : o;
|
|
3670
3686
|
let s = w(w(a)?.[n]), c = l(s);
|
|
3671
|
-
|
|
3687
|
+
bl(s, c), i[Sl] = c;
|
|
3672
3688
|
}
|
|
3673
3689
|
function h(e) {
|
|
3674
|
-
let t = e.item[
|
|
3675
|
-
if (!
|
|
3676
|
-
if (
|
|
3690
|
+
let t = e.item[Sl];
|
|
3691
|
+
if (!Zo(t)) {
|
|
3692
|
+
if (es(e.item), _(a)) {
|
|
3677
3693
|
let n = [...w(a)];
|
|
3678
|
-
a.value =
|
|
3694
|
+
a.value = Xo(n, e.newDraggableIndex, t);
|
|
3679
3695
|
return;
|
|
3680
3696
|
}
|
|
3681
|
-
|
|
3697
|
+
Xo(w(a), e.newDraggableIndex, t);
|
|
3682
3698
|
}
|
|
3683
3699
|
}
|
|
3684
3700
|
function g(e) {
|
|
3685
3701
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, pullMode: o, clone: s } = e;
|
|
3686
|
-
if (
|
|
3702
|
+
if ($o(t, n, r), o === "clone") es(s);
|
|
3687
3703
|
else if (_(a)) {
|
|
3688
3704
|
let e = [...w(a)];
|
|
3689
|
-
a.value =
|
|
3690
|
-
} else
|
|
3705
|
+
a.value = Yo(e, i);
|
|
3706
|
+
} else Yo(w(a), i);
|
|
3691
3707
|
}
|
|
3692
3708
|
function v(e) {
|
|
3693
3709
|
if (p) {
|
|
@@ -3695,10 +3711,10 @@ function xl(...e) {
|
|
|
3695
3711
|
return;
|
|
3696
3712
|
}
|
|
3697
3713
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, newDraggableIndex: o } = e;
|
|
3698
|
-
if (
|
|
3714
|
+
if (es(n), $o(t, n, r), _(a)) {
|
|
3699
3715
|
let e = [...w(a)];
|
|
3700
|
-
a.value =
|
|
3701
|
-
} else
|
|
3716
|
+
a.value = Ko(e, i, o);
|
|
3717
|
+
} else Ko(w(a), i, o);
|
|
3702
3718
|
}
|
|
3703
3719
|
function y(e) {
|
|
3704
3720
|
let { newIndex: t, oldIndex: n, from: i, to: a } = e, o = null, s = t === n && i === a;
|
|
@@ -3717,7 +3733,7 @@ function xl(...e) {
|
|
|
3717
3733
|
r = null;
|
|
3718
3734
|
}
|
|
3719
3735
|
u(() => {
|
|
3720
|
-
if (
|
|
3736
|
+
if (bl(), o) throw o;
|
|
3721
3737
|
});
|
|
3722
3738
|
}
|
|
3723
3739
|
let b = {
|
|
@@ -3729,19 +3745,19 @@ function xl(...e) {
|
|
|
3729
3745
|
};
|
|
3730
3746
|
function x(e) {
|
|
3731
3747
|
let t = w(i);
|
|
3732
|
-
return e ||=
|
|
3748
|
+
return e ||= Qo(t) ? ts(t, n?.$el) : t, e && !is(e) && (e = e.$el), e || Go("Root element not found"), e;
|
|
3733
3749
|
}
|
|
3734
3750
|
function C() {
|
|
3735
|
-
let e = w(o) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3736
|
-
return
|
|
3737
|
-
|
|
3738
|
-
}),
|
|
3751
|
+
let e = w(o) ?? {}, { immediate: t, clone: n } = e, r = Ho(e, ["immediate", "clone"]);
|
|
3752
|
+
return as(r, (e, t) => {
|
|
3753
|
+
os(e) && (r[e] = (e, ...n) => (ss(e, xl()), t(e, ...n)));
|
|
3754
|
+
}), rs(a === null ? {} : b, r);
|
|
3739
3755
|
}
|
|
3740
3756
|
let T = (e) => {
|
|
3741
3757
|
e = x(e), s && E.destroy(), s = new Q(e, C());
|
|
3742
3758
|
};
|
|
3743
3759
|
t(() => o, () => {
|
|
3744
|
-
s &&
|
|
3760
|
+
s && as(C(), (e, t) => {
|
|
3745
3761
|
s?.option(e, t);
|
|
3746
3762
|
});
|
|
3747
3763
|
}, { deep: !0 });
|
|
@@ -3754,15 +3770,15 @@ function xl(...e) {
|
|
|
3754
3770
|
toArray: () => s?.toArray(),
|
|
3755
3771
|
closest: (...e) => s?.closest(...e)
|
|
3756
3772
|
};
|
|
3757
|
-
return
|
|
3773
|
+
return _l(() => {
|
|
3758
3774
|
c && T();
|
|
3759
|
-
}),
|
|
3775
|
+
}), gl(E.destroy), Vo({
|
|
3760
3776
|
start: T,
|
|
3761
3777
|
pause: () => E?.option("disabled", !0),
|
|
3762
3778
|
resume: () => E?.option("disabled", !1)
|
|
3763
3779
|
}, E);
|
|
3764
3780
|
}
|
|
3765
|
-
var
|
|
3781
|
+
var wl = [
|
|
3766
3782
|
"update",
|
|
3767
3783
|
"start",
|
|
3768
3784
|
"add",
|
|
@@ -3775,7 +3791,7 @@ var Sl = [
|
|
|
3775
3791
|
"clone",
|
|
3776
3792
|
"move",
|
|
3777
3793
|
"change"
|
|
3778
|
-
],
|
|
3794
|
+
], Tl = [
|
|
3779
3795
|
"clone",
|
|
3780
3796
|
"animation",
|
|
3781
3797
|
"ghostClass",
|
|
@@ -3819,46 +3835,46 @@ var Sl = [
|
|
|
3819
3835
|
"tag",
|
|
3820
3836
|
"target",
|
|
3821
3837
|
"customUpdate",
|
|
3822
|
-
...
|
|
3823
|
-
],
|
|
3838
|
+
...wl.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3839
|
+
], El = R({
|
|
3824
3840
|
name: "VueDraggable",
|
|
3825
3841
|
model: {
|
|
3826
3842
|
prop: "modelValue",
|
|
3827
3843
|
event: "update:modelValue"
|
|
3828
3844
|
},
|
|
3829
|
-
props:
|
|
3830
|
-
emits: ["update:modelValue", ...
|
|
3845
|
+
props: Tl,
|
|
3846
|
+
emits: ["update:modelValue", ...wl],
|
|
3831
3847
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3832
|
-
let a =
|
|
3848
|
+
let a = wl.reduce((e, t) => {
|
|
3833
3849
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3834
3850
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3835
3851
|
}, {}), o = C(() => {
|
|
3836
|
-
let t = x(e), { modelValue: n } = t, r =
|
|
3852
|
+
let t = x(e), { modelValue: n } = t, r = Ho(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3837
3853
|
let r = w(n);
|
|
3838
3854
|
return r !== void 0 && (e[t] = r), e;
|
|
3839
3855
|
}, {});
|
|
3840
|
-
return
|
|
3856
|
+
return Vo(Vo({}, a), Jo(Vo(Vo({}, i), o)));
|
|
3841
3857
|
}), s = C({
|
|
3842
3858
|
get: () => e.modelValue,
|
|
3843
3859
|
set: (e) => n("update:modelValue", e)
|
|
3844
|
-
}), c = E(), l = p(
|
|
3860
|
+
}), c = E(), l = p(Cl(e.target || c, s, o));
|
|
3845
3861
|
return r(l), () => m(e.tag || "div", { ref: c }, (t?.default)?.call(t, l));
|
|
3846
3862
|
}
|
|
3847
|
-
}),
|
|
3863
|
+
}), Dl = {
|
|
3848
3864
|
mounted: "mounted",
|
|
3849
3865
|
unmounted: "unmounted"
|
|
3850
3866
|
};
|
|
3851
|
-
|
|
3867
|
+
Dl.mounted, Dl.unmounted;
|
|
3852
3868
|
// src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3853
|
-
var
|
|
3869
|
+
var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
3854
3870
|
key: 0,
|
|
3855
3871
|
"data-testid": "hero-image-hint",
|
|
3856
3872
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-x-0 tpl:bottom-full tpl:mb-2 tpl:flex tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
3857
|
-
},
|
|
3873
|
+
}, Al = {
|
|
3858
3874
|
key: 0,
|
|
3859
3875
|
"data-testid": "section-drop-hint",
|
|
3860
3876
|
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)]"
|
|
3861
|
-
},
|
|
3877
|
+
}, jl = /* @__PURE__ */ R({
|
|
3862
3878
|
__name: "SectionBlock",
|
|
3863
3879
|
props: {
|
|
3864
3880
|
block: {},
|
|
@@ -3867,15 +3883,15 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
3867
3883
|
},
|
|
3868
3884
|
setup(e) {
|
|
3869
3885
|
let t = {
|
|
3870
|
-
title:
|
|
3871
|
-
paragraph:
|
|
3872
|
-
image:
|
|
3873
|
-
button:
|
|
3874
|
-
divider:
|
|
3875
|
-
custom:
|
|
3876
|
-
}, r = e, { t: a } =
|
|
3877
|
-
l(
|
|
3878
|
-
let v = L(
|
|
3886
|
+
title: Oo,
|
|
3887
|
+
paragraph: Wa,
|
|
3888
|
+
image: La,
|
|
3889
|
+
button: aa,
|
|
3890
|
+
divider: ya,
|
|
3891
|
+
custom: _a
|
|
3892
|
+
}, r = e, { t: a } = Zn(), u = Rn(Kn, "SectionBlock"), { displayBlock: p } = Qn(u), m = C(() => r.sourceBlock ?? r.block), _ = L(jn, C(() => /* @__PURE__ */ new Set()));
|
|
3893
|
+
l(jn, C(() => /* @__PURE__ */ new Set([..._.value, ...Object.entries(m.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
|
|
3894
|
+
let v = L(In, null), b = L(Fn, null), x = L(Dn, {}), S = L(Cn, null);
|
|
3879
3895
|
function O(e) {
|
|
3880
3896
|
let t = x.savedBlocks;
|
|
3881
3897
|
t?.isPicking.value ? t.togglePick(r.block.id) : u.selectBlock(e);
|
|
@@ -3912,7 +3928,7 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
3912
3928
|
}
|
|
3913
3929
|
let z = C(() => {
|
|
3914
3930
|
if (u.state.previewMode) return !1;
|
|
3915
|
-
let e =
|
|
3931
|
+
let e = Oe(r.block);
|
|
3916
3932
|
return e !== null && !e.applied && e.reason === "image";
|
|
3917
3933
|
});
|
|
3918
3934
|
function re(e) {
|
|
@@ -3922,10 +3938,10 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
3922
3938
|
return N(e).length === 0 && u.state.previewMode;
|
|
3923
3939
|
}
|
|
3924
3940
|
function ae(e, t) {
|
|
3925
|
-
|
|
3941
|
+
Ga(u, t, r.block.id, e);
|
|
3926
3942
|
}
|
|
3927
3943
|
function oe(e) {
|
|
3928
|
-
return
|
|
3944
|
+
return Ui(e, b, t);
|
|
3929
3945
|
}
|
|
3930
3946
|
function se(e, t) {
|
|
3931
3947
|
e.type === "custom" && u.updateBlock(e.id, {
|
|
@@ -3933,16 +3949,16 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
3933
3949
|
dataSourceFetched: t.dataSourceFetched
|
|
3934
3950
|
});
|
|
3935
3951
|
}
|
|
3936
|
-
return (t, l) => (s(), D("div",
|
|
3952
|
+
return (t, l) => (s(), D("div", Ol, [z.value ? (s(), D("div", kl, [j("span", null, i(w(a).section.heroAddImage), 1)])) : T("", !0), j("div", { class: c(["tpl:flex tpl:gap-0", { "tpl:flex-col": M.value }]) }, [(s(!0), D(P, null, d(A.value, (t, m) => (s(), D("div", {
|
|
3937
3953
|
key: m,
|
|
3938
3954
|
class: c(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", re(m) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3939
3955
|
style: f({ width: M.value ? "100%" : k.value[m] })
|
|
3940
|
-
}, [y(w(
|
|
3956
|
+
}, [y(w(El), {
|
|
3941
3957
|
"model-value": N(m),
|
|
3942
3958
|
group: {
|
|
3943
3959
|
name: "blocks",
|
|
3944
3960
|
pull: !0,
|
|
3945
|
-
put: (e, t, n) => w(
|
|
3961
|
+
put: (e, t, n) => w(Fo)(n)
|
|
3946
3962
|
},
|
|
3947
3963
|
animation: 150,
|
|
3948
3964
|
"ghost-class": "tpl-ghost",
|
|
@@ -3956,12 +3972,12 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
3956
3972
|
"tpl:min-h-[60px]": R(m),
|
|
3957
3973
|
"tpl:min-h-[34px]": ie(m)
|
|
3958
3974
|
}]),
|
|
3959
|
-
onUpdate: (e) => w(
|
|
3975
|
+
onUpdate: (e) => w(Ga)(w(u), N(m), r.block.id, m, e),
|
|
3960
3976
|
onStart: (e) => I.value = m,
|
|
3961
3977
|
onEnd: l[0] ||= (e) => I.value = null,
|
|
3962
3978
|
"onUpdate:modelValue": (e) => ae(m, e)
|
|
3963
3979
|
}, {
|
|
3964
|
-
default: h(() => [(s(!0), D(P, null, d(N(m), (t) => g((s(), D("div", { key: t.id }, [y(
|
|
3980
|
+
default: h(() => [(s(!0), D(P, null, d(N(m), (t) => g((s(), D("div", { key: t.id }, [y(Eo, {
|
|
3965
3981
|
block: t,
|
|
3966
3982
|
"display-block": w(p)(t),
|
|
3967
3983
|
"is-selected": w(u).state.selectedBlockId === t.id,
|
|
@@ -3997,14 +4013,14 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
3997
4013
|
"onUpdate",
|
|
3998
4014
|
"onStart",
|
|
3999
4015
|
"onUpdate:modelValue"
|
|
4000
|
-
]), re(m) ? (s(), D("div",
|
|
4016
|
+
]), re(m) ? (s(), D("div", Al, [j("span", null, i(w(a).section.dropHere), 1)])) : T("", !0)], 6))), 128))], 2)]));
|
|
4001
4017
|
}
|
|
4002
|
-
}),
|
|
4018
|
+
}), Ml = ["width", "height"], Nl = [
|
|
4003
4019
|
"d",
|
|
4004
4020
|
"stroke",
|
|
4005
4021
|
"stroke-opacity",
|
|
4006
4022
|
"stroke-width"
|
|
4007
|
-
],
|
|
4023
|
+
], Pl = ["d", "fill"], Fl = /* @__PURE__ */ R({
|
|
4008
4024
|
__name: "SocialIconSvg",
|
|
4009
4025
|
props: {
|
|
4010
4026
|
platform: {},
|
|
@@ -4013,7 +4029,7 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
4013
4029
|
iconSize: {}
|
|
4014
4030
|
},
|
|
4015
4031
|
setup(e) {
|
|
4016
|
-
let t = e, n = C(() =>
|
|
4032
|
+
let t = e, n = C(() => At[t.platform]), r = C(() => Mt[t.iconSize]), i = C(() => Ne(t.platform, t.iconTone)), a = C(() => Pe(t.iconStyle, t.iconTone)), o = C(() => {
|
|
4017
4033
|
let e = {
|
|
4018
4034
|
display: "inline-flex",
|
|
4019
4035
|
alignItems: "center",
|
|
@@ -4051,7 +4067,7 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
4051
4067
|
};
|
|
4052
4068
|
default: return e;
|
|
4053
4069
|
}
|
|
4054
|
-
}), c = C(() =>
|
|
4070
|
+
}), c = C(() => Me(t.iconStyle)), l = C(() => Math.floor(r.value * c.value));
|
|
4055
4071
|
function u(e) {
|
|
4056
4072
|
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
4057
4073
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
@@ -4072,28 +4088,28 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
4072
4088
|
"stroke-opacity": a.value.opacity,
|
|
4073
4089
|
"stroke-width": a.value.width / c.value,
|
|
4074
4090
|
"stroke-linejoin": "round"
|
|
4075
|
-
}, null, 8,
|
|
4091
|
+
}, null, 8, Nl)) : T("", !0), j("path", {
|
|
4076
4092
|
d: n.value.path,
|
|
4077
4093
|
fill: d.value
|
|
4078
|
-
}, null, 8,
|
|
4094
|
+
}, null, 8, Pl)], 8, Ml))], 4));
|
|
4079
4095
|
}
|
|
4080
|
-
}),
|
|
4096
|
+
}), Il = { class: "tpl:w-full" }, Ll = ["href"], Rl = {
|
|
4081
4097
|
key: 1,
|
|
4082
4098
|
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)]"
|
|
4083
|
-
},
|
|
4099
|
+
}, zl = /* @__PURE__ */ R({
|
|
4084
4100
|
__name: "SocialIconsBlock",
|
|
4085
4101
|
props: {
|
|
4086
4102
|
block: {},
|
|
4087
4103
|
viewport: {}
|
|
4088
4104
|
},
|
|
4089
4105
|
setup(e) {
|
|
4090
|
-
let t = e, { t: n } =
|
|
4106
|
+
let t = e, { t: n } = Zn(), r = C(() => ({
|
|
4091
4107
|
display: "flex",
|
|
4092
4108
|
flexWrap: "wrap",
|
|
4093
4109
|
gap: `${t.block.spacing}px`,
|
|
4094
4110
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
4095
4111
|
})), a = C(() => t.block.icons.length > 0);
|
|
4096
|
-
return (t, o) => (s(), D("div",
|
|
4112
|
+
return (t, o) => (s(), D("div", Il, [a.value ? (s(), D("div", {
|
|
4097
4113
|
key: 0,
|
|
4098
4114
|
style: f(r.value)
|
|
4099
4115
|
}, [(s(!0), D(P, null, d(e.block.icons, (t) => (s(), D("a", {
|
|
@@ -4101,7 +4117,7 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
4101
4117
|
href: t.url || "#",
|
|
4102
4118
|
class: "tpl:cursor-default",
|
|
4103
4119
|
onClick: o[0] ||= z(() => {}, ["prevent"])
|
|
4104
|
-
}, [y(
|
|
4120
|
+
}, [y(Fl, {
|
|
4105
4121
|
platform: t.platform,
|
|
4106
4122
|
"icon-style": e.block.iconStyle,
|
|
4107
4123
|
"icon-tone": e.block.iconTone,
|
|
@@ -4111,44 +4127,44 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
4111
4127
|
"icon-style",
|
|
4112
4128
|
"icon-tone",
|
|
4113
4129
|
"icon-size"
|
|
4114
|
-
])], 8,
|
|
4130
|
+
])], 8, Ll))), 128))], 4)) : (s(), D("div", Rl, [y(w(_t), { size: 16 }), j("span", null, i(w(n).social.addIcons), 1)]))]));
|
|
4115
4131
|
}
|
|
4116
|
-
}),
|
|
4132
|
+
}), Bl = { class: "tpl:w-full" }, Vl = {
|
|
4117
4133
|
key: 0,
|
|
4118
4134
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4119
4135
|
style: {
|
|
4120
4136
|
"background-color": "var(--tpl-bg-hover)",
|
|
4121
4137
|
color: "var(--tpl-text-dim)"
|
|
4122
4138
|
}
|
|
4123
|
-
},
|
|
4139
|
+
}, Hl = /* @__PURE__ */ R({
|
|
4124
4140
|
__name: "SpacerBlock",
|
|
4125
4141
|
props: {
|
|
4126
4142
|
block: {},
|
|
4127
4143
|
viewport: {}
|
|
4128
4144
|
},
|
|
4129
4145
|
setup(e) {
|
|
4130
|
-
let t = e, n =
|
|
4146
|
+
let t = e, n = Rn(Kn, "SpacerBlock"), r = C(() => ({
|
|
4131
4147
|
height: `${t.block.height}px`,
|
|
4132
4148
|
minHeight: `${t.block.height}px`,
|
|
4133
4149
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4134
4150
|
}));
|
|
4135
|
-
return (t, a) => (s(), D("div",
|
|
4151
|
+
return (t, a) => (s(), D("div", Bl, [j("div", {
|
|
4136
4152
|
style: f(r.value),
|
|
4137
4153
|
class: c(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !w(n).state.previewMode }])
|
|
4138
|
-
}, [w(n).state.previewMode ? T("", !0) : (s(), D("span",
|
|
4154
|
+
}, [w(n).state.previewMode ? T("", !0) : (s(), D("span", Vl, i(e.block.height) + "px ", 1))], 6)]));
|
|
4139
4155
|
}
|
|
4140
|
-
}),
|
|
4156
|
+
}), Ul = { class: "tpl:w-full" }, Wl = { key: 0 }, Gl = [
|
|
4141
4157
|
"aria-label",
|
|
4142
4158
|
"data-placeholder",
|
|
4143
4159
|
"onBlur"
|
|
4144
|
-
],
|
|
4160
|
+
], Kl = [
|
|
4145
4161
|
"aria-label",
|
|
4146
4162
|
"data-placeholder",
|
|
4147
4163
|
"onBlur"
|
|
4148
|
-
],
|
|
4164
|
+
], ql = {
|
|
4149
4165
|
key: 1,
|
|
4150
4166
|
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)]"
|
|
4151
|
-
},
|
|
4167
|
+
}, Jl = /*#__PURE__*/ zt(/* @__PURE__ */ R({
|
|
4152
4168
|
__name: "TableBlock",
|
|
4153
4169
|
props: {
|
|
4154
4170
|
block: {},
|
|
@@ -4162,7 +4178,7 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
4162
4178
|
updated(e, t) {
|
|
4163
4179
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
4164
4180
|
}
|
|
4165
|
-
}, n = e, { t: r } =
|
|
4181
|
+
}, n = e, { t: r } = Zn(), a = Rn(Kn, "TableBlock"), o = Rn(Tn, "TableBlock"), c = C(() => n.block.rows.length > 0), l = C(() => {
|
|
4166
4182
|
let e = {
|
|
4167
4183
|
width: "100%",
|
|
4168
4184
|
borderCollapse: "collapse",
|
|
@@ -4193,11 +4209,11 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
4193
4209
|
} : n);
|
|
4194
4210
|
a.updateBlock(n.block.id, { rows: o });
|
|
4195
4211
|
}
|
|
4196
|
-
return (e, n) => (s(), D("div",
|
|
4212
|
+
return (e, n) => (s(), D("div", Ul, [c.value ? (s(), D("table", {
|
|
4197
4213
|
key: 0,
|
|
4198
4214
|
style: f(l.value),
|
|
4199
4215
|
class: "tpl-table-editable"
|
|
4200
|
-
}, [m.value ? (s(), D("thead",
|
|
4216
|
+
}, [m.value ? (s(), D("thead", Wl, [j("tr", null, [(s(!0), D(P, null, d(m.value.cells, (e) => g((s(), D("th", {
|
|
4201
4217
|
key: e.id,
|
|
4202
4218
|
style: f(p.value),
|
|
4203
4219
|
"aria-label": w(r).table.cellPlaceholder,
|
|
@@ -4206,7 +4222,7 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
4206
4222
|
onBlur: (t) => v(m.value.id, e.id, t),
|
|
4207
4223
|
onKeydown: n[0] ||= re(z((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4208
4224
|
onClick: z(_, ["stop"])
|
|
4209
|
-
}, null, 44,
|
|
4225
|
+
}, null, 44, Gl)), [[t, e.content]])), 128))])])) : T("", !0), j("tbody", null, [(s(!0), D(P, null, d(h.value, (e) => (s(), D("tr", { key: e.id }, [(s(!0), D(P, null, d(e.cells, (i) => g((s(), D("td", {
|
|
4210
4226
|
key: i.id,
|
|
4211
4227
|
style: f(u.value),
|
|
4212
4228
|
"aria-label": w(r).table.cellPlaceholder,
|
|
@@ -4215,9 +4231,9 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
4215
4231
|
onBlur: (t) => v(e.id, i.id, t),
|
|
4216
4232
|
onKeydown: n[1] ||= re(z((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4217
4233
|
onClick: z(_, ["stop"])
|
|
4218
|
-
}, null, 44,
|
|
4234
|
+
}, null, 44, Kl)), [[t, i.content]])), 128))]))), 128))])], 4)) : (s(), D("div", ql, [y(w(vt), { size: 16 }), j("span", null, i(w(r).table.empty), 1)]))]));
|
|
4219
4235
|
}
|
|
4220
|
-
}), [["__scopeId", "data-v-6751d456"]]),
|
|
4236
|
+
}), [["__scopeId", "data-v-6751d456"]]), Yl = /* @__PURE__ */ R({
|
|
4221
4237
|
__name: "VideoPlayButton",
|
|
4222
4238
|
props: { hoverEffect: {
|
|
4223
4239
|
type: Boolean,
|
|
@@ -4234,7 +4250,7 @@ var El = { class: "tpl:relative tpl:w-full" }, Dl = {
|
|
|
4234
4250
|
}
|
|
4235
4251
|
});
|
|
4236
4252
|
// src/utils/videoThumbnail.ts
|
|
4237
|
-
function
|
|
4253
|
+
function Xl(e) {
|
|
4238
4254
|
if (!e) return {
|
|
4239
4255
|
platform: "unknown",
|
|
4240
4256
|
videoId: null,
|
|
@@ -4266,24 +4282,24 @@ function Jl(e) {
|
|
|
4266
4282
|
thumbnailUrl: null
|
|
4267
4283
|
};
|
|
4268
4284
|
}
|
|
4269
|
-
function
|
|
4270
|
-
return t ||
|
|
4285
|
+
function Zl(e, t) {
|
|
4286
|
+
return t || Xl(e).thumbnailUrl;
|
|
4271
4287
|
}
|
|
4272
4288
|
// src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4273
|
-
var
|
|
4289
|
+
var Ql = ["src", "alt"], $l = {
|
|
4274
4290
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4275
4291
|
style: { opacity: "0.7" }
|
|
4276
|
-
},
|
|
4292
|
+
}, eu = ["href"], tu = ["src", "alt"], nu = ["src", "alt"], ru = {
|
|
4277
4293
|
key: 3,
|
|
4278
4294
|
class: "tpl:flex tpl:box-border 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)]"
|
|
4279
|
-
},
|
|
4295
|
+
}, iu = /* @__PURE__ */ R({
|
|
4280
4296
|
__name: "VideoBlock",
|
|
4281
4297
|
props: {
|
|
4282
4298
|
block: {},
|
|
4283
4299
|
viewport: {}
|
|
4284
4300
|
},
|
|
4285
4301
|
setup(e) {
|
|
4286
|
-
let t = e, { t: n } =
|
|
4302
|
+
let t = e, { t: n } = Zn(), { syntax: r } = pr(), a = C(() => xe(t.block.url, r) || xe(t.block.thumbnailUrl, r)), o = Ct(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), c = Ct(() => a.value ? t.block.placeholderUrl : void 0), l = C(() => a.value ? null : t.block.thumbnailUrl ? o.value ?? null : Zl(t.block.url)), u = C(() => ({ textAlign: t.block.align })), d = C(() => {
|
|
4287
4303
|
let e = t.block.align;
|
|
4288
4304
|
return {
|
|
4289
4305
|
maxWidth: "100%",
|
|
@@ -4306,16 +4322,16 @@ var Xl = ["src", "alt"], Zl = {
|
|
|
4306
4322
|
src: w(c),
|
|
4307
4323
|
alt: e.block.alt,
|
|
4308
4324
|
style: f(p.value)
|
|
4309
|
-
}, null, 12,
|
|
4325
|
+
}, null, 12, Ql), y(Yl)], 4)) : a.value ? (s(), D("div", {
|
|
4310
4326
|
key: 1,
|
|
4311
4327
|
class: "tpl:relative tpl:!flex tpl:box-border 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)]",
|
|
4312
4328
|
style: f([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
4313
|
-
}, [y(w(
|
|
4329
|
+
}, [y(w(Mr), {
|
|
4314
4330
|
size: 36,
|
|
4315
4331
|
"stroke-width": 1.5,
|
|
4316
4332
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4317
4333
|
style: { opacity: "0.5" }
|
|
4318
|
-
}), j("span",
|
|
4334
|
+
}), j("span", $l, [y(ra, { text: m.value }, null, 8, ["text"])])], 4)) : l.value ? (s(), D(P, { key: 2 }, [e.block.url ? (s(), D("a", {
|
|
4319
4335
|
key: 0,
|
|
4320
4336
|
href: e.block.url,
|
|
4321
4337
|
target: "_blank",
|
|
@@ -4328,7 +4344,7 @@ var Xl = ["src", "alt"], Zl = {
|
|
|
4328
4344
|
src: l.value,
|
|
4329
4345
|
alt: e.block.alt,
|
|
4330
4346
|
style: f(p.value)
|
|
4331
|
-
}, null, 12,
|
|
4347
|
+
}, null, 12, tu), y(Yl, { "hover-effect": "" })], 12, eu)) : (s(), D("div", {
|
|
4332
4348
|
key: 1,
|
|
4333
4349
|
class: "tpl:relative tpl:inline-block",
|
|
4334
4350
|
style: f(d.value)
|
|
@@ -4337,53 +4353,53 @@ var Xl = ["src", "alt"], Zl = {
|
|
|
4337
4353
|
src: l.value,
|
|
4338
4354
|
alt: e.block.alt,
|
|
4339
4355
|
style: f(p.value)
|
|
4340
|
-
}, null, 12,
|
|
4356
|
+
}, null, 12, nu), y(Yl)], 4))], 64)) : (s(), D("div", ru, [y(w(Mr), {
|
|
4341
4357
|
size: 40,
|
|
4342
4358
|
"stroke-width": 1.5,
|
|
4343
4359
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4344
4360
|
}), j("span", null, i(w(n).video.addVideo), 1)]))], 4));
|
|
4345
4361
|
}
|
|
4346
|
-
}),
|
|
4347
|
-
section:
|
|
4348
|
-
title:
|
|
4349
|
-
paragraph:
|
|
4350
|
-
image:
|
|
4351
|
-
button:
|
|
4352
|
-
divider:
|
|
4353
|
-
video:
|
|
4354
|
-
social:
|
|
4355
|
-
menu:
|
|
4356
|
-
table:
|
|
4357
|
-
spacer:
|
|
4358
|
-
html:
|
|
4362
|
+
}), au = {
|
|
4363
|
+
section: jl,
|
|
4364
|
+
title: Oo,
|
|
4365
|
+
paragraph: Wa,
|
|
4366
|
+
image: La,
|
|
4367
|
+
button: aa,
|
|
4368
|
+
divider: ya,
|
|
4369
|
+
video: iu,
|
|
4370
|
+
social: zl,
|
|
4371
|
+
menu: Va,
|
|
4372
|
+
table: Jl,
|
|
4373
|
+
spacer: Hl,
|
|
4374
|
+
html: Ta,
|
|
4359
4375
|
countdown: I(() => import("./CountdownBlock-BMezkFbJ.js"))
|
|
4360
4376
|
};
|
|
4361
|
-
function
|
|
4362
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: o, format: s } =
|
|
4377
|
+
function ou(e) {
|
|
4378
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: o, format: s } = Zn(i), c = C(() => Ce(Ce(Ce(vi(i), Ri(n.content.value.settings?.locale)), mt(n.content.value.settings) === "rtl" ? {
|
|
4363
4379
|
title: { textAlign: "right" },
|
|
4364
4380
|
table: { textAlign: "right" }
|
|
4365
4381
|
} : {}), r.blockDefaults ?? {}));
|
|
4366
4382
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
4367
|
-
let { resolvedTheme: u } =
|
|
4383
|
+
let { resolvedTheme: u } = li(C(() => n.state.uiTheme)), d = E(r.theme ?? {}), { themeStyles: f } = Hr({
|
|
4368
4384
|
themeOverrides: d,
|
|
4369
4385
|
resolvedTheme: u,
|
|
4370
4386
|
extraStyles: () => ({
|
|
4371
4387
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
4372
4388
|
...e.themeExtraStyles?.()
|
|
4373
4389
|
})
|
|
4374
|
-
}), p = e.history ??
|
|
4390
|
+
}), p = e.history ?? bt({
|
|
4375
4391
|
content: n.content,
|
|
4376
4392
|
setContent: (e, t) => n.setContent(e, t)
|
|
4377
4393
|
});
|
|
4378
|
-
e.history ||
|
|
4379
|
-
let m =
|
|
4394
|
+
e.history || wt(n, p);
|
|
4395
|
+
let m = yt({
|
|
4380
4396
|
addBlock: n.addBlock,
|
|
4381
4397
|
removeBlock: n.removeBlock,
|
|
4382
4398
|
updateBlock: n.updateBlock,
|
|
4383
4399
|
selectBlock: n.selectBlock,
|
|
4384
4400
|
findBlockLocation: n.findBlockLocation,
|
|
4385
4401
|
blockDefaults: () => c.value
|
|
4386
|
-
}), h =
|
|
4402
|
+
}), h = Rt(n), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? St({
|
|
4387
4403
|
content: n.content,
|
|
4388
4404
|
isDirty: () => n.state.isDirty,
|
|
4389
4405
|
...e.autoSaveOptions
|
|
@@ -4391,30 +4407,30 @@ function iu(e) {
|
|
|
4391
4407
|
g && (_ = t(p.isNavigating, (e) => {
|
|
4392
4408
|
e ? g.pause() : g.resume();
|
|
4393
4409
|
}));
|
|
4394
|
-
let y =
|
|
4410
|
+
let y = ci(n, {
|
|
4395
4411
|
t: o,
|
|
4396
4412
|
format: s
|
|
4397
|
-
}, r.customBlocks ?? []), b =
|
|
4398
|
-
if (b.allowCustomIgnored &&
|
|
4399
|
-
let e =
|
|
4400
|
-
e.length > 0 &&
|
|
4401
|
-
}
|
|
4402
|
-
let x =
|
|
4403
|
-
for (let e of x.unknown)
|
|
4404
|
-
let S =
|
|
4405
|
-
|
|
4413
|
+
}, r.customBlocks ?? []), b = _r(r.colors);
|
|
4414
|
+
if (b.allowCustomIgnored && mr.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 && mr.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
|
|
4415
|
+
let e = _i(b.presets, r.blockDefaults, r.templateDefaults);
|
|
4416
|
+
e.length > 0 && mr.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.`);
|
|
4417
|
+
}
|
|
4418
|
+
let x = Sr(r.templateSettings);
|
|
4419
|
+
for (let e of x.unknown) mr.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${Cr.join(", ")}) — skipping it.`);
|
|
4420
|
+
let S = Ir();
|
|
4421
|
+
mi(S, au);
|
|
4406
4422
|
let w = /* @__PURE__ */ new Set();
|
|
4407
4423
|
function T(e) {
|
|
4408
4424
|
for (let t of e) {
|
|
4409
|
-
S.registerCustom(t,
|
|
4410
|
-
for (let e of
|
|
4425
|
+
S.registerCustom(t, _a);
|
|
4426
|
+
for (let e of zi(t, b)) w.has(e.id) || (w.add(e.id), mr.warn(e.message));
|
|
4411
4427
|
}
|
|
4412
4428
|
}
|
|
4413
4429
|
r.customBlocks?.length && T(r.customBlocks);
|
|
4414
|
-
let D =
|
|
4430
|
+
let D = $r();
|
|
4415
4431
|
if (ee() && v(D.dispose), e.containerEl) {
|
|
4416
4432
|
let t = e.containerEl;
|
|
4417
|
-
|
|
4433
|
+
cr(document, "pointerdown", (e) => {
|
|
4418
4434
|
let n = t.value;
|
|
4419
4435
|
n && (e.composedPath?.() ?? []).includes(n) && D.claim();
|
|
4420
4436
|
}, { capture: !0 });
|
|
@@ -4424,7 +4440,7 @@ function iu(e) {
|
|
|
4424
4440
|
t ? t.save() : g?.flush();
|
|
4425
4441
|
}
|
|
4426
4442
|
function k(t) {
|
|
4427
|
-
D.isActive() &&
|
|
4443
|
+
D.isActive() && Vi(t, {
|
|
4428
4444
|
history: p,
|
|
4429
4445
|
selectBlock: (e) => n.selectBlock(e),
|
|
4430
4446
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -4435,42 +4451,42 @@ function iu(e) {
|
|
|
4435
4451
|
onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
|
|
4436
4452
|
});
|
|
4437
4453
|
}
|
|
4438
|
-
|
|
4454
|
+
cr(document, "keydown", k);
|
|
4439
4455
|
let A = E(null), j = e.editorRoot ?? document;
|
|
4440
|
-
l(
|
|
4456
|
+
l(Yn, j), l(cn, A), l(tn, /* @__PURE__ */ new Map()), l(Wn, i), l(Kn, n), l(Jn, p), l(Un, m), l(In, h), l(Tn, a), l(On, f), l(Mn, u), l(En, c), l(Hn, r.locale), l(Fn, S), l(An, r.customBlocks ?? []), l(rn, r.paletteBlocks), l(gn, hi(r.htmlBlockPreview)), l(_n, r.layout), l(xn, r.sectionWrapper), l(zn, b), l(Zt, x.fields), l(kn, ui(n.content, S));
|
|
4441
4457
|
let N = le(r.mergeTags?.syntax);
|
|
4442
4458
|
for (let e of ["opener", "closer"]) {
|
|
4443
4459
|
let t = N[e];
|
|
4444
|
-
typeof t == "string" && t.trim() === "" &&
|
|
4460
|
+
typeof t == "string" && t.trim() === "" && mr.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
|
|
4445
4461
|
}
|
|
4446
|
-
typeof N.opener != "string" && typeof N.closer == "string" && N.closer.trim() !== "" && Be(N) === null &&
|
|
4462
|
+
typeof N.opener != "string" && typeof N.closer == "string" && N.closer.trim() !== "" && Be(N) === null && mr.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
|
|
4447
4463
|
let P = M(r.mergeTags?.tags ?? []);
|
|
4448
4464
|
function te(e) {
|
|
4449
|
-
Array.isArray(e) ? P.value = e :
|
|
4465
|
+
Array.isArray(e) ? P.value = e : mr.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
4450
4466
|
}
|
|
4451
|
-
l(
|
|
4452
|
-
let F = E(
|
|
4453
|
-
l(
|
|
4454
|
-
let I =
|
|
4467
|
+
l(pn, P), l($t, N), l(bn, r.mergeTags?.onRequest ?? null), l(nn, r.mergeTags?.autocomplete !== !1), l(Xn, r.mergeTags?.showRawValue !== !1);
|
|
4468
|
+
let F = E($e(r.mergeTags?.tags ?? []));
|
|
4469
|
+
l(hn, F);
|
|
4470
|
+
let I = ni({
|
|
4455
4471
|
resolvePreview: r.resolvePreview,
|
|
4456
4472
|
getContent: () => {
|
|
4457
4473
|
let e = n.content.value;
|
|
4458
4474
|
if (!n.state.previewMode) return e;
|
|
4459
|
-
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i =
|
|
4460
|
-
return r.layout ?
|
|
4475
|
+
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i = Ae(e, t);
|
|
4476
|
+
return r.layout ? ut(Ae(r.layout, t, { missing: "default" }), i) : i;
|
|
4461
4477
|
},
|
|
4462
4478
|
isActive: () => n.state.previewMode,
|
|
4463
4479
|
getLocale: () => n.activeLocale?.value ?? n.content.value.settings.locale
|
|
4464
4480
|
});
|
|
4465
|
-
l(
|
|
4481
|
+
l(Bn, I), l(sn, r.resolvePreview);
|
|
4466
4482
|
let L = C(() => !(n.state.previewMode && I.isConfigured));
|
|
4467
|
-
l(
|
|
4468
|
-
let R =
|
|
4469
|
-
l(
|
|
4470
|
-
let z =
|
|
4483
|
+
l(Cn, L);
|
|
4484
|
+
let R = ri();
|
|
4485
|
+
l(on, R), l(ln, E(!1)), l(dn, E(!1)), l(Nn, r.logicTags?.tags ?? []), l(Qt, r.logicTags?.pairs ?? []), l(an, r.logicTags?.onRequest ?? null), l(un, ii()), l(vn, r.onRequestMedia ?? null), l(Gn, r.canDropMedia ?? null), l(en, r.resolveImageUrl ? It(r.resolveImageUrl) : null), l(Sn, r.displayConditions?.conditions ?? []), l(Vn, r.displayConditions?.allowCustom ?? !1), l(Dn, e.capabilities ?? {}), l(qn, y);
|
|
4486
|
+
let z = ai(r.lint) ? null : si({
|
|
4471
4487
|
content: n.content,
|
|
4472
4488
|
get options() {
|
|
4473
|
-
return
|
|
4489
|
+
return ei({
|
|
4474
4490
|
...r,
|
|
4475
4491
|
content: n.content.value,
|
|
4476
4492
|
contentLocale: n.activeLocale?.value ?? void 0
|
|
@@ -4482,7 +4498,7 @@ function iu(e) {
|
|
|
4482
4498
|
updateSettings: n.updateSettings,
|
|
4483
4499
|
removeBlock: n.removeBlock
|
|
4484
4500
|
});
|
|
4485
|
-
l(
|
|
4501
|
+
l(mn, z);
|
|
4486
4502
|
function ne() {
|
|
4487
4503
|
_?.(), z?.destroy(), g?.destroy(), p.destroy();
|
|
4488
4504
|
}
|
|
@@ -4512,12 +4528,12 @@ function iu(e) {
|
|
|
4512
4528
|
};
|
|
4513
4529
|
}
|
|
4514
4530
|
// src/composables/useSmallScreenNotice.ts
|
|
4515
|
-
var
|
|
4516
|
-
function
|
|
4517
|
-
let t =
|
|
4531
|
+
var su = "(max-width: 767px)";
|
|
4532
|
+
function cu(e) {
|
|
4533
|
+
let t = lr(su);
|
|
4518
4534
|
return {
|
|
4519
4535
|
isSmallScreen: t,
|
|
4520
4536
|
showNotice: C(() => (N(e) ?? !0) && t.value)
|
|
4521
4537
|
};
|
|
4522
4538
|
}
|
|
4523
|
-
export {
|
|
4539
|
+
export { Ni as A, Fr as B, Zi as C, Ui as D, ta as E, ni as F, Ar as H, ei as I, Yr as L, ji as M, Ai as N, Ei as O, ki as P, qr as R, qi as S, Hi as T, Or as U, Pr as V, Er as W, Ta as _, Hl as a, ca as b, El as c, Oo as d, Eo as f, La as g, Va as h, Jl as i, Mi as j, Pi as k, ko as l, Wa as m, ou as n, zl as o, Ga as p, iu as r, jl as s, cu as t, Mo as u, ya as v, Qi as w, aa as x, _a as y, Br as z };
|