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