@templatical/editor 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AiChatSidebar-CNhSl_ty.js +228 -0
- package/dist/{AiFeatureMenu-K44aZa_P.js → AiFeatureMenu-BFVsjUJY.js} +23 -23
- package/dist/CloudEditor-Bz5Xkxej.js +1082 -0
- package/dist/{CollaboratorBar-BuCEcdbB.js → CollaboratorBar-D2Gu5Xj2.js} +3 -3
- package/dist/{CommentsSidebar-2lcqMfIP.js → CommentsSidebar-CTeEAZTj.js} +131 -131
- package/dist/{DesignReferenceSidebar-CNMu4Zrx.js → DesignReferenceSidebar-u2tKSQK0.js} +52 -52
- package/dist/{LoadingTrack-vK8W2PJf.js → LoadingTrack--aUassFH.js} +1 -1
- package/dist/{ModuleBrowserModal-CvQ0xyQf.js → ModuleBrowserModal-DNxODPlX.js} +58 -58
- package/dist/{ModulePreviewCanvas-Be2B3Y07.js → ModulePreviewCanvas-DnGe1Y-2.js} +32 -32
- package/dist/ParagraphEditor-CYrzYJO5.js +688 -0
- package/dist/{RichTextEditorContent-CHJlh7HJ.js → RichTextEditorContent-BeqlWlWB.js} +2 -2
- package/dist/{SaveModuleDialog-BaaeH5Xm.js → SaveModuleDialog-Kde6X13X.js} +25 -25
- package/dist/{SnapshotHistory-BPfjiuu1.js → SnapshotHistory-B3EfIcLW.js} +7 -7
- package/dist/TemplateScoringPanel-D2vCRGgx.js +254 -0
- package/dist/{TestEmailModal-DIAlB3e_.js → TestEmailModal-Egk0DFDf.js} +3 -3
- package/dist/{TitleEditor-D9DPjQkX.js → TitleEditor-DwUpo4gF.js} +11 -11
- package/dist/{TplModal-CmTSvCY-.js → TplModal-BCruYWks.js} +4 -4
- package/dist/{_plugin-vue_export-helper-B1-bu7yR.js → _plugin-vue_export-helper-5TQrnOhO.js} +2 -2
- package/dist/{blockTypeIcons-D1RTWOkx.js → blockTypeIcons-rW4BUUNC.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-lxVm1RjH.js → AiFeatureMenu-Dcbshcfu.js} +16 -16
- package/dist/cdn/chunks/AiFeatureMenu-Dcbshcfu.js.map +1 -0
- package/dist/cdn/chunks/CloudEditor-Bca3RyBW.js +1056 -0
- package/dist/cdn/chunks/CloudEditor-Bca3RyBW.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-D2PKtlOw.js → CollaboratorBar-sToKJfHi.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-D2PKtlOw.js.map → CollaboratorBar-sToKJfHi.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-CxDXzkKS.js → ModuleBrowserModal-BNhwXbWw.js} +52 -52
- package/dist/cdn/chunks/ModuleBrowserModal-BNhwXbWw.js.map +1 -0
- package/dist/cdn/chunks/{ModulePreviewCanvas-DEfHampA.js → ModulePreviewCanvas-DylUylPU.js} +3 -3
- package/dist/cdn/chunks/{ModulePreviewCanvas-DEfHampA.js.map → ModulePreviewCanvas-DylUylPU.js.map} +1 -1
- package/dist/cdn/chunks/ParagraphEditor-BBw90y_p.js +539 -0
- package/dist/cdn/chunks/ParagraphEditor-BBw90y_p.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DWUzizsC.js → RichTextEditorContent-DvyIO3nR.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-DWUzizsC.js.map → RichTextEditorContent-DvyIO3nR.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-DVna2xUl.js → SaveModuleDialog-DvbSHvhF.js} +24 -24
- package/dist/cdn/chunks/SaveModuleDialog-DvbSHvhF.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-DDf_OcHS.js → TitleEditor-tS3mgoVr.js} +10 -10
- package/dist/cdn/chunks/{TitleEditor-DDf_OcHS.js.map → TitleEditor-tS3mgoVr.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BnobReQm.js → blockTypeIcons-DbnbyEQE.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-BnobReQm.js.map → blockTypeIcons-DbnbyEQE.js.map} +1 -1
- package/dist/cdn/chunks/{de-BvYD17KT.js → de-CgUR_S5I.js} +1 -1
- package/dist/cdn/chunks/{de-BvYD17KT.js.map → de-CgUR_S5I.js.map} +1 -1
- package/dist/cdn/chunks/{de-BB3dgVOc.js → de-D8oDPhBD.js} +1 -1
- package/dist/cdn/chunks/de-D8oDPhBD.js.map +1 -0
- package/dist/cdn/chunks/{dist-B878xb_62.js → dist-BUmN5e4r.js} +15 -12
- package/dist/cdn/chunks/dist-BUmN5e4r.js.map +1 -0
- package/dist/cdn/chunks/{draggable-BQNU47zu.js → draggable-m78lz0gI.js} +1591 -1563
- package/dist/cdn/chunks/draggable-m78lz0gI.js.map +1 -0
- package/dist/cdn/chunks/{emojiData-BVEJHcNH.js → emojiData-CNNgvDqx.js} +1 -1
- package/dist/cdn/chunks/{emojiData-BVEJHcNH.js.map → emojiData-CNNgvDqx.js.map} +1 -1
- package/dist/cdn/chunks/{en-CpotcOPr.js → en-BBmfBDqY.js} +1 -1
- package/dist/cdn/chunks/{en-CpotcOPr.js.map → en-BBmfBDqY.js.map} +1 -1
- package/dist/cdn/chunks/{en-DeDcpnoS.js → en-HseRPPeK.js} +1 -1
- package/dist/cdn/chunks/en-HseRPPeK.js.map +1 -0
- package/dist/cdn/chunks/{extensions-B_kcV0tK.js → extensions-ClpY3m0W.js} +31 -31
- package/dist/cdn/chunks/{extensions-B_kcV0tK.js.map → extensions-ClpY3m0W.js.map} +1 -1
- package/dist/cdn/chunks/{features-ofOGnSC0.js → features-B5dGxWLi.js} +1645 -1608
- package/dist/cdn/chunks/features-B5dGxWLi.js.map +1 -0
- package/dist/cdn/chunks/{icons-bIb7PBOE.js → icons-hflTyPmb.js} +8 -8
- package/dist/cdn/chunks/icons-hflTyPmb.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-C1VIYISn.js → liquid.browser-BxyRVCKv.js} +24 -17
- package/dist/cdn/chunks/liquid.browser-BxyRVCKv.js.map +1 -0
- package/dist/cdn/chunks/{media-library-BIYzV2Y2.js → media-library-Dgy-V-JA.js} +547 -543
- package/dist/cdn/chunks/{media-library-BIYzV2Y2.js.map → media-library-Dgy-V-JA.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-DJPhQnE8.js → pusher-D-m2WSdL.js} +10 -7
- package/dist/cdn/chunks/pusher-D-m2WSdL.js.map +1 -0
- package/dist/cdn/chunks/readableTextColor-Cd_cgWO_.js.map +1 -1
- package/dist/cdn/chunks/{rolldown-runtime-DPITmOBR.js → rolldown-runtime-BNuo_Jkg.js} +1 -1
- package/dist/cdn/chunks/{src-BuW9oYtm.js → src-TDwMmqm0.js} +7 -7
- package/dist/cdn/chunks/{src-BuW9oYtm.js.map → src-TDwMmqm0.js.map} +1 -1
- package/dist/cdn/chunks/{styleConstants-1KwsBMxJ.js → styleConstants-DFe3I4Op.js} +6 -6
- package/dist/cdn/chunks/{styleConstants-1KwsBMxJ.js.map → styleConstants-DFe3I4Op.js.map} +1 -1
- package/dist/cdn/chunks/{styles-DQFExz-T.js → styles-hCOCOR6K.js} +1229 -1101
- package/dist/cdn/chunks/styles-hCOCOR6K.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-DplY-S-k.js → tiptap-C28NLMX8.js} +1531 -1309
- package/dist/cdn/chunks/tiptap-C28NLMX8.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +112 -141
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-B7kDuZmP.js → check-B5S-C0bz.js} +1 -1
- package/dist/{chevron-down-DJLW2Q9Z.js → chevron-down-CjsV1T0W.js} +1 -1
- package/dist/{circle-alert-E2vYPs5r.js → circle-alert-CVTmJHKW.js} +1 -1
- package/dist/{clock-lWIIQA3C.js → clock-CAjdSHBy.js} +1 -1
- package/dist/{dist-CG-vEqSU.js → dist-Ac4o1O4a.js} +2 -2
- package/dist/{dist-BkIys9zn.js → dist-B4LTlrAn.js} +6 -6
- package/dist/{dist-ChAGLpWo.js → dist-BTtKPcd2.js} +2 -2
- package/dist/{dist-C1BIRHCQ.js → dist-CBr-qhie.js} +2 -2
- package/dist/{dist-DmOE-Ubp.js → dist-COOFiBFV.js} +2 -2
- package/dist/{dist-4LiM9FDd.js → dist-COguaIvm.js} +2 -2
- package/dist/{dist-Bu7veieH.js → dist-Crqkuf-w.js} +2 -2
- package/dist/{dist-DkypH7qG.js → dist-DEJZ9iAU.js} +2 -2
- package/dist/{dist-D_HQYSY-.js → dist-DHYuVJ_7.js} +2 -2
- package/dist/{dist-C_ymrGFi.js → dist-DJrDTuRr.js} +973 -958
- package/dist/{dist-DysAFIPy.js → dist-DPM-DFvh.js} +142 -114
- package/dist/{dist-DrvKRSU6.js → dist-DfqLGwSF.js} +2 -2
- package/dist/dist-DmVOCJjI.js +5 -0
- package/dist/{extensions-DEjfEFhD.js → extensions-C6xp_B7K.js} +3 -3
- package/dist/{image-up-X4xIq4ea.js → image-up-vZa1Txr-.js} +1 -1
- package/dist/index.d.ts +223 -0
- package/dist/{liquid.browser-BemTg3sZ.js → liquid.browser-C02owkex.js} +20 -15
- package/dist/{loader-circle-BTQQxC3l.js → loader-circle-DilFjHSk.js} +1 -1
- package/dist/{message-circle-Blgm6V_h.js → message-circle-Dpcnc2oa.js} +1 -1
- package/dist/{refresh-cw-Bb4PEeW1.js → refresh-cw-4r7rkHHX.js} +1 -1
- package/dist/rolldown-runtime-gEudmnaM.js +23 -0
- package/dist/{scan-line-7lZPfOdm.js → scan-line-684IxPQ0.js} +1 -1
- package/dist/{send-C0ltAQrv.js → send-ChDw64yL.js} +1 -1
- package/dist/{shield-check-f-qv4RKs.js → shield-check-9dhLdyST.js} +1 -1
- package/dist/{sparkles-KhBCGlqB.js → sparkles-Co9fkDcv.js} +1 -1
- package/dist/{styleConstants-D4SOZGBV.js → styleConstants-RV3eYwkD.js} +6 -6
- package/dist/styles-nvxFh6L6.js +3557 -0
- package/dist/templatical-editor.css +1 -1
- package/dist/templatical-editor.js +111 -141
- package/dist/templatical-editor.umd.cjs +63 -73
- package/dist/{trash-2-OwjZ-guZ.js → trash-2-CZkMtjeC.js} +1 -1
- package/dist/{triangle-alert-DOSRIUYZ.js → triangle-alert-Dvt51agD.js} +1 -1
- package/dist/{useEditorCore-CjwRMl7K.js → useEditorCore-ColJh1ST.js} +1183 -1182
- package/dist/{x-CGlq2XQe.js → x-CU2XZOkQ.js} +1 -1
- package/package.json +52 -49
- package/dist/AiChatSidebar-CjfhTZwo.js +0 -214
- package/dist/CloudEditor-DFyuRxUV.js +0 -926
- package/dist/ParagraphEditor-CcMPnbDr.js +0 -652
- package/dist/TemplateScoringPanel-D58A23Vq.js +0 -249
- package/dist/cdn/chunks/AiChatSidebar-CmPTbTFG.js +0 -2
- package/dist/cdn/chunks/AiFeatureMenu-lxVm1RjH.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js +0 -900
- package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-BOelj4Ca.js +0 -2
- package/dist/cdn/chunks/DesignReferenceSidebar-Bf6rg0A7.js +0 -2
- package/dist/cdn/chunks/ModuleBrowserModal-CxDXzkKS.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js +0 -503
- package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-DVna2xUl.js.map +0 -1
- package/dist/cdn/chunks/SnapshotHistory-BFF2SsTN.js +0 -2
- package/dist/cdn/chunks/TemplateScoringPanel-gi8wc_m7.js +0 -2
- package/dist/cdn/chunks/TestEmailModal-Qtd6aC-6.js +0 -2
- package/dist/cdn/chunks/de-BB3dgVOc.js.map +0 -1
- package/dist/cdn/chunks/dist-B6AUkMyh.js +0 -2
- package/dist/cdn/chunks/dist-B878xb_62.js.map +0 -1
- package/dist/cdn/chunks/dist-Bf1Op9A1.js +0 -2
- package/dist/cdn/chunks/dist-BkETaOfw.js +0 -2
- package/dist/cdn/chunks/dist-CJcMnY7o.js +0 -2
- package/dist/cdn/chunks/dist-CWsl6S1K.js +0 -2
- package/dist/cdn/chunks/dist-CllLxIMQ.js +0 -2
- package/dist/cdn/chunks/dist-Cs0wFwdw.js +0 -2
- package/dist/cdn/chunks/dist-DLWHlekl.js +0 -2
- package/dist/cdn/chunks/dist-DS3_HVpX.js +0 -2
- package/dist/cdn/chunks/dist-DTXopj1a.js +0 -2
- package/dist/cdn/chunks/dist-DnwLoNLm.js +0 -2
- package/dist/cdn/chunks/draggable-BQNU47zu.js.map +0 -1
- package/dist/cdn/chunks/en-DeDcpnoS.js.map +0 -1
- package/dist/cdn/chunks/features-ofOGnSC0.js.map +0 -1
- package/dist/cdn/chunks/icons-bIb7PBOE.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-C1VIYISn.js.map +0 -1
- package/dist/cdn/chunks/pusher-DJPhQnE8.js.map +0 -1
- package/dist/cdn/chunks/styles-DQFExz-T.js.map +0 -1
- package/dist/cdn/chunks/tiptap-DplY-S-k.js.map +0 -1
- package/dist/dist-Dxnd0GRf.js +0 -5
- package/dist/styles-CgLaxDfu.js +0 -3428
- /package/dist/{de-D7TLGIPA.js → de-Dh8ON-dm.js} +0 -0
- /package/dist/{emojiData-BfWQS72m.js → emojiData-Qc8mH_zW.js} +0 -0
- /package/dist/{en-DvtiEMwP.js → en-C7IShRSD.js} +0 -0
- /package/dist/{formatRelativeTime-DX3FgqN9.js → formatRelativeTime-D8f6NR7i.js} +0 -0
- /package/dist/{readableTextColor-LDlmVEUv.js → readableTextColor-B809bF5J.js} +0 -0
- /package/dist/{useMergeTag-BZ3X0bNr.js → useMergeTag-CSXcnFBc.js} +0 -0
|
@@ -1,45 +1,24 @@
|
|
|
1
|
-
import { a as e,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
var Qe = Object.create, $e = Object.defineProperty, et = Object.getOwnPropertyDescriptor, tt = Object.getOwnPropertyNames, nt = Object.getPrototypeOf, rt = Object.prototype.hasOwnProperty, it = (e, t) => () => (e && (t = e(e = 0)), t), at = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), ot = (e, t) => {
|
|
15
|
-
let n = {};
|
|
16
|
-
for (var r in e) $e(n, r, {
|
|
17
|
-
get: e[r],
|
|
18
|
-
enumerable: !0
|
|
19
|
-
});
|
|
20
|
-
return t || $e(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
21
|
-
}, st = (e, t, n, r) => {
|
|
22
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i = tt(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !rt.call(e, s) && s !== n && $e(e, s, {
|
|
23
|
-
get: ((e) => t[e]).bind(null, s),
|
|
24
|
-
enumerable: !(r = et(t, s)) || r.enumerable
|
|
25
|
-
});
|
|
26
|
-
return e;
|
|
27
|
-
}, ct = (e, t, n) => (n = e == null ? {} : Qe(nt(e)), st(t || !e || !e.__esModule ? $e(n, "default", {
|
|
28
|
-
value: e,
|
|
29
|
-
enumerable: !0
|
|
30
|
-
}) : n, e)), lt = (e) => rt.call(e, "module.exports") ? e["module.exports"] : st($e({}, "__esModule", { value: !0 }), e), ut = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
31
|
-
if (typeof require < "u") return require.apply(this, arguments);
|
|
32
|
-
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
33
|
-
});
|
|
34
|
-
//#endregion
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./rolldown-runtime-gEudmnaM.js";
|
|
2
|
+
import { a as o, c as s, i as c, n as l, o as u, r as d, s as f } from "./dist-Ac4o1O4a.js";
|
|
3
|
+
import { C as p, S as m, T as h, _ as g, a as _, d as v, f as y, g as b, h as x, i as S, l as C, m as ee, n as w, o as T, p as te, s as E, u as ne, v as re, w as ie, y as ae } from "./keys-C0MQRs8d.js";
|
|
4
|
+
import { t as oe } from "./useI18n-D6m7ZUgY.js";
|
|
5
|
+
import { n as se, t as ce } from "./_plugin-vue_export-helper-5TQrnOhO.js";
|
|
6
|
+
import { t as le } from "./message-circle-Dpcnc2oa.js";
|
|
7
|
+
import { t as ue } from "./trash-2-CZkMtjeC.js";
|
|
8
|
+
import { t as de } from "./triangle-alert-Dvt51agD.js";
|
|
9
|
+
import { t as fe } from "./LoadingTrack--aUassFH.js";
|
|
10
|
+
import { t as pe } from "./useMergeTag-CSXcnFBc.js";
|
|
11
|
+
import { Fragment as D, computed as O, createBlock as me, createCommentVNode as he, createElementBlock as k, createElementVNode as A, createTextVNode as ge, createVNode as j, defineAsyncComponent as _e, defineComponent as M, getCurrentScope as ve, inject as ye, nextTick as be, normalizeClass as xe, normalizeStyle as N, onBeforeUnmount as Se, onMounted as Ce, onScopeDispose as we, openBlock as P, provide as F, ref as I, renderList as Te, renderSlot as Ee, resolveDynamicComponent as De, shallowRef as Oe, toDisplayString as L, triggerRef as ke, unref as R, vShow as Ae, watch as je, withCtx as Me, withDirectives as Ne, withKeys as Pe, withModifiers as Fe } from "vue";
|
|
12
|
+
import { useAutoSave as Ie, useBlockActions as Le, useConditionPreview as Re, useDataSourceFetch as ze, useHistory as Be, useHistoryInterceptor as Ve } from "@templatical/core";
|
|
13
|
+
import { HEADING_LEVEL_FONT_SIZE as He, containsMergeTag as Ue, createButtonBlock as We, createCountdownBlock as Ge, createCustomBlock as Ke, createDividerBlock as qe, createHtmlBlock as Je, createImageBlock as Ye, createMenuBlock as Xe, createParagraphBlock as Ze, createSectionBlock as Qe, createSocialIconsBlock as $e, createSpacerBlock as et, createTableBlock as tt, createTitleBlock as nt, createVideoBlock as rt, resolveHtmlLogicMergeTagLabels as it, resolveHtmlMergeTagLabels as at, resolveSyntax as ot } from "@templatical/types";
|
|
35
14
|
//#region src/utils/blockTypeLabels.ts
|
|
36
|
-
function
|
|
15
|
+
function st(e, t) {
|
|
37
16
|
return t.blocks[e] ?? e;
|
|
38
17
|
}
|
|
39
18
|
//#endregion
|
|
40
19
|
//#region src/composables/useKeyboardReorder.ts
|
|
41
|
-
function
|
|
42
|
-
let n =
|
|
20
|
+
function ct(e, t) {
|
|
21
|
+
let n = I(null), r = I(""), i = null;
|
|
43
22
|
function a(t) {
|
|
44
23
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
45
24
|
if (r !== -1) return {
|
|
@@ -65,7 +44,7 @@ function ft(e, t) {
|
|
|
65
44
|
let r = a(n);
|
|
66
45
|
if (!r) return "";
|
|
67
46
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
68
|
-
return i ?
|
|
47
|
+
return i ? st(i.type, t.t) : "";
|
|
69
48
|
}
|
|
70
49
|
function s(t, n) {
|
|
71
50
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -134,13 +113,13 @@ function ft(e, t) {
|
|
|
134
113
|
}
|
|
135
114
|
//#endregion
|
|
136
115
|
//#region src/composables/useUiTheme.ts
|
|
137
|
-
function
|
|
138
|
-
let t =
|
|
139
|
-
return { resolvedTheme:
|
|
116
|
+
function lt(e) {
|
|
117
|
+
let t = c("(prefers-color-scheme: dark)");
|
|
118
|
+
return { resolvedTheme: O(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
140
119
|
}
|
|
141
120
|
//#endregion
|
|
142
121
|
//#region src/composables/useThemeStyles.ts
|
|
143
|
-
var
|
|
122
|
+
var ut = {
|
|
144
123
|
bg: "--tpl-bg",
|
|
145
124
|
bgElevated: "--tpl-bg-elevated",
|
|
146
125
|
bgHover: "--tpl-bg-hover",
|
|
@@ -164,10 +143,10 @@ var mt = {
|
|
|
164
143
|
dangerLight: "--tpl-danger-light",
|
|
165
144
|
canvasBg: "--tpl-canvas-bg"
|
|
166
145
|
};
|
|
167
|
-
function
|
|
168
|
-
return { themeStyles:
|
|
146
|
+
function dt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
147
|
+
return { themeStyles: O(() => {
|
|
169
148
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
170
|
-
if (a) for (let [e, t] of Object.entries(
|
|
149
|
+
if (a) for (let [e, t] of Object.entries(ut)) {
|
|
171
150
|
let n = a[e];
|
|
172
151
|
n && (r[t] = n);
|
|
173
152
|
}
|
|
@@ -175,16 +154,36 @@ function ht({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
175
154
|
}) };
|
|
176
155
|
}
|
|
177
156
|
//#endregion
|
|
157
|
+
//#region src/utils/logger.ts
|
|
158
|
+
var ft = "[Templatical]";
|
|
159
|
+
function pt() {
|
|
160
|
+
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
161
|
+
}
|
|
162
|
+
var mt = {
|
|
163
|
+
warn(...e) {
|
|
164
|
+
console.warn(ft, ...e);
|
|
165
|
+
},
|
|
166
|
+
error(...e) {
|
|
167
|
+
console.error(ft, ...e);
|
|
168
|
+
},
|
|
169
|
+
debug(...e) {
|
|
170
|
+
pt() || console.debug(ft, ...e);
|
|
171
|
+
},
|
|
172
|
+
info(...e) {
|
|
173
|
+
pt() || console.info(ft, ...e);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
//#endregion
|
|
178
177
|
//#region src/composables/useBlockRegistry.ts
|
|
179
|
-
function
|
|
180
|
-
let e =
|
|
178
|
+
function ht() {
|
|
179
|
+
let e = Oe(/* @__PURE__ */ new Map());
|
|
181
180
|
function t(t, n) {
|
|
182
|
-
e.value.set(t, n),
|
|
181
|
+
e.value.set(t, n), ke(e);
|
|
183
182
|
}
|
|
184
183
|
function n(t, n) {
|
|
185
184
|
let r = `custom:${t.type}`, i = {
|
|
186
185
|
component: n,
|
|
187
|
-
createBlock: () =>
|
|
186
|
+
createBlock: () => Ke(t),
|
|
188
187
|
sidebarItem: {
|
|
189
188
|
type: r,
|
|
190
189
|
label: t.name,
|
|
@@ -194,7 +193,7 @@ function gt() {
|
|
|
194
193
|
},
|
|
195
194
|
definition: t
|
|
196
195
|
};
|
|
197
|
-
e.value.set(r, i),
|
|
196
|
+
e.value.set(r, i), ke(e);
|
|
198
197
|
}
|
|
199
198
|
function r(t) {
|
|
200
199
|
if (t.type === "custom") {
|
|
@@ -222,13 +221,13 @@ function gt() {
|
|
|
222
221
|
let t = o(e.customType);
|
|
223
222
|
if (!t) return s("Block definition not found");
|
|
224
223
|
try {
|
|
225
|
-
let { Liquid: n } = await import("./liquid.browser-
|
|
224
|
+
let { Liquid: n } = await import("./liquid.browser-C02owkex.js");
|
|
226
225
|
return await new n({
|
|
227
226
|
strictVariables: !1,
|
|
228
227
|
strictFilters: !1
|
|
229
228
|
}).parseAndRender(t.template, e.fieldValues);
|
|
230
229
|
} catch (t) {
|
|
231
|
-
return
|
|
230
|
+
return mt.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
232
231
|
}
|
|
233
232
|
}
|
|
234
233
|
function l(t) {
|
|
@@ -247,75 +246,75 @@ function gt() {
|
|
|
247
246
|
}
|
|
248
247
|
//#endregion
|
|
249
248
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
250
|
-
var
|
|
249
|
+
var gt = [
|
|
251
250
|
{
|
|
252
251
|
type: "section",
|
|
253
252
|
label: "Section",
|
|
254
|
-
createBlock:
|
|
253
|
+
createBlock: Qe
|
|
255
254
|
},
|
|
256
255
|
{
|
|
257
256
|
type: "title",
|
|
258
257
|
label: "Title",
|
|
259
|
-
createBlock:
|
|
258
|
+
createBlock: nt
|
|
260
259
|
},
|
|
261
260
|
{
|
|
262
261
|
type: "paragraph",
|
|
263
262
|
label: "Paragraph",
|
|
264
|
-
createBlock:
|
|
263
|
+
createBlock: Ze
|
|
265
264
|
},
|
|
266
265
|
{
|
|
267
266
|
type: "image",
|
|
268
267
|
label: "Image",
|
|
269
|
-
createBlock:
|
|
268
|
+
createBlock: Ye
|
|
270
269
|
},
|
|
271
270
|
{
|
|
272
271
|
type: "button",
|
|
273
272
|
label: "Button",
|
|
274
|
-
createBlock:
|
|
273
|
+
createBlock: We
|
|
275
274
|
},
|
|
276
275
|
{
|
|
277
276
|
type: "divider",
|
|
278
277
|
label: "Divider",
|
|
279
|
-
createBlock:
|
|
278
|
+
createBlock: qe
|
|
280
279
|
},
|
|
281
280
|
{
|
|
282
281
|
type: "video",
|
|
283
282
|
label: "Video",
|
|
284
|
-
createBlock:
|
|
283
|
+
createBlock: rt
|
|
285
284
|
},
|
|
286
285
|
{
|
|
287
286
|
type: "social",
|
|
288
287
|
label: "Social",
|
|
289
|
-
createBlock:
|
|
288
|
+
createBlock: $e
|
|
290
289
|
},
|
|
291
290
|
{
|
|
292
291
|
type: "menu",
|
|
293
292
|
label: "Menu",
|
|
294
|
-
createBlock:
|
|
293
|
+
createBlock: Xe
|
|
295
294
|
},
|
|
296
295
|
{
|
|
297
296
|
type: "table",
|
|
298
297
|
label: "Table",
|
|
299
|
-
createBlock:
|
|
298
|
+
createBlock: tt
|
|
300
299
|
},
|
|
301
300
|
{
|
|
302
301
|
type: "spacer",
|
|
303
302
|
label: "Spacer",
|
|
304
|
-
createBlock:
|
|
303
|
+
createBlock: et
|
|
305
304
|
},
|
|
306
305
|
{
|
|
307
306
|
type: "html",
|
|
308
307
|
label: "HTML",
|
|
309
|
-
createBlock:
|
|
308
|
+
createBlock: Je
|
|
310
309
|
},
|
|
311
310
|
{
|
|
312
311
|
type: "countdown",
|
|
313
312
|
label: "Countdown",
|
|
314
|
-
createBlock:
|
|
313
|
+
createBlock: Ge
|
|
315
314
|
}
|
|
316
315
|
];
|
|
317
|
-
function
|
|
318
|
-
for (let n of
|
|
316
|
+
function _t(e, t) {
|
|
317
|
+
for (let n of gt) {
|
|
319
318
|
let r = t[n.type];
|
|
320
319
|
r && e.registerBuiltIn(n.type, {
|
|
321
320
|
component: r,
|
|
@@ -330,18 +329,18 @@ function vt(e, t) {
|
|
|
330
329
|
}
|
|
331
330
|
//#endregion
|
|
332
331
|
//#region src/utils/keyboardShortcuts.ts
|
|
333
|
-
function
|
|
332
|
+
function vt(e) {
|
|
334
333
|
let t = e.target;
|
|
335
334
|
return t.isContentEditable || t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.tagName === "SELECT";
|
|
336
335
|
}
|
|
337
|
-
function
|
|
336
|
+
function yt(e, t) {
|
|
338
337
|
let n = e.metaKey || e.ctrlKey;
|
|
339
338
|
if (n && e.key === "s") {
|
|
340
339
|
e.preventDefault(), t.onSave?.();
|
|
341
340
|
return;
|
|
342
341
|
}
|
|
343
342
|
if (n && e.key.toLowerCase() === "z") {
|
|
344
|
-
if (
|
|
343
|
+
if (vt(e)) return;
|
|
345
344
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
346
345
|
return;
|
|
347
346
|
}
|
|
@@ -349,18 +348,18 @@ function bt(e, t) {
|
|
|
349
348
|
t.selectBlock(null);
|
|
350
349
|
return;
|
|
351
350
|
}
|
|
352
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
351
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !vt(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
353
352
|
}
|
|
354
353
|
//#endregion
|
|
355
354
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
356
|
-
var
|
|
355
|
+
var bt = { class: "tpl:text-center" }, xt = ["href"], St = /* @__PURE__ */ M({
|
|
357
356
|
__name: "ButtonBlock",
|
|
358
357
|
props: {
|
|
359
358
|
block: {},
|
|
360
359
|
viewport: {}
|
|
361
360
|
},
|
|
362
361
|
setup(e) {
|
|
363
|
-
let t = e, n =
|
|
362
|
+
let t = e, n = O(() => {
|
|
364
363
|
let e = {
|
|
365
364
|
display: "inline-block",
|
|
366
365
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
@@ -374,101 +373,101 @@ var xt = { class: "tpl:text-center" }, St = ["href"], Ct = /* @__PURE__ */ P({
|
|
|
374
373
|
};
|
|
375
374
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
376
375
|
});
|
|
377
|
-
return (t, r) => (
|
|
376
|
+
return (t, r) => (P(), k("div", bt, [A("a", {
|
|
378
377
|
href: e.block.url || "#",
|
|
379
|
-
style:
|
|
378
|
+
style: N(n.value),
|
|
380
379
|
class: "tpl:cursor-default",
|
|
381
|
-
onClick: r[0] ||=
|
|
382
|
-
},
|
|
380
|
+
onClick: r[0] ||= Fe(() => {}, ["prevent"])
|
|
381
|
+
}, L(e.block.text), 13, xt)]));
|
|
383
382
|
}
|
|
384
|
-
}),
|
|
383
|
+
}), Ct = {
|
|
385
384
|
key: 0,
|
|
386
385
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
387
|
-
},
|
|
386
|
+
}, wt = {
|
|
388
387
|
key: 1,
|
|
389
388
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-4 tpl:text-xs tpl:text-[var(--tpl-text-dim)] tpl:opacity-50"
|
|
390
|
-
},
|
|
389
|
+
}, Tt = { class: "tpl:text-center" }, Et = /* @__PURE__ */ M({
|
|
391
390
|
__name: "CountdownBlock",
|
|
392
391
|
props: {
|
|
393
392
|
block: {},
|
|
394
393
|
viewport: {}
|
|
395
394
|
},
|
|
396
395
|
setup(e) {
|
|
397
|
-
let t = e, { t: n } =
|
|
398
|
-
|
|
396
|
+
let t = e, { t: n } = oe(), r = I(Date.now());
|
|
397
|
+
u(() => {
|
|
399
398
|
r.value = Date.now();
|
|
400
399
|
}, 1e3);
|
|
401
|
-
let
|
|
400
|
+
let i = O(() => {
|
|
402
401
|
if (!t.block.targetDate) return null;
|
|
403
402
|
let e = new Date(t.block.targetDate);
|
|
404
403
|
return isNaN(e.getTime()) ? null : e.getTime();
|
|
405
|
-
}),
|
|
406
|
-
if (!
|
|
404
|
+
}), a = O(() => i.value ? r.value >= i.value : !1), o = O(() => {
|
|
405
|
+
if (!i.value || a.value) return {
|
|
407
406
|
days: 0,
|
|
408
407
|
hours: 0,
|
|
409
408
|
minutes: 0,
|
|
410
409
|
seconds: 0
|
|
411
410
|
};
|
|
412
|
-
let e =
|
|
411
|
+
let e = i.value - r.value, t = Math.floor(e / 1e3);
|
|
413
412
|
return {
|
|
414
413
|
days: Math.floor(t / 86400),
|
|
415
414
|
hours: Math.floor(t % 86400 / 3600),
|
|
416
415
|
minutes: Math.floor(t % 3600 / 60),
|
|
417
416
|
seconds: t % 60
|
|
418
417
|
};
|
|
419
|
-
}),
|
|
418
|
+
}), s = O(() => {
|
|
420
419
|
let e = [];
|
|
421
420
|
return t.block.showDays && e.push({
|
|
422
|
-
value: String(
|
|
421
|
+
value: String(o.value.days).padStart(2, "0"),
|
|
423
422
|
label: t.block.labelDays
|
|
424
423
|
}), t.block.showHours && e.push({
|
|
425
|
-
value: String(
|
|
424
|
+
value: String(o.value.hours).padStart(2, "0"),
|
|
426
425
|
label: t.block.labelHours
|
|
427
426
|
}), t.block.showMinutes && e.push({
|
|
428
|
-
value: String(
|
|
427
|
+
value: String(o.value.minutes).padStart(2, "0"),
|
|
429
428
|
label: t.block.labelMinutes
|
|
430
429
|
}), t.block.showSeconds && e.push({
|
|
431
|
-
value: String(
|
|
430
|
+
value: String(o.value.seconds).padStart(2, "0"),
|
|
432
431
|
label: t.block.labelSeconds
|
|
433
432
|
}), e;
|
|
434
|
-
}),
|
|
433
|
+
}), c = O(() => ({
|
|
435
434
|
backgroundColor: t.block.backgroundColor,
|
|
436
435
|
fontFamily: t.block.fontFamily || "inherit"
|
|
437
|
-
})),
|
|
436
|
+
})), l = O(() => ({
|
|
438
437
|
fontSize: `${t.block.digitFontSize}px`,
|
|
439
438
|
fontWeight: "bold",
|
|
440
439
|
color: t.block.digitColor,
|
|
441
440
|
lineHeight: "1.2"
|
|
442
|
-
})), d =
|
|
441
|
+
})), d = O(() => ({
|
|
443
442
|
fontSize: `${t.block.labelFontSize}px`,
|
|
444
443
|
color: t.block.labelColor,
|
|
445
444
|
marginTop: "4px"
|
|
446
|
-
})), f =
|
|
445
|
+
})), f = O(() => ({
|
|
447
446
|
fontSize: `${t.block.digitFontSize}px`,
|
|
448
447
|
color: t.block.digitColor,
|
|
449
448
|
fontFamily: t.block.fontFamily || "inherit"
|
|
450
449
|
}));
|
|
451
|
-
return (t, r) => e.block.targetDate ?
|
|
450
|
+
return (t, r) => e.block.targetDate ? a.value && e.block.hideOnExpiry ? (P(), k("div", wt, L(R(n).countdown.hidden), 1)) : a.value ? (P(), k("div", {
|
|
452
451
|
key: 2,
|
|
453
|
-
style:
|
|
452
|
+
style: N(c.value),
|
|
454
453
|
class: "tpl:py-4 tpl:text-center"
|
|
455
|
-
}, [
|
|
454
|
+
}, [A("span", { style: N({
|
|
456
455
|
fontSize: `${e.block.digitFontSize}px`,
|
|
457
456
|
color: e.block.digitColor
|
|
458
|
-
}) },
|
|
457
|
+
}) }, L(e.block.expiredMessage), 5)], 4)) : (P(), k("div", {
|
|
459
458
|
key: 3,
|
|
460
|
-
style:
|
|
459
|
+
style: N(c.value),
|
|
461
460
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:py-4"
|
|
462
|
-
}, [(
|
|
461
|
+
}, [(P(!0), k(D, null, Te(s.value, (t, n) => (P(), k(D, { key: t.label }, [n > 0 ? (P(), k("span", {
|
|
463
462
|
key: 0,
|
|
464
|
-
style:
|
|
463
|
+
style: N(f.value),
|
|
465
464
|
class: "tpl:self-start"
|
|
466
|
-
},
|
|
465
|
+
}, L(e.block.separator), 5)) : he("", !0), A("div", Tt, [A("div", { style: N(l.value) }, L(t.value), 5), A("div", { style: N(d.value) }, L(t.label), 5)])], 64))), 128))], 4)) : (P(), k("div", Ct, L(R(n).countdown.setDate), 1));
|
|
467
466
|
}
|
|
468
|
-
}),
|
|
467
|
+
}), Dt = se("bookmark", [["path", {
|
|
469
468
|
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",
|
|
470
469
|
key: "oz39mx"
|
|
471
|
-
}]]),
|
|
470
|
+
}]]), Ot = se("box", [
|
|
472
471
|
["path", {
|
|
473
472
|
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
|
|
474
473
|
key: "hh9hay"
|
|
@@ -481,13 +480,13 @@ var xt = { class: "tpl:text-center" }, St = ["href"], Ct = /* @__PURE__ */ P({
|
|
|
481
480
|
d: "M12 22V12",
|
|
482
481
|
key: "d0xqtd"
|
|
483
482
|
}]
|
|
484
|
-
]),
|
|
483
|
+
]), kt = se("code", [["path", {
|
|
485
484
|
d: "m16 18 6-6-6-6",
|
|
486
485
|
key: "eg8j8"
|
|
487
486
|
}], ["path", {
|
|
488
487
|
d: "m8 6-6 6 6 6",
|
|
489
488
|
key: "ppft3o"
|
|
490
|
-
}]]),
|
|
489
|
+
}]]), At = se("copy", [["rect", {
|
|
491
490
|
width: "14",
|
|
492
491
|
height: "14",
|
|
493
492
|
x: "8",
|
|
@@ -498,7 +497,7 @@ var xt = { class: "tpl:text-center" }, St = ["href"], Ct = /* @__PURE__ */ P({
|
|
|
498
497
|
}], ["path", {
|
|
499
498
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
500
499
|
key: "zix9uf"
|
|
501
|
-
}]]),
|
|
500
|
+
}]]), jt = se("eye-off", [
|
|
502
501
|
["path", {
|
|
503
502
|
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
504
503
|
key: "ct8e1f"
|
|
@@ -515,10 +514,10 @@ var xt = { class: "tpl:text-center" }, St = ["href"], Ct = /* @__PURE__ */ P({
|
|
|
515
514
|
d: "m2 2 20 20",
|
|
516
515
|
key: "1ooewy"
|
|
517
516
|
}]
|
|
518
|
-
]),
|
|
517
|
+
]), Mt = se("funnel", [["path", {
|
|
519
518
|
d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
|
|
520
519
|
key: "sc7q7i"
|
|
521
|
-
}]]),
|
|
520
|
+
}]]), Nt = se("grip-vertical", [
|
|
522
521
|
["circle", {
|
|
523
522
|
cx: "9",
|
|
524
523
|
cy: "12",
|
|
@@ -555,7 +554,7 @@ var xt = { class: "tpl:text-center" }, St = ["href"], Ct = /* @__PURE__ */ P({
|
|
|
555
554
|
r: "1",
|
|
556
555
|
key: "f4zoj3"
|
|
557
556
|
}]
|
|
558
|
-
]),
|
|
557
|
+
]), Pt = se("image", [
|
|
559
558
|
["rect", {
|
|
560
559
|
width: "18",
|
|
561
560
|
height: "18",
|
|
@@ -575,13 +574,13 @@ var xt = { class: "tpl:text-center" }, St = ["href"], Ct = /* @__PURE__ */ P({
|
|
|
575
574
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
576
575
|
key: "1xmnt7"
|
|
577
576
|
}]
|
|
578
|
-
]),
|
|
577
|
+
]), Ft = se("navigation", [["polygon", {
|
|
579
578
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
580
579
|
key: "1ltx0t"
|
|
581
|
-
}]]),
|
|
580
|
+
}]]), It = se("puzzle", [["path", {
|
|
582
581
|
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",
|
|
583
582
|
key: "w46dr5"
|
|
584
|
-
}]]),
|
|
583
|
+
}]]), Lt = se("share-2", [
|
|
585
584
|
["circle", {
|
|
586
585
|
cx: "18",
|
|
587
586
|
cy: "5",
|
|
@@ -614,7 +613,7 @@ var xt = { class: "tpl:text-center" }, St = ["href"], Ct = /* @__PURE__ */ P({
|
|
|
614
613
|
y2: "10.49",
|
|
615
614
|
key: "1n3mei"
|
|
616
615
|
}]
|
|
617
|
-
]),
|
|
616
|
+
]), Rt = se("table", [
|
|
618
617
|
["path", {
|
|
619
618
|
d: "M12 3v18",
|
|
620
619
|
key: "108xh3"
|
|
@@ -635,7 +634,7 @@ var xt = { class: "tpl:text-center" }, St = ["href"], Ct = /* @__PURE__ */ P({
|
|
|
635
634
|
d: "M3 15h18",
|
|
636
635
|
key: "5xshup"
|
|
637
636
|
}]
|
|
638
|
-
]),
|
|
637
|
+
]), zt = se("video", [["path", {
|
|
639
638
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
640
639
|
key: "ftymec"
|
|
641
640
|
}], ["rect", {
|
|
@@ -645,95 +644,95 @@ var xt = { class: "tpl:text-center" }, St = ["href"], Ct = /* @__PURE__ */ P({
|
|
|
645
644
|
height: "12",
|
|
646
645
|
rx: "2",
|
|
647
646
|
key: "158x01"
|
|
648
|
-
}]]),
|
|
647
|
+
}]]), Bt = ["innerHTML"], Vt = [
|
|
649
648
|
"src",
|
|
650
649
|
"width",
|
|
651
650
|
"height"
|
|
652
|
-
],
|
|
651
|
+
], Ht = /* @__PURE__ */ M({
|
|
653
652
|
__name: "CustomBlockIcon",
|
|
654
653
|
props: {
|
|
655
654
|
icon: {},
|
|
656
655
|
size: {}
|
|
657
656
|
},
|
|
658
657
|
setup(e) {
|
|
659
|
-
let t = e, n =
|
|
660
|
-
return (t, a) => r.value ? (
|
|
658
|
+
let t = e, n = O(() => t.size ?? 20), r = O(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = O(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
|
|
659
|
+
return (t, a) => r.value ? (P(), k("span", {
|
|
661
660
|
key: 0,
|
|
662
661
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
663
|
-
style:
|
|
662
|
+
style: N({
|
|
664
663
|
width: `${n.value}px`,
|
|
665
664
|
height: `${n.value}px`
|
|
666
665
|
}),
|
|
667
666
|
innerHTML: e.icon
|
|
668
|
-
}, null, 12,
|
|
667
|
+
}, null, 12, Bt)) : i.value ? (P(), k("img", {
|
|
669
668
|
key: 1,
|
|
670
669
|
src: e.icon,
|
|
671
670
|
width: n.value,
|
|
672
671
|
height: n.value,
|
|
673
672
|
class: "tpl:inline-block",
|
|
674
673
|
alt: ""
|
|
675
|
-
}, null, 8,
|
|
674
|
+
}, null, 8, Vt)) : (P(), me(R(Ot), {
|
|
676
675
|
key: 2,
|
|
677
676
|
size: n.value,
|
|
678
677
|
"stroke-width": 1.5
|
|
679
678
|
}, null, 8, ["size"]));
|
|
680
679
|
}
|
|
681
|
-
}),
|
|
682
|
-
function
|
|
680
|
+
}), Ut = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
681
|
+
function Wt(e, t) {
|
|
683
682
|
let n = null, r = null;
|
|
684
683
|
function i() {
|
|
685
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
684
|
+
return e.value ? Array.from(e.value.querySelectorAll(Ut)).filter((e) => e.offsetParent !== null) : [];
|
|
686
685
|
}
|
|
687
|
-
function
|
|
686
|
+
function a(e) {
|
|
688
687
|
if (e.key !== "Tab") return;
|
|
689
688
|
let t = i();
|
|
690
689
|
if (t.length === 0) return;
|
|
691
690
|
let n = t[0], r = t[t.length - 1];
|
|
692
691
|
e.shiftKey ? document.activeElement === n && (e.preventDefault(), r.focus()) : document.activeElement === r && (e.preventDefault(), n.focus());
|
|
693
692
|
}
|
|
694
|
-
function
|
|
693
|
+
function o() {
|
|
695
694
|
n = document.activeElement, requestAnimationFrame(() => {
|
|
696
695
|
let t = i();
|
|
697
696
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
698
|
-
}), r =
|
|
697
|
+
}), r = d(e, "keydown", a);
|
|
699
698
|
}
|
|
700
|
-
function
|
|
699
|
+
function s() {
|
|
701
700
|
r?.(), r = null, n && n.focus && (n.focus(), n = null);
|
|
702
701
|
}
|
|
703
|
-
let
|
|
704
|
-
e && t ?
|
|
702
|
+
let c = je([t, e], ([e, t]) => {
|
|
703
|
+
e && t ? o() : s();
|
|
705
704
|
}, { flush: "post" });
|
|
706
|
-
|
|
707
|
-
|
|
705
|
+
we(() => {
|
|
706
|
+
c(), s();
|
|
708
707
|
});
|
|
709
708
|
}
|
|
710
709
|
//#endregion
|
|
711
710
|
//#region src/composables/useEmoji.ts
|
|
712
|
-
function
|
|
713
|
-
let [e,
|
|
714
|
-
|
|
715
|
-
if (e &&
|
|
716
|
-
let { emojiCategories: e } = await import("./emojiData-
|
|
717
|
-
|
|
711
|
+
function Gt() {
|
|
712
|
+
let [e, t] = s(!1), n = Oe([]);
|
|
713
|
+
je(e, async (e) => {
|
|
714
|
+
if (e && n.value.length === 0) {
|
|
715
|
+
let { emojiCategories: e } = await import("./emojiData-Qc8mH_zW.js");
|
|
716
|
+
n.value = e;
|
|
718
717
|
}
|
|
719
718
|
});
|
|
720
|
-
function
|
|
721
|
-
|
|
719
|
+
function r() {
|
|
720
|
+
t();
|
|
722
721
|
}
|
|
723
|
-
function
|
|
722
|
+
function i() {
|
|
724
723
|
e.value = !1;
|
|
725
724
|
}
|
|
726
725
|
return {
|
|
727
|
-
categories:
|
|
726
|
+
categories: n,
|
|
728
727
|
isOpen: e,
|
|
729
|
-
toggle:
|
|
730
|
-
close:
|
|
728
|
+
toggle: r,
|
|
729
|
+
close: i
|
|
731
730
|
};
|
|
732
731
|
}
|
|
733
732
|
//#endregion
|
|
734
733
|
//#region src/composables/useDragDrop.ts
|
|
735
|
-
function
|
|
736
|
-
let { onBlockMove: t, onBlockAdd: n } = e, r =
|
|
734
|
+
function Kt(e) {
|
|
735
|
+
let { onBlockMove: t, onBlockAdd: n } = e, r = I(!1), i = I(null), a = I(null);
|
|
737
736
|
function o(e) {
|
|
738
737
|
r.value = !0, i.value = e;
|
|
739
738
|
}
|
|
@@ -782,7 +781,7 @@ function qt(e) {
|
|
|
782
781
|
}
|
|
783
782
|
//#endregion
|
|
784
783
|
//#region src/composables/useFonts.ts
|
|
785
|
-
var
|
|
784
|
+
var qt = [
|
|
786
785
|
{
|
|
787
786
|
value: "Arial",
|
|
788
787
|
label: "Arial"
|
|
@@ -811,7 +810,7 @@ var Jt = [
|
|
|
811
810
|
value: "Courier New",
|
|
812
811
|
label: "Courier New"
|
|
813
812
|
}
|
|
814
|
-
],
|
|
813
|
+
], Jt = {
|
|
815
814
|
arial: "Arial, sans-serif",
|
|
816
815
|
helvetica: "Helvetica, sans-serif",
|
|
817
816
|
georgia: "Georgia, serif",
|
|
@@ -819,14 +818,14 @@ var Jt = [
|
|
|
819
818
|
verdana: "Verdana, sans-serif",
|
|
820
819
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
821
820
|
"courier new": "'Courier New', monospace"
|
|
822
|
-
},
|
|
823
|
-
function
|
|
824
|
-
let t =
|
|
821
|
+
}, Yt = "Arial, sans-serif";
|
|
822
|
+
function Xt(e) {
|
|
823
|
+
let t = I(e?.customFonts ?? []), n = I(!0), r = I(!1), i = O(() => e?.defaultFallback ?? Yt);
|
|
825
824
|
function a(e) {
|
|
826
825
|
n.value = e;
|
|
827
826
|
}
|
|
828
|
-
let o =
|
|
829
|
-
let e = [...
|
|
827
|
+
let o = O(() => {
|
|
828
|
+
let e = [...qt];
|
|
830
829
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
831
830
|
let r = t.value.map((e) => ({
|
|
832
831
|
value: e.name,
|
|
@@ -839,19 +838,19 @@ function Zt(e) {
|
|
|
839
838
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
840
839
|
}
|
|
841
840
|
function c(e) {
|
|
842
|
-
return
|
|
841
|
+
return qt.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
843
842
|
}
|
|
844
843
|
function l() {
|
|
845
844
|
if (e?.defaultFont) {
|
|
846
|
-
if (!n.value && !c(e.defaultFont)) return
|
|
845
|
+
if (!n.value && !c(e.defaultFont)) return Yt;
|
|
847
846
|
if (s(e.defaultFont)) {
|
|
848
847
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
849
848
|
if (t) return t.value;
|
|
850
849
|
}
|
|
851
850
|
}
|
|
852
|
-
return
|
|
851
|
+
return Yt;
|
|
853
852
|
}
|
|
854
|
-
let u =
|
|
853
|
+
let u = O(() => l());
|
|
855
854
|
function d(e) {
|
|
856
855
|
if (!e) return i.value;
|
|
857
856
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
@@ -859,7 +858,7 @@ function Zt(e) {
|
|
|
859
858
|
let e = n.fallback ?? i.value;
|
|
860
859
|
return `'${n.name}', ${e}`;
|
|
861
860
|
}
|
|
862
|
-
return
|
|
861
|
+
return Jt[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
863
862
|
}
|
|
864
863
|
let f = [];
|
|
865
864
|
async function p() {
|
|
@@ -875,7 +874,7 @@ function Zt(e) {
|
|
|
875
874
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
876
875
|
}), f.push(t);
|
|
877
876
|
} catch (t) {
|
|
878
|
-
|
|
877
|
+
mt.warn(`Failed to load custom font "${e.name}":`, t);
|
|
879
878
|
}
|
|
880
879
|
});
|
|
881
880
|
await Promise.allSettled(e), r.value = !0;
|
|
@@ -884,7 +883,7 @@ function Zt(e) {
|
|
|
884
883
|
for (let e of f) e.remove();
|
|
885
884
|
f.length = 0;
|
|
886
885
|
}
|
|
887
|
-
return
|
|
886
|
+
return ve() && we(m), {
|
|
888
887
|
fonts: o,
|
|
889
888
|
defaultFont: u,
|
|
890
889
|
defaultFallback: i,
|
|
@@ -900,9 +899,9 @@ function Zt(e) {
|
|
|
900
899
|
}
|
|
901
900
|
//#endregion
|
|
902
901
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
903
|
-
function
|
|
904
|
-
let t =
|
|
905
|
-
|
|
902
|
+
function Zt(e) {
|
|
903
|
+
let t = I(!1), n = I(""), r = I(null);
|
|
904
|
+
Wt(r, t);
|
|
906
905
|
function i() {
|
|
907
906
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
908
907
|
}
|
|
@@ -935,184 +934,184 @@ function Qt(e) {
|
|
|
935
934
|
}
|
|
936
935
|
//#endregion
|
|
937
936
|
//#region src/composables/useRichTextEditor.ts
|
|
938
|
-
function
|
|
939
|
-
let t =
|
|
937
|
+
function Qt(e) {
|
|
938
|
+
let t = ye(y, null), { mergeTags: n, isEnabled: r, isRequesting: i, requestMergeTag: a, syntax: o } = pe(), s = Oe(null), { showLinkDialog: c, linkUrl: l, linkDialogRef: u, openLinkDialog: p, insertLink: m, removeLink: h, closeLinkDialog: g, handleLinkKeydown: _ } = Zt(s), { start: v, stop: b } = f(() => s.value?.commands.focus("end"), 0, { immediate: !1 }), x = Oe(null), S = I(!0), C = I(null);
|
|
940
939
|
async function ee() {
|
|
941
940
|
C.value = null, S.value = !0;
|
|
942
941
|
try {
|
|
943
942
|
let { TiptapEditor: r, EC: i, extensions: a } = await e.loadExtensions({
|
|
944
943
|
mergeTags: n,
|
|
945
|
-
syntax:
|
|
944
|
+
syntax: o
|
|
946
945
|
});
|
|
947
946
|
x.value = i;
|
|
948
|
-
let
|
|
949
|
-
a.forEach((e, t) =>
|
|
950
|
-
extensions: a.filter((e, t) =>
|
|
947
|
+
let c = /* @__PURE__ */ new Map();
|
|
948
|
+
a.forEach((e, t) => c.set(e.name, t)), s.value = new r({
|
|
949
|
+
extensions: a.filter((e, t) => c.get(e.name) === t),
|
|
951
950
|
content: e.blockContent(),
|
|
952
951
|
editable: !0,
|
|
953
952
|
onUpdate: ({ editor: n }) => {
|
|
954
953
|
t && t.updateBlock(e.blockId(), { content: n.getHTML() });
|
|
955
954
|
}
|
|
956
|
-
}), S.value = !1,
|
|
955
|
+
}), S.value = !1, v();
|
|
957
956
|
} catch (t) {
|
|
958
|
-
|
|
957
|
+
mt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), C.value = t instanceof Error ? t.message : "Failed to load editor", S.value = !1;
|
|
959
958
|
}
|
|
960
959
|
}
|
|
961
960
|
function w() {
|
|
962
|
-
|
|
961
|
+
s.value?.destroy(), s.value = null, ee();
|
|
963
962
|
}
|
|
964
963
|
ee();
|
|
965
|
-
let T =
|
|
966
|
-
|
|
964
|
+
let T = je(() => e.blockContent(), (e) => {
|
|
965
|
+
s.value && s.value.getHTML() !== e && s.value.commands.setContent(e, { emitUpdate: !1 });
|
|
967
966
|
});
|
|
968
|
-
function
|
|
967
|
+
function te(t) {
|
|
969
968
|
if (i.value) return;
|
|
970
969
|
let n = t.target;
|
|
971
970
|
e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone();
|
|
972
971
|
}
|
|
973
|
-
|
|
974
|
-
T(), b(),
|
|
972
|
+
d(document, "mousedown", te), Se(() => {
|
|
973
|
+
T(), b(), s.value?.destroy();
|
|
975
974
|
});
|
|
976
|
-
async function
|
|
977
|
-
let e = await
|
|
978
|
-
e &&
|
|
975
|
+
async function E() {
|
|
976
|
+
let e = await a();
|
|
977
|
+
e && s.value ? s.value.chain().focus().insertMergeTag({
|
|
979
978
|
label: e.label,
|
|
980
979
|
value: e.value
|
|
981
|
-
}).run() :
|
|
980
|
+
}).run() : s.value?.commands.focus();
|
|
982
981
|
}
|
|
983
982
|
return {
|
|
984
|
-
editor:
|
|
983
|
+
editor: s,
|
|
985
984
|
EditorContent: x,
|
|
986
985
|
isLoading: S,
|
|
987
986
|
initError: C,
|
|
988
987
|
retry: w,
|
|
989
|
-
showLinkDialog:
|
|
990
|
-
linkUrl:
|
|
991
|
-
linkDialogRef:
|
|
988
|
+
showLinkDialog: c,
|
|
989
|
+
linkUrl: l,
|
|
990
|
+
linkDialogRef: u,
|
|
992
991
|
mergeTags: n,
|
|
993
992
|
mergeTagEnabled: r,
|
|
994
993
|
isRequestingMergeTag: i,
|
|
995
|
-
syntax:
|
|
996
|
-
openLinkDialog:
|
|
997
|
-
insertLink:
|
|
998
|
-
removeLink:
|
|
999
|
-
closeLinkDialog:
|
|
1000
|
-
handleLinkKeydown:
|
|
1001
|
-
handleAddMergeTag:
|
|
994
|
+
syntax: o,
|
|
995
|
+
openLinkDialog: p,
|
|
996
|
+
insertLink: m,
|
|
997
|
+
removeLink: h,
|
|
998
|
+
closeLinkDialog: g,
|
|
999
|
+
handleLinkKeydown: _,
|
|
1000
|
+
handleAddMergeTag: E
|
|
1002
1001
|
};
|
|
1003
1002
|
}
|
|
1004
1003
|
//#endregion
|
|
1005
1004
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1006
|
-
var
|
|
1005
|
+
var $t = { class: "tpl:w-full" }, en = {
|
|
1007
1006
|
key: 0,
|
|
1008
1007
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
1009
|
-
},
|
|
1008
|
+
}, tn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, nn = {
|
|
1010
1009
|
key: 1,
|
|
1011
1010
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
1012
|
-
},
|
|
1011
|
+
}, rn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, an = {
|
|
1013
1012
|
key: 2,
|
|
1014
1013
|
class: "tpl:relative"
|
|
1015
|
-
},
|
|
1014
|
+
}, on = ["innerHTML"], sn = {
|
|
1016
1015
|
key: 0,
|
|
1017
1016
|
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]",
|
|
1018
1017
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1019
|
-
},
|
|
1018
|
+
}, cn = /* @__PURE__ */ M({
|
|
1020
1019
|
__name: "CustomBlock",
|
|
1021
1020
|
props: {
|
|
1022
1021
|
block: {},
|
|
1023
1022
|
viewport: {}
|
|
1024
1023
|
},
|
|
1025
1024
|
emits: ["fetchData"],
|
|
1026
|
-
setup(
|
|
1027
|
-
let
|
|
1025
|
+
setup(e, { emit: t }) {
|
|
1026
|
+
let n = e, r = t, { t: i } = oe(), a = ye(T, null), s = I(""), c = I(!1), l = O(() => a?.getDefinition(n.block.customType)), u = O(() => !!l.value), { isFetching: d, fetch: f, needsFetch: p, hasDataSource: m } = ze({
|
|
1028
1027
|
definition: l,
|
|
1029
|
-
block:
|
|
1028
|
+
block: O(() => n.block),
|
|
1030
1029
|
onUpdate: (e, t) => {
|
|
1031
|
-
|
|
1030
|
+
r("fetchData", {
|
|
1032
1031
|
fieldValues: e,
|
|
1033
1032
|
dataSourceFetched: t
|
|
1034
1033
|
});
|
|
1035
1034
|
}
|
|
1036
1035
|
});
|
|
1037
1036
|
async function h() {
|
|
1038
|
-
if (
|
|
1037
|
+
if (a) {
|
|
1039
1038
|
c.value = !1;
|
|
1040
1039
|
try {
|
|
1041
|
-
let e = await
|
|
1040
|
+
let e = await a.renderCustomBlock(n.block);
|
|
1042
1041
|
e.includes("Template render error:") && (c.value = !0), s.value = e;
|
|
1043
1042
|
} catch {
|
|
1044
1043
|
c.value = !0, s.value = "";
|
|
1045
1044
|
}
|
|
1046
1045
|
}
|
|
1047
1046
|
}
|
|
1048
|
-
let g =
|
|
1049
|
-
return
|
|
1047
|
+
let g = o(h, 150);
|
|
1048
|
+
return Ce(() => {
|
|
1050
1049
|
h();
|
|
1051
|
-
}),
|
|
1050
|
+
}), je(() => n.block.fieldValues, () => {
|
|
1052
1051
|
g();
|
|
1053
|
-
}, { deep: !0 }), (e, t) => (
|
|
1052
|
+
}, { deep: !0 }), (e, t) => (P(), k("div", $t, [u.value ? c.value ? (P(), k("div", nn, [j(R(de), {
|
|
1054
1053
|
size: 24,
|
|
1055
1054
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1056
|
-
}),
|
|
1055
|
+
}), A("span", rn, L(R(i).customBlocks.renderError), 1)])) : (P(), k("div", an, [A("div", { innerHTML: s.value }, null, 8, on), R(m) && R(p) ? (P(), k("div", sn, [R(d) ? (P(), me(fe, {
|
|
1057
1056
|
key: 1,
|
|
1058
1057
|
class: "tpl:w-48"
|
|
1059
|
-
})) : (
|
|
1058
|
+
})) : (P(), k("button", {
|
|
1060
1059
|
key: 0,
|
|
1061
1060
|
type: "button",
|
|
1062
1061
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1063
|
-
onClick: t[0] ||=
|
|
1064
|
-
}, [l.value?.icon ? (
|
|
1062
|
+
onClick: t[0] ||= Fe((...e) => R(f) && R(f)(...e), ["stop"])
|
|
1063
|
+
}, [l.value?.icon ? (P(), me(Ht, {
|
|
1065
1064
|
key: 0,
|
|
1066
1065
|
icon: l.value.icon,
|
|
1067
1066
|
size: 16
|
|
1068
|
-
}, null, 8, ["icon"])) :
|
|
1067
|
+
}, null, 8, ["icon"])) : he("", !0), ge(" " + L(l.value?.dataSource?.label || R(i).customBlocks.dataSource.fetchButton), 1)]))])) : he("", !0)])) : (P(), k("div", en, [j(R(It), {
|
|
1069
1068
|
size: 24,
|
|
1070
1069
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1071
|
-
}),
|
|
1070
|
+
}), A("span", tn, L(R(i).customBlocks.definitionNotFound), 1)]))]));
|
|
1072
1071
|
}
|
|
1073
|
-
}),
|
|
1072
|
+
}), ln = { class: "tpl:w-full" }, un = /* @__PURE__ */ M({
|
|
1074
1073
|
__name: "DividerBlock",
|
|
1075
1074
|
props: {
|
|
1076
1075
|
block: {},
|
|
1077
1076
|
viewport: {}
|
|
1078
1077
|
},
|
|
1079
1078
|
setup(e) {
|
|
1080
|
-
let t = e, n =
|
|
1079
|
+
let t = e, n = O(() => ({
|
|
1081
1080
|
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
1082
1081
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
1083
1082
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1084
1083
|
}));
|
|
1085
|
-
return (e, t) => (
|
|
1084
|
+
return (e, t) => (P(), k("div", ln, [A("hr", {
|
|
1086
1085
|
class: "tpl:m-0 tpl:border-none",
|
|
1087
|
-
style:
|
|
1086
|
+
style: N(n.value)
|
|
1088
1087
|
}, null, 4)]));
|
|
1089
1088
|
}
|
|
1090
|
-
}),
|
|
1089
|
+
}), dn = { class: "tpl:w-full" }, fn = { class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]" }, pn = {
|
|
1091
1090
|
key: 0,
|
|
1092
1091
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1093
|
-
},
|
|
1092
|
+
}, mn = {
|
|
1094
1093
|
key: 1,
|
|
1095
1094
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1096
|
-
},
|
|
1095
|
+
}, hn = /* @__PURE__ */ M({
|
|
1097
1096
|
__name: "HtmlBlock",
|
|
1098
1097
|
props: {
|
|
1099
1098
|
block: {},
|
|
1100
1099
|
viewport: {}
|
|
1101
1100
|
},
|
|
1102
1101
|
setup(e) {
|
|
1103
|
-
let t = e, { t: n } =
|
|
1104
|
-
return (e, t) => (
|
|
1102
|
+
let t = e, { t: n } = oe(), r = O(() => t.block.content.trim().length > 0);
|
|
1103
|
+
return (e, t) => (P(), k("div", dn, [A("div", fn, [j(R(kt), {
|
|
1105
1104
|
size: 24,
|
|
1106
1105
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1107
|
-
}), r.value ? (
|
|
1106
|
+
}), r.value ? (P(), k("span", pn, L(R(n).html.preview), 1)) : (P(), k("span", mn, L(R(n).html.empty), 1))])]));
|
|
1108
1107
|
}
|
|
1109
|
-
}),
|
|
1108
|
+
}), gn = ["href"], _n = ["src", "alt"], vn = ["src", "alt"], yn = {
|
|
1110
1109
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1111
1110
|
style: { opacity: "0.7" }
|
|
1112
|
-
},
|
|
1111
|
+
}, bn = ["href"], xn = ["src", "alt"], Sn = ["src", "alt"], Cn = {
|
|
1113
1112
|
key: 3,
|
|
1114
1113
|
class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
1115
|
-
},
|
|
1114
|
+
}, wn = ["aria-label"], Tn = { key: 1 }, En = /* @__PURE__ */ M({
|
|
1116
1115
|
__name: "ImageBlock",
|
|
1117
1116
|
props: {
|
|
1118
1117
|
block: {},
|
|
@@ -1120,7 +1119,7 @@ var en = { class: "tpl:w-full" }, tn = {
|
|
|
1120
1119
|
},
|
|
1121
1120
|
emits: ["update"],
|
|
1122
1121
|
setup(e, { emit: t }) {
|
|
1123
|
-
let n = e, r = t, { t: i } =
|
|
1122
|
+
let n = e, r = t, { t: i } = oe(), { syntax: a } = pe(), o = ye(re, null), s = O(() => !!o);
|
|
1124
1123
|
async function c() {
|
|
1125
1124
|
let e = await o?.({ accept: ["images"] });
|
|
1126
1125
|
if (e) {
|
|
@@ -1128,82 +1127,82 @@ var en = { class: "tpl:w-full" }, tn = {
|
|
|
1128
1127
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
1129
1128
|
}
|
|
1130
1129
|
}
|
|
1131
|
-
let l =
|
|
1130
|
+
let l = O(() => ({ textAlign: n.block.align })), u = O(() => ({
|
|
1132
1131
|
maxWidth: "100%",
|
|
1133
1132
|
width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
|
|
1134
1133
|
display: "block",
|
|
1135
1134
|
margin: n.block.align === "center" ? "0 auto" : void 0,
|
|
1136
1135
|
marginLeft: n.block.align === "right" ? "auto" : void 0
|
|
1137
|
-
})), d =
|
|
1138
|
-
return (t, n) => (
|
|
1136
|
+
})), d = O(() => Ue(n.block.src, a));
|
|
1137
|
+
return (t, n) => (P(), k("div", {
|
|
1139
1138
|
class: "tpl:w-full",
|
|
1140
|
-
style:
|
|
1141
|
-
}, [e.block.src && d.value && e.block.placeholderUrl ? (
|
|
1139
|
+
style: N(l.value)
|
|
1140
|
+
}, [e.block.src && d.value && e.block.placeholderUrl ? (P(), k(D, { key: 0 }, [e.block.linkUrl ? (P(), k("a", {
|
|
1142
1141
|
key: 0,
|
|
1143
1142
|
href: e.block.linkUrl,
|
|
1144
1143
|
target: "_blank",
|
|
1145
1144
|
rel: "noopener noreferrer",
|
|
1146
|
-
onClick: n[0] ||=
|
|
1147
|
-
}, [
|
|
1145
|
+
onClick: n[0] ||= Fe(() => {}, ["prevent"])
|
|
1146
|
+
}, [A("img", {
|
|
1148
1147
|
class: "tpl:border-0",
|
|
1149
1148
|
loading: "lazy",
|
|
1150
1149
|
src: e.block.placeholderUrl,
|
|
1151
|
-
alt: e.block.alt ||
|
|
1152
|
-
style:
|
|
1153
|
-
}, null, 12,
|
|
1150
|
+
alt: e.block.alt || R(i).image.altTextPlaceholder,
|
|
1151
|
+
style: N(u.value)
|
|
1152
|
+
}, null, 12, _n)], 8, gn)) : (P(), k("img", {
|
|
1154
1153
|
key: 1,
|
|
1155
1154
|
class: "tpl:border-0",
|
|
1156
1155
|
src: e.block.placeholderUrl,
|
|
1157
1156
|
alt: e.block.alt,
|
|
1158
|
-
style:
|
|
1159
|
-
}, null, 12,
|
|
1157
|
+
style: N(u.value)
|
|
1158
|
+
}, null, 12, vn))], 64)) : e.block.src && d.value ? (P(), k("div", {
|
|
1160
1159
|
key: 1,
|
|
1161
1160
|
class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
1162
|
-
style:
|
|
1163
|
-
}, [
|
|
1161
|
+
style: N([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
1162
|
+
}, [j(R(Pt), {
|
|
1164
1163
|
size: 32,
|
|
1165
1164
|
"stroke-width": 1.5,
|
|
1166
1165
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1167
1166
|
style: { opacity: "0.5" }
|
|
1168
|
-
}),
|
|
1167
|
+
}), A("span", yn, L(e.block.src), 1)], 4)) : e.block.src ? (P(), k(D, { key: 2 }, [e.block.linkUrl ? (P(), k("a", {
|
|
1169
1168
|
key: 0,
|
|
1170
1169
|
href: e.block.linkUrl,
|
|
1171
1170
|
target: "_blank",
|
|
1172
1171
|
rel: "noopener noreferrer",
|
|
1173
|
-
onClick: n[1] ||=
|
|
1174
|
-
}, [
|
|
1172
|
+
onClick: n[1] ||= Fe(() => {}, ["prevent"])
|
|
1173
|
+
}, [A("img", {
|
|
1175
1174
|
class: "tpl:border-0",
|
|
1176
1175
|
loading: "lazy",
|
|
1177
1176
|
src: e.block.src,
|
|
1178
|
-
alt: e.block.alt ||
|
|
1179
|
-
style:
|
|
1180
|
-
}, null, 12,
|
|
1177
|
+
alt: e.block.alt || R(i).image.altTextPlaceholder,
|
|
1178
|
+
style: N(u.value)
|
|
1179
|
+
}, null, 12, xn)], 8, bn)) : (P(), k("img", {
|
|
1181
1180
|
key: 1,
|
|
1182
1181
|
class: "tpl:border-0",
|
|
1183
1182
|
src: e.block.src,
|
|
1184
1183
|
alt: e.block.alt,
|
|
1185
|
-
style:
|
|
1186
|
-
}, null, 12,
|
|
1184
|
+
style: N(u.value)
|
|
1185
|
+
}, null, 12, Sn))], 64)) : (P(), k("div", Cn, [s.value ? (P(), k("button", {
|
|
1187
1186
|
key: 0,
|
|
1188
|
-
"aria-label":
|
|
1187
|
+
"aria-label": R(i).image.browseMedia,
|
|
1189
1188
|
class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1190
|
-
onClick:
|
|
1191
|
-
}, [
|
|
1189
|
+
onClick: Fe(c, ["stop"])
|
|
1190
|
+
}, [j(R(Pt), {
|
|
1192
1191
|
size: 14,
|
|
1193
1192
|
"stroke-width": 1.5
|
|
1194
|
-
}),
|
|
1193
|
+
}), ge(" " + L(R(i).image.browseMedia), 1)], 8, wn)) : (P(), k("span", Tn, L(R(i).image.clickToAdd), 1))]))], 4));
|
|
1195
1194
|
}
|
|
1196
|
-
}),
|
|
1195
|
+
}), Dn = { class: "tpl:w-full" }, On = ["href"], kn = {
|
|
1197
1196
|
key: 1,
|
|
1198
1197
|
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)]"
|
|
1199
|
-
},
|
|
1198
|
+
}, An = /* @__PURE__ */ M({
|
|
1200
1199
|
__name: "MenuBlock",
|
|
1201
1200
|
props: {
|
|
1202
1201
|
block: {},
|
|
1203
1202
|
viewport: {}
|
|
1204
1203
|
},
|
|
1205
1204
|
setup(e) {
|
|
1206
|
-
let t = e, { t: n } =
|
|
1205
|
+
let t = e, { t: n } = oe(), r = O(() => ({
|
|
1207
1206
|
display: "flex",
|
|
1208
1207
|
flexWrap: "wrap",
|
|
1209
1208
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1211,94 +1210,94 @@ var en = { class: "tpl:w-full" }, tn = {
|
|
|
1211
1210
|
fontSize: `${t.block.fontSize}px`,
|
|
1212
1211
|
fontFamily: t.block.fontFamily || "inherit",
|
|
1213
1212
|
alignItems: "center"
|
|
1214
|
-
})), i =
|
|
1213
|
+
})), i = O(() => t.block.items.length > 0);
|
|
1215
1214
|
function a(e) {
|
|
1216
1215
|
return e || t.block.linkColor || t.block.color;
|
|
1217
1216
|
}
|
|
1218
|
-
return (t, o) => (
|
|
1217
|
+
return (t, o) => (P(), k("div", Dn, [i.value ? (P(), k("div", {
|
|
1219
1218
|
key: 0,
|
|
1220
|
-
style:
|
|
1221
|
-
}, [(
|
|
1219
|
+
style: N(r.value)
|
|
1220
|
+
}, [(P(!0), k(D, null, Te(e.block.items, (t, n) => (P(), k(D, { key: t.id }, [A("a", {
|
|
1222
1221
|
href: t.url || "#",
|
|
1223
1222
|
class: "tpl:cursor-default tpl:no-underline",
|
|
1224
|
-
style:
|
|
1223
|
+
style: N({
|
|
1225
1224
|
color: a(t.color),
|
|
1226
1225
|
fontWeight: t.bold ? "bold" : "normal",
|
|
1227
1226
|
textDecoration: t.underline ? "underline" : "none"
|
|
1228
1227
|
}),
|
|
1229
|
-
onClick: o[0] ||=
|
|
1230
|
-
},
|
|
1228
|
+
onClick: o[0] ||= Fe(() => {}, ["prevent"])
|
|
1229
|
+
}, L(t.text || "..."), 13, On), n < e.block.items.length - 1 ? (P(), k("span", {
|
|
1231
1230
|
key: 0,
|
|
1232
|
-
style:
|
|
1231
|
+
style: N({
|
|
1233
1232
|
color: e.block.separatorColor,
|
|
1234
1233
|
padding: `0 ${e.block.spacing}px`
|
|
1235
1234
|
})
|
|
1236
|
-
},
|
|
1235
|
+
}, L(e.block.separator), 5)) : he("", !0)], 64))), 128))], 4)) : (P(), k("div", kn, [j(R(Ft), { size: 16 }), A("span", null, L(R(n).menu.addLinks), 1)]))]));
|
|
1237
1236
|
}
|
|
1238
1237
|
});
|
|
1239
1238
|
//#endregion
|
|
1240
1239
|
//#region src/composables/useEditableTextBlock.ts
|
|
1241
|
-
function
|
|
1242
|
-
let t =
|
|
1243
|
-
top:
|
|
1244
|
-
left:
|
|
1240
|
+
function jn(e) {
|
|
1241
|
+
let t = ye(b, []), { syntax: n } = pe(), r = O(() => it(at(e(), t), n)), i = I(!1), a = I(null), { top: o, left: s } = l(a), c = O(() => ({
|
|
1242
|
+
top: o.value - 8,
|
|
1243
|
+
left: s.value
|
|
1245
1244
|
}));
|
|
1246
1245
|
function u() {
|
|
1247
|
-
|
|
1246
|
+
i.value = !0;
|
|
1248
1247
|
}
|
|
1249
1248
|
function d() {
|
|
1250
|
-
|
|
1249
|
+
i.value = !1;
|
|
1251
1250
|
}
|
|
1252
1251
|
return {
|
|
1253
|
-
isEditing:
|
|
1254
|
-
blockRef:
|
|
1255
|
-
toolbarPosition:
|
|
1256
|
-
resolvedContent:
|
|
1252
|
+
isEditing: i,
|
|
1253
|
+
blockRef: a,
|
|
1254
|
+
toolbarPosition: c,
|
|
1255
|
+
resolvedContent: r,
|
|
1257
1256
|
handleDoubleClick: u,
|
|
1258
1257
|
handleEditorDone: d
|
|
1259
1258
|
};
|
|
1260
1259
|
}
|
|
1261
1260
|
//#endregion
|
|
1262
1261
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1263
|
-
var
|
|
1262
|
+
var Mn = ["innerHTML"], Nn = /* @__PURE__ */ M({
|
|
1264
1263
|
__name: "ParagraphBlock",
|
|
1265
1264
|
props: {
|
|
1266
1265
|
block: {},
|
|
1267
1266
|
viewport: {}
|
|
1268
1267
|
},
|
|
1269
1268
|
setup(e) {
|
|
1270
|
-
let t = e, n =
|
|
1271
|
-
return (t, l) => (
|
|
1269
|
+
let t = e, n = _e(() => import("./ParagraphEditor-CYrzYJO5.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = jn(() => t.block.content);
|
|
1270
|
+
return (t, l) => (P(), k("div", {
|
|
1272
1271
|
ref_key: "blockRef",
|
|
1273
1272
|
ref: i,
|
|
1274
1273
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1275
|
-
onDblclick: l[0] ||= (...e) =>
|
|
1276
|
-
}, [
|
|
1274
|
+
onDblclick: l[0] ||= (...e) => R(s) && R(s)(...e)
|
|
1275
|
+
}, [R(r) ? (P(), me(R(n), {
|
|
1277
1276
|
key: 0,
|
|
1278
1277
|
block: e.block,
|
|
1279
|
-
"toolbar-position":
|
|
1280
|
-
onDone:
|
|
1278
|
+
"toolbar-position": R(a),
|
|
1279
|
+
onDone: R(c)
|
|
1281
1280
|
}, null, 8, [
|
|
1282
1281
|
"block",
|
|
1283
1282
|
"toolbar-position",
|
|
1284
1283
|
"onDone"
|
|
1285
|
-
])) : (
|
|
1284
|
+
])) : (P(), k("div", {
|
|
1286
1285
|
key: 1,
|
|
1287
1286
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
|
|
1288
|
-
innerHTML:
|
|
1289
|
-
}, null, 8,
|
|
1287
|
+
innerHTML: R(o)
|
|
1288
|
+
}, null, 8, Mn))], 544));
|
|
1290
1289
|
}
|
|
1291
1290
|
});
|
|
1292
1291
|
//#endregion
|
|
1293
1292
|
//#region src/utils/blockComponentResolver.ts
|
|
1294
|
-
function
|
|
1293
|
+
function Pn(e, t, n) {
|
|
1295
1294
|
if (t) {
|
|
1296
1295
|
let n = t.getComponent(e);
|
|
1297
1296
|
if (n) return n;
|
|
1298
1297
|
}
|
|
1299
1298
|
return n[e.type] ?? null;
|
|
1300
1299
|
}
|
|
1301
|
-
function
|
|
1300
|
+
function Fn(e) {
|
|
1302
1301
|
let { padding: t, margin: n, backgroundColor: r } = e.styles;
|
|
1303
1302
|
return {
|
|
1304
1303
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
@@ -1308,20 +1307,20 @@ function In(e) {
|
|
|
1308
1307
|
}
|
|
1309
1308
|
//#endregion
|
|
1310
1309
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
1311
|
-
var
|
|
1310
|
+
var In = ["data-block-id", "data-block-type"], Ln = ["aria-label"], Rn = [
|
|
1312
1311
|
"aria-label",
|
|
1313
1312
|
"aria-pressed",
|
|
1314
1313
|
"title"
|
|
1315
|
-
],
|
|
1314
|
+
], zn = ["aria-label", "title"], Bn = ["aria-label", "title"], Vn = ["aria-label", "title"], Hn = {
|
|
1316
1315
|
key: 1,
|
|
1317
1316
|
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"
|
|
1318
|
-
},
|
|
1317
|
+
}, Un = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, Wn = {
|
|
1319
1318
|
key: 2,
|
|
1320
1319
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1321
|
-
},
|
|
1320
|
+
}, Gn = ["aria-label", "title"], Kn = {
|
|
1322
1321
|
key: 3,
|
|
1323
1322
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1324
|
-
},
|
|
1323
|
+
}, qn = ["aria-label"], Jn = /* @__PURE__ */ ce(/* @__PURE__ */ M({
|
|
1325
1324
|
__name: "BlockWrapper",
|
|
1326
1325
|
props: {
|
|
1327
1326
|
block: {},
|
|
@@ -1331,9 +1330,9 @@ var Ln = ["data-block-id", "data-block-type"], Rn = ["aria-label"], zn = [
|
|
|
1331
1330
|
},
|
|
1332
1331
|
emits: ["select"],
|
|
1333
1332
|
setup(e, { emit: t }) {
|
|
1334
|
-
let n = e, r = t, { t: i, format: a } =
|
|
1333
|
+
let n = e, r = t, { t: i, format: a } = oe(), o = ye(x, null), s = I(null), c = O(() => o?.liftedBlockId.value === n.block.id), l = O(() => c.value ? a(i.blockActions.dragLifted, { block: n.block.type }) : i.blockActions.drag);
|
|
1335
1334
|
async function u() {
|
|
1336
|
-
await
|
|
1335
|
+
await be(), s.value?.focus();
|
|
1337
1336
|
}
|
|
1338
1337
|
function d(e) {
|
|
1339
1338
|
if (o) {
|
|
@@ -1354,153 +1353,153 @@ var Ln = ["data-block-id", "data-block-type"], Rn = ["aria-label"], zn = [
|
|
|
1354
1353
|
}
|
|
1355
1354
|
}
|
|
1356
1355
|
}
|
|
1357
|
-
let f =
|
|
1356
|
+
let f = O(() => !n.viewport || !n.block.visibility ? !1 : n.block.visibility[n.viewport] === !1), p = O(() => n.viewport ? {
|
|
1358
1357
|
desktop: i.viewport.desktop,
|
|
1359
1358
|
tablet: i.viewport.tablet,
|
|
1360
1359
|
mobile: i.viewport.mobile
|
|
1361
|
-
}[n.viewport] ?? n.viewport : ""), m =
|
|
1362
|
-
function
|
|
1360
|
+
}[n.viewport] ?? n.viewport : ""), m = O(() => !!n.block.displayCondition), h = ye(S, null), g = ye(C, null), _ = ye(E, {}), v = O(() => !!_.savedModules), y = O(() => _.comments?.getBlockCount(n.block.id) ?? 0), b = O(() => Fn(n.block));
|
|
1361
|
+
function ee(e) {
|
|
1363
1362
|
n.previewMode || (e.stopPropagation(), r("select"));
|
|
1364
1363
|
}
|
|
1365
|
-
function
|
|
1366
|
-
|
|
1364
|
+
function w() {
|
|
1365
|
+
h?.deleteBlock(n.block.id);
|
|
1367
1366
|
}
|
|
1368
|
-
function
|
|
1369
|
-
|
|
1367
|
+
function T() {
|
|
1368
|
+
h?.duplicateBlock(n.block);
|
|
1370
1369
|
}
|
|
1371
|
-
function
|
|
1372
|
-
|
|
1370
|
+
function te() {
|
|
1371
|
+
_.savedModules?.openSaveDialog(n.block.id);
|
|
1373
1372
|
}
|
|
1374
1373
|
function ne() {
|
|
1375
|
-
|
|
1374
|
+
g?.toggleBlock(n.block.id);
|
|
1376
1375
|
}
|
|
1377
|
-
return (t, n) => (
|
|
1378
|
-
class:
|
|
1376
|
+
return (t, n) => (P(), k("div", {
|
|
1377
|
+
class: xe(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
|
|
1379
1378
|
"tpl-block--selected": e.isSelected,
|
|
1380
1379
|
"tpl-block--idle": !e.isSelected,
|
|
1381
1380
|
"tpl-block--lifted": c.value
|
|
1382
1381
|
}]),
|
|
1383
|
-
style:
|
|
1382
|
+
style: N(b.value),
|
|
1384
1383
|
"data-block-id": e.block.id,
|
|
1385
1384
|
"data-block-type": e.block.type,
|
|
1386
1385
|
draggable: "false",
|
|
1387
|
-
onClick:
|
|
1386
|
+
onClick: ee
|
|
1388
1387
|
}, [
|
|
1389
|
-
e.isSelected ? (
|
|
1388
|
+
e.isSelected ? (P(), k("div", {
|
|
1390
1389
|
key: 0,
|
|
1391
1390
|
role: "toolbar",
|
|
1392
|
-
"aria-label":
|
|
1391
|
+
"aria-label": R(i).blockActions.drag,
|
|
1393
1392
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
1394
1393
|
}, [
|
|
1395
|
-
|
|
1394
|
+
A("button", {
|
|
1396
1395
|
ref_key: "dragButtonRef",
|
|
1397
1396
|
ref: s,
|
|
1398
1397
|
class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150 tpl:active:cursor-grabbing",
|
|
1399
1398
|
"aria-label": l.value,
|
|
1400
1399
|
"aria-pressed": c.value,
|
|
1401
1400
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1402
|
-
title:
|
|
1401
|
+
title: R(i).blockActions.drag,
|
|
1403
1402
|
onKeydown: d
|
|
1404
|
-
}, [
|
|
1403
|
+
}, [j(R(Nt), {
|
|
1405
1404
|
size: 14,
|
|
1406
1405
|
"stroke-width": 1.5
|
|
1407
|
-
})], 40,
|
|
1408
|
-
|
|
1406
|
+
})], 40, Rn),
|
|
1407
|
+
A("button", {
|
|
1409
1408
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
1410
|
-
"aria-label":
|
|
1411
|
-
title:
|
|
1412
|
-
onClick:
|
|
1413
|
-
}, [
|
|
1409
|
+
"aria-label": R(i).blockActions.duplicate,
|
|
1410
|
+
title: R(i).blockActions.duplicate,
|
|
1411
|
+
onClick: Fe(T, ["stop"])
|
|
1412
|
+
}, [j(R(At), {
|
|
1414
1413
|
size: 14,
|
|
1415
1414
|
"stroke-width": 1.5
|
|
1416
|
-
})], 8,
|
|
1417
|
-
|
|
1415
|
+
})], 8, zn),
|
|
1416
|
+
v.value ? (P(), k("button", {
|
|
1418
1417
|
key: 0,
|
|
1419
1418
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
1420
|
-
"aria-label":
|
|
1421
|
-
title:
|
|
1422
|
-
onClick:
|
|
1423
|
-
}, [
|
|
1419
|
+
"aria-label": R(i).blockActions.saveAsModule,
|
|
1420
|
+
title: R(i).blockActions.saveAsModule,
|
|
1421
|
+
onClick: Fe(te, ["stop"])
|
|
1422
|
+
}, [j(R(Dt), {
|
|
1424
1423
|
size: 14,
|
|
1425
1424
|
"stroke-width": 1.5
|
|
1426
|
-
})], 8,
|
|
1427
|
-
|
|
1425
|
+
})], 8, Bn)) : he("", !0),
|
|
1426
|
+
A("button", {
|
|
1428
1427
|
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
1429
|
-
"aria-label":
|
|
1430
|
-
title:
|
|
1431
|
-
onClick:
|
|
1432
|
-
}, [
|
|
1428
|
+
"aria-label": R(i).blockActions.delete,
|
|
1429
|
+
title: R(i).blockActions.delete,
|
|
1430
|
+
onClick: Fe(w, ["stop"])
|
|
1431
|
+
}, [j(R(ue), {
|
|
1433
1432
|
size: 14,
|
|
1434
1433
|
"stroke-width": 1.5
|
|
1435
|
-
})], 8,
|
|
1436
|
-
], 8,
|
|
1437
|
-
f.value ? (
|
|
1434
|
+
})], 8, Vn)
|
|
1435
|
+
], 8, Ln)) : he("", !0),
|
|
1436
|
+
f.value ? (P(), k("div", Hn, [A("span", Un, [j(R(jt), {
|
|
1438
1437
|
size: 12,
|
|
1439
1438
|
"stroke-width": 1.5
|
|
1440
|
-
}),
|
|
1441
|
-
m.value && !f.value ? (
|
|
1439
|
+
}), ge(" " + L(R(a)(R(i).blockActions.hiddenOnViewport, { viewport: p.value })), 1)])])) : he("", !0),
|
|
1440
|
+
m.value && !f.value ? (P(), k("div", Wn, [A("button", {
|
|
1442
1441
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
1443
|
-
"aria-label":
|
|
1442
|
+
"aria-label": R(i).blockActions.conditionToggle,
|
|
1444
1443
|
title: e.block.displayCondition?.label,
|
|
1445
|
-
onClick:
|
|
1446
|
-
}, [
|
|
1444
|
+
onClick: Fe(ne, ["stop"])
|
|
1445
|
+
}, [j(R(Mt), {
|
|
1447
1446
|
size: 12,
|
|
1448
1447
|
"stroke-width": 2
|
|
1449
|
-
})], 8,
|
|
1450
|
-
|
|
1448
|
+
})], 8, Gn)])) : he("", !0),
|
|
1449
|
+
y.value > 0 && !f.value ? (P(), k("div", Kn, [A("button", {
|
|
1451
1450
|
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
1452
|
-
"aria-label":
|
|
1453
|
-
onClick: n[0] ||=
|
|
1454
|
-
}, [
|
|
1451
|
+
"aria-label": R(a)(R(i).blockActions.comments, { count: String(y.value) }),
|
|
1452
|
+
onClick: n[0] ||= Fe((t) => R(_).comments?.openForBlock(e.block.id), ["stop"])
|
|
1453
|
+
}, [j(R(le), {
|
|
1455
1454
|
size: 12,
|
|
1456
1455
|
"stroke-width": 2.5
|
|
1457
|
-
}),
|
|
1458
|
-
|
|
1459
|
-
], 14,
|
|
1456
|
+
}), ge(" " + L(y.value), 1)], 8, qn)])) : he("", !0),
|
|
1457
|
+
Ee(t.$slots, "default", {}, void 0, !0)
|
|
1458
|
+
], 14, In));
|
|
1460
1459
|
}
|
|
1461
|
-
}), [["__scopeId", "data-v-
|
|
1460
|
+
}), [["__scopeId", "data-v-ca10edcb"]]), Yn = ["innerHTML"], Xn = /* @__PURE__ */ M({
|
|
1462
1461
|
__name: "TitleBlock",
|
|
1463
1462
|
props: {
|
|
1464
1463
|
block: {},
|
|
1465
1464
|
viewport: {}
|
|
1466
1465
|
},
|
|
1467
1466
|
setup(e) {
|
|
1468
|
-
let t = e, n =
|
|
1467
|
+
let t = e, n = _e(() => import("./TitleEditor-DwUpo4gF.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = jn(() => t.block.content), l = O(() => {
|
|
1469
1468
|
let e = {
|
|
1470
|
-
fontSize: `${
|
|
1469
|
+
fontSize: `${He[t.block.level]}px`,
|
|
1471
1470
|
color: t.block.color,
|
|
1472
1471
|
textAlign: t.block.textAlign
|
|
1473
1472
|
};
|
|
1474
1473
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1475
1474
|
});
|
|
1476
|
-
return (t, u) => (
|
|
1475
|
+
return (t, u) => (P(), k("div", {
|
|
1477
1476
|
ref_key: "blockRef",
|
|
1478
1477
|
ref: i,
|
|
1479
1478
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1480
|
-
style:
|
|
1481
|
-
onDblclick: u[0] ||= (...e) =>
|
|
1482
|
-
}, [
|
|
1479
|
+
style: N(l.value),
|
|
1480
|
+
onDblclick: u[0] ||= (...e) => R(s) && R(s)(...e)
|
|
1481
|
+
}, [R(r) ? (P(), me(R(n), {
|
|
1483
1482
|
key: 0,
|
|
1484
1483
|
block: e.block,
|
|
1485
|
-
"toolbar-position":
|
|
1486
|
-
onDone:
|
|
1484
|
+
"toolbar-position": R(a),
|
|
1485
|
+
onDone: R(c)
|
|
1487
1486
|
}, null, 8, [
|
|
1488
1487
|
"block",
|
|
1489
1488
|
"toolbar-position",
|
|
1490
1489
|
"onDone"
|
|
1491
|
-
])) : (
|
|
1490
|
+
])) : (P(), k("div", {
|
|
1492
1491
|
key: 1,
|
|
1493
1492
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0",
|
|
1494
|
-
innerHTML:
|
|
1495
|
-
}, null, 8,
|
|
1493
|
+
innerHTML: R(o)
|
|
1494
|
+
}, null, 8, Yn))], 36));
|
|
1496
1495
|
}
|
|
1497
|
-
}),
|
|
1498
|
-
MultiDrag: () =>
|
|
1499
|
-
Sortable: () =>
|
|
1500
|
-
Swap: () =>
|
|
1501
|
-
default: () =>
|
|
1496
|
+
}), Zn = /* @__PURE__ */ i({
|
|
1497
|
+
MultiDrag: () => ni,
|
|
1498
|
+
Sortable: () => G,
|
|
1499
|
+
Swap: () => ei,
|
|
1500
|
+
default: () => G
|
|
1502
1501
|
});
|
|
1503
|
-
function
|
|
1502
|
+
function Qn(e, t) {
|
|
1504
1503
|
var n = Object.keys(e);
|
|
1505
1504
|
if (Object.getOwnPropertySymbols) {
|
|
1506
1505
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -1510,26 +1509,26 @@ function $n(e, t) {
|
|
|
1510
1509
|
}
|
|
1511
1510
|
return n;
|
|
1512
1511
|
}
|
|
1513
|
-
function
|
|
1512
|
+
function $n(e) {
|
|
1514
1513
|
for (var t = 1; t < arguments.length; t++) {
|
|
1515
1514
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
1516
|
-
t % 2 ?
|
|
1517
|
-
|
|
1518
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
1515
|
+
t % 2 ? Qn(Object(n), !0).forEach(function(t) {
|
|
1516
|
+
tr(e, t, n[t]);
|
|
1517
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Qn(Object(n)).forEach(function(t) {
|
|
1519
1518
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
1520
1519
|
});
|
|
1521
1520
|
}
|
|
1522
1521
|
return e;
|
|
1523
1522
|
}
|
|
1524
|
-
function
|
|
1523
|
+
function er(e) {
|
|
1525
1524
|
"@babel/helpers - typeof";
|
|
1526
|
-
return
|
|
1525
|
+
return er = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1527
1526
|
return typeof e;
|
|
1528
1527
|
} : function(e) {
|
|
1529
1528
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1530
|
-
},
|
|
1529
|
+
}, er(e);
|
|
1531
1530
|
}
|
|
1532
|
-
function
|
|
1531
|
+
function tr(e, t, n) {
|
|
1533
1532
|
return t in e ? Object.defineProperty(e, t, {
|
|
1534
1533
|
value: n,
|
|
1535
1534
|
enumerable: !0,
|
|
@@ -1537,65 +1536,65 @@ function nr(e, t, n) {
|
|
|
1537
1536
|
writable: !0
|
|
1538
1537
|
}) : e[t] = n, e;
|
|
1539
1538
|
}
|
|
1540
|
-
function
|
|
1541
|
-
return
|
|
1539
|
+
function nr() {
|
|
1540
|
+
return nr = Object.assign || function(e) {
|
|
1542
1541
|
for (var t = 1; t < arguments.length; t++) {
|
|
1543
1542
|
var n = arguments[t];
|
|
1544
1543
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
1545
1544
|
}
|
|
1546
1545
|
return e;
|
|
1547
|
-
},
|
|
1546
|
+
}, nr.apply(this, arguments);
|
|
1548
1547
|
}
|
|
1549
|
-
function
|
|
1548
|
+
function rr(e, t) {
|
|
1550
1549
|
if (e == null) return {};
|
|
1551
1550
|
var n = {}, r = Object.keys(e), i, a;
|
|
1552
1551
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
1553
1552
|
return n;
|
|
1554
1553
|
}
|
|
1555
|
-
function
|
|
1554
|
+
function ir(e, t) {
|
|
1556
1555
|
if (e == null) return {};
|
|
1557
|
-
var n =
|
|
1556
|
+
var n = rr(e, t), r, i;
|
|
1558
1557
|
if (Object.getOwnPropertySymbols) {
|
|
1559
1558
|
var a = Object.getOwnPropertySymbols(e);
|
|
1560
1559
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
1561
1560
|
}
|
|
1562
1561
|
return n;
|
|
1563
1562
|
}
|
|
1563
|
+
function ar(e) {
|
|
1564
|
+
return or(e) || sr(e) || cr(e) || ur();
|
|
1565
|
+
}
|
|
1564
1566
|
function or(e) {
|
|
1565
|
-
|
|
1567
|
+
if (Array.isArray(e)) return lr(e);
|
|
1566
1568
|
}
|
|
1567
1569
|
function sr(e) {
|
|
1568
|
-
if (Array.isArray(e)) return ur(e);
|
|
1569
|
-
}
|
|
1570
|
-
function cr(e) {
|
|
1571
1570
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
1572
1571
|
}
|
|
1573
|
-
function
|
|
1572
|
+
function cr(e, t) {
|
|
1574
1573
|
if (e) {
|
|
1575
|
-
if (typeof e == "string") return
|
|
1574
|
+
if (typeof e == "string") return lr(e, t);
|
|
1576
1575
|
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
1577
1576
|
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
|
|
1578
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
1577
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return lr(e, t);
|
|
1579
1578
|
}
|
|
1580
1579
|
}
|
|
1581
|
-
function
|
|
1580
|
+
function lr(e, t) {
|
|
1582
1581
|
(t == null || t > e.length) && (t = e.length);
|
|
1583
1582
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
1584
1583
|
return r;
|
|
1585
1584
|
}
|
|
1586
|
-
function
|
|
1585
|
+
function ur() {
|
|
1587
1586
|
throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1588
1587
|
}
|
|
1589
|
-
function
|
|
1588
|
+
function dr(e) {
|
|
1590
1589
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
1591
1590
|
}
|
|
1592
|
-
function
|
|
1593
|
-
e.addEventListener(t, n, !
|
|
1591
|
+
function z(e, t, n) {
|
|
1592
|
+
e.addEventListener(t, n, !si && pi);
|
|
1594
1593
|
}
|
|
1595
|
-
function
|
|
1596
|
-
e.removeEventListener(t, n, !
|
|
1594
|
+
function B(e, t, n) {
|
|
1595
|
+
e.removeEventListener(t, n, !si && pi);
|
|
1597
1596
|
}
|
|
1598
|
-
function
|
|
1597
|
+
function fr(e, t) {
|
|
1599
1598
|
if (t) {
|
|
1600
1599
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
1601
1600
|
if (e.matches) return e.matches(t);
|
|
@@ -1607,40 +1606,40 @@ function pr(e, t) {
|
|
|
1607
1606
|
return !1;
|
|
1608
1607
|
}
|
|
1609
1608
|
}
|
|
1610
|
-
function
|
|
1609
|
+
function pr(e) {
|
|
1611
1610
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
1612
1611
|
}
|
|
1613
|
-
function
|
|
1612
|
+
function mr(e, t, n, r) {
|
|
1614
1613
|
if (e) {
|
|
1615
1614
|
n ||= document;
|
|
1616
1615
|
do {
|
|
1617
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
1616
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && fr(e, t) : fr(e, t)) || r && e === n) return e;
|
|
1618
1617
|
if (e === n) break;
|
|
1619
|
-
} while (e =
|
|
1618
|
+
} while (e = pr(e));
|
|
1620
1619
|
}
|
|
1621
1620
|
return null;
|
|
1622
1621
|
}
|
|
1623
|
-
function
|
|
1624
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
1622
|
+
function V(e, t, n) {
|
|
1623
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(mi, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(mi, " "));
|
|
1625
1624
|
}
|
|
1626
|
-
function
|
|
1625
|
+
function H(e, t, n) {
|
|
1627
1626
|
var r = e && e.style;
|
|
1628
1627
|
if (r) {
|
|
1629
1628
|
if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
|
|
1630
1629
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
1631
1630
|
}
|
|
1632
1631
|
}
|
|
1633
|
-
function
|
|
1632
|
+
function hr(e, t) {
|
|
1634
1633
|
var n = "";
|
|
1635
1634
|
if (typeof e == "string") n = e;
|
|
1636
1635
|
else do {
|
|
1637
|
-
var r =
|
|
1636
|
+
var r = H(e, "transform");
|
|
1638
1637
|
r && r !== "none" && (n = r + " " + n);
|
|
1639
1638
|
} while (!t && (e = e.parentNode));
|
|
1640
1639
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
1641
1640
|
return i && new i(n);
|
|
1642
1641
|
}
|
|
1643
|
-
function
|
|
1642
|
+
function gr(e, t, n) {
|
|
1644
1643
|
if (e) {
|
|
1645
1644
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
1646
1645
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -1648,21 +1647,21 @@ function _r(e, t, n) {
|
|
|
1648
1647
|
}
|
|
1649
1648
|
return [];
|
|
1650
1649
|
}
|
|
1651
|
-
function
|
|
1650
|
+
function _r() {
|
|
1652
1651
|
return document.scrollingElement || document.documentElement;
|
|
1653
1652
|
}
|
|
1654
|
-
function
|
|
1653
|
+
function U(e, t, n, r, i) {
|
|
1655
1654
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
1656
1655
|
var a, o, s, c, l, u, d;
|
|
1657
|
-
if (e !== window && e.parentNode && e !==
|
|
1658
|
-
if (i && i.getBoundingClientRect && (
|
|
1656
|
+
if (e !== window && e.parentNode && e !== _r() ? (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, !si)) do
|
|
1657
|
+
if (i && i.getBoundingClientRect && (H(i, "transform") !== "none" || n && H(i, "position") !== "static")) {
|
|
1659
1658
|
var f = i.getBoundingClientRect();
|
|
1660
|
-
o -= f.top + parseInt(
|
|
1659
|
+
o -= f.top + parseInt(H(i, "border-top-width")), s -= f.left + parseInt(H(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
1661
1660
|
break;
|
|
1662
1661
|
}
|
|
1663
1662
|
while (i = i.parentNode);
|
|
1664
1663
|
if (r && e !== window) {
|
|
1665
|
-
var p =
|
|
1664
|
+
var p = hr(i || e), m = p && p.a, h = p && p.d;
|
|
1666
1665
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
1667
1666
|
}
|
|
1668
1667
|
return {
|
|
@@ -1675,18 +1674,18 @@ function K(e, t, n, r, i) {
|
|
|
1675
1674
|
};
|
|
1676
1675
|
}
|
|
1677
1676
|
}
|
|
1678
|
-
function
|
|
1679
|
-
for (var r =
|
|
1680
|
-
var a =
|
|
1677
|
+
function vr(e, t, n) {
|
|
1678
|
+
for (var r = Cr(e, !0), i = U(e)[t]; r;) {
|
|
1679
|
+
var a = U(r)[n], o = void 0;
|
|
1681
1680
|
if (o = n === "top" || n === "left" ? i >= a : i <= a, !o) return r;
|
|
1682
|
-
if (r ===
|
|
1683
|
-
r =
|
|
1681
|
+
if (r === _r()) break;
|
|
1682
|
+
r = Cr(r, !1);
|
|
1684
1683
|
}
|
|
1685
1684
|
return !1;
|
|
1686
1685
|
}
|
|
1687
|
-
function
|
|
1686
|
+
function yr(e, t, n, r) {
|
|
1688
1687
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
1689
|
-
if (o[a].style.display !== "none" && o[a] !==
|
|
1688
|
+
if (o[a].style.display !== "none" && o[a] !== G.ghost && (r || o[a] !== G.dragged) && mr(o[a], n.draggable, e, !1)) {
|
|
1690
1689
|
if (i === t) return o[a];
|
|
1691
1690
|
i++;
|
|
1692
1691
|
}
|
|
@@ -1694,91 +1693,91 @@ function br(e, t, n, r) {
|
|
|
1694
1693
|
}
|
|
1695
1694
|
return null;
|
|
1696
1695
|
}
|
|
1697
|
-
function
|
|
1698
|
-
for (var n = e.lastElementChild; n && (n ===
|
|
1696
|
+
function br(e, t) {
|
|
1697
|
+
for (var n = e.lastElementChild; n && (n === G.ghost || H(n, "display") === "none" || t && !fr(n, t));) n = n.previousElementSibling;
|
|
1699
1698
|
return n || null;
|
|
1700
1699
|
}
|
|
1701
|
-
function
|
|
1700
|
+
function W(e, t) {
|
|
1702
1701
|
var n = 0;
|
|
1703
1702
|
if (!e || !e.parentNode) return -1;
|
|
1704
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !==
|
|
1703
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== G.clone && (!t || fr(e, t)) && n++;
|
|
1705
1704
|
return n;
|
|
1706
1705
|
}
|
|
1707
|
-
function
|
|
1708
|
-
var t = 0, n = 0, r =
|
|
1706
|
+
function xr(e) {
|
|
1707
|
+
var t = 0, n = 0, r = _r();
|
|
1709
1708
|
if (e) do {
|
|
1710
|
-
var i =
|
|
1709
|
+
var i = hr(e), a = i.a, o = i.d;
|
|
1711
1710
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
1712
1711
|
} while (e !== r && (e = e.parentNode));
|
|
1713
1712
|
return [t, n];
|
|
1714
1713
|
}
|
|
1715
|
-
function
|
|
1714
|
+
function Sr(e, t) {
|
|
1716
1715
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
1717
1716
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
1718
1717
|
}
|
|
1719
1718
|
return -1;
|
|
1720
1719
|
}
|
|
1721
|
-
function
|
|
1722
|
-
if (!e || !e.getBoundingClientRect) return
|
|
1720
|
+
function Cr(e, t) {
|
|
1721
|
+
if (!e || !e.getBoundingClientRect) return _r();
|
|
1723
1722
|
var n = e, r = !1;
|
|
1724
1723
|
do
|
|
1725
1724
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
1726
|
-
var i =
|
|
1725
|
+
var i = H(n);
|
|
1727
1726
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
1728
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
1727
|
+
if (!n.getBoundingClientRect || n === document.body) return _r();
|
|
1729
1728
|
if (r || t) return n;
|
|
1730
1729
|
r = !0;
|
|
1731
1730
|
}
|
|
1732
1731
|
}
|
|
1733
1732
|
while (n = n.parentNode);
|
|
1734
|
-
return
|
|
1733
|
+
return _r();
|
|
1735
1734
|
}
|
|
1736
|
-
function
|
|
1735
|
+
function wr(e, t) {
|
|
1737
1736
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1738
1737
|
return e;
|
|
1739
1738
|
}
|
|
1740
|
-
function
|
|
1739
|
+
function Tr(e, t) {
|
|
1741
1740
|
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);
|
|
1742
1741
|
}
|
|
1743
|
-
function
|
|
1742
|
+
function Er(e, t) {
|
|
1744
1743
|
return function() {
|
|
1745
|
-
if (!
|
|
1744
|
+
if (!hi) {
|
|
1746
1745
|
var n = arguments, r = this;
|
|
1747
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
1748
|
-
|
|
1746
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), hi = setTimeout(function() {
|
|
1747
|
+
hi = void 0;
|
|
1749
1748
|
}, t);
|
|
1750
1749
|
}
|
|
1751
1750
|
};
|
|
1752
1751
|
}
|
|
1753
|
-
function
|
|
1754
|
-
clearTimeout(
|
|
1752
|
+
function Dr() {
|
|
1753
|
+
clearTimeout(hi), hi = void 0;
|
|
1755
1754
|
}
|
|
1756
|
-
function
|
|
1755
|
+
function Or(e, t, n) {
|
|
1757
1756
|
e.scrollLeft += t, e.scrollTop += n;
|
|
1758
1757
|
}
|
|
1759
|
-
function
|
|
1758
|
+
function kr(e) {
|
|
1760
1759
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
1761
1760
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
1762
1761
|
}
|
|
1763
|
-
function
|
|
1764
|
-
|
|
1762
|
+
function Ar(e, t) {
|
|
1763
|
+
H(e, "position", "absolute"), H(e, "top", t.top), H(e, "left", t.left), H(e, "width", t.width), H(e, "height", t.height);
|
|
1765
1764
|
}
|
|
1766
|
-
function
|
|
1767
|
-
|
|
1765
|
+
function jr(e) {
|
|
1766
|
+
H(e, "position", ""), H(e, "top", ""), H(e, "left", ""), H(e, "width", ""), H(e, "height", "");
|
|
1768
1767
|
}
|
|
1769
|
-
function
|
|
1768
|
+
function Mr() {
|
|
1770
1769
|
var e = [], t;
|
|
1771
1770
|
return {
|
|
1772
1771
|
captureAnimationState: function() {
|
|
1773
1772
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
1774
|
-
if (!(
|
|
1773
|
+
if (!(H(t, "display") === "none" || t === G.ghost)) {
|
|
1775
1774
|
e.push({
|
|
1776
1775
|
target: t,
|
|
1777
|
-
rect:
|
|
1776
|
+
rect: U(t)
|
|
1778
1777
|
});
|
|
1779
|
-
var n =
|
|
1778
|
+
var n = $n({}, e[e.length - 1].rect);
|
|
1780
1779
|
if (t.thisAnimationDuration) {
|
|
1781
|
-
var r =
|
|
1780
|
+
var r = hr(t, !0);
|
|
1782
1781
|
r && (n.top -= r.f, n.left -= r.e);
|
|
1783
1782
|
}
|
|
1784
1783
|
t.fromRect = n;
|
|
@@ -1789,7 +1788,7 @@ function Nr() {
|
|
|
1789
1788
|
e.push(t);
|
|
1790
1789
|
},
|
|
1791
1790
|
removeAnimationState: function(t) {
|
|
1792
|
-
e.splice(
|
|
1791
|
+
e.splice(Sr(e, { target: t }), 1);
|
|
1793
1792
|
},
|
|
1794
1793
|
animateAll: function(n) {
|
|
1795
1794
|
var r = this;
|
|
@@ -1799,8 +1798,8 @@ function Nr() {
|
|
|
1799
1798
|
}
|
|
1800
1799
|
var i = !1, a = 0;
|
|
1801
1800
|
e.forEach(function(e) {
|
|
1802
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
1803
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
1801
|
+
var t = 0, n = e.target, o = n.fromRect, s = U(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = hr(n, !0);
|
|
1802
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Tr(c, s) && !Tr(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Pr(u, c, l, r.options)), Tr(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() {
|
|
1804
1803
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
1805
1804
|
}, t), n.thisAnimationDuration = t);
|
|
1806
1805
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -1809,49 +1808,49 @@ function Nr() {
|
|
|
1809
1808
|
},
|
|
1810
1809
|
animate: function(e, t, n, r) {
|
|
1811
1810
|
if (r) {
|
|
1812
|
-
|
|
1813
|
-
var i =
|
|
1814
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
1815
|
-
|
|
1811
|
+
H(e, "transition", ""), H(e, "transform", "");
|
|
1812
|
+
var i = hr(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
1813
|
+
e.animatingX = !!s, e.animatingY = !!c, H(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Nr(e), H(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), H(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
1814
|
+
H(e, "transition", ""), H(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
1816
1815
|
}, r);
|
|
1817
1816
|
}
|
|
1818
1817
|
}
|
|
1819
1818
|
};
|
|
1820
1819
|
}
|
|
1821
|
-
function
|
|
1820
|
+
function Nr(e) {
|
|
1822
1821
|
return e.offsetWidth;
|
|
1823
1822
|
}
|
|
1824
|
-
function
|
|
1823
|
+
function Pr(e, t, n, r) {
|
|
1825
1824
|
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;
|
|
1826
1825
|
}
|
|
1827
|
-
function
|
|
1826
|
+
function Fr(e) {
|
|
1828
1827
|
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;
|
|
1829
|
-
if (t ||= n && n[
|
|
1828
|
+
if (t ||= n && n[gi], t) {
|
|
1830
1829
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
1831
|
-
window.CustomEvent && !
|
|
1830
|
+
window.CustomEvent && !si && !ci ? h = new CustomEvent(r, {
|
|
1832
1831
|
bubbles: !0,
|
|
1833
1832
|
cancelable: !0
|
|
1834
1833
|
}) : (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;
|
|
1835
|
-
var v =
|
|
1834
|
+
var v = $n($n({}, m), yi.getEventProperties(r, t));
|
|
1836
1835
|
for (var y in v) h[y] = v[y];
|
|
1837
1836
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
1838
1837
|
}
|
|
1839
1838
|
}
|
|
1840
|
-
function
|
|
1841
|
-
|
|
1842
|
-
putSortable:
|
|
1843
|
-
cloneEl:
|
|
1844
|
-
targetEl:
|
|
1845
|
-
rootEl:
|
|
1846
|
-
oldIndex:
|
|
1847
|
-
oldDraggableIndex:
|
|
1848
|
-
newIndex:
|
|
1849
|
-
newDraggableIndex:
|
|
1839
|
+
function Ir(e) {
|
|
1840
|
+
Fr($n({
|
|
1841
|
+
putSortable: Ai,
|
|
1842
|
+
cloneEl: X,
|
|
1843
|
+
targetEl: K,
|
|
1844
|
+
rootEl: Y,
|
|
1845
|
+
oldIndex: Ti,
|
|
1846
|
+
oldDraggableIndex: Di,
|
|
1847
|
+
newIndex: Ei,
|
|
1848
|
+
newDraggableIndex: Oi
|
|
1850
1849
|
}, e));
|
|
1851
1850
|
}
|
|
1852
|
-
function
|
|
1851
|
+
function G(e, t) {
|
|
1853
1852
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
1854
|
-
this.el = e, this.options = t =
|
|
1853
|
+
this.el = e, this.options = t = nr({}, t), e[gi] = this;
|
|
1855
1854
|
var n = {
|
|
1856
1855
|
group: null,
|
|
1857
1856
|
sort: !0,
|
|
@@ -1864,7 +1863,7 @@ function J(e, t) {
|
|
|
1864
1863
|
invertedSwapThreshold: null,
|
|
1865
1864
|
removeCloneOnHide: !0,
|
|
1866
1865
|
direction: function() {
|
|
1867
|
-
return
|
|
1866
|
+
return ta(e, this.options);
|
|
1868
1867
|
},
|
|
1869
1868
|
ghostClass: "sortable-ghost",
|
|
1870
1869
|
chosenClass: "sortable-chosen",
|
|
@@ -1891,68 +1890,68 @@ function J(e, t) {
|
|
|
1891
1890
|
x: 0,
|
|
1892
1891
|
y: 0
|
|
1893
1892
|
},
|
|
1894
|
-
supportPointer:
|
|
1893
|
+
supportPointer: G.supportPointer !== !1 && "PointerEvent" in window && !ui,
|
|
1895
1894
|
emptyInsertThreshold: 5
|
|
1896
1895
|
};
|
|
1897
|
-
for (var r in
|
|
1898
|
-
for (var i in
|
|
1899
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
1896
|
+
for (var r in yi.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
1897
|
+
for (var i in ia(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
1898
|
+
this.nativeDraggable = t.forceFallback ? !1 : $i, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? z(e, "pointerdown", this._onTapStart) : (z(e, "mousedown", this._onTapStart), z(e, "touchstart", this._onTapStart)), this.nativeDraggable && (z(e, "dragover", this), z(e, "dragenter", this)), Ni.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), nr(this, Mr());
|
|
1900
1899
|
}
|
|
1901
|
-
function
|
|
1900
|
+
function Lr(e) {
|
|
1902
1901
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
1903
1902
|
}
|
|
1904
|
-
function
|
|
1905
|
-
var c, l = e[
|
|
1906
|
-
return window.CustomEvent && !
|
|
1903
|
+
function Rr(e, t, n, r, i, a, o, s) {
|
|
1904
|
+
var c, l = e[gi], u = l.options.onMove, d;
|
|
1905
|
+
return window.CustomEvent && !si && !ci ? c = new CustomEvent("move", {
|
|
1907
1906
|
bubbles: !0,
|
|
1908
1907
|
cancelable: !0
|
|
1909
|
-
}) : (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 ||
|
|
1908
|
+
}) : (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 || U(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
1910
1909
|
}
|
|
1911
|
-
function
|
|
1910
|
+
function zr(e) {
|
|
1912
1911
|
e.draggable = !1;
|
|
1913
1912
|
}
|
|
1914
|
-
function
|
|
1915
|
-
|
|
1913
|
+
function Br() {
|
|
1914
|
+
Ji = !1;
|
|
1916
1915
|
}
|
|
1917
|
-
function
|
|
1918
|
-
var r =
|
|
1916
|
+
function Vr(e, t, n) {
|
|
1917
|
+
var r = U(yr(n.el, 0, n.options, !0)), i = 10;
|
|
1919
1918
|
return t ? e.clientX < r.left - i || e.clientY < r.top && e.clientX < r.right : e.clientY < r.top - i || e.clientY < r.bottom && e.clientX < r.left;
|
|
1920
1919
|
}
|
|
1921
|
-
function
|
|
1922
|
-
var r =
|
|
1920
|
+
function Hr(e, t, n) {
|
|
1921
|
+
var r = U(br(n.el, n.options.draggable)), i = 10;
|
|
1923
1922
|
return t ? e.clientX > r.right + i || e.clientX <= r.right && e.clientY > r.bottom && e.clientX >= r.left : e.clientX > r.right && e.clientY > r.top || e.clientX <= r.right && e.clientY > r.bottom + i;
|
|
1924
1923
|
}
|
|
1925
|
-
function
|
|
1924
|
+
function Ur(e, t, n, r, i, a, o, s) {
|
|
1926
1925
|
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;
|
|
1927
1926
|
if (!o) {
|
|
1928
|
-
if (s &&
|
|
1929
|
-
if (!
|
|
1930
|
-
else if (
|
|
1931
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
1927
|
+
if (s && Gi < l * i) {
|
|
1928
|
+
if (!Ui && (Hi === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Ui = !0), Ui) f = !0;
|
|
1929
|
+
else if (Hi === 1 ? c < u + Gi : c > d - Gi) return -Hi;
|
|
1930
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Wr(t);
|
|
1932
1931
|
}
|
|
1933
1932
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
1934
1933
|
}
|
|
1935
|
-
function
|
|
1936
|
-
return
|
|
1934
|
+
function Wr(e) {
|
|
1935
|
+
return W(K) < W(e) ? 1 : -1;
|
|
1937
1936
|
}
|
|
1938
|
-
function
|
|
1937
|
+
function Gr(e) {
|
|
1939
1938
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
1940
1939
|
return r.toString(36);
|
|
1941
1940
|
}
|
|
1942
|
-
function
|
|
1943
|
-
|
|
1941
|
+
function Kr(e) {
|
|
1942
|
+
Yi.length = 0;
|
|
1944
1943
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
1945
1944
|
var r = t[n];
|
|
1946
|
-
r.checked &&
|
|
1945
|
+
r.checked && Yi.push(r);
|
|
1947
1946
|
}
|
|
1948
1947
|
}
|
|
1949
|
-
function
|
|
1948
|
+
function qr(e) {
|
|
1950
1949
|
return setTimeout(e, 0);
|
|
1951
1950
|
}
|
|
1952
|
-
function
|
|
1951
|
+
function Jr(e) {
|
|
1953
1952
|
return clearTimeout(e);
|
|
1954
1953
|
}
|
|
1955
|
-
function
|
|
1954
|
+
function Yr() {
|
|
1956
1955
|
function e() {
|
|
1957
1956
|
for (var e in this.defaults = {
|
|
1958
1957
|
scroll: !0,
|
|
@@ -1965,99 +1964,99 @@ function Xr() {
|
|
|
1965
1964
|
return e.prototype = {
|
|
1966
1965
|
dragStarted: function(e) {
|
|
1967
1966
|
var t = e.originalEvent;
|
|
1968
|
-
this.sortable.nativeDraggable ?
|
|
1967
|
+
this.sortable.nativeDraggable ? z(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? z(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? z(document, "touchmove", this._handleFallbackAutoScroll) : z(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1969
1968
|
},
|
|
1970
1969
|
dragOverCompleted: function(e) {
|
|
1971
1970
|
var t = e.originalEvent;
|
|
1972
1971
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
1973
1972
|
},
|
|
1974
1973
|
drop: function() {
|
|
1975
|
-
this.sortable.nativeDraggable ?
|
|
1974
|
+
this.sortable.nativeDraggable ? B(document, "dragover", this._handleAutoScroll) : (B(document, "pointermove", this._handleFallbackAutoScroll), B(document, "touchmove", this._handleFallbackAutoScroll), B(document, "mousemove", this._handleFallbackAutoScroll)), Zr(), Xr(), Dr();
|
|
1976
1975
|
},
|
|
1977
1976
|
nulling: function() {
|
|
1978
|
-
|
|
1977
|
+
ma = ua = la = da = ha = fa = pa = null, Z.length = 0;
|
|
1979
1978
|
},
|
|
1980
1979
|
_handleFallbackAutoScroll: function(e) {
|
|
1981
1980
|
this._handleAutoScroll(e, !0);
|
|
1982
1981
|
},
|
|
1983
1982
|
_handleAutoScroll: function(e, t) {
|
|
1984
1983
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
1985
|
-
if (
|
|
1986
|
-
|
|
1987
|
-
var o =
|
|
1988
|
-
|
|
1989
|
-
var a =
|
|
1990
|
-
a !== o && (o = a,
|
|
1991
|
-
}, 10),
|
|
1984
|
+
if (ma = e, t || this.options.forceAutoScrollFallback || ci || si || ui) {
|
|
1985
|
+
ga(e, this.options, a, t);
|
|
1986
|
+
var o = Cr(a, !0);
|
|
1987
|
+
da && (!ha || r !== fa || i !== pa) && (ha && Zr(), ha = setInterval(function() {
|
|
1988
|
+
var a = Cr(document.elementFromPoint(r, i), !0);
|
|
1989
|
+
a !== o && (o = a, Xr()), ga(e, n.options, a, t);
|
|
1990
|
+
}, 10), fa = r, pa = i);
|
|
1992
1991
|
} else {
|
|
1993
|
-
if (!this.options.bubbleScroll ||
|
|
1994
|
-
|
|
1992
|
+
if (!this.options.bubbleScroll || Cr(a, !0) === _r()) {
|
|
1993
|
+
Xr();
|
|
1995
1994
|
return;
|
|
1996
1995
|
}
|
|
1997
|
-
|
|
1996
|
+
ga(e, this.options, Cr(a, !1), !1);
|
|
1998
1997
|
}
|
|
1999
1998
|
}
|
|
2000
|
-
},
|
|
1999
|
+
}, nr(e, {
|
|
2001
2000
|
pluginName: "scroll",
|
|
2002
2001
|
initializeByDefault: !0
|
|
2003
2002
|
});
|
|
2004
2003
|
}
|
|
2005
|
-
function
|
|
2006
|
-
|
|
2004
|
+
function Xr() {
|
|
2005
|
+
Z.forEach(function(e) {
|
|
2007
2006
|
clearInterval(e.pid);
|
|
2008
|
-
}),
|
|
2007
|
+
}), Z = [];
|
|
2009
2008
|
}
|
|
2010
|
-
function
|
|
2011
|
-
clearInterval(
|
|
2009
|
+
function Zr() {
|
|
2010
|
+
clearInterval(ha);
|
|
2012
2011
|
}
|
|
2012
|
+
function Qr() {}
|
|
2013
2013
|
function $r() {}
|
|
2014
|
-
function ei() {
|
|
2015
|
-
function ti() {
|
|
2014
|
+
function ei() {
|
|
2016
2015
|
function e() {
|
|
2017
2016
|
this.defaults = { swapClass: "sortable-swap-highlight" };
|
|
2018
2017
|
}
|
|
2019
2018
|
return e.prototype = {
|
|
2020
2019
|
dragStart: function(e) {
|
|
2021
|
-
|
|
2020
|
+
va = e.dragEl;
|
|
2022
2021
|
},
|
|
2023
2022
|
dragOverValid: function(e) {
|
|
2024
2023
|
var t = e.completed, n = e.target, r = e.onMove, i = e.activeSortable, a = e.changed, o = e.cancel;
|
|
2025
2024
|
if (i.options.swap) {
|
|
2026
2025
|
var s = this.sortable.el, c = this.options;
|
|
2027
2026
|
if (n && n !== s) {
|
|
2028
|
-
var l =
|
|
2029
|
-
r(n) === !1 ?
|
|
2027
|
+
var l = va;
|
|
2028
|
+
r(n) === !1 ? va = null : (V(n, c.swapClass, !0), va = n), l && l !== va && V(l, c.swapClass, !1);
|
|
2030
2029
|
}
|
|
2031
2030
|
a(), t(!0), o();
|
|
2032
2031
|
}
|
|
2033
2032
|
},
|
|
2034
2033
|
drop: function(e) {
|
|
2035
2034
|
var t = e.activeSortable, n = e.putSortable, r = e.dragEl, i = n || this.sortable, a = this.options;
|
|
2036
|
-
|
|
2035
|
+
va && V(va, a.swapClass, !1), va && (a.swap || n && n.options.swap) && r !== va && (i.captureAnimationState(), i !== t && t.captureAnimationState(), ti(r, va), i.animateAll(), i !== t && t.animateAll());
|
|
2037
2036
|
},
|
|
2038
2037
|
nulling: function() {
|
|
2039
|
-
|
|
2038
|
+
va = null;
|
|
2040
2039
|
}
|
|
2041
|
-
},
|
|
2040
|
+
}, nr(e, {
|
|
2042
2041
|
pluginName: "swap",
|
|
2043
2042
|
eventProperties: function() {
|
|
2044
|
-
return { swapItem:
|
|
2043
|
+
return { swapItem: va };
|
|
2045
2044
|
}
|
|
2046
2045
|
});
|
|
2047
2046
|
}
|
|
2048
|
-
function
|
|
2047
|
+
function ti(e, t) {
|
|
2049
2048
|
var n = e.parentNode, r = t.parentNode, i, a;
|
|
2050
|
-
!n || !r || n.isEqualNode(t) || r.isEqualNode(e) || (i =
|
|
2049
|
+
!n || !r || n.isEqualNode(t) || r.isEqualNode(e) || (i = W(e), a = W(t), n.isEqualNode(r) && i < a && a++, n.insertBefore(t, n.children[i]), r.insertBefore(e, r.children[a]));
|
|
2051
2050
|
}
|
|
2052
|
-
function
|
|
2051
|
+
function ni() {
|
|
2053
2052
|
function e(e) {
|
|
2054
2053
|
for (var t in this) t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
|
|
2055
|
-
e.options.supportPointer ?
|
|
2054
|
+
e.options.supportPointer ? z(document, "pointerup", this._deselectMultiDrag) : (z(document, "mouseup", this._deselectMultiDrag), z(document, "touchend", this._deselectMultiDrag)), z(document, "keydown", this._checkKeyDown), z(document, "keyup", this._checkKeyUp), this.defaults = {
|
|
2056
2055
|
selectedClass: "sortable-selected",
|
|
2057
2056
|
multiDragKey: null,
|
|
2058
2057
|
setData: function(t, n) {
|
|
2059
2058
|
var r = "";
|
|
2060
|
-
Q.length &&
|
|
2059
|
+
Q.length && xa === e ? Q.forEach(function(e, t) {
|
|
2061
2060
|
r += (t ? ", " : "") + e.textContent;
|
|
2062
2061
|
}) : r = n.textContent, t.setData("Text", r);
|
|
2063
2062
|
}
|
|
@@ -2075,83 +2074,83 @@ function ri() {
|
|
|
2075
2074
|
setupClone: function(e) {
|
|
2076
2075
|
var t = e.sortable, n = e.cancel;
|
|
2077
2076
|
if (this.isMultiDrag) {
|
|
2078
|
-
for (var r = 0; r < Q.length; r++)
|
|
2077
|
+
for (var r = 0; r < Q.length; r++) ya.push(kr(Q[r])), ya[r].sortableIndex = Q[r].sortableIndex, ya[r].draggable = !1, ya[r].style["will-change"] = "", V(ya[r], this.options.selectedClass, !1), Q[r] === $ && V(ya[r], this.options.chosenClass, !1);
|
|
2079
2078
|
t._hideClone(), n();
|
|
2080
2079
|
}
|
|
2081
2080
|
},
|
|
2082
2081
|
clone: function(e) {
|
|
2083
2082
|
var t = e.sortable, n = e.rootEl, r = e.dispatchSortableEvent, i = e.cancel;
|
|
2084
|
-
this.isMultiDrag && (this.options.removeCloneOnHide || Q.length &&
|
|
2083
|
+
this.isMultiDrag && (this.options.removeCloneOnHide || Q.length && xa === t && (ii(!0, n), r("clone"), i()));
|
|
2085
2084
|
},
|
|
2086
2085
|
showClone: function(e) {
|
|
2087
2086
|
var t = e.cloneNowShown, n = e.rootEl, r = e.cancel;
|
|
2088
|
-
this.isMultiDrag && (
|
|
2089
|
-
|
|
2090
|
-
}), t(),
|
|
2087
|
+
this.isMultiDrag && (ii(!1, n), ya.forEach(function(e) {
|
|
2088
|
+
H(e, "display", "");
|
|
2089
|
+
}), t(), Ea = !1, r());
|
|
2091
2090
|
},
|
|
2092
2091
|
hideClone: function(e) {
|
|
2093
2092
|
var t = this;
|
|
2094
2093
|
e.sortable;
|
|
2095
2094
|
var n = e.cloneNowHidden, r = e.cancel;
|
|
2096
|
-
this.isMultiDrag && (
|
|
2097
|
-
|
|
2098
|
-
}), n(),
|
|
2095
|
+
this.isMultiDrag && (ya.forEach(function(e) {
|
|
2096
|
+
H(e, "display", "none"), t.options.removeCloneOnHide && e.parentNode && e.parentNode.removeChild(e);
|
|
2097
|
+
}), n(), Ea = !0, r());
|
|
2099
2098
|
},
|
|
2100
2099
|
dragStartGlobal: function(e) {
|
|
2101
|
-
e.sortable, !this.isMultiDrag &&
|
|
2102
|
-
e.sortableIndex =
|
|
2100
|
+
e.sortable, !this.isMultiDrag && xa && xa.multiDrag._deselectMultiDrag(), Q.forEach(function(e) {
|
|
2101
|
+
e.sortableIndex = W(e);
|
|
2103
2102
|
}), Q = Q.sort(function(e, t) {
|
|
2104
2103
|
return e.sortableIndex - t.sortableIndex;
|
|
2105
|
-
}),
|
|
2104
|
+
}), wa = !0;
|
|
2106
2105
|
},
|
|
2107
2106
|
dragStarted: function(e) {
|
|
2108
2107
|
var t = this, n = e.sortable;
|
|
2109
2108
|
if (this.isMultiDrag) {
|
|
2110
2109
|
if (this.options.sort && (n.captureAnimationState(), this.options.animation)) {
|
|
2111
2110
|
Q.forEach(function(e) {
|
|
2112
|
-
e !== $ &&
|
|
2111
|
+
e !== $ && H(e, "position", "absolute");
|
|
2113
2112
|
});
|
|
2114
|
-
var r =
|
|
2113
|
+
var r = U($, !1, !0, !0);
|
|
2115
2114
|
Q.forEach(function(e) {
|
|
2116
|
-
e !== $ &&
|
|
2117
|
-
}),
|
|
2115
|
+
e !== $ && Ar(e, r);
|
|
2116
|
+
}), Ca = !0, Sa = !0;
|
|
2118
2117
|
}
|
|
2119
2118
|
n.animateAll(function() {
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
}), t.options.sort &&
|
|
2119
|
+
Ca = !1, Sa = !1, t.options.animation && Q.forEach(function(e) {
|
|
2120
|
+
jr(e);
|
|
2121
|
+
}), t.options.sort && ai();
|
|
2123
2122
|
});
|
|
2124
2123
|
}
|
|
2125
2124
|
},
|
|
2126
2125
|
dragOver: function(e) {
|
|
2127
2126
|
var t = e.target, n = e.completed, r = e.cancel;
|
|
2128
|
-
|
|
2127
|
+
Ca && ~Q.indexOf(t) && (n(!1), r());
|
|
2129
2128
|
},
|
|
2130
2129
|
revert: function(e) {
|
|
2131
2130
|
var t = e.fromSortable, n = e.rootEl, r = e.sortable, i = e.dragRect;
|
|
2132
2131
|
Q.length > 1 && (Q.forEach(function(e) {
|
|
2133
2132
|
r.addAnimationState({
|
|
2134
2133
|
target: e,
|
|
2135
|
-
rect:
|
|
2136
|
-
}),
|
|
2137
|
-
}),
|
|
2134
|
+
rect: Ca ? U(e) : i
|
|
2135
|
+
}), jr(e), e.fromRect = i, t.removeAnimationState(e);
|
|
2136
|
+
}), Ca = !1, ri(!this.options.removeCloneOnHide, n));
|
|
2138
2137
|
},
|
|
2139
2138
|
dragOverCompleted: function(e) {
|
|
2140
2139
|
var t = e.sortable, n = e.isOwner, r = e.insertion, i = e.activeSortable, a = e.parentEl, o = e.putSortable, s = this.options;
|
|
2141
2140
|
if (r) {
|
|
2142
|
-
if (n && i._hideClone(),
|
|
2143
|
-
var c =
|
|
2141
|
+
if (n && i._hideClone(), Sa = !1, s.animation && Q.length > 1 && (Ca || !n && !i.options.sort && !o)) {
|
|
2142
|
+
var c = U($, !1, !0, !0);
|
|
2144
2143
|
Q.forEach(function(e) {
|
|
2145
|
-
e !== $ && (
|
|
2146
|
-
}),
|
|
2144
|
+
e !== $ && (Ar(e, c), a.appendChild(e));
|
|
2145
|
+
}), Ca = !0;
|
|
2147
2146
|
}
|
|
2148
|
-
if (!n) if (
|
|
2149
|
-
var l =
|
|
2150
|
-
i._showClone(t), i.options.animation && !
|
|
2147
|
+
if (!n) if (Ca || ai(), Q.length > 1) {
|
|
2148
|
+
var l = Ea;
|
|
2149
|
+
i._showClone(t), i.options.animation && !Ea && l && ya.forEach(function(e) {
|
|
2151
2150
|
i.addAnimationState({
|
|
2152
2151
|
target: e,
|
|
2153
|
-
rect:
|
|
2154
|
-
}), e.fromRect =
|
|
2152
|
+
rect: Ta
|
|
2153
|
+
}), e.fromRect = Ta, e.thisAnimationDuration = null;
|
|
2155
2154
|
});
|
|
2156
2155
|
} else i._showClone(t);
|
|
2157
2156
|
}
|
|
@@ -2161,19 +2160,19 @@ function ri() {
|
|
|
2161
2160
|
if (Q.forEach(function(e) {
|
|
2162
2161
|
e.thisAnimationDuration = null;
|
|
2163
2162
|
}), r.options.animation && !n && r.multiDrag.isMultiDrag) {
|
|
2164
|
-
|
|
2165
|
-
var i =
|
|
2166
|
-
|
|
2163
|
+
Ta = nr({}, t);
|
|
2164
|
+
var i = hr($, !0);
|
|
2165
|
+
Ta.top -= i.f, Ta.left -= i.e;
|
|
2167
2166
|
}
|
|
2168
2167
|
},
|
|
2169
2168
|
dragOverAnimationComplete: function() {
|
|
2170
|
-
|
|
2169
|
+
Ca && (Ca = !1, ai());
|
|
2171
2170
|
},
|
|
2172
2171
|
drop: function(e) {
|
|
2173
2172
|
var t = e.originalEvent, n = e.rootEl, r = e.parentEl, i = e.sortable, a = e.dispatchSortableEvent, o = e.oldIndex, s = e.putSortable, c = s || this.sortable;
|
|
2174
2173
|
if (t) {
|
|
2175
2174
|
var l = this.options, u = r.children;
|
|
2176
|
-
if (!
|
|
2175
|
+
if (!wa) if (l.multiDragKey && !this.multiDragKeyDown && this._deselectMultiDrag(), V($, l.selectedClass, !~Q.indexOf($)), ~Q.indexOf($)) Q.splice(Q.indexOf($), 1), ba = null, Fr({
|
|
2177
2176
|
sortable: i,
|
|
2178
2177
|
rootEl: n,
|
|
2179
2178
|
name: "deselect",
|
|
@@ -2181,17 +2180,17 @@ function ri() {
|
|
|
2181
2180
|
originalEvt: t
|
|
2182
2181
|
});
|
|
2183
2182
|
else {
|
|
2184
|
-
if (Q.push($),
|
|
2183
|
+
if (Q.push($), Fr({
|
|
2185
2184
|
sortable: i,
|
|
2186
2185
|
rootEl: n,
|
|
2187
2186
|
name: "select",
|
|
2188
2187
|
targetEl: $,
|
|
2189
2188
|
originalEvt: t
|
|
2190
|
-
}), t.shiftKey &&
|
|
2191
|
-
var d =
|
|
2189
|
+
}), t.shiftKey && ba && i.el.contains(ba)) {
|
|
2190
|
+
var d = W(ba), f = W($);
|
|
2192
2191
|
if (~d && ~f && d !== f) {
|
|
2193
2192
|
var p, m;
|
|
2194
|
-
for (f > d ? (m = d, p = f) : (m = f, p = d + 1); m < p; m++) ~Q.indexOf(u[m]) || (
|
|
2193
|
+
for (f > d ? (m = d, p = f) : (m = f, p = d + 1); m < p; m++) ~Q.indexOf(u[m]) || (V(u[m], l.selectedClass, !0), Q.push(u[m]), Fr({
|
|
2195
2194
|
sortable: i,
|
|
2196
2195
|
rootEl: n,
|
|
2197
2196
|
name: "select",
|
|
@@ -2199,52 +2198,52 @@ function ri() {
|
|
|
2199
2198
|
originalEvt: t
|
|
2200
2199
|
}));
|
|
2201
2200
|
}
|
|
2202
|
-
} else
|
|
2203
|
-
|
|
2201
|
+
} else ba = $;
|
|
2202
|
+
xa = c;
|
|
2204
2203
|
}
|
|
2205
|
-
if (
|
|
2206
|
-
if (
|
|
2207
|
-
var h =
|
|
2208
|
-
if (!
|
|
2204
|
+
if (wa && this.isMultiDrag) {
|
|
2205
|
+
if (Ca = !1, (r[gi].options.sort || r !== n) && Q.length > 1) {
|
|
2206
|
+
var h = U($), g = W($, ":not(." + this.options.selectedClass + ")");
|
|
2207
|
+
if (!Sa && l.animation && ($.thisAnimationDuration = null), c.captureAnimationState(), !Sa && (l.animation && ($.fromRect = h, Q.forEach(function(e) {
|
|
2209
2208
|
if (e.thisAnimationDuration = null, e !== $) {
|
|
2210
|
-
var t =
|
|
2209
|
+
var t = Ca ? U(e) : h;
|
|
2211
2210
|
e.fromRect = t, c.addAnimationState({
|
|
2212
2211
|
target: e,
|
|
2213
2212
|
rect: t
|
|
2214
2213
|
});
|
|
2215
2214
|
}
|
|
2216
|
-
})),
|
|
2215
|
+
})), ai(), Q.forEach(function(e) {
|
|
2217
2216
|
u[g] ? r.insertBefore(e, u[g]) : r.appendChild(e), g++;
|
|
2218
|
-
}), o ===
|
|
2217
|
+
}), o === W($))) {
|
|
2219
2218
|
var _ = !1;
|
|
2220
2219
|
Q.forEach(function(e) {
|
|
2221
|
-
if (e.sortableIndex !==
|
|
2220
|
+
if (e.sortableIndex !== W(e)) {
|
|
2222
2221
|
_ = !0;
|
|
2223
2222
|
return;
|
|
2224
2223
|
}
|
|
2225
2224
|
}), _ && a("update");
|
|
2226
2225
|
}
|
|
2227
2226
|
Q.forEach(function(e) {
|
|
2228
|
-
|
|
2227
|
+
jr(e);
|
|
2229
2228
|
}), c.animateAll();
|
|
2230
2229
|
}
|
|
2231
|
-
|
|
2230
|
+
xa = c;
|
|
2232
2231
|
}
|
|
2233
|
-
(n === r || s && s.lastPutMode !== "clone") &&
|
|
2232
|
+
(n === r || s && s.lastPutMode !== "clone") && ya.forEach(function(e) {
|
|
2234
2233
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2235
2234
|
});
|
|
2236
2235
|
}
|
|
2237
2236
|
},
|
|
2238
2237
|
nullingGlobal: function() {
|
|
2239
|
-
this.isMultiDrag =
|
|
2238
|
+
this.isMultiDrag = wa = !1, ya.length = 0;
|
|
2240
2239
|
},
|
|
2241
2240
|
destroyGlobal: function() {
|
|
2242
|
-
this._deselectMultiDrag(),
|
|
2241
|
+
this._deselectMultiDrag(), B(document, "pointerup", this._deselectMultiDrag), B(document, "mouseup", this._deselectMultiDrag), B(document, "touchend", this._deselectMultiDrag), B(document, "keydown", this._checkKeyDown), B(document, "keyup", this._checkKeyUp);
|
|
2243
2242
|
},
|
|
2244
2243
|
_deselectMultiDrag: function(e) {
|
|
2245
|
-
if (!(
|
|
2244
|
+
if (!(wa !== void 0 && wa) && xa === this.sortable && !(e && mr(e.target, this.options.draggable, this.sortable.el, !1)) && !(e && e.button !== 0)) for (; Q.length;) {
|
|
2246
2245
|
var t = Q[0];
|
|
2247
|
-
|
|
2246
|
+
V(t, this.options.selectedClass, !1), Q.shift(), Fr({
|
|
2248
2247
|
sortable: this.sortable,
|
|
2249
2248
|
rootEl: this.sortable.el,
|
|
2250
2249
|
name: "deselect",
|
|
@@ -2259,16 +2258,16 @@ function ri() {
|
|
|
2259
2258
|
_checkKeyUp: function(e) {
|
|
2260
2259
|
e.key === this.options.multiDragKey && (this.multiDragKeyDown = !1);
|
|
2261
2260
|
}
|
|
2262
|
-
},
|
|
2261
|
+
}, nr(e, {
|
|
2263
2262
|
pluginName: "multiDrag",
|
|
2264
2263
|
utils: {
|
|
2265
2264
|
select: function(e) {
|
|
2266
|
-
var t = e.parentNode[
|
|
2267
|
-
!t || !t.options.multiDrag || ~Q.indexOf(e) || (
|
|
2265
|
+
var t = e.parentNode[gi];
|
|
2266
|
+
!t || !t.options.multiDrag || ~Q.indexOf(e) || (xa && xa !== t && (xa.multiDrag._deselectMultiDrag(), xa = t), V(e, t.options.selectedClass, !0), Q.push(e));
|
|
2268
2267
|
},
|
|
2269
2268
|
deselect: function(e) {
|
|
2270
|
-
var t = e.parentNode[
|
|
2271
|
-
!t || !t.options.multiDrag || !~n || (
|
|
2269
|
+
var t = e.parentNode[gi], n = Q.indexOf(e);
|
|
2270
|
+
!t || !t.options.multiDrag || !~n || (V(e, t.options.selectedClass, !1), Q.splice(n, 1));
|
|
2272
2271
|
}
|
|
2273
2272
|
},
|
|
2274
2273
|
eventProperties: function() {
|
|
@@ -2278,14 +2277,14 @@ function ri() {
|
|
|
2278
2277
|
multiDragElement: r,
|
|
2279
2278
|
index: r.sortableIndex
|
|
2280
2279
|
});
|
|
2281
|
-
var i =
|
|
2280
|
+
var i = Ca && r !== $ ? -1 : Ca ? W(r, ":not(." + e.options.selectedClass + ")") : W(r);
|
|
2282
2281
|
n.push({
|
|
2283
2282
|
multiDragElement: r,
|
|
2284
2283
|
index: i
|
|
2285
2284
|
});
|
|
2286
2285
|
}), {
|
|
2287
|
-
items:
|
|
2288
|
-
clones: [].concat(
|
|
2286
|
+
items: ar(Q),
|
|
2287
|
+
clones: [].concat(ya),
|
|
2289
2288
|
oldIndicies: t,
|
|
2290
2289
|
newIndicies: n
|
|
2291
2290
|
};
|
|
@@ -2295,33 +2294,33 @@ function ri() {
|
|
|
2295
2294
|
} }
|
|
2296
2295
|
});
|
|
2297
2296
|
}
|
|
2298
|
-
function
|
|
2297
|
+
function ri(e, t) {
|
|
2299
2298
|
Q.forEach(function(n, r) {
|
|
2300
2299
|
var i = t.children[n.sortableIndex + (e ? Number(r) : 0)];
|
|
2301
2300
|
i ? t.insertBefore(n, i) : t.appendChild(n);
|
|
2302
2301
|
});
|
|
2303
2302
|
}
|
|
2304
|
-
function
|
|
2305
|
-
|
|
2303
|
+
function ii(e, t) {
|
|
2304
|
+
ya.forEach(function(n, r) {
|
|
2306
2305
|
var i = t.children[n.sortableIndex + (e ? Number(r) : 0)];
|
|
2307
2306
|
i ? t.insertBefore(n, i) : t.appendChild(n);
|
|
2308
2307
|
});
|
|
2309
2308
|
}
|
|
2310
|
-
function
|
|
2309
|
+
function ai() {
|
|
2311
2310
|
Q.forEach(function(e) {
|
|
2312
2311
|
e !== $ && e.parentNode && e.parentNode.removeChild(e);
|
|
2313
2312
|
});
|
|
2314
2313
|
}
|
|
2315
|
-
var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi,
|
|
2316
|
-
|
|
2314
|
+
var oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, K, q, J, Y, Si, Ci, X, wi, Ti, Ei, Di, Oi, ki, Ai, ji, Mi, Ni, Pi, Fi, Ii, Li, Ri, zi, Bi, Vi, Hi, Ui, Wi, Gi, Ki, qi, Ji, Yi, Xi, Zi, Qi, $i, ea, ta, na, ra, ia, aa, oa, sa, ca, Z, la, ua, da, fa, pa, ma, ha, ga, _a, va, Q, ya, ba, xa, Sa, Ca, wa, $, Ta, Ea, Da = n((() => {
|
|
2315
|
+
oi = "1.14.0", si = dr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ci = dr(/Edge/i), li = dr(/firefox/i), ui = dr(/safari/i) && !dr(/chrome/i) && !dr(/android/i), di = dr(/iP(ad|od|hone)/i), fi = dr(/chrome/i) && dr(/android/i), pi = {
|
|
2317
2316
|
capture: !1,
|
|
2318
2317
|
passive: !1
|
|
2319
|
-
},
|
|
2318
|
+
}, mi = /\s+/g, gi = "Sortable" + (/* @__PURE__ */ new Date()).getTime(), _i = [], vi = { initializeByDefault: !0 }, yi = {
|
|
2320
2319
|
mount: function(e) {
|
|
2321
|
-
for (var t in
|
|
2322
|
-
|
|
2320
|
+
for (var t in vi) vi.hasOwnProperty(t) && !(t in e) && (e[t] = vi[t]);
|
|
2321
|
+
_i.forEach(function(t) {
|
|
2323
2322
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2324
|
-
}),
|
|
2323
|
+
}), _i.push(e);
|
|
2325
2324
|
},
|
|
2326
2325
|
pluginEvent: function(e, t, n) {
|
|
2327
2326
|
var r = this;
|
|
@@ -2329,16 +2328,16 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
2329
2328
|
r.eventCanceled = !0;
|
|
2330
2329
|
};
|
|
2331
2330
|
var i = e + "Global";
|
|
2332
|
-
|
|
2333
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2331
|
+
_i.forEach(function(r) {
|
|
2332
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i]($n({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e]($n({ sortable: t }, n)));
|
|
2334
2333
|
});
|
|
2335
2334
|
},
|
|
2336
2335
|
initializePlugins: function(e, t, n, r) {
|
|
2337
|
-
for (var i in
|
|
2336
|
+
for (var i in _i.forEach(function(r) {
|
|
2338
2337
|
var i = r.pluginName;
|
|
2339
2338
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2340
2339
|
var a = new r(e, t, e.options);
|
|
2341
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2340
|
+
a.sortable = e, a.options = e.options, e[i] = a, nr(n, a.defaults);
|
|
2342
2341
|
}
|
|
2343
2342
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2344
2343
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2347,79 +2346,79 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
2347
2346
|
},
|
|
2348
2347
|
getEventProperties: function(e, t) {
|
|
2349
2348
|
var n = {};
|
|
2350
|
-
return
|
|
2351
|
-
typeof r.eventProperties == "function" &&
|
|
2349
|
+
return _i.forEach(function(r) {
|
|
2350
|
+
typeof r.eventProperties == "function" && nr(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2352
2351
|
}), n;
|
|
2353
2352
|
},
|
|
2354
2353
|
modifyOption: function(e, t, n) {
|
|
2355
2354
|
var r;
|
|
2356
|
-
return
|
|
2355
|
+
return _i.forEach(function(i) {
|
|
2357
2356
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2358
2357
|
}), r;
|
|
2359
2358
|
}
|
|
2360
|
-
},
|
|
2361
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2362
|
-
|
|
2363
|
-
dragEl:
|
|
2364
|
-
parentEl:
|
|
2365
|
-
ghostEl:
|
|
2366
|
-
rootEl:
|
|
2367
|
-
nextEl:
|
|
2368
|
-
lastDownEl:
|
|
2369
|
-
cloneEl:
|
|
2370
|
-
cloneHidden:
|
|
2371
|
-
dragStarted:
|
|
2372
|
-
putSortable:
|
|
2373
|
-
activeSortable:
|
|
2359
|
+
}, bi = ["evt"], xi = function(e, t) {
|
|
2360
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = ir(n, bi);
|
|
2361
|
+
yi.pluginEvent.bind(G)(e, t, $n({
|
|
2362
|
+
dragEl: K,
|
|
2363
|
+
parentEl: q,
|
|
2364
|
+
ghostEl: J,
|
|
2365
|
+
rootEl: Y,
|
|
2366
|
+
nextEl: Si,
|
|
2367
|
+
lastDownEl: Ci,
|
|
2368
|
+
cloneEl: X,
|
|
2369
|
+
cloneHidden: wi,
|
|
2370
|
+
dragStarted: Bi,
|
|
2371
|
+
putSortable: Ai,
|
|
2372
|
+
activeSortable: G.active,
|
|
2374
2373
|
originalEvent: r,
|
|
2375
|
-
oldIndex:
|
|
2376
|
-
oldDraggableIndex:
|
|
2377
|
-
newIndex:
|
|
2378
|
-
newDraggableIndex:
|
|
2379
|
-
hideGhostForTarget:
|
|
2380
|
-
unhideGhostForTarget:
|
|
2374
|
+
oldIndex: Ti,
|
|
2375
|
+
oldDraggableIndex: Di,
|
|
2376
|
+
newIndex: Ei,
|
|
2377
|
+
newDraggableIndex: Oi,
|
|
2378
|
+
hideGhostForTarget: aa,
|
|
2379
|
+
unhideGhostForTarget: oa,
|
|
2381
2380
|
cloneNowHidden: function() {
|
|
2382
|
-
|
|
2381
|
+
wi = !0;
|
|
2383
2382
|
},
|
|
2384
2383
|
cloneNowShown: function() {
|
|
2385
|
-
|
|
2384
|
+
wi = !1;
|
|
2386
2385
|
},
|
|
2387
2386
|
dispatchSortableEvent: function(e) {
|
|
2388
|
-
|
|
2387
|
+
Ir({
|
|
2389
2388
|
sortable: t,
|
|
2390
2389
|
name: e,
|
|
2391
2390
|
originalEvent: r
|
|
2392
2391
|
});
|
|
2393
2392
|
}
|
|
2394
2393
|
}, i));
|
|
2395
|
-
},
|
|
2396
|
-
if (
|
|
2397
|
-
if (
|
|
2394
|
+
}, ji = !1, Mi = !1, Ni = [], Ui = !1, Wi = !1, qi = [], Ji = !1, Yi = [], Xi = typeof document < "u", Zi = di, Qi = ci || si ? "cssFloat" : "float", $i = Xi && !fi && !di && "draggable" in document.createElement("div"), ea = function() {
|
|
2395
|
+
if (Xi) {
|
|
2396
|
+
if (si) return !1;
|
|
2398
2397
|
var e = document.createElement("x");
|
|
2399
2398
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2400
2399
|
}
|
|
2401
|
-
}(),
|
|
2402
|
-
var n =
|
|
2400
|
+
}(), ta = function(e, t) {
|
|
2401
|
+
var n = H(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = yr(e, 0, t), a = yr(e, 1, t), o = i && H(i), s = a && H(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + U(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + U(a).width;
|
|
2403
2402
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2404
2403
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2405
2404
|
if (i && o.float && o.float !== "none") {
|
|
2406
2405
|
var u = o.float === "left" ? "left" : "right";
|
|
2407
2406
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2408
2407
|
}
|
|
2409
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2410
|
-
},
|
|
2408
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Qi] === "none" || a && n[Qi] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2409
|
+
}, na = function(e, t, n) {
|
|
2411
2410
|
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;
|
|
2412
2411
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2413
|
-
},
|
|
2412
|
+
}, ra = function(e, t) {
|
|
2414
2413
|
var n;
|
|
2415
|
-
return
|
|
2416
|
-
var i = r[
|
|
2417
|
-
if (!(!i ||
|
|
2418
|
-
var a =
|
|
2414
|
+
return Ni.some(function(r) {
|
|
2415
|
+
var i = r[gi].options.emptyInsertThreshold;
|
|
2416
|
+
if (!(!i || br(r))) {
|
|
2417
|
+
var a = U(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2419
2418
|
if (o && s) return n = r;
|
|
2420
2419
|
}
|
|
2421
2420
|
}), n;
|
|
2422
|
-
},
|
|
2421
|
+
}, ia = function(e) {
|
|
2423
2422
|
function t(e, n) {
|
|
2424
2423
|
return function(r, i, a, o) {
|
|
2425
2424
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2432,92 +2431,92 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
2432
2431
|
};
|
|
2433
2432
|
}
|
|
2434
2433
|
var n = {}, r = e.group;
|
|
2435
|
-
(!r ||
|
|
2436
|
-
},
|
|
2437
|
-
!
|
|
2438
|
-
},
|
|
2439
|
-
!
|
|
2440
|
-
},
|
|
2441
|
-
if (
|
|
2442
|
-
}, !0),
|
|
2443
|
-
if (
|
|
2434
|
+
(!r || er(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;
|
|
2435
|
+
}, aa = function() {
|
|
2436
|
+
!ea && J && H(J, "display", "none");
|
|
2437
|
+
}, oa = function() {
|
|
2438
|
+
!ea && J && H(J, "display", "");
|
|
2439
|
+
}, Xi && document.addEventListener("click", function(e) {
|
|
2440
|
+
if (Mi) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Mi = !1, !1;
|
|
2441
|
+
}, !0), sa = function(e) {
|
|
2442
|
+
if (K) {
|
|
2444
2443
|
e = e.touches ? e.touches[0] : e;
|
|
2445
|
-
var t =
|
|
2444
|
+
var t = ra(e.clientX, e.clientY);
|
|
2446
2445
|
if (t) {
|
|
2447
2446
|
var n = {};
|
|
2448
2447
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2449
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
2448
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[gi]._onDragOver(n);
|
|
2450
2449
|
}
|
|
2451
2450
|
}
|
|
2452
|
-
},
|
|
2453
|
-
|
|
2454
|
-
},
|
|
2455
|
-
constructor:
|
|
2451
|
+
}, ca = function(e) {
|
|
2452
|
+
K && K.parentNode[gi]._isOutsideThisEl(e.target);
|
|
2453
|
+
}, G.prototype = {
|
|
2454
|
+
constructor: G,
|
|
2456
2455
|
_isOutsideThisEl: function(e) {
|
|
2457
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2456
|
+
!this.el.contains(e) && e !== this.el && (Vi = null);
|
|
2458
2457
|
},
|
|
2459
2458
|
_getDirection: function(e, t) {
|
|
2460
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t,
|
|
2459
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, K) : this.options.direction;
|
|
2461
2460
|
},
|
|
2462
2461
|
_onTapStart: function(e) {
|
|
2463
2462
|
if (e.cancelable) {
|
|
2464
2463
|
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;
|
|
2465
|
-
if (
|
|
2466
|
-
if (
|
|
2464
|
+
if (Kr(n), !K && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && ui && s && s.tagName.toUpperCase() === "SELECT") && (s = mr(s, r.draggable, n, !1), !(s && s.animated) && Ci !== s)) {
|
|
2465
|
+
if (Ti = W(s), Di = W(s, r.draggable), typeof l == "function") {
|
|
2467
2466
|
if (l.call(this, e, s, this)) {
|
|
2468
|
-
|
|
2467
|
+
Ir({
|
|
2469
2468
|
sortable: t,
|
|
2470
2469
|
rootEl: c,
|
|
2471
2470
|
name: "filter",
|
|
2472
2471
|
targetEl: s,
|
|
2473
2472
|
toEl: n,
|
|
2474
2473
|
fromEl: n
|
|
2475
|
-
}),
|
|
2474
|
+
}), xi("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
2476
2475
|
return;
|
|
2477
2476
|
}
|
|
2478
2477
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2479
|
-
if (r =
|
|
2478
|
+
if (r = mr(c, r.trim(), n, !1), r) return Ir({
|
|
2480
2479
|
sortable: t,
|
|
2481
2480
|
rootEl: r,
|
|
2482
2481
|
name: "filter",
|
|
2483
2482
|
targetEl: s,
|
|
2484
2483
|
fromEl: n,
|
|
2485
2484
|
toEl: n
|
|
2486
|
-
}),
|
|
2485
|
+
}), xi("filter", t, { evt: e }), !0;
|
|
2487
2486
|
}), l)) {
|
|
2488
2487
|
i && e.cancelable && e.preventDefault();
|
|
2489
2488
|
return;
|
|
2490
2489
|
}
|
|
2491
|
-
r.handle && !
|
|
2490
|
+
r.handle && !mr(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2492
2491
|
}
|
|
2493
2492
|
}
|
|
2494
2493
|
},
|
|
2495
2494
|
_prepareDragStart: function(e, t, n) {
|
|
2496
2495
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2497
|
-
if (n && !
|
|
2498
|
-
var c =
|
|
2499
|
-
if (
|
|
2500
|
-
target:
|
|
2496
|
+
if (n && !K && n.parentNode === i) {
|
|
2497
|
+
var c = U(n);
|
|
2498
|
+
if (Y = i, K = n, q = K.parentNode, Si = K.nextSibling, Ci = n, ki = a.group, G.dragged = K, Pi = {
|
|
2499
|
+
target: K,
|
|
2501
2500
|
clientX: (t || e).clientX,
|
|
2502
2501
|
clientY: (t || e).clientY
|
|
2503
|
-
},
|
|
2504
|
-
if (
|
|
2502
|
+
}, Ri = Pi.clientX - c.left, zi = Pi.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, K.style["will-change"] = "all", s = function() {
|
|
2503
|
+
if (xi("delayEnded", r, { evt: e }), G.eventCanceled) {
|
|
2505
2504
|
r._onDrop();
|
|
2506
2505
|
return;
|
|
2507
2506
|
}
|
|
2508
|
-
r._disableDelayedDragEvents(), !
|
|
2507
|
+
r._disableDelayedDragEvents(), !li && r.nativeDraggable && (K.draggable = !0), r._triggerDragStart(e, t), Ir({
|
|
2509
2508
|
sortable: r,
|
|
2510
2509
|
name: "choose",
|
|
2511
2510
|
originalEvent: e
|
|
2512
|
-
}),
|
|
2511
|
+
}), V(K, a.chosenClass, !0);
|
|
2513
2512
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2514
|
-
|
|
2515
|
-
}),
|
|
2516
|
-
if (
|
|
2513
|
+
gr(K, e.trim(), zr);
|
|
2514
|
+
}), z(o, "dragover", sa), z(o, "mousemove", sa), z(o, "touchmove", sa), z(o, "mouseup", r._onDrop), z(o, "touchend", r._onDrop), z(o, "touchcancel", r._onDrop), li && this.nativeDraggable && (this.options.touchStartThreshold = 4, K.draggable = !0), xi("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(ci || si))) {
|
|
2515
|
+
if (G.eventCanceled) {
|
|
2517
2516
|
this._onDrop();
|
|
2518
2517
|
return;
|
|
2519
2518
|
}
|
|
2520
|
-
|
|
2519
|
+
z(o, "mouseup", r._disableDelayedDrag), z(o, "touchend", r._disableDelayedDrag), z(o, "touchcancel", r._disableDelayedDrag), z(o, "mousemove", r._delayedDragTouchMoveHandler), z(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && z(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
2521
2520
|
} else s();
|
|
2522
2521
|
}
|
|
2523
2522
|
},
|
|
@@ -2526,25 +2525,25 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
2526
2525
|
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();
|
|
2527
2526
|
},
|
|
2528
2527
|
_disableDelayedDrag: function() {
|
|
2529
|
-
|
|
2528
|
+
K && zr(K), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2530
2529
|
},
|
|
2531
2530
|
_disableDelayedDragEvents: function() {
|
|
2532
2531
|
var e = this.el.ownerDocument;
|
|
2533
|
-
|
|
2532
|
+
B(e, "mouseup", this._disableDelayedDrag), B(e, "touchend", this._disableDelayedDrag), B(e, "touchcancel", this._disableDelayedDrag), B(e, "mousemove", this._delayedDragTouchMoveHandler), B(e, "touchmove", this._delayedDragTouchMoveHandler), B(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
2534
2533
|
},
|
|
2535
2534
|
_triggerDragStart: function(e, t) {
|
|
2536
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
2535
|
+
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? z(document, "pointermove", this._onTouchMove) : t ? z(document, "touchmove", this._onTouchMove) : z(document, "mousemove", this._onTouchMove) : (z(K, "dragend", this), z(Y, "dragstart", this._onDragStart));
|
|
2537
2536
|
try {
|
|
2538
|
-
document.selection ?
|
|
2537
|
+
document.selection ? qr(function() {
|
|
2539
2538
|
document.selection.empty();
|
|
2540
2539
|
}) : window.getSelection().removeAllRanges();
|
|
2541
2540
|
} catch {}
|
|
2542
2541
|
},
|
|
2543
2542
|
_dragStarted: function(e, t) {
|
|
2544
|
-
if (
|
|
2545
|
-
|
|
2543
|
+
if (ji = !1, Y && K) {
|
|
2544
|
+
xi("dragStarted", this, { evt: t }), this.nativeDraggable && z(document, "dragover", ca);
|
|
2546
2545
|
var n = this.options;
|
|
2547
|
-
!e &&
|
|
2546
|
+
!e && V(K, n.dragClass, !1), V(K, n.ghostClass, !0), G.active = this, e && this._appendGhost(), Ir({
|
|
2548
2547
|
sortable: this,
|
|
2549
2548
|
name: "start",
|
|
2550
2549
|
originalEvent: t
|
|
@@ -2552,33 +2551,33 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
2552
2551
|
} else this._nulling();
|
|
2553
2552
|
},
|
|
2554
2553
|
_emulateDragOver: function() {
|
|
2555
|
-
if (
|
|
2556
|
-
this._lastX =
|
|
2557
|
-
for (var e = document.elementFromPoint(
|
|
2558
|
-
if (
|
|
2559
|
-
if (t[
|
|
2554
|
+
if (Fi) {
|
|
2555
|
+
this._lastX = Fi.clientX, this._lastY = Fi.clientY, aa();
|
|
2556
|
+
for (var e = document.elementFromPoint(Fi.clientX, Fi.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Fi.clientX, Fi.clientY), e !== t);) t = e;
|
|
2557
|
+
if (K.parentNode[gi]._isOutsideThisEl(e), t) do {
|
|
2558
|
+
if (t[gi]) {
|
|
2560
2559
|
var n = void 0;
|
|
2561
|
-
if (n = t[
|
|
2562
|
-
clientX:
|
|
2563
|
-
clientY:
|
|
2560
|
+
if (n = t[gi]._onDragOver({
|
|
2561
|
+
clientX: Fi.clientX,
|
|
2562
|
+
clientY: Fi.clientY,
|
|
2564
2563
|
target: e,
|
|
2565
2564
|
rootEl: t
|
|
2566
2565
|
}), n && !this.options.dragoverBubble) break;
|
|
2567
2566
|
}
|
|
2568
2567
|
e = t;
|
|
2569
2568
|
} while (t = t.parentNode);
|
|
2570
|
-
|
|
2569
|
+
oa();
|
|
2571
2570
|
}
|
|
2572
2571
|
},
|
|
2573
2572
|
_onTouchMove: function(e) {
|
|
2574
|
-
if (
|
|
2575
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a =
|
|
2576
|
-
if (!
|
|
2573
|
+
if (Pi) {
|
|
2574
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = J && hr(J, !0), o = J && a && a.a, s = J && a && a.d, c = Zi && Ki && xr(Ki), l = (i.clientX - Pi.clientX + r.x) / (o || 1) + (c ? c[0] - qi[0] : 0) / (o || 1), u = (i.clientY - Pi.clientY + r.y) / (s || 1) + (c ? c[1] - qi[1] : 0) / (s || 1);
|
|
2575
|
+
if (!G.active && !ji) {
|
|
2577
2576
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2578
2577
|
this._onDragStart(e, !0);
|
|
2579
2578
|
}
|
|
2580
|
-
if (
|
|
2581
|
-
a ? (a.e += l - (
|
|
2579
|
+
if (J) {
|
|
2580
|
+
a ? (a.e += l - (Ii || 0), a.f += u - (Li || 0)) : a = {
|
|
2582
2581
|
a: 1,
|
|
2583
2582
|
b: 0,
|
|
2584
2583
|
c: 0,
|
|
@@ -2587,39 +2586,39 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
2587
2586
|
f: u
|
|
2588
2587
|
};
|
|
2589
2588
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2590
|
-
|
|
2589
|
+
H(J, "webkitTransform", d), H(J, "mozTransform", d), H(J, "msTransform", d), H(J, "transform", d), Ii = l, Li = u, Fi = i;
|
|
2591
2590
|
}
|
|
2592
2591
|
e.cancelable && e.preventDefault();
|
|
2593
2592
|
}
|
|
2594
2593
|
},
|
|
2595
2594
|
_appendGhost: function() {
|
|
2596
|
-
if (!
|
|
2597
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
2598
|
-
if (
|
|
2599
|
-
for (
|
|
2600
|
-
|
|
2595
|
+
if (!J) {
|
|
2596
|
+
var e = this.options.fallbackOnBody ? document.body : Y, t = U(K, !0, Zi, !0, e), n = this.options;
|
|
2597
|
+
if (Zi) {
|
|
2598
|
+
for (Ki = e; H(Ki, "position") === "static" && H(Ki, "transform") === "none" && Ki !== document;) Ki = Ki.parentNode;
|
|
2599
|
+
Ki !== document.body && Ki !== document.documentElement ? (Ki === document && (Ki = _r()), t.top += Ki.scrollTop, t.left += Ki.scrollLeft) : Ki = _r(), qi = xr(Ki);
|
|
2601
2600
|
}
|
|
2602
|
-
|
|
2601
|
+
J = K.cloneNode(!0), V(J, n.ghostClass, !1), V(J, n.fallbackClass, !0), V(J, n.dragClass, !0), H(J, "transition", ""), H(J, "transform", ""), H(J, "box-sizing", "border-box"), H(J, "margin", 0), H(J, "top", t.top), H(J, "left", t.left), H(J, "width", t.width), H(J, "height", t.height), H(J, "opacity", "0.8"), H(J, "position", Zi ? "absolute" : "fixed"), H(J, "zIndex", "100000"), H(J, "pointerEvents", "none"), G.ghost = J, e.appendChild(J), H(J, "transform-origin", Ri / parseInt(J.style.width) * 100 + "% " + zi / parseInt(J.style.height) * 100 + "%");
|
|
2603
2602
|
}
|
|
2604
2603
|
},
|
|
2605
2604
|
_onDragStart: function(e, t) {
|
|
2606
2605
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
2607
|
-
if (
|
|
2606
|
+
if (xi("dragStart", this, { evt: e }), G.eventCanceled) {
|
|
2608
2607
|
this._onDrop();
|
|
2609
2608
|
return;
|
|
2610
2609
|
}
|
|
2611
|
-
|
|
2612
|
-
|
|
2610
|
+
xi("setupClone", this), G.eventCanceled || (X = kr(K), X.draggable = !1, X.style["will-change"] = "", this._hideClone(), V(X, this.options.chosenClass, !1), G.clone = X), n.cloneId = qr(function() {
|
|
2611
|
+
xi("clone", n), !G.eventCanceled && (n.options.removeCloneOnHide || Y.insertBefore(X, K), n._hideClone(), Ir({
|
|
2613
2612
|
sortable: n,
|
|
2614
2613
|
name: "clone"
|
|
2615
2614
|
}));
|
|
2616
|
-
}), !t &&
|
|
2615
|
+
}), !t && V(K, i.dragClass, !0), t ? (Mi = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (B(document, "mouseup", n._onDrop), B(document, "touchend", n._onDrop), B(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, K)), z(document, "drop", n), H(K, "transform", "translateZ(0)")), ji = !0, n._dragStartId = qr(n._dragStarted.bind(n, t, e)), z(document, "selectstart", n), Bi = !0, ui && H(document.body, "user-select", "none");
|
|
2617
2616
|
},
|
|
2618
2617
|
_onDragOver: function(e) {
|
|
2619
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c =
|
|
2620
|
-
if (
|
|
2618
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = G.active, l = ki === s, u = o.sort, d = Ai || c, f, p = this, m = !1;
|
|
2619
|
+
if (Ji) return;
|
|
2621
2620
|
function h(o, s) {
|
|
2622
|
-
|
|
2621
|
+
xi(o, p, $n({
|
|
2623
2622
|
evt: e,
|
|
2624
2623
|
isOwner: l,
|
|
2625
2624
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2631,7 +2630,7 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
2631
2630
|
target: n,
|
|
2632
2631
|
completed: _,
|
|
2633
2632
|
onMove: function(n, i) {
|
|
2634
|
-
return
|
|
2633
|
+
return Rr(Y, t, K, r, n, U(n), e, i);
|
|
2635
2634
|
},
|
|
2636
2635
|
changed: v
|
|
2637
2636
|
}, s));
|
|
@@ -2640,119 +2639,119 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
2640
2639
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
2641
2640
|
}
|
|
2642
2641
|
function _(r) {
|
|
2643
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
2642
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (V(K, Ai ? Ai.options.ghostClass : c.options.ghostClass, !1), V(K, o.ghostClass, !0)), Ai !== p && p !== G.active ? Ai = p : p === G.active && Ai && (Ai = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
2644
2643
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2645
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n ===
|
|
2644
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === K && !K.animated || n === t && !n.animated) && (Vi = null), !o.dragoverBubble && !e.rootEl && n !== document && (K.parentNode[gi]._isOutsideThisEl(e.target), !r && sa(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2646
2645
|
}
|
|
2647
2646
|
function v() {
|
|
2648
|
-
|
|
2647
|
+
Ei = W(K), Oi = W(K, o.draggable), Ir({
|
|
2649
2648
|
sortable: p,
|
|
2650
2649
|
name: "change",
|
|
2651
2650
|
toEl: t,
|
|
2652
|
-
newIndex:
|
|
2653
|
-
newDraggableIndex:
|
|
2651
|
+
newIndex: Ei,
|
|
2652
|
+
newDraggableIndex: Oi,
|
|
2654
2653
|
originalEvent: e
|
|
2655
2654
|
});
|
|
2656
2655
|
}
|
|
2657
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
2658
|
-
if (
|
|
2659
|
-
if (
|
|
2660
|
-
if (f = this._getDirection(e, n) === "vertical", r = K
|
|
2661
|
-
if (a) return
|
|
2662
|
-
var y =
|
|
2663
|
-
if (!y ||
|
|
2664
|
-
if (y ===
|
|
2665
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
2666
|
-
} else if (y &&
|
|
2667
|
-
var b =
|
|
2668
|
-
if (b ===
|
|
2669
|
-
if (n = b, i =
|
|
2656
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = mr(n, o.draggable, t, !0), h("dragOver"), G.eventCanceled) return m;
|
|
2657
|
+
if (K.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
2658
|
+
if (Mi = !1, c && !o.disabled && (l ? u || (a = q !== Y) : Ai === this || (this.lastPutMode = ki.checkPull(this, c, K, e)) && s.checkPut(this, c, K, e))) {
|
|
2659
|
+
if (f = this._getDirection(e, n) === "vertical", r = U(K), h("dragOverValid"), G.eventCanceled) return m;
|
|
2660
|
+
if (a) return q = Y, g(), this._hideClone(), h("revert"), G.eventCanceled || (Si ? Y.insertBefore(K, Si) : Y.appendChild(K)), _(!0);
|
|
2661
|
+
var y = br(t, o.draggable);
|
|
2662
|
+
if (!y || Hr(e, f, this) && !y.animated) {
|
|
2663
|
+
if (y === K) return _(!1);
|
|
2664
|
+
if (y && t === e.target && (n = y), n && (i = U(n)), Rr(Y, t, K, r, n, i, e, !!n) !== !1) return g(), t.appendChild(K), q = t, v(), _(!0);
|
|
2665
|
+
} else if (y && Vr(e, f, this)) {
|
|
2666
|
+
var b = yr(t, 0, o, !0);
|
|
2667
|
+
if (b === K) return _(!1);
|
|
2668
|
+
if (n = b, i = U(n), Rr(Y, t, K, r, n, i, e, !1) !== !1) return g(), t.insertBefore(K, b), q = t, v(), _(!0);
|
|
2670
2669
|
} else if (n.parentNode === t) {
|
|
2671
|
-
i =
|
|
2672
|
-
var x = 0, S, C =
|
|
2673
|
-
|
|
2674
|
-
var
|
|
2670
|
+
i = U(n);
|
|
2671
|
+
var x = 0, S, C = K.parentNode !== t, ee = !na(K.animated && K.toRect || r, n.animated && n.toRect || i, f), w = f ? "top" : "left", T = vr(n, "top", "top") || vr(K, "top", "top"), te = T ? T.scrollTop : void 0;
|
|
2672
|
+
Vi !== n && (S = i[w], Ui = !1, Wi = !ee && o.invertSwap || C), x = Ur(e, n, i, f, ee ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Wi, Vi === n);
|
|
2673
|
+
var E;
|
|
2675
2674
|
if (x !== 0) {
|
|
2676
|
-
var
|
|
2675
|
+
var ne = W(K);
|
|
2677
2676
|
do
|
|
2678
|
-
|
|
2679
|
-
while (
|
|
2677
|
+
ne -= x, E = q.children[ne];
|
|
2678
|
+
while (E && (H(E, "display") === "none" || E === J));
|
|
2680
2679
|
}
|
|
2681
|
-
if (x === 0 ||
|
|
2682
|
-
|
|
2683
|
-
var
|
|
2684
|
-
|
|
2685
|
-
var
|
|
2686
|
-
if (
|
|
2680
|
+
if (x === 0 || E === n) return _(!1);
|
|
2681
|
+
Vi = n, Hi = x;
|
|
2682
|
+
var re = n.nextElementSibling, ie = !1;
|
|
2683
|
+
ie = x === 1;
|
|
2684
|
+
var ae = Rr(Y, t, K, r, n, i, e, ie);
|
|
2685
|
+
if (ae !== !1) return (ae === 1 || ae === -1) && (ie = ae === 1), Ji = !0, setTimeout(Br, 30), g(), ie && !re ? t.appendChild(K) : n.parentNode.insertBefore(K, ie ? re : n), T && Or(T, 0, te - T.scrollTop), q = K.parentNode, S !== void 0 && !Wi && (Gi = Math.abs(S - U(n)[w])), v(), _(!0);
|
|
2687
2686
|
}
|
|
2688
|
-
if (t.contains(
|
|
2687
|
+
if (t.contains(K)) return _(!1);
|
|
2689
2688
|
}
|
|
2690
2689
|
return !1;
|
|
2691
2690
|
},
|
|
2692
2691
|
_ignoreWhileAnimating: null,
|
|
2693
2692
|
_offMoveEvents: function() {
|
|
2694
|
-
|
|
2693
|
+
B(document, "mousemove", this._onTouchMove), B(document, "touchmove", this._onTouchMove), B(document, "pointermove", this._onTouchMove), B(document, "dragover", sa), B(document, "mousemove", sa), B(document, "touchmove", sa);
|
|
2695
2694
|
},
|
|
2696
2695
|
_offUpEvents: function() {
|
|
2697
2696
|
var e = this.el.ownerDocument;
|
|
2698
|
-
|
|
2697
|
+
B(e, "mouseup", this._onDrop), B(e, "touchend", this._onDrop), B(e, "pointerup", this._onDrop), B(e, "touchcancel", this._onDrop), B(document, "selectstart", this);
|
|
2699
2698
|
},
|
|
2700
2699
|
_onDrop: function(e) {
|
|
2701
2700
|
var t = this.el, n = this.options;
|
|
2702
|
-
if (
|
|
2701
|
+
if (Ei = W(K), Oi = W(K, n.draggable), xi("drop", this, { evt: e }), q = K && K.parentNode, Ei = W(K), Oi = W(K, n.draggable), G.eventCanceled) {
|
|
2703
2702
|
this._nulling();
|
|
2704
2703
|
return;
|
|
2705
2704
|
}
|
|
2706
|
-
|
|
2705
|
+
ji = !1, Wi = !1, Ui = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Jr(this.cloneId), Jr(this._dragStartId), this.nativeDraggable && (B(document, "drop", this), B(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), ui && H(document.body, "user-select", ""), H(K, "transform", ""), e && (Bi && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), J && J.parentNode && J.parentNode.removeChild(J), (Y === q || Ai && Ai.lastPutMode !== "clone") && X && X.parentNode && X.parentNode.removeChild(X), K && (this.nativeDraggable && B(K, "dragend", this), zr(K), K.style["will-change"] = "", Bi && !ji && V(K, Ai ? Ai.options.ghostClass : this.options.ghostClass, !1), V(K, this.options.chosenClass, !1), Ir({
|
|
2707
2706
|
sortable: this,
|
|
2708
2707
|
name: "unchoose",
|
|
2709
|
-
toEl:
|
|
2708
|
+
toEl: q,
|
|
2710
2709
|
newIndex: null,
|
|
2711
2710
|
newDraggableIndex: null,
|
|
2712
2711
|
originalEvent: e
|
|
2713
|
-
}),
|
|
2712
|
+
}), Y === q ? Ei !== Ti && Ei >= 0 && (Ir({
|
|
2714
2713
|
sortable: this,
|
|
2715
2714
|
name: "update",
|
|
2716
|
-
toEl:
|
|
2715
|
+
toEl: q,
|
|
2717
2716
|
originalEvent: e
|
|
2718
|
-
}),
|
|
2717
|
+
}), Ir({
|
|
2719
2718
|
sortable: this,
|
|
2720
2719
|
name: "sort",
|
|
2721
|
-
toEl:
|
|
2720
|
+
toEl: q,
|
|
2722
2721
|
originalEvent: e
|
|
2723
|
-
})) : (
|
|
2724
|
-
rootEl:
|
|
2722
|
+
})) : (Ei >= 0 && (Ir({
|
|
2723
|
+
rootEl: q,
|
|
2725
2724
|
name: "add",
|
|
2726
|
-
toEl:
|
|
2727
|
-
fromEl:
|
|
2725
|
+
toEl: q,
|
|
2726
|
+
fromEl: Y,
|
|
2728
2727
|
originalEvent: e
|
|
2729
|
-
}),
|
|
2728
|
+
}), Ir({
|
|
2730
2729
|
sortable: this,
|
|
2731
2730
|
name: "remove",
|
|
2732
|
-
toEl:
|
|
2731
|
+
toEl: q,
|
|
2733
2732
|
originalEvent: e
|
|
2734
|
-
}),
|
|
2735
|
-
rootEl:
|
|
2733
|
+
}), Ir({
|
|
2734
|
+
rootEl: q,
|
|
2736
2735
|
name: "sort",
|
|
2737
|
-
toEl:
|
|
2738
|
-
fromEl:
|
|
2736
|
+
toEl: q,
|
|
2737
|
+
fromEl: Y,
|
|
2739
2738
|
originalEvent: e
|
|
2740
|
-
}),
|
|
2739
|
+
}), Ir({
|
|
2741
2740
|
sortable: this,
|
|
2742
2741
|
name: "sort",
|
|
2743
|
-
toEl:
|
|
2742
|
+
toEl: q,
|
|
2744
2743
|
originalEvent: e
|
|
2745
|
-
})),
|
|
2744
|
+
})), Ai && Ai.save()), G.active && ((Ei == null || Ei === -1) && (Ei = Ti, Oi = Di), Ir({
|
|
2746
2745
|
sortable: this,
|
|
2747
2746
|
name: "end",
|
|
2748
|
-
toEl:
|
|
2747
|
+
toEl: q,
|
|
2749
2748
|
originalEvent: e
|
|
2750
2749
|
}), this.save()))), this._nulling();
|
|
2751
2750
|
},
|
|
2752
2751
|
_nulling: function() {
|
|
2753
|
-
|
|
2752
|
+
xi("nulling", this), Y = K = q = J = Si = X = Ci = wi = Pi = Fi = Bi = Ei = Oi = Ti = Di = Vi = Hi = Ai = ki = G.dragged = G.ghost = G.clone = G.active = null, Yi.forEach(function(e) {
|
|
2754
2753
|
e.checked = !0;
|
|
2755
|
-
}),
|
|
2754
|
+
}), Yi.length = Ii = Li = 0;
|
|
2756
2755
|
},
|
|
2757
2756
|
handleEvent: function(e) {
|
|
2758
2757
|
switch (e.type) {
|
|
@@ -2762,7 +2761,7 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
2762
2761
|
break;
|
|
2763
2762
|
case "dragenter":
|
|
2764
2763
|
case "dragover":
|
|
2765
|
-
|
|
2764
|
+
K && (this._onDragOver(e), Lr(e));
|
|
2766
2765
|
break;
|
|
2767
2766
|
case "selectstart":
|
|
2768
2767
|
e.preventDefault();
|
|
@@ -2770,14 +2769,14 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
2770
2769
|
}
|
|
2771
2770
|
},
|
|
2772
2771
|
toArray: function() {
|
|
2773
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
2772
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], mr(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Gr(t));
|
|
2774
2773
|
return e;
|
|
2775
2774
|
},
|
|
2776
2775
|
sort: function(e, t) {
|
|
2777
2776
|
var n = {}, r = this.el;
|
|
2778
2777
|
this.toArray().forEach(function(e, t) {
|
|
2779
2778
|
var i = r.children[t];
|
|
2780
|
-
|
|
2779
|
+
mr(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
2781
2780
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
2782
2781
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
2783
2782
|
}), t && this.animateAll();
|
|
@@ -2787,25 +2786,25 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
2787
2786
|
e && e.set && e.set(this);
|
|
2788
2787
|
},
|
|
2789
2788
|
closest: function(e, t) {
|
|
2790
|
-
return
|
|
2789
|
+
return mr(e, t || this.options.draggable, this.el, !1);
|
|
2791
2790
|
},
|
|
2792
2791
|
option: function(e, t) {
|
|
2793
2792
|
var n = this.options;
|
|
2794
2793
|
if (t === void 0) return n[e];
|
|
2795
|
-
var r =
|
|
2796
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
2794
|
+
var r = yi.modifyOption(this, e, t);
|
|
2795
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && ia(n);
|
|
2797
2796
|
},
|
|
2798
2797
|
destroy: function() {
|
|
2799
|
-
|
|
2798
|
+
xi("destroy", this);
|
|
2800
2799
|
var e = this.el;
|
|
2801
|
-
e[
|
|
2800
|
+
e[gi] = null, B(e, "mousedown", this._onTapStart), B(e, "touchstart", this._onTapStart), B(e, "pointerdown", this._onTapStart), this.nativeDraggable && (B(e, "dragover", this), B(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
2802
2801
|
e.removeAttribute("draggable");
|
|
2803
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
2802
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Ni.splice(Ni.indexOf(this.el), 1), this.el = e = null;
|
|
2804
2803
|
},
|
|
2805
2804
|
_hideClone: function() {
|
|
2806
|
-
if (!
|
|
2807
|
-
if (
|
|
2808
|
-
|
|
2805
|
+
if (!wi) {
|
|
2806
|
+
if (xi("hideClone", this), G.eventCanceled) return;
|
|
2807
|
+
H(X, "display", "none"), this.options.removeCloneOnHide && X.parentNode && X.parentNode.removeChild(X), wi = !0;
|
|
2809
2808
|
}
|
|
2810
2809
|
},
|
|
2811
2810
|
_showClone: function(e) {
|
|
@@ -2813,60 +2812,60 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
2813
2812
|
this._hideClone();
|
|
2814
2813
|
return;
|
|
2815
2814
|
}
|
|
2816
|
-
if (
|
|
2817
|
-
if (
|
|
2818
|
-
|
|
2815
|
+
if (wi) {
|
|
2816
|
+
if (xi("showClone", this), G.eventCanceled) return;
|
|
2817
|
+
K.parentNode == Y && !this.options.group.revertClone ? Y.insertBefore(X, K) : Si ? Y.insertBefore(X, Si) : Y.appendChild(X), this.options.group.revertClone && this.animate(K, X), H(X, "display", ""), wi = !1;
|
|
2819
2818
|
}
|
|
2820
2819
|
}
|
|
2821
|
-
},
|
|
2822
|
-
(
|
|
2823
|
-
}),
|
|
2824
|
-
on:
|
|
2825
|
-
off:
|
|
2826
|
-
css:
|
|
2827
|
-
find:
|
|
2820
|
+
}, Xi && z(document, "touchmove", function(e) {
|
|
2821
|
+
(G.active || ji) && e.cancelable && e.preventDefault();
|
|
2822
|
+
}), G.utils = {
|
|
2823
|
+
on: z,
|
|
2824
|
+
off: B,
|
|
2825
|
+
css: H,
|
|
2826
|
+
find: gr,
|
|
2828
2827
|
is: function(e, t) {
|
|
2829
|
-
return !!
|
|
2828
|
+
return !!mr(e, t, e, !1);
|
|
2830
2829
|
},
|
|
2831
|
-
extend:
|
|
2832
|
-
throttle:
|
|
2833
|
-
closest:
|
|
2834
|
-
toggleClass:
|
|
2835
|
-
clone:
|
|
2836
|
-
index:
|
|
2837
|
-
nextTick:
|
|
2838
|
-
cancelNextTick:
|
|
2839
|
-
detectDirection:
|
|
2840
|
-
getChild:
|
|
2841
|
-
},
|
|
2842
|
-
return e[
|
|
2843
|
-
},
|
|
2830
|
+
extend: wr,
|
|
2831
|
+
throttle: Er,
|
|
2832
|
+
closest: mr,
|
|
2833
|
+
toggleClass: V,
|
|
2834
|
+
clone: kr,
|
|
2835
|
+
index: W,
|
|
2836
|
+
nextTick: qr,
|
|
2837
|
+
cancelNextTick: Jr,
|
|
2838
|
+
detectDirection: ta,
|
|
2839
|
+
getChild: yr
|
|
2840
|
+
}, G.get = function(e) {
|
|
2841
|
+
return e[gi];
|
|
2842
|
+
}, G.mount = function() {
|
|
2844
2843
|
var e = [...arguments];
|
|
2845
2844
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
2846
2845
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
2847
|
-
e.utils && (
|
|
2846
|
+
e.utils && (G.utils = $n($n({}, G.utils), e.utils)), yi.mount(e);
|
|
2848
2847
|
});
|
|
2849
|
-
},
|
|
2850
|
-
return new
|
|
2851
|
-
},
|
|
2848
|
+
}, G.create = function(e, t) {
|
|
2849
|
+
return new G(e, t);
|
|
2850
|
+
}, G.version = oi, Z = [], da = !1, ga = Er(function(e, t, n, r) {
|
|
2852
2851
|
if (t.scroll) {
|
|
2853
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
2854
|
-
|
|
2855
|
-
var d = 0, f =
|
|
2852
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = _r(), l = !1, u;
|
|
2853
|
+
ua !== n && (ua = n, Xr(), la = t.scroll, u = t.scrollFn, la === !0 && (la = Cr(n, !0)));
|
|
2854
|
+
var d = 0, f = la;
|
|
2856
2855
|
do {
|
|
2857
|
-
var p = f, m =
|
|
2856
|
+
var p = f, m = U(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, ee = p.scrollHeight, w = H(p), T = p.scrollLeft, te = p.scrollTop;
|
|
2858
2857
|
p === c ? (x = y < C && (w.overflowX === "auto" || w.overflowX === "scroll" || w.overflowX === "visible"), S = b < ee && (w.overflowY === "auto" || w.overflowY === "scroll" || w.overflowY === "visible")) : (x = y < C && (w.overflowX === "auto" || w.overflowX === "scroll"), S = b < ee && (w.overflowY === "auto" || w.overflowY === "scroll"));
|
|
2859
|
-
var
|
|
2860
|
-
if (!
|
|
2861
|
-
(
|
|
2862
|
-
r && this.layer === 0 &&
|
|
2863
|
-
var t =
|
|
2864
|
-
typeof u == "function" && u.call(
|
|
2858
|
+
var E = x && (Math.abs(v - i) <= o && T + y < C) - (Math.abs(_ - i) <= o && !!T), ne = S && (Math.abs(g - a) <= o && te + b < ee) - (Math.abs(h - a) <= o && !!te);
|
|
2859
|
+
if (!Z[d]) for (var re = 0; re <= d; re++) Z[re] || (Z[re] = {});
|
|
2860
|
+
(Z[d].vx != E || Z[d].vy != ne || Z[d].el !== p) && (Z[d].el = p, Z[d].vx = E, Z[d].vy = ne, clearInterval(Z[d].pid), (E != 0 || ne != 0) && (l = !0, Z[d].pid = setInterval(function() {
|
|
2861
|
+
r && this.layer === 0 && G.active._onTouchMove(ma);
|
|
2862
|
+
var t = Z[this.layer].vy ? Z[this.layer].vy * s : 0, n = Z[this.layer].vx ? Z[this.layer].vx * s : 0;
|
|
2863
|
+
typeof u == "function" && u.call(G.dragged.parentNode[gi], n, t, e, ma, Z[this.layer].el) !== "continue" || Or(Z[this.layer].el, n, t);
|
|
2865
2864
|
}.bind({ layer: d }), 24))), d++;
|
|
2866
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
2867
|
-
|
|
2865
|
+
} while (t.bubbleScroll && f !== c && (f = Cr(f, !1)));
|
|
2866
|
+
da = l;
|
|
2868
2867
|
}
|
|
2869
|
-
}, 30),
|
|
2868
|
+
}, 30), _a = function(e) {
|
|
2870
2869
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
2871
2870
|
if (t) {
|
|
2872
2871
|
var c = n || i;
|
|
@@ -2877,29 +2876,30 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
2877
2876
|
putSortable: n
|
|
2878
2877
|
}));
|
|
2879
2878
|
}
|
|
2880
|
-
},
|
|
2879
|
+
}, Qr.prototype = {
|
|
2881
2880
|
startIndex: null,
|
|
2882
2881
|
dragStart: function(e) {
|
|
2883
|
-
|
|
2882
|
+
var t = e.oldDraggableIndex;
|
|
2883
|
+
this.startIndex = t;
|
|
2884
2884
|
},
|
|
2885
2885
|
onSpill: function(e) {
|
|
2886
2886
|
var t = e.dragEl, n = e.putSortable;
|
|
2887
2887
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
2888
|
-
var r =
|
|
2888
|
+
var r = yr(this.sortable.el, this.startIndex, this.options);
|
|
2889
2889
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
2890
2890
|
},
|
|
2891
|
-
drop:
|
|
2892
|
-
},
|
|
2891
|
+
drop: _a
|
|
2892
|
+
}, nr(Qr, { pluginName: "revertOnSpill" }), $r.prototype = {
|
|
2893
2893
|
onSpill: function(e) {
|
|
2894
2894
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
2895
2895
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
2896
2896
|
},
|
|
2897
|
-
drop:
|
|
2898
|
-
},
|
|
2899
|
-
})),
|
|
2900
|
-
(function(
|
|
2901
|
-
typeof
|
|
2902
|
-
})(typeof self < "u" ? self :
|
|
2897
|
+
drop: _a
|
|
2898
|
+
}, nr($r, { pluginName: "removeOnSpill" }), Q = [], ya = [], Sa = !1, Ca = !1, wa = !1, G.mount(new Yr()), G.mount($r, Qr);
|
|
2899
|
+
})), Oa = /* @__PURE__ */ a(((n, r) => {
|
|
2900
|
+
(function(i, a) {
|
|
2901
|
+
typeof n == "object" && typeof r == "object" ? r.exports = a(t("vue"), (Da(), e(Zn))) : typeof define == "function" && define.amd ? define([, "sortablejs"], a) : typeof n == "object" ? n.vuedraggable = a(t("vue"), (Da(), e(Zn))) : i.vuedraggable = a(i.Vue, i.Sortable);
|
|
2902
|
+
})(typeof self < "u" ? self : n, function(e, t) {
|
|
2903
2903
|
return (function(e) {
|
|
2904
2904
|
var t = {};
|
|
2905
2905
|
function n(r) {
|
|
@@ -3320,14 +3320,14 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
3320
3320
|
}
|
|
3321
3321
|
for (var ee = "", w = 0, T = 0; T < S.length; T++) {
|
|
3322
3322
|
C = S[T];
|
|
3323
|
-
for (var
|
|
3324
|
-
var
|
|
3323
|
+
for (var te = String(C[0]), E = d(f(s(C.index), p.length), 0), ne = [], re = 1; re < C.length; re++) ne.push(g(C[re]));
|
|
3324
|
+
var ie = C.groups;
|
|
3325
3325
|
if (m) {
|
|
3326
|
-
var
|
|
3327
|
-
|
|
3328
|
-
var
|
|
3329
|
-
} else
|
|
3330
|
-
|
|
3326
|
+
var ae = [te].concat(ne, E, p);
|
|
3327
|
+
ie !== void 0 && ae.push(ie);
|
|
3328
|
+
var oe = String(r.apply(void 0, ae));
|
|
3329
|
+
} else oe = b(te, p, E, ne, ie, r);
|
|
3330
|
+
E >= w && (ee += p.slice(w, E) + oe, w = E + te.length);
|
|
3331
3331
|
}
|
|
3332
3332
|
return ee + p.slice(w);
|
|
3333
3333
|
}];
|
|
@@ -3542,7 +3542,7 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
3542
3542
|
e.exports = function(e, t, n, u, p, x, S) {
|
|
3543
3543
|
i(n, t, u);
|
|
3544
3544
|
var C = function(e) {
|
|
3545
|
-
if (e === p &&
|
|
3545
|
+
if (e === p && E) return E;
|
|
3546
3546
|
if (!h && e in T) return T[e];
|
|
3547
3547
|
switch (e) {
|
|
3548
3548
|
case _: return function() {
|
|
@@ -3558,20 +3558,20 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
3558
3558
|
return function() {
|
|
3559
3559
|
return new n(this);
|
|
3560
3560
|
};
|
|
3561
|
-
}, ee = t + " Iterator", w = !1, T = e.prototype,
|
|
3562
|
-
if (
|
|
3563
|
-
return
|
|
3564
|
-
}), (!d || S) && T[g] !==
|
|
3561
|
+
}, ee = t + " Iterator", w = !1, T = e.prototype, te = T[g] || T["@@iterator"] || p && T[p], E = !h && te || C(p), ne = t == "Array" && T.entries || te, re, ie, ae;
|
|
3562
|
+
if (ne && (re = a(ne.call(new e())), m !== Object.prototype && re.next && (!d && a(re) !== m && (o ? o(re, m) : typeof re[g] != "function" && c(re, g, b)), s(re, ee, !0, !0), d && (f[ee] = b))), p == v && te && te.name !== v && (w = !0, E = function() {
|
|
3563
|
+
return te.call(this);
|
|
3564
|
+
}), (!d || S) && T[g] !== E && c(T, g, E), f[t] = E, p) if (ie = {
|
|
3565
3565
|
values: C(v),
|
|
3566
|
-
keys: x ?
|
|
3566
|
+
keys: x ? E : C(_),
|
|
3567
3567
|
entries: C(y)
|
|
3568
|
-
}, S) for (
|
|
3568
|
+
}, S) for (ae in ie) (h || w || !(ae in T)) && l(T, ae, ie[ae]);
|
|
3569
3569
|
else r({
|
|
3570
3570
|
target: t,
|
|
3571
3571
|
proto: !0,
|
|
3572
3572
|
forced: h || w
|
|
3573
|
-
},
|
|
3574
|
-
return
|
|
3573
|
+
}, ie);
|
|
3574
|
+
return ie;
|
|
3575
3575
|
};
|
|
3576
3576
|
}),
|
|
3577
3577
|
"7f9a": (function(e, t, n) {
|
|
@@ -3785,103 +3785,103 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
3785
3785
|
} });
|
|
3786
3786
|
}),
|
|
3787
3787
|
a4d3: (function(e, t, n) {
|
|
3788
|
-
var r = n("23e7"), i = n("da84"), a = n("d066"), o = n("c430"), s = n("83ab"), c = n("4930"), l = n("fdbf"), u = n("d039"), d = n("5135"), f = n("e8b5"), p = n("861d"), m = n("825a"), h = n("7b0b"), g = n("fc6a"), _ = n("c04e"), v = n("5c6c"), y = n("7c73"), b = n("df75"), x = n("241c"), S = n("057f"), C = n("7418"), ee = n("06cf"), w = n("9bf2"), T = n("d1e7"),
|
|
3789
|
-
return y(
|
|
3790
|
-
return
|
|
3788
|
+
var r = n("23e7"), i = n("da84"), a = n("d066"), o = n("c430"), s = n("83ab"), c = n("4930"), l = n("fdbf"), u = n("d039"), d = n("5135"), f = n("e8b5"), p = n("861d"), m = n("825a"), h = n("7b0b"), g = n("fc6a"), _ = n("c04e"), v = n("5c6c"), y = n("7c73"), b = n("df75"), x = n("241c"), S = n("057f"), C = n("7418"), ee = n("06cf"), w = n("9bf2"), T = n("d1e7"), te = n("9112"), E = n("6eeb"), ne = n("5692"), re = n("f772"), ie = n("d012"), ae = n("90e3"), oe = n("b622"), se = n("e538"), ce = n("746f"), le = n("d44e"), ue = n("69f3"), de = n("b727").forEach, fe = re("hidden"), pe = "Symbol", D = "prototype", O = oe("toPrimitive"), me = ue.set, he = ue.getterFor(pe), k = Object[D], A = i.Symbol, ge = a("JSON", "stringify"), j = ee.f, _e = w.f, M = S.f, ve = T.f, ye = ne("symbols"), be = ne("op-symbols"), xe = ne("string-to-symbol-registry"), N = ne("symbol-to-string-registry"), Se = ne("wks"), Ce = i.QObject, we = !Ce || !Ce[D] || !Ce[D].findChild, P = s && u(function() {
|
|
3789
|
+
return y(_e({}, "a", { get: function() {
|
|
3790
|
+
return _e(this, "a", { value: 7 }).a;
|
|
3791
3791
|
} })).a != 7;
|
|
3792
3792
|
}) ? function(e, t, n) {
|
|
3793
|
-
var r =
|
|
3794
|
-
r && delete
|
|
3795
|
-
} :
|
|
3796
|
-
var n =
|
|
3797
|
-
return
|
|
3798
|
-
type:
|
|
3793
|
+
var r = j(k, t);
|
|
3794
|
+
r && delete k[t], _e(e, t, n), r && e !== k && _e(k, t, r);
|
|
3795
|
+
} : _e, F = function(e, t) {
|
|
3796
|
+
var n = ye[e] = y(A[D]);
|
|
3797
|
+
return me(n, {
|
|
3798
|
+
type: pe,
|
|
3799
3799
|
tag: e,
|
|
3800
3800
|
description: t
|
|
3801
3801
|
}), s || (n.description = t), n;
|
|
3802
|
-
},
|
|
3802
|
+
}, I = l ? function(e) {
|
|
3803
3803
|
return typeof e == "symbol";
|
|
3804
3804
|
} : function(e) {
|
|
3805
|
-
return Object(e) instanceof
|
|
3806
|
-
},
|
|
3807
|
-
e ===
|
|
3805
|
+
return Object(e) instanceof A;
|
|
3806
|
+
}, Te = function(e, t, n) {
|
|
3807
|
+
e === k && Te(be, t, n), m(e);
|
|
3808
3808
|
var r = _(t, !0);
|
|
3809
|
-
return m(n), d(
|
|
3810
|
-
},
|
|
3809
|
+
return m(n), d(ye, r) ? (n.enumerable ? (d(e, fe) && e[fe][r] && (e[fe][r] = !1), n = y(n, { enumerable: v(0, !1) })) : (d(e, fe) || _e(e, fe, v(1, {})), e[fe][r] = !0), P(e, r, n)) : _e(e, r, n);
|
|
3810
|
+
}, Ee = function(e, t) {
|
|
3811
3811
|
m(e);
|
|
3812
3812
|
var n = g(t);
|
|
3813
|
-
return
|
|
3814
|
-
(!s ||
|
|
3813
|
+
return de(b(n).concat(R(n)), function(t) {
|
|
3814
|
+
(!s || Oe.call(n, t)) && Te(e, t, n[t]);
|
|
3815
3815
|
}), e;
|
|
3816
|
-
},
|
|
3817
|
-
return t === void 0 ? y(e) :
|
|
3818
|
-
},
|
|
3819
|
-
var t = _(e, !0), n =
|
|
3820
|
-
return this ===
|
|
3821
|
-
},
|
|
3816
|
+
}, De = function(e, t) {
|
|
3817
|
+
return t === void 0 ? y(e) : Ee(y(e), t);
|
|
3818
|
+
}, Oe = function(e) {
|
|
3819
|
+
var t = _(e, !0), n = ve.call(this, t);
|
|
3820
|
+
return this === k && d(ye, t) && !d(be, t) ? !1 : n || !d(this, t) || !d(ye, t) || d(this, fe) && this[fe][t] ? n : !0;
|
|
3821
|
+
}, L = function(e, t) {
|
|
3822
3822
|
var n = g(e), r = _(t, !0);
|
|
3823
|
-
if (!(n ===
|
|
3824
|
-
var i =
|
|
3825
|
-
return i && d(
|
|
3823
|
+
if (!(n === k && d(ye, r) && !d(be, r))) {
|
|
3824
|
+
var i = j(n, r);
|
|
3825
|
+
return i && d(ye, r) && !(d(n, fe) && n[fe][r]) && (i.enumerable = !0), i;
|
|
3826
3826
|
}
|
|
3827
|
-
},
|
|
3828
|
-
var t =
|
|
3829
|
-
return
|
|
3830
|
-
!d(
|
|
3827
|
+
}, ke = function(e) {
|
|
3828
|
+
var t = M(g(e)), n = [];
|
|
3829
|
+
return de(t, function(e) {
|
|
3830
|
+
!d(ye, e) && !d(ie, e) && n.push(e);
|
|
3831
3831
|
}), n;
|
|
3832
|
-
},
|
|
3833
|
-
var t = e ===
|
|
3834
|
-
return
|
|
3835
|
-
d(
|
|
3832
|
+
}, R = function(e) {
|
|
3833
|
+
var t = e === k, n = M(t ? be : g(e)), r = [];
|
|
3834
|
+
return de(n, function(e) {
|
|
3835
|
+
d(ye, e) && (!t || d(k, e)) && r.push(ye[e]);
|
|
3836
3836
|
}), r;
|
|
3837
3837
|
};
|
|
3838
|
-
c || (
|
|
3839
|
-
if (this instanceof
|
|
3840
|
-
var e = !arguments.length || arguments[0] === void 0 ? void 0 : String(arguments[0]), t =
|
|
3841
|
-
this ===
|
|
3838
|
+
c || (A = function() {
|
|
3839
|
+
if (this instanceof A) throw TypeError("Symbol is not a constructor");
|
|
3840
|
+
var e = !arguments.length || arguments[0] === void 0 ? void 0 : String(arguments[0]), t = ae(e), n = function(e) {
|
|
3841
|
+
this === k && n.call(be, e), d(this, fe) && d(this[fe], t) && (this[fe][t] = !1), P(this, t, v(1, e));
|
|
3842
3842
|
};
|
|
3843
|
-
return s &&
|
|
3843
|
+
return s && we && P(k, t, {
|
|
3844
3844
|
configurable: !0,
|
|
3845
3845
|
set: n
|
|
3846
|
-
}),
|
|
3847
|
-
},
|
|
3848
|
-
return
|
|
3849
|
-
}),
|
|
3850
|
-
return
|
|
3851
|
-
}), T.f =
|
|
3852
|
-
return
|
|
3853
|
-
}, s && (
|
|
3846
|
+
}), F(t, e);
|
|
3847
|
+
}, E(A[D], "toString", function() {
|
|
3848
|
+
return he(this).tag;
|
|
3849
|
+
}), E(A, "withoutSetter", function(e) {
|
|
3850
|
+
return F(ae(e), e);
|
|
3851
|
+
}), T.f = Oe, w.f = Te, ee.f = L, x.f = S.f = ke, C.f = R, se.f = function(e) {
|
|
3852
|
+
return F(oe(e), e);
|
|
3853
|
+
}, s && (_e(A[D], "description", {
|
|
3854
3854
|
configurable: !0,
|
|
3855
3855
|
get: function() {
|
|
3856
|
-
return
|
|
3856
|
+
return he(this).description;
|
|
3857
3857
|
}
|
|
3858
|
-
}), o ||
|
|
3858
|
+
}), o || E(k, "propertyIsEnumerable", Oe, { unsafe: !0 }))), r({
|
|
3859
3859
|
global: !0,
|
|
3860
3860
|
wrap: !0,
|
|
3861
3861
|
forced: !c,
|
|
3862
3862
|
sham: !c
|
|
3863
|
-
}, { Symbol:
|
|
3864
|
-
|
|
3863
|
+
}, { Symbol: A }), de(b(Se), function(e) {
|
|
3864
|
+
ce(e);
|
|
3865
3865
|
}), r({
|
|
3866
|
-
target:
|
|
3866
|
+
target: pe,
|
|
3867
3867
|
stat: !0,
|
|
3868
3868
|
forced: !c
|
|
3869
3869
|
}, {
|
|
3870
3870
|
for: function(e) {
|
|
3871
3871
|
var t = String(e);
|
|
3872
|
-
if (d(
|
|
3873
|
-
var n =
|
|
3874
|
-
return
|
|
3872
|
+
if (d(xe, t)) return xe[t];
|
|
3873
|
+
var n = A(t);
|
|
3874
|
+
return xe[t] = n, N[n] = t, n;
|
|
3875
3875
|
},
|
|
3876
3876
|
keyFor: function(e) {
|
|
3877
|
-
if (!
|
|
3878
|
-
if (d(
|
|
3877
|
+
if (!I(e)) throw TypeError(e + " is not a symbol");
|
|
3878
|
+
if (d(N, e)) return N[e];
|
|
3879
3879
|
},
|
|
3880
3880
|
useSetter: function() {
|
|
3881
|
-
|
|
3881
|
+
we = !0;
|
|
3882
3882
|
},
|
|
3883
3883
|
useSimple: function() {
|
|
3884
|
-
|
|
3884
|
+
we = !1;
|
|
3885
3885
|
}
|
|
3886
3886
|
}), r({
|
|
3887
3887
|
target: "Object",
|
|
@@ -3889,17 +3889,17 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
3889
3889
|
forced: !c,
|
|
3890
3890
|
sham: !s
|
|
3891
3891
|
}, {
|
|
3892
|
-
create:
|
|
3893
|
-
defineProperty:
|
|
3894
|
-
defineProperties:
|
|
3895
|
-
getOwnPropertyDescriptor:
|
|
3892
|
+
create: De,
|
|
3893
|
+
defineProperty: Te,
|
|
3894
|
+
defineProperties: Ee,
|
|
3895
|
+
getOwnPropertyDescriptor: L
|
|
3896
3896
|
}), r({
|
|
3897
3897
|
target: "Object",
|
|
3898
3898
|
stat: !0,
|
|
3899
3899
|
forced: !c
|
|
3900
3900
|
}, {
|
|
3901
|
-
getOwnPropertyNames:
|
|
3902
|
-
getOwnPropertySymbols:
|
|
3901
|
+
getOwnPropertyNames: ke,
|
|
3902
|
+
getOwnPropertySymbols: R
|
|
3903
3903
|
}), r({
|
|
3904
3904
|
target: "Object",
|
|
3905
3905
|
stat: !0,
|
|
@@ -3908,19 +3908,19 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
3908
3908
|
})
|
|
3909
3909
|
}, { getOwnPropertySymbols: function(e) {
|
|
3910
3910
|
return C.f(h(e));
|
|
3911
|
-
} }),
|
|
3911
|
+
} }), ge && r({
|
|
3912
3912
|
target: "JSON",
|
|
3913
3913
|
stat: !0,
|
|
3914
3914
|
forced: !c || u(function() {
|
|
3915
|
-
var e =
|
|
3916
|
-
return
|
|
3915
|
+
var e = A();
|
|
3916
|
+
return ge([e]) != "[null]" || ge({ a: e }) != "{}" || ge(Object(e)) != "{}";
|
|
3917
3917
|
})
|
|
3918
3918
|
}, { stringify: function(e, t, n) {
|
|
3919
3919
|
for (var r = [e], i = 1, a; arguments.length > i;) r.push(arguments[i++]);
|
|
3920
|
-
if (a = t, !(!p(t) && e === void 0 ||
|
|
3921
|
-
if (typeof a == "function" && (t = a.call(this, e, t)), !
|
|
3922
|
-
}), r[1] = t,
|
|
3923
|
-
} }),
|
|
3920
|
+
if (a = t, !(!p(t) && e === void 0 || I(e))) return f(t) || (t = function(e, t) {
|
|
3921
|
+
if (typeof a == "function" && (t = a.call(this, e, t)), !I(t)) return t;
|
|
3922
|
+
}), r[1] = t, ge.apply(null, r);
|
|
3923
|
+
} }), A[D][O] || te(A[D], O, A[D].valueOf), le(A, pe), ie[fe] = !0;
|
|
3924
3924
|
}),
|
|
3925
3925
|
a630: (function(e, t, n) {
|
|
3926
3926
|
var r = n("23e7"), i = n("4df4");
|
|
@@ -4595,43 +4595,43 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
4595
4595
|
});
|
|
4596
4596
|
});
|
|
4597
4597
|
n("5db7"), n("73d9");
|
|
4598
|
-
var
|
|
4598
|
+
var te = [
|
|
4599
4599
|
"Start",
|
|
4600
4600
|
"Add",
|
|
4601
4601
|
"Remove",
|
|
4602
4602
|
"Update",
|
|
4603
4603
|
"End"
|
|
4604
|
-
],
|
|
4604
|
+
], E = [
|
|
4605
4605
|
"Choose",
|
|
4606
4606
|
"Unchoose",
|
|
4607
4607
|
"Sort",
|
|
4608
4608
|
"Filter",
|
|
4609
4609
|
"Clone"
|
|
4610
|
-
],
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4610
|
+
], ne = ["Move"], re = [
|
|
4611
|
+
ne,
|
|
4612
|
+
te,
|
|
4613
|
+
E
|
|
4614
4614
|
].flatMap(function(e) {
|
|
4615
4615
|
return e;
|
|
4616
4616
|
}).map(function(e) {
|
|
4617
4617
|
return `on${e}`;
|
|
4618
|
-
}),
|
|
4619
|
-
manage:
|
|
4620
|
-
manageAndEmit:
|
|
4621
|
-
emit:
|
|
4618
|
+
}), ie = {
|
|
4619
|
+
manage: ne,
|
|
4620
|
+
manageAndEmit: te,
|
|
4621
|
+
emit: E
|
|
4622
4622
|
};
|
|
4623
|
-
function
|
|
4624
|
-
return
|
|
4623
|
+
function ae(e) {
|
|
4624
|
+
return re.indexOf(e) !== -1;
|
|
4625
4625
|
}
|
|
4626
4626
|
n("caad"), n("2ca0");
|
|
4627
|
-
var
|
|
4628
|
-
function
|
|
4629
|
-
return
|
|
4627
|
+
var oe = /* @__PURE__ */ "a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.math.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rb.rp.rt.rtc.ruby.s.samp.script.section.select.slot.small.source.span.strong.style.sub.summary.sup.svg.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr".split(".");
|
|
4628
|
+
function se(e) {
|
|
4629
|
+
return oe.includes(e);
|
|
4630
4630
|
}
|
|
4631
|
-
function
|
|
4631
|
+
function ce(e) {
|
|
4632
4632
|
return ["transition-group", "TransitionGroup"].includes(e);
|
|
4633
4633
|
}
|
|
4634
|
-
function
|
|
4634
|
+
function le(e) {
|
|
4635
4635
|
return [
|
|
4636
4636
|
"id",
|
|
4637
4637
|
"class",
|
|
@@ -4639,67 +4639,67 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
4639
4639
|
"style"
|
|
4640
4640
|
].includes(e) || e.startsWith("data-") || e.startsWith("aria-") || e.startsWith("on");
|
|
4641
4641
|
}
|
|
4642
|
-
function
|
|
4642
|
+
function ue(e) {
|
|
4643
4643
|
return e.reduce(function(e, t) {
|
|
4644
4644
|
var n = m(t, 2), r = n[0];
|
|
4645
4645
|
return e[r] = n[1], e;
|
|
4646
4646
|
}, {});
|
|
4647
4647
|
}
|
|
4648
|
-
function
|
|
4648
|
+
function de(e) {
|
|
4649
4649
|
var t = e.$attrs, n = e.componentData, r = n === void 0 ? {} : n;
|
|
4650
|
-
return c(c({},
|
|
4650
|
+
return c(c({}, ue(Object.entries(t).filter(function(e) {
|
|
4651
4651
|
var t = m(e, 2), n = t[0];
|
|
4652
|
-
return t[1],
|
|
4652
|
+
return t[1], le(n);
|
|
4653
4653
|
}))), r);
|
|
4654
4654
|
}
|
|
4655
|
-
function
|
|
4656
|
-
var t = e.$attrs, n = e.callBackBuilder, r =
|
|
4655
|
+
function fe(e) {
|
|
4656
|
+
var t = e.$attrs, n = e.callBackBuilder, r = ue(pe(t));
|
|
4657
4657
|
Object.entries(n).forEach(function(e) {
|
|
4658
4658
|
var t = m(e, 2), n = t[0], i = t[1];
|
|
4659
|
-
|
|
4659
|
+
ie[n].forEach(function(e) {
|
|
4660
4660
|
r[`on${e}`] = i(e);
|
|
4661
4661
|
});
|
|
4662
4662
|
});
|
|
4663
4663
|
var i = `[data-draggable]${r.draggable || ""}`;
|
|
4664
4664
|
return c(c({}, r), {}, { draggable: i });
|
|
4665
4665
|
}
|
|
4666
|
-
function
|
|
4666
|
+
function pe(e) {
|
|
4667
4667
|
return Object.entries(e).filter(function(e) {
|
|
4668
4668
|
var t = m(e, 2), n = t[0];
|
|
4669
|
-
return t[1], !
|
|
4669
|
+
return t[1], !le(n);
|
|
4670
4670
|
}).map(function(e) {
|
|
4671
4671
|
var t = m(e, 2), n = t[0], r = t[1];
|
|
4672
4672
|
return [T(n), r];
|
|
4673
4673
|
}).filter(function(e) {
|
|
4674
4674
|
var t = m(e, 2), n = t[0];
|
|
4675
|
-
return t[1], !
|
|
4675
|
+
return t[1], !ae(n);
|
|
4676
4676
|
});
|
|
4677
4677
|
}
|
|
4678
4678
|
n("c740");
|
|
4679
|
-
function
|
|
4679
|
+
function D(e, t) {
|
|
4680
4680
|
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
4681
4681
|
}
|
|
4682
|
-
function
|
|
4682
|
+
function O(e, t) {
|
|
4683
4683
|
for (var n = 0; n < t.length; n++) {
|
|
4684
4684
|
var r = t[n];
|
|
4685
4685
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
|
|
4686
4686
|
}
|
|
4687
4687
|
}
|
|
4688
|
-
function
|
|
4689
|
-
return t &&
|
|
4688
|
+
function me(e, t, n) {
|
|
4689
|
+
return t && O(e.prototype, t), n && O(e, n), e;
|
|
4690
4690
|
}
|
|
4691
|
-
var
|
|
4691
|
+
var he = function(e) {
|
|
4692
4692
|
return e.el;
|
|
4693
|
-
},
|
|
4693
|
+
}, k = function(e, t) {
|
|
4694
4694
|
return e.__draggable_context = t;
|
|
4695
|
-
},
|
|
4695
|
+
}, A = function(e) {
|
|
4696
4696
|
return e.__draggable_context;
|
|
4697
|
-
},
|
|
4697
|
+
}, ge = /* @__PURE__ */ function() {
|
|
4698
4698
|
function e(t) {
|
|
4699
4699
|
var n = t.nodes, r = n.header, i = n.default, a = n.footer, o = t.root, s = t.realList;
|
|
4700
|
-
|
|
4700
|
+
D(this, e), this.defaultNodes = i, this.children = [].concat(v(r), v(i), v(a)), this.externalComponent = o.externalComponent, this.rootTransition = o.transition, this.tag = o.tag, this.realList = s;
|
|
4701
4701
|
}
|
|
4702
|
-
return
|
|
4702
|
+
return me(e, [
|
|
4703
4703
|
{
|
|
4704
4704
|
key: "render",
|
|
4705
4705
|
value: function(e, t) {
|
|
@@ -4714,7 +4714,7 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
4714
4714
|
value: function() {
|
|
4715
4715
|
var e = this.defaultNodes, t = this.realList;
|
|
4716
4716
|
e.forEach(function(e, n) {
|
|
4717
|
-
|
|
4717
|
+
k(he(e), {
|
|
4718
4718
|
element: t[n],
|
|
4719
4719
|
index: n
|
|
4720
4720
|
});
|
|
@@ -4724,7 +4724,7 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
4724
4724
|
{
|
|
4725
4725
|
key: "getUnderlyingVm",
|
|
4726
4726
|
value: function(e) {
|
|
4727
|
-
return
|
|
4727
|
+
return A(e);
|
|
4728
4728
|
}
|
|
4729
4729
|
},
|
|
4730
4730
|
{
|
|
@@ -4732,10 +4732,10 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
4732
4732
|
value: function(e, t) {
|
|
4733
4733
|
var n = this.defaultNodes, r = n.length, i = t.children, a = i.item(e);
|
|
4734
4734
|
if (a === null) return r;
|
|
4735
|
-
var o =
|
|
4735
|
+
var o = A(a);
|
|
4736
4736
|
if (o) return o.index;
|
|
4737
4737
|
if (r === 0) return 0;
|
|
4738
|
-
var s =
|
|
4738
|
+
var s = he(n[0]);
|
|
4739
4739
|
return e < v(i).findIndex(function(e) {
|
|
4740
4740
|
return e === s;
|
|
4741
4741
|
}) ? 0 : r;
|
|
@@ -4748,14 +4748,14 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
4748
4748
|
}
|
|
4749
4749
|
}
|
|
4750
4750
|
]), e;
|
|
4751
|
-
}(),
|
|
4752
|
-
function
|
|
4751
|
+
}(), j = n("8bbf");
|
|
4752
|
+
function _e(e, t) {
|
|
4753
4753
|
var n = e[t];
|
|
4754
4754
|
return n ? n() : [];
|
|
4755
4755
|
}
|
|
4756
|
-
function
|
|
4756
|
+
function M(e) {
|
|
4757
4757
|
var t = e.$slots, n = e.realList, r = e.getKey, i = n || [], a = m(["header", "footer"].map(function(e) {
|
|
4758
|
-
return
|
|
4758
|
+
return _e(t, e);
|
|
4759
4759
|
}), 2), o = a[0], s = a[1], l = t.item;
|
|
4760
4760
|
if (!l) throw Error("draggable element must have an item slot");
|
|
4761
4761
|
var u = i.flatMap(function(e, t) {
|
|
@@ -4773,45 +4773,45 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
4773
4773
|
default: u
|
|
4774
4774
|
};
|
|
4775
4775
|
}
|
|
4776
|
-
function
|
|
4777
|
-
var t =
|
|
4776
|
+
function ve(e) {
|
|
4777
|
+
var t = ce(e), n = !se(e) && !t;
|
|
4778
4778
|
return {
|
|
4779
4779
|
transition: t,
|
|
4780
4780
|
externalComponent: n,
|
|
4781
|
-
tag: n ? (0,
|
|
4781
|
+
tag: n ? (0, j.resolveComponent)(e) : t ? j.TransitionGroup : e
|
|
4782
4782
|
};
|
|
4783
4783
|
}
|
|
4784
|
-
function
|
|
4784
|
+
function ye(e) {
|
|
4785
4785
|
var t = e.$slots, n = e.tag, r = e.realList, i = e.getKey;
|
|
4786
|
-
return new
|
|
4787
|
-
nodes:
|
|
4786
|
+
return new ge({
|
|
4787
|
+
nodes: M({
|
|
4788
4788
|
$slots: t,
|
|
4789
4789
|
realList: r,
|
|
4790
4790
|
getKey: i
|
|
4791
4791
|
}),
|
|
4792
|
-
root:
|
|
4792
|
+
root: ve(n),
|
|
4793
4793
|
realList: r
|
|
4794
4794
|
});
|
|
4795
4795
|
}
|
|
4796
|
-
function
|
|
4796
|
+
function be(e, t) {
|
|
4797
4797
|
var n = this;
|
|
4798
|
-
(0,
|
|
4798
|
+
(0, j.nextTick)(function() {
|
|
4799
4799
|
return n.$emit(e.toLowerCase(), t);
|
|
4800
4800
|
});
|
|
4801
4801
|
}
|
|
4802
|
-
function
|
|
4802
|
+
function xe(e) {
|
|
4803
4803
|
var t = this;
|
|
4804
4804
|
return function(n, r) {
|
|
4805
4805
|
if (t.realList !== null) return t[`onDrag${e}`](n, r);
|
|
4806
4806
|
};
|
|
4807
4807
|
}
|
|
4808
|
-
function
|
|
4809
|
-
var t = this, n =
|
|
4808
|
+
function N(e) {
|
|
4809
|
+
var t = this, n = xe.call(this, e);
|
|
4810
4810
|
return function(r, i) {
|
|
4811
|
-
n.call(t, r, i),
|
|
4811
|
+
n.call(t, r, i), be.call(t, e, r);
|
|
4812
4812
|
};
|
|
4813
4813
|
}
|
|
4814
|
-
var
|
|
4814
|
+
var Se = null, Ce = {
|
|
4815
4815
|
list: {
|
|
4816
4816
|
type: Array,
|
|
4817
4817
|
required: !1,
|
|
@@ -4845,34 +4845,34 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
4845
4845
|
required: !1,
|
|
4846
4846
|
default: null
|
|
4847
4847
|
}
|
|
4848
|
-
},
|
|
4848
|
+
}, we = ["update:modelValue", "change"].concat(v([].concat(v(ie.manageAndEmit), v(ie.emit)).map(function(e) {
|
|
4849
4849
|
return e.toLowerCase();
|
|
4850
4850
|
})));
|
|
4851
|
-
t.default = (0,
|
|
4851
|
+
t.default = (0, j.defineComponent)({
|
|
4852
4852
|
name: "draggable",
|
|
4853
4853
|
inheritAttrs: !1,
|
|
4854
|
-
props:
|
|
4855
|
-
emits:
|
|
4854
|
+
props: Ce,
|
|
4855
|
+
emits: we,
|
|
4856
4856
|
data: function() {
|
|
4857
4857
|
return { error: !1 };
|
|
4858
4858
|
},
|
|
4859
4859
|
render: function() {
|
|
4860
4860
|
try {
|
|
4861
4861
|
this.error = !1;
|
|
4862
|
-
var e = this.$slots, t = this.$attrs, n = this.tag, r = this.componentData, i = this.realList, a = this.getKey, o =
|
|
4862
|
+
var e = this.$slots, t = this.$attrs, n = this.tag, r = this.componentData, i = this.realList, a = this.getKey, o = ye({
|
|
4863
4863
|
$slots: e,
|
|
4864
4864
|
tag: n,
|
|
4865
4865
|
realList: i,
|
|
4866
4866
|
getKey: a
|
|
4867
4867
|
});
|
|
4868
4868
|
this.componentStructure = o;
|
|
4869
|
-
var s =
|
|
4869
|
+
var s = de({
|
|
4870
4870
|
$attrs: t,
|
|
4871
4871
|
componentData: r
|
|
4872
4872
|
});
|
|
4873
|
-
return o.render(
|
|
4873
|
+
return o.render(j.h, s);
|
|
4874
4874
|
} catch (e) {
|
|
4875
|
-
return this.error = !0, (0,
|
|
4875
|
+
return this.error = !0, (0, j.h)("pre", { style: { color: "red" } }, e.stack);
|
|
4876
4876
|
}
|
|
4877
4877
|
},
|
|
4878
4878
|
created: function() {
|
|
@@ -4883,17 +4883,17 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
4883
4883
|
if (!this.error) {
|
|
4884
4884
|
var t = this.$attrs, n = this.$el;
|
|
4885
4885
|
this.componentStructure.updated();
|
|
4886
|
-
var r =
|
|
4886
|
+
var r = fe({
|
|
4887
4887
|
$attrs: t,
|
|
4888
4888
|
callBackBuilder: {
|
|
4889
4889
|
manageAndEmit: function(t) {
|
|
4890
|
-
return
|
|
4890
|
+
return N.call(e, t);
|
|
4891
4891
|
},
|
|
4892
4892
|
emit: function(t) {
|
|
4893
|
-
return
|
|
4893
|
+
return be.bind(e, t);
|
|
4894
4894
|
},
|
|
4895
4895
|
manage: function(t) {
|
|
4896
|
-
return
|
|
4896
|
+
return xe.call(e, t);
|
|
4897
4897
|
}
|
|
4898
4898
|
}
|
|
4899
4899
|
}), i = n.nodeType === 1 ? n : n.parentElement;
|
|
@@ -4920,7 +4920,7 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
4920
4920
|
watch: { $attrs: {
|
|
4921
4921
|
handler: function(e) {
|
|
4922
4922
|
var t = this._sortable;
|
|
4923
|
-
t &&
|
|
4923
|
+
t && pe(e).forEach(function(e) {
|
|
4924
4924
|
var n = m(e, 2), r = n[0], i = n[1];
|
|
4925
4925
|
t.option(r, i);
|
|
4926
4926
|
});
|
|
@@ -4936,7 +4936,7 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
4936
4936
|
},
|
|
4937
4937
|
emitChanges: function(e) {
|
|
4938
4938
|
var t = this;
|
|
4939
|
-
(0,
|
|
4939
|
+
(0, j.nextTick)(function() {
|
|
4940
4940
|
return t.$emit("change", e);
|
|
4941
4941
|
});
|
|
4942
4942
|
},
|
|
@@ -4972,7 +4972,7 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
4972
4972
|
return this.componentStructure.getVmIndexFromDomIndex(e, this.targetDomElement);
|
|
4973
4973
|
},
|
|
4974
4974
|
onDragStart: function(e) {
|
|
4975
|
-
this.context = this.getUnderlyingVm(e.item), e.item._underlying_vm_ = this.clone(this.context.element),
|
|
4975
|
+
this.context = this.getUnderlyingVm(e.item), e.item._underlying_vm_ = this.clone(this.context.element), Se = e.item;
|
|
4976
4976
|
},
|
|
4977
4977
|
onDragAdd: function(e) {
|
|
4978
4978
|
var t = e.item._underlying_vm_;
|
|
@@ -5016,7 +5016,7 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
5016
5016
|
var n = v(t.to.children).filter(function(e) {
|
|
5017
5017
|
return e.style.display !== "none";
|
|
5018
5018
|
}), r = n.indexOf(t.related), i = e.component.getVmIndexFromDomIndex(r);
|
|
5019
|
-
return n.indexOf(
|
|
5019
|
+
return n.indexOf(Se) !== -1 || !t.willInsertAfter ? i : i + 1;
|
|
5020
5020
|
},
|
|
5021
5021
|
onDragMove: function(e, t) {
|
|
5022
5022
|
var n = this.move, r = this.realList;
|
|
@@ -5028,7 +5028,7 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
5028
5028
|
}), t);
|
|
5029
5029
|
},
|
|
5030
5030
|
onDragEnd: function() {
|
|
5031
|
-
|
|
5031
|
+
Se = null;
|
|
5032
5032
|
}
|
|
5033
5033
|
}
|
|
5034
5034
|
});
|
|
@@ -5096,10 +5096,11 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
5096
5096
|
})
|
|
5097
5097
|
}).default;
|
|
5098
5098
|
});
|
|
5099
|
-
})),
|
|
5099
|
+
})), ka = /* @__PURE__ */ r(Oa(), 1), Aa = { class: "tpl:w-full" }, ja = { class: "tpl:flex tpl:gap-0" }, Ma = {
|
|
5100
5100
|
key: 0,
|
|
5101
|
+
"data-testid": "section-drop-hint",
|
|
5101
5102
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
5102
|
-
},
|
|
5103
|
+
}, Na = /* @__PURE__ */ M({
|
|
5103
5104
|
__name: "SectionBlock",
|
|
5104
5105
|
props: {
|
|
5105
5106
|
block: {},
|
|
@@ -5107,13 +5108,13 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
5107
5108
|
},
|
|
5108
5109
|
setup(e) {
|
|
5109
5110
|
let t = {
|
|
5110
|
-
title:
|
|
5111
|
-
paragraph:
|
|
5112
|
-
image:
|
|
5113
|
-
button:
|
|
5114
|
-
divider:
|
|
5115
|
-
custom:
|
|
5116
|
-
}, n = e, { t: r } =
|
|
5111
|
+
title: Xn,
|
|
5112
|
+
paragraph: Nn,
|
|
5113
|
+
image: En,
|
|
5114
|
+
button: St,
|
|
5115
|
+
divider: un,
|
|
5116
|
+
custom: cn
|
|
5117
|
+
}, n = e, { t: r } = oe(), i = h(y, "SectionBlock"), a = ye(C, null), o = ye(T, null), s = O(() => {
|
|
5117
5118
|
switch (n.block.columns) {
|
|
5118
5119
|
case "2": return ["50%", "50%"];
|
|
5119
5120
|
case "3": return [
|
|
@@ -5125,34 +5126,34 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
5125
5126
|
case "2-1": return ["66.67%", "33.33%"];
|
|
5126
5127
|
default: return ["100%"];
|
|
5127
5128
|
}
|
|
5128
|
-
}), c =
|
|
5129
|
+
}), c = O(() => {
|
|
5129
5130
|
let e = s.value.length, t = [...n.block.children];
|
|
5130
5131
|
for (; t.length < e;) t.push([]);
|
|
5131
5132
|
return t.slice(0, e);
|
|
5132
5133
|
});
|
|
5133
|
-
function
|
|
5134
|
+
function l(e) {
|
|
5134
5135
|
return c.value[e] || [];
|
|
5135
5136
|
}
|
|
5136
|
-
function
|
|
5137
|
+
function u(e, t) {
|
|
5137
5138
|
let r = [...n.block.children];
|
|
5138
5139
|
for (; r.length <= e;) r.push([]);
|
|
5139
5140
|
r[e] = t, i.updateBlock(n.block.id, { children: r });
|
|
5140
5141
|
}
|
|
5141
|
-
function
|
|
5142
|
-
return
|
|
5142
|
+
function d(e) {
|
|
5143
|
+
return Pn(e, o, t);
|
|
5143
5144
|
}
|
|
5144
|
-
function
|
|
5145
|
+
function f(e, t) {
|
|
5145
5146
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
5146
5147
|
fieldValues: t.fieldValues,
|
|
5147
5148
|
dataSourceFetched: t.dataSourceFetched
|
|
5148
5149
|
});
|
|
5149
5150
|
}
|
|
5150
|
-
return (t, n) => (
|
|
5151
|
+
return (t, n) => (P(), k("div", Aa, [A("div", ja, [(P(!0), k(D, null, Te(c.value, (t, n) => (P(), k("div", {
|
|
5151
5152
|
key: n,
|
|
5152
|
-
class:
|
|
5153
|
-
style:
|
|
5154
|
-
}, [
|
|
5155
|
-
"model-value":
|
|
5153
|
+
class: xe(["tpl:relative tpl:min-h-[60px] tpl:rounded", l(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
5154
|
+
style: N({ width: s.value[n] })
|
|
5155
|
+
}, [j(R(ka.default), {
|
|
5156
|
+
"model-value": l(n),
|
|
5156
5157
|
group: {
|
|
5157
5158
|
name: "blocks",
|
|
5158
5159
|
pull: !0,
|
|
@@ -5163,18 +5164,18 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
5163
5164
|
"ghost-class": "tpl-ghost",
|
|
5164
5165
|
"empty-insert-threshold": 20,
|
|
5165
5166
|
class: "tpl:min-h-[60px]",
|
|
5166
|
-
"onUpdate:modelValue": (e) =>
|
|
5167
|
+
"onUpdate:modelValue": (e) => u(n, e)
|
|
5167
5168
|
}, {
|
|
5168
|
-
item:
|
|
5169
|
+
item: Me(({ element: t }) => [Ne(A("div", null, [j(Jn, {
|
|
5169
5170
|
block: t,
|
|
5170
|
-
"is-selected":
|
|
5171
|
+
"is-selected": R(i).state.selectedBlockId === t.id,
|
|
5171
5172
|
viewport: e.viewport,
|
|
5172
|
-
onSelect: (e) =>
|
|
5173
|
+
onSelect: (e) => R(i).selectBlock(t.id)
|
|
5173
5174
|
}, {
|
|
5174
|
-
default:
|
|
5175
|
+
default: Me(() => [(P(), me(De(d(t)), {
|
|
5175
5176
|
block: t,
|
|
5176
5177
|
viewport: e.viewport,
|
|
5177
|
-
onFetchData: (e) =>
|
|
5178
|
+
onFetchData: (e) => f(t, e)
|
|
5178
5179
|
}, null, 40, [
|
|
5179
5180
|
"block",
|
|
5180
5181
|
"viewport",
|
|
@@ -5186,15 +5187,15 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
5186
5187
|
"is-selected",
|
|
5187
5188
|
"viewport",
|
|
5188
5189
|
"onSelect"
|
|
5189
|
-
])], 512), [[
|
|
5190
|
+
])], 512), [[Ae, !R(a)?.isHidden(t.id)]])]),
|
|
5190
5191
|
_: 1
|
|
5191
5192
|
}, 8, [
|
|
5192
5193
|
"model-value",
|
|
5193
5194
|
"group",
|
|
5194
5195
|
"onUpdate:modelValue"
|
|
5195
|
-
]),
|
|
5196
|
+
]), l(n).length === 0 ? (P(), k("div", Ma, [A("span", null, L(R(r).section.dropHere), 1)])) : he("", !0)], 6))), 128))])]));
|
|
5196
5197
|
}
|
|
5197
|
-
}),
|
|
5198
|
+
}), Pa = {
|
|
5198
5199
|
facebook: {
|
|
5199
5200
|
name: "Facebook",
|
|
5200
5201
|
color: "#1877F2",
|
|
@@ -5275,11 +5276,11 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
5275
5276
|
color: "#1769FF",
|
|
5276
5277
|
path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
|
|
5277
5278
|
}
|
|
5278
|
-
},
|
|
5279
|
+
}, Fa = {
|
|
5279
5280
|
small: 24,
|
|
5280
5281
|
medium: 32,
|
|
5281
5282
|
large: 48
|
|
5282
|
-
},
|
|
5283
|
+
}, Ia = [
|
|
5283
5284
|
"facebook",
|
|
5284
5285
|
"twitter",
|
|
5285
5286
|
"instagram",
|
|
@@ -5296,11 +5297,11 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
5296
5297
|
"github",
|
|
5297
5298
|
"dribbble",
|
|
5298
5299
|
"behance"
|
|
5299
|
-
],
|
|
5300
|
+
], La = [
|
|
5300
5301
|
"width",
|
|
5301
5302
|
"height",
|
|
5302
5303
|
"fill"
|
|
5303
|
-
],
|
|
5304
|
+
], Ra = ["d"], za = /* @__PURE__ */ M({
|
|
5304
5305
|
__name: "SocialIconSvg",
|
|
5305
5306
|
props: {
|
|
5306
5307
|
platform: {},
|
|
@@ -5308,7 +5309,7 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
5308
5309
|
iconSize: {}
|
|
5309
5310
|
},
|
|
5310
5311
|
setup(e) {
|
|
5311
|
-
let t = e, n =
|
|
5312
|
+
let t = e, n = O(() => Pa[t.platform]), r = O(() => Fa[t.iconSize]), i = O(() => {
|
|
5312
5313
|
let e = {
|
|
5313
5314
|
display: "inline-flex",
|
|
5314
5315
|
alignItems: "center",
|
|
@@ -5345,40 +5346,40 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
5345
5346
|
};
|
|
5346
5347
|
default: return e;
|
|
5347
5348
|
}
|
|
5348
|
-
}), a =
|
|
5349
|
-
return (e, t) => (
|
|
5349
|
+
}), a = O(() => Math.floor(r.value * .6)), o = O(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
|
|
5350
|
+
return (e, t) => (P(), k("span", { style: N(i.value) }, [(P(), k("svg", {
|
|
5350
5351
|
width: a.value,
|
|
5351
5352
|
height: a.value,
|
|
5352
5353
|
viewBox: "0 0 24 24",
|
|
5353
5354
|
fill: o.value,
|
|
5354
5355
|
xmlns: "http://www.w3.org/2000/svg"
|
|
5355
|
-
}, [
|
|
5356
|
+
}, [A("path", { d: n.value.path }, null, 8, Ra)], 8, La))], 4));
|
|
5356
5357
|
}
|
|
5357
|
-
}),
|
|
5358
|
+
}), Ba = { class: "tpl:w-full" }, Va = ["href"], Ha = {
|
|
5358
5359
|
key: 1,
|
|
5359
5360
|
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)]"
|
|
5360
|
-
},
|
|
5361
|
+
}, Ua = /* @__PURE__ */ M({
|
|
5361
5362
|
__name: "SocialIconsBlock",
|
|
5362
5363
|
props: {
|
|
5363
5364
|
block: {},
|
|
5364
5365
|
viewport: {}
|
|
5365
5366
|
},
|
|
5366
5367
|
setup(e) {
|
|
5367
|
-
let t = e, { t: n } =
|
|
5368
|
+
let t = e, { t: n } = oe(), r = O(() => ({
|
|
5368
5369
|
display: "flex",
|
|
5369
5370
|
flexWrap: "wrap",
|
|
5370
5371
|
gap: `${t.block.spacing}px`,
|
|
5371
5372
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
5372
|
-
})), i =
|
|
5373
|
-
return (t, a) => (
|
|
5373
|
+
})), i = O(() => t.block.icons.length > 0);
|
|
5374
|
+
return (t, a) => (P(), k("div", Ba, [i.value ? (P(), k("div", {
|
|
5374
5375
|
key: 0,
|
|
5375
|
-
style:
|
|
5376
|
-
}, [(
|
|
5376
|
+
style: N(r.value)
|
|
5377
|
+
}, [(P(!0), k(D, null, Te(e.block.icons, (t) => (P(), k("a", {
|
|
5377
5378
|
key: t.id,
|
|
5378
5379
|
href: t.url || "#",
|
|
5379
5380
|
class: "tpl:cursor-default",
|
|
5380
|
-
onClick: a[0] ||=
|
|
5381
|
-
}, [
|
|
5381
|
+
onClick: a[0] ||= Fe(() => {}, ["prevent"])
|
|
5382
|
+
}, [j(za, {
|
|
5382
5383
|
platform: t.platform,
|
|
5383
5384
|
"icon-style": e.block.iconStyle,
|
|
5384
5385
|
"icon-size": e.block.iconSize
|
|
@@ -5386,72 +5387,72 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
5386
5387
|
"platform",
|
|
5387
5388
|
"icon-style",
|
|
5388
5389
|
"icon-size"
|
|
5389
|
-
])], 8,
|
|
5390
|
+
])], 8, Va))), 128))], 4)) : (P(), k("div", Ha, [j(R(Lt), { size: 16 }), A("span", null, L(R(n).social.addIcons), 1)]))]));
|
|
5390
5391
|
}
|
|
5391
|
-
}),
|
|
5392
|
+
}), Wa = { class: "tpl:w-full" }, Ga = {
|
|
5392
5393
|
key: 0,
|
|
5393
5394
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
5394
5395
|
style: {
|
|
5395
5396
|
"background-color": "var(--tpl-bg-hover)",
|
|
5396
5397
|
color: "var(--tpl-text-dim)"
|
|
5397
5398
|
}
|
|
5398
|
-
},
|
|
5399
|
+
}, Ka = /* @__PURE__ */ M({
|
|
5399
5400
|
__name: "SpacerBlock",
|
|
5400
5401
|
props: {
|
|
5401
5402
|
block: {},
|
|
5402
5403
|
viewport: {}
|
|
5403
5404
|
},
|
|
5404
5405
|
setup(e) {
|
|
5405
|
-
let t = e, n =
|
|
5406
|
+
let t = e, n = h(y, "SpacerBlock"), r = O(() => ({
|
|
5406
5407
|
height: `${t.block.height}px`,
|
|
5407
5408
|
minHeight: `${t.block.height}px`,
|
|
5408
5409
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
5409
5410
|
}));
|
|
5410
|
-
return (t, i) => (
|
|
5411
|
-
style:
|
|
5412
|
-
class:
|
|
5413
|
-
}, [
|
|
5411
|
+
return (t, i) => (P(), k("div", Wa, [A("div", {
|
|
5412
|
+
style: N(r.value),
|
|
5413
|
+
class: xe(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !R(n).state.previewMode }])
|
|
5414
|
+
}, [R(n).state.previewMode ? he("", !0) : (P(), k("span", Ga, L(e.block.height) + "px ", 1))], 6)]));
|
|
5414
5415
|
}
|
|
5415
|
-
}),
|
|
5416
|
+
}), qa = { class: "tpl:w-full" }, Ja = { key: 0 }, Ya = [
|
|
5416
5417
|
"aria-label",
|
|
5417
5418
|
"data-placeholder",
|
|
5418
5419
|
"onBlur",
|
|
5419
5420
|
"textContent"
|
|
5420
|
-
],
|
|
5421
|
+
], Xa = [
|
|
5421
5422
|
"aria-label",
|
|
5422
5423
|
"data-placeholder",
|
|
5423
5424
|
"onBlur",
|
|
5424
5425
|
"textContent"
|
|
5425
|
-
],
|
|
5426
|
+
], Za = {
|
|
5426
5427
|
key: 1,
|
|
5427
5428
|
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)]"
|
|
5428
|
-
},
|
|
5429
|
+
}, Qa = /* @__PURE__ */ ce(/* @__PURE__ */ M({
|
|
5429
5430
|
__name: "TableBlock",
|
|
5430
5431
|
props: {
|
|
5431
5432
|
block: {},
|
|
5432
5433
|
viewport: {}
|
|
5433
5434
|
},
|
|
5434
5435
|
setup(e) {
|
|
5435
|
-
let t = e, { t: n } =
|
|
5436
|
+
let t = e, { t: n } = oe(), r = h(y, "TableBlock"), i = O(() => t.block.rows.length > 0), a = O(() => ({
|
|
5436
5437
|
width: "100%",
|
|
5437
5438
|
borderCollapse: "collapse",
|
|
5438
5439
|
fontSize: `${t.block.fontSize}px`,
|
|
5439
5440
|
color: t.block.color,
|
|
5440
5441
|
textAlign: t.block.textAlign,
|
|
5441
5442
|
fontFamily: t.block.fontFamily || "inherit"
|
|
5442
|
-
})), o =
|
|
5443
|
+
})), o = O(() => ({
|
|
5443
5444
|
border: `${t.block.borderWidth}px solid ${t.block.borderColor}`,
|
|
5444
5445
|
padding: `${t.block.cellPadding}px`,
|
|
5445
5446
|
textAlign: t.block.textAlign
|
|
5446
|
-
})), s =
|
|
5447
|
+
})), s = O(() => ({
|
|
5447
5448
|
...o.value,
|
|
5448
5449
|
fontWeight: "bold",
|
|
5449
5450
|
backgroundColor: t.block.headerBackgroundColor || "transparent"
|
|
5450
|
-
})), c =
|
|
5451
|
-
function
|
|
5451
|
+
})), c = O(() => t.block.hasHeaderRow && t.block.rows.length > 0 ? t.block.rows[0] : null), l = O(() => t.block.hasHeaderRow ? t.block.rows.slice(1) : t.block.rows);
|
|
5452
|
+
function u() {
|
|
5452
5453
|
r.selectBlock(t.block.id);
|
|
5453
5454
|
}
|
|
5454
|
-
function
|
|
5455
|
+
function d(e, n, i) {
|
|
5455
5456
|
let a = i.target.innerText.trim(), o = t.block.rows.map((t) => t.id === e ? {
|
|
5456
5457
|
...t,
|
|
5457
5458
|
cells: t.cells.map((e) => e.id === n ? {
|
|
@@ -5461,51 +5462,51 @@ var si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Y, Ci, X, Z,
|
|
|
5461
5462
|
} : t);
|
|
5462
5463
|
r.updateBlock(t.block.id, { rows: o });
|
|
5463
5464
|
}
|
|
5464
|
-
return (e, t) => (
|
|
5465
|
+
return (e, t) => (P(), k("div", qa, [i.value ? (P(), k("table", {
|
|
5465
5466
|
key: 0,
|
|
5466
|
-
style:
|
|
5467
|
+
style: N(a.value),
|
|
5467
5468
|
class: "tpl-table-editable"
|
|
5468
|
-
}, [c.value ? (
|
|
5469
|
+
}, [c.value ? (P(), k("thead", Ja, [A("tr", null, [(P(!0), k(D, null, Te(c.value.cells, (e) => (P(), k("th", {
|
|
5469
5470
|
key: e.id,
|
|
5470
|
-
style:
|
|
5471
|
-
"aria-label":
|
|
5471
|
+
style: N(s.value),
|
|
5472
|
+
"aria-label": R(n).table.cellPlaceholder,
|
|
5472
5473
|
contenteditable: "true",
|
|
5473
|
-
"data-placeholder":
|
|
5474
|
-
onBlur: (t) =>
|
|
5475
|
-
onKeydown: t[0] ||=
|
|
5476
|
-
onClick:
|
|
5477
|
-
textContent:
|
|
5478
|
-
}, null, 44,
|
|
5474
|
+
"data-placeholder": R(n).table.cellPlaceholder,
|
|
5475
|
+
onBlur: (t) => d(c.value.id, e.id, t),
|
|
5476
|
+
onKeydown: t[0] ||= Pe(Fe((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
5477
|
+
onClick: Fe(u, ["stop"]),
|
|
5478
|
+
textContent: L(e.content)
|
|
5479
|
+
}, null, 44, Ya))), 128))])])) : he("", !0), A("tbody", null, [(P(!0), k(D, null, Te(l.value, (e) => (P(), k("tr", { key: e.id }, [(P(!0), k(D, null, Te(e.cells, (r) => (P(), k("td", {
|
|
5479
5480
|
key: r.id,
|
|
5480
|
-
style:
|
|
5481
|
-
"aria-label":
|
|
5481
|
+
style: N(o.value),
|
|
5482
|
+
"aria-label": R(n).table.cellPlaceholder,
|
|
5482
5483
|
contenteditable: "true",
|
|
5483
|
-
"data-placeholder":
|
|
5484
|
-
onBlur: (t) =>
|
|
5485
|
-
onKeydown: t[1] ||=
|
|
5486
|
-
onClick:
|
|
5487
|
-
textContent:
|
|
5488
|
-
}, null, 44,
|
|
5484
|
+
"data-placeholder": R(n).table.cellPlaceholder,
|
|
5485
|
+
onBlur: (t) => d(e.id, r.id, t),
|
|
5486
|
+
onKeydown: t[1] ||= Pe(Fe((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
5487
|
+
onClick: Fe(u, ["stop"]),
|
|
5488
|
+
textContent: L(r.content)
|
|
5489
|
+
}, null, 44, Xa))), 128))]))), 128))])], 4)) : (P(), k("div", Za, [j(R(Rt), { size: 16 }), A("span", null, L(R(n).table.empty), 1)]))]));
|
|
5489
5490
|
}
|
|
5490
|
-
}), [["__scopeId", "data-v-dfc60174"]]),
|
|
5491
|
+
}), [["__scopeId", "data-v-dfc60174"]]), $a = /* @__PURE__ */ M({
|
|
5491
5492
|
__name: "VideoPlayButton",
|
|
5492
5493
|
props: { hoverEffect: {
|
|
5493
5494
|
type: Boolean,
|
|
5494
5495
|
default: !1
|
|
5495
5496
|
} },
|
|
5496
5497
|
setup(e) {
|
|
5497
|
-
return (t, n) => (
|
|
5498
|
+
return (t, n) => (P(), k("div", { class: xe(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [A("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-white/90 tpl:shadow-lg" }, [A("svg", {
|
|
5498
5499
|
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
5499
5500
|
width: "28",
|
|
5500
5501
|
height: "28",
|
|
5501
5502
|
viewBox: "0 0 24 24",
|
|
5502
5503
|
fill: "currentColor"
|
|
5503
|
-
}, [
|
|
5504
|
+
}, [A("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
|
|
5504
5505
|
}
|
|
5505
5506
|
});
|
|
5506
5507
|
//#endregion
|
|
5507
5508
|
//#region src/utils/videoThumbnail.ts
|
|
5508
|
-
function
|
|
5509
|
+
function eo(e) {
|
|
5509
5510
|
if (!e) return {
|
|
5510
5511
|
platform: "unknown",
|
|
5511
5512
|
videoId: null,
|
|
@@ -5537,130 +5538,130 @@ function io(e) {
|
|
|
5537
5538
|
thumbnailUrl: null
|
|
5538
5539
|
};
|
|
5539
5540
|
}
|
|
5540
|
-
function
|
|
5541
|
-
return t ||
|
|
5541
|
+
function to(e, t) {
|
|
5542
|
+
return t || eo(e).thumbnailUrl;
|
|
5542
5543
|
}
|
|
5543
5544
|
//#endregion
|
|
5544
5545
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
5545
|
-
var
|
|
5546
|
+
var no = ["src", "alt"], ro = {
|
|
5546
5547
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
5547
5548
|
style: { opacity: "0.7" }
|
|
5548
|
-
},
|
|
5549
|
+
}, io = ["href"], ao = ["src", "alt"], oo = ["src", "alt"], so = {
|
|
5549
5550
|
key: 3,
|
|
5550
5551
|
class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
5551
|
-
},
|
|
5552
|
+
}, co = /* @__PURE__ */ M({
|
|
5552
5553
|
__name: "VideoBlock",
|
|
5553
5554
|
props: {
|
|
5554
5555
|
block: {},
|
|
5555
5556
|
viewport: {}
|
|
5556
5557
|
},
|
|
5557
5558
|
setup(e) {
|
|
5558
|
-
let t = e, { t: n } =
|
|
5559
|
+
let t = e, { t: n } = oe(), { syntax: r } = pe(), i = O(() => Ue(t.block.url, r) || Ue(t.block.thumbnailUrl, r)), a = O(() => i.value ? null : to(t.block.url, t.block.thumbnailUrl)), o = O(() => ({ textAlign: t.block.align })), s = O(() => ({
|
|
5559
5560
|
maxWidth: "100%",
|
|
5560
5561
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
5561
5562
|
display: "block",
|
|
5562
5563
|
margin: t.block.align === "center" ? "0 auto" : void 0,
|
|
5563
5564
|
marginLeft: t.block.align === "right" ? "auto" : void 0
|
|
5564
|
-
})), c =
|
|
5565
|
-
return (t, r) => (
|
|
5565
|
+
})), c = O(() => Ue(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
5566
|
+
return (t, r) => (P(), k("div", {
|
|
5566
5567
|
class: "tpl:w-full",
|
|
5567
|
-
style:
|
|
5568
|
-
}, [i.value && e.block.placeholderUrl ? (
|
|
5568
|
+
style: N(o.value)
|
|
5569
|
+
}, [i.value && e.block.placeholderUrl ? (P(), k("div", {
|
|
5569
5570
|
key: 0,
|
|
5570
5571
|
class: "tpl:relative tpl:inline-block",
|
|
5571
|
-
style:
|
|
5572
|
-
}, [
|
|
5572
|
+
style: N(s.value)
|
|
5573
|
+
}, [A("img", {
|
|
5573
5574
|
class: "tpl:w-full tpl:border-0",
|
|
5574
5575
|
src: e.block.placeholderUrl,
|
|
5575
5576
|
alt: e.block.alt
|
|
5576
|
-
}, null, 8,
|
|
5577
|
+
}, null, 8, no), j($a)], 4)) : i.value ? (P(), k("div", {
|
|
5577
5578
|
key: 1,
|
|
5578
5579
|
class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
5579
|
-
style:
|
|
5580
|
-
}, [
|
|
5580
|
+
style: N([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
5581
|
+
}, [j(R(zt), {
|
|
5581
5582
|
size: 36,
|
|
5582
5583
|
"stroke-width": 1.5,
|
|
5583
5584
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
5584
5585
|
style: { opacity: "0.5" }
|
|
5585
|
-
}),
|
|
5586
|
+
}), A("span", ro, L(c.value), 1)], 4)) : a.value ? (P(), k(D, { key: 2 }, [e.block.url ? (P(), k("a", {
|
|
5586
5587
|
key: 0,
|
|
5587
5588
|
href: e.block.url,
|
|
5588
5589
|
target: "_blank",
|
|
5589
5590
|
rel: "noopener noreferrer",
|
|
5590
5591
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
5591
|
-
style:
|
|
5592
|
-
onClick: r[0] ||=
|
|
5593
|
-
}, [
|
|
5592
|
+
style: N(s.value),
|
|
5593
|
+
onClick: r[0] ||= Fe(() => {}, ["prevent"])
|
|
5594
|
+
}, [A("img", {
|
|
5594
5595
|
class: "tpl:w-full tpl:border-0",
|
|
5595
5596
|
src: a.value,
|
|
5596
5597
|
alt: e.block.alt
|
|
5597
|
-
}, null, 8,
|
|
5598
|
+
}, null, 8, ao), j($a, { "hover-effect": "" })], 12, io)) : (P(), k("div", {
|
|
5598
5599
|
key: 1,
|
|
5599
5600
|
class: "tpl:relative tpl:inline-block",
|
|
5600
|
-
style:
|
|
5601
|
-
}, [
|
|
5601
|
+
style: N(s.value)
|
|
5602
|
+
}, [A("img", {
|
|
5602
5603
|
class: "tpl:w-full tpl:border-0",
|
|
5603
5604
|
src: a.value,
|
|
5604
5605
|
alt: e.block.alt
|
|
5605
|
-
}, null, 8,
|
|
5606
|
+
}, null, 8, oo), j($a)], 4))], 64)) : (P(), k("div", so, [j(R(zt), {
|
|
5606
5607
|
size: 40,
|
|
5607
5608
|
"stroke-width": 1.5,
|
|
5608
5609
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
5609
|
-
}),
|
|
5610
|
+
}), A("span", null, L(R(n).video.addVideo), 1)]))], 4));
|
|
5610
5611
|
}
|
|
5611
|
-
}),
|
|
5612
|
-
section:
|
|
5613
|
-
title:
|
|
5614
|
-
paragraph:
|
|
5615
|
-
image:
|
|
5616
|
-
button:
|
|
5617
|
-
divider:
|
|
5618
|
-
video:
|
|
5619
|
-
social:
|
|
5620
|
-
menu:
|
|
5621
|
-
table:
|
|
5622
|
-
spacer:
|
|
5623
|
-
html:
|
|
5624
|
-
countdown:
|
|
5612
|
+
}), lo = {
|
|
5613
|
+
section: Na,
|
|
5614
|
+
title: Xn,
|
|
5615
|
+
paragraph: Nn,
|
|
5616
|
+
image: En,
|
|
5617
|
+
button: St,
|
|
5618
|
+
divider: un,
|
|
5619
|
+
video: co,
|
|
5620
|
+
social: Ua,
|
|
5621
|
+
menu: An,
|
|
5622
|
+
table: Qa,
|
|
5623
|
+
spacer: Ka,
|
|
5624
|
+
html: hn,
|
|
5625
|
+
countdown: Et
|
|
5625
5626
|
};
|
|
5626
|
-
function
|
|
5627
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t:
|
|
5627
|
+
function uo(e) {
|
|
5628
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = oe(r);
|
|
5628
5629
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
5629
|
-
let { resolvedTheme:
|
|
5630
|
-
themeOverrides:
|
|
5631
|
-
resolvedTheme:
|
|
5630
|
+
let { resolvedTheme: s } = lt(O(() => t.state.uiTheme)), c = I(n.theme ?? {}), { themeStyles: l } = dt({
|
|
5631
|
+
themeOverrides: c,
|
|
5632
|
+
resolvedTheme: s,
|
|
5632
5633
|
extraStyles: e.themeExtraStyles
|
|
5633
|
-
}),
|
|
5634
|
+
}), u = Be({
|
|
5634
5635
|
content: t.content,
|
|
5635
5636
|
setContent: (e, n) => t.setContent(e, n),
|
|
5636
5637
|
...e.historyOptions
|
|
5637
5638
|
});
|
|
5638
|
-
|
|
5639
|
-
let
|
|
5639
|
+
Ve(t, u);
|
|
5640
|
+
let f = Le({
|
|
5640
5641
|
addBlock: t.addBlock,
|
|
5641
5642
|
removeBlock: t.removeBlock,
|
|
5642
5643
|
updateBlock: t.updateBlock,
|
|
5643
5644
|
selectBlock: t.selectBlock,
|
|
5644
5645
|
blockDefaults: n.blockDefaults
|
|
5645
|
-
}),
|
|
5646
|
+
}), h = Re(t), se = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Ie({
|
|
5646
5647
|
content: t.content,
|
|
5647
5648
|
isDirty: () => t.state.isDirty,
|
|
5648
5649
|
...e.autoSaveOptions
|
|
5649
|
-
}) : null,
|
|
5650
|
-
|
|
5651
|
-
e ?
|
|
5650
|
+
}) : null, ce = null;
|
|
5651
|
+
se && (ce = je(u.isNavigating, (e) => {
|
|
5652
|
+
e ? se.pause() : se.resume();
|
|
5652
5653
|
}));
|
|
5653
|
-
let
|
|
5654
|
-
t:
|
|
5655
|
-
format:
|
|
5656
|
-
}),
|
|
5657
|
-
if (
|
|
5658
|
-
function
|
|
5659
|
-
for (let t of e)
|
|
5654
|
+
let le = ct(t, {
|
|
5655
|
+
t: a,
|
|
5656
|
+
format: o
|
|
5657
|
+
}), ue = ht();
|
|
5658
|
+
if (_t(ue, lo), n.customBlocks?.length) for (let e of n.customBlocks) ue.registerCustom(e, cn);
|
|
5659
|
+
function de(e) {
|
|
5660
|
+
for (let t of e) ue.registerCustom(t, cn);
|
|
5660
5661
|
}
|
|
5661
|
-
function
|
|
5662
|
-
|
|
5663
|
-
history:
|
|
5662
|
+
function fe(r) {
|
|
5663
|
+
yt(r, {
|
|
5664
|
+
history: u,
|
|
5664
5665
|
selectBlock: (e) => t.selectBlock(e),
|
|
5665
5666
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
5666
5667
|
removeBlock: (e) => t.removeBlock(e),
|
|
@@ -5668,27 +5669,27 @@ function ho(e) {
|
|
|
5668
5669
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
5669
5670
|
});
|
|
5670
5671
|
}
|
|
5671
|
-
|
|
5672
|
-
let
|
|
5673
|
-
|
|
5674
|
-
function
|
|
5675
|
-
|
|
5672
|
+
d(document, "keydown", fe), F(p, r), F(y, t), F(ee, u), F(S, f), F(C, h), F(te, i), F(m, l), F(ie, s), F(_, n.blockDefaults), F(T, ue), F(ne, n.customBlocks ?? []);
|
|
5673
|
+
let pe = ot(n.mergeTags?.syntax);
|
|
5674
|
+
F(b, n.mergeTags?.tags ?? []), F(g, pe), F(ae, n.mergeTags?.onRequest ?? null), F(re, n.onRequestMedia ?? null), F(v, n.displayConditions?.conditions ?? []), F(w, n.displayConditions?.allowCustom ?? !1), F(E, e.capabilities ?? {}), F(x, le);
|
|
5675
|
+
function D() {
|
|
5676
|
+
ce?.(), se?.destroy(), u.destroy();
|
|
5676
5677
|
}
|
|
5677
5678
|
return {
|
|
5678
|
-
t:
|
|
5679
|
-
format:
|
|
5680
|
-
history:
|
|
5681
|
-
blockActions:
|
|
5682
|
-
conditionPreview:
|
|
5683
|
-
autoSave:
|
|
5684
|
-
resolvedTheme:
|
|
5685
|
-
themeStyles:
|
|
5686
|
-
themeOverrides:
|
|
5687
|
-
registry:
|
|
5688
|
-
keyboardReorder:
|
|
5689
|
-
registerCustomBlocks:
|
|
5690
|
-
destroy:
|
|
5679
|
+
t: a,
|
|
5680
|
+
format: o,
|
|
5681
|
+
history: u,
|
|
5682
|
+
blockActions: f,
|
|
5683
|
+
conditionPreview: h,
|
|
5684
|
+
autoSave: se,
|
|
5685
|
+
resolvedTheme: s,
|
|
5686
|
+
themeStyles: l,
|
|
5687
|
+
themeOverrides: c,
|
|
5688
|
+
registry: ue,
|
|
5689
|
+
keyboardReorder: le,
|
|
5690
|
+
registerCustomBlocks: de,
|
|
5691
|
+
destroy: D
|
|
5691
5692
|
};
|
|
5692
5693
|
}
|
|
5693
5694
|
//#endregion
|
|
5694
|
-
export {
|
|
5695
|
+
export { jt as A, Gt as C, Lt as D, Rt as E, mt as F, st as I, kt as M, Et as N, Ft as O, St as P, Kt as S, Ht as T, hn as _, Ua as a, Qt as b, Na as c, Jn as d, Fn as f, En as g, An as h, Ka as i, At as j, Pt as k, Oa as l, Nn as m, co as n, Pa as o, Pn as p, Qa as r, Ia as s, uo as t, Xn as u, un as v, Wt as w, Xt as x, cn as y };
|